diff options
author | Paul Brook <paul@codesourcery.com> | 2006-09-29 17:29:30 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2006-09-29 17:29:30 +0000 |
commit | 6f548dcc608229c9996624252cfc4bc53a15187d (patch) | |
tree | 27eabe45fa771c66f5b5f51e1222952455953915 /gcc/testsuite | |
parent | 645c27bbc6e17567993d496eca4e741c198c0e52 (diff) |
2006-09-27 Paul Brook <paul@codesourcery.com>
Backport from mainline.
2006-09-20 Danny Smith <dannysmith@users.sourceforge.net>
gcc/cp/
* class.c (check_for_override): Remove dllimport from virtual
methods.
gcc/testsuite/
* g++.dg/ext/dllimport12.C: New file.
2006-07-20 Jason Merrill <jason@redhat.com>
gcc/
* tree.c (remove_attribute): New fn.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl/sourcerygxx-4_1@117308 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/g++.dg/ext/dllimport12.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/dllimport12.C b/gcc/testsuite/g++.dg/ext/dllimport12.C new file mode 100644 index 00000000000..fe480f21c3a --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/dllimport12.C @@ -0,0 +1,22 @@ +// PR target/27650 +// Don't use dllimport semantics on virtual methods +// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} } + +// Don't import explicitly virtual method. +struct base +{ + virtual void key_method(); + __attribute__((dllimport)) virtual ~base(); +}; + +void base::key_method() {} + + +// Nor an implicitly virtual method. +struct derived : public base +{ + void key_method(); + __attribute__((dllimport)) ~derived(); +}; + +void derived::key_method() {} |