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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [20100825.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do run }
2
 
3
typedef enum { zero = 0, one = 1, two = 2, ENUM_MAX = 3 } my_enum;
4
my_enum e;
5
extern "C" void abort (void);
6
int __attribute__((noinline)) foo() { return 10; }
7
int main()
8
{
9
  int r;
10
  r = foo();
11
  if ((r < 0) || (r >= ENUM_MAX))
12
    return 0;
13
  e = (my_enum)r;
14
  abort ();
15
}

powered by: WebSVN 2.1.0

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