This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/70297] [5/6 Regression] GCC Segfaults when using -g3


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70297

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|debug                       |c

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
So duplicate_decls ggc_free()s newdecl which is still used as TYPE_NAME.

#1  0x000000000075a2fe in duplicate_decls (
    newdecl=<type_decl 0x7ffff68abda8 target_ulong>, 
    olddecl=<type_decl 0x7ffff68abd10 target_ulong>)
    at /space/rguenther/src/svn/trunk3/gcc/c/c-decl.c:2731
2731      ggc_free (newdecl);
(gdb) p olddecl->typed.type
$13 = <integer_type 0x7ffff698b540 target_ulong>
(gdb) p olddecl->typed.type->type_common.name
$14 = <type_decl 0x7ffff68abda8 target_ulong>
(gdb) p newdecl
$15 = <type_decl 0x7ffff68abda8 target_ulong>


C frontend issue.  merge_decls copies everything from new to old, including
type which can self-reference new.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]