public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61674] New: The destructor of a simple class is removed by optimization
@ 2014-07-02 14:58 A.Finch at lancaster dot ac.uk
  2014-07-02 15:03 ` [Bug c++/61674] " A.Finch at lancaster dot ac.uk
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: A.Finch at lancaster dot ac.uk @ 2014-07-02 14:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61674

            Bug ID: 61674
           Summary: The destructor of a simple class is removed by
                    optimization
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: A.Finch at lancaster dot ac.uk

Created attachment 33046
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33046&action=edit
Log of compilation

In a simple class (LocalGeometryLock) designed to provide a lock the destructor
appears to be removed by optimization. This can be prevented by either adding a
cout to the destructor or adding __attribute__((optimize("-O0"))) after the
destructor definition. This occurs in the code for a large project which it is
not practical to send. Unfortunately it has not proved possible to reproduce
the issue with a simple test program.


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

end of thread, other threads:[~2014-07-02 16:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-02 14:58 [Bug c++/61674] New: The destructor of a simple class is removed by optimization A.Finch at lancaster dot ac.uk
2014-07-02 15:03 ` [Bug c++/61674] " A.Finch at lancaster dot ac.uk
2014-07-02 15:07 ` A.Finch at lancaster dot ac.uk
2014-07-02 15:07 ` A.Finch at lancaster dot ac.uk
2014-07-02 15:09 ` A.Finch at lancaster dot ac.uk
2014-07-02 16:54 ` pangbw at gmail 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).