I am using the new gpc snapshot on OSX 10.4.10 (PPC) and compile the following program:
program prog;
procedure dcp; type pv = record x, y: Extended; v: array[1..2] of Boolean; end; var sp: pv; z: Boolean;
procedure d(p: pv); begin writeln('access z before'); if z then writeln('z is true'); end;
begin { dcp } z := True; d(sp); end;
begin dcp; end.
petersch% /Developer/Pascal/gpc412/bin/gpc -o prog prog.pas petersch% prog access z before Bus error
Note that the program works ok with gpc 20060325, based on gcc-3.4.5. The program also works with the latest compiler when making variable z global.
Any ideas?
Peter