From: Richard Guenther Date: Thu, 15 May 2008 08:21:32 +0000 (+0000) Subject: re PR tree-optimization/34330 (-ftree-parallelize-loops=4 ICE with the vectorizer... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=45ff5edaea467950434730376d3abd8e6cebe196;p=gcc.git re PR tree-optimization/34330 (-ftree-parallelize-loops=4 ICE with the vectorizer also) 2008-05-15 Richard Guenther PR tree-optimization/34330 * tree-ssa-alias.c (get_smt_for): Only assert that accesses through the pointer will alias the SMT. * gcc.dg/torture/pr34330.c: New testcase. From-SVN: r135329 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c39de0f2dd6..7451ace922f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-05-15 Richard Guenther + + PR tree-optimization/34330 + * tree-ssa-alias.c (get_smt_for): Only assert that accesses + through the pointer will alias the SMT. + 2008-05-14 Andreas Tobler * config/sparc/sparc.h (NO_PROFILE_COUNTERS): Define as 0. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 02ef0b5f8cb..8215e221cd2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-05-15 Richard Guenther + + PR tree-optimization/34330 + * gcc.dg/torture/pr34330.c: New testcase. + 2008-05-14 Francois-Xavier Coudert PR fortran/36059 diff --git a/gcc/testsuite/gcc.dg/torture/pr34330.c b/gcc/testsuite/gcc.dg/torture/pr34330.c new file mode 100644 index 00000000000..85cfe37e8ad --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr34330.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-ftree-parallelize-loops=4 -ftree-vectorize" } */ + +struct T +{ + int t; + struct { short s1, s2, s3, s4; } *s; +}; + +void +foo (int *a, int *b, int *c, int *d, struct T *e) +{ + int i; + for (i = 0; i < e->t; i++) + { + e->s[i].s1 = a[i]; + e->s[i].s2 = b[i]; + e->s[i].s3 = c[i]; + e->s[i].s4 = d[i]; + } +} diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index ddd79375289..a054329e8d4 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -3025,8 +3025,11 @@ get_smt_for (tree ptr, struct alias_info *ai) TREE_THIS_VOLATILE (tag) |= TREE_THIS_VOLATILE (tag_type); /* Make sure that the symbol tag has the same alias set as the - pointed-to type. */ - gcc_assert (tag_set == get_alias_set (tag)); + pointed-to type or at least accesses through the pointer will + alias that set. The latter can happen after the vectorizer + created pointers of vector type. */ + gcc_assert (tag_set == get_alias_set (tag) + || alias_set_subset_of (tag_set, get_alias_set (tag))); return tag; }