tree-optimization/113385 - wrong loop father with early exit vectorization
[official-gcc.git] / gcc / testsuite / gfortran.dg / gomp / minmaxloc_1.f90
blobb3691f774de38b65e04375c113e8ce4999df2855
1 ! { dg-do compile }
3 ! PR fortran/108450
4 ! This program used to cause an ICE because of the double resolution
5 ! of the maxloc expression and the addition of a hidden unnamed argument
6 ! during the first resolution.
8 ! Original testcase from G. Steinmetz
10 subroutine s1
11 integer :: a(8) = 0
12 integer :: l
13 integer :: n
14 !$omp atomic
15 n = maxloc(a, mask=l) ! { dg-error ".mask. argument of .maxloc. intrinsic at .1. must be LOGICAL" }
16 end
18 subroutine s2
19 integer :: a(8) = 0
20 integer :: l
21 integer :: n
22 !$omp atomic
23 n = minloc(a, mask=l) ! { dg-error ".mask. argument of .minloc. intrinsic at .1. must be LOGICAL" }
24 end
26 subroutine s3
27 integer :: a(8) = 0
28 integer :: l
29 integer :: n
30 !$omp atomic
31 n = findloc(a, 3, mask=l) ! { dg-error ".mask. argument of .findloc. intrinsic at .1. must be LOGICAL" }
32 end