This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/9872: temporary destructor not called?
- From: Sandor Kovacs <sandor at ctjapan dot com>
- To: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
- Cc: gcc-bugs at gcc dot gnu dot org,<sakovacs at freemail dot hu>,<gcc-gnats at gcc dot gnu dot org>
- Date: Fri, 28 Feb 2003 01:54:43 +0000
- Subject: Re: c++/9872: temporary destructor not called?
- References: <Pine.LNX.4.44.0302271829280.1516-100000@gandalf.ticam.utexas.edu>
Ok, standalone, no library dependent test code is here: I've basically
stripped down the QT QString implementation.
Compile:
- to eat up memory:
g++ -c bug.cpp
g++ bug.o -o bug
- works properly:
g++ -fno-elide-constructors -c bug.cpp
g++ bug.o -o bug
Find .cpp, .ii, .s attached: bug.without-felide.s is the one which eats up
memory, the other one bug.with-felide.s is the properly working one.
If this is indeed a bug in gcc then if would explain why I have increasing
swap usage after running KDE for weeks, even thoug no app. is running. In
such cases I to restart KDE and swap usage disappeares. IF indeed it is a gcc
bug and SuSE compiled kde using gcc3.2...
Regards,
Sandor
> Sandor,
> I attached your preprocessed source. Thanks for sending them in.
> However...
>
> > If I've missed something or you need further info please let me know;
>
> ...yes, we are missing something:
> > gcc -L/usr/lib/qt3/lib -lqt-mt bug.o -o bug
>
> You are linking with libqt-mt.so. What we need is a _self-contained_
> testcase, i.e. something that we can test without additional libraries. If
> we don't have that, it is impossible to find out whether the problem is in
> the compiler itself, or in the code that is in the library that is being
> linked in.
>
> Please try to pack everything into one file, including the necessary .cpp
> files from qt, such that it can be compiled without linking together
> several .o or .so files.
>
> Thanks
> Wolfgang