public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/41512]  New: dllexport broken on cygwin
@ 2009-09-30  3:13 davek at gcc dot gnu dot org
  2009-09-30  3:32 ` [Bug target/41512] " davek at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: davek at gcc dot gnu dot org @ 2009-09-30  3:13 UTC (permalink / raw)
  To: gcc-bugs

These new FAILs have been appearing on trunk since some time between 20090820
and 20090903:

FAIL: g++.dg/ext/dllexport-MI1.C scan-assembler -export:_ZNK2D12vfEv
FAIL: g++.dg/ext/dllexport-MI1.C scan-assembler -export:_ZNK2D22vfEv
FAIL: g++.dg/ext/dllexport-MI1.C scan-assembler -export:_ZNK3MI12vfEv
FAIL: g++.dg/ext/dllexport-MI1.C scan-assembler -export:_ZTV2D1,data
FAIL: g++.dg/ext/dllexport-MI1.C scan-assembler -export:_ZN2D2C2ERKS_
FAIL: g++.dg/ext/dllexport1.C scan-assembler  -export:_ZN3Bar10inline_barEi

(Refs: http://gcc.gnu.org/ml/gcc-testresults/2009-08/msg02276.html
       http://gcc.gnu.org/ml/gcc-testresults/2009-09/msg00356.html )

They seem to represent serious breakage of dllexport with cygwin as the latest
testrun with my libstdc-as-dll patch is showing even more fails on top of
these, but didn't fail before they appeared, and a quick investigation shows
that the executables generated during the testsuite fail to import anything
from the libstdc DLL!

This could be either a target or a C++ problem since they both co-operate to
manage the dllexport attribute.  I couldn't find any changes in that area of
the backend in the relevant date range, so I've marked it C++ for now.  I'll
attach preprocessed source for the testcase shortly.


-- 
           Summary: dllexport broken on cygwin
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: davek at gcc dot gnu dot org
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


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


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

* [Bug target/41512] dllexport broken on cygwin
  2009-09-30  3:13 [Bug target/41512] New: dllexport broken on cygwin davek at gcc dot gnu dot org
@ 2009-09-30  3:32 ` davek at gcc dot gnu dot org
  2009-09-30  3:34 ` davek at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: davek at gcc dot gnu dot org @ 2009-09-30  3:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from davek at gcc dot gnu dot org  2009-09-30 03:32 -------
Created an attachment (id=18669)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18669&action=view)
testcase source compiled by gcc HEAD


-- 


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


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

* [Bug target/41512] dllexport broken on cygwin
  2009-09-30  3:13 [Bug target/41512] New: dllexport broken on cygwin davek at gcc dot gnu dot org
  2009-09-30  3:32 ` [Bug target/41512] " davek at gcc dot gnu dot org
@ 2009-09-30  3:34 ` davek at gcc dot gnu dot org
  2009-09-30  3:40 ` [Bug c++/41512] " davek at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: davek at gcc dot gnu dot org @ 2009-09-30  3:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from davek at gcc dot gnu dot org  2009-09-30 03:33 -------
Created an attachment (id=18670)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18670&action=view)
same testcase compiled with gcc 4.3.4

Note the differences in the "-export: " directives in the .drectve section at
the end.


-- 


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


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

* [Bug c++/41512] dllexport broken on cygwin
  2009-09-30  3:13 [Bug target/41512] New: dllexport broken on cygwin davek at gcc dot gnu dot org
  2009-09-30  3:32 ` [Bug target/41512] " davek at gcc dot gnu dot org
  2009-09-30  3:34 ` davek at gcc dot gnu dot org
@ 2009-09-30  3:40 ` davek at gcc dot gnu dot org
  2009-10-03 13:41 ` davek at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: davek at gcc dot gnu dot org @ 2009-09-30  3:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from davek at gcc dot gnu dot org  2009-09-30 03:40 -------
Switching to c++ as I suggested initially, there were changes to the handling
of vague linkage and global declarations within the same period, and as I
mentioned nothing that seemed relevant in the backend.


-- 

davek at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |c++


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


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

* [Bug c++/41512] dllexport broken on cygwin
  2009-09-30  3:13 [Bug target/41512] New: dllexport broken on cygwin davek at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-09-30  3:40 ` [Bug c++/41512] " davek at gcc dot gnu dot org
@ 2009-10-03 13:41 ` davek at gcc dot gnu dot org
  2009-10-03 21:48 ` dannysmith at users dot sourceforge dot net
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: davek at gcc dot gnu dot org @ 2009-10-03 13:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from davek at gcc dot gnu dot org  2009-10-03 13:41 -------
(In reply to comment #0)

> They seem to represent serious breakage of dllexport with cygwin as the latest
> testrun with my libstdc-as-dll patch is showing even more fails on top of
> these, but didn't fail before they appeared, and a quick investigation shows
> that the executables generated during the testsuite fail to import anything
> from the libstdc DLL!

  That much is a separate issue, but the new FAILs are real and show even on
clean HEAD when using static linking.


-- 


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


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

* [Bug c++/41512] dllexport broken on cygwin
  2009-09-30  3:13 [Bug target/41512] New: dllexport broken on cygwin davek at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-10-03 13:41 ` davek at gcc dot gnu dot org
@ 2009-10-03 21:48 ` dannysmith at users dot sourceforge dot net
  2009-10-03 21:49 ` dannysmith at users dot sourceforge dot net
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2009-10-03 21:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dannysmith at users dot sourceforge dot net  2009-10-03 21:47 -------
(In reply to comment #0)
> These new FAILs have been appearing on trunk since some time between 20090820
> and 20090903:
> 
> FAIL: g++.dg/ext/dllexport-MI1.C scan-assembler -export:_ZNK2D12vfEv
> FAIL: g++.dg/ext/dllexport-MI1.C scan-assembler -export:_ZNK2D22vfEv
> FAIL: g++.dg/ext/dllexport-MI1.C scan-assembler -export:_ZNK3MI12vfEv
> FAIL: g++.dg/ext/dllexport-MI1.C scan-assembler -export:_ZTV2D1,data
> FAIL: g++.dg/ext/dllexport-MI1.C scan-assembler -export:_ZN2D2C2ERKS_
> FAIL: g++.dg/ext/dllexport1.C scan-assembler  -export:_ZN3Bar10inline_barEi
> 
> (Refs: http://gcc.gnu.org/ml/gcc-testresults/2009-08/msg02276.html
>        http://gcc.gnu.org/ml/gcc-testresults/2009-09/msg00356.html )
> 
> They seem to represent serious breakage of dllexport with cygwin as the latest
> testrun with my libstdc-as-dll patch is showing even more fails on top of
> these, but didn't fail before they appeared, and a quick investigation shows
> that the executables generated during the testsuite fail to import anything
> from the libstdc DLL!
> 
> This could be either a target or a C++ problem since they both co-operate to
> manage the dllexport attribute.  I couldn't find any changes in that area of
> the backend in the relevant date range, so I've marked it C++ for now.  I'll
> attach preprocessed source for the testcase shortly.
> 

The problem appears to be that DECL_CONTEXT is no longer set for class members 
with link-once semantixcs (inline  methods, vtables).

Is that intended?  It breaks dllexport of these symbols when they inherit the
attribute of their of their containing type.

The breakage can be fixed in target backend i386/winnt-cxx.c 
i386_pe_adjust_class_at_definition, by propagating the dllexport attribute
there, rather than relying on DECL_CONTEXT later.

I am testing that patch now.

Danny


-- 


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


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

* [Bug c++/41512] dllexport broken on cygwin
  2009-09-30  3:13 [Bug target/41512] New: dllexport broken on cygwin davek at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-10-03 21:48 ` dannysmith at users dot sourceforge dot net
@ 2009-10-03 21:49 ` dannysmith at users dot sourceforge dot net
  2009-10-03 21:54 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2009-10-03 21:49 UTC (permalink / raw)
  To: gcc-bugs



-- 

dannysmith at users dot sourceforge dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dannysmith at users dot
                   |                            |sourceforge dot net
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-10-03 21:49:33
               date|                            |


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


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

* [Bug c++/41512] dllexport broken on cygwin
  2009-09-30  3:13 [Bug target/41512] New: dllexport broken on cygwin davek at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2009-10-03 21:49 ` dannysmith at users dot sourceforge dot net
@ 2009-10-03 21:54 ` rguenth at gcc dot gnu dot org
  2009-10-03 21:56 ` davek at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-03 21:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2009-10-03 21:54 -------
Yes, it's intended.  The fix is as you suggest.


-- 


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


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

* [Bug c++/41512] dllexport broken on cygwin
  2009-09-30  3:13 [Bug target/41512] New: dllexport broken on cygwin davek at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2009-10-03 21:54 ` rguenth at gcc dot gnu dot org
@ 2009-10-03 21:56 ` davek at gcc dot gnu dot org
  2009-10-07  2:42 ` [Bug target/41512] " dannysmith at users dot sourceforge dot net
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: davek at gcc dot gnu dot org @ 2009-10-03 21:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from davek at gcc dot gnu dot org  2009-10-03 21:55 -------
(In reply to comment #5)
> The breakage can be fixed in target backend i386/winnt-cxx.c 
> i386_pe_adjust_class_at_definition, by propagating the dllexport attribute
> there, rather than relying on DECL_CONTEXT later.
> 
> I am testing that patch now.

  Brilliant, TYVM Danny!


-- 


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


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

* [Bug target/41512] dllexport broken on cygwin
  2009-09-30  3:13 [Bug target/41512] New: dllexport broken on cygwin davek at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2009-10-03 21:56 ` davek at gcc dot gnu dot org
@ 2009-10-07  2:42 ` dannysmith at users dot sourceforge dot net
  2009-10-07  2:57 ` dannysmith at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2009-10-07  2:42 UTC (permalink / raw)
  To: gcc-bugs



-- 

dannysmith at users dot sourceforge dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |dannysmith at users dot
                   |dot org                     |sourceforge dot net
             Status|NEW                         |ASSIGNED
          Component|c++                         |target
   Last reconfirmed|2009-10-03 21:49:33         |2009-10-07 02:41:49
               date|                            |


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


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

* [Bug target/41512] dllexport broken on cygwin
  2009-09-30  3:13 [Bug target/41512] New: dllexport broken on cygwin davek at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2009-10-07  2:42 ` [Bug target/41512] " dannysmith at users dot sourceforge dot net
@ 2009-10-07  2:57 ` dannysmith at gcc dot gnu dot org
  2009-10-07  3:06 ` dannysmith at users dot sourceforge dot net
  2009-10-07 17:55 ` davek at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: dannysmith at gcc dot gnu dot org @ 2009-10-07  2:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dannysmith at gcc dot gnu dot org  2009-10-07 02:57 -------
Subject: Bug 41512

Author: dannysmith
Date: Wed Oct  7 02:57:21 2009
New Revision: 152511

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152511
Log:
        PR target/41512
        * config/i386/winnt.c (i386_pe_determine_dllexport_p): Don't propagate
        dllexport to class members here.
        (i386_pe_determine_dllimport_p): Only check static class data for
        definition.
        (i386_pe_encode_section_info): Don't recheck DECL_DLLIMPORT_P.
        * config/i386/winnt-cxx.c (i386_pe_type_dllimport_p): Only check
        functions for vague linkage.
        (i386_pe_type_dllexport_p): Fix formatting.
        (maybe_add_dllexport) New function.
        (i386_pe_adjust_class_at_definition): Use it to propagate dllexport
        to class members.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/winnt-cxx.c
    trunk/gcc/config/i386/winnt.c


-- 


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


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

* [Bug target/41512] dllexport broken on cygwin
  2009-09-30  3:13 [Bug target/41512] New: dllexport broken on cygwin davek at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2009-10-07  2:57 ` dannysmith at gcc dot gnu dot org
@ 2009-10-07  3:06 ` dannysmith at users dot sourceforge dot net
  2009-10-07 17:55 ` davek at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2009-10-07  3:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from dannysmith at users dot sourceforge dot net  2009-10-07 03:06 -------
Fixed at revision 152511.


-- 

dannysmith at users dot sourceforge dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug target/41512] dllexport broken on cygwin
  2009-09-30  3:13 [Bug target/41512] New: dllexport broken on cygwin davek at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2009-10-07  3:06 ` dannysmith at users dot sourceforge dot net
@ 2009-10-07 17:55 ` davek at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: davek at gcc dot gnu dot org @ 2009-10-07 17:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from davek at gcc dot gnu dot org  2009-10-07 17:55 -------
(In reply to comment #9)
> Fixed at revision 152511.
> 

  My tests (r.152512) have now run far enough to confirm that all the new FAILs
are fixed.  Thanks Danny!


-- 

davek at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED


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


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

end of thread, other threads:[~2009-10-07 17:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-30  3:13 [Bug target/41512] New: dllexport broken on cygwin davek at gcc dot gnu dot org
2009-09-30  3:32 ` [Bug target/41512] " davek at gcc dot gnu dot org
2009-09-30  3:34 ` davek at gcc dot gnu dot org
2009-09-30  3:40 ` [Bug c++/41512] " davek at gcc dot gnu dot org
2009-10-03 13:41 ` davek at gcc dot gnu dot org
2009-10-03 21:48 ` dannysmith at users dot sourceforge dot net
2009-10-03 21:49 ` dannysmith at users dot sourceforge dot net
2009-10-03 21:54 ` rguenth at gcc dot gnu dot org
2009-10-03 21:56 ` davek at gcc dot gnu dot org
2009-10-07  2:42 ` [Bug target/41512] " dannysmith at users dot sourceforge dot net
2009-10-07  2:57 ` dannysmith at gcc dot gnu dot org
2009-10-07  3:06 ` dannysmith at users dot sourceforge dot net
2009-10-07 17:55 ` davek 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).