public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36654]  New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance
@ 2008-06-27 16:55 tdragon at tdragon dot net
  2008-06-27 17:09 ` [Bug c++/36654] Inlined con/de-structor breaks virtual inheritance dllimport classes tdragon at tdragon dot net
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: tdragon at tdragon dot net @ 2008-06-27 16:55 UTC (permalink / raw)
  To: gcc-bugs

In mingw32 builds of the GCC 4.3 branch, the following code causes an ICE:

class blah {};

class __attribute__((dllimport)) vchild : virtual public blah
{
        vchild() {}
};

The dllimport attribute, the virtual inheritance, and the inline constructor
are key to causing the error. A Windows prompt session using the MinGW GCC
4.3.0 alpha follows:

> g++ -v
Using built-in specs.
Target: mingw32
Configured with: ../gcc-4.3.0/configure
--enable-languages=c,ada,c++,fortran,java,objc,obj-c++
--disable-sjlj-exceptions --enable-shared --enable-libgcj --enable-libgomp
--with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug
--enable-concept-checks --enable-version-specific-runtime-libs --build=mingw32
--with-bugurl=http://www.mingw.org/bugs.shtml --prefix=/mingw
--with-gmp=/mingw/src/gcc/gmp-mpfr-root
--with-mpfr=/mingw/src/gcc/gmp-mpfr-root
--with-libiconv-prefix=/mingw/src/gcc/libiconv-root
Thread model: win32
gcc version 4.3.0 20080305 (alpha-testing) mingw-20080502 (GCC)

> g++ -c deltatest.ii
deltatest.ii:8: internal compiler error: in maybe_emit_vtables, at
cp/decl2.c:1678
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://www.mingw.org/bugs.shtml> for instructions.


-- 
           Summary: Inlined con/de-structor breaks in dllimport classes with
                    virtual inheritance
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tdragon at tdragon dot net
 GCC build triplet: mingw32
  GCC host triplet: mingw32
GCC target triplet: mingw32


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c++/36654] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
@ 2008-06-27 17:09 ` tdragon at tdragon dot net
  2008-06-28  7:53 ` dannysmith at users dot sourceforge dot net
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tdragon at tdragon dot net @ 2008-06-27 17:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from tdragon at tdragon dot net  2008-06-27 17:09 -------
I have also discovered that this bug is *not* present in the MinGW 4.2.1 TP (or
in MinGW 3.4.5), but is present in unofficial builds of GCC 4.3.1 and 4.2.4 as
well as 4.3.0.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c++/36654] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
  2008-06-27 17:09 ` [Bug c++/36654] Inlined con/de-structor breaks virtual inheritance dllimport classes tdragon at tdragon dot net
@ 2008-06-28  7:53 ` dannysmith at users dot sourceforge dot net
  2008-08-12  2:15 ` tdragon at tdragon dot net
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2008-06-28  7:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dannysmith at users dot sourceforge dot net  2008-06-28 07:53 -------
This is duplicate of 35921 and is fixed on 4.3.2 and trunk. 

*** This bug has been marked as a duplicate of 35921 ***


-- 

dannysmith at users dot sourceforge dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE
   Target Milestone|---                         |4.3.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c++/36654] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
  2008-06-27 17:09 ` [Bug c++/36654] Inlined con/de-structor breaks virtual inheritance dllimport classes tdragon at tdragon dot net
  2008-06-28  7:53 ` dannysmith at users dot sourceforge dot net
@ 2008-08-12  2:15 ` tdragon at tdragon dot net
  2008-08-27 22:11 ` jsm28 at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tdragon at tdragon dot net @ 2008-08-12  2:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from tdragon at tdragon dot net  2008-08-12 02:13 -------
As of r138967 pulled down today from the 4.3 branch, this bug is in fact still
present. Shell session follows.

> g++ -v
Using built-in specs.
Target: mingw32
Configured with: ../gcc-4.3-svn/configure --prefix=/mingw --build=mingw32
--enable-languages=c,c++
--with-bugurl=http://www.tdragon.net/recentgcc/bugs.php --disable-nls
--disable-win32-registry --disable-werror --enable-threads --disable-symvers
--enable-cxx-flags='-fno-function-sections -fno-data-sections'
--enable-fully-dynamic-string --enable-version-specific-runtime-libs
--enable-sjlj-exceptions --with-pkgversion='GCC TDM-1 for MinGW'
--disable-bootstrap
Thread model: win32
gcc version 4.3.2 20080811 (prerelease) (GCC TDM-1 for MinGW)

> g++ -c deltatest.ii
deltatest.ii:8: internal compiler error: in maybe_emit_vtables, at
cp/decl2.c:1745
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://www.tdragon.net/recentgcc/bugs.php> for instructions.


-- 

tdragon at tdragon dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|DUPLICATE                   |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c++/36654] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
                   ` (2 preceding siblings ...)
  2008-08-12  2:15 ` tdragon at tdragon dot net
@ 2008-08-27 22:11 ` jsm28 at gcc dot gnu dot org
  2008-09-20 17:59 ` tdragon at tdragon dot net
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-08-27 22:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jsm28 at gcc dot gnu dot org  2008-08-27 22:04 -------
4.3.2 is released, changing milestones to 4.3.3.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.2                       |4.3.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c++/36654] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
                   ` (3 preceding siblings ...)
  2008-08-27 22:11 ` jsm28 at gcc dot gnu dot org
@ 2008-09-20 17:59 ` tdragon at tdragon dot net
  2008-10-09 22:58 ` tdragon at tdragon dot net
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tdragon at tdragon dot net @ 2008-09-20 17:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from tdragon at tdragon dot net  2008-09-20 17:57 -------
Any news or thoughts on this bug? (*Ping*)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c++/36654] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
                   ` (4 preceding siblings ...)
  2008-09-20 17:59 ` tdragon at tdragon dot net
@ 2008-10-09 22:58 ` tdragon at tdragon dot net
  2008-11-02  0:56 ` [Bug c++/36654] [4.3 regression] " tdragon at tdragon dot net
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tdragon at tdragon dot net @ 2008-10-09 22:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from tdragon at tdragon dot net  2008-10-09 22:57 -------
Ping! Any ideas on this bug?


-- 

tdragon at tdragon dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.2.4 4.3.0 4.3.1           |4.2.4 4.3.0 4.3.1 4.3.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c++/36654] [4.3 regression] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
                   ` (5 preceding siblings ...)
  2008-10-09 22:58 ` tdragon at tdragon dot net
@ 2008-11-02  0:56 ` tdragon at tdragon dot net
  2008-11-30 23:03 ` [Bug c++/36654] [4.2/4.3 Regression] " rguenth at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tdragon at tdragon dot net @ 2008-11-02  0:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from tdragon at tdragon dot net  2008-11-02 00:54 -------
C'mon, folks! Any chance of getting this fixed?


-- 

tdragon at tdragon dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Inlined con/de-structor     |[4.3 regression] Inlined
                   |breaks virtual inheritance  |con/de-structor breaks
                   |dllimport classes           |virtual inheritance
                   |                            |dllimport classes


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c++/36654] [4.2/4.3 Regression] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
                   ` (6 preceding siblings ...)
  2008-11-02  0:56 ` [Bug c++/36654] [4.3 regression] " tdragon at tdragon dot net
@ 2008-11-30 23:03 ` rguenth at gcc dot gnu dot org
  2008-12-29 21:22 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-11-30 23:03 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.3 regression] Inlined    |[4.2/4.3 Regression] Inlined
                   |con/de-structor breaks      |con/de-structor breaks
                   |virtual inheritance         |virtual inheritance
                   |dllimport classes           |dllimport classes
   Target Milestone|4.3.3                       |4.2.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c++/36654] [4.2/4.3 Regression] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
                   ` (7 preceding siblings ...)
  2008-11-30 23:03 ` [Bug c++/36654] [4.2/4.3 Regression] " rguenth at gcc dot gnu dot org
@ 2008-12-29 21:22 ` rguenth at gcc dot gnu dot org
  2009-01-02  4:21 ` dannysmith at users dot sourceforge dot net
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-29 21:22 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
           Priority|P3                          |P2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c++/36654] [4.2/4.3 Regression] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
                   ` (8 preceding siblings ...)
  2008-12-29 21:22 ` rguenth at gcc dot gnu dot org
@ 2009-01-02  4:21 ` dannysmith at users dot sourceforge dot net
  2009-01-02 14:24 ` tdragon at tdragon dot net
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2009-01-02  4:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dannysmith at users dot sourceforge dot net  2009-01-02 04:19 -------
Hello John,
This patch:

Index: gcc/config/i386/winnt-cxx.c
===================================================================
--- gcc/config/i386/winnt-cxx.c (revision 142383)
+++ gcc/config/i386/winnt-cxx.c (working copy)
@@ -65,7 +65,7 @@
       ignore the class attribute.  */
   else if (TREE_CODE (decl) == VAR_DECL
           && TREE_STATIC (decl) && TREE_PUBLIC (decl)
-          && !DECL_EXTERNAL (decl))
+          && DECL_NOT_REALLY_EXTERN (decl))
     {
       if (!DECL_VIRTUAL_P (decl))
          error ("definition of static data member %q+D of "

fixes your testcase and causes no regressions in g++ testsuite.  I have only
tested on narrow range of dll builds, to check that the patch does not break
anything.  I think it may cause spurious errors with import of static data
members, but that can be fixed.  Could you please test with your projects.

Thanks

Danny


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c++/36654] [4.2/4.3 Regression] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
                   ` (9 preceding siblings ...)
  2009-01-02  4:21 ` dannysmith at users dot sourceforge dot net
@ 2009-01-02 14:24 ` tdragon at tdragon dot net
  2009-01-07  7:33 ` dannysmith at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tdragon at tdragon dot net @ 2009-01-02 14:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from tdragon at tdragon dot net  2009-01-02 14:23 -------
That patch seems to work fine, and I haven't seen any unwarranted errors
relating to static data members so far. Thank you very much for tracking this
down!


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c++/36654] [4.2/4.3 Regression] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
                   ` (10 preceding siblings ...)
  2009-01-02 14:24 ` tdragon at tdragon dot net
@ 2009-01-07  7:33 ` dannysmith at gcc dot gnu dot org
  2009-01-07  7:47 ` [Bug target/36654] " dannysmith at users dot sourceforge dot net
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dannysmith at gcc dot gnu dot org @ 2009-01-07  7:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from dannysmith at gcc dot gnu dot org  2009-01-07 07:33 -------
Subject: Bug 36654

Author: dannysmith
Date: Wed Jan  7 07:32:58 2009
New Revision: 143150

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143150
Log:
        PR target/36654
        * config/i386/winnt-cxx.c (i386_pe_type_dllimport_p): Check
        DECL_NOT_REALLY_EXTERN rather than !DECL_EXTERNAL

Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/config/i386/winnt-cxx.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/36654] [4.2/4.3 Regression] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
                   ` (11 preceding siblings ...)
  2009-01-07  7:33 ` dannysmith at gcc dot gnu dot org
@ 2009-01-07  7:47 ` dannysmith at users dot sourceforge dot net
  2009-03-25  8:03 ` [Bug target/36654] [4.2 " dave dot korn dot cygwin at gmail dot com
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2009-01-07  7:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from dannysmith at users dot sourceforge dot net  2009-01-07 07:47 -------
Fixedd on 4.3 branch


-- 

dannysmith at users dot sourceforge dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |target
      Known to work|3.4.5 4.2.1                 |3.4.5 4.2.1 4.3.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/36654] [4.2 Regression] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
                   ` (12 preceding siblings ...)
  2009-01-07  7:47 ` [Bug target/36654] " dannysmith at users dot sourceforge dot net
@ 2009-03-25  8:03 ` dave dot korn dot cygwin at gmail dot com
  2009-03-28  7:24 ` dannysmith at users dot sourceforge dot net
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dave dot korn dot cygwin at gmail dot com @ 2009-03-25  8:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from dave dot korn dot cygwin at gmail dot com  2009-03-25 08:03 -------
Hi all.

This patch caused g++.dg/ext/dllimport7.C to regress (in one subtest) between
4.3.2 and 4.3.3 on Cygwin, although it could be that the testcase is out of
date.

// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }

//  Report errors on definition of dllimport'd static data member . 


struct Baz
{
  Baz(int a_ =0) : a(a_) {} 
  int a;
};

class  __declspec(dllimport) Bar
{
  public:
    enum {one = 1};
    static const int two = 2;
    static const int three;
    static const Baz null_baz;
};

const int Bar::three = 3;       //  { dg-warning "redeclared without dllimport"
}
//  { dg-error "definition of static data" "C++ specific error" { target
i?86-*-cygwin* i?86-*-mingw* } 21 }

const Baz Bar::null_baz;        //  { dg-warning "redeclared without dllimport"
}
//  { dg-error "definition of static data" "C++ specific error" { target
i?86-*-cygwin* i?86-*-mingw* }  24 }



int foo()
{
  Bar foobar;
  const int* baz = &Bar::two; 
  int a = foobar.two;
  int b = foobar.three;
  int c = foobar.null_baz.a;
  return (a + b + c + *baz);
}



Both the dg-error clauses now fail; previously (4.3.2), only the second one
failed.  Reverting the patch causes the first dg-error (line 21) to pass again
by restoring the error message

/gnu/gcc/release/gcc4-4.3.3-1/src/gcc-4.3.3/gcc/testsuite/g++.dg/ext/dllimport7.
C:21: error: definition of static data member 'Bar::three' of dllimport'd class

I'm not sure why that should be a problem in the first place, so I don't know
if the underlying issue is now fixed and not an error any more.  Anybody?


-- 

dave dot korn dot cygwin at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dave dot korn dot cygwin at
                   |                            |gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/36654] [4.2 Regression] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
                   ` (13 preceding siblings ...)
  2009-03-25  8:03 ` [Bug target/36654] [4.2 " dave dot korn dot cygwin at gmail dot com
@ 2009-03-28  7:24 ` dannysmith at users dot sourceforge dot net
  2009-03-29 15:30 ` tdragon at tdragon dot net
  2009-03-31 15:42 ` jsm28 at gcc dot gnu dot org
  16 siblings, 0 replies; 18+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2009-03-28  7:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from dannysmith at users dot sourceforge dot net  2009-03-28 07:24 -------
(In reply to comment #12)
> Both the dg-error clauses now fail; previously (4.3.2), only the second one
> failed.  Reverting the patch causes the first dg-error (line 21) to pass again
> by restoring the error message
> 
> /gnu/gcc/release/gcc4-4.3.3-1/src/gcc-4.3.3/gcc/testsuite/g++.dg/ext/dllimport7.
> C:21: error: definition of static data member 'Bar::three' of dllimport'd class
> 
> I'm not sure why that should be a problem in the first place, so I don't know
> if the underlying issue is now fixed and not an error any more.  Anybody?
> 

IMO, the hard error should occur.
The native MS compiler emits a similar error message.
Allowing a static data member to be defined in more than one place is a bad
thing.  It most be defined in the dll if the class is defined there and, in the
situation the testcase is testing will be defined again in the exe or dll that
uses the dll.   


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/36654] [4.2 Regression] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
                   ` (14 preceding siblings ...)
  2009-03-28  7:24 ` dannysmith at users dot sourceforge dot net
@ 2009-03-29 15:30 ` tdragon at tdragon dot net
  2009-03-31 15:42 ` jsm28 at gcc dot gnu dot org
  16 siblings, 0 replies; 18+ messages in thread
From: tdragon at tdragon dot net @ 2009-03-29 15:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from tdragon at tdragon dot net  2009-03-29 15:30 -------
I have just filed PR39578, the cause of which may be related to this PR or its
fix.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug target/36654] [4.2 Regression] Inlined con/de-structor breaks virtual inheritance dllimport classes
  2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
                   ` (15 preceding siblings ...)
  2009-03-29 15:30 ` tdragon at tdragon dot net
@ 2009-03-31 15:42 ` jsm28 at gcc dot gnu dot org
  16 siblings, 0 replies; 18+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 15:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from jsm28 at gcc dot gnu dot org  2009-03-31 15:42 -------
Closing 4.2 branch, fixed for 4.3.3 and 4.4.  If there are problems with
the fix, a separate issue has been / should be filed for those.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Known to fail|4.2.4 4.3.0 4.3.1 4.3.2     |4.2.4 4.3.0 4.3.1 4.3.2
                   |                            |4.2.5
         Resolution|                            |FIXED
   Target Milestone|4.2.5                       |4.3.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2009-03-31 15:42 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-27 16:55 [Bug c++/36654] New: Inlined con/de-structor breaks in dllimport classes with virtual inheritance tdragon at tdragon dot net
2008-06-27 17:09 ` [Bug c++/36654] Inlined con/de-structor breaks virtual inheritance dllimport classes tdragon at tdragon dot net
2008-06-28  7:53 ` dannysmith at users dot sourceforge dot net
2008-08-12  2:15 ` tdragon at tdragon dot net
2008-08-27 22:11 ` jsm28 at gcc dot gnu dot org
2008-09-20 17:59 ` tdragon at tdragon dot net
2008-10-09 22:58 ` tdragon at tdragon dot net
2008-11-02  0:56 ` [Bug c++/36654] [4.3 regression] " tdragon at tdragon dot net
2008-11-30 23:03 ` [Bug c++/36654] [4.2/4.3 Regression] " rguenth at gcc dot gnu dot org
2008-12-29 21:22 ` rguenth at gcc dot gnu dot org
2009-01-02  4:21 ` dannysmith at users dot sourceforge dot net
2009-01-02 14:24 ` tdragon at tdragon dot net
2009-01-07  7:33 ` dannysmith at gcc dot gnu dot org
2009-01-07  7:47 ` [Bug target/36654] " dannysmith at users dot sourceforge dot net
2009-03-25  8:03 ` [Bug target/36654] [4.2 " dave dot korn dot cygwin at gmail dot com
2009-03-28  7:24 ` dannysmith at users dot sourceforge dot net
2009-03-29 15:30 ` tdragon at tdragon dot net
2009-03-31 15:42 ` jsm28 at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).