URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 303 |
Rev 338 |
! Program to test the default initialisation of enumerators inside different program unit
|
! Program to test the default initialisation of enumerators inside different program unit
|
|
|
module mod
|
module mod
|
implicit none
|
implicit none
|
enum, bind (c)
|
enum, bind (c)
|
enumerator :: red , yellow, blue
|
enumerator :: red , yellow, blue
|
enumerator :: green
|
enumerator :: green
|
end enum
|
end enum
|
end module mod
|
end module mod
|
|
|
program main
|
program main
|
use mod
|
use mod
|
implicit none
|
implicit none
|
|
|
if (red /= 0 ) call abort
|
if (red /= 0 ) call abort
|
if (yellow /= 1) call abort
|
if (yellow /= 1) call abort
|
if (blue /= 2) call abort
|
if (blue /= 2) call abort
|
if (green /= 3) call abort
|
if (green /= 3) call abort
|
end program main
|
end program main
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.