aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2015-09-08 15:02:01 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2015-09-08 15:02:01 +0000
commit761f8e2f8add70caf57b07c37b84059117031451 (patch)
tree6286430f260d20fbdf737221ec0f57b21a82b67b /gcc/cp
parent981d281fedcd06b027314608d6ea6743f314d81f (diff)
downloadgcc-761f8e2f8add70caf57b07c37b84059117031451.zip
gcc-761f8e2f8add70caf57b07c37b84059117031451.tar.gz
gcc-761f8e2f8add70caf57b07c37b84059117031451.tar.bz2
re PR c++/67369 (ICE (in tsubst_decl, at cp/pt.c:11302) with -std=c++14)
/cp 2015-09-08 Paolo Carlini <paolo.carlini@oracle.com> PR c++/67369 * pt.c (tsubst_copy, [case FUNCTION_DECL]): Do not call tsubst if the first argument isn't a template. /testsuite 2015-09-08 Paolo Carlini <paolo.carlini@oracle.com> PR c++/67369 * g++.dg/cpp1y/lambda-generic-ice4.C: New. From-SVN: r227530
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/pt.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f818507..6115fd1 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2015-09-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/67369
+ * pt.c (tsubst_copy, [case FUNCTION_DECL]): Do not call tsubst
+ if the first argument isn't a template.
+
2015-09-03 Martin Sebor <msebor@redhat.com>
PR c/66516
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index ec32c5a..2544751 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -13599,8 +13599,9 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
if (r)
{
/* Make sure that the one we found is the one we want. */
- tree ctx = tsubst (DECL_CONTEXT (t), args,
- complain, in_decl);
+ tree ctx = DECL_CONTEXT (t);
+ if (DECL_LANG_SPECIFIC (ctx) && DECL_TEMPLATE_INFO (ctx))
+ ctx = tsubst (ctx, args, complain, in_decl);
if (ctx != DECL_CONTEXT (r))
r = NULL_TREE;
}