(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr47446-2.c
       1  /* { 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  }