I don't fully understand why having IOSTAT_END/EOR of the module ISO_Fortran_ENV is not enough, but is_iostat_end and is_iostat_eor intrinsics belong to the Fortran 2003 standard. Test case: ! { dg-do run } ! Test for the Fortran 2003 intrinsics is_iostat_end & is_iostat_eor ! program test_f2003 use iso_Fortran_env implicit none if(.not.is_iostat_end(IOSTAT_END).or.is_iostat_end(0)) call abort() if(.not.is_iostat_eor(IOSTAT_EOR).or.is_iostat_end(0)) call abort() end program test_f2003
Created attachment 14072 [details] Diff for invoke.text (only)
I wasn't even aware of their existence! I'll do it (unless you want to?), thanks for the doc patch.
> I wasn't even aware of their existence! Me neither. I found it in the NAG f95 release notes. > I'll do it (unless you want to?), thanks for the doc patch. Go ahead.
Subject: Bug 33105 Author: fxcoudert Date: Wed Aug 29 15:16:00 2007 New Revision: 127903 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127903 Log: PR fortran/33105 * intrinsic.c (add_functions): Add IS_IOSTAT_END and IS_IOSTAT_EOR intrinsics. * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_IOSTAT_END and GFC_ISYM_IS_IOSTAT_EOR. * trans-intrinsic.c (gfc_conv_has_intvalue): New function. (gfc_conv_intrinsic_function): Call gfc_conv_has_intvalue for GFC_ISYM_IS_IOSTAT_END and GFC_ISYM_IS_IOSTAT_EOR. * intrinsic.texi: Add IS_IOSTAT_END and IS_IOSTAT_EOR. * gfortran.dg/is_iostat_end_eor_1.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/is_iostat_end_eor_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/gfortran.h trunk/gcc/fortran/intrinsic.c trunk/gcc/fortran/intrinsic.texi trunk/gcc/fortran/trans-intrinsic.c trunk/gcc/testsuite/ChangeLog
Fixed.