aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/gcc.dg/torture/pr58143-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gcc.dg/torture/pr58143-2.c')
-rw-r--r--gcc-4.8/gcc/testsuite/gcc.dg/torture/pr58143-2.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gcc.dg/torture/pr58143-2.c b/gcc-4.8/gcc/testsuite/gcc.dg/torture/pr58143-2.c
new file mode 100644
index 000000000..dd0dae1ef
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/gcc.dg/torture/pr58143-2.c
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+/* { dg-additional-options "-fstrict-overflow" } */
+
+int a, b, d, e, f, *g, h, i;
+volatile int c;
+
+char foo (unsigned char p)
+{
+ return p + 1;
+}
+
+int bar ()
+{
+ for (h = 0; h < 3; h = foo (h))
+ {
+ c;
+ for (f = 0; f < 1; f++)
+ {
+ i = a && 0 < -__INT_MAX__ - h ? 0 : 1;
+ if (e)
+ for (; d;)
+ b = 0;
+ else
+ g = 0;
+ }
+ }
+ return 0;
+}
+
+int main ()
+{
+ bar ();
+ return 0;
+}