trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): If the mask expression exists and...
[gcc.git] / gcc / testsuite / gfortran.dg / scalar_mask_1.f90
1 ! { dg-do run }
2 program main
3 implicit none
4 real, dimension(2) :: a
5 a(1) = 2.0
6 a(2) = 3.0
7 if (product (a, .false.) /= 1.0) call abort
8 if (product (a, .true.) /= 6.0) call abort
9 if (sum (a, .false.) /= 0.0) call abort
10 if (sum (a, .true.) /= 5.0) call abort
11 if (maxval (a, .true.) /= 3.0) call abort
12 if (maxval (a, .false.) > -1e38) call abort
13 if (maxloc (a, 1, .true.) /= 2) call abort
14 if (maxloc (a, 1, .false.) /= 1) call abort
15 end program main