Bug 18918 - Eventually support Fortran 2008's coarrays [co-arrays]
Summary: Eventually support Fortran 2008's coarrays [co-arrays]
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: unknown
: P3 enhancement
Target Milestone: ---
Assignee: Tobias Burnus
URL:
Keywords:
Depends on: 49108 25830 43412 45859
Blocks: F2008 45776
  Show dependency treegraph
 
Reported: 2004-12-10 04:18 UTC by Mark Gilbert
Modified: 2011-08-18 19:01 UTC (History)
6 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-04-29 18:15:36


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Gilbert 2004-12-10 04:18:29 UTC
This is a rather useful extension, in my opinion, though for obvious reasons not
top priority (I know the gfortran folks have no shortage of work cut out for
them).  I've used it with much pleasure on some more computationally intense
problems.  Cray's got a nice implementation of it, and a research group at Rice
has a more open source-to-source co-array compiler that spits out standard f90,
I believe.
I did not see this rfe listed on the public todo webpages or filed previously.
Comment 1 Tobias Schlüter 2004-12-14 22:33:03 UTC
Do you have a link to something documenting this feature. I for one have never
heard of it.
Comment 2 Mark Gilbert 2004-12-15 02:52:20 UTC
The available information on it is, admittedly, a bit dispersed, but I think
http://www.co-array.org/caf_def.htm might be close enough to what you are
looking for.
Comment 3 Tobias Schlüter 2004-12-20 22:44:28 UTC
This might be interesting, even though I think it's far out of reach currently.
Comment 4 Mark Gilbert 2004-12-21 09:56:16 UTC
I agree, but figured it was worth filing away for the future.  Here's another
doc from cray, the link to which I couldn't find earlier:
http://www.cray.com/cgi-bin/swpubs/craydoc30/craydoc.cgi?frames=1&html=toc_view&pub=S-3694-53
(Chapter 9 of the third volume of their Fortran Language Reference Manual
describes Cray co-arrays.)
NB: It's not Numrich and Reid, but I figure I'll note it here for future
reference just in case (in case, for example, there were an implementation
divergence in the future)
Comment 5 Janne Blomqvist 2005-02-11 17:24:49 UTC
You might want to check out the "global arrays" toolkit at
http://www.emsl.pnl.gov/docs/global/ga.html

GA implements the same programming model as Co-Array Fortran, but it's a
library, so any standard F95 compiler should do.
Comment 6 Janne Blomqvist 2005-06-20 07:25:46 UTC
Apparently it has been decided that co-arrays will be included in the next
revision of the Fortran standard.  See  http://www.nag.co.uk/sc22wg5/  and
ftp://ftp.nag.co.uk/sc22wg5/N1601-N1650/N1639.txt

Something to think about once F2003 support is completed. ;-)
Comment 7 Andrew Pinski 2005-12-30 18:51:43 UTC
(In reply to comment #6)
> Something to think about once F2003 support is completed. ;-)

It did not make it into F2003 but:
[13:50] < toon> pinskia: No but it still stands a chance for F2008
Comment 8 Tobias Burnus 2007-10-14 17:46:01 UTC
For UPC (Unified Parallel C) - the C variant of something like Co-arrays - has been implemented for GCC 4.0.x, see: http://www.intrepid.com/upc.html
I don't know whether they have signed a contract with the FSF or whether it helps with implementing it.

Otherwise, one can use the OpenMP backend for shared-memory systems; for distributed memory, one could either generate MPI 2 code directly or use - as intrepid's gcc - Berkeley's GASNet library, http://gasnet.cs.berkeley.edu/.

Regarding the status: Co-arrays are one of the few remaining bigger changes planned for Fortran 2003; see http://www.nag.co.uk/sc22wg5/, esp. on that page:
- "Co-arrays in the next Fortran Standard"
- "Rationale for co-arrays in Fortran 2008"
- Current draft: http://www.j3-fortran.org/doc/standing/links/007.pdf
- Timetable: ftp://ftp.nag.co.uk/sc22wg5/N1651-N1700/N1693.txt
2007-12 - first working draft; 2008-04 WG5 approval of draft; 2009-07 final CD submitted.
Comment 9 Tobias Burnus 2008-03-25 18:49:29 UTC
Fortran 2008 is now a Candidate Draft; the latest draft and a brand new Coarray introduction is now also available. Links, see bottom of: http://gcc.gnu.org/wiki/GFortranStandards

What I want to mention: The implementation should be such that OpenMP can be combined with coarrays. Or, if this is too difficult, -fopenmp should be rejected with an error when coarrays are found in th Fortran file.
Comment 10 Tobias Burnus 2009-01-28 07:11:46 UTC
Someone (Toon?) mentioned a plan to make the GOMP backend infrastructure usable for shared memory. I also found the following paper: "Prototyping the automatic generation of MPI code from OpenMP programs in GCC" at
http://gcc.gnu.org/wiki/GROW-2009

See also http://gcc.gnu.org/wiki/GFortran45_actions
Comment 11 Tobias Burnus 2009-04-29 18:15:35 UTC
Assign to me - I'm working on it to get single-image support working. Real PGAS support will follow later and not necessarily by me.
Comment 12 Tobias Burnus 2010-02-19 12:48:20 UTC
First patches for (single-image) Coarray support, see
  http://gcc.gnu.org/wiki/GFortranPatchTracker
about half of the work is already done & approved for committal when the 4.6 development starts.
Comment 13 Tobias Burnus 2010-04-06 16:38:43 UTC
First committal (which went to the wrong PR: PR 39997):
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158008

Added: single-image support for CRITICAL block, SYNC MEMORY/IMAGES/ALL, and num_images() (which is constantly one).
Comment 14 Tobias Burnus 2010-04-06 17:59:08 UTC
Subject: Bug 18918

Author: burnus
Date: Tue Apr  6 17:58:50 2010
New Revision: 158011

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158011
Log:
2010-04-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * iso-fortran-env.def: Add the integer parameters
        * atomic_int_kind,
        atomic_logical_kind, iostat_inquire_internal_unit, stat_locked,
        stat_locked_other_image, stat_stopped_image and stat_unlocked of
        Fortran 2008.
        * intrinsic.texi (iso_fortran_env): Ditto.
        * libgfortran.h (libgfortran_stat_codes): New enum.
        * module.c (use_iso_fortran_env_module): Honour -std= when
        * loading
        constants from the intrinsic module.

2010-04-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/iso_fortran_env_5.f90: New test.
        * gfortran.dg/iso_fortran_env_6.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/iso_fortran_env_5.f90
    trunk/gcc/testsuite/gfortran.dg/iso_fortran_env_6.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/intrinsic.texi
    trunk/gcc/fortran/iso-fortran-env.def
    trunk/gcc/fortran/libgfortran.h
    trunk/gcc/fortran/module.c
    trunk/gcc/testsuite/ChangeLog

Comment 15 Tobias Burnus 2010-04-06 18:16:30 UTC
Subject: Bug 18918

Author: burnus
Date: Tue Apr  6 18:16:13 2010
New Revision: 158012

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158012
Log:
2010-04-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * array.c (gfc_free_array_spec,gfc_resolve_array_spec,
        match_array_element_spec,gfc_copy_array_spec,
        gfc_compare_array_spec): Include corank.
        (match_array_element_spec,gfc_set_array_spec): Support codimension.
        * decl.c (build_sym,build_struct,variable_decl,
        match_attr_spec,attr_decl1,cray_pointer_decl,
        gfc_match_volatile): Add codimension.
        (gfc_match_codimension): New function.
        * dump-parse-tree.c (show_array_spec,show_attr): Support
        * codimension.
        * gfortran.h (symbol_attribute,gfc_array_spec): Ditto.
        (gfc_add_codimension): New function prototype.
        * match.h (gfc_match_codimension): New function prototype.
        (gfc_match_array_spec): Update prototype
        * match.c (gfc_match_common): Update gfc_match_array_spec call.
        * module.c (MOD_VERSION): Bump.
        (mio_symbol_attribute): Support coarray attributes.
        (mio_array_spec): Add corank support.
        * parse.c (decode_specification_statement,decode_statement,
        parse_derived): Add coarray support.
        * resolve.c (resolve_formal_arglist, was_declared,
        is_non_constant_shape_array, resolve_fl_variable,
        resolve_fl_derived, resolve_symbol): Add coarray support.
        * symbol.c (check_conflict, gfc_add_volatile, gfc_copy_attr,
        gfc_build_class_symbol): Add coarray support.
        (gfc_add_codimension): New function.

2010-04-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_4.f90: New test.
        * gfortran.dg/coarray_5.f90: New test.
        * gfortran.dg/coarray_6.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_4.f90
    trunk/gcc/testsuite/gfortran.dg/coarray_5.f90
    trunk/gcc/testsuite/gfortran.dg/coarray_6.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/array.c
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/dump-parse-tree.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/match.c
    trunk/gcc/fortran/match.h
    trunk/gcc/fortran/module.c
    trunk/gcc/fortran/parse.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/testsuite/ChangeLog

Comment 16 Tobias Burnus 2010-04-06 18:24:19 UTC
Subject: Bug 18918

Author: burnus
Date: Tue Apr  6 18:23:56 2010
New Revision: 158014

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158014
Log:
2010-04-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.h (gfc_array_spec): Add cotype.
        * array.c (gfc_match_array_spec,gfc_set_array_spec): Use it
        and defer error diagnostic.
        * resolve.c (resolve_fl_derived): Add missing check.
        (resolve_symbol): Add cotype/type check.
        * parse.c (parse_derived): Fix setting of coarray_comp.

2010-04-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_4.f90: Fix test.
        * gfortran.dg/coarray_6.f90: Add more tests.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/array.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/parse.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray_4.f90
    trunk/gcc/testsuite/gfortran.dg/coarray_6.f90

Comment 17 Tobias Burnus 2010-04-06 19:03:49 UTC
Subject: Bug 18918

Author: burnus
Date: Tue Apr  6 19:03:10 2010
New Revision: 158016

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158016
Log:
2010-04-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * array.c (gfc_match_array_spec): Add error for -fcoarray=none.
        * match.c (gfc_match_critical, sync_statement): Ditto.
        * gfortran.h (gfc_fcoarray): New enum.
        (gfc_option_t): Use it.
        * lang.opt (fcoarray): Add new flag.
        * invoke.texi (fcoarray): Document it.
        * options.c (gfc_init_options,gfc_handle_option): Handle
        * -fcoarray=.
        (gfc_handle_coarray_option): New function.

2010-04-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_2.f90: Add dg-options -fcoarray=single.
        * gfortran.dg/coarray_3.f90: Ditto.
        * gfortran.dg/coarray_4.f90: Ditto.
        * gfortran.dg/coarray_5.f90: Ditto.
        * gfortran.dg/coarray_6.f90: Ditto.
        * gfortran.dg/coarray_7.f90: Ditto.
        * gfortran.dg/coarray_8.f90: Ditto.
        * gfortran.dg/coarray_9.f90: New -fcoarray=none test.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_9.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/array.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/invoke.texi
    trunk/gcc/fortran/lang.opt
    trunk/gcc/fortran/match.c
    trunk/gcc/fortran/options.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray_2.f90
    trunk/gcc/testsuite/gfortran.dg/coarray_3.f90
    trunk/gcc/testsuite/gfortran.dg/coarray_4.f90
    trunk/gcc/testsuite/gfortran.dg/coarray_6.f90

Comment 18 Tobias Burnus 2010-04-06 19:59:56 UTC
Current status:
* Single image only (num_images() == 1) with -fcoarray=<none|single>
* Image control statements, CRITICAL block, num_images()
* Coarray declarations
* Most new parameters from ISO_FORTRAN_ENV

But not yet:
* Coarray expressions
* this_image(), lcobound()/ucobound(), image_index(), lock()/unlock(), atomic_define()/atomic_ref() intrinsics
Comment 19 Tobias Burnus 2010-04-09 05:54:57 UTC
Subject: Bug 18918

Author: burnus
Date: Fri Apr  9 05:54:29 2010
New Revision: 158149

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158149
Log:
2010-04-09  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * decl.c (variable_decl, match_attr_spec): Fix setting the array
        spec.
        * array.c (match_subscript,gfc_match_array_ref): Add coarray
        * support.
        * data.c (gfc_assign_data_value): Ditto.
        * expr.c (gfc_check_pointer_assign): Add check for coarray
        * constraint.
        (gfc_traverse_expr): Traverse also through codimension expressions.
        (gfc_is_coindexed, gfc_has_ultimate_allocatable,
        gfc_has_ultimate_pointer): New functions.
        * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_STAR for
        * coarrays.
        (gfc_array_ref): Add codimen.
        (gfc_array_ref): Add in_allocate.
        (gfc_is_coindexed, gfc_has_ultimate_allocatable,
        gfc_has_ultimate_pointer): Add prototypes.
        * interface.c (compare_parameter, compare_actual_formal,
        check_intents): Add coarray constraints.
        * match.c (gfc_match_iterator): Add coarray constraint.
        * match.h (gfc_match_array_ref): Update interface.
        * primary.c (gfc_match_varspec): Handle codimensions.
        * resolve.c (coarray_alloc, inquiry_argument): New static
        * variables.
        (check_class_members): Return gfc_try instead for error recovery.
        (resolve_typebound_function,resolve_typebound_subroutine,
        check_members): Handle return value of check_class_members.
        (resolve_structure_cons, resolve_actual_arglist, resolve_function,
        check_dimension, compare_spec_to_ref, resolve_array_ref,
        resolve_ref, resolve_variable, gfc_resolve_expr, conformable_arrays,
        resolve_allocate_expr, resolve_ordinary_assign): Add coarray
        support.
        * trans-array.c (gfc_conv_array_ref, gfc_walk_variable_expr):
        Skip over coarray refs.
        (gfc_array_allocate) Add support for references containing coindexes.
        * trans-expr.c (gfc_add_interface_mapping): Copy coarray
        * attribute.
        (gfc_map_intrinsic_function): Ignore codimensions.

2010-04-09  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_7.f90: New test.
        * gfortran.dg/coarray_8.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_7.f90
    trunk/gcc/testsuite/gfortran.dg/coarray_8.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/array.c
    trunk/gcc/fortran/data.c
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/expr.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/interface.c
    trunk/gcc/fortran/match.c
    trunk/gcc/fortran/match.h
    trunk/gcc/fortran/primary.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/testsuite/ChangeLog

Comment 20 Tobias Burnus 2010-04-14 05:43:53 UTC
Subject: Bug 18918

Author: burnus
Date: Wed Apr 14 05:43:30 2010
New Revision: 158292

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158292
Log:
2010-04-14  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * array.c (gfc_find_array_ref): Handle codimensions.
        (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
        * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
        gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
        New functions.
        * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
        GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
        GFC_ISYM_UCOBOUND.
        * intrinsic.h (add_functions): Add this_image, image_index,
        lcobound and ucobound intrinsics.
        * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
        gfc_check_image_index, gfc_check_this_image,
        gfc_simplify_image_index, gfc_simplify_lcobound,
        gfc_simplify_this_image, gfc_simplify_ucobound):
        New function prototypes.
        * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
        IMAGE_INDEX): Document new intrinsic functions.
        * match.c (gfc_match_critical, sync_statement): Make
        * -fcoarray=none
        error fatal.
        * simplify.c (simplify_bound_dim): Handle coarrays.
        (simplify_bound): Update simplify_bound_dim call.
        (gfc_simplify_num_images): Add -fcoarray=none check.
        (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
        gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.

2010-04-14  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_9.f90: Update dg-errors.
        * gfortran.dg/coarray_10.f90: New test.
        * gfortran.dg/coarray_11.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_10.f90
    trunk/gcc/testsuite/gfortran.dg/coarray_11.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/array.c
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.h
    trunk/gcc/fortran/intrinsic.texi
    trunk/gcc/fortran/match.c
    trunk/gcc/fortran/simplify.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray_9.f90

Comment 21 Tobias Burnus 2010-04-27 08:41:31 UTC
Subject: Bug 18918

Author: burnus
Date: Tue Apr 27 08:41:00 2010
New Revision: 158768

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158768
Log:
2010-04-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * resolve.c (resolve_allocate_expr): Allow array coarrays.
        * trans-types.h (gfc_get_array_type_bounds): Update prototype.
        * trans-types.c (gfc_get_array_type_bounds,
        gfc_get_array_descriptor_base): Add corank argument.
        * trans-array.c (gfc_array_init_size): Handle corank.
        (gfc_trans_create_temp_array, gfc_array_allocate,
        gfc_conv_expr_descriptor): Add corank argument to call.
        * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.

2010-04-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_7.f90: Modified and removed obsolete
        tests.
        * gfortran.dg/coarray_12.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_12.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-stmt.c
    trunk/gcc/fortran/trans-types.c
    trunk/gcc/fortran/trans-types.h
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray_7.f90

Comment 22 H.J. Lu 2010-04-27 13:59:16 UTC
On Linux/ia32, I got

FAIL: gfortran.dg/coarray_12.f90  -O  scan-tree-dump-times original "a.dim.0..ubound = .* nn;" 1
FAIL: gfortran.dg/coarray_12.f90  -O  scan-tree-dump-times original "a.dim.1..ubound = .* mm;" 1
Comment 23 Tobias Burnus 2010-04-27 14:09:49 UTC
Subject: Bug 18918

Author: burnus
Date: Tue Apr 27 14:09:29 2010
New Revision: 158785

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158785
Log:
2010-04-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_12.f90: Fix dump parsing.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray_12.f90

Comment 24 Tobias Burnus 2010-04-28 20:43:37 UTC
Subject: Bug 18918

Author: burnus
Date: Wed Apr 28 20:43:18 2010
New Revision: 158843

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158843
Log:
2010-04-28  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        PR fortran/43919
        * simplify.c (simplify_cobound): Handle scalar coarrays.

2010-04-28  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        PR fortran/43919
        * gfortran.dg/coarray_11.f90: Add scalar-coarrays test case.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/simplify.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray_11.f90

Comment 25 Tobias Burnus 2010-04-30 18:31:25 UTC
Subject: Bug 18918

Author: burnus
Date: Fri Apr 30 18:30:53 2010
New Revision: 158941

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158941
Log:
2010-04-30  Tobias Burnus  Mburnus@net-b.de>

        PR fortran/18918
        PR fortran/43931
        *  trans-types.c (gfc_get_array_descriptor_base): Fix index
        calculation for array descriptor types.

2010-04-30  Tobias Burnus  Mburnus@net-b.de>

        PR fortran/18918
        PR fortran/43931
        * gfortran.dg/coarray_13.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_13.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-types.c
    trunk/gcc/testsuite/ChangeLog

Comment 26 Tobias Burnus 2010-05-02 15:13:34 UTC
Subject: Bug 18918

Author: burnus
Date: Sun May  2 15:13:03 2010
New Revision: 158974

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158974
Log:
2010-05-02  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_*
        calls for lcobound, ucobound, image_index and this_image.
        * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
        gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
        * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
        gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
        functions.
        (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.h
    trunk/gcc/fortran/iresolve.c

Comment 27 Tobias Burnus 2010-07-08 15:17:37 UTC
Subject: Bug 18918

Author: burnus
Date: Thu Jul  8 15:17:25 2010
New Revision: 161960

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161960
Log:
2010-07-08  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * array.c (gfc_match_array_ref): Better error message for
        coarrays with too few ranks.
        (match_subscript): Move one diagnostic to caller.
        * gfortran.h (gfc_get_corank): Add prottype.
        * expr.c (gfc_get_corank): New function.
        * iresolve.c (resolve_bound): Fix rank for cobounds.
        (gfc_resolve_lbound,gfc_resolve_lcobound, gfc_resolve_ubound,
        gfc_resolve_ucobound, gfc_resolve_this_image): Update
        resolve_bound call.

2010-07-08  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_10.f90: Add an additional test.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/array.c
    trunk/gcc/fortran/expr.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/iresolve.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray_10.f90

Comment 28 Tobias Burnus 2011-03-27 08:30:33 UTC
Author: burnus
Date: Sun Mar 27 08:30:28 2011
New Revision: 171568

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171568
Log:
2011-03-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.h (gfc_isym_id): Rename GFC_ISYM_NUMIMAGES to
        GFC_ISYM_NUM_IMAGES.
        (gfc_fcoarray): Add GFC_FCOARRAY_LIB.
        * intrinsic.c (add_functions): Update due to GFC_ISYM_NUM_IMAGES
        rename.
        * invoke.texi (-fcoarray=): Document "lib" argument.
        * iresolve.c (gfc_resolve_this_image): Fix THIS IMAGE().
        * libgfortran.h (libgfortran_stat_codes): Add comments.
        * options.c (gfc_handle_coarray_option): Add -fcoarray=lib.
        * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
        Handle GFC_FCOARRAY_LIB.
        * trans.h (gfc_init_coarray_decl): New prototype.
        (gfor_fndecl_caf_init, gfor_fndecl_caf_finalize,
        gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical,
        gfor_fndecl_caf_sync_all, gfor_fndecl_caf_sync_images,
        gfor_fndecl_caf_error_stop, gfor_fndecl_caf_error_stop_str,
        gfort_gvar_caf_num_images, gfort_gvar_caf_this_image):
        New global variables.
        * trans-decl.c: Declare several CAF functions (cf. above).
        (gfc_build_builtin_function_decls): Initialize those.
        (gfc_init_coarray_decl): New function.
        (create_main_function): Call CAF init/finalize functions.
        * trans-intrinsic.c (trans_this_image, trans_num_images): New.
        (gfc_conv_intrinsic_function): Call those.
        * trans-stmt.c (gfc_trans_stop, gfc_trans_sync,
        * gfc_trans_critical):
        Add code for GFC_FCOARRAY_LIB.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/invoke.texi
    trunk/gcc/fortran/iresolve.c
    trunk/gcc/fortran/libgfortran.h
    trunk/gcc/fortran/options.c
    trunk/gcc/fortran/simplify.c
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/fortran/trans-stmt.c
    trunk/gcc/fortran/trans.h
Comment 29 Tobias Burnus 2011-03-27 09:01:37 UTC
Author: burnus
Date: Sun Mar 27 09:01:34 2011
New Revision: 171570

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171570
Log:
2011-03-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * caf/libcaf.h: New - coarray communication library.
        * caf/mpi.c: New.
        * caf/single.c: New.


Added:
    trunk/libgfortran/caf/
    trunk/libgfortran/caf/libcaf.h
    trunk/libgfortran/caf/mpi.c
    trunk/libgfortran/caf/single.c
Modified:
    trunk/libgfortran/ChangeLog
Comment 30 Tobias Burnus 2011-04-04 18:35:17 UTC
Author: burnus
Date: Mon Apr  4 18:35:13 2011
New Revision: 171949

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171949
Log:
2011-04-04  Tobias Burnus  <burnus@net-b.de>
            Mikael Morin  <mikael.morin@sfr.fr>

        PR fortran/18918
        * check.c (is_coarray): Update - because of DIMEN_THIS_IMAGE.
        * expr.c (gfc_is_coindexed): Ditto.
        * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_THIS_IMAGE.
        * interface.c (compare_parameter): Use gfc_expr_attr and
        gfc_is_coindexed.
        * resolve.c (check_dimension, compare_spec_to_ref,
        resolve_allocate_expr, check_data_variable): Update for
        DIMEN_THIS_IMAGE.
        * simplify.c (gfc_simplify_lcobound, gfc_simplify_this_image,
        gfc_simplify_ucobound): Allow non-constant bounds.
        * trans-array.c (gfc_set_loop_bounds_from_array_spec,
        gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
        gfc_set_vector_loop_bounds, gfc_conv_array_index_offset,
        gfc_start_scalarized_body, gfc_trans_scalarizing_loops,
        gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
        gfc_conv_ss_startstride, gfc_conv_loop_setup,
        gfc_trans_array_bounds, gfc_conv_expr_descriptor,
        gfc_walk_variable_expr): Handle codimen.
        * trans-decl.c (gfc_build_qualified_array): Save cobounds.
        * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use arg2.
        (conv_intrinsic_cobound): New function.
        (gfc_conv_intrinsic_function): Call it.
        (gfc_walk_intrinsic_function, gfc_add_intrinsic_ss_code): Handle
        ucobound, lcobound, this_image.
        * fortran/trans-types.c (gfc_build_array_type): Save cobounds.
        (gfc_get_dtype): Honour corank.
        (gfc_get_nodesc_array_type): Save corank and codimensions.
        (gfc_get_array_type_bounds): Save cobound.
        * fortran/trans.h (gfc_ss_info,gfc_loopinfo): Add codimen item.
        (gfc_array_kind): Add corank item.
        (GFC_TYPE_ARRAY_CORANK): New macro.

2011-04-04  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_10.f90: Add coarray descriptor diagnostic
        check.
        * gfortran.dg/coarray_13.f90: Add checks for run-time cobounds.
        * gfortran.dg/coarray_15.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_15.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/expr.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/interface.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/simplify.c
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/fortran/trans-types.c
    trunk/gcc/fortran/trans.h
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray_10.f90
    trunk/gcc/testsuite/gfortran.dg/coarray_13.f90
Comment 31 Tobias Burnus 2011-04-06 18:29:58 UTC
Author: burnus
Date: Wed Apr  6 18:29:55 2011
New Revision: 172059

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172059
Log:
2011-04-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * caf/mpi.c (_gfortran_caf_init, _gfortran_caf_finalize):
        Add global variable caf_mpi_initialized and use it for when
        finalizing.


Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/caf/mpi.c
Comment 32 Tobias Burnus 2011-04-06 18:31:03 UTC
Author: burnus
Date: Wed Apr  6 18:30:58 2011
New Revision: 172060

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172060
Log:
2011-04-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * trans-intrinsic.c (gfc_conv_intrinsic_function): Fix
        call for this_image.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-intrinsic.c
Comment 33 Tobias Burnus 2011-04-06 18:32:31 UTC
Author: burnus
Date: Wed Apr  6 18:32:27 2011
New Revision: 172061

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172061
Log:
2011-04-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        PR fortran/48477
        * gfortran.dg/coarray_13.f90: Avoid out-of-bounds access.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray_13.f90
Comment 34 Tobias Burnus 2011-04-11 15:50:51 UTC
Author: burnus
Date: Mon Apr 11 15:50:47 2011
New Revision: 172262

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172262
Log:
2011-04-11  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * simplify.c (simplify_bound_dim): Exit for
        ucobound's last dimension unless -fcoarray=single.
        * trans-array (gfc_conv_descriptor_size_1): Renamed from
        gfc_conv_descriptor_size, made static, has now from_dim and
        to_dim arguments.
        (gfc_conv_descriptor_size): Call gfc_conv_descriptor_size.
        (gfc_conv_descriptor_cosize): New function.
        * trans-array.h (gfc_conv_descriptor_cosize): New prototype.
        * trans-intrinsic.c (conv_intrinsic_cobound): Add input_location
        and handle last codim of ucobound for when -fcoarray is not "single".


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/simplify.c
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-array.h
    trunk/gcc/fortran/trans-intrinsic.c
Comment 35 Tobias Burnus 2011-04-15 16:13:35 UTC
Author: burnus
Date: Fri Apr 15 16:13:28 2011
New Revision: 172499

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172499
Log:
2011-04-15  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * Makefile.am: Build and install caf/single.c as
        libcaf_single.a.
        * Makefile.in: Regenerate.


Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/Makefile.am
    trunk/libgfortran/Makefile.in
Comment 36 Tobias Burnus 2011-04-15 21:41:28 UTC
Author: burnus
Date: Fri Apr 15 21:41:25 2011
New Revision: 172522

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172522
Log:
2011-04-15  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * trans-intrinsic.c (conv_intrinsic_cobound): Remove unused
        code which is also causing an ICE.

2011-04-15  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_15.f90: Change to dg-do run.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray_15.f90
Comment 37 Tobias Burnus 2011-04-18 05:56:08 UTC
Author: burnus
Date: Mon Apr 18 05:56:05 2011
New Revision: 172637

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172637
Log:
2011-04-18  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * iresolve.c (gfc_resolve_image_index): Set ts.type.
        * simplify.c (gfc_simplify_image_index): Don't abort if the
        * bounds
        are not known at compile time and handle -fcoarray=lib.
        * trans-intrinsics.c (gfc_conv_intrinsic_function): Handle
        IMAGE_INDEX.
        (conv_intrinsic_cobound): Fix comment typo.
        (trans_this_image): New function.
        * trans-array.c (gfc_unlikely): Move to trans.c.
        * trans.c (gfc_unlikely): Function moved from trans-array.c.
        (gfc_trans_runtime_check): Use it.
        * trans-io.c (gfc_trans_io_runtime_check): Ditto.
        * trans.h (gfc_unlikely): Add prototype.

2011-04-18  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_16.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_16.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/iresolve.c
    trunk/gcc/fortran/simplify.c
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/fortran/trans-io.c
    trunk/gcc/fortran/trans.c
    trunk/gcc/fortran/trans.h
    trunk/gcc/testsuite/ChangeLog
Comment 38 Tobias Burnus 2011-04-18 17:21:28 UTC
Author: burnus
Date: Mon Apr 18 17:21:24 2011
New Revision: 172658

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172658
Log:
2011-04-18  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * array.c (gfc_match_array_ref): Check for too many
        * codimensions.
        * check.c (gfc_check_image_index): Check number of elements
        in SUB argument.
        * simplify.c (gfc_simplify_image_index): Remove unreachable
        * checks.

2011-04-18  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_17.f90: New.
        * gfortran.dg/coarray_10.f90: Update dg-error.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_17.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/array.c
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/simplify.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray_10.f90
Comment 39 Tobias Burnus 2011-04-21 08:29:45 UTC
Author: burnus
Date: Thu Apr 21 08:29:41 2011
New Revision: 172812

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172812
Log:
2011-04-21  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * array.c (gfc_match_array_spec): Fix maximal rank(+corank) check.

2011-04-21  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_18.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_18.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/array.c
    trunk/gcc/testsuite/ChangeLog
Comment 40 Tobias Burnus 2011-04-23 10:26:41 UTC
Author: burnus
Date: Sat Apr 23 10:26:38 2011
New Revision: 172897

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172897
Log:
2011-04-23  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * module.c (mio_array_spec): Set as->cotype on reading.
        * resolve.c (resolve_allocate_expr): Fix allocating coarray
        components.

2011-04-23  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_19.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_19.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/module.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/testsuite/ChangeLog
Comment 41 Tobias Burnus 2011-05-03 21:35:48 UTC
Author: burnus
Date: Tue May  3 21:35:44 2011
New Revision: 173341

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173341
Log:
2011-05-03  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray/caf.dg: New.
        * gfortran.dg/coarray/image_index_1.f90: New, copied
        from ../coarray_16.f90.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray/
    trunk/gcc/testsuite/gfortran.dg/coarray/caf.exp
    trunk/gcc/testsuite/gfortran.dg/coarray/image_index_1.f90
Modified:
    trunk/gcc/testsuite/ChangeLog
Comment 42 Tobias Burnus 2011-05-03 21:44:30 UTC
Author: burnus
Date: Tue May  3 21:44:27 2011
New Revision: 173342

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173342
Log:
2011-05-03  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * trans-intrinsic.c (trans_this_image): Implement version with
        coarray argument.

2011-05-03  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray/this_image_1.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray/this_image_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/testsuite/ChangeLog
Comment 43 Tobias Burnus 2011-05-03 21:56:47 UTC
Author: burnus
Date: Tue May  3 21:56:45 2011
New Revision: 173343

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173343
Log:
2011-05-03  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray/this_image_1.f90: Remove dg-options.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray/this_image_1.f90
Comment 44 Tobias Burnus 2011-05-06 18:35:04 UTC
Author: burnus
Date: Fri May  6 18:35:00 2011
New Revision: 173505

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173505
Log:
2011-05-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * caf/libcaf.h: Cleanup headers.
        (_gfortran_caf_critical, _gfortran_caf_end_critical): Make stub.
        (caf_register_t): New enum.
        (_gfortran_caf_register, _gfortran_caf_deregister): New prototype.
        * caf/single.c (_gfortran_caf_critical,
        _gfortran_caf_end_critical): Remove.
        (_gfortran_caf_register, _gfortran_caf_deregister): New functions.
        * caf/mpi.c (_gfortran_caf_critical,
        _gfortran_caf_end_critical): Remove.
        (_gfortran_caf_register, _gfortran_caf_deregister): New functions.
        (caf_world_window): Remove global variable.
        (_gfortran_caf_init): Fix off-by-one error of this_image.


Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/caf/libcaf.h
    trunk/libgfortran/caf/mpi.c
    trunk/libgfortran/caf/single.c
Comment 45 Tobias Burnus 2011-05-06 18:39:10 UTC
Author: burnus
Date: Fri May  6 18:39:08 2011
New Revision: 173506

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173506
Log:
2011-05-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * trans-array.c (gfc_walk_variable_expr): Continue walking
        for scalar coarrays.
        * trans-intrinsic.c (convert_element_to_coarray_ref): New
        * function.
        (trans_this_image, trans_image_index, conv_intrinsic_cobound): Use it.
        (trans_this_image): Fix algorithm.
        * trans-types.c (gfc_get_element_type,
        * gfc_get_array_descriptor_base,
        gfc_sym_type): Handle scalar coarrays.

2011-05-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray/this_image_2.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray/this_image_2.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/fortran/trans-types.c
    trunk/gcc/testsuite/ChangeLog
Comment 46 Tobias Burnus 2011-05-07 05:38:13 UTC
Author: burnus
Date: Sat May  7 05:38:08 2011
New Revision: 173528

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173528
Log:
2011-05-07  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        PR fortran/48919
        * trans.h: Move gfc_init_coarray_decl prototype ...
        * gfortran.h: ... to here.
        * parse.c (translate_all_program_units): Call
        * gfc_init_coarray_decl.
        (gfc_parse_file): Update translate_all_program_units call.
        * trans-decl.c (gfc_init_coarray_decl): Fix variable
        * declaration,
        new argument whether DECL_EXTERNAL should be used.
        (create_main_function): Update gfc_init_coarray_decl call.
        * trans-intrinsic.c (trans_this_image, trans_image_index,
        conv_intrinsic_cobound): Ditto.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/parse.c
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/fortran/trans.h
Comment 47 Tobias Burnus 2011-05-14 10:34:49 UTC
Author: burnus
Date: Sat May 14 10:34:44 2011
New Revision: 173755

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173755
Log:
2011-05-14  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * interface.c (compare_parameter): Skip diagnostic if
        actual argument is not an array; rank mismatch is diagnosted later.

2011-05-14  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.de/coarray_20.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_20.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/interface.c
    trunk/gcc/testsuite/ChangeLog
Comment 48 Tobias Burnus 2011-05-15 16:20:21 UTC
Author: burnus
Date: Sun May 15 16:20:18 2011
New Revision: 173772

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173772
Log:
2011-05-15  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        actual argument is not an array; rank mismatch is diagnosted later.
        * trans-decl.c (gfc_get_symbol_decl, gfc_trans_deferred_vars):
        * Handle
        scalar coarrays.
        * trans-types.c (gfc_get_array_type_bounds): Ditto.

2011-05-15  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray/image_index_2.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray/image_index_2.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/fortran/trans-types.c
    trunk/gcc/testsuite/ChangeLog
Comment 49 Tobias Burnus 2011-05-19 20:53:36 UTC
Author: burnus
Date: Thu May 19 20:53:33 2011
New Revision: 173920

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173920
Log:
2011-06-19  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * trans-types.c (gfc_get_element_type): Handle scalar coarrays.
        (gfc_get_nodesc_array_type): Make a variant-type copy for scalar
        coarrays.
        * trans.c (gfc_build_array_ref): Return original type not
        * variant
        copy for scalar coarrays.
        * trans-array.c (gfc_conv_array_ref): Ditto.

2011-06-19  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_21.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_21.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-types.c
    trunk/gcc/fortran/trans.c
    trunk/gcc/testsuite/ChangeLog
Comment 50 Tobias Burnus 2011-05-26 17:41:37 UTC
Author: burnus
Date: Thu May 26 17:41:34 2011
New Revision: 174301

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174301
Log:
2011-05-26  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * trans-array.c (gfc_conv_array_ref): Handle pointer coarrays.
        * trans-decl.c (has_coarray_vars, caf_init_block,
        gfor_fndecl_caf_register): New file-global variables.
        (gfc_finish_var_decl): Make sure that coarrays in main are static.
        (gfc_build_qualified_array): Generate coarray token variable.
        (gfc_get_symbol_decl): Don't use a static initializer for coarrays.
        (gfc_build_builtin_function_decls): Set gfor_fndecl_caf_register.
        (gfc_trans_deferred_vars, gfc_emit_parameter_debug_info): Skip for
        static coarrays.
        (generate_local_decl): Check for local coarrays.
        (create_main_function): SYNC ALL before calling MAIN.
        (generate_coarray_sym_init): Register static coarray.
        (generate_coarray_init): Generate CAF registering constructor
        function.
        (gfc_generate_function_code): Call it, if needed, do not create
        cgraph twice.
        (gfc_generate_module_vars, gfc_process_block_locals): Call
        generate_coarray_init.
        * trans-types.c (gfc_get_nodesc_array_type): Generate pointers
        * for
        -fcoarray=lib.
        * trans.h (gfor_fndecl_caf_register): New variable.
        (lang_type): New element caf_token.
        (GFC_TYPE_ARRAY_CAF_TOKEN): New macro.

2011-05-26  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray/registering_1.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray/registering_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/fortran/trans-types.c
    trunk/gcc/fortran/trans.h
    trunk/gcc/testsuite/ChangeLog
Comment 51 Tobias Burnus 2011-05-27 21:29:22 UTC
Author: burnus
Date: Fri May 27 21:29:19 2011
New Revision: 174364

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174364
Log:
2011-05-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * check.c (gfc_check_associated, gfc_check_null): Add coindexed
        * check.
        * match.c (gfc_match_nullify): Ditto.
        * resolve.c (resolve_deallocate_expr): Ditto.
        * trans-types.c (gfc_get_nodesc_array_type): Don't set
        * restricted
        for nonpointers.

2011-05-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_22.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_22.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/match.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/trans-types.c
    trunk/gcc/testsuite/ChangeLog
Comment 52 Tobias Burnus 2011-05-29 18:15:15 UTC
Author: burnus
Date: Sun May 29 18:15:08 2011
New Revision: 174410

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174410
Log:
2011-05-29  Tobias Burnus  <burnus@net-b.de>
            Richard Guenther  <rguenther@suse.de>

        PR fortran/18918
        * trans-types.c (gfc_get_nodesc_array_type): Don't mess with
        the type's TREE_TYPE.
        * trans-array.c (gfc_conv_array_ref): Use TYPE_MAIN_VARIANT.
        * trans.c (gfc_build_array_ref): Ditto.

2011-05-29  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_23.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_23.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-types.c
    trunk/gcc/fortran/trans.c
    trunk/gcc/testsuite/ChangeLog
Comment 53 Tobias Burnus 2011-05-29 18:17:44 UTC
Author: burnus
Date: Sun May 29 18:17:40 2011
New Revision: 174411

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174411
Log:
2011-05-29  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * interface.c (compare_parameter): Add check for passing coarray
        to allocatable noncoarray dummy.

2011-05-29  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_24.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_24.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/interface.c
    trunk/gcc/testsuite/ChangeLog
Comment 54 Tobias Burnus 2011-05-31 18:25:54 UTC
Author: burnus
Date: Tue May 31 18:25:51 2011
New Revision: 174503

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174503
Log:
2011-05-31  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * resolve.c (resolve_fl_variable): Handle static coarrays
        with non-constant cobounds.
        (resolve_symbol): Handle SAVE statement without arguments
        for coarrays.
        * trans-array.c (gfc_trans_array_cobounds): New function.
        (gfc_trans_array_bounds): Place code by call to it.
        * trans-array.h (gfc_trans_array_cobounds): New prototype.
        * trans-decl.c (gfc_get_symbol_decl, gfc_trans_deferred_vars):
        Handle static coarrays with nonconstant cobounds.

2011-05-31  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray/save_1.f90: New.
        * gfortran.dg/coarray_4.f90: Update dg-error.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-array.h
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray_4.f90
Comment 55 Tobias Burnus 2011-05-31 18:41:00 UTC
Author: burnus
Date: Tue May 31 18:40:55 2011
New Revision: 174504

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174504
Log:
2011-05-31  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * trans-array.c (gfc_trans_dummy_array_bias): Handle
        cobounds of assumed-shape arrays.

2011-05-31  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray/dummy_1.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray/dummy_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/testsuite/ChangeLog
Comment 56 Tobias Burnus 2011-05-31 20:04:13 UTC
Author: burnus
Date: Tue May 31 20:04:09 2011
New Revision: 174510

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174510
Log:
2011-05-31  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * intrinsic.c (klass): Add CLASS_ATOMIC.
        (add_subroutines): Add atomic_ref/atomic_define.
        * intrinsic.texi (ATOMIC_REF, ATOMIC_DEFINE): Document.
        * intrinsic.h (gfc_check_atomic_def, gfc_check_atomic_ref,
        gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New prototypes.
        * gfortran.h (gfc_isym_id): Add GFC_ISYM_ATOMIC_DEF
        and GFC_ISYM_ATOMIC_REF.
        (gfc_atomic_int_kind, gfc_atomic_logical_kind): New global vars.
        * iresolve.c (gfc_resolve_atomic_def, gfc_resolve_atomic_ref):
        * New
        functions.
        * check.c (gfc_check_atomic, gfc_check_atomic_def,
        gfc_check_atomic_ref): New functions.
        * iso-fortran-env.def (ISOFORTRANENV_FILE_ATOMIC_INT_KIND,
        ISOFORTRANENV_FILE_ATOMIC_LOGICAL_KIND): Change kind value.
        * trans-intrinsic.c (conv_intrinsic_atomic_def,
        conv_intrinsic_atomic_ref, gfc_conv_intrinsic_subroutine): New
        functions.
        (conv_intrinsic_move_alloc) Renamed from
        gfc_conv_intrinsic_move_alloc - and made static.
        * trans.h (gfc_conv_intrinsic_move_alloc): Remove.
        (gfc_conv_intrinsic_subroutine) Add prototype.
        * trans.c (trans_code): Call gfc_conv_intrinsic_subroutine.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray/atomic_1.f90
    trunk/gcc/testsuite/gfortran.dg/coarray_atomic_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.h
    trunk/gcc/fortran/intrinsic.texi
    trunk/gcc/fortran/iresolve.c
    trunk/gcc/fortran/iso-fortran-env.def
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/fortran/trans-types.c
    trunk/gcc/fortran/trans.c
    trunk/gcc/fortran/trans.h
    trunk/gcc/testsuite/ChangeLog
Comment 57 Tobias Burnus 2011-06-08 06:28:44 UTC
Author: burnus
Date: Wed Jun  8 06:28:41 2011
New Revision: 174796

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174796
Log:
2011-06-08  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.h (gfc_statement): Add ST_LOCK and ST_UNLOCK.
        (gfc_exec_op): Add EXEC_LOCK and EXEC_UNLOCK.
        (gfc_code): Add expr4.
        * match.h (gfc_match_lock, gfc_match_unlock): New prototypes.
        * match.c (gfc_match_lock, gfc_match_unlock,
        lock_unlock_statement): New functions.
        (sync_statement): Bug fix, avoiding double freeing.
        (gfc_match_if): Handle LOCK/UNLOCK statement.
        * parse.c (decode_statement, next_statement,
        gfc_ascii_statement): Ditto.
        * st.c (gfc_free_statement): Handle LOCK and UNLOCK.
        * resolve.c (resolve_lock_unlock): New function.
        (resolve_code): Call it.
        * dump-parse-tree.c (show_code_node): Handle LOCK/UNLOCK.
        * frontend-passes.c (gfc_code_walker): Optimize gfc_code's expr4.

2011-06-08  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_lock_1.f90: New.
        * gfortran.dg/coarray_lock_2.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_lock_1.f90
    trunk/gcc/testsuite/gfortran.dg/coarray_lock_2.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/dump-parse-tree.c
    trunk/gcc/fortran/frontend-passes.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/match.c
    trunk/gcc/fortran/match.h
    trunk/gcc/fortran/parse.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/st.c
    trunk/gcc/testsuite/ChangeLog
Comment 58 Tobias Burnus 2011-06-20 21:12:42 UTC
Author: burnus
Date: Mon Jun 20 21:12:39 2011
New Revision: 175228

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175228
Log:
2011-06-20  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.h (gfc_check_vardef_context): Update prototype.
        (iso_fortran_env_symbol): Handle derived types.
        (symbol_attribute): Add lock_comp.
        * expr.c (gfc_check_vardef_context): Add LOCK_TYPE check.
        * interface.c (compare_parameter, gfc_procedure_use): Handle
        LOCK_TYPE.
        (compare_actual_formal): Update
        gfc_check_vardef_context call.
        * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
        * intrinsic.c (check_arglist): Ditto.
        * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire):
        * Ditto.
        * iso-fortran-env.def (ISOFORTRAN_LOCK_TYPE): Add.
        * intrinsic.texi (ISO_FORTRAN_ENV): Document LOCK_TYPE.
        * module.c (mio_symbol_attribute): Handle lock_comp.
        (create_derived_type): New function.
        (use_iso_fortran_env_module): Call it to handle LOCK_TYPE.
        * parse.c (parse_derived): Add constraint check for LOCK_TYPE.
        * resolve.c (resolve_symbol, resolve_lock_unlock): Add
        * constraint
        checks for LOCK_TYPE.
        (gfc_resolve_iterator, resolve_deallocate_expr,
        resolve_allocate_expr, resolve_code, resolve_transfer): Update
        gfc_check_vardef_context call.
        * trans-stmt.h (gfc_trans_lock_unlock): New prototype.
        * trans-stmt.c (gfc_trans_lock_unlock): New function.
        * trans.c (trans_code): Handle LOCK and UNLOCK.

2011-06-20  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_lock_1.f90: Update dg-error.
        * gfortran.dg/coarray_lock_3.f90: New.
        * gfortran.dg/coarray/lock_1.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray/lock_1.f90
    trunk/gcc/testsuite/gfortran.dg/coarray_lock_3.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/expr.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/interface.c
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.texi
    trunk/gcc/fortran/io.c
    trunk/gcc/fortran/iso-fortran-env.def
    trunk/gcc/fortran/module.c
    trunk/gcc/fortran/parse.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/trans-stmt.c
    trunk/gcc/fortran/trans-stmt.h
    trunk/gcc/fortran/trans.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray_lock_1.f90
Comment 59 Tobias Burnus 2011-06-20 21:17:52 UTC
Close as FIXED.

There is now a full parsing support for coarrays and with few exceptions (bugs), the single image support is complete.

I think it thus makes sense to close this PR and track the remaining issues and the multi-image support elsewhere. See also http://gcc.gnu.org/wiki/Coarray
Comment 60 H.J. Lu 2011-06-21 00:20:27 UTC
On Linux/x86, I got

FAIL: gfortran.dg/coarray_lock_3.f90  -O   (test for errors, line 72)
Comment 61 Dominique d'Humieres 2011-06-21 06:20:29 UTC
> On Linux/x86, I got
>
> FAIL: gfortran.dg/coarray_lock_3.f90  -O   (test for errors, line 72)

On x86_64-apple-darwin10 too. The following reduced code does not give the expected error:

subroutine lock_test2
  use iso_fortran_env
  implicit none
  type t
  end type t
  type(t) :: x
  type(lock_type), save :: lock[*],lock2(2)[*]
  lock(lock)
  lock(lock2(1))
  lock(lock[1]) ! { dg-error "must be a scalar coarray of type LOCK_TYPE" } ! <-- no error
end subroutine lock_test2
Comment 62 Tobias Burnus 2011-06-21 07:34:52 UTC
(In reply to comment #61)
> > FAIL: gfortran.dg/coarray_lock_3.f90  -O   (test for errors, line 72)
> The following reduced code does not give the expected error:
>   lock(lock[1]) ! { dg-error "must be a scalar coarray of type LOCK_TYPE" } !

Thanks for the report. There are three bugs:

a) The code is valid and there should be no dg-error. Seemingly, I forget to apply the update patch for that file.

b) The wording of the error message is wrong. As the error message correctly states, "lock[1]" is *not* a coarray - but no coarray is required. Being coindexed or being the component of a coarray is also sufficient.

c) "LOCK(a%lock)" in the following example is valid, but it is rejected:

use iso_fortran_env
implicit none
type t
  type(lock_type) :: lock
end type t

type t2
  type(lock_type), allocatable :: lock(:)[:]
end type t2

type(t) :: a[*]
type(t2) :: b

allocate(b%lock(1)[*])
LOCK(a%lock)    ! FAILS
LOCK(a[1]%lock)

LOCK(b%lock(1))
LOCK(b%lock(1)[1])
end
Comment 63 Tobias Burnus 2011-06-27 14:05:12 UTC
(In reply to comment #62)

I have a draft patch, which still fails to diagnose some issues; and I got stuck with understanding C1302. Thus, I asked at J3:
http://j3-fortran.org/pipermail/j3/2011-June/004483.html
Comment 64 John David Anglin 2011-07-05 11:31:17 UTC
(In reply to comment #61)
> > On Linux/x86, I got
> >
> > FAIL: gfortran.dg/coarray_lock_3.f90  -O   (test for errors, line 72)
> 
> On x86_64-apple-darwin10 too. The following reduced code does not give the
> expected error:
> 
> subroutine lock_test2
>   use iso_fortran_env
>   implicit none
>   type t
>   end type t
>   type(t) :: x
>   type(lock_type), save :: lock[*],lock2(2)[*]
>   lock(lock)
>   lock(lock2(1))
>   lock(lock[1]) ! { dg-error "must be a scalar coarray of type LOCK_TYPE" } !
> <-- no error
> end subroutine lock_test2

Same on hppa64-hp-hpux11.11.
Comment 65 Tobias Burnus 2011-07-11 08:14:13 UTC
Author: burnus
Date: Mon Jul 11 08:14:05 2011
New Revision: 176137

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176137
Log:
2011-07-11  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_lock_3.f90: Remove bogus dg-error.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray_lock_3.f90
Comment 66 Tobias Burnus 2011-08-18 15:10:30 UTC
Author: burnus
Date: Thu Aug 18 15:10:25 2011
New Revision: 177867

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177867
Log:
2011-08-18  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * parse.c (parse_derived): Add lock_type
        checks, improve coarray_comp handling.
        * resolve.c (resolve_allocate_expr,
        resolve_lock_unlock, resolve_symbol): Fix lock_type
        constraint checks.

2011-08-18  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        * gfortran.dg/coarray_lock_1.f90: Update dg-error.
        * gfortran.dg/coarray_lock_3.f90: Fix test.
        * gfortran.dg/coarray_lock_4.f90: New.
        * gfortran.dg/coarray_lock_5.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/coarray_lock_4.f90
    trunk/gcc/testsuite/gfortran.dg/coarray_lock_5.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/parse.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray_lock_1.f90
    trunk/gcc/testsuite/gfortran.dg/coarray_lock_3.f90
Comment 67 Tobias Burnus 2011-08-18 15:14:10 UTC
The LOCK_TYPE issues (cf. comment 62) are now fixed. Except for a few bugs and for lacking support of polymorphic coarrays (which depends on polymorphic array support), all coarray features should work in the single image mode.

Hence, this PR has done its duty and I close it as FIXED.

For the pending issues, see http://gcc.gnu.org/wiki/Coarray


Thanks for your patience with this PR (which was reported almost 7 years ago - even before the work on the Fortran 2008 has started).
Comment 68 Tobias Burnus 2011-08-18 19:01:49 UTC
Really close as FIXED