diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-12 20:01:29 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-12 20:01:29 +0000 |
commit | 82e367e05461b142a7e42805f584daff9d0c89e9 (patch) | |
tree | 1092de168474e077f934e68f0a40d76873451866 /gcc | |
parent | 9f32fea43a8f5686c0bcc9bbcf22b05429b0d37e (diff) | |
download | gcc-82e367e05461b142a7e42805f584daff9d0c89e9.tar.gz |
PR c++/7910
* config/i386/winnt.c (i386_pe_mark_dllimport): Fix thinko.
PR c++/7910
* g++.dg/ext/dllimport1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65519 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/winnt.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/dllimport1.C | 21 |
4 files changed, 34 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ee654718d63..0e9f49dccf2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-04-12 Mark Mitchell <mark@codesourcery.com> + + PR c++/7910 + * config/i386/winnt.c (i386_pe_mark_dllimport): Fix thinko. + 2003-04-12 Zack Weinberg <zack@codesourcery.com> * configure.in: Check for wchar.h, mbstowcs, and wcswidth. diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index 0751c7f888e..98e57922057 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -273,7 +273,7 @@ i386_pe_mark_dllimport (decl) const char *oldname; char *newname; tree idp; - rtx rtlname, newrtl; + rtx rtlname; rtlname = XEXP (DECL_RTL (decl), 0); if (GET_CODE (rtlname) == SYMBOL_REF) @@ -335,10 +335,8 @@ i386_pe_mark_dllimport (decl) identical. */ idp = get_identifier (newname); - newrtl = gen_rtx (MEM, Pmode, - gen_rtx (SYMBOL_REF, Pmode, - IDENTIFIER_POINTER (idp))); - XEXP (DECL_RTL (decl), 0) = newrtl; + XEXP (DECL_RTL (decl), 0) + = gen_rtx_SYMBOL_REF (Pmode, IDENTIFIER_POINTER (idp)); /* Can't treat a pointer to this as a constant address */ DECL_NON_ADDR_CONST_P (decl) = 1; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fa8f2b83aa1..c7cae0a1818 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-04-12 Mark Mitchell <mark@codesourcery.com> + + PR c++/7910 + * g++.dg/ext/dllimport1.C: New test. + 2003-04-12 Eric Botcazou <ebotcazou@libertysurf.fr> * gcc.dg/ultrasp8.c: Fix for 32-bit Sparc. diff --git a/gcc/testsuite/g++.dg/ext/dllimport1.C b/gcc/testsuite/g++.dg/ext/dllimport1.C new file mode 100644 index 00000000000..a93fb1927d6 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/dllimport1.C @@ -0,0 +1,21 @@ +// { dg-do compile { target i?86-*-cygwin* } } + +class __attribute__((dllimport)) Foo +{ + public: + virtual void dummy_foo_func(void) + {} +}; + +class Bar : public Foo +{ +public: + ~Bar(); + void dummy_bar_func(); +}; + +Bar::~Bar() +{} + +void Bar::dummy_bar_func() +{} |