arm: Add .type and .size to __gnu_cmse_nonsecure_call [PR115360]
[official-gcc.git] / gcc / testsuite / gfortran.dg / type_to_class_2.f03
blob2f7eaf680267cc3910ea2623e8ed97d6ceffa384
1 ! { dg-do run }
3 ! Test the fix for PR64757.
5 ! Contributed by Michael Lee Rilee  <mike@rilee.net>
7   type :: Test
8     integer :: i
9   end type
11   type :: TestReference
12      class(Test), allocatable :: test
13   end type
15   type(TestReference) :: testList
16   type(test) :: x
18   testList = TestReference(Test(99))  ! ICE in fold_convert_loc was here
20   x = testList%test
22   select type (y => testList%test)    ! Check vptr set
23     type is (Test)
24       if (x%i .ne. y%i) STOP 1
25     class default
26       STOP 2
27   end select
28 end