summaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-13 06:41:07 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-13 06:41:07 +0000
commit4ee9c6840ad3fc92a9034343278a1e476ad6872a (patch)
treea2568888a519c077427b133de9ece5879a8484a5 /gcc/stor-layout.c
parentebb338380ab170c91e64d38038e6b5ce930d69a1 (diff)
downloadgcc-4ee9c6840ad3fc92a9034343278a1e476ad6872a.tar.gz
Merge tree-ssa-20020619-branch into mainline.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81764 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 33d0a86e90d..13f95a44ff5 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -67,8 +67,6 @@ static int excess_unit_span (HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT,
HOST_WIDE_INT, tree);
#endif
static void force_type_save_exprs_1 (tree);
-static unsigned int update_alignment_for_field (record_layout_info, tree,
- unsigned int);
extern void debug_rli (record_layout_info);
/* SAVE_EXPRs for sizes of types and decls, waiting to be expanded. */
@@ -161,6 +159,11 @@ variable_size (tree size)
if (TREE_CODE (save) == SAVE_EXPR)
SAVE_EXPR_PERSISTENT_P (save) = 1;
+ if (!immediate_size_expand && cfun && cfun->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. Trust it. */
+ return size;
+
if (lang_hooks.decls.global_bindings_p ())
{
if (TREE_CONSTANT (size))
@@ -173,10 +176,6 @@ variable_size (tree size)
if (immediate_size_expand)
expand_expr (save, const0_rtx, VOIDmode, 0);
- else if (cfun != 0 && cfun->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
put_pending_size (save);
@@ -722,7 +721,7 @@ rli_size_so_far (record_layout_info rli)
variable alignment fields in RLI, and return the alignment to give
the FIELD. */
-static unsigned int
+unsigned int
update_alignment_for_field (record_layout_info rli, tree field,
unsigned int known_align)
{
@@ -1559,6 +1558,9 @@ layout_type (tree type)
if (type == 0)
abort ();
+ if (type == error_mark_node)
+ return;
+
/* Do nothing if type has been laid out before. */
if (TYPE_SIZE (type))
return;