diff options
-rw-r--r-- | gcc/function.h | 9 | ||||
-rw-r--r-- | gcc/stor-layout.c | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/function.h b/gcc/function.h index 80053d2..24055e3 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 dc42926..1986074 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); |