[Bug fortran/25686] New: Accepts invalid Fortran 95 (different argument types)

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jan 6 04:41:00 GMT 2006


Testcase from:
http://gcc.gnu.org/ml/fortran/2005-07/msg00286.html
subroutine a(p)
  type t
    integer :: t1
  end type
  type(t) :: p
  p%t1 = 42
end subroutine
subroutine b
  type u
    integer :: u1
  end type
  type (u) :: q
  call a(q)
  print *, q%u1
end subroutine
-------
Paul says this is valid Fortran code but Lahey's Fortran 95 front-end gives an
error:
  2603-S: "SOURCE.F90", line 13: Argument number '1' type of procedure 'a'
shall be the same between definition and reference. The previous appearance is
in 'line 1'.


This is important as this would help us not worry about the aliasing/getting
the type incorrect for inlining.


-- 
           Summary: Accepts invalid Fortran 95 (different argument types)
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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




More information about the Gcc-bugs mailing list