All, The attached patch fixes several ICEs caused by invalid charlengths. The new testcase pr67805.f90 shows the kinds of issues the patch will detect. An appropriate error message is now issued.
Built and regression tested on x86_64-*-freebsd. OK to commit? 2015-10-23 Steven G. Kargl <ka...@gcc.gnu.org> PR fortran/67805 * array.c (gfc_match_array_constructor): Check for error from type spec matching. * decl.c (char_len_param_value): Check for valid of charlen parameter. Reap dead code dating to 2008. match.c (gfc_match_type_spec): Special case the keyword use in REAL. 2015-10-23 Steven G. Kargl <ka...@gcc.gnu.org> PR fortran/67805 * gfortran.dg/pr67805.f90: New testcase. * gfortran.dg/array_constructor_26.f03: Update testcase. * gfortran.dg/array_constructor_27.f03: Ditto. * gfortran.dg/char_type_len_2.f90: Ditto. * gfortran.dg/pr67802.f90: Ditto. * gfortran.dg/used_before_typed_3.f90: Ditto. -- Steve