aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/Regression/C/gcc-c-torture/execute/pr39233.c
diff options
context:
space:
mode:
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/pr39233.c')
-rw-r--r--SingleSource/Regression/C/gcc-c-torture/execute/pr39233.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/pr39233.c b/SingleSource/Regression/C/gcc-c-torture/execute/pr39233.c
new file mode 100644
index 00000000..29f72239
--- /dev/null
+++ b/SingleSource/Regression/C/gcc-c-torture/execute/pr39233.c
@@ -0,0 +1,18 @@
+extern void abort (void);
+
+__attribute__((noinline)) void
+foo (void *p)
+{
+ long l = (long) p;
+ if (l < 0 || l > 6)
+ abort ();
+}
+
+int
+main ()
+{
+ short i;
+ for (i = 6; i >= 0; i--)
+ foo ((void *) (long) i);
+ return 0;
+}