c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / minmaxloc_16.f90
blob099248df2e30798b2bee2db4cc91283dd79d437d
1 ! { dg-do run }
2 ! { dg-options "-fdump-tree-original" }
3 ! PR fortran/104811
4 ! Frontend-optimization mis-optimized minloc/maxloc of character arrays
6 program p
7 character(1) :: str(3)
8 str = ["a", "c", "a"]
9 if (any (maxloc (str) /= 2)) stop 1
10 if (minloc (str,dim=1) /= 1) stop 2
11 end
13 ! { dg-final { scan-tree-dump-times "_gfortran_maxloc0_4_s1" 1 "original" } }
14 ! { dg-final { scan-tree-dump-times "_gfortran_minloc2_4_s1" 1 "original" } }