Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/same_type_as_3.f03 @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
145:1830386684a0 | 152:2b5abeee2509 |
---|---|
1 ! { dg-do run } | |
2 ! | |
3 ! Test the fix for PR57710. | |
4 ! | |
5 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org> | |
6 ! | |
7 module m | |
8 type t | |
9 end type t | |
10 type t2 | |
11 integer :: ii | |
12 class(t), allocatable :: x | |
13 end type t2 | |
14 contains | |
15 subroutine fini(x) | |
16 type(t) :: x | |
17 end subroutine fini | |
18 end module m | |
19 | |
20 use m | |
21 block | |
22 type(t) :: z | |
23 type(t2) :: y | |
24 y%ii = 123 | |
25 if (.not. same_type_as(y%x, z)) call abort () | |
26 end block | |
27 end |