gcc/testsuite/gfortran.dg/minval_char_5.f90
raw| 1 | ! { dg-do run } |
| 2 | ! PR fortran/83316 - this used to ICE |
| 3 | program tminmaxval |
| 4 | implicit none |
| 5 | |
| 6 | character(len=*), parameter :: b = "a" |
| 7 | character(len=*), parameter :: e = "c" |
| 8 | character(len=*), parameter :: s(3) = (/"a", "b", "c"/) |
| 9 | |
| 10 | if (minval(s) /= b) then |
| 11 | STOP 1 |
| 12 | end if |
| 13 | |
| 14 | if (maxval(s) /= e) then |
| 15 | STOP 2 |
| 16 | end if |
| 17 | |
| 18 | end program tminmaxval |