aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr12517.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr12517.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr12517.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr12517.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr12517.c
new file mode 100644
index 000000000..af82db8f4
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr12517.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/12517 */
+
+int f(void);
+void g(int);
+void h(int a, int b, int c)
+{
+ int i = f();
+
+ if (b && (i & 4))
+ g(i & 8 ? 0 : 1);
+ if (a) {
+ do {
+ if (i & 8)
+ g(0);
+ if (i & 4)
+ g(i ? 0 : 1);
+ } while (--c);
+ }
+}