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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr47446-2.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-require-effective-target fpic } */
3
/* { dg-options "-O2 -fpic" } */
4
 
5
extern void abort (void);
6
enum
7
{
8
  __GCONV_OK = 0,
9
  __GCONV_NOCONV,
10
  __GCONV_NODB,
11
  __GCONV_NOMEM,
12
  __GCONV_EMPTY_INPUT,
13
  __GCONV_FULL_OUTPUT,
14
  __GCONV_ILLEGAL_INPUT,
15
  __GCONV_INCOMPLETE_INPUT,
16
  __GCONV_ILLEGAL_DESCRIPTOR,
17
  __GCONV_INTERNAL_ERROR
18
};
19
int
20
foo (int result)
21
{
22
  int irreversible = 0;
23
  switch (result)
24
    {
25
    case __GCONV_ILLEGAL_INPUT:
26
      irreversible = -1L;
27
      break;
28
    case __GCONV_FULL_OUTPUT:
29
      irreversible = -2L;
30
      break;
31
    case __GCONV_INCOMPLETE_INPUT:
32
      irreversible = -3L;
33
      break;
34
    case __GCONV_EMPTY_INPUT:
35
    case __GCONV_OK:
36
      break;
37
    default:
38
      abort ();
39
    }
40
  return irreversible;
41
}

powered by: WebSVN 2.1.0

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