crashing cc1 - merry christmas :)
Cedric Roux
Cedric.Roux@lip6.fr
Fri Dec 21 14:48:00 GMT 2001
Hello dear gcc coders,
I was experimenting with data structures for my little
ctl formulas parser (yes, I know, everyone uses some lex/yacc
facility, but well, you know...) and I found a little error in
gcc.
I didn't test it against a 3 release, I unfortunatly don't
have one under my hand. Sorry if this problem does not exist
in this version anymore.
check this :
/users/cao/cedric/bdd/ctl>uname -m
i686
/users/cao/cedric/bdd/ctl>gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)
/users/cao/cedric/bdd/ctl>cat toto.c
int x = (int [2][]){0};
/users/cao/cedric/bdd/ctl>gcc -c -Wall toto.c
toto.c:1: warning: missing braces around initializer
toto.c:1: warning: (near initialization for `(anonymous)[0]')
toto.c:1: warning: initialization makes integer from pointer without a
cast
toto.c:1: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
(Yes, it's a redhat version, but read the following :).)
cc1 gives a nice segmentation fault.
Of course the program has no meaning at all, but gcc should
not give a segmentation fault. It should say "syntax error"
or something similar. (A one-line program to crash cc1, it's
my second one, I think I will open a contest one of those days :))))
I tried this against gcc 2.95.2 on a silicon graphics/indy,
with an egcs release under a sparc station, and it crashes too.
So, well...
Sorry, I have not much time to investigate the source code, so I let
you do (if there is still a problem in your current release).
I wish you a merry christmas ! :)
Cedric.
PS: excuse my horrible english.
More information about the Gcc-bugs
mailing list