aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2008-09-09 17:41:58 -0400
committerJason Merrill <jason@gcc.gnu.org>2008-09-09 17:41:58 -0400
commit18802917af53a9423fe496aa68cf6c2aa67f8ca9 (patch)
treec9d38611b6899084054743883bcdac7c4b2b8b22 /gcc/cp
parent07ebe945c734b0c9c4bee05ca6186c7e052e3a4e (diff)
downloadgcc-18802917af53a9423fe496aa68cf6c2aa67f8ca9.zip
gcc-18802917af53a9423fe496aa68cf6c2aa67f8ca9.tar.gz
gcc-18802917af53a9423fe496aa68cf6c2aa67f8ca9.tar.bz2
re PR c++/37439 (ICE using auto return-type in template function)
PR c++/37439 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has DECL_CONTEXT set. From-SVN: r140176
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/pt.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index be42b37..9760ccf 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/37439
+ * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
+ DECL_CONTEXT set.
+
2008-09-09 Jakub Jelinek <jakub@redhat.com>
PR c++/37389
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 4aa7b1a..cdaae59 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -9809,7 +9809,7 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
Replace it with an arbitrary expression with the same type
(*(T*)0). This should only occur in an unevaluated context
(i.e. decltype). */
- gcc_assert (skip_evaluation && DECL_CONTEXT (t) == NULL_TREE);
+ gcc_assert (skip_evaluation);
r = non_reference (TREE_TYPE (t));
r = tsubst (r, args, complain, in_decl);
r = build_pointer_type (r);