struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-2559.c
blob8371f3361f67ebd001fe80392a16e69c3705ef66
1 /*
2 bug-2559.c
3 */
5 #include <testfwk.h>
7 #include <stdint.h>
9 static inline uint16_t shl_u16(uint16_t a, uint16_t b) {
10 uint16_t r = a << b;
11 return r;
13 static inline uint16_t ashr_u16(int16_t a, int16_t b) {
14 uint16_t r = a >> b;
15 return r;
17 static inline uint16_t or_u16(uint16_t a, uint16_t b) {
18 uint16_t r = a | b;
19 return r;
22 void testSwap_4(void) {
23 uint8_t tt;
24 volatile uint8_t llvm_cbe_tmp__1;
25 uint8_t llvm_cbe_tmp__2;
26 uint8_t llvm_cbe_tmp__3;
28 llvm_cbe_tmp__1 = 18;
29 tt = llvm_cbe_tmp__1;
30 llvm_cbe_tmp__2 = tt;
31 llvm_cbe_tmp__3 = tt;
32 tt = (((uint8_t)(or_u16((((uint16_t)(uint8_t)(((uint8_t)(shl_u16((((uint16_t)(uint8_t)llvm_cbe_tmp__2)), 4)))))), (((uint16_t)(uint8_t)(((uint8_t)(ashr_u16((((uint16_t)(uint8_t)llvm_cbe_tmp__3)), 4))))))))));
34 ASSERT(tt == 33);