aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.apple/bitreverse-12.c
blob: d28615106cd783f47d8e47d926aab603279e536d (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
/* APPLE LOCAL file */
/* Radar 4317709 */
/* { dg-do compile { target powerpc-*-darwin* } } */
/* { dg-options "-w" } */

#pragma reverse_bitfields on
#pragma ms_struct on
#pragma pack(1)

typedef struct _bee
{
        unsigned short  cA : 8;
        unsigned short  fB : 1;
        unsigned short  fC : 1;
        unsigned short  wVal : 9;
} BEE;

extern const BEE rgbee[100];

int LaLaFunction()
{
        int foo = 1;
        int bar = 3;
        switch (foo)
                {
        case 200 :
                {
                if (rgbee[bar].wVal == 2) 
                        goto LNeverChange;
                break;
                }

        default:
LNeverChange:
                bar = 0x23;
                break;
                }

        return 1;
}