c++/9872: temporary destructor not called?
Sandor Kovacs
sandor@ctjapan.com
Fri Feb 28 01:54:00 GMT 2003
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
More information about the Gcc-bugs
mailing list