I just tried to compile Suse Linux package mysql-5.0.45-18 with the GNU C compiler version 4.3 snapshot 20070907. The compiler said if gcc -DHAVE_CONFIG_H -I. -I../../strings -I.. -I../include -I../../include -DDBUG_OFF -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -DPIC -fPIC -DUNDEF_HAVE_INITGROUPS -DFORCE_INIT_OF_VARS -fno-strict-aliasing -MT ctype-utf8.o -MD -MP -MF ".deps/ctype-utf8.Tpo" -c -o ctype-utf8.o ../../strings/ctype-utf8.c; \ then mv -f ".deps/ctype-utf8.Tpo" ".deps/ctype-utf8.Po"; else rm -f ".deps/ctype-utf8.Tpo"; exit 1; fi In file included from ../../strings/ctype-utf8.c:21: ../../include/my_global.h:556: warning: function declaration isn't a prototype ../../strings/ctype-utf8.c: In function 'my_strnncollsp_utf8': ../../strings/ctype-utf8.c:2448: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Here is some help from valgrind ==19535== Invalid read of size 2 ==19535== at 0x9FFF59: cse_cc_succs (cse.c:6737) ==19535== by 0xA08F11: rest_of_handle_cse2 (cse.c:6962) ==19535== by 0x631218: execute_one_pass (passes.c:1115) ==19535== by 0x6313EF: execute_pass_list (passes.c:1168) ==19535== by 0x631404: execute_pass_list (passes.c:1169) ==19535== by 0x70957F: tree_rest_of_compilation (tree-optimize.c:404) ==19535== by 0x8767DF: cgraph_expand_function (cgraphunit.c:1077) ==19535== by 0x878A3D: cgraph_optimize (cgraphunit.c:1146) ==19535== by 0x41625D: c_write_global_declarations (c-decl.c:8080) ==19535== by 0x6B095F: toplev_main (toplev.c:1058) ==19535== by 0x52BDB43: (below main) (in /lib64/libc-2.6.so) ==19535== Address 0x0 is not stack'd, malloc'd or (recently) free'd /tmp/q.i: In function 'my_strnncollsp_utf8': /tmp/q.i:10725: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Preprocessed source attached. Flag -O2 required.
Created attachment 14207 [details] C source code
We endlessly recurse in cse_cc_succs on i686-pc-linux-gnu with -O3. Related to PR36635.
I think this is fixed on the trunk now.
(In reply to comment #3) > I think this is fixed on the trunk now. I agree. I just re-checked it and it seems fixed to me.