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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [enum_2.f90] - Blame information for rev 867

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! Program to test the incremental assignment of enumerators
2
 
3
program main
4
  implicit none
5
 
6
  enum, bind (c)
7
    enumerator :: red = 4 , yellow, blue
8
    enumerator  green
9
  end enum
10
 
11
  enum, bind (c)
12
    enumerator :: sun = -10 , mon, tue
13
    enumerator :: wed = 10, sat
14
  end enum
15
 
16
 
17
  if (red /= 4 ) call abort
18
  if (yellow /= (red + 1)) call abort
19
  if (blue /= (yellow + 1)) call abort
20
  if (green /= (blue + 1)) call abort
21
 
22
 
23
  if (sun /= -10 ) call abort
24
  if (mon /= (sun + 1)) call abort
25
  if (tue /= (mon + 1)) call abort
26
  if (wed /= 10) call abort
27
  if (sat /= (wed+1)) call abort
28
 
29
end program main

powered by: WebSVN 2.1.0

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