From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 14A9D38930D8; Mon, 25 May 2020 22:05:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 14A9D38930D8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1590444359; bh=mkKPjHKGaCrJPl3C7YqsaYJX6wu7RgBSXHWAG8XguZY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fwAnbGTKiaJ2g+95FYR9zMYHIOWb+QW6Dhs/TJA1aQnsIX8hVlBfdv3ki9hhJo1cO D1yFTiFhEaLoNlDPKOlNboLc/1W9kw8KuFxxIqNI978gyqS41gbQ+W1dHQFPyXJK/v vSNHmORFbPT8Uc/hkgWTSUaSVQcYafz3V6HdaEeQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/91529] [8/9/10/11 Regression] -fmerge-all-constants leads to corrupt output without inlining Date: Mon, 25 May 2020 22:05:58 +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: 10.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 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: 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: Mon, 25 May 2020 22:05:59 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D91529 --- Comment #5 from CVS Commits --- The releases/gcc-10 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:01ff88c5619897198117b1a460d48774cfcdf396 commit r10-8181-g01ff88c5619897198117b1a460d48774cfcdf396 Author: Jason Merrill Date: Mon May 25 18:04:39 2020 -0400 c++: -fmerge-all-constants vs. destructors [PR91529] cp_finish_decl avoids setting TREE_READONLY on TREE_STATIC variables th= at have non-constant construction or destruction, but -fmerge-all-constants was converting an automatic variable to static while leaving TREE_READONLY = set. Fixed by clearing the flag in cp_finish_decl in the presence of -fmerge-all-constants. gcc/cp/ChangeLog 2020-05-01 Jason Merrill PR c++/91529 * decl.c (cp_finish_decl): Also clear TREE_READONLY if -fmerge-all-constants.=