aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2014-01-30 22:47:22 -0500
committerJason Merrill <jason@gcc.gnu.org>2014-01-30 22:47:22 -0500
commitf221dc810d12ca6005ecee515f786eef31f81960 (patch)
treeabea7991ad3abebb58a9902efc8bf9ff97aa298b /gcc
parent56e13ae00611a97d28f5284513c45f829a9810c9 (diff)
downloadgcc-f221dc810d12ca6005ecee515f786eef31f81960.zip
gcc-f221dc810d12ca6005ecee515f786eef31f81960.tar.gz
gcc-f221dc810d12ca6005ecee515f786eef31f81960.tar.bz2
re PR c++/57899 (bind/function with data member: infinite recursion)
PR c++/57899 * cp-tree.h (struct saved_scope): Add x_local_specializations. (local_specializations): New macro. * pt.c (local_specializations): Remove variable. From-SVN: r207332
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/cp-tree.h8
-rw-r--r--gcc/cp/pt.c5
3 files changed, 15 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 625a880..223e1f3 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2014-01-30 Jason Merrill <jason@redhat.com>
+
+ PR c++/57899
+ * cp-tree.h (struct saved_scope): Add x_local_specializations.
+ (local_specializations): New macro.
+ * pt.c (local_specializations): Remove variable.
+
2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
PR c++/58708
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 7f46499..7681b27 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -1049,6 +1049,8 @@ struct GTY(()) saved_scope {
cp_binding_level *class_bindings;
cp_binding_level *bindings;
+ struct pointer_map_t *x_local_specializations;
+
struct saved_scope *prev;
};
@@ -1098,6 +1100,12 @@ struct GTY(()) saved_scope {
#define previous_class_level scope_chain->x_previous_class_level
+/* A map from local variable declarations in the body of the template
+ presently being instantiated to the corresponding instantiated
+ local variables. */
+
+#define local_specializations scope_chain->x_local_specializations
+
/* A list of private types mentioned, for deferred access checking. */
extern GTY(()) struct saved_scope *scope_chain;
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 4a5b6cc..981e2e0 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -78,11 +78,6 @@ static GTY(()) tree saved_access_scope;
to the EXPR_STMT that is its result. */
static tree cur_stmt_expr;
-/* A map from local variable declarations in the body of the template
- presently being instantiated to the corresponding instantiated
- local variables. */
-static struct pointer_map_t *local_specializations;
-
/* True if we've recursed into fn_type_unification too many times. */
static bool excessive_deduction_depth;