| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-fdump-tree-original" } |
| 3 |
! PR fortran/110585 - simplification of FINDLOC for constant complex arguments |
| 4 |
|
| 5 |
program mvce |
| 6 |
implicit none |
| 7 |
integer, parameter :: a(*) = findloc([(1.,0.),(2.,1.)], (2.,0.)) |
| 8 |
integer, parameter :: b(*) = findloc([(1.,0.),(2.,1.)], (2.,0.), back=.true.) |
| 9 |
integer, parameter :: c(*) = findloc([(1.,0.),(2.,1.)], (2.,1.)) |
| 10 |
integer, parameter :: d(*) = findloc([(1.,0.),(2.,1.)], (2.,1.), back=.true.) |
| 11 |
integer, parameter :: e = findloc([(1.,0.),(2.,1.)], (2.,1.), dim=1) |
| 12 |
if (a(1) /= 0) stop 1 |
| 13 |
if (b(1) /= 0) stop 2 |
| 14 |
if (c(1) /= 2) stop 3 |
| 15 |
if (d(1) /= 2) stop 4 |
| 16 |
if (e /= 2) stop 5 |
| 17 |
end |
| 18 |
|
| 19 |
! { dg-final { scan-tree-dump-not "_gfortran_stop_numeric" "original" } } |