function.h (struct function): Add x_dont_save_pending_sizes_p.
authorMark Mitchell <mmitchel@gcc.gnu.org>
Sun, 26 Sep 1999 18:13:28 +0000 (18:13 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sun, 26 Sep 1999 18:13:28 +0000 (18:13 +0000)
* 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
gcc/stor-layout.c

index 80053d2..24055e3 100644 (file)
@@ -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.  */
index dc42926..1986074 100644 (file)
@@ -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);