summaryrefslogtreecommitdiff
path: root/gcc/graphite-scop-detection.c
diff options
context:
space:
mode:
authorSebastian Pop <spop@gcc.gnu.org>2009-12-09 15:18:22 +0000
committerSebastian Pop <spop@gcc.gnu.org>2009-12-09 15:18:22 +0000
commitd505015aa52a7113d13a185e2aa4c14e77c9a1fa (patch)
tree3248fff7ff5f8b31595f3224f05124441e5d911a /gcc/graphite-scop-detection.c
parentda8a7529b5d71b27396f19b3677d17ae6457d376 (diff)
downloadgcc-d505015aa52a7113d13a185e2aa4c14e77c9a1fa.tar.gz
re PR tree-optimization/42285 (ICE in Graphite's scan_tree_for_params for 416.gamess)
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. From-SVN: r155108
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: