------------------------------------------------------------------------------- void x_handle_selection_request (int a, int b, int c) { int i; if (a) { if (b) { i = c; foo (i + 0xDEADBEEF); } } else { i = 0; } bar (i + 0xDEADBEEF); } ------------------------------------------------------------------------------- Starting program: /usr/local/src/gcc/head/build/gcc/cc1 /home/ssb/bugs/pending/xselect1.i -quiet -O1 -o /dev/null Program received signal SIGSEGV, Segmentation fault. 0x080fdac6 in insert_aux (block=0x405179f8) at ../../gcc/gcc/tree-ssa-pre.c:1329 1329 tree type = TREE_TYPE (avail[block->pred->src->index]); (gdb) where #0 0x080fdac6 in insert_aux (block=0x405179f8) at ../../gcc/gcc/tree-ssa-pre.c:1329 #1 0x080fe9bb in insert_aux (block=0x405177b4) at ../../gcc/gcc/tree-ssa-pre.c:1495 #2 0x080fe9bb in insert_aux (block=0x405175e4) at ../../gcc/gcc/tree-ssa-pre.c:1495 #3 0x080fea22 in insert () at ../../gcc/gcc/tree-ssa-pre.c:1517 #4 0x08100c02 in execute_pre () at ../../gcc/gcc/tree-ssa-pre.c:1848 #5 0x080cef4f in execute_one_pass (pass=0x84e19c0) at ../../gcc/gcc/tree-optimize.c:406 #6 0x080cefd6 in execute_pass_list (pass=0x84e19c0) at ../../gcc/gcc/tree-optimize.c:435 #7 0x080cefe9 in execute_pass_list (pass=0x84e16c0) at ../../gcc/gcc/tree-optimize.c:436 #8 0x080cf216 in tree_rest_of_compilation (fndecl=0x40510e0c, nested_p=0 '\0') at ../../gcc/gcc/tree-optimize.c:530 #9 0x08065d5f in c_expand_body (fndecl=0x40510e0c) at ../../gcc/gcc/c-decl.c:6374 #10 0x083d04c5 in cgraph_expand_function (node=0x4051732c) at ../../gcc/gcc/cgraphunit.c:794 #11 0x083cf672 in cgraph_assemble_pending_functions () at ../../gcc/gcc/cgraphunit.c:295 #12 0x083cf78e in cgraph_finalize_function (decl=0x40510e0c, nested=0 '\0') at ../../gcc/gcc/cgraphunit.c:376 #13 0x080656d3 in c_finalize (fndecl=0x40510e0c) at ../../gcc/gcc/c-decl.c:6223 #14 0x08065cce in finish_function () at ../../gcc/gcc/c-decl.c:6346 #15 0x0804a639 in yyparse () at c-parse.y:373 #16 0x08052902 in c_parse_file () at c-parse.y:3040 #17 0x0809a13b in c_common_parse_file (set_yydebug=0) at ../../gcc/gcc/c-opts.c:1240 #18 0x0837ab4e in compile_file () at ../../gcc/gcc/toplev.c:1666 #19 0x0837c2c8 in do_compile () at ../../gcc/gcc/toplev.c:2712 #20 0x0837c324 in toplev_main (argc=0, argv=0xbffff934) at ../../gcc/gcc/toplev.c:2744 #21 0x080b1a70 in main (argc=0, argv=0x0) at ../../gcc/gcc/main.c:35
Confirmed.
Serge, does this patch <http://gcc.gnu.org/ml/gcc-patches/2004-06/msg00881.html> fix the problem?
No, it does not.
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-06/msg00948.html>.
Subject: Bug 15979 CVSROOT: /cvs/gcc Module name: gcc Changes by: dberlin@gcc.gnu.org 2004-06-14 01:27:57 Modified files: gcc : ChangeLog tree-ssa-pre.c Log message: 2004-06-13 Daniel Berlin <dberlin@dberlin.org> Fix PR tree-optimization/15979 Fix PR tree-optimization/15981 * tree-ssa-pre.c (insert_aux): Fix faulty logic so that we don't try to insert values undefined along some path. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3950&r2=2.3951 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-pre.c.diff?cvsroot=gcc&r1=2.8&r2=2.9
Fixed