3.1 build failure on x86

Jan Hubicka jh@suse.cz
Sun Aug 19 06:42:00 GMT 2001


> I'm using CVS trunk on x86 Red Hat Linux 6.2.
> 
> If I compile libgcj with `-g' I see this failure:
> 
> ../../../gcc/libjava/jni.cc: In function `void 
>    _Jv_JNI_CallAnyVoidMethodV(JNIEnv*, java::lang::Object*, java::lang::Class*,    _Jv_Method*, void*) [with invocation_type style = normal]':
> ../../../gcc/libjava/jni.cc:903:   instantiated from here
> ../../../gcc/libjava/jni.cc:819: Internal compiler error in 
>    fixup_abnormal_edges, at reload1.c:9514
> 
> If I recompile with `-g -O2' then it works.

Hi,
the failure is caused by load possibly causing exception that is amned as
trivially dead.  The proper fix is probably to care removing dead edges
wehenever we remove last insn in the basic block. Doing so early may
improve optimizations, as life_analysis does better job afterwards.

It does fix the testcase and I am bootstrapping/regtesting i686 right now.
Sun Aug 19 15:40:00 CEST 2001  Jan Hubicka  <jh@suse.cz>
	* flow.c (delete_noop_moves, propagate_block_delete_insn): Purge
	dead edges.

*** flow.c1	Sun Aug 19 15:34:24 2001
--- flow.c	Sun Aug 19 15:37:41 2001
*************** delete_noop_moves (f)
*** 4661,4666 ****
--- 4662,4669 ----
  	      PUT_CODE (insn, NOTE);
  	      NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
  	      NOTE_SOURCE_FILE (insn) = 0;
+ 	      if (insn == bb->end)
+ 		purge_dead_edges (bb);
  	    }
  	}
      }
*************** propagate_block_delete_insn (bb, insn)
*** 5247,5253 ****
      }
  
    if (bb->end == insn)
!     bb->end = PREV_INSN (insn);
    flow_delete_insn (insn);
  }
  
--- 5250,5259 ----
      }
  
    if (bb->end == insn)
!     {
!       bb->end = PREV_INSN (insn);
!       purge_dead_edges (bb);
!     }
    flow_delete_insn (insn);
  }
  



More information about the Gcc-patches mailing list