gcc/cp/ChangeLog:
* name-lookup.c (begin_scope): After reusing a cp_binding_level
structure, update free_binding_level before the structure's
level_chain field gets cleared, not after.
From-SVN: r232965
+2016-01-29 Patrick Palka <ppalka@gcc.gnu.org>
+
+ * name-lookup.c (begin_scope): After reusing a cp_binding_level
+ structure, update free_binding_level before the structure's
+ level_chain field gets cleared, not after.
+
2016-01-28 Jason Merrill <jason@redhat.com>
PR c++/67407
if (!ENABLE_SCOPE_CHECKING && free_binding_level)
{
scope = free_binding_level;
- memset (scope, 0, sizeof (cp_binding_level));
free_binding_level = scope->level_chain;
+ memset (scope, 0, sizeof (cp_binding_level));
}
else
scope = ggc_cleared_alloc<cp_binding_level> ();