Seen on ia64-unknown-linux, but probably reproducible elsewhere, also: $ cat t.c typedef unsigned int UDItype __attribute__ ((mode (DI))); typedef int TItype __attribute__ ((mode (TI)));
struct DWstruct {UDItype low, high;}; typedef union { struct DWstruct s; TItype ll; } DWunion; TItype __multi3 (TItype u, TItype v) { const DWunion uu = {.ll = u}; const DWunion vv = {.ll = v}; DWunion w = {.ll = ({DWunion __w; __asm__ ("xma.hu %0 = %2, %3, f0\n\txma.l %1 = %2, %3, f0" : "=&f" (__w.s.high), "=f" (__w.s.low) : "f" (uu.s.low), "f" (vv.s.low)); __w.ll; })}; w.s.high += (uu.s.low * vv.s.high + uu.s.high * vv.s.low); return w.ll; } $ ./cc1 -quiet -g -O2 t.c t.c: In function '__multi3': t.c:19:1: error: insn 111 outside of basic blocks has non-NULL bb field t.c:19:1: error: insn 110 outside of basic blocks has non-NULL bb field t.c:19: confused by earlier errors, bailing out Needs a patch to var-tracking.c to expose the problem: Index: var-tracking.c =================================================================== --- var-tracking.c (revision 157942) +++ var-tracking.c (working copy) @@ -115,6 +115,8 @@ #include "pointer-set.h" #include "recog.h" +#undef ENABLE_CHECKING +#define ENABLE_CHECKING 1 /* var-tracking.c assumes that tree code with the same value as VALUE rtx code has no chance to appear in REG_EXPR/MEM_EXPRs and isn't a decl. Currently the value is the same as IDENTIFIER_NODE, which has such @@ -8489,6 +8491,7 @@ variable_tracking_main (void) flag_var_tracking_assignments = save; + verify_flow_info (); return ret; } This comes from emit_notes_for_differences. I have no idea what the purpose is of the notes between basic blocks. Apparently the CFG has to be frozen at this point, or the notes make no sense to begin with. But it's also not clear to me where the notes should be emitted. Help sought from a VTA guy, i.e. Jakub or Alexandre :-) -- Summary: var-tracking inserts notes with non-NULL BLOCK_FOR_INSN in between basic blocks Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: wrong-debug Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: steven at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43631