From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 262333858416; Mon, 5 Jun 2023 21:25:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 262333858416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686000344; bh=mTQC6caLz+2H6dhS6zrA1Qs49NM+1f40GhgYQnJk0i4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=b8Sx6MJ4kyKZAikxcJ/eqj8N1WfXIqMMNJRGdTrClnY/ncxKHYCth0SG58NKWgYI+ BvSC4J0k9pkX2jtGCTu3U4Spb9M+fhGjbtS3rGM/18Pb8lf/K84v3zR8GIV74ZhY1+ jeUVdwZPO7VYmr99ZeI3wN9cS3qmr0LzIePZ4FvA= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/12245] [10/11/12/13/14 regression] Uses lots of memory when compiling large initialized arrays Date: Mon, 05 Jun 2023 21:25:41 +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: 3.3.1 X-Bugzilla-Keywords: memory-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D12245 --- Comment #83 from Andrew Pinski --- (In reply to Carlos Galvez from comment #82) > Hi, >=20 > This bug is still present in GCC 11.3.0. My use case is using large > std::arrays. NOTE: the problem immediately goes away if the arrays are not > initialized, but naturally we want to always initialize our variables to > prevent accessing uninitialized data: >=20 > -std::array data{}; > +std::array data; Note the C++ issue listed in comment #82 is a different issue and I think w= as improved for GCC 13.=