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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Check that substrings behave correctly even when zero-sized
3
      implicit none
4
      character(len=10) :: s, t
5
      integer :: i, j
6
 
7
      s = "abcdefghij"
8
      t(:10) = s(1:)
9
      s(6:5) = "foo"
10
      if (s /= t) call abort
11
      i = 2
12
      j = -1
13
      s(i:i+j) = "foo"
14
      if (s /= t) call abort
15
      i = 20
16
      s(i+1:i) = "foo"
17
      if (s /= t) call abort
18
      s(6:5) = s(7:5)
19
      if (s /= t) call abort
20
      s = t(7:6)
21
      if (len(trim(s)) /= 0) call abort
22
      if (len(t(8:4)) /= 0) call abort
23
      if (len(trim(t(8:4))) /= 0) call abort
24
      end

powered by: WebSVN 2.1.0

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