This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Committed] Fix C++/31165


Hi,
  The problem here is that after PR 30108, we would create two decls 
representing the same global variable which is incorrect as it causes 
section anchors to define the decl twice.
The issue is that we call copy_node when we only want to unshare the 
expression.

Committed to both the trunk and 4.2 branches as obvious and preapproved by 
Mark in PR 30108 after a bootstrap and test on powerpc64-linux-gnu with no 
regressions.

Thanks,
Andrew Pinski

cp/ChangeLog:

        * call.c  (convert_default_arg): Instead of copying the node, 
unshare it.


testsuite/ChangeLog:

        * g++.dg/other/default7.C: New test.

Attachment: fixpr31165.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]