[Bug c++/91529] [8/9/10/11 Regression] -fmerge-all-constants leads to corrupt output without inlining
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri May 1 17:59:10 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91529
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:a2f32550a085984fbaaec962bf7723514ac71dff
commit r11-16-ga2f32550a085984fbaaec962bf7723514ac71dff
Author: Jason Merrill <jason@redhat.com>
Date: Fri May 1 13:53:32 2020 -0400
c++: -fmerge-all-constants vs. destructors [PR91529]
cp_finish_decl avoids setting TREE_READONLY on TREE_STATIC variables that
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 <jason@redhat.com>
PR c++/91529
* decl.c (cp_finish_decl): Also clear TREE_READONLY if
-fmerge-all-constants.
More information about the Gcc-bugs
mailing list