Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr47446-2.c
blob5410c7f38dd575d17e75b44eef9f3497220f9b61
1 /* { dg-do assemble } */
2 /* { dg-require-effective-target fpic } */
3 /* { dg-options "-O2 -fpic" } */
5 extern void abort (void);
6 enum
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
19 int
20 foo (int result)
22 int irreversible = 0;
23 switch (result)
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 ();
40 return irreversible;