https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91649

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
                 CC|                            |kargl at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to G. Steinmetz from comment #1)

> $ 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

I think the error message here is correct.  BACK is
a variable.  It is not a named constant.  Of course,
I could be missing something.

Reply via email to