This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/44672] [F08] ALLOCATE with SOURCE and no array-spec


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44672

--- Comment #9 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Mon Jun 15 10:08:04 2015
New Revision: 224477

URL: https://gcc.gnu.org/viewcvs?rev=224477&root=gcc&view=rev
Log:
gcc/testsuite/ChangeLog:

2015-06-15  Andre Vehreschild  <vehre@gmx.de>

        PR fortran/44672
        PR fortran/45440
        PR fortran/57307
        * gfortran.dg/allocate_with_source_3.f90: Removed check for
        unimplemented error.
        * gfortran.dg/allocate_with_source_7.f08: New test.
        * gfortran.dg/allocate_with_source_8.f08: New test.

gcc/fortran/ChangeLog:

2015-06-15  Andre Vehreschild  <vehre@gmx.de>

        PR fortran/44672
        PR fortran/45440
        PR fortran/57307
        * gfortran.h: Extend gfc_code.ext.alloc to carry a
        flag indicating that the array specification has to be
        taken from expr3.
        * resolve.c (resolve_allocate_expr): Add F2008 notify
        and flag indicating source driven array spec.
        (resolve_allocate_deallocate): Check for source driven
        array spec, when array to allocate has no explicit
        array spec.
        * trans-array.c (gfc_array_init_size): Get lower and
        upper bound from a tree array descriptor, except when
        the source expression is an array-constructor which is
        fixed to be one-based.
        (retrieve_last_ref): Extracted from gfc_array_allocate().
        (gfc_array_allocate): Enable allocate(array, source= 
        array_expression) as specified by F2008:C633.
        (gfc_conv_expr_descriptor): Add class tree expression
        into the saved descriptor for class arrays.
        * trans-array.h: Add temporary array descriptor to
        gfc_array_allocate ().
        * trans-expr.c (gfc_conv_procedure_call): Special handling
        for _copy() routine translation, that comes without an
        interface. Third and fourth argument are now passed by value.
        * trans-stmt.c (gfc_trans_allocate): Get expr3 array
        descriptor for temporary arrays to allow allocate(array,
        source = array_expression) for array without array
        specification.


Added:
    trunk/gcc/testsuite/gfortran.dg/allocate_with_source_7.f08
    trunk/gcc/testsuite/gfortran.dg/allocate_with_source_8.f08
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-array.h
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/fortran/trans-stmt.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/allocate_with_source_3.f90


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]