2014-01-30 Alangi Derick <alangiderick@gmail.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / zero_length_1.f90
blobc76d079e597ffe40ea924038ab8845aadaaaed31
1 ! { dg-do run }
2 ! PR libfortran/31210
3 program test
4 implicit none
5 integer :: l = 0
6 character(len=20) :: s
8 write(s,'(A,I1)') foo(), 0
9 if (trim(s) /= "0") call abort
11 contains
13 function foo()
14 character(len=l) :: foo
15 foo = "XXXX"
16 end function
18 end program test