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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org
   Last reconfirmed|                            |2021-08-16
     Ever confirmed|0                           |1
          Component|debug                       |ipa
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
We're creating a clone and have

 <1><f1>: Abbrev Number: 14 (DW_TAG_subprogram)
    <f2>   DW_AT_name        : (indirect string, offset: 0x58): varargs
    <f6>   DW_AT_decl_file   : 1
    <f7>   DW_AT_decl_line   : 2
    <f8>   DW_AT_decl_column : 13
    <f9>   DW_AT_prototyped  : 1
    <f9>   DW_AT_inline      : 1        (inlined)
    <fa>   DW_AT_sibling     : <0x121>
 <2><fe>: Abbrev Number: 15 (DW_TAG_formal_parameter)
    <ff>   DW_AT_name        : q0
    <102>   DW_AT_decl_file   : 1
    <103>   DW_AT_decl_line   : 2
    <104>   DW_AT_decl_column : 25
    <105>   DW_AT_type        : <0xea>
 <2><109>: Abbrev Number: 15 (DW_TAG_formal_parameter)
    <10a>   DW_AT_name        : q1
    <10d>   DW_AT_decl_file   : 1
    <10e>   DW_AT_decl_line   : 2
    <10f>   DW_AT_decl_column : 33
    <110>   DW_AT_type        : <0xea>
 <2><114>: Abbrev Number: 16 (DW_TAG_unspecified_parameters)
 <2><115>: Abbrev Number: 17 (DW_TAG_variable)
    <116>   DW_AT_name        : ap
    <119>   DW_AT_decl_file   : 1
    <11a>   DW_AT_decl_line   : 3
    <11b>   DW_AT_decl_column : 11
    <11c>   DW_AT_type        : <0x9b>
 <2><120>: Abbrev Number: 0
 <1><121>: Abbrev Number: 18 (DW_TAG_subprogram)
    <122>   DW_AT_abstract_origin: <0xf1>
    <126>   DW_AT_low_pc      : 0x0
    <12e>   DW_AT_high_pc     : 0xb
    <136>   DW_AT_frame_base  : 1 byte block: 9c        (DW_OP_call_frame_cfa)
    <138>   DW_AT_GNU_all_call_sites: 1
 <2><138>: Abbrev Number: 19 (DW_TAG_formal_parameter)
    <139>   DW_AT_abstract_origin: <0xfe>
    <13d>   DW_AT_location    : 1 byte block: 55        (DW_OP_reg5 (rdi))
 <2><13f>: Abbrev Number: 19 (DW_TAG_formal_parameter)
    <140>   DW_AT_abstract_origin: <0x109>
    <144>   DW_AT_location    : 1 byte block: 54        (DW_OP_reg4 (rsi))
 <2><146>: Abbrev Number: 16 (DW_TAG_unspecified_parameters)
 <2><147>: Abbrev Number: 20 (DW_TAG_variable)
    <148>   DW_AT_abstract_origin: <0x115>
    <14c>   DW_AT_location    : 2 byte block: 91 60     (DW_OP_fbreg: -32)
 <2><14f>: Abbrev Number: 21 (DW_TAG_formal_parameter)
    <150>   DW_AT_abstract_origin: <0x109>
    <154>   DW_AT_const_value : 1
 <2><155>: Abbrev Number: 21 (DW_TAG_formal_parameter)
    <156>   DW_AT_abstract_origin: <0xfe>
    <15a>   DW_AT_const_value : 0
 <2><15b>: Abbrev Number: 0
 <1><15c>: Abbrev Number: 0

we're producing

varargs.constprop (int q0, int q1)
{
  struct  ap[1];

  <bb 2> [local count: 1073741824]:
  # DEBUG q1 => 1
  # DEBUG q0 => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  __builtin_va_start (&ap, 0);
  ap ={v} {CLOBBER};
  return;

}

and call it as

main ()
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  varargs.constprop (0, 1, 2);
  return 0;

so IPA-CP did some incomplete transform here it seems.  Martin?

Reply via email to