Commit ad690d79 by Andrew Benson

Increase GFC_MAX_MANGLED_SYMBOL_LEN to handle submodule names.

        PR fortran/93461
        * trans.h: Increase GFC_MAX_MANGLED_SYMBOL_LEN to
        GFC_MAX_SYMBOL_LEN*3+5 to allow for inclusion of submodule name,
        plus the "." between module and submodule names.
        * gfortran.dg/pr93461.f90: New test.
parent a83b5cc5
2020-01-28 Andrew Benson <abensonca@gmail.com>
PR fortran/93461
* trans.h: Increase GFC_MAX_MANGLED_SYMBOL_LEN to
GFC_MAX_SYMBOL_LEN*3+5 to allow for inclusion of submodule name,
plus the "." between module and submodule names.
* gfortran.dg/pr93461.f90: New test.
2020-01-28 Andrew Benson <abensonca@gmail.com>
PR fortran/93473
* parse.c: Increase length of char variables to allow them to hold
a concatenated module + submodule name.
......
......@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see
#include "predict.h" /* For enum br_predictor and PRED_*. */
/* Mangled symbols take the form __module__name. */
#define GFC_MAX_MANGLED_SYMBOL_LEN (GFC_MAX_SYMBOL_LEN*2+4)
/* Mangled symbols take the form __module__name or __module.submodule__name. */
#define GFC_MAX_MANGLED_SYMBOL_LEN (GFC_MAX_SYMBOL_LEN*3+5)
/* Struct for holding a block of statements. It should be treated as an
opaque entity and not modified directly. This allows us to change the
......
! { dg-do compile }
! PR fortran/93461
module aModuleWithAnAllowedName
interface
module subroutine aShortName()
end subroutine aShortName
end interface
end module aModuleWithAnAllowedName
submodule (aModuleWithAnAllowedName) aSubmoduleWithAVeryVeryVeryLongButEntirelyLegalName
contains
subroutine aShortName()
call aSubroutineWithAVeryLongNameThatWillCauseAProblem()
call aSubroutineWithAVeryLongNameThatWillCauseAProblemAlso()
end subroutine aShortName
subroutine aSubroutineWithAVeryLongNameThatWillCauseAProblem()
end subroutine aSubroutineWithAVeryLongNameThatWillCauseAProblem
subroutine aSubroutineWithAVeryLongNameThatWillCauseAProblemAlso()
end subroutine aSubroutineWithAVeryLongNameThatWillCauseAProblemAlso
end submodule aSubmoduleWithAVeryVeryVeryLongButEntirelyLegalName
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