Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/allocate_alloc_opt_10.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 |
---|---|
22 allocate(x,MOLD=z) | 22 allocate(x,MOLD=z) |
23 | 23 |
24 select type (x) | 24 select type (x) |
25 type is (t2) | 25 type is (t2) |
26 print *,x%j | 26 print *,x%j |
27 if (x%j/=4) call abort | 27 if (x%j/=4) STOP 1 |
28 x%j = 5 | 28 x%j = 5 |
29 class default | 29 class default |
30 call abort() | 30 STOP 1 |
31 end select | 31 end select |
32 | 32 |
33 | 33 |
34 !!! second example (dynamic, PR 44541) | 34 !!! second example (dynamic, PR 44541) |
35 | 35 |
36 allocate(y,MOLD=x) | 36 allocate(y,MOLD=x) |
37 | 37 |
38 select type (y) | 38 select type (y) |
39 type is (t2) | 39 type is (t2) |
40 print *,y%j | 40 print *,y%j |
41 if (y%j/=4) call abort | 41 if (y%j/=4) STOP 2 |
42 class default | 42 class default |
43 call abort() | 43 STOP 2 |
44 end select | 44 end select |
45 | 45 |
46 end | 46 end |