summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr32139.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr32139.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr32139.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr32139.c b/gcc/testsuite/gcc.c-torture/compile/pr32139.c
new file mode 100644
index 000000000..7b8522f51
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr32139.c
@@ -0,0 +1,11 @@
+/* PR tree-optimization/32139 */
+int foo (void);
+int bar (void) __attribute__ ((const));
+
+int
+test (int x)
+{
+ int a = (x == 10000 ? foo : bar) ();
+ int b = (x == 10000 ? foo : bar) ();
+ return a + b;
+}