summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr48975.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr48975.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr48975.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr48975.c b/gcc/testsuite/gcc.dg/pr48975.c
new file mode 100644
index 000000000..58658d871
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr48975.c
@@ -0,0 +1,18 @@
+/* PR tree-optimization/48975 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -ffast-math -fno-tree-slp-vectorize" } */
+
+static int
+foo (int x)
+{
+ return (x > 0) ? 0 : x + 1;
+}
+
+void
+bar (unsigned int x)
+{
+ int l = 1;
+lab:
+ while (x)
+ x = foo (x);
+}