URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [repeat_2.f90] - Rev 694
Compare with Previous | Blame | View Log
! REPEAT intrinsic!! { dg-do run }subroutine foo(i, j, s, t)implicit noneinteger, intent(in) :: i, jcharacter(len=i), intent(in) :: scharacter(len=i*j), intent(in) :: tif (repeat(s,j) /= t) call abortcall bar(j,s,t)end subroutine foosubroutine bar(j, s, t)implicit noneinteger, intent(in) :: jcharacter(len=*), intent(in) :: scharacter(len=len(s)*j), intent(in) :: tif (repeat(s,j) /= t) call abortend subroutine barprogram testimplicit nonecharacter(len=0), parameter :: s0 = ""character(len=1), parameter :: s1 = "a"character(len=2), parameter :: s2 = "ab"character(len=0) :: t0character(len=1) :: t1character(len=2) :: t2integer :: it0 = ""t1 = "a"t2 = "ab"if (repeat(t0, 0) /= "") call abortif (repeat(t1, 0) /= "") call abortif (repeat(t2, 0) /= "") call abortif (repeat(t0, 1) /= "") call abortif (repeat(t1, 1) /= "a") call abortif (repeat(t2, 1) /= "ab") call abortif (repeat(t0, 2) /= "") call abortif (repeat(t1, 2) /= "aa") call abortif (repeat(t2, 2) /= "abab") call abortif (repeat(s0, 0) /= "") call abortif (repeat(s1, 0) /= "") call abortif (repeat(s2, 0) /= "") call abortif (repeat(s0, 1) /= "") call abortif (repeat(s1, 1) /= "a") call abortif (repeat(s2, 1) /= "ab") call abortif (repeat(s0, 2) /= "") call abortif (repeat(s1, 2) /= "aa") call abortif (repeat(s2, 2) /= "abab") call aborti = 0if (repeat(t0, i) /= "") call abortif (repeat(t1, i) /= "") call abortif (repeat(t2, i) /= "") call aborti = 1if (repeat(t0, i) /= "") call abortif (repeat(t1, i) /= "a") call abortif (repeat(t2, i) /= "ab") call aborti = 2if (repeat(t0, i) /= "") call abortif (repeat(t1, i) /= "aa") call abortif (repeat(t2, i) /= "abab") call aborti = 0if (repeat(s0, i) /= "") call abortif (repeat(s1, i) /= "") call abortif (repeat(s2, i) /= "") call aborti = 1if (repeat(s0, i) /= "") call abortif (repeat(s1, i) /= "a") call abortif (repeat(s2, i) /= "ab") call aborti = 2if (repeat(s0, i) /= "") call abortif (repeat(s1, i) /= "aa") call abortif (repeat(s2, i) /= "abab") call abortcall foo(0,0,"","")call foo(0,1,"","")call foo(0,2,"","")call foo(1,0,"a","")call foo(1,1,"a","a")call foo(1,2,"a","aa")call foo(2,0,"ab","")call foo(2,1,"ab","ab")call foo(2,2,"ab","abab")end program test
