From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30410 invoked by alias); 14 Mar 2010 13:55:46 -0000 Received: (qmail 30382 invoked by uid 48); 14 Mar 2010 13:55:33 -0000 Date: Sun, 14 Mar 2010 13:55:00 -0000 Subject: [Bug c++/43365] New: [4.5 Regression] Destructor not called when returning in exception handler X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "erik at ejohansson dot se" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg01298.txt.bz2 When returning from a function in an exception handler, the destructor for objects local to the function is never called. The attached program returns 0 (as expected) when compiled with: gcc version 4.4.3 (Debian 4.4.3-3) The same program returns 1 when compiled with: gcc version 4.5.0 20100310 (experimental) [trunk revision 157334] (Debian 20100310-1) Configured with: ../src/configure -v --with-pkgversion='Debian 20100310-1' --with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs --enable-languages=c,ada,c++,java,fortran,objc,obj-c++ --prefix=/usr/lib/gcc-snapshot --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --disable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.5-snap/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.5-snap --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.5-snap --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --with-arch-32=i486 --with-tune=generic --disable-werror --enable-checking=yes --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu -- Summary: [4.5 Regression] Destructor not called when returning in exception handler Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: erik at ejohansson dot se GCC build triplet: x86_64-linux-gnu GCC host triplet: x86_64-linux-gnu GCC target triplet: x86_64-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43365