https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67524
--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Here, all variables are declared explicitly, but using "implicit character" ... $ cat z1_imchfe.f90 module m implicit character(8) (a-z) contains function f(x) integer :: x integer :: f real :: e f = x return entry e(x) e = x end end module program p use m print *, f(1) print *, e(1) end or this variation ... $ cat z2_imchfe.f90 module m implicit none contains function f(x) implicit character(8) (a-z) integer :: x integer :: f real :: e f = x return entry e(x) e = x end end module program p use m print *, f(1) print *, e(1) end yields : (with gfortran 5.2.1 on SUSE Linux 13.2) $ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize z1_imchfe.f90 internal compiler error: in build_entry_thunks, at fortran/trans-decl.c:2607