Hi -
I've been running gpc version 2.0 on my linux 2.0.x machines without any problems. Recently we upgraded some of them to linux 2.2.0-pre4. Now, simple arithmetic assignments cause segmentation violations.
For example,
program add2(input, output); var
first : real; second : real; sum : real;
begin write('Please enter the first value: '); readln(first); write('Now enter the second value: '); readln(second); sum := first / second; writeln(first, ' div ', second, ' is ', sum); end.
compiles OK, but causes a segmentation violation, but not consistently. If I compile it again adding, say a single space somewhere, it runs fine the next time.
I've been running gpc version 2.0 on my linux 2.0.x machines without any problems. Recently we upgraded some of them to linux 2.2.0-pre4. Now, simple arithmetic assignments cause segmentation violations.
I have no quick idea where this problem comes from, but before really tracking down the bug, I suggest to upgrade your GPC to gpc-19990118, our latest beta release which fixes many known problems in gpc-2.0
Peter