[to-be-committed] [RISC-V] Use Zbkb for general 64 bit constants when profitable
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_64.f90
blobd0209a101c95b9773a8a1699bededfa7411c43c7
1 ! { dg-do compile }
2 ! { dg-options "-fdump-tree-original" }
4 ! Test the fix for PR80850 in which the _len field was not being
5 ! set for 'arg' in the call to 'foo'.
7 type :: mytype
8 integer :: i
9 end type
10 class (mytype), pointer :: c
12 allocate (c, source = mytype (99_8))
14 call foo(c)
15 call bar(c)
17 deallocate (c)
19 contains
21 subroutine foo (arg)
22 class(*) :: arg
23 select type (arg)
24 type is (mytype)
25 if (arg%i .ne. 99_8) STOP 1
26 end select
27 end subroutine
29 subroutine bar (arg)
30 class(mytype) :: arg
31 select type (arg)
32 type is (mytype)
33 if (arg%i .ne. 99_8) STOP 2
34 end select
35 end subroutine
37 end
38 ! { dg-final { scan-tree-dump-times "arg.*._len" 1 "original" } }