annotate gcc/testsuite/gfortran.dg/string_pad_trunc.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do run }
kono
parents:
diff changeset
2 ! PR20713. Pad and truncate string.
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 character(len = 6),parameter:: a = 'hello'
kono
parents:
diff changeset
5 character(len = 6),parameter:: b = 'hello *'
kono
parents:
diff changeset
6 character(len = 6),parameter:: c (1:1) = 'hello'
kono
parents:
diff changeset
7 character(len = 11) line
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 write (line, '(6A)') a, 'world'
kono
parents:
diff changeset
10 if (line .ne. 'hello world') call abort
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 write (line, '(6A)') b, 'world'
kono
parents:
diff changeset
13 if (line .ne. 'hello world') call abort
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 write (line, '(6A)') c, 'world'
kono
parents:
diff changeset
16 if (line .ne. 'hello world') call abort
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 write (line, '(6A)') c(1), 'world'
kono
parents:
diff changeset
19 if (line .ne. 'hello world') call abort
kono
parents:
diff changeset
20 end