https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95090
--- Comment #6 from anlauf at gcc dot gnu.org ---
(In reply to Manfred Schwarb from comment #5)
> gdb shows:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xf7aa5162 in __strlen_sse2_bsf () from /lib/libc.so.6
> #0 0xf7aa5162 in __strlen_sse2_bsf () from /lib/libc.so.6
> #1 0x083e6def in get_unique_hashed_string(char*, gfc_symbol*) ()
Can you please try the following patch for me?
diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c
index 9aa3eb7282c..065cd691a73 100644
--- a/gcc/fortran/class.c
+++ b/gcc/fortran/class.c
@@ -501,7 +501,8 @@ get_unique_type_string (char *string, gfc_symbol *derived)
static void
get_unique_hashed_string (char *string, gfc_symbol *derived)
{
- char tmp[2*GFC_MAX_SYMBOL_LEN+2];
+ /* Provide sufficient space to hold "symbol_Pdtsymbol". */
+ char tmp[2*GFC_MAX_SYMBOL_LEN+5];
get_unique_type_string (&tmp[0], derived);
/* If string is too long, use hash value in hex representation (allow for
extra decoration, cf. gfc_build_class_symbol & gfc_find_derived_vtab).
Thanks.