aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.7/gcc
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2012-12-05 14:54:29 -0800
committerBen Cheng <bccheng@google.com>2012-12-05 14:54:29 -0800
commit6014e0c5342ece48f16f5b02f1b0657d2538a036 (patch)
tree86311e5d4314f61acbc6fdf77050aab6c994ae73 /gcc-4.7/gcc
parent978fb74a5c086cc5572dc2e3f37d207acad969d7 (diff)
downloadtoolchain_gcc-6014e0c5342ece48f16f5b02f1b0657d2538a036.tar.gz
toolchain_gcc-6014e0c5342ece48f16f5b02f1b0657d2538a036.tar.bz2
toolchain_gcc-6014e0c5342ece48f16f5b02f1b0657d2538a036.zip
[GCC 4.7] Backport a gimplify fix.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55245 Change-Id: I3de4a11e2de0a144c70d5ce43f7b5bccb68fb671
Diffstat (limited to 'gcc-4.7/gcc')
-rw-r--r--gcc-4.7/gcc/gimplify.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc-4.7/gcc/gimplify.c b/gcc-4.7/gcc/gimplify.c
index a10d17e10..d25f6b54f 100644
--- a/gcc-4.7/gcc/gimplify.c
+++ b/gcc-4.7/gcc/gimplify.c
@@ -2078,6 +2078,15 @@ gimplify_compound_lval (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
if (TREE_OPERAND (t, 3) == NULL_TREE)
{
tree elmt_type = TREE_TYPE (TREE_TYPE (TREE_OPERAND (t, 0)));
+ /* FIXME google - In some edge cases, ELMT_TYPE may
+ not have been laid out. This causes an ICE later
+ (PR 55245). We call layout_type if ELMT_TYPE is not
+ yet complete, but this is not where this bug should
+ be fixed. The FE should have laid out all the types
+ before gimplification. When a proper fix for PR
+ 55245 is available, remove this. */
+ if (!COMPLETE_TYPE_P (elmt_type))
+ layout_type (elmt_type);
tree elmt_size = unshare_expr (array_ref_element_size (t));
tree factor = size_int (TYPE_ALIGN_UNIT (elmt_type));