diff options
author | Jason Merrill <jason@redhat.com> | 2011-06-23 12:53:03 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-06-23 12:53:03 -0400 |
commit | 767de87d05afc6574bf1c5812391b2d865ee817f (patch) | |
tree | 6807a2bb0c080077e03d095791735bcd63f1d90e /gcc/cp/decl2.c | |
parent | d72ce0c110efa0597e1620f8dd946a14191b9b83 (diff) | |
download | gcc-767de87d05afc6574bf1c5812391b2d865ee817f.zip gcc-767de87d05afc6574bf1c5812391b2d865ee817f.tar.gz gcc-767de87d05afc6574bf1c5812391b2d865ee817f.tar.bz2 |
re PR c++/49507 (ICE because of defaulted template destructor)
PR c++/49507
* decl2.c (mark_used): Don't call synthesize_method for
functions defaulted outside the class.
From-SVN: r175342
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index d2f075d..9e5a229 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 |