I would be interested to learn the ultimate reasons to drop these array features? Particularly the array constructors seem like they would be quite useful.
gcc-11 was released in April 2021. It has been accepted e.g., into Debian’s branch experimental (gcc-11 tracker) only, which differs from the analogue about gcc-10. So it might be a bit early for Ubuntu and its LTS’es.
Fortran 2018, a minor revision per WG5, introduced a few facilities that books such as “Modern Fortran Explained” are prone to place under “miscellaneous enhancements”. Among other items, the feature introductions in Fortran 2018 include the following which help in working with arrays:
“Constant properties of an object declared in its entity-decl can be used in its initialization.”
“The type and kind of an implied DO variable in an array constructor … can be specified within the constructor …”
gfortran appears to have some Fortran 2018 items implemented while other features from the standard revision like the couple listed above are awaiting: Fortran2018Status - GCC Wiki
Which version is it? ‘gfcx’ is strange itself - is it an alias maybe? Could you post output of ‘gfcx -v’?
Mine is “gcc version 11.1.0 (Homebrew GCC 11.1.0_1)” and gives:
$ gfortran-11 -std=f2018 arrcons.f90
arrcons.f90:2:42:
2 | real, parameter :: a(*) = [ ( [1.3,2.7], integer :: i=1,10 ), 7.1 ]
| 1
Error: Expected a right parenthesis in expression at (1)
arrcons.f90:4:36:
4 | integer, parameter :: x(*) = [( i, integer :: i=1,N )]
| 1
Error: Expected a right parenthesis in expression at (1)