public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48818] New: Wrong copy constructor used when using std::pair in .so and app.
@ 2011-04-29  9:45 melaniec at enfocus dot com
  2011-04-29 10:25 ` [Bug c++/48818] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: melaniec at enfocus dot com @ 2011-04-29  9:45 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Wrong copy constructor used when using std::pair in
                    .so and app.
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: melaniec@enfocus.com


Created attachment 24142
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24142
Test library and app as illustration of the bug.

Attached is a test application and a shared library it is linked with. If the
wrong copy constructor is used, it will write an error. 

Both the application and the library have a local but different class
"TestObject". Both application and library use a std::pair<TestObject, void*>. 
When the copy constructor of the library's TestObject is called by the
std::pair in the library, the copy constructor from the application's
TestObject is used. This does not happen if the application doesn't have a
std::pair<TestObject, void*>. 

Tested ok with 4.1.3.
Failed with 4.2.1, 4.3.4, 4.4.1, 4.5.1 (I couldn't test it readily with a more
recent version.)


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

end of thread, other threads:[~2011-10-20  8:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-29  9:45 [Bug c++/48818] New: Wrong copy constructor used when using std::pair in .so and app melaniec at enfocus dot com
2011-04-29 10:25 ` [Bug c++/48818] " rguenth at gcc dot gnu.org
2011-05-04 14:29 ` melaniec at enfocus dot com
2011-05-26  6:46 ` bangerth at gmail dot com
2011-06-06 16:27 ` melaniec at enfocus dot com
2011-09-02  9:31 ` rguenth at gcc dot gnu.org
2011-10-20  1:20 ` [Bug c++/48818] Wrong copy constructor used when using std::pair in .so and app. -fvisibility=hidden does not work paolo.carlini at oracle dot com
2011-10-20  7:28 ` vincenzo.innocente at cern dot ch
2011-10-20  8:24 ` paolo.carlini at oracle dot com

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).