]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Fix some minor PDT parse errors [PR95543,PR103748]
authorPaul Thomas <pault@gcc.gnu.org>
Sun, 12 Oct 2025 07:21:11 +0000 (08:21 +0100)
committerPaul Thomas <pault@gcc.gnu.org>
Sun, 12 Oct 2025 07:21:11 +0000 (08:21 +0100)
commit915fdb3bd9773b7c8afd180ffee6f0ecdc79fc04
tree6aa0842434629dfeeec39fb0eebb0663bc2599fa
parent767a93886a33a5719ce2027400567d97f6331b02
Fortran: Fix some minor PDT parse errors [PR95543,PR103748]

2025-10-12  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/95543
PR fortran/103748
* decl.cc (insert_parameter_exprs): Guard param->expr before
using it.
(gfc_get_pdt_instance): Substitute paramaters in kind default
initializers.
(gfc_match_decl_type_spec): Emit an error if a type paramter
specification list appears in a variable declaraion with a
non-parameterized type.
* primary.cc (gfc_match_rvalue): Emit an error if a type spec
list is empty.

gcc/testsuite/
PR fortran/95543
* gfortran.dg/pdt_17.f03: Change error message.
* gfortran.dg/pdt_57.f03: New test.

PR fortran/103748
* gfortran.dg/pdt_58.f03: New test.
gcc/fortran/decl.cc
gcc/fortran/primary.cc
gcc/testsuite/gfortran.dg/pdt_17.f03
gcc/testsuite/gfortran.dg/pdt_57.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pdt_58.f03 [new file with mode: 0644]