https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93733

--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
The problem is deeper than expected. Consider

! { dg-options "-std=f2008" }
program g0d_ilc
character(4) :: fmt="(g0)"
character(6) :: fmt2="(g0.2)"
!F2008:
    write(*, fmt)  23
    write(*, fmt)  .true.
    write(*, fmt)  'hello'
!F2018:
    write(*, fmt2)  -23     ! { dg-error "Fortran 2018: .G0.d. in format" }
    write(*, fmt2)  .true.  ! { dg-error "Fortran 2018: .G0.d. in format" }
    write(*, fmt2)  'hello' ! { dg-error "Fortran 2018: .G0.d. in format" }
end

The test compiled with -std=f95 should give a run time error, but does not.

Reply via email to