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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Check the fix for PR36795, where the parentheses in the call to foo were
3
! simplified out ie. foo((xx), xx) simplified to foo (xx, xx)
4
!
5
! Conributed by Vivek Rao 
6
!
7
program main
8
  implicit none
9
  character(len=10), allocatable :: xx(:)
10
  character(len=10)              :: yy
11
  allocate (xx(2))
12
  xx(1)      = ""
13
  xx(2)      = "dog"
14
  call foo ((xx),xx)
15
  if (trim (xx(1)) .ne. "dog") call abort
16
  if (size (xx, 1) .ne. 1) call abort
17
contains
18
  subroutine foo (xx,yy)
19
  character(len=*), intent(in)               :: xx(:)
20
  character(len=*), intent(out), allocatable :: yy(:)
21
  if (allocated (yy)) deallocate (yy)
22
  allocate (yy(1))
23
  yy = xx(2)
24
  end subroutine foo
25
end program main
26
 

powered by: WebSVN 2.1.0

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