mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 09:59:41 +02:00
* don't crash when ranges are passed erroneously to an array of const, resolves #11632
git-svn-id: trunk@11353 -
This commit is contained in:
parent
f4c51462ad
commit
fffc05731c
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -7937,6 +7937,7 @@ tests/webtbf/tw11254a.pp svneol=native#text/plain
|
||||
tests/webtbf/tw11295a.pp svneol=native#text/plain
|
||||
tests/webtbf/tw11295b.pp svneol=native#text/plain
|
||||
tests/webtbf/tw1157a.pp svneol=native#text/plain
|
||||
tests/webtbf/tw11632.pp svneol=native#text/plain
|
||||
tests/webtbf/tw1238.pp svneol=native#text/plain
|
||||
tests/webtbf/tw1251a.pp svneol=native#text/plain
|
||||
tests/webtbf/tw1270.pp svneol=native#text/plain
|
||||
|
@ -798,10 +798,8 @@ implementation
|
||||
|
||||
function tarrayconstructorrangenode.pass_1 : tnode;
|
||||
begin
|
||||
firstpass(left);
|
||||
firstpass(right);
|
||||
expectloc:=LOC_CREFERENCE;
|
||||
result:=nil;
|
||||
CGMessage(parser_e_illegal_expression);
|
||||
end;
|
||||
|
||||
|
||||
|
7
tests/webtbf/tw11632.pp
Normal file
7
tests/webtbf/tw11632.pp
Normal file
@ -0,0 +1,7 @@
|
||||
{ %fail }
|
||||
{$mode objfpc}
|
||||
program crash1;
|
||||
procedure a(b: array of const); begin end;
|
||||
begin
|
||||
a([0..1]);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user