8sa1-gcc/gcc/testsuite/gfortran.dg/fmt_label_1.f90
Francois-Xavier Coudert a48ebf39c9 re PR fortran/34108 (ICE: Segmentation fault occurs by "write(*,0)" statement)
PR fortran/34108

        * io.c (check_format_string): Only check character expressions.
        (match_dt_format): Return MATCH_ERROR if that is what
        gfc_match_st_label said.

        * gfortran.dg/fmt_label_1.f90: New test.

From-SVN: r130249
2007-11-17 00:10:00 +00:00

9 lines
308 B
Fortran

! { dg-do compile }
!
! Check for diagnostics (PR 34108)
write (*,0) 'xxx' ! { dg-error "Statement label .* is zero" }
write (*,1) 'xxx' ! { dg-error "FORMAT label .* not defined" }
write (*,123456) 'xxx' ! { dg-error "Too many digits in statement label" }
write (*,-1) 'xxx' ! { dg-error "" }
end