https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86459
--- Comment #1 from Mark Wielaard <mark at gcc dot gnu.org> --- Sorry I missed that testcase starting to fail. I don't currently have it in my tree, so I assume it was added after this commit? svn r260297 is: commit 35a499265a9b4b31277fc540ddfbeb63fb361649 Author: mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Wed May 16 18:02:25 2018 +0000 DWARF: Emit DWARF5 forms for indirect addresses and string offsets. We already emit DWARF5 attributes and tables for indirect addresses and string offsets, but still use GNU forms. Add a new helper function dwarf_FORM () for emitting the right form. Currently we only use the uleb128 forms. But DWARF5 also allows 1, 2, 3 and 4 byte forms (DW_FORM_strx[1234] and DW_FORM_addrx[1234]) which might be more space efficient. gcc/ChangeLog * dwarf2out.c (dwarf_FORM): New function. (set_indirect_string): Use dwarf_FORM. (reset_indirect_string): Likewise. (size_of_die): Likewise. (value_format): Likewise. (output_die): Likewise. (add_skeleton_AT_string): Likewise. (output_macinfo_op): Likewise. (index_string): Likewise. (output_index_string_offset): Likewise. (output_index_string): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@260297 138bc75d-0d04-0410-961f-82ee72b054a4 Which changed output_macinfo_op as follows: @@ -28070,7 +28092,7 @@ output_macinfo_op (macinfo_entry *ref) node = find_AT_string (ref->info); gcc_assert (node && (node->form == DW_FORM_strp - || node->form == DW_FORM_GNU_str_index)); + || node->form == dwarf_form (DW_FORM_strx))); dw2_asm_output_data (1, ref->code, ref->code == DW_MACRO_define_strp ? "Define macro strp" So I assume it is this assert that is triggering. dwarf_form () was also introduced in that patch and is: +/* And similarly for forms. */ +static inline enum dwarf_form +dwarf_FORM (enum dwarf_form form) +{ + switch (form) + { + case DW_FORM_addrx: + if (dwarf_version < 5) + return DW_FORM_GNU_addr_index; + break; + + case DW_FORM_strx: + if (dwarf_version < 5) + return DW_FORM_GNU_str_index; + break; + + default: + break; + } + return form; +} I'll update my tree and will try to replicate.