aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-28.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-28.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-28.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-28.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-28.c
new file mode 100644
index 00000000000..59702851d9a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-28.c
@@ -0,0 +1,39 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fscalar-evolutions -fdump-tree-scev-details" } */
+
+
+int bar (void);
+
+int foo ()
+{
+ int i;
+ int a = 2;
+
+ while (a)
+ {
+ a *= 3;
+
+ for (i = 0; i < 100; i++)
+ a += 4;
+ }
+}
+
+/* FIXME: We have to transform the evolution function of "a" into an infinite
+ sum, a -> {//2, *, 2//}, and then to add the 400 from the inner sum...
+ But this is quite difficult, and cases like this one do not happen often.
+
+ (Francois Irigoin consider that this case falls into the 0.01 percent
+ rule, and it is no worth to implement a solution for this testcase in a
+ production compiler. )
+*/
+
+/* Do nothing for this testcase.
+ The following evolutions are detected:
+
+ i -> {0, +, 1}_2
+ a -> {{2, *, [-oo, +oo]}_1, +, 4}_2
+
+*/
+
+/* FIXME. */
+