summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr41006-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr41006-2.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr41006-2.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41006-2.c b/gcc/testsuite/gcc.c-torture/compile/pr41006-2.c
new file mode 100644
index 000000000..766778d41
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr41006-2.c
@@ -0,0 +1,15 @@
+typedef int *FARPROC;
+static int * __restrict__ acceptex_fn;
+
+int xWSAIoctl(void*);
+static void get_fn(FARPROC* fn)
+{
+ FARPROC func;
+ if (!xWSAIoctl( &func))
+ *fn = func;
+}
+
+void get_fn_pointers()
+{
+ get_fn((FARPROC*)&acceptex_fn);
+}