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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr47446-1.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do assemble } */
2
/* { dg-options "-O2" } */
3
 
4
extern void abort (void);
5
enum
6
{
7
  __GCONV_OK = 0,
8
  __GCONV_NOCONV,
9
  __GCONV_NODB,
10
  __GCONV_NOMEM,
11
  __GCONV_EMPTY_INPUT,
12
  __GCONV_FULL_OUTPUT,
13
  __GCONV_ILLEGAL_INPUT,
14
  __GCONV_INCOMPLETE_INPUT,
15
  __GCONV_ILLEGAL_DESCRIPTOR,
16
  __GCONV_INTERNAL_ERROR
17
};
18
int
19
foo (int result)
20
{
21
  int irreversible = 0;
22
  switch (result)
23
    {
24
    case __GCONV_ILLEGAL_INPUT:
25
      irreversible = -1L;
26
      break;
27
    case __GCONV_FULL_OUTPUT:
28
      irreversible = -2L;
29
      break;
30
    case __GCONV_INCOMPLETE_INPUT:
31
      irreversible = -3L;
32
      break;
33
    case __GCONV_EMPTY_INPUT:
34
    case __GCONV_OK:
35
      break;
36
    default:
37
      abort ();
38
    }
39
  return irreversible;
40
}

powered by: WebSVN 2.1.0

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