aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.7
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2012-12-05 16:02:39 -0800
committerGerrit Code Review <noreply-gerritcodereview@google.com>2012-12-05 16:02:40 -0800
commitcc078a51b7945149f03938590ea26fbb7264c950 (patch)
tree5c796ab5c4dc85e9e4de6c37f7ca935b4aa89e6f /gcc-4.7
parent4550e2222132ed8ba33c8bde9dcfe10ca7590eb4 (diff)
parent6014e0c5342ece48f16f5b02f1b0657d2538a036 (diff)
downloadtoolchain_gcc-cc078a51b7945149f03938590ea26fbb7264c950.tar.gz
toolchain_gcc-cc078a51b7945149f03938590ea26fbb7264c950.tar.bz2
toolchain_gcc-cc078a51b7945149f03938590ea26fbb7264c950.zip
Merge "[GCC 4.7] Backport a gimplify fix."
Diffstat (limited to 'gcc-4.7')
-rw-r--r--gcc-4.7/ChangeLog.backported4
-rw-r--r--gcc-4.7/gcc/gimplify.c9
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc-4.7/ChangeLog.backported b/gcc-4.7/ChangeLog.backported
new file mode 100644
index 000000000..b9fd26272
--- /dev/null
+++ b/gcc-4.7/ChangeLog.backported
@@ -0,0 +1,4 @@
+http://gcc.gnu.org/viewcvs?view=revision&revision=193825
+2012-11-26 Diego Novillo <dnovillo@google.com>
+
+ * gimplify.c: Work around for PR 55245.
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));