From 44956e822fc9102a6e36cede143494a2bee4ff3b Mon Sep 17 00:00:00 2001 From: burnus Date: Tue, 6 Apr 2010 17:58:50 +0000 Subject: [PATCH] 2010-04-06 Tobias Burnus PR fortran/18918 * iso-fortran-env.def: Add the integer parameters * atomic_int_kind, atomic_logical_kind, iostat_inquire_internal_unit, stat_locked, stat_locked_other_image, stat_stopped_image and stat_unlocked of Fortran 2008. * intrinsic.texi (iso_fortran_env): Ditto. * libgfortran.h (libgfortran_stat_codes): New enum. * module.c (use_iso_fortran_env_module): Honour -std= when * loading constants from the intrinsic module. 2010-04-06 Tobias Burnus PR fortran/18918 * gfortran.dg/iso_fortran_env_5.f90: New test. * gfortran.dg/iso_fortran_env_6.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158011 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 12 ++++++++++++ gcc/fortran/module.c | 3 +++ gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gfortran.dg/iso_fortran_env_6.f90 | 5 +---- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 8af36683afa..f68a6cafdd9 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,17 @@ 2010-04-06 Tobias Burnus + PR fortran/18918 + * iso-fortran-env.def: Add the integer parameters atomic_int_kind, + atomic_logical_kind, iostat_inquire_internal_unit, stat_locked, + stat_locked_other_image, stat_stopped_image and stat_unlocked of + Fortran 2008. + * intrinsic.texi (iso_fortran_env): Ditto. + * libgfortran.h (libgfortran_stat_codes): New enum. + * module.c (use_iso_fortran_env_module): Honour -std= when loading + constants from the intrinsic module. + +2010-04-06 Tobias Burnus + PR fortran/39997 * intrinsic.c (add_functions): Add num_images. * decl.c (gfc_match_end): Handle END CRITICAL. diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index a419d6bdd04..20e4836a8c2 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -5437,6 +5437,9 @@ use_iso_fortran_env_module (void) { local_name = NULL; + if ((gfc_option.allow_std & symbol[i].standard) == 0) + break; + for (u = gfc_rename_list; u; u = u->next) { if (strcmp (symbol[i].name, u->use_name) == 0) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 35fd733a30b..7faa70eee5a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2010-04-06 Tobias Burnus + PR fortran/18918 + * gfortran.dg/iso_fortran_env_5.f90: New test. + * gfortran.dg/iso_fortran_env_6.f90: New test. + +2010-04-06 Tobias Burnus + PR fortran/39997 * gfortran.dg/coarray_1.f90: New test. * gfortran.dg/coarray_2.f90: New test. diff --git a/gcc/testsuite/gfortran.dg/iso_fortran_env_6.f90 b/gcc/testsuite/gfortran.dg/iso_fortran_env_6.f90 index 0f5aedf0b36..951e1384f94 100644 --- a/gcc/testsuite/gfortran.dg/iso_fortran_env_6.f90 +++ b/gcc/testsuite/gfortran.dg/iso_fortran_env_6.f90 @@ -10,8 +10,6 @@ implicit none integer(kind=ATOMIC_INT_KIND) :: atomic_int ! { dg-error "has no IMPLICIT type" } logical(kind=ATOMIC_LOGICAL_KIND) :: atomic_bool ! { dg-error "has no IMPLICIT type" } -print *, OUTPUT_UNIT - if (IOSTAT_INQUIRE_INTERNAL_UNIT <= 0) call abort() ! { dg-error "has no IMPLICIT type" } print *,STAT_STOPPED_IMAGE ! { dg-error "has no IMPLICIT type" } print *, STAT_LOCKED_OTHER_IMAGE ! { dg-error "has no IMPLICIT type" } @@ -20,7 +18,6 @@ print *, STAT_UNLOCKED ! { dg-error "has no IMPLICIT type" } end module m -USE iso_fortran_env, only: INPUT_UNIT USE iso_fortran_env, only: ATOMIC_INT_KIND ! { dg-error "is not in the selected standard" } implicit none end module m @@ -31,6 +28,6 @@ implicit none end module m2 module m3 -USE iso_fortran_env, foo => IOSTAT_INQUIRE_INTERNAL_UNIT ! { dg-error "not in the selected standard" } +USE iso_fortran_env, foo => IOSTAT_INQUIRE_INTERNAL_UNIT ! { dg-error "not found" } implicit none end module m3 -- 2.11.0