(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
20021029-1.c
       1  /* Test whether difference of local labels doesn't force
       2     variables into writable sections.  */
       3  /* { dg-do compile { target fpic } } */
       4  /* { dg-options "-O2 -fpic" } */
       5  /* { dg-additional-options "-G0" { target nios2-*-* } }  */
       6  /* { dg-final { scan-assembler-not ".data.rel.ro.local" } } */
       7  /* { dg-final { scan-assembler-symbol-section {^_?ar} {^\.(const|rodata)|\[RO\]} } } */
       8  /* { dg-require-effective-target label_values } */
       9  /* { dg-require-effective-target indirect_jumps } */
      10  
      11  int foo (int a)
      12  {
      13    static const int ar[] = { &&l1 - &&l1, &&l2 - &&l1 };
      14    void *p = &&l1 + ar[a];
      15    goto *p;
      16    l1:
      17      return 1;
      18    l2:
      19      return 2;
      20  }