aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-12-18 20:42:14 -0800
committerRichard Henderson <rth@gcc.gnu.org>2004-12-18 20:42:14 -0800
commit4744afba0fa727eb34cc673ce51f17648a5731e3 (patch)
treef75b535fe61fe21974e49ac55426cc11e7fe84be /gcc/c-decl.c
parentca6af4f857cf2b93e89e99bad1dd2598c0b74f02 (diff)
downloadgcc-4744afba0fa727eb34cc673ce51f17648a5731e3.zip
gcc-4744afba0fa727eb34cc673ce51f17648a5731e3.tar.gz
gcc-4744afba0fa727eb34cc673ce51f17648a5731e3.tar.bz2
re PR middle-end/16417 (crappy code (gcc.c-torture/compile/20020210-1.c) in arguments causes ICE)
PR middle-end/16417 * c-decl.c (store_parm_decls): Clarify get_pending_sizes insertion comment. * c-objc-common.c (c_cannot_inline_tree_fn): Remove pending sizes checks. * c-tree.h (struct lang_decl): Remove pending_sizes. * function.c: Include tree-gimple.h (assign_parm_setup_reg): Remove callee-copies code. (gimplify_parm_type, gimplify_parameters): New functions. (expand_pending_sizes): Remove. (expand_function_start): Don't call it. * gimplify.c (gimplify_expr): Examine DECL_VALUE_EXPR for PARM_DECL. (gimplify_body): Add do_parms argument. Use gimplify_parameters. (gimplify_function_tree): Setup cfun. Update gimplify_body call. * tree-gimple.h (gimplify_body): Update decl. * tree-inline.c (initialize_inlined_parameters): Update gimplify_body call. * tree.h (gimplify_parameters): Declare. * Makefile.in (function.o): Depend on TREE_GIMPLE_H. From-SVN: r92373
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 26caa2c..e6b4cba 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -6235,8 +6235,11 @@ store_parm_decls (void)
DECL_SAVED_TREE (fndecl) = push_stmt_list ();
/* ??? Insert the contents of the pending sizes list into the function
- to be evaluated. This just changes mis-behavior until assign_parms
- phase ordering problems are resolved. */
+ to be evaluated. The only reason left to have this is
+ void foo(int n, int array[n++])
+ because we throw away the array type in favor of a pointer type, and
+ thus won't naturally see the SAVE_EXPR containing the increment. All
+ other pending sizes would be handled by gimplify_parameters. */
{
tree t;
for (t = nreverse (get_pending_sizes ()); t ; t = TREE_CHAIN (t))