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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [array_temporaries_3.f90] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR38119 - The scalarizer got the loop size wrong
3
! for the temporary coming from the call to 'same'.
4
!
5
! Contributed by Mikael Morin 
6
! based on a program by Vivek Rao.
7
!
8
module bar
9
  implicit none
10
  character(len = 2) :: c(1)
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) // trim (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 xmain()
23
    c =  trim_append(["a"],same(["b"]))  ! The problem occurred here
24
  end subroutine xmain
25
end module bar
26
  use bar
27
  call xmain
28
  if (c(1) .ne. "ab") call abort
29
end
30
! { dg-final { cleanup-modules "bar" } }
31
 

powered by: WebSVN 2.1.0

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