diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-04 23:29:58 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-04 23:29:58 +0000 |
commit | 1497cc76cfade712c1489186c30bd21eb095ee8d (patch) | |
tree | 47fa3e7b4caef2ebb6aed121cfd5527f9d330763 /gcc/tree-data-ref.c | |
parent | 587cc80fe7c26b61fa2484443dbf5b46cc186d55 (diff) | |
download | gcc-1497cc76cfade712c1489186c30bd21eb095ee8d.tar.gz |
PR tree-optimization/33017
* tree-data-ref.c (split_constant_offset) <case SSA_NAME>: Don't
recurse for pure or const function calls.
* gcc.dg/pr33017.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128107 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r-- | gcc/tree-data-ref.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 6ad2e96bea5..720c94d5998 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -574,7 +574,8 @@ split_constant_offset (tree exp, tree *var, tree *off) if (!TREE_SIDE_EFFECTS (def_stmt_rhs) && EXPR_P (def_stmt_rhs) - && !REFERENCE_CLASS_P (def_stmt_rhs)) + && !REFERENCE_CLASS_P (def_stmt_rhs) + && !get_call_expr_in (def_stmt_rhs)) { split_constant_offset (def_stmt_rhs, &var0, &off0); var0 = fold_convert (type, var0); |