From: Mark Mitchell Date: Sun, 26 Sep 1999 18:13:28 +0000 (+0000) Subject: function.h (struct function): Add x_dont_save_pending_sizes_p. X-Git-Tag: prereleases/libstdc++-2.92~10354 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d43163b742fbb74f35c006c99c364c52c6803561;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/function.h b/gcc/function.h index 80053d20c307..24055e32b633 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 dc4292639452..1986074c7548 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);