public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/25217]  New: Derived type dummy argument having intent(out) attribute
@ 2005-12-02  4:17 sudeshc at noida dot hcltech dot com
  2005-12-02 19:28 ` [Bug fortran/25217] " eedelman at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: sudeshc at noida dot hcltech dot com @ 2005-12-02  4:17 UTC (permalink / raw)
  To: gcc-bugs

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


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

end of thread, other threads:[~2006-08-20 16:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-02  4:17 [Bug fortran/25217] New: Derived type dummy argument having intent(out) attribute sudeshc at noida dot hcltech dot com
2005-12-02 19:28 ` [Bug fortran/25217] " eedelman at gcc dot gnu dot org
2006-07-09  7:48 ` steven at gcc dot gnu dot org
2006-07-18 18:28 ` eedelman at gcc dot gnu dot org
2006-07-18 20:40 ` patchapp at dberlin dot org
2006-08-19 21:06 ` eedelman at gcc dot gnu dot org
2006-08-19 21:32 ` eedelman at gcc dot gnu dot org
2006-08-20  0:46 ` steven at gcc dot gnu dot org
2006-08-20 16:25 ` eedelman 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).