re PR fortran/48972 (OPEN with Unicode file name)
authorTobias Burnus <burnus@net-b.de>
Thu, 12 May 2011 17:40:29 +0000 (19:40 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Thu, 12 May 2011 17:40:29 +0000 (19:40 +0200)
2011-05-12  Tobias Burnus  <burnus@net-b.de>

        PR fortran/48972
        * resolve.c (resolve_intrinsic): Don't resolve module
        intrinsics multiple times.

2011-05-12  Tobias Burnus  <burnus@net-b.de>

        PR fortran/48972
        * gfortran.dg/iso_c_binding_compiler_3.f90: New.

From-SVN: r173708

gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/iso_c_binding_compiler_3.f90 [new file with mode: 0644]

index f2dfe3f43ad470c53bba6b7288a3bf394235d5b9..6a6fba08240939815895bc1dd5f5071096f47431 100644 (file)
@@ -1,3 +1,9 @@
+2011-05-12  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/48972
+       * resolve.c (resolve_intrinsic): Don't resolve module
+       intrinsics multiple times.
+
 2011-05-11  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/48889
index a19b10399d6c6cb2cd6ccdde87b5a2197df10f4d..3483bc77594b1914654b6dab2609344aebe36650 100644 (file)
@@ -1441,6 +1441,10 @@ resolve_intrinsic (gfc_symbol *sym, locus *loc)
   if (sym->formal)
     return SUCCESS;
 
+  /* Already resolved.  */
+  if (sym->from_intmod && sym->ts.type != BT_UNKNOWN)
+    return SUCCESS;
+
   /* We already know this one is an intrinsic, so we don't call
      gfc_is_intrinsic for full checking but rather use gfc_find_function and
      gfc_find_subroutine directly to check whether it is a function or
index f609bbaf2f0ab2fa2ce961a4c58cdaad530ad8d0..d7cb0bd8989fc61f7059510d0267231a269e44db 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-12  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/48972
+       * gfortran.dg/iso_c_binding_compiler_3.f90: New.
+
 2011-05-12  Jason Merrill  <jason@redhat.com>
 
        * g++.dg/cpp0x/constexpr-incomplete2.C: New.
diff --git a/gcc/testsuite/gfortran.dg/iso_c_binding_compiler_3.f90 b/gcc/testsuite/gfortran.dg/iso_c_binding_compiler_3.f90
new file mode 100644 (file)
index 0000000..d9f9dfd
--- /dev/null
@@ -0,0 +1,27 @@
+! { dg-do compile }
+! { dg-options "-Wall" }
+!
+! PR fortran/45823
+!
+! We used to warn about 
+!  "Type specified for intrinsic function" for this file
+!
+
+use iso_c_binding
+use iso_Fortran_env
+implicit none
+intrinsic sin
+real :: x = 3.4
+print *, sin(x), c_sizeof(c_int), compiler_options(), compiler_version()
+end
+
+
+module test_mod
+    use iso_fortran_env
+end module test_mod
+
+subroutine test
+use test_mod
+end subroutine test
+
+! { dg-final { cleanup-modules "test_mod" } }