OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [enum_2.f90] - Diff between revs 303 and 338

Only display areas with differences | Details | Blame | View Log

Rev 303 Rev 338
! Program to test the incremental assignment of enumerators
! Program to test the incremental assignment of enumerators
program main
program main
  implicit none
  implicit none
  enum, bind (c)
  enum, bind (c)
    enumerator :: red = 4 , yellow, blue
    enumerator :: red = 4 , yellow, blue
    enumerator  green
    enumerator  green
  end enum
  end enum
  enum, bind (c)
  enum, bind (c)
    enumerator :: sun = -10 , mon, tue
    enumerator :: sun = -10 , mon, tue
    enumerator :: wed = 10, sat
    enumerator :: wed = 10, sat
  end enum
  end enum
  if (red /= 4 ) call abort
  if (red /= 4 ) call abort
  if (yellow /= (red + 1)) call abort
  if (yellow /= (red + 1)) call abort
  if (blue /= (yellow + 1)) call abort
  if (blue /= (yellow + 1)) call abort
  if (green /= (blue + 1)) call abort
  if (green /= (blue + 1)) call abort
  if (sun /= -10 ) call abort
  if (sun /= -10 ) call abort
  if (mon /= (sun + 1)) call abort
  if (mon /= (sun + 1)) call abort
  if (tue /= (mon + 1)) call abort
  if (tue /= (mon + 1)) call abort
  if (wed /= 10) call abort
  if (wed /= 10) call abort
  if (sat /= (wed+1)) call abort
  if (sat /= (wed+1)) call abort
end program main
end program main
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.