This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA (symtab): PATCH to symtab_node::nonzero_address DECL_COMDAT handling for c++/80485
- From: Jason Merrill <jason at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Tue, 5 Jun 2018 08:56:01 +0200
- Subject: Re: RFA (symtab): PATCH to symtab_node::nonzero_address DECL_COMDAT handling for c++/80485
- References: <CADzB+2nDLRbDS2p6gZGuTS0vygYOpVkJkRRsT1sStcsTcmfG-A@mail.gmail.com> <d950a357-7c52-135c-7cfb-2fea1a566ffb@redhat.com>
On Thu, May 24, 2018 at 11:36 PM, Jeff Law <law@redhat.com> 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 <jason@redhat.com>
>> 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?
Jason