annotate gcc/testsuite/gfortran.dg/char_pointer_assign_3.f90 @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 84e7813d76e9
children
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 ! PR fortran/31803
kono
parents:
diff changeset
3 ! Assigning a substring to a pointer
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 program test
kono
parents:
diff changeset
6 implicit none
kono
parents:
diff changeset
7 character (len = 7), target :: textt
kono
parents:
diff changeset
8 character (len = 7), pointer :: textp
kono
parents:
diff changeset
9 character (len = 5), pointer :: textp2
kono
parents:
diff changeset
10 textp => textt
kono
parents:
diff changeset
11 textp2 => textt(1:5)
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
12 if(len(textp) /= 7) STOP 1
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
13 if(len(textp2) /= 5) STOP 2
111
kono
parents:
diff changeset
14 textp = 'aaaaaaa'
kono
parents:
diff changeset
15 textp2 = 'bbbbbbb'
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
16 if(textp /= 'bbbbbaa') STOP 3
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
17 if(textp2 /= 'bbbbb') STOP 4
111
kono
parents:
diff changeset
18 end program test