URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 303 |
Rev 338 |
! PR14081 character variables in common blocks.
|
! PR14081 character variables in common blocks.
|
|
|
subroutine test1
|
subroutine test1
|
implicit none
|
implicit none
|
common /block/ c
|
common /block/ c
|
character(len=12) :: c
|
character(len=12) :: c
|
|
|
if (c .ne. "Hello World") call abort
|
if (c .ne. "Hello World") call abort
|
end subroutine
|
end subroutine
|
|
|
subroutine test2
|
subroutine test2
|
implicit none
|
implicit none
|
common /block/ a
|
common /block/ a
|
character(len=6), dimension(2) :: a
|
character(len=6), dimension(2) :: a
|
|
|
if ((a(1) .ne. "Hello") .or. (a(2) .ne. "World")) call abort
|
if ((a(1) .ne. "Hello") .or. (a(2) .ne. "World")) call abort
|
end subroutine
|
end subroutine
|
|
|
program strcommon_1
|
program strcommon_1
|
implicit none
|
implicit none
|
common /block/ s, t
|
common /block/ s, t
|
character(len=6) :: s, t
|
character(len=6) :: s, t
|
s = "Hello "
|
s = "Hello "
|
t = "World "
|
t = "World "
|
call test1
|
call test1
|
call test2
|
call test2
|
end program
|
end program
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.