Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/class_array_14.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 |
---|---|
13 | 13 |
14 type(typ1) :: x | 14 type(typ1) :: x |
15 | 15 |
16 x%i = 77 | 16 x%i = 77 |
17 call f(x) | 17 call f(x) |
18 if (x%i /= 6) call abort () | 18 if (x%i /= 6) STOP 1 |
19 call f() | 19 call f() |
20 contains | 20 contains |
21 subroutine f(y1) | 21 subroutine f(y1) |
22 class(typ1), intent(out), optional :: y1 | 22 class(typ1), intent(out), optional :: y1 |
23 end subroutine f | 23 end subroutine f |
30 end type mytype2 | 30 end type mytype2 |
31 | 31 |
32 class(mytype), allocatable :: x,y | 32 class(mytype), allocatable :: x,y |
33 allocate (mytype2 :: x) | 33 allocate (mytype2 :: x) |
34 call g(x) | 34 call g(x) |
35 if (allocated (x) .or. .not. same_type_as (x,y)) call abort() | 35 if (allocated (x) .or. .not. same_type_as (x,y)) STOP 2 |
36 | 36 |
37 allocate (mytype2 :: x) | 37 allocate (mytype2 :: x) |
38 call h(x) | 38 call h(x) |
39 if (allocated (x) .or. .not. same_type_as (x,y)) call abort() | 39 if (allocated (x) .or. .not. same_type_as (x,y)) STOP 3 |
40 | 40 |
41 call h() | 41 call h() |
42 contains | 42 contains |
43 subroutine g(y2) | 43 subroutine g(y2) |
44 class(mytype), intent(out), allocatable :: y2 | 44 class(mytype), intent(out), allocatable :: y2 |