Le 17/11/2012 16:13, Baudouin Le Charlier a écrit :
I am using a Mac OS X 10.6.8. I have downloaded GNU Pascal for Mac Os fromhttp://www.microbizz.nl/gpc.html. I have been using GNU Pascal for writing very simple programs for an introductory programming course and it worked fine until I wrote the following program for which I got a "bus error" when writing a first record in the file (at line 128). Notice that the program executes without errors when compiled with free pascal compiler.
It works also with old BP ! I find the same error (SIGSEGV) under DJGPP, MingW and Linux 64bits Seems to be a serious bug of GPC. Incidentally, when investigating with GDB, I found that the two variants of the record "personne" are consecutive instead of sharing the same placein memory, and the SizeOf(p) = 844 for a 32 bits system is consistent with that. It is indeed said in the docs that place sharing is not mandatory, but I have used this very frequently in the past !
Maurice