diff options
author | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-08 09:08:13 +0000 |
---|---|---|
committer | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-08 09:08:13 +0000 |
commit | 9039f11314f957414e788f0488a67c4fae12fa44 (patch) | |
tree | 847c8a0d4b0bc94aa283129ae3a9a5e53fa4f2fc /gcc/fortran | |
parent | 5c83cd34ae6485989e4e7af16984c8ce61c2237f (diff) | |
download | gcc-9039f11314f957414e788f0488a67c4fae12fa44.tar.gz |
2009-05-08 Janus Weil <janus@gcc.gnu.org>
PR fortran/39876
* intrinsic.c (gfc_is_intrinsic): Do not add the EXTERNAL attribute if
the symbol is a module procedure.
2009-05-08 Janus Weil <janus@gcc.gnu.org>
PR fortran/39876
* gfortran.dg/intrinsic_3.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147279 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/intrinsic.c | 18 |
2 files changed, 17 insertions, 7 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index fc0a0494c97..83ad8cdbe5b 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2009-05-08 Janus Weil <janus@gcc.gnu.org> + + PR fortran/39876 + * intrinsic.c (gfc_is_intrinsic): Do not add the EXTERNAL attribute if + the symbol is a module procedure. + 2009-05-08 Tobias Burnus <burnus@net-b.de> * invoke.texi: Add do/recursion to the -fcheck= summary. diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index 7676fa221e5..ca125a36335 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -836,13 +836,17 @@ gfc_is_intrinsic (gfc_symbol* sym, int subroutine_flag, locus loc) /* See if this intrinsic is allowed in the current standard. */ if (gfc_check_intrinsic_standard (isym, &symstd, false, loc) == FAILURE) { - if (gfc_option.warn_intrinsics_std) - gfc_warning_now ("The intrinsic '%s' at %L is not included in the" - " selected standard but %s and '%s' will be treated as" - " if declared EXTERNAL. Use an appropriate -std=*" - " option or define -fall-intrinsics to allow this" - " intrinsic.", sym->name, &loc, symstd, sym->name); - sym->attr.external = 1; + if (sym->attr.proc == PROC_UNKNOWN) + { + if (gfc_option.warn_intrinsics_std) + gfc_warning_now ("The intrinsic '%s' at %L is not included in the" + " selected standard but %s and '%s' will be" + " treated as if declared EXTERNAL. Use an" + " appropriate -std=* option or define" + " -fall-intrinsics to allow this intrinsic.", + sym->name, &loc, symstd, sym->name); + gfc_add_external (&sym->attr, &loc); + } return false; } |