[tree-ssa][unit-at-a-time] bootstrap ICE tree-ssa-dom.c:877

judd.jenne@charter.net judd.jenne@charter.net
Wed Aug 27 17:08:00 GMT 2003


Here is a new error/ICE with BOOT_CFLAGS='-O2 
-funit-at-a-time' on ssa (c/c++ checking athlon-xp 
gentoo-linux).

This doesn't appear when manually compiling the same 
function with the
extra param '-fdisable-tree-ssa'.

This one doesn't appear to be an issue with inlining 
functions that
contain static local variables.  At a quick glance, it 
appears to be
an interaction in inlining two successive calls.

In this case three functions are inlined into 
'cfg_layout_finalize'
under the called once rule.  There appears to be an 
interaction here.
This error occurs when the first two calls are both 
inlined.
This was determined by selectively adding __attribute__ 
((noinline))
to the three prototypes for the relevant functions.

Function in question:

void
cfg_layout_finalize (void)
{
   basic_block bb;

#ifdef ENABLE_CHECKING
   verify_flow_info ();
#endif
   rtl_register_cfg_hooks ();

   /* NOTE: This is inlined. */
   fixup_fallthru_exit_predecessor ();

   /* NOTE: This is inlined. */
   fixup_reorder_chain ();

#ifdef ENABLE_CHECKING
   verify_insn_chain ();
#endif

   free_alloc_pool (cfg_layout_pool);
   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
     bb->rbi = NULL;

   /* Note: This is harmlessly inlined. */
   break_superblocks ();

#ifdef ENABLE_CHECKING
   verify_flow_info ();
#endif
}

First few lines of the inlined functions:

static void
fixup_reorder_chain (void)
{
   basic_block bb, prev_bb;
   int index;
   rtx insn = NULL;

   ...
}

static void
fixup_fallthru_exit_predecessor (void)
{
   edge e;
   basic_block bb = NULL;

   for (e = EXIT_BLOCK_PTR->pred; e; e = e->pred_next)
     if (e->flags & EDGE_FALLTHRU)
       bb = e->src;

   if (bb && bb->rbi->next)
     {
       basic_block c = ENTRY_BLOCK_PTR->next_bb;

       while (c->rbi->next != bb)
	c = c->rbi->next;

       c->rbi->next = bb->rbi->next;
       while (c->rbi->next)
	c = c->rbi->next;

       c->rbi->next = bb;
       bb->rbi->next = NULL;
     }
}


See the following link for more information:
http://gcc.gnu.org/ml/gcc/2003-08/msg01215.html


stage1/xgcc -Bstage1/ 
-B/home/judd/gcc-dev/bin-ssa/i686-pc-linux-gnu/bin/ -c 
  -O2 -funit-at-a-time -DIN_GCC   -W -Wall -Wwrite-strings 
-Wstrict-prototypes -Wmissing-prototypes -pedantic 
-Wno-long-long -Werror -fno-common   -DHAVE_CONFIG_H 
   -I. -I. -I/home/judd/gcc-dev/gcc-ssa/gcc 
-I/home/judd/gcc-dev/gcc-ssa/gcc/. 
-I/home/judd/gcc-dev/gcc-ssa/gcc/config 
-I/home/judd/gcc-dev/gcc-ssa/gcc/../include 
-I/home/judd/gcc-dev/gcc-ssa/gcc/../libbanshee/libcompat 
-I/home/judd/gcc-dev/gcc-ssa/gcc/../libbanshee 
-I/home/judd/gcc-dev/gcc-ssa/gcc/../libbanshee/points-to 
 /home/judd/gcc-dev/gcc-ssa/gcc/cfglayout.c -o cfglayout.o
/home/judd/gcc-dev/gcc-ssa/gcc/cfglayout.c: In function 
`cfg_layout_finalize':

/home/judd/gcc-dev/gcc-ssa/gcc/cfglayout.c:1186: internal 
compiler error: in optimize_stmt, at tree-ssa-dom.c:877
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[2]: *** [cfglayout.o] Error 1
make[2]: Leaving directory 
`/home/judd/gcc-dev/obj-ssa/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory 
`/home/judd/gcc-dev/obj-ssa/gcc'
make: *** [bootstrap] Error 2

Judd



More information about the Gcc mailing list