Emil Jerabek wrote:
the following code
[...]
crashes the compiler:
[~/pascal]% gpc -v Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnu/3.1.1/specs Configured with: ../gcc-3.1.1/configure --enable-languages=pascal Thread model: single gpc version 20021128, based on gcc-3.1.1 [~/pascal]% gpc crash.pas ../../gcc-3.1.1/gcc/p/gpc-typeck.c:1613:build_array_ref: failed assertion `!(TREE_CODE (index) == INTEGER_CST && TYPE_VALUES (TREE_TYPE (array)) && !int_fits_type_p (index, TYPE_VALUES (TREE_TYPE (array))))'
Thanks for the report. Will be fixed in the next alpha (emil21*.pas).
GPC with 2.95.2 backend crashes hs well, in a slightly different place:
[~/pascal]% gpc2 -v Reading specs from /usr/local/bin/../lib/gcc-lib/i586-pc-linux-gnu/2.95.2/specs gpc version 20021111, based on gcc-2.95.2 19991024 (release) [~/pascal]% gpc2 crash.pas /home/emil/dist/gpc-src/gcc-2.95.2/gcc/p/gpc-typeck.c:1860:build_array_ref: failed assertion `0'
BTW, it's actually the same place. It has just moved (and changed a little) between the two GPC versions.
Frank