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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [enum_1.f90] - Blame information for rev 307

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

Line No. Rev Author Line
1 303 jeremybenn
! Program to test the default initialisation of enumerators
2
 
3
program main
4
  implicit none
5
 
6
  enum, bind (c)
7
    enumerator :: red , yellow, blue
8
    enumerator :: green
9
  end enum
10
 
11
  enum, bind (c)
12
    enumerator :: a , b , c = 10
13
    enumerator :: d
14
  end enum
15
 
16
 
17
  if (red /= 0 ) call abort
18
  if (yellow /= 1) call abort
19
  if (blue /= 2) call abort
20
  if (green /= 3) call abort
21
 
22
  if (a /= 0 ) call abort
23
  if (b /= 1) call abort
24
  if (c /= 10) call abort
25
  if (d /= 11) call abort
26
 
27
 
28
end program main

powered by: WebSVN 2.1.0

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