https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79652
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- pushdecl_maybe_friend_1 with x == t does: 1035 if (!(TREE_CODE (x) == TYPE_DECL && DECL_ARTIFICIAL (x) 1036 && t != NULL_TREE) 1037 && (TREE_CODE (x) == TYPE_DECL 1038 || VAR_P (x) 1039 || TREE_CODE (x) == NAMESPACE_DECL 1040 || TREE_CODE (x) == CONST_DECL 1041 || TREE_CODE (x) == TEMPLATE_DECL)) 1042 SET_IDENTIFIER_NAMESPACE_VALUE (name, x); and in that SET_IDENTIFIER_NAMESPACE_VALUE ggc_frees x: #1 0x0000000000b22925 in ggc_free (p=0x7ffff7ff5f30) at ../../gcc/ggc-page.c:1612 #2 0x00000000007a34b6 in duplicate_decls (newdecl=<error reading variable: Cannot access memory at address 0x65766f6d5f646e61>, olddecl=<var_decl 0x7ffff7ff5ea0 x>, newdecl_is_friend=false) at ../../gcc/cp/decl.c:2776 #3 0x0000000000a1d234 in supplement_binding_1 (binding=0x7fffefc4f0a0, decl=<error reading variable: Cannot access memory at address 0x65766f6d5f646e61>) at ../../gcc/cp/name-lookup.c:571 #4 0x0000000000a1d65d in supplement_binding (binding=0x7fffefc4f0a0, decl=<error reading variable: Cannot access memory at address 0x65766f6d5f646e61>) at ../../gcc/cp/name-lookup.c:626 #5 0x0000000000a29546 in set_namespace_binding_1 (name=<identifier_node 0x7fffefc499c0 x>, scope=<namespace_decl 0x7fffefc4a260>, val=<error reading variable: Cannot access memory at address 0x65766f6d5f646e61>) at ../../gcc/cp/name-lookup.c:3533 #6 0x0000000000a29581 in set_namespace_binding (name=<identifier_node 0x7fffefc499c0 x>, scope=<namespace_decl 0x7fffefc4a260>, val=<error reading variable: Cannot access memory at address 0x65766f6d5f646e61>) at ../../gcc/cp/name-lookup.c:3542 #7 0x0000000000a20256 in pushdecl_maybe_friend_1 (x=<error reading variable: Cannot access memory at address 0x65766f6d5f646e61>, is_friend=false) at ../../gcc/cp/name-lookup.c:1042 #8 0x0000000000a21dee in pushdecl_maybe_friend (x=<error reading variable: Cannot access memory at address 0x65766f6d5f646e61>, is_friend=false) at ../../gcc/cp/name-lookup.c:1352 #9 0x0000000000a21e25 in pushdecl (x=<error reading variable: Cannot access memory at address 0x65766f6d5f646e61>) at ../../gcc/cp/name-lookup.c:1362 #10 0x0000000000a22033 in maybe_push_decl (decl=<error reading variable: Cannot access memory at address 0x65766f6d5f646e61>) at ../../gcc/cp/name-lookup.c:1391