@@ -1359,7 +1359,8 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
consume(_RKLAMMER);
end;
curoffset:=oldoffset;
- ftcb.maybe_end_aggregate(def);
+ if ErrorCount=0 then
+ ftcb.maybe_end_aggregate(def);
end
{ if array of char then we allow also a string }
else if is_anychar(def.elementdef) then
@@ -0,0 +1,43 @@
+{ %opt=-O3 }
+{ %fail }
+
+{ This test has been known to generate internal error 2014091205 }
+program tcond1.pp;
+const
+ Expected: array[0..3] of array[0..2] of Integer =
+ ((-10, 3), (-10, 4), (0, -10), (0, -10));
+function TestInput(Input, TestAns: Integer): Boolean;
+ var
+ O1, O2, O3: Integer;
+ begin
+ if Input < 2 then
+ O1 := -10;
+ O2 := TestAns;
+ end
+ else
+ O1 := 0;
+ O2 := -10;
+ end;
+ TestInput :=
+ (O1 = Expected[Input][0]) and
+ (O2 = Expected[Input][1]);
+var
+ X: Integer;
+begin
+ for X := 0 to 3 do
+ if not TestInput(X, X + 3) then
+ Halt(1);
+ WriteLn('ok');
+end.