https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91649
G. Steinmetz <gs...@t-online.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-invalid-code --- Comment #1 from G. Steinmetz <gs...@t-online.de> --- Some more (e.g. accepts a non-conformant type value) : $ cat z4.f90 program p integer :: x(1) = findloc([1, 2, 1], '1', back=.true.) print *, x end $ cat z5.f90 program p type t end type integer :: x(1) = findloc([1, 2, 1], t(), back=.true.) print *, x end $ cat z6.f90 program p logical :: back = .true. integer :: x(1) = findloc([1, 2, 1], 2.0, back=back) print *, x end $ gfortran-10-20190901 -c z4.f90 $ gfortran-10-20190901 -c z5.f90 $ gfortran-10-20190901 -c z6.f90 z6.f90:3:50: 3 | integer :: x(1) = findloc([1, 2, 1], 2.0, back=back) | 1 Error: Parameter 'back' at (1) has not been declared or is a variable, which does not reduce to a constant expression