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

        * gfortran.h (gfc_init_coarray_decl): Remove.
        * parse.c (translate_all_program_units): Remove call to it.
        (gfc_parse_file): Update call.
        * trans.h (gfor_fndecl_caf_this_image,
        gfor_fndecl_caf_num_images): Add.
        (gfort_gvar_caf_num_images,
        gfort_gvar_caf_this_image): Remove.
        * trans-decl.c (gfor_fndecl_caf_this_image,
        gfor_fndecl_caf_num_images): Add.
        (gfort_gvar_caf_num_images,
        gfort_gvar_caf_this_image): Remove.
        (gfc_build_builtin_function_decls): Init new decl.
        (gfc_init_coarray_dec): Remove.
        (create_main_function): Change calls.
        * trans-intrinsic.c (trans_this_image, trans_image_index,
        conv_intrinsic_cobound): Generate call to new library function
        instead of to a static variable.
        * trans-stmt.c (gfc_trans_sync): Ditto.

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

        * gfortran.dg/coarray_lib_this_image_1.f90: New.
        * gfortran.dg/coarray_lib_this_image_2.f90: New.

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

        * caf/libcaf.h (_gfortran_caf_this_image,
        * _gfortran_caf_num_images):
        New prototypes.
        (_gfortran_caf_init): Change prototype.
        (mpi_token_t): New typedef.
        (TOKEN): New define.
        * caf/mpi.c (_gfortran_caf_this_image,
        * _gfortran_caf_num_images):
        New functions.
        (_gfortran_caf_init): Update.
        (_gfortran_caf_finalize, _gfortran_caf_register,
        _gfortran_caf_deregister): Use mpi_token_t.
        * caf/single.c (_gfortran_caf_this_image,
        * _gfortran_caf_num_images):
        New functions.
        (_gfortran_caf_init): Update.
        (_gfortran_caf_finalize, _gfortran_caf_register,
        _gfortran_caf_deregister): Use mpi_token_t, simplify.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209951 138bc75d-0d04-0410-961f-82ee72b054a4
2014-04-30  Tobias Burnus  <burnus@net-b.de>

        * resolve.c (resolve_function): Don't do
        assumed-size check for lcobound/ucobound.
        * trans-types.c (gfc_build_array_type): Only build an array
        descriptor with codimensions for allocatable coarrays.

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

        * gfortran.dg/coarray_lib_this_image_2.f90: Update dump.
        * gfortran.dg/coarray_lib_token_4.f90: Ditto.
        * gfortran.dg/coarray/codimension.f90: New.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209952 138bc75d-0d04-0410-961f-82ee72b054a4
2014-04-30  Tobias Burnus  <burnus@net-b.de>

        * trans-decl.c (create_function_arglist): Add hidden coarray
        * arguments
        also for polymorphic coarrays.
        * trans-expr.c (gfc_conv_procedure_call): Pass hidden coarray
        arguments also for polymorphic coarrays.

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

        * gfortran.dg/coarray_poly_7.f90
        * gfortran.dg/coarray_poly_8.f90
        * gfortran.dg/coarray_poly_9.f90



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209953 138bc75d-0d04-0410-961f-82ee72b054a4