summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/20080721-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/20080721-1.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20080721-1.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20080721-1.c b/gcc/testsuite/gcc.c-torture/compile/20080721-1.c
new file mode 100644
index 00000000000..35ef352bc6d
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20080721-1.c
@@ -0,0 +1,15 @@
+void foo(void);
+void bar(void);
+
+int test(int b)
+{
+ void *p, **q;
+ if (b)
+ p = (void *)foo;
+ else
+ p = (void *)bar;
+ q = (void **)p;
+ if (*q == (void *)0)
+ return 1;
+ return 0;
+}