summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-25 12:30:07 +0000
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-25 12:30:07 +0000
commit62433d51b557afd16e16f5db9e8fb3e5d86ba694 (patch)
tree53c658f06750cdef237c8cdb0035bc208fccf85b /gcc/testsuite
parent50540fea265e7347f25e20bda369b96e00869d17 (diff)
downloadgcc-62433d51b557afd16e16f5db9e8fb3e5d86ba694.tar.gz
2010-11-25 Kai Tietz <kai.tietz@onevision.com>
* cgraphunit.c (process_function_and_variable_attributes): Mark dllexport-ed function/variables as needed. * ipa.c (cgraph_externally_visible_p): Make dllexport-ed as externally visible. 2010-11-25 Kai Tietz <kai.tietz@onevision.com> * gcc.dg/dll-8.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167144 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rwxr-xr-xgcc/testsuite/gcc.dg/dll-8.c14
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index bc51b578620..4dc1eeee11f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2010-11-25 Kai Tietz <kai.tietz@onevision.com>
+
+ * gcc.dg/dll-8.c: New.
+
2010-11-25 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/loop_optimization7.adb: Remove dg-require-effective-target.
diff --git a/gcc/testsuite/gcc.dg/dll-8.c b/gcc/testsuite/gcc.dg/dll-8.c
new file mode 100755
index 00000000000..98afba8d0d2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/dll-8.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target i?86-pc-cygwin } } */
+/* { dg-do compile { target i?86-*-mingw* x86_64-*-mingw*} } */
+/* { dg-options "-O3 -fwhole-program" } */
+/* { dg-final { scan-assembler "foo1" } } */
+/* { dg-final { scan-assembler-not "foo2" } } */
+/* { dg-final { scan-assembler "doo1" } } */
+/* { dg-final { scan-assembler-not "doo2" } } */
+
+__declspec(dllexport) int doo1 = 2;
+int doo2 = 3;
+__declspec(dllexport) int foo1 (void) { return 0; }
+int foo2 (void) { return 1; }
+int main() { return 0; }
+