summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw8975a.pp
blob: 627a800d560a32e1701919257e324113af2aee65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ %opt=-CRriot -O-2 -Ooregvar }

{Internal FPC2.1.4 error, compile with fpc -B -dDebug -O3}
procedure bug(const b: array of longint); cdecl;
  procedure intern;
  begin
    if (b[low(b)] <> 1) then {Fatal: Internal error 200409241}
      halt(1);
  end;
begin
  intern;
end;

const
  a: array[1..3] of longint = (1,2,3);
begin
  bug(a);
end.