aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/module.c10
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gfortran.dg/iso_fortran_env_6.f905
4 files changed, 20 insertions, 5 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 795eeb5..b63a6fd 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -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>
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 5c574bb..ac572c8 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -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 "
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 51cf82d..d46f375 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
diff --git a/gcc/testsuite/gfortran.dg/iso_fortran_env_6.f90 b/gcc/testsuite/gfortran.dg/iso_fortran_env_6.f90
index 951e138..0f5aedf 100644
--- a/gcc/testsuite/gfortran.dg/iso_fortran_env_6.f90
+++ b/gcc/testsuite/gfortran.dg/iso_fortran_env_6.f90
@@ -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