Fix bounds with ALLOCATE with source-expr
authorTobias Burnus <burnus@net-b.de>
Tue, 16 Oct 2018 18:37:08 +0000 (20:37 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Tue, 16 Oct 2018 18:37:08 +0000 (20:37 +0200)
commitc152593057a3315c3e11343efb2717d5fa8b5df0
tree494f41ed69baffeea88852147f7a3958480cd6ee
parent91ab2a1d6e137c2eaa6f8f5966b611bca700ef96
Fix bounds with ALLOCATE with source-expr

        PR fortran/67125
        * trans-array.c (gfc_array_init_size, gfc_array_allocate):
        Rename argument e3_is_array_constr to e3_has_nodescriptor
        and update comments.
        * trans-stmt.c (gfc_trans_allocate): Also fix lower bound
        to 1 for nonalloc/nonpointer func results/vars besides
        array constructors.

        PR fortran/67125
        * gfortran.dg/allocate_with_source_26.f90: New.

From-SVN: r265212
gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/fortran/trans-stmt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/allocate_with_source_26.f90 [new file with mode: 0644]