program trimdiana (da, output); (* trimdiana: gpc crash This Pascal program demonstrates an internal error crash of the Gnu Pascal Compiler. The crash occurs when one attempts to compile: % gpc trimdiana.p gpc: Internal error: Illegal instruction: 4 (program gpc1) Please submit a full bug report. See for instructions. This program is an extensively trimmed version of http://alum.mit.edu/www/toms/delila/diana.html setting 'trimax = 8006000' in that program is also sufficient to cause the problem. Tom Thomas D. Schneider, Ph.D. Senior Investigator National Institutes of Health National Cancer Institute Frederick National Laboratory for Cancer Research Gene Regulation and Chromosome Biology Laboratory Molecular Information Theory Group Frederick, Maryland 21702-1201 schneidt@mail.nih.gov http://alum.mit.edu/www/toms *) const version = 2.17; (* THE KEY POINT: if trimax is 25000, gpc compiles ok. If it is 8006000, gpc gives: gpc: Internal error: Illegal instruction: 4 (program gpc1) Please submit a full bug report. See for instructions. *) { compile is ok with this value: trimax = 25000; (* the maximum number of data points *) } trimax = 8006000; (* the maximum number of data points *) infofield = 6; (* real number field width *) infodecim = 5; (* number of decimal points *) type (* define the four nucleotide bases *) base = (a,c,g,t); (* define a triangular array as a linear one *) trianglearray = record data: array[0..trimax] of integer; lower: integer; (* lower bound on the triangle *) upper: integer; (* upper bound on the triangle *) side: integer; (* length of side of the triangle *) area: integer; (* area of the triangle *) end; (* stores the number of dinucleotides appearing at positions on a sequence *) trisquare = array[a..t,a..t] of trianglearray; var da: text; (* output file *) procedure writeprism(var dianalysis: text; dataprism: trisquare); begin writeln(dianalysis,'* sum of Rcorrelation ... bits'); end; (* ********************************************************************* *) procedure themain(var da: text); var dataprism: trisquare; (* the data structure for diana *) begin writeln(output,' trimdiana -gpc bug',version:4:2); { It is necessary to call the procedure with the variable to cause the gpc compile problem: } writeprism(da,dataprism); end; begin themain(da); end.