Running GCC with -O2 enabled on the attached file causes a segmentation fault. This file was reduced from a much bigger file using delta. robennals@robennals:~/cvs/Ivy/deputytests/minim$ gcc --version gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. robennals@robennals:~/cvs/Ivy/deputytests/minim$ gcc -O2 t.c t.c:29: warning: ‘struct envelope’ declared inside parameter list t.c:29: warning: its scope is only this definition or declaration, which is probably not what you want t.c: In function ‘sendall’: t.c:30: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. For Debian GNU/Linux specific bug reporting instructions, see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>
Created attachment 12012 [details] Running gcc -O2 on this file gives a segfault. Tested using gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5), the standard GCC build that comes with Ubuntu.
I can confirm this on i386 with 4.0.4 20060804.
This seems to be fixed now. (tested on x86_64 with -m32)
Fixed in GCC-4.1.0.