[Bug lto/91027] [10 regression] SEGV in hash_table<odr_name_hasher, false, xcallocator>::find_slot_with_hash
hubicka at ucw dot cz
gcc-bugzilla@gcc.gnu.org
Thu Jul 4 16:42:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91027
--- Comment #3 from Jan Hubicka <hubicka at ucw dot cz> ---
Hi,
this patch triggers another confusion in ipa-devirt.
It tries to build type inheritnace graph but since D frotnend produces
only functions with DECL_VIRTUAL but no BINFOs and other things it
segfaults eventually.
Working around it makes it to work. So this adds new question why D
frontend needs to set DECL_VIRTUAL?
Honza
Index: tree.c
===================================================================
--- tree.c (revision 273084)
+++ tree.c (working copy)
@@ -6140,6 +6142,11 @@ find_decls_types_in_var (varpool_node *v
void
assign_assembler_name_if_needed (tree t)
{
+ /* D frontend sets assembler name of TYPE_DECLs.
+ We later use them to maintain ODR infrmation for C++, but these
+ names are always computed by decl_assembler_name call below. */
+ if (TREE_CODE (t) == TYPE_DECL)
+ SET_DECL_ASSEMBLER_NAME (t, NULL);
if (need_assembler_name_p (t))
{
/* When setting DECL_ASSEMBLER_NAME, the C++ mangler may emit
More information about the Gcc-bugs
mailing list