https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113245
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:0056458550ba6df0a339589736729be8b886790a commit r14-7008-g0056458550ba6df0a339589736729be8b886790a Author: Harald Anlauf <anl...@gmx.de> Date: Sun Jan 7 22:24:25 2024 +0100 Fortran: SIZE optional DIM argument having OPTIONAL+VALUE attributes [PR113245] gcc/fortran/ChangeLog: PR fortran/113245 * trans-intrinsic.cc (gfc_conv_intrinsic_size): Use gfc_conv_expr_present() for proper check of optional DIM argument. gcc/testsuite/ChangeLog: PR fortran/113245 * gfortran.dg/size_optional_dim_2.f90: New test.