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

            Bug ID: 63722
           Summary: Dwarf DW_AT_inline incorrect for abstract origins
                    created for ipa-sra, ipa-split and ipa-cp
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jamborm at gcc dot gnu.org
              Host: x86_64-linux-gnu
            Target: x86_64-linux-gnu

Created attachment 33876
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33876&action=edit
Reduced testcase

gcc always sets DW_AT_inline to DW_INL_inlined when outputting debug
info of an abstract origin created for a cloned function.

The testcase has been reduced from Linux kernel, compile with;

gcc -c -O2 -g -fdump-tree-optimized b.i

You can see in the dump that drop_futex_key_refs.isra.0 has not
been inlined but the debug info says otherwise:

< 1><0x000000c5>    DW_TAG_subprogram
                      DW_AT_name                  drop_futex_key_refs
                      DW_AT_decl_file             0x00000001 /.../b.i
                      DW_AT_decl_line             0x00000010
                      DW_AT_prototyped            yes(1)
                      DW_AT_inline                DW_INL_inlined
                      DW_AT_sibling               <0x000000f6>


As far as I understand this is because tree_function_versioning sets
DECL_POSSIBLY_INLINED to true and then outputs the die early, even
before any inlining decisions are made.

Reply via email to