[Bug fortran/93461] Bogus "symbol is already defined" with long subroutine names in submodule
abensonca at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Jan 27 21:01:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93461
--- Comment #2 from Andrew Benson <abensonca at gmail dot com> ---
The problem occurs because GFC_MAX_MANGLED_SYMBOL_LEN is set to
GFC_MAX_SYMBOL_LEN*2+4, which is sufficient for a module name plus function
name
(plus the additional "_"'s that get prepended), but insufficient if a submodule
name is included. The name then gets truncated and can lead to two different
functions having the same (truncated) symbol name.
The fix is to increase this length to GFC_MAX_SYMBOL_LEN*3+5 - which allows for
the submodule name plus the "." added between module and submodule names.
Patch attached.
More information about the Gcc-bugs
mailing list