URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 302 |
Rev 384 |
! { dg-do compile }
|
! { dg-do compile }
|
! PR 18883: Fake result variables of non-constant length, in module
|
! PR 18883: Fake result variables of non-constant length, in module
|
module foo
|
module foo
|
contains
|
contains
|
function s_to_c(chars)
|
function s_to_c(chars)
|
character, pointer :: chars(:)
|
character, pointer :: chars(:)
|
character(len=len(chars)) :: s_to_c
|
character(len=len(chars)) :: s_to_c
|
s_to_c = 'a'
|
s_to_c = 'a'
|
end function s_to_c
|
end function s_to_c
|
end module foo
|
end module foo
|
|
|
program huj
|
program huj
|
|
|
use foo
|
use foo
|
|
|
implicit none
|
implicit none
|
character, pointer :: c(:)
|
character, pointer :: c(:)
|
character(3) :: s
|
character(3) :: s
|
|
|
allocate(c(5))
|
allocate(c(5))
|
c = (/"a", "b", "c" /)
|
c = (/"a", "b", "c" /)
|
s = s_to_c(c)
|
s = s_to_c(c)
|
|
|
end program huj
|
end program huj
|
|
|
! { dg-final { cleanup-modules "foo" } }
|
! { dg-final { cleanup-modules "foo" } }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.