Mercurial > hg > CbC > CbC_gcc
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 |
rev | line source |
---|---|
111 | 1 ! { dg-do run } |
2 ! PR fortran/31803 | |
3 ! Assigning a substring to a pointer | |
4 | |
5 program test | |
6 implicit none | |
7 character (len = 7), target :: textt | |
8 character (len = 7), pointer :: textp | |
9 character (len = 5), pointer :: textp2 | |
10 textp => textt | |
11 textp2 => textt(1:5) | |
131 | 12 if(len(textp) /= 7) STOP 1 |
13 if(len(textp2) /= 5) STOP 2 | |
111 | 14 textp = 'aaaaaaa' |
15 textp2 = 'bbbbbbb' | |
131 | 16 if(textp /= 'bbbbbaa') STOP 3 |
17 if(textp2 /= 'bbbbb') STOP 4 | |
111 | 18 end program test |