1 /* 2 bitfld-5.c from the execute part of the gcc torture tests. 3 */ 4 5 #include <testfwk.h> 6 7 /* See http://gcc.gnu.org/ml/gcc/2009-06/msg00072.html. */ 8 9 #if 0 // Enable when SDCC supports bit-fields wider than 16 bits 10 11 struct s 12 { 13 unsigned long long a:2; 14 unsigned long long b:40; 15 unsigned long long c:22; 16 }; 17 18 void 19 g (unsigned long long a, unsigned long long b) 20 { 21 #ifdef __SDCC 22 __asm; 23 __endasm; 24 #endif 25 if (a != b) 26 ASSERT (0); 27 } 28 29 void 30 f (struct s s, unsigned long long b) 31 { 32 #ifdef __SDCC 33 __asm; 34 __endasm; 35 #endif 36 g (((unsigned long long) (s.b-8)) + 8, b); 37 } 38 #endif 39 40 void testTortureExecute(void)41testTortureExecute (void) 42 { 43 #if 0 // Enable when SDCC supports bit-fields wider than 16 bits 44 struct s s = {1, 10, 3}; 45 struct s t = {1, 2, 3}; 46 f (s, 10); 47 f (t, 0x10000000002); 48 #endif 49 return; 50 } 51