bug in egcs

Doug Kilpatrick doug@visix.com
Sun Dec 14 09:18:00 GMT 1997


?c++ -c sample.cpp
sample.cpp: In function `int main(int, char **)':
sample.cpp:31: Internal compiler error.
sample.cpp:31: Please submit a full bug report to `egcs-bugs@cygnus.com'.
?c++ -c -DWORKAROUND=1 sample.cpp
?

-- sample.cpp --

#include <stdio.h>
#include <stdlib.h>

void evilRises (void **ptr)
{
    int *pi;
    
    pi = new int;

    *pi = 0;
    
    *ptr = (void *)pi;
}

int main (int argc, char *argv[])
{
#ifdef WORKAROUND
    union foo
#else
    union
#endif
    {
        int a;
        int b;
        int c;
    } *fred, barney;
    
    evilRises((void **)&fred);
    
    barney = *fred;
    
    return EXIT_SUCCESS;
}

Doug, Speaking Only For Himself (I do NOT REPRESENT VISIX!)
-- doug@visix.com




More information about the Gcc-bugs mailing list