Daniel Carrera wrote:
On 07/05/2011 09:57 AM, Tobias Burnus wrote:
On 07/04/2011 11:34 PM, Daniel Carrera wrote:
The test compiles, but there are "expected failures" because gcc
doesn't think that allocatable scalar coarrays are supported. [...]
I really don't want to add knowingly a failing test. Thus, either one
adds a test for allocatable array coarrays - or one simply relies on the
existing
gfortran.dg/coarray/{dummy_1.f90,image_index_1.f90,this_image_1.f90},
which allocate allocatable (array) coarrays.
I vote for the second option. Rely on the existing tests. [...]
Attached is an updated ChangeLog. And as I wrote above, it seems
better to rely on the existing test cases than to duplicate a check
for allocatable array coarrays.
2011-07-04 Daniel Carrera<dcarr...@gmail.com>
* trans-array.c (gfc_array_allocate): Rename allocatable_array to
allocatable. Rename function gfc_allocate_array_with_status to
gfc_allocate_allocatable_with_status. Update function call for
gfc_allocate_with_status.
* trans-opemp.c (gfc_omp_clause_default_ctor): Rename function
gfc_allocate_array_with_status to gfc_allocate_allocatable_with_status.
* trans-stmt.c (gfc_trans_allocate): Update function call for
gfc_allocate_with_status. Rename function gfc_allocate_array_with_status
to gfc_allocate_allocatable_with_status.
* trans.c (gfc_call_malloc): Add new parameter gfc_allocate_with_status
so it uses the library for memory allocation when -fcoarray=lib.
(gfc_allocate_allocatable_with_status): Renamed from
gfc_allocate_array_with_status.
(gfc_allocate_allocatable_with_status): Update function call for
gfc_allocate_with_status.
* trans.h (gfc_coarray_type): New enum.
(gfc_allocate_with_status): Update prototype.
(gfc_allocate_allocatable_with_status): Renamed from
gfc_allocate_array_with_status.
* trans-decl.c: Use the new constant GFC_CAF_COARRAY_ALLOC in the call
to gfor_fndecl_caf_register.
Nit: There is a "(generate_coarray_sym_init)" missing in the
trans-decl.c entry.
Otherwise the patch is OK.
I have now committed it as Rev. 175937
Thanks for the patch!
Tobias