summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/pr22630.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/pr22630.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr22630.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr22630.c b/gcc/testsuite/gcc.c-torture/execute/pr22630.c
new file mode 100644
index 00000000000..d3a564999ba
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr22630.c
@@ -0,0 +1,23 @@
+void abort (void);
+
+int j;
+
+void bla (int *r)
+{
+ int *p, *q;
+
+ p = q = r;
+ if (!p)
+ p = &j;
+
+ if (p != q)
+ j = 1;
+}
+
+int main (void)
+{
+ bla (0);
+ if (!j)
+ abort ();
+ return 0;
+}