https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99654

--- Comment #12 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Sam James from comment #11)

With trunk in debug:

@@ -138,7 +144,8 @@ DIE    0: DW_TAG_compile_unit #
         DIE    0: DW_TAG_inlined_subroutine #
           abbrev id: 0 offset: 0 mark: 0
           DW_AT_abstract_origin: die -> 0 #
-          DW_AT_entry_pc: label: *.LBB23
+          DW_AT_entry_pc: label: *.LBI23
+          DW_AT_GNU_entry_view: 12
           DW_AT_ranges: range list
           DW_AT_call_file: "test2.c" (1)
           DW_AT_call_line: 13

I can't spot anything where it goes wrong earlier than that, so
add_high_low_attributes gets called with a different (identical otherwise) DIE
that points to a different label?

gen_inlined_subroutine_die does:

  /* The inliner creates an extra BLOCK for the parameter setup,
     we want to merge that with the actual outermost BLOCK of the
     inlined function to avoid duplicate locals in consumers.
     Do that by doing the recursion to subblocks on the single subblock
     of STMT.  */
[...]
  decls_for_scope (stmt, subr_die, !unwrap_one);
  if (unwrap_one)
    {
      decls_for_scope (sub, subr_die);
      for (sub = BLOCK_CHAIN (sub); sub; sub = BLOCK_CHAIN (sub))
        gen_block_die (sub, subr_die); /* <<< subr_die is already wrong here */
    }

Reply via email to