public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bugzilla at little-bat dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/15853] New: temporaries are not destroyed and overwritten later
Date: Sun, 06 Jun 2004 18:43:00 -0000	[thread overview]
Message-ID: <20040606184318.15853.bugzilla@little-bat.de> (raw)

when initialilizing static data, then temporaries which were required for
automatic type casting are not destroyed. later-on the stack/heap overwrites them. 

example source file can be found at
<http://k1.dyndns.org/Develop/projects/gcc-error>

test.cpp           example source file which reproduces the error
output-BUMMER.txt  output printed by test program when broken
output-OK.txt      output printed by test program when ok
a.out              FC2 i386 binary, hopefully the broken version B-)

used command line:
bash$  gcc -Wall -O2 -lstdc++ test.cpp        // fails
bash$  gcc -Wall     -lstdc++ test.cpp        // ok

see also short summary at start of source file.

the error only shows up under certain circumstances. e.g. in this case no "-O2"
is ok and when destructor and/or creator are inlined it seemed ok too. then the
destructor was called. see output printed by test program.

this bug report form has no file upload section, which i find very confusing.
just wanted to say that too.

           ... kio !

-- 
           Summary: temporaries are not destroyed and overwritten later
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bugzilla at little-bat dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: gcc-Version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
  GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux


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


             reply	other threads:[~2004-06-06 18:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-06 18:43 bugzilla at little-bat dot de [this message]
2004-06-06 18:54 ` [Bug rtl-optimization/15853] [3.3 Regression] " pinskia at gcc dot gnu dot org
2004-06-07 19:11 ` bugzilla at little-bat dot de
2004-06-11 22:21 ` pinskia at gcc dot gnu dot org
2004-09-28 13:44 ` gdr at gcc dot gnu dot org
2005-01-23 14:50 ` ebotcazou at gcc dot gnu dot org
2005-01-24  7:53 ` ebotcazou at gcc dot gnu dot org
2005-01-24 11:27 ` ebotcazou at gcc dot gnu dot org
2005-01-25 16:42 ` ebotcazou at gcc dot gnu dot org
2005-04-28  8:23 ` gdr at gcc dot gnu dot org
2005-04-30 13:44 ` gdr at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040606184318.15853.bugzilla@little-bat.de \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).