From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20348 invoked by alias); 13 Aug 2011 13:08:19 -0000 Received: (qmail 20197 invoked by uid 22791); 13 Aug 2011 13:08:18 -0000 X-SWARE-Spam-Status: No, hits=-2.9 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, 13 Aug 2011 13:08:00 +0000 From: "z0sh at sogetthis dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/50075] New: ICE related to parameter deduction and initializer_list Date: Sat, 13 Aug 2011 13:46:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: z0sh at sogetthis 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: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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-08/txt/msg01239.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50075 Bug #: 50075 Summary: ICE related to parameter deduction and initializer_list Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: z0sh@sogetthis.com Host: x86 Target: x86 [Please rephrase the title with something more appropriate, I don't know how to pin this down.] I was trying to deduce the size parameter of an std::array from the size of an initializer list. The following code is probably not correct, but in any event, it causes GCC 4.6.1 with -std=c++0x to crash: #include #include template std::array make_array_helper(const std::initializer_list & il) { return std::array(il); } template auto make_array(const std::initializer_list & il) -> decltype(make_array(il)) { return make_array_helper(il); } int main() { auto z = make_array({{1,2}}); }