aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/dll.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/dll.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/dll.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/dll.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/dll.c
new file mode 100644
index 000000000..7f7bfcee5
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/dll.c
@@ -0,0 +1,23 @@
+/* { dg-require-dll "" } */
+
+__declspec (dllimport) int foo;
+extern int (* import) (void) __attribute__((dllimport));
+int func2 (void) __attribute__((dllexport));
+
+__declspec(dllexport) int
+func1 (int a)
+{
+ return a + foo;
+}
+
+static int
+internal (void)
+{
+ return 77;
+}
+
+int
+func2 (void)
+{
+ return import ();
+}