On sh4-unknown-linux-gnu, r162270 | bernds | 2010-07-17 08:47:46 +0900 (Sat, 17 Jul 2010) | 26 lines caused a build failure during compiling libjava: ../trunk/libjava/verify.cc: In member function 'void _Jv_BytecodeVerifier::merge_into(int, _Jv_BytecodeVerifier::state*)': ../trunk/libjava/verify.cc:1527:3: error: in basic block 200: ../trunk/libjava/verify.cc:1527:3: error: flow control insn inside a basic block (insn 1318 1315 1309 200 ../trunk/libjava/verify.cc:686 (set (reg:SI 1 r1 [orig:447 D.22193 ] [447]) (mem/s:SI (plus:SI (reg/v/f:SI 9 r9 [orig:452 from_state ] [452]) (const_int 24 [0x18])) [45 MEM[(const struct type &)from_state_22(D) + 16].pc+0 S4 A32])) 176 {movsi_ie} (expr_list:REG_EH_REGION (const_int 3 [0x3]) (nil))) ../trunk/libjava/verify.cc:1527:3: internal compiler error: in rtl_verify_flow_info_1, at cfgrtl.c:2030 P../trunk/libjava/verify.cc: In member function 'void _Jv_BytecodeVerifier::merge_into(int, _Jv_BytecodeVerifier::state*)': ../trunk/libjava/verify.cc:1527:3: error: in basic block 200: ../trunk/libjava/verify.cc:1527:3: error: flow control insn inside a basic block (insn 1318 1315 1309 200 ../trunk/libjava/verify.cc:686 (set (reg:SI 1 r1 [orig:447 D.22193 ] [447]) (mem/s:SI (plus:SI (reg/v/f:SI 9 r9 [orig:452 from_state ] [452]) (const_int 24 [0x18])) [45 MEM[(const struct type &)from_state_22(D) + 16].pc+0 S4 A32])) 176 {movsi_ie} (expr_list:REG_EH_REGION (const_int 3 [0x3]) (nil))) ../trunk/libjava/verify.cc:1527:3: internal compiler error: in rtl_verify_flow_info_1, at cfgrtl.c:2030 It seems that the patch below restores the build on SH, though I'm not sure if it's the right thing to do. diff -up ORIG/trunk/gcc/postreload.c trunk/gcc/postreload.c --- ORIG/trunk/gcc/postreload.c 2010-07-17 10:31:33.000000000 +0900 +++ trunk/gcc/postreload.c 2010-07-17 23:07:42.000000000 +0900 @@ -924,6 +924,9 @@ reload_combine_recognize_const_pattern ( if (must_move_add && use_ruid < last_jump_ruid) break; + if (find_reg_note (use_insn, REG_EH_REGION, NULL)) + break; + /* If the add clobbers another hard reg in parallel, don't move it past a real set of this hard reg. */ if (must_move_add && clobbered_regno >= 0
Created attachment 21237 [details] Potential fix Does this fix it?
Ideally, the code would look at the CFG instead, like the loop above it, that uses FOR_EACH_BB_REVERSE. But most of the postreload.c code ignores the CFG, unfortunately...
(In reply to comment #1) > Does this fix it? Yes. With it, the failure go away and my cross sh-linux build has just completed successfully.
libada failed to build with the same error in i386-pc-solaris2.10. You patch patch fixed that as well.
Fixed now.