From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54361 invoked by alias); 25 Mar 2015 14:56:53 -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 Received: (qmail 53956 invoked by uid 48); 25 Mar 2015 14:56:49 -0000 From: "maltsevm at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/65154] [4.8/4.9/5 Regression] ICE with {} initialized array with string Date: Wed, 25 Mar 2015 15:39:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: maltsevm at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg02759.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65154 --- Comment #5 from Mikhail Maltsev --- I have posted a patch for this bug: https://gcc.gnu.org/ml/gcc-patches/2015-03/msg00026.html But it reveals some latent bug (PR65503). In the following case (after applying the patch): struct ss { ss() {}; }; struct C { ss s[1000]; }; int main() { C cs[5]{}; } We'll get 1000 calls to ss() in main instead of calling default c-tor of struct C. (which is probably not what we want).