[to-be-committed] [RISC-V] Use Zbkb for general 64 bit constants when profitable
[official-gcc.git] / gcc / testsuite / gfortran.dg / extends_type_of_2.f03
blobb55eded96f963abfa6f7ff122b41517d37e06a35
1 ! { dg-do run }
3 ! PR 47180: [OOP] EXTENDS_TYPE_OF returns the wrong result for disassociated polymorphic pointers 
5 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
7 implicit none
9 type t1
10   integer :: a
11 end type t1
13 type, extends(t1):: t11
14   integer :: b
15 end type t11
17 type(t1)  , target  :: a1
18 type(t11) , target  :: a11
19 class(t1) , pointer :: b1
20 class(t11), pointer :: b11
22 b1  => NULL()
23 b11 => NULL()
25 if (.not. extends_type_of(b1 , a1)) STOP 1
26 if (.not. extends_type_of(b11, a1)) STOP 2
27 if (.not. extends_type_of(b11,a11)) STOP 3
29 b1  => a1
30 b11 => a11
32 if (.not. extends_type_of(b1 , a1)) STOP 4
33 if (.not. extends_type_of(b11, a1)) STOP 5
34 if (.not. extends_type_of(b11,a11)) STOP 6
36 end