------- 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