From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A087C3857B90; Tue, 5 Jul 2022 13:07:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A087C3857B90 From: "carlosgalvezp at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/12245] [10/11/12/13 regression] Uses lots of memory when compiling large initialized arrays Date: Tue, 05 Jul 2022 13:07:40 +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: carlosgalvezp at gmail dot com 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: cc 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2022 13:07:41 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D12245 Carlos Galvez changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |carlosgalvezp at gmail dot= com --- Comment #82 from Carlos Galvez --- Hi, 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: -std::array data{}; +std::array data;=