This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41479] [4.3/4.4/4.5 Regression] intent(out) for types with default initialization
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Oct 2009 09:54:23 -0000
- Subject: [Bug fortran/41479] [4.3/4.4/4.5 Regression] intent(out) for types with default initialization
- References: <bug-41479-15192@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from burnus at gcc dot gnu dot org 2009-10-02 09:54 -------
(In reply to comment #7)
> Checking the 4.2 branch and trans-expr.c in trunk, it appears that
> this chunk of code in gfc_conv_function_call() has gone missing.
It was removed with the following patch:
Date: Tue Jul 24 19:16:36 2007
New Revision: 126885 / 126886
URL: http://gcc.gnu.org/viewcvs?view=revision&revision=126885
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126886
Log:
2007-07-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31205
PR fortran/32842
* trans-expr.c (gfc_conv_function_call): Remove the default
initialization of intent(out) derived types.
>From http://gcc.gnu.org/ml/gcc-patches/2007-06/msg02151.html:
(ii) Remove the initialization of derived types with a default
initializer from the caller to the callee. The reasons for doing this
are discussed in the PR (PR31205). It has a gratifying effect on passing
derived types with allocatable components, in that the amount of
generated code goes down (see alloc_comp_basics_1.f90).
Thus I think that part is OK. (Doing the default initialization in the caller
leads to wrong code if the caller does not know the interface of called
procedure.) However, some callee initialization is now missing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41479