https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96025
--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:9db1287c8ced5425f6ef9d26b05a3eb9cbcc4b8d commit r10-11239-g9db1287c8ced5425f6ef9d26b05a3eb9cbcc4b8d Author: Harald Anlauf <anl...@gmx.de> Date: Mon Feb 20 21:28:09 2023 +0100 Fortran: improve checking of character length specification [PR96025] gcc/fortran/ChangeLog: PR fortran/96025 * parse.c (check_function_result_typed): Improve type check of specification expression for character length and return status. (parse_spec): Use status from above. * resolve.c (resolve_fntype): Prevent use of invalid specification expression for character length. gcc/testsuite/ChangeLog: PR fortran/96025 * gfortran.dg/pr96025.f90: New test. (cherry picked from commit 6c1b825b3d6499dfeacf7c79dcf4b56a393ac204)