PR target/83368
[official-gcc.git] / gcc / testsuite / gfortran.dg / merge_char_1.f90
blobece939eea06d36ac5bc8481665c260d8c9e5bc71
1 ! { dg-do run }
2 ! { dg-options "-std=legacy" }
4 ! PR 15327
5 ! The merge intrinsic didn't work for strings
6 character*2 :: c(2)
7 logical :: ll(2)
9 ll = (/ .TRUE., .FALSE. /)
10 c = merge( (/ "AA", "BB" /), (/ "CC", "DD" /), ll )
11 if (c(1).ne."AA" .or. c(2).ne."DD") call abort ()
13 c = ""
14 c = merge( (/ "AA", "BB" /), (/ "CC", "DD" /), (/ .TRUE., .FALSE. /) )
15 if (c(1).ne."AA" .or. c(2).ne."DD") call abort ()
16 end