aboutsummaryrefslogtreecommitdiff
path: root/compiler/tests/parser/goto.bad
blob: 4b4e99a023ffad74b37f14a1a8bd69fef9bf66b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

() test(int p) {
  bare1:    // ERROR
    int x;
    int y;
    
    /* ERRORS */
  label;
    goto x;
    goto y;
    goto int;
    goto ();
    ( goto;
    goto test;
    skipto x;
    goto label;
    goto label y;
    
  label if: // ERROR
    int z;
  label xyz:
    int a;
    goto xyz:a; // ERROR
    int xyz:b;
    goto xyz:b; // ERROR
    goto nonexistent:x;// ERROR
    goto p;     // ERROR
  label zzz:x;
  +label bad; // ERROR
  0 label xyz:; // ERROR
    
  label dup:
  label dup:    // ERROR
}

label outside:  // ERROR
int x;
bare2:          // ERROR
int y;
label           // ERROR