[Bug fortran/80555] [5/6/7/8 Regression] ICE when using MAXVAL of a rank-2 PARAMETER array in a module
dominiq at lps dot ens.fr
gcc-bugzilla@gcc.gnu.org
Fri Apr 28 12:46:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80555
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Known to work| |4.3.6
Summary|gfortran crashes with |[5/6/7/8 Regression] ICE
|segmentation fault |when using MAXVAL of a
| |rank-2 PARAMETER array in a
| |module
Known to fail| |4.4.7, 4.5.4, 4.6.4, 4.7.3,
| |4.8.5, 4.9.3, 5.4.0, 6.3.0,
| |7.0.1, 8.0
--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed from 4.4.7 up to trunk (8.0). The test compiles with 4.3.6.
Note also that the test
INTEGER, PARAMETER :: a(2,2) = RESHAPE((/1,2,3,4/), SHAPE=(/2,2/))
REAL, DIMENSION(MAXVAL(a)) :: b
print *, MAXVAL(a)
end
compiles and gives 4 at run time.
The following test
INTEGER, PARAMETER :: a(2,2) = RESHAPE((/1,2,3,4/), SHAPE=(/2,2/))
integer :: i = MAXVAL(a)
end
is rejected with
integer :: i = MAXVAL(a)
1
Error: transformational intrinsic 'maxval' at (1) is not permitted in an
initialization expression
More information about the Gcc-bugs
mailing list