This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33680] [4.3 Regression] ICE when compilling elbg.c from ffmpeg (vectorizer)
- From: "irar at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Oct 2007 10:42:06 -0000
- Subject: [Bug tree-optimization/33680] [4.3 Regression] ICE when compilling elbg.c from ffmpeg (vectorizer)
- References: <bug-33680-10490@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #16 from irar at il dot ibm dot com 2007-10-15 10:42 -------
This patch fixes the ICE and doesn't cause regressions in the vectorizer
testsuite:
Index: tree-data-ref.c
===================================================================
--- tree-data-ref.c (revision 129292)
+++ tree-data-ref.c (working copy)
@@ -571,11 +571,16 @@ split_constant_offset (tree exp, tree *v
if (TREE_CODE (def_stmt) == GIMPLE_MODIFY_STMT)
{
tree def_stmt_rhs = GIMPLE_STMT_OPERAND (def_stmt, 1);
+ tree arr = NULL_TREE;
+
+ if (TREE_CODE (def_stmt_rhs) == ADDR_EXPR)
+ arr = TREE_OPERAND (def_stmt_rhs, 0);
if (!TREE_SIDE_EFFECTS (def_stmt_rhs)
&& EXPR_P (def_stmt_rhs)
&& !REFERENCE_CLASS_P (def_stmt_rhs)
- && !get_call_expr_in (def_stmt_rhs))
+ && !get_call_expr_in (def_stmt_rhs)
+ && (!arr || TREE_THIS_NOTRAP (arr)))
{
split_constant_offset (def_stmt_rhs, &var0, &off0);
var0 = fold_convert (type, var0);
This way we avoid arrays with unknown size.
Ira
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33680