re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])
authorTobias Burnus <burnus@gcc.gnu.org>
Thu, 26 May 2011 17:41:34 +0000 (19:41 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Thu, 26 May 2011 17:41:34 +0000 (19:41 +0200)
commitb8ff4e88e790df436088012ce6db7f7d3b6c1514
tree6849d2aa0446ce8a27b11e1707397da8df445fe2
parent92e948a836d98e98a1721008795dfddbb47828a6
re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])

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.

From-SVN: r174301
gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/fortran/trans-decl.c
gcc/fortran/trans-types.c
gcc/fortran/trans.h
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/coarray/registering_1.f90 [new file with mode: 0644]