mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-03 04:50:13 +02:00
* allow deref of loop variable
git-svn-id: trunk@981 -
This commit is contained in:
parent
813e21fbd8
commit
62972054c4
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6187,6 +6187,7 @@ tests/webtbs/tw4247.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4253.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4260.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4277.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4308.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4336.pp svneol=native#text/plain
|
||||
tests/webtbs/ub1873.pp svneol=native#text/plain
|
||||
tests/webtbs/ub1883.pp svneol=native#text/plain
|
||||
|
@ -1143,6 +1143,7 @@ implementation
|
||||
begin
|
||||
{ loop counter? }
|
||||
if not(Valid_Const in opts) and
|
||||
not gotderef and
|
||||
(vo_is_loop_counter in tabstractvarsym(tloadnode(hp).symtableentry).varoptions) then
|
||||
CGMessage1(parser_e_illegal_assignment_to_count_var,tloadnode(hp).symtableentry.realname);
|
||||
{ derefed pointer }
|
||||
|
17
tests/webtbs/tw4308.pp
Executable file
17
tests/webtbs/tw4308.pp
Executable file
@ -0,0 +1,17 @@
|
||||
{ Source provided for Free Pascal Bug Report 4308 }
|
||||
{ Submitted by "Olle" on 2005-08-22 }
|
||||
{ e-mail: olle.r@automagika.se }
|
||||
program loop_var_assgn;
|
||||
|
||||
procedure ZeroBlock (startAddr: PtrUInt; length: SizeUInt);
|
||||
|
||||
var
|
||||
i: PtrUInt;
|
||||
|
||||
begin
|
||||
for i := startAddr to startAddr + length - 1 do
|
||||
PByte(i)^ := 0;
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
Loading…
Reference in New Issue
Block a user