remove_unnecessary_notes breaks libjava build
Per Bothner
per@bothner.com
Thu Mar 1 23:40:00 GMT 2001
This patch breaks building libjava (in the trunk):
Sat Feb 24 06:45:21 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* tree.h (BLOCK_DEAD): New macro.
(struct tree_block): New flag, dead_flag.
* print-tree.c (print_node, case 'b'): Print missing fields.
* emit-rtl.c (remove_unnecessary_notes): Set BLOCK_DEAD.
* function.c (identify_blocks): Enable test for misplaced notes.
(all_blocks): Skip BLOCK_DEAD blocks.
* integrate.c (integrate_decl_tree): Likewise.
I don't quite understand what is going on, but it appears to be
related to exception handling.
The errors I was getting was duplicate .LBB0/.LBE0 labels.
And the reason for that was that final_scan_insn was calling
ASM_OUTPUT_INTERNAL_LABEL on NOTE_INSN_BLOCK_BEG and NOTE_INSN_BLOCK_END
insns that did not have BLOCK_NUMBER (NOTE_BLOCK (insn)). And the
reason for that was that they had been skipped by renumber_blocks.
And the reason for that was BLOCK_DEAD had been set on the block
in remove_unnecessary_notes, in the afore-mentioned patch.
The quick work-around is basically disabling the patch:
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.164
diff -u -p -r1.164 emit-rtl.c
--- emit-rtl.c 2001/02/24 13:15:54 1.164
+++ emit-rtl.c 2001/03/02 07:24:30
@@ -2881,7 +2881,9 @@ remove_unnecessary_notes ()
if (debug_ignore_block (NOTE_BLOCK (insn)))
{
+#if 0
BLOCK_DEAD (NOTE_BLOCK (insn)) = 1;
+#endif
remove_insn (prev);
remove_insn (insn);
}
With this patch, plus the patch I just emailed (with the Subject
"patch for libjava build failure"), make boostrap followed by
make install works.
Can I request that people enable that least C++ *and* java
as part of a boostrap, before checking in rtl-related changed?
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/
More information about the Java
mailing list