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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20030903-1.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
/* Test that we don't let stmt.c think that the enumeration's values are
2
   the entire set of possibilities.  Such an assumption is false for C,
3
   but true for other languages.  */
4
 
5
enum X { X1 = 1, X2, X3, X4 };
6
static volatile enum X test = 0;
7
static void y(int);
8
 
9
int main()
10
{
11
  switch (test)
12
    {
13
    case X1: y(1); break;
14
    case X2: y(2); break;
15
    case X3: y(3); break;
16
    case X4: y(4); break;
17
    }
18
  return 0;
19
}
20
 
21
static void y(int x) { abort (); }

powered by: WebSVN 2.1.0

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