RISC-V: Refactor Dynamic LMUL codes
[official-gcc.git] / gcc / testsuite / gfortran.dg / alloc_comp_constraint_4.f90
blobe24bfe0a2987a4f428d14b3087ee2dfa4bd28e02
1 ! { dg-do compile }
2 ! Tests the fix for PR29422, in which function results
3 ! were not tested for suitability in IO statements.
5 ! Contributed by Dominique d'Humieres <dominiq@lps.ens.fr>
7 Type drv
8 Integer :: i
9 Integer, allocatable :: arr(:)
10 End type drv
12 print *, fun1 () ! { dg-error "cannot have ALLOCATABLE" }
14 contains
15 Function fun1 ()
17 Type(drv) :: fun1
18 fun1%i = 10
19 end function fun1
20 end