fpc/tests/webtbf/tw24588.pp
svenbarth b6bfa864d4 Disallow the usage of the inline assembler inside generics, because there are currently two problems:
1. At least on x86 the assembler reader initializes the parameter location informations which results in InternalError 200301231
2. Assembler tokens are not stored in the token stream and thus won't be reproduced during specialization

x86/rax86int.pas, tx86intreader.Assemble:
  * check for "parse_generic" before calling generate_parameter_info
pstatmnt.pas, assembler_block & statement:
  * generate an error message if an asm statement should be parsed inside a generic

+ added test

git-svn-id: trunk@24892 -
2013-06-13 19:42:49 +00:00

20 lines
198 B
ObjectPascal

{ %FAIL }
program tw24588;
{$mode objfpc}
{$asmmode intel}
type
generic TFoo<T>=class
procedure CrashMe(_val: T);
end;
procedure TFoo.CrashMe(_val: T);
begin
asm
mov edi,edi
end;
end;
begin
end.