public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/16940] New: implicit none over-riding module declaration
@ 2004-08-09 14:31 paulthomas2 at wanadoo dot fr
  2004-08-19 15:37 ` [Bug fortran/16940] " tobi at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 14+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2004-08-09 14:31 UTC (permalink / raw)
  To: gcc-bugs

! note Max_Loc_Mod MUST be separated in bug6mod.f90 - another bug?
!
! The "implicit none" on line 20 causes (compiles and runs OK if deleted):
!
!  $ ../bin/gfortran bug6mod.f90 bug6.f90 -o test
!   In file bug6.f90:9
!  
!        N = Max_Loc (Unsorted)  ! Location of largest element
!                  1
!  Error: Symbol 'max_loc' at (1) has no IMPLICIT type
!   In file bug6.f90:14
!
!      use Sel_Sort_Mod
!                      1
!  Fatal Error: Can't open module file 'sel_sort_mod.mod' for reading at (1): No su
!  ch file or directory

  module Sel_Sort_Mod 
    use Max_Loc_Mod 
    implicit none 
  contains 
    recursive subroutine Selection_Sort (Unsorted)  
      real, intent (in out) :: Unsorted (:) 
      integer :: N
      N = Max_Loc (Unsorted)  ! Location of largest element 
      return 
    end subroutine Selection_Sort 
  end module Sel_Sort_Mod 
  program Variety 
    use Sel_Sort_Mod 
    implicit none 
    real :: Vector (2)
    Vector = (/1.0,2.0/) 
    call Selection_Sort (Vector) 
    stop 
  end program Variety 

!bug6mod.f90 *********

  module Max_Loc_Mod 
    implicit none 
    interface Max_Loc 
      module procedure I_Max_Loc, R_Max_Loc 
    end interface 
  contains 
    function I_Max_Loc (Vector) result(Ans)
      integer, intent (in), dimension(:) :: Vector 
      integer :: Ans 
      Ans = size(Vector)
      return 
    end function I_Max_Loc 
    function R_Max_Loc (Vector) result(Ans)
      real, intent (in), dimension(:) :: Vector 
      integer :: Ans
      Ans = size(Vector)
      return 
    end function R_Max_Loc 
  end module Max_Loc_Mod

-- 
           Summary: implicit none over-riding module declaration
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: paulthomas2 at wanadoo dot fr
                CC: bdavis at gcc dot gnu dot org,gcc-bugs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16940


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2005-07-22 19:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-09 14:31 [Bug fortran/16940] New: implicit none over-riding module declaration paulthomas2 at wanadoo dot fr
2004-08-19 15:37 ` [Bug fortran/16940] " tobi at gcc dot gnu dot org
2004-08-29 17:40 ` tobi at gcc dot gnu dot org
2004-08-29 18:44 ` paulthomas2 at wanadoo dot fr
2004-08-29 22:46 ` tobi at gcc dot gnu dot org
2004-08-30 11:06 ` tobi at gcc dot gnu dot org
2004-09-16 14:12 ` [Bug fortran/16940] Failure to perform host association correctly tobi at gcc dot gnu dot org
2004-09-23 17:56 ` tobi at gcc dot gnu dot org
2004-09-23 19:32   ` Toon Moene
2004-09-23 19:42     ` Tobias Schlüter
2004-09-23 19:43 ` tobi at gcc dot gnu dot org
2005-07-19 20:20 ` cvs-commit at gcc dot gnu dot org
2005-07-22 19:09 ` cvs-commit at gcc dot gnu dot org
2005-07-22 19:13 ` paulthomas2 at wanadoo dot fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).