URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 302 |
Rev 384 |
! { dg-do "run" }
|
! { dg-do "run" }
|
! PR fortran/36795
|
! PR fortran/36795
|
! "(str)" (= an expression) was regarded as "str" (= a variable)
|
! "(str)" (= an expression) was regarded as "str" (= a variable)
|
! and thus when yy was deallocated so was xx. Result: An invalid
|
! and thus when yy was deallocated so was xx. Result: An invalid
|
! memory access.
|
! memory access.
|
!
|
!
|
program main
|
program main
|
implicit none
|
implicit none
|
character (len=10), allocatable :: str(:)
|
character (len=10), allocatable :: str(:)
|
allocate (str(1))
|
allocate (str(1))
|
str(1) = "dog"
|
str(1) = "dog"
|
if (size(str) /= 1 .or. str(1) /= "dog") call abort()
|
if (size(str) /= 1 .or. str(1) /= "dog") call abort()
|
contains
|
contains
|
subroutine foo(xx,yy)
|
subroutine foo(xx,yy)
|
character (len=*), intent(in) :: xx(:)
|
character (len=*), intent(in) :: xx(:)
|
character (len=*), intent(out), allocatable :: yy(:)
|
character (len=*), intent(out), allocatable :: yy(:)
|
allocate (yy(size(xx)))
|
allocate (yy(size(xx)))
|
yy = xx
|
yy = xx
|
end subroutine foo
|
end subroutine foo
|
end program main
|
end program main
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.