diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-01-05 09:42:53 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-01-05 09:42:53 +0100 |
commit | 7604eb4e07613c79a9b81da29baabdac8187f461 (patch) | |
tree | 63593f477af7cbbcba000ab65e0c226c033919f5 /gcc/cfgexpand.c | |
parent | 566f27e42ca00f65d101e6a7b0096554a0cc452d (diff) | |
download | gcc-7604eb4e07613c79a9b81da29baabdac8187f461.zip gcc-7604eb4e07613c79a9b81da29baabdac8187f461.tar.gz gcc-7604eb4e07613c79a9b81da29baabdac8187f461.tar.bz2 |
re PR other/42611 (ICE in tree_low_cst, at tree.c:5014)
PR other/42611
* cfgexpand.c (expand_one_var): Diagnose too large variables.
* gcc.dg/pr42611.c: New test.
From-SVN: r155641
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index b0921bf..7e542da 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -1,5 +1,5 @@ /* A pass for lowering trees to RTL. - Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 + Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -1011,6 +1011,14 @@ expand_one_var (tree var, bool toplevel, bool really_expand) if (really_expand) expand_one_register_var (origvar); } + else if (!host_integerp (DECL_SIZE_UNIT (var), 1)) + { + if (really_expand) + { + error ("size of variable %q+D is too large", var); + expand_one_error_var (var); + } + } else if (defer_stack_allocation (var, toplevel)) add_stack_var (origvar); else |