summaryrefslogtreecommitdiff
path: root/gcc/graphite-scop-detection.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-09 15:18:22 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-09 15:18:22 +0000
commit7464e753ab5778528150ff18970d8ad1a45fdbe5 (patch)
tree3248fff7ff5f8b31595f3224f05124441e5d911a /gcc/graphite-scop-detection.c
parentd680f7a31f8b7b9633e6894ab667f540e127da33 (diff)
downloadgcc-7464e753ab5778528150ff18970d8ad1a45fdbe5.tar.gz
Fix PR42285.
2009-12-08 Sebastian Pop <sebpop@gmail.com> PR middle-end/42285 * graphite-scop-detection.c (graphite_can_represent_init): Also handle more complex MULT_EXPRs containing parameters by recursion on the structure. * testsuite/gfortran.dg/graphite/pr42285.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155108 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-scop-detection.c')
-rw-r--r--gcc/graphite-scop-detection.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index 02c653b69a6..a24420e9dad 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -168,9 +168,11 @@ graphite_can_represent_init (tree e)
case MULT_EXPR:
if (chrec_contains_symbols (TREE_OPERAND (e, 0)))
- return host_integerp (TREE_OPERAND (e, 1), 0);
+ return graphite_can_represent_init (TREE_OPERAND (e, 0))
+ && host_integerp (TREE_OPERAND (e, 1), 0);
else
- return host_integerp (TREE_OPERAND (e, 0), 0);
+ return graphite_can_represent_init (TREE_OPERAND (e, 1))
+ && host_integerp (TREE_OPERAND (e, 0), 0);
case PLUS_EXPR:
case POINTER_PLUS_EXPR: