https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60526
--- Comment #17 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- Author: tkoenig Date: Mon Aug 8 22:00:37 2016 New Revision: 239259 URL: https://gcc.gnu.org/viewcvs?rev=239259&root=gcc&view=rev Log: 2016-08-08 Thomas Koenig <tkoe...@gcc.gnu.org> Backport from trunk PR fortran/60526 * decl.c (build_sym): If the name has already been defined as a type, it has a symtree with an upper case letter at the beginning. If such a symtree exists, issue an error and exit. Don't do this if there is no corresponding upper case letter. 2016-08-08 Thomas Koenig <tkoe...@gcc.gnu.org> PR fortran/60526 * gfortran.dg/type_decl_4.f90: New test. Added: branches/gcc-5-branch/gcc/testsuite/gfortran.dg/type_decl_4.f90 Modified: branches/gcc-5-branch/gcc/fortran/ChangeLog branches/gcc-5-branch/gcc/fortran/decl.c branches/gcc-5-branch/gcc/testsuite/ChangeLog