aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 1406d64..215a5fb 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -3938,7 +3938,9 @@ pushdecl (x)
if (oldlocal)
{
tree d = oldlocal;
- while (oldlocal && DECL_DEAD_FOR_LOCAL (oldlocal))
+ while (oldlocal
+ && TREE_CODE (oldlocal) == VAR_DECL
+ && DECL_DEAD_FOR_LOCAL (oldlocal))
{
oldlocal = DECL_SHADOWED_FOR_VAR (oldlocal);
}