Debian Codegraph @

gcc/testsuite/gfortran.dg/generic_35.f90

raw
1 ! { dg-do compile }
2 !
3 ! PR 86545: ICE in transfer_expr on invalid WRITE statement
4 !
5 ! Contributed by Janus Weil <[email protected]>
6
7 module m
8
9 type tString
10 character(len=:), allocatable :: cs
11 end type
12
13 interface my_trim
14 module procedure trim_string
15 end interface
16
17 contains
18
19 elemental function trim_string(self) result(str)
20 type(tString) :: str
21 class(tString), intent(in) :: self
22 end function
23
24 end module
25
26
27 program p
28 use m
29 type(tString) :: s
30 write(*,*) my_trim(s) ! { dg-error "cannot have ALLOCATABLE components" }
31 end