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