mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 08:48:08 +02:00
* do not eat the semicolon after an absolute expression to a symbol, noted in #40978
This commit is contained in:
parent
b28681e91d
commit
b7edddf9d9
@ -1214,7 +1214,6 @@ implementation
|
||||
abssym.asmname:=stringdup(strpas(tstringconstnode(pt).value_str))
|
||||
else
|
||||
abssym.asmname:=stringdup(chr(tordconstnode(pt).value.svalue));
|
||||
consume(token);
|
||||
abssym.abstyp:=toasm;
|
||||
end
|
||||
{ address }
|
||||
|
21
tests/webtbs/tw40978.pp
Normal file
21
tests/webtbs/tw40978.pp
Normal file
@ -0,0 +1,21 @@
|
||||
program Project1;
|
||||
|
||||
var
|
||||
aa: integer public name 'aa';
|
||||
|
||||
procedure foo(bar: integer);
|
||||
var x: integer absolute 'aa';
|
||||
begin
|
||||
if x<>1234 then
|
||||
halt(1);
|
||||
x := 2;
|
||||
x := bar;
|
||||
writeln(x);
|
||||
end;
|
||||
|
||||
begin
|
||||
aa:=1234;
|
||||
foo(1);
|
||||
if aa<>1 then
|
||||
halt(1);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user