aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr81297.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr81297.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr81297.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr81297.c b/gcc/testsuite/gcc.dg/torture/pr81297.c
new file mode 100644
index 00000000000..be346c4c0d1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr81297.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+int
+nf (int gy, int x0)
+{
+ while (gy < 1)
+ ++x0;
+
+ gy += !!gy;
+ if (gy < 0)
+ {
+ x0 += gy;
+ return (x0 > (gy + x0)) ? (1 / 0) : 1; /* { dg-warning "division by zero" } */
+ }
+}
+