fpc/tests/test/tasm18e.pp
nickysn 34c9136283 + added tests, which check that 'test [reg+const*recordtype], 1' and
'test [reg+const*recordtype.recordfield], 1' produce an 'unable to determine
  operand size' error

git-svn-id: trunk@38229 -
2018-02-12 15:44:39 +00:00

40 lines
587 B
ObjectPascal

{ %FAIL }
{ %CPU=i8086,i386,x86_64 }
program tasm18e;
{$ifdef FPC}
{$asmmode intel}
{$else}
{$define CPUI8086}
{$endif FPC}
const
cval = 1;
type
foo2 = packed record
b1: byte;
b2: byte;
end;
foo = packed record
bb1: byte;
fb2: foo2;
end;
begin
asm
{ this produces an error in TP7, while
test [di + 1*foo.fb2], cval
doesn't... go figure :) }
{$ifdef CPUI8086}
test [di + 1*foo.fb2], cval
{$endif}
{$ifdef CPUI386}
test [edi + 1*foo.fb2], cval
{$endif}
{$ifdef CPUX86_64}
test [rdi + 1*foo.fb2], cval
{$endif}
end;
end.