summaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-23 16:53:03 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-23 16:53:03 +0000
commitdd0dcb3e9b6569bdef41740a5c10347b300a1929 (patch)
tree6807a2bb0c080077e03d095791735bcd63f1d90e /gcc/cp/decl2.c
parentc85c2c3f3bb4e66026354b08d5fc29e7330297ad (diff)
downloadgcc-dd0dcb3e9b6569bdef41740a5c10347b300a1929.tar.gz
PR c++/49507
* decl2.c (mark_used): Don't call synthesize_method for functions defaulted outside the class. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175342 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index d2f075dab0a..9e5a2297190 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -4297,6 +4297,9 @@ mark_used (tree decl)
if (TREE_CODE (decl) == FUNCTION_DECL
&& DECL_NONSTATIC_MEMBER_FUNCTION_P (decl)
&& DECL_DEFAULTED_FN (decl)
+ /* A function defaulted outside the class is synthesized either by
+ cp_finish_decl or instantiate_decl. */
+ && !DECL_DEFAULTED_OUTSIDE_CLASS_P (decl)
&& ! DECL_INITIAL (decl))
{
/* Remember the current location for a function we will end up