aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr87117-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr87117-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr87117-2.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr87117-2.c b/gcc/testsuite/gcc.dg/pr87117-2.c
new file mode 100644
index 00000000000..aefa813918b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr87117-2.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fcode-hoisting" } */
+
+void e();
+
+void a(int c, char **d)
+{
+ char b;
+ if (1 < c)
+ b = (char)(__INTPTR_TYPE__)d[0];
+ if (1 < c && b)
+ e();
+ while (1 < c)
+ ;
+}