This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

A compiler crash


The following (incorrect) input program makes the compiler crash.

Bernd

darkstar:/tmp/x # gcc -v
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.28/specs
gcc version egcs-2.91.28 19980508 (gcc2 ss-980502 experimental)
darkstar:/tmp/x # cat crash.c
static inline  int a(int x)
{
}
static inline  void b(int x, int y)
{
}

while(1) {
    if (tmp == 0)
        ;
    b(0, 0);
}

}
static int c(void)
{
    b(0,0);
}
darkstar:/tmp/x # gcc -O crash.c
crash.c:8: parse error before `while'
crash.c:11: parse error before `0'
crash.c:11: conflicting types for `b'
crash.c:5: previous declaration of `b'
crash.c:11: warning: data definition has no type or storage class
gcc: Internal compiler error: program cc1 got fatal signal 11


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]