* fixes compiler crash with out of memory on illegal array declarations

git-svn-id: trunk@11505 -
This commit is contained in:
florian 2008-08-03 10:34:41 +00:00
parent e0ff540918
commit d2214685c3
4 changed files with 42 additions and 32 deletions

1
.gitattributes vendored
View File

@ -6463,6 +6463,7 @@ tests/tbf/tb0208.pp svneol=native#text/plain
tests/tbf/tb0209.pp svneol=native#text/plain
tests/tbf/tb0210.pp svneol=native#text/plain
tests/tbf/tb0211.pp svneol=native#text/plain
tests/tbf/tb0212.pp svneol=native#text/plain
tests/tbf/ub0115.pp svneol=native#text/plain
tests/tbf/ub0149.pp svneol=native#text/plain
tests/tbf/ub0158a.pp svneol=native#text/plain

View File

@ -666,8 +666,9 @@ implementation
begin
{ defaults }
indexdef:=generrordef;
lowval:=int64(low(aint));
highval:=high(aint);
{ use defaults which don't overflow the compiler }
lowval:=0;
highval:=0;
repeat
{ read the expression and check it, check apart if the
declaration is an enum declaration because that needs to

View File

@ -4378,6 +4378,8 @@ implementation
constructor terrordef.create;
begin
inherited create(errordef);
{ prevent consecutive faults }
savesize:=1;
end;

6
tests/tbf/tb0212.pp Normal file
View File

@ -0,0 +1,6 @@
{ %fail }
const
st : Array [False, True] of Char = ('F', 'U');
begin
end.