[Bug c++/15853] New: temporaries are not destroyed and overwritten later
bugzilla at little-bat dot de
gcc-bugzilla@gcc.gnu.org
Sun Jun 6 18:43:00 GMT 2004
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
More information about the Gcc-bugs
mailing list