[Bug fortran/91649] ICE in gfc_resolve_findloc, at fortran/iresolve.c:1827
gscfq@t-online.de
gcc-bugzilla@gcc.gnu.org
Tue Sep 3 17:39:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91649
G. Steinmetz <gscfq@t-online.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
--- Comment #1 from G. Steinmetz <gscfq@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
More information about the Gcc-bugs
mailing list