diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-17.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-17.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-17.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-17.c new file mode 100644 index 00000000000..1e7ac50e013 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-17.c @@ -0,0 +1,36 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int bar (void); + +void foo () +{ + int a = -100; + int b = 2; + + while (b) + { + if (bar ()) + a += 3; + else + a = 2; + + /* Exercises the case when one of the branches of the if-phi-node is a constant. + FIXME: + - What is the chrec representation of such an evolution? + - Does this kind of code exist in real codes? */ + b += a; + } +} + +/* For the moment the analyzer is expected to output a "don't know" answer, + both for the initial condition and for the evolution part. This is done + in the merge condition branches information. + + a -> [-oo, +oo] + b -> {2, +, a_1}_1 +*/ + +/* FIXME. */ |