OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [repeat_1.f90] - Blame information for rev 302

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! { dg-shouldfail "negative NCOPIES argument to REPEAT intrinsic" }
3
  character(len=80) :: str
4
  integer :: i
5
  i = -1
6
  write(str,"(a)") repeat ("a", f())
7
  if (trim(str) /= "aaaa") call abort
8
  write(str,"(a)") repeat ("a", i)
9
 
10
contains
11
 
12
  integer function f()
13
    integer :: x = 5
14
    save x
15
 
16
    x = x - 1
17
    f = x
18
  end function f
19
end
20
! { dg-output "Fortran runtime error: Argument NCOPIES of REPEAT intrinsic is negative .* line 6)"

powered by: WebSVN 2.1.0

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