Commit 905aaaa6 by Harald Anlauf

PR fortran/95688 - ICE in gfc_get_string, at fortran/iresolve.c:70

With submodules, name mangling of character pointer declarations produces long
internal symbols that overflowed a static internal buffer.  Adjust the buffer
size.

gcc/fortran/
	PR fortran/95688
	* iresolve.c (gfc_get_string): Enlarge static buffer size.

(cherry picked from commit cd6546ac0e8fb2f4ff2a4bb2db2363ca02bdb7ba)
parent f067cc55
...@@ -47,8 +47,8 @@ along with GCC; see the file COPYING3. If not see ...@@ -47,8 +47,8 @@ along with GCC; see the file COPYING3. If not see
const char * const char *
gfc_get_string (const char *format, ...) gfc_get_string (const char *format, ...)
{ {
/* Provide sufficient space to hold "_F.caf_token__symbol_MOD_symbol". */ /* Provide sufficient space to hold "_F.symbol.symbol_MOD_symbol". */
char temp_name[14 + GFC_MAX_SYMBOL_LEN + 5 + GFC_MAX_SYMBOL_LEN + 1]; char temp_name[4 + 2*GFC_MAX_SYMBOL_LEN + 5 + GFC_MAX_SYMBOL_LEN + 1];
const char *str; const char *str;
va_list ap; va_list ap;
tree ident; tree ident;
......
! { dg-do compile }
! { dg-options "-fsecond-underscore" }
! PR fortran/95688 - ICE in gfc_get_string, at fortran/iresolve.c:70
module m2345678901234567890123456789012345678901234567890123456789_123
interface
module subroutine s2345678901234567890123456789012345678901234567890123456789_123
end
end interface
end
submodule(m2345678901234567890123456789012345678901234567890123456789_123) &
n2345678901234567890123456789012345678901234567890123456789_123
character(:), pointer :: &
x2345678901234567890123456789012345678901234567890123456789_123 => null()
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment