John L. Ries a écrit :
The attached example, produces the following highly informative error message when compiled:
gpcbug20100502.p:13: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu-pascal.de/todo.html> for instructions.
I'm running GPC 20070904, based on gcc-4.1.2 under 64-bit Linux (Slamd64 12.2 to be exact). The error is also triggered on my 32-bit Linux (Debian 5.0.4) system running the same compiler, based on gcc-4.1.3.
The code (attached) is as follows:
unit example; interface
type CandName(MaxCandName:integer) = string(MaxCandName); CandStatus = (Elected, Eliminated, Neither); CandRecord = record Name : CandName; RawVote : integer; Allocation : integer; Status : CandStatus; end; CandArray(N:integer) = array[1..N] of CandRecord; end.
If I change the declaration on the array to "^CandRecord", the example compiles normally. The types also compile normally inside of a program (instead of a unit).
If there's a more recent version of the GPC codebase that I should be using instead, then please let me know.
Same error here with MINGW / gpc20070904 / gcc3.4.5 no error with DJGPP / gcc 3.4.4 or 4.1.2 Hope this helps Maurice -- Maurice Lombardi Laboratoire de Spectrometrie Physique, Universite Joseph Fourier de Grenoble, BP87 38402 Saint Martin d'Heres Cedex FRANCE Tel: 33 (0)4 76 51 47 51 Fax: 33 (0)4 76 63 54 95 mailto:Maurice.Lombardi@ujf-grenoble.fr