From f59d43a94778d3d160f710ea8b6cf7ac666ab3e6 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Mon, 6 Dec 1993 07:32:35 -0500 Subject: [PATCH] (expand_expr, case PLACEHOLDER_EXPR): Remove top entry from PLACEHOLDER_LIST when expanding the value in it. From-SVN: r6187 --- gcc/expr.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/expr.c b/gcc/expr.c index e5e202176c1..4e2c712bfce 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -3978,6 +3978,7 @@ expand_expr (exp, target, tmode, modifier) if (placeholder_list) { tree object; + tree old_list = placeholder_list; for (object = TREE_PURPOSE (placeholder_list); TREE_TYPE (object) != type @@ -3989,7 +3990,16 @@ expand_expr (exp, target, tmode, modifier) ; if (object && TREE_TYPE (object) == type) - return expand_expr (object, original_target, tmode, modifier); + { + /* Expand this object skipping the list entries before + it was found in case it is also a PLACEHOLDER_EXPR. + In that case, we want to translate it using subsequent + entries. */ + placeholder_list = TREE_CHAIN (placeholder_list); + temp = expand_expr (object, original_target, tmode, modifier); + placeholder_list = old_list; + return temp; + } } /* We can't find the object or there was a missing WITH_RECORD_EXPR. */ -- 2.30.2