diff options
author | Ben Cheng <bccheng@android.com> | 2013-04-02 19:34:40 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2013-04-02 20:35:22 +0800 |
commit | eceb576ea5b15a7f8f179f131b665afeeba1c6ad (patch) | |
tree | 117843359cb578bfb9e0708aae218a518ffe8285 /gcc-4.8/gcc/gimplify.c | |
parent | f541ff89c2d66197e371ed6f85174bd732afd8db (diff) | |
download | toolchain_gcc-eceb576ea5b15a7f8f179f131b665afeeba1c6ad.tar.gz toolchain_gcc-eceb576ea5b15a7f8f179f131b665afeeba1c6ad.tar.bz2 toolchain_gcc-eceb576ea5b15a7f8f179f131b665afeeba1c6ad.zip |
[4.8] Backport a gimplify fix.
See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55245
6014e0c5342ece48f16f5b02f1b0657d2538a036
Change-Id: I25bfcfdbf0911f18db9b554012258f4d9aa060bd
Diffstat (limited to 'gcc-4.8/gcc/gimplify.c')
-rw-r--r-- | gcc-4.8/gcc/gimplify.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/gimplify.c b/gcc-4.8/gcc/gimplify.c index e7119283f..9416963c4 100644 --- a/gcc-4.8/gcc/gimplify.c +++ b/gcc-4.8/gcc/gimplify.c @@ -2229,6 +2229,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)); |