mirror of git://gcc.gnu.org/git/gcc.git
dllexport-MI1.C: Adjust test.
2011-01-07 Kai Tietz <kai.tietz@onevision.com>
* g++.dg/ext/dllexport-MI1.C: Adjust test.
* g++.dg/ext/dllimport-MI1.C: Likewise.
* g++.dg/ext/dllimport1.C: Add test for x86_64-*-mingw*.
* g++.dg/ext/dllimport10.C: Likewise.
* g++.dg/ext/dllimport11.C: Likewise.
* g++.dg/ext/dllimport12.C: Likewise.
* g++.dg/ext/dllimport13.C: Likewise.
* g++.dg/ext/dllimport2.C: Likewise.
* g++.dg/ext/dllimport3.C: Likewise.
* g++.dg/ext/dllimport4.C: Likewise.
* g++.dg/ext/dllimport5.C: Likewise.
* g++.dg/ext/dllimport6.C: Likewise.
* g++.dg/ext/dllimport8.C: Likewise.
* g++.dg/ext/dllimport9.C: Likewise.
* g++.dg/ext/selectany2.C: Enable test for x86_64-*-mingw*
targets, too. Additionally enable test for i?86-*-mingw*.
* g++.dg/ext/selectany1.C: Likewise.
Remove guard variable check.
From-SVN: r168572
This commit is contained in:
parent
14d11d4097
commit
a76d8c3c76
|
|
@ -1,3 +1,24 @@
|
||||||
|
2011-01-07 Kai Tietz <kai.tietz@onevision.com>
|
||||||
|
|
||||||
|
* g++.dg/ext/dllexport-MI1.C: Adjust test.
|
||||||
|
* g++.dg/ext/dllimport-MI1.C: Likewise.
|
||||||
|
* g++.dg/ext/dllimport1.C: Add test for x86_64-*-mingw*.
|
||||||
|
* g++.dg/ext/dllimport10.C: Likewise.
|
||||||
|
* g++.dg/ext/dllimport11.C: Likewise.
|
||||||
|
* g++.dg/ext/dllimport12.C: Likewise.
|
||||||
|
* g++.dg/ext/dllimport13.C: Likewise.
|
||||||
|
* g++.dg/ext/dllimport2.C: Likewise.
|
||||||
|
* g++.dg/ext/dllimport3.C: Likewise.
|
||||||
|
* g++.dg/ext/dllimport4.C: Likewise.
|
||||||
|
* g++.dg/ext/dllimport5.C: Likewise.
|
||||||
|
* g++.dg/ext/dllimport6.C: Likewise.
|
||||||
|
* g++.dg/ext/dllimport8.C: Likewise.
|
||||||
|
* g++.dg/ext/dllimport9.C: Likewise.
|
||||||
|
* g++.dg/ext/selectany2.C: Enable test for x86_64-*-mingw*
|
||||||
|
targets, too. Additionally enable test for i?86-*-mingw*.
|
||||||
|
* g++.dg/ext/selectany1.C: Likewise.
|
||||||
|
Remove guard variable check.
|
||||||
|
|
||||||
2011-01-07 Janus Weil <janus@gcc.gnu.org>
|
2011-01-07 Janus Weil <janus@gcc.gnu.org>
|
||||||
|
|
||||||
PR fortran/47189
|
PR fortran/47189
|
||||||
|
|
|
||||||
|
|
@ -33,12 +33,12 @@ DLL_IMPEXP MI1 dllMI1Copy = dllMI1;
|
||||||
|
|
||||||
// and MI thunks,
|
// and MI thunks,
|
||||||
|
|
||||||
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZThn4_NK3MI12vfEv" } }
|
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZThn._NK3MI12vfEv" } }
|
||||||
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZTv0_n12_NK2D12vfEv" } }
|
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZTv0_n.._NK2D12vfEv" } }
|
||||||
|
|
||||||
// and a vtable data variable.
|
// and a vtable data variable.
|
||||||
|
|
||||||
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZTV2D1\[\\\"\]*,data" } }
|
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZTV2D1\[\\\\\"\]*,data" } }
|
||||||
|
|
||||||
// an explicit copy ctor
|
// an explicit copy ctor
|
||||||
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZN2D2C2ERKS_" } }
|
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZN2D2C2ERKS_" } }
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
|
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
|
||||||
// Test handling of MI thunks in dllimported classes.
|
// Test handling of MI thunks in dllimported classes.
|
||||||
|
|
||||||
// To build the dll and client app:
|
// To build the dll and client app:
|
||||||
|
|
@ -49,5 +49,5 @@ int main ()
|
||||||
|
|
||||||
// Scan for import of explicit copy ctor for D2, but no import
|
// Scan for import of explicit copy ctor for D2, but no import
|
||||||
// of compiler generated copy ctor for D1.
|
// of compiler generated copy ctor for D1.
|
||||||
// { dg-final { scan-assembler "__imp___ZN2D2C2ERKS_" } }
|
// { dg-final { scan-assembler "__imp\[_\]*__ZN2D2C2ERKS_" } }
|
||||||
// { dg-final { scan-assembler-not "__imp___ZN2D1C2ERKS_" } }
|
// { dg-final { scan-assembler-not "__imp\[_\]*__ZN2D1C2ERKS_" } }
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// PR c++/7910
|
// PR c++/7910
|
||||||
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
|
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
|
||||||
// { dg-options { -Wall -W } }
|
// { dg-options { -Wall -W } }
|
||||||
|
|
||||||
class __attribute__((dllimport)) Foo
|
class __attribute__((dllimport)) Foo
|
||||||
|
|
@ -28,4 +28,4 @@ Bar::~Bar()
|
||||||
void Bar::dummy_bar_func()
|
void Bar::dummy_bar_func()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
// { dg-final { scan-assembler-not "__imp___ZN3Foo14dummy_foo_fun" } }
|
// { dg-final { scan-assembler-not "__imp\[_\]*__ZN3Foo14dummy_foo_fun" } }
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// PR c++/5287, c++/11021
|
// PR c++/5287, c++/11021
|
||||||
// Inherit a virtual method from a dllimport'd base class.
|
// Inherit a virtual method from a dllimport'd base class.
|
||||||
|
|
||||||
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
|
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
|
||||||
|
|
||||||
struct __attribute__((dllimport)) A
|
struct __attribute__((dllimport)) A
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// PR target/23589
|
// PR target/23589
|
||||||
// Template member functions do not get dllimport status of class.
|
// Template member functions do not get dllimport status of class.
|
||||||
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
|
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
|
||||||
|
|
||||||
struct __attribute__((dllimport)) Foo
|
struct __attribute__((dllimport)) Foo
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// PR target/27650
|
// PR target/27650
|
||||||
// Don't use dllimport semantics on virtual methods when initializing
|
// Don't use dllimport semantics on virtual methods when initializing
|
||||||
// vtables
|
// vtables
|
||||||
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
|
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
|
||||||
|
|
||||||
// Use import lib thunk for vtable entry of explicitly virtual method,
|
// Use import lib thunk for vtable entry of explicitly virtual method,
|
||||||
struct base
|
struct base
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// PR c++/34749
|
// PR c++/34749
|
||||||
// Ensure dllimport is handled correctly for friends
|
// Ensure dllimport is handled correctly for friends
|
||||||
|
|
||||||
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
|
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
|
||||||
|
|
||||||
int __declspec (dllimport) bar();
|
int __declspec (dllimport) bar();
|
||||||
int __declspec (dllimport) baz();
|
int __declspec (dllimport) baz();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
|
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
|
||||||
// PR c++/9738 Dllimport attribute is overriden by later definition/redeclaration
|
// PR c++/9738 Dllimport attribute is overriden by later definition/redeclaration
|
||||||
|
|
||||||
void __attribute__((dllimport)) Bar(void);
|
void __attribute__((dllimport)) Bar(void);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
|
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
|
||||||
|
|
||||||
// PR 10148 Dllimport attribute of object is overriden by later
|
// PR 10148 Dllimport attribute of object is overriden by later
|
||||||
// redefinition without attribute.
|
// redefinition without attribute.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// Report error if dllimport attribute in definition itself.
|
// Report error if dllimport attribute in definition itself.
|
||||||
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
|
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
|
||||||
|
|
||||||
__attribute__((dllimport)) void bar () { } // { dg-error "definition" }
|
__attribute__((dllimport)) void bar () { } // { dg-error "definition" }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
|
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
|
||||||
// Report error if static symbol definition has dllimport attribute.
|
// Report error if static symbol definition has dllimport attribute.
|
||||||
|
|
||||||
__attribute__((dllimport))
|
__attribute__((dllimport))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
|
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
|
||||||
// Mark class static members as dllimport.
|
// Mark class static members as dllimport.
|
||||||
|
|
||||||
struct Baz
|
struct Baz
|
||||||
|
|
@ -25,6 +25,6 @@ int foo()
|
||||||
return (a + b + c + *baz);
|
return (a + b + c + *baz);
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-final { scan-assembler __imp___ZN3Bar3twoE } }
|
// { dg-final { scan-assembler __imp\[_\]*__ZN3Bar3twoE } }
|
||||||
// { dg-final { scan-assembler __imp___ZN3Bar5threeE } }
|
// { dg-final { scan-assembler __imp\[_\]*__ZN3Bar5threeE } }
|
||||||
// { dg-final { scan-assembler __imp___ZN3Bar8null_bazE } }
|
// { dg-final { scan-assembler __imp\[_\]*__ZN3Bar8null_bazE } }
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// Ignore dllimport of static members if marked inlined.
|
// Ignore dllimport of static members if marked inlined.
|
||||||
// or if definition follows declaration in dllimported class.
|
// or if definition follows declaration in dllimported class.
|
||||||
|
|
||||||
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
|
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
|
||||||
// { dg-options { -Wall -W } }
|
// { dg-options { -Wall -W } }
|
||||||
|
|
||||||
struct __attribute__((dllimport)) Foo
|
struct __attribute__((dllimport)) Foo
|
||||||
|
|
@ -26,4 +26,4 @@ void testfoo()
|
||||||
Foo::static_func2();
|
Foo::static_func2();
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-final { scan-assembler-not "__imp__" } }
|
// { dg-final { scan-assembler-not "__imp_" } }
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// Handle dllimport attribute for functions declared inline.
|
// Handle dllimport attribute for functions declared inline.
|
||||||
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
|
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
|
||||||
// { dg-options { -W } }
|
// { dg-options { -W } }
|
||||||
|
|
||||||
inline __attribute__((dllimport)) void bar() { } // { dg-warning "inline" }
|
inline __attribute__((dllimport)) void bar() { } // { dg-warning "inline" }
|
||||||
|
|
@ -20,4 +20,4 @@ void use_inlines()
|
||||||
aBlah.out_blah ();
|
aBlah.out_blah ();
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-final { scan-assembler-not "__imp__" } }
|
// { dg-final { scan-assembler-not "__imp_" } }
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
// { dg-do compile { target i?86-pc-cygwin } }
|
// { dg-do compile { target i?86-pc-cygwin } }
|
||||||
// { dg-do compile { target i?86-pc-mingw* } }
|
// { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } }
|
||||||
|
|
||||||
// Check that selectany attribute puts symbols into link-once sections.
|
// Check that selectany attribute puts symbols into link-once sections.
|
||||||
|
|
||||||
// { dg-final { scan-assembler "\.section\t\.data\\\$foo\[^\n\]*\n\t\.linkonce discard" } }
|
// { dg-final { scan-assembler "\.section\t\.data\\\$foo\[^\n\]*\n\t\.linkonce discard" } }
|
||||||
// { dg-final { scan-assembler "\.section\t\.data\\\$x\[^\n\]*\n\t\.linkonce discard" } }
|
// { dg-final { scan-assembler "\.section\t\.data\\\$x\[^\n\]*\n\t\.linkonce discard" } }
|
||||||
// { dg-final { scan-assembler-dem "\nguard variable for x:" } }
|
|
||||||
|
|
||||||
__declspec (selectany) int foo = 1;
|
__declspec (selectany) int foo = 1;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// { dg-do compile { target i?86-pc-cygwin } }
|
// { dg-do compile { target i?86-pc-cygwin } }
|
||||||
// { dg-do compile { target i?86-pc-mingw* } }
|
// { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } }
|
||||||
|
|
||||||
// Check for errors with invalid usage of selectany attribute.
|
// Check for errors with invalid usage of selectany attribute.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue