public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/34949]  New: Dead code in trivial destructors.
@ 2008-01-23 23:23 spark at gcc dot gnu dot org
  2008-01-23 23:24 ` [Bug c++/34949] Dead code in empty destructors pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 31+ messages in thread
From: spark at gcc dot gnu dot org @ 2008-01-23 23:23 UTC (permalink / raw)
  To: gcc-bugs

# cat dead.cpp
class Foo
{
public:
  virtual ~Foo();
};

Foo::~Foo()
{
}
# g++ -O2 -S dead.cpp
# cat dead.cpp
...
.globl _ZN3FooD2Ev
        .type   _ZN3FooD2Ev, @function
_ZN3FooD2Ev:
.LFB3:
        pushl   %ebp
.LCFI0: 
        movl    %esp, %ebp
.LCFI1: 
        movl    8(%ebp), %eax
        movl    $_ZTV3Foo+8, (%eax)
        popl    %ebp
        ret
.LFE3:  
        .size   _ZN3FooD2Ev, .-_ZN3FooD2Ev
...


In this trivial case (which is actually quite common),
there's no need for the store to update the vtable pointer,
since there's nothing to do in this destructor.


-- 
           Summary: Dead code in trivial destructors.
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: spark at gcc dot gnu dot org


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


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

end of thread, other threads:[~2013-04-09 10:07 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-34949-4@http.gcc.gnu.org/bugzilla/>
2011-02-09 22:44 ` [Bug c++/34949] Dead code in empty destructors pinskia at gcc dot gnu.org
2011-09-01  8:13 ` congruwer at yahoo dot co.uk
2011-09-01  9:10 ` rguenth at gcc dot gnu.org
2011-09-01  9:33 ` jakub at gcc dot gnu.org
2013-03-26 15:14 ` jason at gcc dot gnu.org
2013-03-26 15:20 ` jason at gcc dot gnu.org
2013-03-28 14:07 ` jakub at gcc dot gnu.org
2013-03-28 14:09 ` jakub at gcc dot gnu.org
2013-03-28 16:11 ` paolo.carlini at oracle dot com
2013-03-28 23:58 ` paolo.carlini at oracle dot com
2013-04-02 21:11 ` jason at gcc dot gnu.org
2013-04-03  6:31 ` jakub at gcc dot gnu.org
2013-04-03  6:31 ` jakub at gcc dot gnu.org
2013-04-03  6:31 ` jakub at gcc dot gnu.org
2013-04-03  9:27 ` schwab@linux-m68k.org
2013-04-03  9:39 ` jakub at gcc dot gnu.org
2013-04-03 12:28 ` jakub at gcc dot gnu.org
2013-04-03 13:37 ` jason at gcc dot gnu.org
2013-04-04  7:18 ` izamyatin at gmail dot com
2013-04-04  7:32 ` jakub at gcc dot gnu.org
2013-04-04  8:25 ` jakub at gcc dot gnu.org
2013-04-04  9:20 ` jakub at gcc dot gnu.org
2013-04-04 12:52 ` jakub at gcc dot gnu.org
2013-04-08 13:50 ` jakub at gcc dot gnu.org
2013-04-09 10:07 ` dimhen at gmail dot com
2008-01-23 23:23 [Bug middle-end/34949] New: Dead code in trivial destructors spark at gcc dot gnu dot org
2008-01-23 23:24 ` [Bug c++/34949] Dead code in empty destructors pinskia at gcc dot gnu dot org
2008-01-24  0:13 ` spark at gcc dot gnu dot org
2008-01-24 11:03 ` rguenth at gcc dot gnu dot org
2008-01-24 18:57 ` spark at gcc dot gnu dot org
2008-01-24 18:58 ` pinskia at gcc dot gnu dot org
2009-06-09 10:18 ` 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).