This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Internal compiler error building libstdc++ for vax
- From: coypu at sdf dot org
- To: gcc at gcc dot gnu dot org
- Cc: coypu at sdf dot org
- Date: Thu, 15 Mar 2018 13:40:29 +0000
- Subject: Internal compiler error building libstdc++ for vax
Hi folks,
netbsd's copy of GCC differs enough that it fails elsewhere with
gcc-trunk, but the problematic code is upstream.
updating netbsd to gcc 6.4.0, I get an internal compiler error building
libstdc++. (Long version: http://gnats.netbsd.org/53039)
Short version:
test.cc: In function 'bool std::atomic_flag_test_and_set_explicit(std::__atomic_flag_base*, std::memory_order)':
test.cc:25:3: internal compiler error: in patch_jump_insn, at cfgrtl.c:1271
comment at cfgrtl.c:1271 suggests:
/* If the substitution doesn't succeed, die. This can happen
if the back end emitted unrecognizable instructions or if
target is exit block on some arches. */
if (!redirect_jump (as_a <rtx_jump_insn *> (insn),
block_label (new_bb), 0))
{
gcc_assert (new_bb == EXIT_BLOCK_PTR_FOR_FN (cfun));
so it's saying the backend is generating garbage.
(gdb) call debug_insn_slim(insn)
12: {pc={(zero_extract([r23:SI],0x1,0x1)!=0)?L14:pc};zero_extract([r23:SI],0x1,0x1)=0x1;}
I've found that if I modify vax/builtins.md:
@@ -61,7 +67,7 @@
label = gen_label_rtx ();
emit_move_insn (operands[0], const1_rtx);
- emit_jump_insn (gen_jbbssi<mode> (operands[1], const0_rtx, label, operands[1]));
+ //emit_jump_insn (gen_jbbssi<mode> (operands[1], const0_rtx, label, operands[1]));
emit_move_insn (operands[0], const0_rtx);
emit_label (label);
DONE;
it "fixes" my internal compiler error. However, I'm not sure what is
wrong with gen_jbbssi<mode>.
My current strategy of "just changing things and seeing if they help /
comparing to 50 examples of nearly identical code" doesn't appear
to be working despite many attempts :-)
Please help, thanks.