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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Test fix of PR28118, in which a substring reference to an
3
! actual argument with an array reference would cause a segfault.
4
!
5
! Contributed by Paul Thomas  
6
!
7
program gfcbug33
8
  character(12) :: a(2)
9
  a(1) = "abcdefghijkl"
10
  a(2) = "mnopqrstuvwx"
11
  call foo ((a(2:1:-1)(6:)))
12
  call bar ((a(:)(7:11)))
13
contains
14
  subroutine foo (chr)
15
    character(7) :: chr(:)
16
    if (chr(1)//chr(2) .ne. "rstuvwxfghijkl") call abort ()
17
  end subroutine foo
18
  subroutine bar (chr)
19
    character(*) :: chr(:)
20
    if (trim(chr(1))//trim(chr(2)) .ne. "ghijkstuvw") call abort ()
21
  end subroutine bar
22
end program gfcbug33

powered by: WebSVN 2.1.0

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