[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
Mon May 25 22:45:52 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91529
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:09831707ce65606f951c97632d882f083ad3ed02
commit r8-10273-g09831707ce65606f951c97632d882f083ad3ed02
Author: Jason Merrill <jason@redhat.com>
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 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