RFA (symtab): PATCH to symtab_node::nonzero_address DECL_COMDAT handling for c++/80485

Jason Merrill jason@redhat.com
Sat May 19 13:20:00 GMT 2018


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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 80485.diff
Type: text/x-patch
Size: 1645 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180519/7ca7ec0f/attachment.bin>


More information about the Gcc-patches mailing list