aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2018-05-10 14:40:55 -0400
committerJason Merrill <jason@gcc.gnu.org>2018-05-10 14:40:55 -0400
commit5d7b4c6fe9b1d69417c0c2e8f618603d2d93b2d3 (patch)
tree440202afd9ddb6359559ec2b10e74c8d13a0be22 /gcc/cp
parent1e6da0c98398b96378eb22db915b0df2d5a3aa4a (diff)
downloadgcc-5d7b4c6fe9b1d69417c0c2e8f618603d2d93b2d3.zip
gcc-5d7b4c6fe9b1d69417c0c2e8f618603d2d93b2d3.tar.gz
gcc-5d7b4c6fe9b1d69417c0c2e8f618603d2d93b2d3.tar.bz2
Make sure we aren't trying to do a nested instantiation in template context.
* pt.c (instantiate_decl): Make sure we aren't trying to do a nested instantiation in template context. From-SVN: r260124
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/pt.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d175277..02d35cb 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2018-05-09 Jason Merrill <jason@redhat.com>
+ * pt.c (instantiate_decl): Make sure we aren't trying to do a nested
+ instantiation in template context.
+
* class.c (vbase_has_user_provided_move_assign): Use
user_provided_p.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index e8346d3..790d6ea 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -23886,6 +23886,7 @@ instantiate_decl (tree d, bool defer_ok, bool expl_inst_class_mem_p)
push_to_top_level ();
else
{
+ gcc_assert (!processing_template_decl);
push_function_context ();
cp_unevaluated_operand = 0;
c_inhibit_evaluation_warnings = 0;