aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-03-27 13:41:31 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1993-03-27 13:41:31 -0500
commit93609dfb147fc3697f7965031342c0204c04fb57 (patch)
treed556b72b7112a0beb28f24885515340e1e728980 /gcc/stor-layout.c
parentf16fe3947b8d145d7b04f82287d57a1428b9668b (diff)
downloadgcc-93609dfb147fc3697f7965031342c0204c04fb57.zip
gcc-93609dfb147fc3697f7965031342c0204c04fb57.tar.gz
gcc-93609dfb147fc3697f7965031342c0204c04fb57.tar.bz2
(variable_size): When evaluating sizes of variable types, do so just
for side-effects (the SAVE_EXPRs). From-SVN: r3895
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 1224348..7db340c7 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -90,8 +90,10 @@ variable_size (size)
}
if (immediate_size_expand)
- /* NULL_RTX is not defined; neither is the rtx type. */
- expand_expr (size, NULL_PTR, VOIDmode, 0);
+ /* NULL_RTX is not defined; neither is the rtx type.
+ Also, we would like to pass const0_rtx here, but don't have it. */
+ expand_expr (size, expand_expr (integer_zero_node, NULL_PTR, VOIDmode, 0),
+ VOIDmode, 0);
else
pending_sizes = tree_cons (NULL_TREE, size, pending_sizes);