From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12865 invoked by alias); 11 Jun 2011 13:47:05 -0000 Received: (qmail 12855 invoked by uid 22791); 11 Jun 2011 13:47:04 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 11 Jun 2011 13:46:50 +0000 From: "schaub.johannes at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/49372] Temporaries evaluated for arguments of a default constructors of array elements not destructed properly (?) X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: schaub.johannes at googlemail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sat, 11 Jun 2011 13:47:00 -0000 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: 2011-06/txt/msg00948.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49372 --- Comment #1 from Johannes Schaub 2011-06-11 13:46:46 UTC --- To elaborate on it, I have the following weird behavior: - GCC4.6 outputs nothing for the program (on my linux machine). That seems definitely wrong in any case. - GCC4.7 "4.7.0 20110517 (experimental)", using a mingw nightly build, generates an executable that crashes when running: [js@HOST2 cpp]$ ~/w64/bin/i686-w64-mingw32-g++ -std=c++0x -O1 -o a.exe main1.cpp [js@HOST2 cpp]$ wine ./a.exe Cwine: Unhandled page fault on read access to 0x00000000 at address (nil) (thread 0025), starting debugger... - The same GCC4.7 when using -O2 does not crash and print "CCDD": [js@HOST2 cpp]$ ~/w64/bin/i686-w64-mingw32-g++ -std=c++0x -O2 -o a.exe main1.cpp [js@HOST2 cpp]$ wine ./a.exe fixme:ntoskrnl:KeInitializeSpinLock stub: 0x5477a4 C C D D I don't know precisely whether this is a problem with wine or a temporary problem with that nightly build of GCC I was using. My apologies if GCC trunk works differently!