From: rguenth Date: Fri, 9 Sep 2011 09:06:49 +0000 (+0000) Subject: 2011-09-09 Richard Guenther X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=32246fd413dba3cbeb133f3c95d29b321a073174 2011-09-09 Richard Guenther PR middle-end/50333 * tree-data-ref.c (split_constant_offset): Do not try to handle ternary ops. * gcc.dg/torture/pr50333.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178720 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dbda61cef07..d04c2e94ea3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-09-09 Richard Guenther + + PR middle-end/50333 + * tree-data-ref.c (split_constant_offset): Do not try to handle + ternary ops. + 2011-09-08 Andrew Stubbs PR tree-optimization/50318 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1d77d7b383d..f0a53831ca4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-09-09 Richard Guenther + + PR middle-end/50333 + * gcc.dg/torture/pr50333.c: New testcase. + 2011-09-08 Andrew Stubbs PR tree-optimization/50318 diff --git a/gcc/testsuite/gcc.dg/torture/pr50333.c b/gcc/testsuite/gcc.dg/torture/pr50333.c new file mode 100644 index 00000000000..47577dcccc8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr50333.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ + +static inline void +unext(unsigned int *_ui, unsigned _len, unsigned int _ui0) +{ + unsigned j = 1; + while (++j<_len) + ; + _ui[j-1]=_ui0; +} +unsigned int +ncwrs_urow(unsigned _n, unsigned _k, unsigned int *_u) +{ + unsigned k; + for(k=2; k<_n; k++) + unext(_u+1,_k+1,1); +} diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 388ea8aaeb2..72ecfe9a8c8 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -686,7 +686,8 @@ split_constant_offset (tree exp, tree *var, tree *off) *off = ssize_int (0); STRIP_NOPS (exp); - if (tree_is_chrec (exp)) + if (tree_is_chrec (exp) + || get_gimple_rhs_class (TREE_CODE (exp)) == GIMPLE_TERNARY_RHS) return; otype = TREE_TYPE (exp);