OSDN Git Service

2010-04-08 Tobias Burnus <burnus@net-b.de>
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Apr 2010 14:44:37 +0000 (14:44 +0000)
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Apr 2010 14:44:37 +0000 (14:44 +0000)
        * module.c (use_iso_fortran_env_module): Fix standard check.

2010-04-08  Tobias Burnus  <burnus@net-b.de>

        * gfortran.dg/iso_fortran_env_6.f90: Add more checks.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158129 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/module.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/iso_fortran_env_6.f90

index 795eeb5..b63a6fd 100644 (file)
@@ -1,3 +1,7 @@
+2010-04-08  Tobias Burnus  <burnus@net-b.de>
+
+       * module.c (use_iso_fortran_env_module): Fix standard check.
+
 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
 
        * parse.c (parse_derived, parse_enum): Avoid set but not used
@@ -7,7 +11,7 @@
 
        PR fortran/40539
        * gfortran.texi: Add section about representation of
-        LOGICAL variables.
+       LOGICAL variables.
 
 2010-04-07  Simon Baldwin  <simonb@google.com>
 
index 5c574bb..ac572c8 100644 (file)
@@ -5431,9 +5431,6 @@ 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)
@@ -5444,6 +5441,13 @@ use_iso_fortran_env_module (void)
                }
            }
 
+         if (u && gfc_notify_std (symbol[i].standard, "The symbol '%s', "
+                                  "referrenced at %C, is not in the selected "
+                                  "standard", symbol[i].name) == FAILURE)
+           continue;
+         else if ((gfc_option.allow_std & symbol[i].standard) == 0)
+           continue;
+
          if ((gfc_option.flag_default_integer || gfc_option.flag_default_real)
              && symbol[i].id == ISOFORTRANENV_NUMERIC_STORAGE_SIZE)
            gfc_warning_now ("Use of the NUMERIC_STORAGE_SIZE named constant "
index 51cf82d..d46f375 100644 (file)
@@ -1,3 +1,7 @@
+2010-04-08  Tobias Burnus  <burnus@net-b.de>
+
+       * gfortran.dg/iso_fortran_env_6.f90: Add more checks.
+
 2010-04-08  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/43679
index 951e138..0f5aedf 100644 (file)
@@ -10,6 +10,8 @@ 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" }
@@ -18,6 +20,7 @@ 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
@@ -28,6 +31,6 @@ implicit none
 end module m2
 
 module m3
-USE iso_fortran_env, foo => IOSTAT_INQUIRE_INTERNAL_UNIT ! { dg-error "not found" }
+USE iso_fortran_env, foo => IOSTAT_INQUIRE_INTERNAL_UNIT ! { dg-error "not in the selected standard" }
 implicit none
 end module m3