This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Internal Compiler error with constructor expressions
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Internal Compiler error with constructor expressions
- From: Bradley Baetz <bbaetz at ug dot cs dot usyd dot edu dot au>
- Date: Tue, 13 Jun 2000 23:44:47 +1000 (EST)
gcc -v --save-temps iceReal.c
Reading specs from /gnu/usr/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/specs
gcc version 2.95.2 19991024 (release)
/gnu/usr/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/cpp -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) iceReal.c iceReal.i
GNU CPP version 2.95.2 19991024 (release) (sparc)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/gnu/usr/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/../../../../sparc-sun-solaris2.6/include
/gnu/usr/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
/gnu/usr/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/../../../../include/g++-3
End of omitted list.
/gnu/usr/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/cc1 iceReal.i -quiet -dumpbase iceReal.c -version -o iceReal.s
GNU C version 2.95.2 19991024 (release) (sparc-sun-solaris2.6) compiled by GNU C version 2.95.2 19991024 (release).
iceReal.c:14: incompatible types in initialization
iceReal.c:14: incompatible types in initialization
iceReal.c:14: Internal compiler error in `const_hash', at varasm.c:2372
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
I was trying to find a way to do the #ifdef 0 part of the source in one
line, using constructor expressions. I don't think its possible,
though. The bit that gives the error is incorrect syntax, but it still
shouldn't cause a compiler crash.
I also get a similar crash with:
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
(the x86 redhat6.1 version of gcc).
Thanks,
Bradley
struct tagNode;
typedef struct tagEntry {
char key;
struct tagNode *n;
} entry;
typedef struct tagNode {
char label;
entry **e;
} node;
#if 1
node a = {'a',(entry *[]){(entry){'b',&a},(entry){'c',&a}}};
#else
node a;
entry e1 = {'b',&a};
entry e2 = {'c',&a};
entry* entries[] = {&e1,&e2};
node a = {'a',&entries};
#endif
# 1 "iceReal.c"
struct tagNode;
typedef struct tagEntry {
char key;
struct tagNode *n;
} entry;
typedef struct tagNode {
char label;
entry **e;
} node;
node a = {'a',(entry *[]){(entry){'b',&a},(entry){'c',&a}}};
# 24 "iceReal.c"