Running gpc 2.6.3 on ELF format Linux 1.2.13
_p_extend() in rts/rts-file.c has following problem.
Program is writing out 3000 line file, extending file for each line (don't grumble, it works this way).
File extends OK for several hundred lines (a line or 2 each time), then the contents of the file buffer is spilled, say 20 lines written twice but mucked up on line endings, then extends OK for several hundred more lines, then does it again. The file buffer changes to a different address when spill occurs - that is, while it happens to be the same buffer address used each time, no problem.
Doesn't display this behaviour on gpc 2.6.3 on Linux 1.1.59 with a.out format.
Is fixed by commenting out line in rts/rts-file.c in _p_extend()
int ch = getc(m_FILNUM(File));
File pointer is already pointing at end of file without this line.
Regards
Jim