Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/20021029-1.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 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-final { scan-assembler-not ".data.rel.ro.local" } } */ | |
6 /* { dg-require-effective-target label_values } */ | |
7 /* { dg-require-effective-target indirect_jumps } */ | |
8 | |
9 int foo (int a) | |
10 { | |
11 static const int ar[] = { &&l1 - &&l1, &&l2 - &&l1 }; | |
12 void *p = &&l1 + ar[a]; | |
13 goto *p; | |
14 l1: | |
15 return 1; | |
16 l2: | |
17 return 2; | |
18 } |