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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Target Milestone|---                         |9.5
   Last reconfirmed|                            |2021-08-23
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I can confirm the ICE on x86_64-linux using f951 built with -O0 -g.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000943abd in set_syms_host_assoc (sym=0x3225c70)
    at /home/rguenther/src/gcc-9-branch/gcc/fortran/parse.c:5949
5949    }
(gdb) bt
#0  0x0000000000943abd in set_syms_host_assoc (sym=0x3225c70)
    at /home/rguenther/src/gcc-9-branch/gcc/fortran/parse.c:5949
#1  0x3837363534333231 in ?? ()
#2  0x3635343332313039 in ?? ()
#3  0x003332315f393837 in ?? ()
#4  0x0000000003225f70 in ?? ()
#5  0x0000000003226110 in ?? ()
#6  0x0000000003226330 in ?? ()
#7  0x0000000003269920 in ?? ()
#8  0x0000000003226550 in ?? ()
#9  0x0000000003226770 in ?? ()
#10 0x00007fffffffd950 in ?? ()
#11 0x000000000099ac44 in do_traverse_symtree (

the cherry-pick seems to have patched the "wrong" function,
get_unique_hashed_string instead of get_unique_type_string which is mentioned
by the ChangeLog but not touched.  get_unique_type_string looks still broken
in this respect, and we run into

Breakpoint 5, get_unique_type_string (string=0x7fffffffd610 "@\302\031\003", 
    derived=0x320d8a0)
    at /home/rguenther/src/gcc-9-branch/gcc/fortran/class.c:483
492         sprintf (string, "%s_%s", derived->ns->proc_name->name, dt_name);
(gdb) ptype dt_name
type = char [64]
(gdb) p (int)strlen (derived->ns->proc_name->name)
$3 = 63
(gdb) p (int)strlen (dt_name)
$4 = 63

Reply via email to