public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14639] New: Incorrect emission of unused compiler-generated destructor at -O2
@ 2004-03-18 20:46 austern at apple dot com
  2004-03-19  1:33 ` [Bug c++/14639] [3.4/3.5 Regression] [unit-at-a-time] " pinskia at gcc dot gnu dot org
                   ` (56 more replies)
  0 siblings, 57 replies; 62+ messages in thread
From: austern at apple dot com @ 2004-03-18 20:46 UTC (permalink / raw)
  To: gcc-bugs

Consider the following file:
class AAA {
public:
  virtual ~AAA();
};

class BBB {
public:
  virtual ~BBB();
};

class xyz : public AAA, public BBB {
public:
  xyz() : AAA(), BBB() { }
};




Class xyz has no key method, so its vtable should be emitted only in translation units where it's used.  
With "gcc -O0 -c foo.cc" I get what I expect: the compiler doesn't emit _ZTV3xyz, _ZN3xyzD0Ev, or 
anything else.  With "gcc -O2 -c foo.cc" I get incorrect behavior: the compiler emits xyz's destructor 
and vtable, thunks, and all of the things in AAA and BBB that are required to support them.

This is a regression.  In 3.2.2, O0 and O2 both behave correctly.

-- 
           Summary: Incorrect emission of unused compiler-generated
                    destructor at -O2
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: austern at apple dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2004-07-29 18:09 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-18 20:46 [Bug c++/14639] New: Incorrect emission of unused compiler-generated destructor at -O2 austern at apple dot com
2004-03-19  1:33 ` [Bug c++/14639] [3.4/3.5 Regression] [unit-at-a-time] " pinskia at gcc dot gnu dot org
2004-03-19  2:27 ` mmitchel at gcc dot gnu dot org
2004-03-19  4:02 ` austern at apple dot com
2004-03-19  4:44 ` mark at codesourcery dot com
2004-03-21 18:26 ` hubicka at ucw dot cz
2004-03-21 18:26 ` [Bug c++/14639] New: " Jan Hubicka
2004-03-21 19:25   ` Mark Mitchell
2004-03-22  9:44     ` Jan Hubicka
2004-03-22 15:31       ` Mark Mitchell
2004-03-23  9:52         ` Jan Hubicka
2004-03-21 19:25 ` [Bug c++/14639] [3.4/3.5 Regression] [unit-at-a-time] " mark at codesourcery dot com
2004-03-21 23:33 ` steven at gcc dot gnu dot org
2004-03-22  9:44 ` jh at suse dot cz
2004-03-22 15:32 ` mark at codesourcery dot com
2004-03-23  9:52 ` jh at suse dot cz
2004-03-23 21:25 ` mark at codesourcery dot com
2004-03-23 21:26 ` mmitchel at gcc dot gnu dot org
2004-03-23 21:26 ` mmitchel at gcc dot gnu dot org
2004-03-24 18:23 ` hubicka at ucw dot cz
2004-03-24 18:44 ` mark at codesourcery dot com
2004-03-24 23:51 ` hubicka at ucw dot cz
2004-03-26  8:23 ` mark at codesourcery dot com
2004-03-26 10:01 ` hubicka at ucw dot cz
2004-03-28 15:42 ` cvs-commit at gcc dot gnu dot org
2004-03-30 13:46 ` [Bug c++/14639] [3.5 " pinskia at gcc dot gnu dot org
2004-06-03 23:27 ` bowdidge at apple dot com
2004-06-03 23:33 ` pinskia at gcc dot gnu dot org
2004-06-03 23:35 ` pinskia at gcc dot gnu dot org
2004-06-03 23:38 ` bowdidge at apple dot com
2004-06-03 23:38 ` mark at codesourcery dot com
2004-06-03 23:45 ` cvs-commit at gcc dot gnu dot org
2004-06-03 23:46 ` pinskia at gcc dot gnu dot org
2004-06-04  0:37 ` bowdidge at apple dot com
2004-06-04  0:38 ` bowdidge at apple dot com
2004-06-04  0:40 ` pinskia at gcc dot gnu dot org
2004-06-04  0:50 ` [Bug c++/14639] [3.5 Regression] [non-unit-at-a-time] " pinskia at gcc dot gnu dot org
2004-06-04  0:58 ` [Bug c++/14639] [3.5 Regression] [non-unit-at-a-time] Incorrect emission of unused compiler-generated destructor bowdidge at apple dot com
2004-06-04  1:09 ` pinskia at gcc dot gnu dot org
2004-06-04  1:50 ` pinskia at gcc dot gnu dot org
2004-06-04  2:12 ` bowdidge at apple dot com
2004-06-04  2:19 ` pinskia at gcc dot gnu dot org
2004-06-04  2:20 ` pinskia at gcc dot gnu dot org
2004-06-04  2:47 ` pinskia at gcc dot gnu dot org
2004-06-04  3:45 ` bowdidge at apple dot com
2004-06-04  4:53 ` bowdidge at apple dot com
2004-06-04  4:58 ` pinskia at gcc dot gnu dot org
2004-06-04 19:13 ` bowdidge at apple dot com
2004-06-04 21:04 ` hubicka at ucw dot cz
2004-06-04 21:11 ` hubicka at ucw dot cz
2004-06-04 21:15 ` bowdidge at apple dot com
2004-06-04 21:16 ` hubicka at ucw dot cz
2004-06-04 21:54 ` bowdidge at apple dot com
2004-06-04 22:59 ` bowdidge at apple dot com
2004-06-05  0:58 ` bowdidge at apple dot com
2004-06-05  1:02 ` bowdidge at apple dot com
2004-06-05  1:19 ` pinskia at gcc dot gnu dot org
2004-06-14 23:56 ` pinskia at gcc dot gnu dot org
2004-06-15  3:43 ` pinskia at gcc dot gnu dot org
2004-06-15 20:52 ` pinskia at gcc dot gnu dot org
2004-06-15 20:52 ` cvs-commit at gcc dot gnu dot org
2004-07-29 18:09 ` pinskia 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).