This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15853] New: temporaries are not destroyed and overwritten later
- From: "bugzilla at little-bat dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jun 2004 18:43:20 -0000
- Subject: [Bug c++/15853] New: temporaries are not destroyed and overwritten later
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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