trans-array.c (gfc_trans_allocate_array_storage, [...]): For functions...
authorPaul Brook <pbrook@gcc.gnu.org>
Fri, 6 Aug 2004 15:01:10 +0000 (15:01 +0000)
committerPaul Brook <pbrook@gcc.gnu.org>
Fri, 6 Aug 2004 15:01:10 +0000 (15:01 +0000)
commitfc90a8f2eeefbac428a73d6ea8c146f8e5446154
treedbe748fd35c50e2ed5669c9b2a7e62111f61759b
parent160ff372bdfdc91ecaf2aad59f865de95c5be2df
trans-array.c (gfc_trans_allocate_array_storage, [...]): For functions...

* trans-array.c (gfc_trans_allocate_array_storage,
gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
gfc_conv_loop_setup):
For functions, if the shape of the result is not known
in compile-time, generate an empty array descriptor for
the result and let the callee to allocate the memory.
(gfc_trans_dummy_array_bias): Do nothing for pointers.
(gfc_conv_expr_descriptor): Use function return values directly.
* trans-expr.c (gfc_conv_function_call): Always add byref call
insn to pre chain.
(gfc_trans_pointer_assignment): Add comments.
(gfc_trans_arrayfunc_assign): Don't chain on expression.
testsuite/
* gfortran.dg/ret_array_1.f90: New test.
* gfortran.dg/ret_pointer_1.f90: New test.

From-SVN: r85642
gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/ret_array_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/ret_pointer_1.f90 [new file with mode: 0644]