[to-be-committed] [RISC-V] Use Zbkb for general 64 bit constants when profitable
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr104555.f90
blob1fc5b5bb977b09e9dc4fdf3e98559a1a209ffb17
1 ! { dg-do compile }
3 ! Test the fix for PR104555 in which the select type statement caused an
4 ! ICE because the selector expression was type(t) rather than class(t).
6 ! Contributed by Gerhard Steinmetz <gscfq@t-online.de>
8 program p
9 type t
10 character(:), allocatable :: a
11 end type
12 call s(t("abcd"))
13 call s([t("efgh")])
14 contains
15 subroutine s(x)
16 class(t) :: x(..)
17 select rank (x)
18 rank (0)
19 print *, "|", x%a, "|"
20 select type (y => x)
21 type is (t)
22 print *, "|", y%a, "|"
23 end select
24 rank (1)
25 print *, "|", x(1)%a, "|"
26 select type (y => x)
27 type is (t)
28 print *, "|", y(1)%a, "|"
29 end select
30 end select
31 end
32 end