This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PR middle-end/51411: handle transaction_safe virtual inlined methods
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>, Jason Merrill <jason at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 13 Dec 2011 14:41:01 -0600
- Subject: PR middle-end/51411: handle transaction_safe virtual inlined methods
IPA's function_and_variable_visibility is dying, because for a C++
virtual inlined TM clone, we have zapped the DECL_EXTERNAL and
TREE_PUBLIC bits while building the clone in ipa_tm_create_version.
The assert fails here in function_and_variable_visibility():
gcc_assert ((!DECL_WEAK (node->decl) && !DECL_COMDAT (node->decl))
|| TREE_PUBLIC (node->decl) || DECL_EXTERNAL
(node->decl));
The TM clone is marked weak as the original decl was weak, but it is no
longer external or public. I suggested to just clear the DECL_WEAK bit
on the clone, but Jason mentioned that unsetting DECL_EXTERNAL is more
optimal-- so that the clone can still be public and comdat.
No regressions. PR fixed.
OK?
Attachment:
curr
Description: Text document