This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36909] INTENT(IN) formal -> No need to call _gfortran_internal_unpack
- 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: 23 Jul 2008 17:13:49 -0000
- Subject: [Bug fortran/36909] INTENT(IN) formal -> No need to call _gfortran_internal_unpack
- References: <bug-36909-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2008-07-23 17:13 -------
Can probably combined with fix of the run-time part of PR 29952.
In gfc_conv_function_call one calls gfc_conv_array_parameter; currently the
formal symbol is not passed and thus one cannot check it in
gfc_conv_array_parameter. If one had the information, one could do:
if(!formalsym || formalsym->attr.intent != INTENT_IN)
{
/* Free the temporary. */
tmp = gfc_call_free (convert (pvoid_type_node, ptr));
gfc_add_expr_to_block (&block, tmp);
}
Maybe some other places are needed as well in that function.
For gfc_conv_subref_array_arg, one needs to check, I'd not be surprised if one
needs to do something alike.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36909