https://gcc.gnu.org/g:c8450ff500a8956ec6b88596f5d544a50430df28
commit r16-5940-gc8450ff500a8956ec6b88596f5d544a50430df28 Author: Paul Thomas <[email protected]> Date: Sat Dec 6 12:58:30 2025 +0000 Fortran: [PDT] Verify problems with error recovery have gone [PR103414] 2025-12-06 Paul Thomas <[email protected]> gcc/testsuite PR fortran/103414 * gfortran.dg/pdt_76.f03: New test. Diff: --- gcc/testsuite/gfortran.dg/pdt_76.f03 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gcc/testsuite/gfortran.dg/pdt_76.f03 b/gcc/testsuite/gfortran.dg/pdt_76.f03 new file mode 100644 index 000000000000..22c0a3efa50d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pdt_76.f03 @@ -0,0 +1,21 @@ +! { dg-do compile } + +! Make sure that pr103414 is fixed. +! +! Contributed by Gerhard Steinmetz <[email protected]> +! +function p () + type t(n) + integer, kind :: n + character(n) :: c = '' + end type + type(t(3)) :: x = t(z'1') ! { dg-error "Expected an initialization expression" } +end + +function q () + type t(n) + integer, kind :: n + character(n) :: c = '' + end type + type(t(3)) :: x(1) = [t(z'1')] ! { dg-error "Syntax error in array constructor" } +end
