aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-07-02 04:11:30 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-07-02 04:11:30 +0000
commitddb45080b4c1eab4c83dccafbc5a50ce70270a4d (patch)
tree6b8aac90ee843d059112574c08ea9bc44f3a08ae /gcc/cp
parentf9f4d1e10a89929da39e0e860e783f2c0f4910ca (diff)
downloadgcc-ddb45080b4c1eab4c83dccafbc5a50ce70270a4d.zip
gcc-ddb45080b4c1eab4c83dccafbc5a50ce70270a4d.tar.gz
gcc-ddb45080b4c1eab4c83dccafbc5a50ce70270a4d.tar.bz2
re PR c++/6949 (ICE in tsubst_decl, at cp/pt.c:5733)
PR c++/6949 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local classes. PR c++/6949 * g++.dg/template/local3.C: New test. From-SVN: r68818
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl2.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a76a82b..c0480b9 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2003-07-01 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/6949
+ * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
+ classes.
+
2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* error.c (locate_error): %P takes an `int', not a `tree'.
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index a440c06..c621793 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -970,7 +970,7 @@ grokfield (tree declarator, tree declspecs, tree init, tree asmspec_tree,
}
}
- if (processing_template_decl && ! current_function_decl
+ if (processing_template_decl
&& (TREE_CODE (value) == VAR_DECL || TREE_CODE (value) == FUNCTION_DECL))
value = push_template_decl (value);