aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-semantics.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2004-04-12 21:25:55 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2004-04-12 17:25:55 -0400
commit1c9766da11d71cb57f8962a2eb88833c1ca966f5 (patch)
treefc6c6b14412060a9d6d90d3f45c768a4648b7f4b /gcc/c-semantics.c
parent040e098a5de9115501bd76ce0ea7adc9a0eded21 (diff)
downloadgcc-1c9766da11d71cb57f8962a2eb88833c1ca966f5.zip
gcc-1c9766da11d71cb57f8962a2eb88833c1ca966f5.tar.gz
gcc-1c9766da11d71cb57f8962a2eb88833c1ca966f5.tar.bz2
c-decl.c (finish_decl): Make a decl_stmt for a variable-sized TYPE_DECL.
* c-decl.c (finish_decl): Make a decl_stmt for a variable-sized TYPE_DECL. * c-semantics.c (genrtl_decl_stmt): Handle TYPE_DECL. * stmt.c (expand_decl): Remove redundant expansion of TYPE_DOMAIN. * stor-layout.c (variable_size): Don't check for MINUS_EXPR. Use skip_simple_arithmetic to find SAVE_EXPR. (force_type_save_exprs, force_type_save_exprs_1): New functions. * tree-inline.c (remap_type, case POINTER_TYPE, case REFERENCE_TYPE): Properly chain multiple pointers. (copy_tree_r): Copy a TYPE_DECL. * tree.c (variably_modified_type_p): Add some missing tests and make some other minor changes. * tree.h (force_type_save_exprs): New declaration. * gcc.c-torture/execute/20040411-1.c: New test. From-SVN: r80629
Diffstat (limited to 'gcc/c-semantics.c')
-rw-r--r--gcc/c-semantics.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-semantics.c b/gcc/c-semantics.c
index 17a301c..a8693f9 100644
--- a/gcc/c-semantics.c
+++ b/gcc/c-semantics.c
@@ -389,6 +389,8 @@ genrtl_decl_stmt (tree t)
else if (TREE_CODE (decl) == LABEL_DECL
&& C_DECLARED_LABEL_FLAG (decl))
declare_nonlocal_label (decl);
+ else if (TREE_CODE (decl) == TYPE_DECL)
+ force_type_save_exprs (TREE_TYPE (decl));
else if (lang_expand_decl_stmt)
(*lang_expand_decl_stmt) (t);
}