2 ! Test Hollerith constants assigned to allocatable array
3 ! and used in I/O list.
5 integer, allocatable
:: c (:,:)
6 character (len
= 20) ch
13 if (ch
.ne
. "(A4)(A5)") STOP 1
15 if (ch
.ne
. "Hell") STOP 2
16 write (ch
, c (1,2)) 'Hello'
17 if (ch
.ne
. "Hello") STOP 3
20 if (ch
.ne
. " hello") STOP 4
21 write (ch
, "(A5)") 5Hhello
22 if (ch
.ne
. "hello") STOP 5
26 ! { dg-warning "Hollerith constant" "const" { target *-*-* } 9 }
27 ! { dg-warning "Conversion" "conversion" { target *-*-* } 9 }
29 ! { dg-warning "Hollerith constant" "const" { target *-*-* } 10 }
30 ! { dg-warning "Conversion" "conversion" { target *-*-* } 10 }
32 ! { dg-warning "Non-character in FORMAT tag" "" { target *-*-* } 14 }
34 ! { dg-warning "Non-character in FORMAT tag" "" { target *-*-* } 16 }
36 ! { dg-warning "Hollerith constant" "const" { target *-*-* } 19 }
37 ! { dg-warning "Hollerith constant" "const" { target *-*-* } 21 }