OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* gcc.c-torture/execute/960321-1.x: Remove.
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
980526-1.c
1
int expect_do1 = 1, expect_do2 = 2;
2
3
static int doit(int x){
4
__label__ lbl1;
5
__label__ lbl2;
6
static int jtab_init = 0;
7
static void *jtab[2];
8
9
if(!jtab_init) {
10
jtab[0] = &&lbl1;
11
jtab[1] = &&lbl2;
12
jtab_init = 1;
13
}
14
goto *jtab[x];
15
lbl1:
16
return 1;
17
lbl2:
18
return 2;
19
}
20
21
static void do1(void) {
22
if (doit(0) != expect_do1)
23
abort ();
24
}
25
26
static void do2(void){
27
if (doit(1) != expect_do2)
28
abort ();
29
}
30
31
int main(void){
32
#ifndef NO_LABEL_VALUES
33
do1();
34
do2();
35
#endif
36
exit(0);
37
}