public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15853] New: temporaries are not destroyed and overwritten later
@ 2004-06-06 18:43 bugzilla at little-bat dot de
  2004-06-06 18:54 ` [Bug rtl-optimization/15853] [3.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: bugzilla at little-bat dot de @ 2004-06-06 18:43 UTC (permalink / raw)
  To: gcc-bugs

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


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

end of thread, other threads:[~2005-04-30 13:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-06 18:43 [Bug c++/15853] New: temporaries are not destroyed and overwritten later bugzilla at little-bat dot de
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

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