[committed] fix ia64 -O0 -fschedule-insns2 ICE

James E Wilson wilson@specifix.com
Thu Jul 7 00:15:00 GMT 2005


This fixes the problem reported by Andrey Belevatsev on the gcc mailing
list.

Trying to bootstrap with BOOT_CFLAGS set to "-g -O0 -fschedule-insns2"
results in an ICE in the scheduler.  We should not be trying to schedule
at -O0.  The problem is a trivial bug in the ia64.c file which tries to
run a scheduler pass in ia64_reorg, but fails to check for optimize
first.

This was tested with a C only ia64-linux BOOT_CFLAGS="-g -O0
-fschedule-insns2" build.  I get an ICE without the patch.  The build
succeeds with the patch, and there are no meaningful regressions.  A few
of the larger testcases got timeouts because a -O0 built compiler is so
slow, which is not unexpected.
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com
-------------- next part --------------
2005-07-06  James E. Wilson  <wilson@specifixinc.com>

	* ia64.c (ia64_reorg): Check optimize before ia64_flag_schedule_isns2.

Index: ia64.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.c,v
retrieving revision 1.384
diff -p -p -r1.384 ia64.c
*** ia64.c	28 Jun 2005 22:34:53 -0000	1.384
--- ia64.c	7 Jul 2005 00:06:57 -0000
*************** ia64_reorg (void)
*** 7566,7572 ****
       non-optimizing bootstrap.  */
    update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES, PROP_DEATH_NOTES);
  
!   if (ia64_flag_schedule_insns2)
      {
        timevar_push (TV_SCHED2);
        ia64_final_schedule = 1;
--- 7566,7572 ----
       non-optimizing bootstrap.  */
    update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES, PROP_DEATH_NOTES);
  
!   if (optimize && ia64_flag_schedule_insns2)
      {
        timevar_push (TV_SCHED2);
        ia64_final_schedule = 1;


More information about the Gcc-patches mailing list