111
|
1 ! { dg-do run }
|
|
2 ! PR20713. Pad and truncate string.
|
|
3
|
|
4 character(len = 6),parameter:: a = 'hello'
|
|
5 character(len = 6),parameter:: b = 'hello *'
|
|
6 character(len = 6),parameter:: c (1:1) = 'hello'
|
|
7 character(len = 11) line
|
|
8
|
|
9 write (line, '(6A)') a, 'world'
|
131
|
10 if (line .ne. 'hello world') STOP 1
|
111
|
11
|
|
12 write (line, '(6A)') b, 'world'
|
131
|
13 if (line .ne. 'hello world') STOP 2
|
111
|
14
|
|
15 write (line, '(6A)') c, 'world'
|
131
|
16 if (line .ne. 'hello world') STOP 3
|
111
|
17
|
|
18 write (line, '(6A)') c(1), 'world'
|
131
|
19 if (line .ne. 'hello world') STOP 4
|
111
|
20 end
|