On 06/05/2018 12:56 AM, Jason Merrill wrote:
> On Thu, May 24, 2018 at 11:36 PM, Jeff Law <[email protected]> wrote:
>> On 05/19/2018 07:07 AM, Jason Merrill wrote:
>>> A comment earlier in in nonzero_address says, "Important case of WEAK
>>> we want to do well are comdats. Those are handled by later check for
>>> definition." But in this case we aren't handling this comdat function
>>> well, we return false because it is DECL_WEAK and DECL_EXTERNAL
>>> (because we aren't at EOF yet) and so we fail to fold the comparison.
>>>
>>> This patch fixes the testcase by checking DECL_COMDAT directly.
>>>
>>> Tested x86_64-pc-linux-gnu. OK for trunk?
>>>
>>>
>>> 80485.diff
>>>
>>>
>>> commit a1a0c12db660aa94a625771a9f2fa9db30a552fe
>>> Author: Jason Merrill <[email protected]>
>>> Date: Fri May 18 20:20:05 2018 -0400
>>>
>>> PR c++/80485 - inline function non-zero address.
>>>
>>> * symtab.c (nonzero_address): Check DECL_COMDAT.
>> OK
>
> For GCC 8 as well?
Yea.
jeff