public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/13930] New: derived type with intent(in) attribute not accepted
@ 2004-01-30 11:37 Mart dot Rentmeester at sci dot kun dot nl
  2004-01-30 12:41 ` [Bug fortran/13930] [gfortran] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Mart dot Rentmeester at sci dot kun dot nl @ 2004-01-30 11:37 UTC (permalink / raw)
  To: gcc-bugs

The following program fails to compile: the compiler generates
an error. It is however a compiler error, and not one in the 
program as it says.     




> gfortran -c x.f95
 In file x.f95:25

function f1(f)
            1
Error: Can't assign to INTENT(IN) variable 'f' at (1)





module gd

integer :: i = 0

type t
    private
    integer  :: i = 0
end type

contains

!*******************************************************************************
function f2(f)

implicit none
integer, intent(in)  :: f
integer              :: f2
integer, external    :: external_f

f2 = external_f(f)

end function f2
!*******************************************************************************
function f1(f)

implicit none
type(t), intent(in)  :: f
integer              :: f1
integer, external    :: external_f

f1 = external_f(f%i)

end function f1
!*******************************************************************************
end module gd

-- 
           Summary: derived type with intent(in) attribute not accepted
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Mart dot Rentmeester at sci dot kun dot nl
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2004-05-18  0:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-30 11:37 [Bug fortran/13930] New: derived type with intent(in) attribute not accepted Mart dot Rentmeester at sci dot kun dot nl
2004-01-30 12:41 ` [Bug fortran/13930] [gfortran] " pinskia at gcc dot gnu dot org
2004-02-06  1:23 ` pinskia at gcc dot gnu dot org
2004-04-22 13:06 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-05-17  4:37 ` tobi at gcc dot gnu dot org
2004-05-18 15:48 ` cvs-commit at gcc dot gnu dot org
2004-05-18 15:54 ` pbrook at gcc dot gnu dot org

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).