From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 319DD38930EE; Mon, 25 May 2020 22:38:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 319DD38930EE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1590446306; bh=vYUpPd+yxFTxNSobqdg/LnoashAt4wXEjZUAa0ty4bQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mUDP6HZwyxQQCsiJJ+ni4ipp6zPzzxuJfC2lbYJ9wXwiRf5TE2OMPsFJsQXCUTRmx BjSIJP2nZP1GF/aQkKGD3uX8jZqohijrvgdlgb2i+xlaPq4DhWiTSZ/ZIyH79m5y+B IYczKV+rK/5uiya4lySprDx8GfiPMW1s1eqnjbbw= 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:38:26 +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:38:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D91529 --- Comment #6 from CVS Commits --- The releases/gcc-9 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:f76202e096fc0be4db21761399b55f10cd09b20d commit r9-8621-gf76202e096fc0be4db21761399b55f10cd09b20d Author: Jason Merrill Date: Mon May 25 18:38:09 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.=