https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103898
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2022-01-03 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Reduced testcase: Module g Integer, Parameter, Public :: i4b = Selected_int_kind(9) contains function size_i_1(array, dim) result (mysize) integer(i4b), dimension(:), intent(in) :: array integer(i4b), optional, intent(in) :: dim if (present(dim)) then mysize = size(array, dim=dim) endif end function size_i_1 end module