builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr33923.c
blobe933762b1b3eb0198bf1690bba2e2ace8dfd7ab5
1 /* PR target/33923 */
2 /* Testcase by Martin Michlmayr <tbm@cyrius.com> */
4 /* { dg-do compile } */
5 /* { dg-options "-O3 --param max-partial-antic-length=0" } */
7 static int pendingCommand;
8 static int currentModifiers;
9 typedef struct
11 int (*updateKeys) (int *keyPressed);
13 ProtocolOperations;
14 static const ProtocolOperations *protocol;
15 int
16 brl_readCommand (void)
18 unsigned long int keys;
19 int command;
20 int keyPressed;
21 unsigned char routingKeys[200];
22 int routingKeyCount;
23 signed char rightVerticalSensor;
24 if (pendingCommand != (-1))
26 return command;
28 if (!protocol->updateKeys (&keyPressed))
30 if (rightVerticalSensor >= 0)
31 keys |= 1;
32 if ((routingKeyCount == 0) && keys)
34 if (currentModifiers)
36 doChord:switch (keys);
38 else
40 doCharacter:
41 command = 0X2200;
42 if (keys & 0X01UL)
43 command |= 0001;
44 if (keys & 0X02UL)
45 command |= 0002;
46 if (keys & 0X04UL)
47 command |= 0004;
48 if (keys & 0X08UL)
49 command |= 0010;
50 if (keys & 0X10UL)
51 command |= 0020;
52 if (keys & 0X20UL)
53 command |= 0040;
54 if (currentModifiers & (0X0010 | 0X0200))
55 command |= 0100;
56 if (currentModifiers & 0X0040)
57 command |= 0200;
58 if (currentModifiers & 0X0100)
59 command |= 0X020000;
60 if (currentModifiers & 0X0400)
61 command |= 0X080000;
62 if (currentModifiers & 0X0800)
63 command |= 0X040000;
65 unsigned char key1 = routingKeys[0];
66 if (key1 == 0)
68 } else if (key1 == 1)
69 if (keys)
71 currentModifiers |= 0X0010;
72 goto doCharacter;
76 return command;