URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
! { dg-do run }
|
! { dg-do run }
|
! { dg-shouldfail "negative NCOPIES argument to REPEAT intrinsic" }
|
! { dg-shouldfail "negative NCOPIES argument to REPEAT intrinsic" }
|
character(len=80) :: str
|
character(len=80) :: str
|
integer :: i
|
integer :: i
|
i = -1
|
i = -1
|
write(str,"(a)") repeat ("a", f())
|
write(str,"(a)") repeat ("a", f())
|
if (trim(str) /= "aaaa") call abort
|
if (trim(str) /= "aaaa") call abort
|
write(str,"(a)") repeat ("a", i)
|
write(str,"(a)") repeat ("a", i)
|
|
|
contains
|
contains
|
|
|
integer function f()
|
integer function f()
|
integer :: x = 5
|
integer :: x = 5
|
save x
|
save x
|
|
|
x = x - 1
|
x = x - 1
|
f = x
|
f = x
|
end function f
|
end function f
|
end
|
end
|
! { dg-output "Fortran runtime error: Argument NCOPIES of REPEAT intrinsic is negative .* line 6)"
|
! { dg-output "Fortran runtime error: Argument NCOPIES of REPEAT intrinsic is negative .* line 6)"
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.