From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31042 invoked by alias); 10 May 2010 17:18:57 -0000 Received: (qmail 30975 invoked by uid 48); 10 May 2010 17:18:41 -0000 Date: Mon, 10 May 2010 17:18:00 -0000 Message-ID: <20100510171841.30974.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/44045] initialization of array of shared_ptr's with initializer list causes compiler segfault In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dougsemler at gmail dot com" 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-05/txt/msg01017.txt.bz2 ------- Comment #10 from dougsemler at gmail dot com 2010-05-10 17:18 ------- Well, is it really invalid code with -std=c++0x? The virutal destructor seems to be causing the issue. With gcc 4.4.3 (after changing virtual ~base() to virtual void func()): $ g++ gcc_bug.cc gcc_bug.cc: In function ‘int main()’: gcc_bug.cc:9: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x $ g++ gcc_bug.cc -std=c++0x $ So you can see that g++ sees this as valid code. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44045