Fortran: improve expansion of constant array expressions within constructors
authorHarald Anlauf <anlauf@gmx.de>
Sat, 27 Nov 2021 20:43:52 +0000 (21:43 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Tue, 30 Nov 2021 21:10:06 +0000 (22:10 +0100)
commit6b8ecbc6d6652d061d7c72c64352d51eca2df6ca
treee3b75288123b3aa54ba5a481ddb2a66c35ecb67d
parenta3e75c1491cd2d501081210925a89a65b1c1e5e5
Fortran: improve expansion of constant array expressions within constructors

gcc/fortran/ChangeLog:

PR fortran/102787
* array.c (expand_constructor): When encountering a constant array
expression or array section within a constructor, simplify it to
enable better expansion.

gcc/testsuite/ChangeLog:

* gfortran.dg/array_constructor_54.f90: New test.
gcc/fortran/array.c
gcc/testsuite/gfortran.dg/array_constructor_54.f90 [new file with mode: 0644]