From Andreas Jaeger, confirmed by toon on IRC. http://gcc.gnu.org/ml/gcc-patches/2005-12/msg01955.html make[3]: Entering directory `/builds/gcc/misc/stage3-gcc/ada/tools' ../../gnatmake -c -I../rts -I. -I/cvs/gcc-svn/trunk/gcc/ada gnatchop --GCC="../../xgcc -B../../ -O2 -g -O2 -gnatpg -gnata" ../../xgcc -c -I./ -I../rts -I. -I/cvs/gcc-svn/trunk/gcc/ada -B../../ -O2 -g -O2 -gnatpg -gnata -I- /cvs/gcc-svn/trunk/gcc/ada/gnatchop.adb +===========================GNAT BUG DETECTED==============================+ | 4.2.0 20051231 (experimental) (x86_64-suse-linux-gnu) GCC error: | | in find_or_generate_expression, at tree-ssa-pre.c:2028 | | Error detected at gnatchop.adb:1810:5 | | Please submit a bug report; see http://gcc.gnu.org/bugs.html. | | Use a subject line meaningful to you and us to track the bug. | | Include the entire contents of this bug box in the report. | | Include the exact gcc or gnatmake command that you entered. | | Also include sources listed below in gnatchop format | | (concatenated together with no headers between files). | +==========================================================================+
the ICE is on the SSA_NAME for the PARM_DECL for the chain variable for nested function I might have a fix, I think the normal issue as not treating this PARM_DECL live at the beginging of the first BB is the issue. Here is the patch which I am testing right now: Index: tree-ssa-pre.c =================================================================== --- tree-ssa-pre.c (revision 109198) +++ tree-ssa-pre.c (working copy) @@ -3086,6 +3086,18 @@ compute_avail (void) } } + if (cfun->static_chain_decl) + { + param = cfun->static_chain_decl; + if (default_def (param) != NULL) + { + tree def = default_def (param); + vn_lookup_or_add (def, NULL); + bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), def); + bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR), def); + } + } + /* Allocate the worklist. */ worklist = XNEWVEC (basic_block, n_basic_blocks);
Patch posted: http://gcc.gnu.org/ml/gcc-patches/2005-12/msg01966.html
Subject: Bug 25612 Author: pinskia Date: Sat Dec 31 19:38:05 2005 New Revision: 109200 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109200 Log: 2005-12-31 Andrew Pinski <pinskia@ohysics.uc.edu> PR tree-opt/25612 * tree-ssa-pre.c (compute_avail): Treat the static chain decl as a parameter and pretend that it is defined in the entry basic block. Modified: trunk/gcc/ChangeLog trunk/gcc/tree-ssa-pre.c
Fixed.