From d43163b742fbb74f35c006c99c364c52c6803561 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Sun, 26 Sep 1999 18:13:28 +0000 Subject: [PATCH] function.h (struct function): Add x_dont_save_pending_sizes_p. * function.h (struct function): Add x_dont_save_pending_sizes_p. * stor-layout.c (variable_size): Don't add sizes to the pending sizes list if x_dont_save_pending_sizes_p is set. From-SVN: r29668 --- gcc/function.h | 9 +++++++++ gcc/stor-layout.c | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/gcc/function.h b/gcc/function.h index 80053d20c30..24055e32b63 100644 --- a/gcc/function.h +++ b/gcc/function.h @@ -299,6 +299,15 @@ struct function commences. */ int x_whole_function_mode_p; + /* Nonzero if the back-end should not keep track of expressions that + determine the size of variable-sized objects. Normally, such + expressions are saved away, and then expanded when the next + function is started. For example, if a parameter has a + variable-sized type, then the size of the parameter is computed + when the function body is entered. However, some front-ends do + not desire this behavior. */ + int x_dont_save_pending_sizes_p; + /* List (chain of TREE_LIST) of LABEL_DECLs for all nonlocal labels (labels to which there can be nonlocal gotos from nested functions) in this function. */ diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index dc429263945..1986074c754 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -112,6 +112,10 @@ variable_size (size) 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 if (current_function && current_function->x_dont_save_pending_sizes_p) + /* The front-end doesn't want us to keep a list of the expressions + that determine sizes for variable size objects. */ + ; else pending_sizes = tree_cons (NULL_TREE, size, pending_sizes); -- 2.30.2