Adriaan van Os wrote:
Some observations:
- the problem does not occur when running gpc directly rather than
with make, even when passing the same compiler switches (this sounds like random behaviour and makes me think there is an uninitialized variable somewhere in the compiler source code)
BTW, did you notice that aturbo3test.pas is tested via units.cmp which adds some options (in particular -DHAVE_CRT that triggers use of Turbo3)?
If you haven't done yet, you might add an echo in units.cmp to find out with which options GPC is finally called. It's the line:
$1 $2 $HAVE_UNITS
(Or just add -DHAVE_CRT manually.)
Another potential difference (though rather unlikely) would be environment variables.
Unintialized compiler variables seem not so likely for this kind of problem, as Unix-like systems usually zero program's address space before the start anyway.
Frank