[Bug rtl-optimization/66838] Calling multiple SYSV AMD64 ABI functions from MS x64 ABI one results in clobbered parameters

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Jul 12 15:21:00 GMT 2015


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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-07-12
                 CC|                            |law at gcc dot gnu.org,
                   |                            |ubizjak at gmail dot com
          Component|c                           |rtl-optimization
   Target Milestone|---                         |5.2
     Ever confirmed|0                           |1

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
Confirmed, this one is in postreload pass. The testcase from Comment #0, when
compiled with -O2 creates following dumps:

Register allocator creates correct sequence, _.reload dump shows for
ms_abi_func:

    2: NOTE_INSN_FUNCTION_BEG
    5: si:DI=`global'
    6: di:DI=`*.LC2'
    7: call [`sysv_abi_func'] argc:0
      REG_EH_REGION 0
    8: si:DI=`global'
    9: di:DI=`*.LC3'
   10: call [`sysv_abi_func'] argc:0
      REG_EH_REGION 0
   11: si:DI=`global'
   12: di:DI=`*.LC4'
   13: call [`sysv_abi_func'] argc:0
      REG_EH_REGION 0
   16: NOTE_INSN_DELETED

and _.postreload shows:

    2: NOTE_INSN_FUNCTION_BEG
    5: si:DI=`global'
    6: di:DI=`*.LC2'
    7: call [`sysv_abi_func'] argc:0
      REG_EH_REGION 0
    8: si:DI=si:DI
    9: di:DI=`*.LC3'
   10: call [`sysv_abi_func'] argc:0
      REG_EH_REGION 0
   11: si:DI=si:DI
   12: di:DI=`*.LC4'
   13: call [`sysv_abi_func'] argc:0
      REG_EH_REGION 0
   16: NOTE_INSN_DELETED

Please note invalid SI register propagation through function call to (insn 8)
and (insn 11).

Confirmed as rtl-optimization problem, CC added.


More information about the Gcc-bugs mailing list