PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr33922.c
blob5e59a3f429f0eb8d6dabedeea818d340161685af
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -ftree-pre" } */
4 typedef enum
6 ST_TiemanStyle,
8 BrailleDisplay;
9 static int pendingCommand;
10 static int currentModifiers;
11 typedef struct
13 int (*updateKeys) (BrailleDisplay * brl, int *keyPressed);
15 ProtocolOperations;
16 static const ProtocolOperations *protocol;
17 int
18 brl_readCommand (BrailleDisplay * brl)
20 unsigned long int keys;
21 int command;
22 int keyPressed;
23 unsigned char routingKeys[200];
24 int routingKeyCount;
25 signed char rightVerticalSensor;
26 if (pendingCommand != (-1))
28 return command;
30 if (!protocol->updateKeys (brl, &keyPressed))
32 if (rightVerticalSensor >= 0)
33 keys |= 1;
34 if ((routingKeyCount == 0) && keys)
36 if (currentModifiers)
38 doChord:switch (keys);
40 else
42 doCharacter:
43 command = 0X2200;
44 if (keys & 0X01UL)
45 command |= 0001;
46 if (keys & 0X02UL)
47 command |= 0002;
48 if (keys & 0X04UL)
49 command |= 0004;
50 if (keys & 0X08UL)
51 command |= 0010;
52 if (keys & 0X10UL)
53 command |= 0020;
54 if (keys & 0X20UL)
55 command |= 0040;
56 if (currentModifiers & (0X0010 | 0X0200))
57 command |= 0100;
58 if (currentModifiers & 0X0040)
59 command |= 0200;
60 if (currentModifiers & 0X0100)
61 command |= 0X020000;
62 if (currentModifiers & 0X0400)
63 command |= 0X080000;
64 if (currentModifiers & 0X0800)
65 command |= 0X040000;
67 unsigned char key1 = routingKeys[0];
68 if (key1 == 0)
71 if (key1 == 1)
72 if (keys)
74 currentModifiers |= 0X0010;
75 goto doCharacter;
79 return command;