c++/9872: temporary destructor not called?
Sandor Kovacs
sandor@ctjapan.com
Fri Feb 28 00:17:00 GMT 2003
(Hopefully now complete) bug report for " temporary destructor not called?"
(see
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9872)
Symptoms: simple test program eats up memory if not compiled with
-fno-elide-constructors. (simple program attached)
1) ouput of gcc -v:
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.2/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib
--enable-languages=c,c++,f77,objc,java,ada --enable-libgcj
--with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib
--with-system-zlib --enable-shared --enable-__cxa_atexit
i486-suse-linuxThread model: posixgcc version 3.2- the system type: suse 8.1;
uname -a:Linux dragon 2.4.20-ck2 #6 Tue Feb 4 08:44:23 JST 2003 i686 unknown
- the options given when GCC was configured/built: see above (using the gcc3.2
shipped with suse8.1)
- the complete command line that triggers the bug:
gcc -I/usr/lib/qt3/include -c bug.cpp
gcc -L/usr/lib/qt3/lib -lqt-mt bug.o -o bug
./bug
2) the compiler output (error messages, warnings, etc.): no compiler output
ie. no error/warning messages
3) the preprocessed file (*.i*) that triggers the bug, generated by adding
-save-temps... : gcc output: (see attachment for .ii file)
> gcc -v -save-temps -I/usr/lib/qt3/include -c bug.cpp
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.2/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib
--enable-languages=c,c++,f77,objc,java,ada --enable-libgcj
--with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib
--with-system-zlib --enable-shared --enable-__cxa_atexit
i486-suse-linuxThread model: posixgcc version 3.2
/usr/lib/gcc-lib/i486-suse-linux/3.2/cpp0 -lang-c++ -D__GNUG__=3
-D__DEPRECATED -D__EXCEPTIONS -v -I/usr/lib/qt3/include -D__GNUC__=3
-D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -D__ELF__
-Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__
-D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__
-D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386
-D__i386__ -D__tune_i486__ bug.cpp bug.iiGNU CPP version 3.2 (cpplib) (i386
Linux/ELF)#include "..." search starts here:#include <...> search starts
here: /usr/lib/qt3/include /usr/include/g++ /usr/include/g++/i486-suse-linux
/usr/include/g++/backward /usr/local/include
/usr/lib/gcc-lib/i486-suse-linux/3.2/include /usr/i486-suse-linux/include
/usr/includeEnd of search list. /usr/lib/gcc-lib/i486-suse-linux/3.2/cc1plus
-fpreprocessed bug.ii -quiet -dumpbase bug.cpp -version -o bug.sGNU CPP
version 3.2 (cpplib) (i386 Linux/ELF)GNU C++ version 3.2 (i486-suse-linux)
compiled by GNU C version 3.2.
/usr/lib/gcc-lib/i486-suse-linux/3.2/../../../../i486-suse-linux/bin/as -V
-Qy -o bug.o bug.sGNU assembler version 2.12.90.0.15 (i486-suse-linux) using
BFD version 2.12.90.0.15 20020717 (SuSE)
4)... you may want to post parts of it to point out assembly code you consider
to be wrong:
I attach the asm file as well, but have no idea which part of the code is
wrong
If I've missed something or you need further info please let me know;
Sandor
> Synopsis: temporary destructor not called?
>
> State-Changed-From-To: open->feedback
> State-Changed-By: bangerth
> State-Changed-When: Thu Feb 27 15:32:14 2003
> State-Changed-Why:
> We need the _preprocessed_ source to reproduce the problem.
> Please take a look at
> http://gcc.gnu.org/bugs.html
>
> Thanks
> Wolfgang
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&
>pr=9872
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.cpp
Type: text/x-c++src
Size: 261 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20030228/c4c62095/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.ii
Type: text/x-csrc
Size: 48767 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20030228/c4c62095/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.s
Type: application/octet-stream
Size: 5367 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20030228/c4c62095/attachment.obj>
More information about the Gcc-bugs
mailing list