1! { dg-do compile } 2! 3! PR fortran/38095 4! 5! Contributed by Vivek Rao 6! 7! Compiling the program below gave an ICE 8! 9module bar 10 implicit none 11contains 12elemental function trim_append(xx,yy) result(xy) 13 character (len=*), intent(in) :: xx,yy 14 character (len=len(xx) + len(yy)) :: xy 15 xy = trim(xx) // yy 16end function trim_append 17function same(xx) result(yy) 18 character (len=*), intent(in) :: xx(:) 19 character (len=len(xx)) :: yy(size(xx)) 20 yy = [xx] 21end function same 22subroutine foo(labels) 23 character (len=*), intent(in) :: labels(:) 24 print*,"size(labels)=",size(labels) 25end subroutine foo 26subroutine xmain() 27 call foo(trim_append(["a"],same(["b"]))) 28end subroutine xmain 29end module bar 30 31program main 32 use bar 33 call xmain() 34end program main 35