From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11375 invoked by alias); 30 Jan 2004 11:37:05 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 11357 invoked by uid 48); 30 Jan 2004 11:37:04 -0000 Date: Fri, 30 Jan 2004 11:37:00 -0000 From: "Mart dot Rentmeester at sci dot kun dot nl" To: gcc-bugs@gcc.gnu.org Message-ID: <20040130113700.13930.Mart.Rentmeester@sci.kun.nl> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug fortran/13930] New: derived type with intent(in) attribute not accepted X-Bugzilla-Reason: CC X-SW-Source: 2004-01/txt/msg03851.txt.bz2 List-Id: 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