nvptx, libgfortran: Switch out of "minimal" mode
[official-gcc.git] / gcc / testsuite / gfortran.dg / same_type_as_2.f03
blob3ceb95573eb36d571281f0cff56a45b85a296256
1 ! { dg-do run }
3 ! Verifying the runtime behavior of the intrinsic function SAME_TYPE_AS.
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
7  type :: t1
8   integer :: i
9  end type 
11  type, extends(t1) :: t2
12   integer :: j
13  end type
15  CLASS(t1), pointer :: c1,c2
16  TYPE(t1), target :: x1
17  TYPE(t2) ,target :: x2
19  intrinsic :: SAME_TYPE_AS
20  logical :: l
22  c1 => NULL()
24  l = SAME_TYPE_AS (x1,x1)
25  print *,l
26  if (.not.l) STOP 1
27  l = SAME_TYPE_AS (x1,x2)
28  print *,l
29  if (l) STOP 2
31  c1 => x1
32  l = SAME_TYPE_AS (c1,x1)
33  print *,l
34  if (.not.l) STOP 3
35  l = SAME_TYPE_AS (c1,x2)
36  print *,l
37  if (l) STOP 4
39  c1 => x2
40  c2 => x2
41  l = SAME_TYPE_AS (c1,c2)
42  print *,l
43  if (.not.l) STOP 5
45  c1 => x1
46  c2 => x2
47  l = SAME_TYPE_AS (c1,c2)
48  print *,l
49  if (l) STOP 6
51 end