Re: GPC compiler crash
Thomas Schneider <[email protected]>
| Newsgroups | gmane.comp.compilers.gpc |
|---|---|
| Message-ID | <[email protected]> |
Mirsad: > The situation isn't hopeless, as - if having enough time - bug > reporter (Prof. Schneider) can scale down to the minimal code that > still triggers compiler bug or crash. If I remember well, this is > what Frank and I have been doing when bug with SET implementation > was triggered only on - then rare and now obsoleted - 64-bit Digital > Unix on DEC alpha. > > They key is to minimize example code that triggers bug, and then it > is possible to generate test case to prevent bug to reappear. > Correct implementation of compiler should of course produce correct > code on all platforms. My original posting was already trimmed down by 45 fold ... The original program was 14324 bytes and the thing I posted was 2537 bytes INCLUDING some descriptive comments. However, I have just now trimmed it down further to be 563 bytes, attached. 37% gpc minimalgpccrash.p gpc: Internal error: Illegal instruction: 4 (program gpc1) Please submit a full bug report. See <URL:http://www.gnu-pascal.de/todo.html> for instructions. 38% uname -a Darwin FR-W-C130981 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 39% gpc --version gpc 20070904, based on gcc-3.4.6 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 [email protected] http://alum.mit.edu/www/toms _______________________________________________ Gpc mailing list [email protected] https://www.g-n-u.de/mailman/listinfo/gpc
minimalgpccrash.p
(text/plain, 563 B)
program trimdiana (da, output);
const
trimax = 8006000;
type
base = (a,c,g,t);
trianglearray = record
data: array[0..trimax] of integer;
lower: integer;
upper: integer;
side: integer;
area: integer;
end;
trisquare = array[a..t,a..t] of trianglearray;
var
da: text;
procedure writeprism(var dianalysis: text; dataprism: trisquare);
begin
writeln(dianalysis,'anything goes here');
end;
procedure themain(var da: text);
var
dataprism: trisquare;
begin
writeprism(da,dataprism);
end;
begin
themain(da);
end.