Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/associate_22.f90 @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
7 character(len=10) :: a | 7 character(len=10) :: a |
8 | 8 |
9 ! This works. | 9 ! This works. |
10 s = 'abc' | 10 s = 'abc' |
11 associate(t => s) | 11 associate(t => s) |
12 if (trim(t) /= 'abc') call abort | 12 if (trim(t) /= 'abc') STOP 1 |
13 end associate | 13 end associate |
14 | 14 |
15 ! This failed. | 15 ! This failed. |
16 associate(u => 'abc') | 16 associate(u => 'abc') |
17 if (trim(u) /= 'abc') call abort | 17 if (trim(u) /= 'abc') STOP 2 |
18 end associate | 18 end associate |
19 | 19 |
20 ! This failed. | 20 ! This failed. |
21 a = s // 'abc' | 21 a = s // 'abc' |
22 associate(v => s // 'abc') | 22 associate(v => s // 'abc') |
23 if (trim(v) /= trim(a)) call abort | 23 if (trim(v) /= trim(a)) STOP 3 |
24 end associate | 24 end associate |
25 | 25 |
26 ! This failed. | 26 ! This failed. |
27 a = trim(s) // 'abc' | 27 a = trim(s) // 'abc' |
28 associate(w => trim(s) // 'abc') | 28 associate(w => trim(s) // 'abc') |
29 if (trim(w) /= trim(a)) call abort | 29 if (trim(w) /= trim(a)) STOP 4 |
30 end associate | 30 end associate |
31 | 31 |
32 ! This failed. | 32 ! This failed. |
33 associate(x => trim('abc')) | 33 associate(x => trim('abc')) |
34 if (trim(x) /= 'abc') call abort | 34 if (trim(x) /= 'abc') STOP 5 |
35 end associate | 35 end associate |
36 | 36 |
37 end program foo | 37 end program foo |