From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13006 invoked by alias); 2 Dec 2005 04:17:58 -0000 Received: (qmail 12986 invoked by uid 48); 2 Dec 2005 04:17:55 -0000 Date: Fri, 02 Dec 2005 04:17:00 -0000 Subject: [Bug fortran/25217] New: Derived type dummy argument having intent(out) attribute X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "sudeshc at noida dot hcltech dot com" 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 X-SW-Source: 2005-12/txt/msg00149.txt.bz2 List-Id: 1. There is a procedure (function/subroutine) call. A variable of derived type is passed as actual argument to this procedure. One of the components of derived type is default initialized. 2. Corresponding dummy argument has INTENT(OUT) attribute. When above two conditions are satisfied then according if dummy argument is accessed in procedure it should be default initialized. But this is NOT the behaviour of gfortran. e.g. consider following example program main type drv integer::a(10)=10 end type drv type (drv)::aa aa%a=100 ret=fun(aa) contains function fun(fa) type (drv),intent(out)::fa !---------(A) integer::fun print *,fa%a fun=fa%a(1) end function fun end Please see line marked (A). Here "fa" should be reinitialized to default value 10. But this is not happening in gfortran. -- Summary: Derived type dummy argument having intent(out) attribute Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sudeshc at noida dot hcltech dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25217