From 99098c669ede8d46e430a5f387d18ea3c097fb4f Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sun, 3 Oct 1993 21:46:46 -0400 Subject: [PATCH] (expr_size): If the size contains a PLACEHOLDER_EXPR, surround it with a WITH_RECORD_EXPR. From-SVN: r5582 --- gcc/explow.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/explow.c b/gcc/explow.c index f8d47517015..86726c9dc90 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -242,8 +242,13 @@ rtx expr_size (exp) tree exp; { - return expand_expr (size_in_bytes (TREE_TYPE (exp)), - NULL_RTX, TYPE_MODE (sizetype), 0); + tree size = size_in_bytes (TREE_TYPE (exp)); + + if (TREE_CODE (size) != INTEGER_CST + && contains_placeholder_p (size)) + size = build (WITH_RECORD_EXPR, sizetype, size, exp); + + return expand_expr (size, NULL_RTX, TYPE_MODE (sizetype), 0); } /* Return a copy of X in which all memory references -- 2.30.2