aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/interface.c
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2009-01-06 23:03:18 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2009-01-06 23:03:18 +0000
commita9c5fe7e7219e1ec949e8c1b29ec7fc2e8bfd6cb (patch)
treed4c0900d662b965e1973a1c7b20c1b0d51692563 /gcc/fortran/interface.c
parentc10bf728da5d8039b517c9e91086c9f93a31a4e1 (diff)
downloadgcc-a9c5fe7e7219e1ec949e8c1b29ec7fc2e8bfd6cb.zip
gcc-a9c5fe7e7219e1ec949e8c1b29ec7fc2e8bfd6cb.tar.gz
gcc-a9c5fe7e7219e1ec949e8c1b29ec7fc2e8bfd6cb.tar.bz2
re PR fortran/38220 (C_LOC intrinsic non-pure and without explicit interface)
2009-01-06 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/38220 * interface.c (gfc_procedure_use): Don't warn about functions from ISO_C_BINDING. * symbol.c (generate_isocbinding_symbol): Mark c_loc and c_funloc as pure. 2009-01-06 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/38220 * gfortran.dg/c_loc_pure_1.f90: New test. From-SVN: r143140
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r--gcc/fortran/interface.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index f779dfa..d6ff240 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -2411,9 +2411,12 @@ void
gfc_procedure_use (gfc_symbol *sym, gfc_actual_arglist **ap, locus *where)
{
- /* Warn about calls with an implicit interface. */
+ /* Warn about calls with an implicit interface. Special case
+ for calling a ISO_C_BINDING becase c_loc and c_funloc
+ are pseudo-unknown. */
if (gfc_option.warn_implicit_interface
- && sym->attr.if_source == IFSRC_UNKNOWN)
+ && sym->attr.if_source == IFSRC_UNKNOWN
+ && ! sym->attr.is_iso_c)
gfc_warning ("Procedure '%s' called with an implicit interface at %L",
sym->name, where);