summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr77479.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr77479.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr77479.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr77479.c b/gcc/testsuite/gcc.dg/torture/pr77479.c
new file mode 100644
index 00000000000..354ae5986ce
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr77479.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-fstrict-overflow -ftree-vrp" } */
+
+void
+vr (int of, unsigned char bw)
+{
+ int d1;
+ int lm = 0;
+
+ for (d1 = 0; d1 < 3; ++d1)
+ {
+ const int vl = 2;
+
+ while (bw < vl)
+ {
+ }
+ if (bw != vl)
+ lm -= vl;
+ }
+ while (++of < 1)
+ {
+ lm /= bw;
+ of += lm;
+ }
+}