OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [char_length_13.f90] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do compile }
2
!
3
! PR fortran/38095
4
!
5
! Contributed by Vivek Rao
6
!
7
! Compiling the program below gave an ICE
8
!
9
module bar
10
  implicit none
11
contains
12
elemental 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
16
end function trim_append
17
function same(xx) result(yy)
18
  character (len=*), intent(in) :: xx(:)
19
  character (len=len(xx))       :: yy(size(xx))
20
  yy = [xx]
21
end function same
22
subroutine foo(labels)
23
  character (len=*), intent(in) :: labels(:)
24
  print*,"size(labels)=",size(labels)
25
end subroutine foo
26
subroutine xmain()
27
  call foo(trim_append(["a"],same(["b"])))
28
end subroutine xmain
29
end module bar
30
 
31
program main
32
  use bar
33
  call xmain()
34
end program main
35
 
36
! { dg-final { cleanup-modules "bar" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.