modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/execute/pr63641.c (about) 1 /* PR tree-optimization/63641 */ 2 3 __attribute__ ((noinline, noclone)) int 4 foo (unsigned char b) 5 { 6 if (0x0 <= b && b <= 0x8) 7 goto lab; 8 if (b == 0x0b) 9 goto lab; 10 if (0x0e <= b && b <= 0x1a) 11 goto lab; 12 if (0x1c <= b && b <= 0x1f) 13 goto lab; 14 return 0; 15 lab: 16 return 1; 17 } 18 19 __attribute__ ((noinline, noclone)) int 20 bar (unsigned char b) 21 { 22 if (0x0 <= b && b <= 0x8) 23 goto lab; 24 if (b == 0x0b) 25 goto lab; 26 if (0x0e <= b && b <= 0x1a) 27 goto lab; 28 if (0x3c <= b && b <= 0x3f) 29 goto lab; 30 return 0; 31 lab: 32 return 1; 33 } 34 35 char tab1[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 36 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1 }; 37 char tab2[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 38 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 39 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 }; 41 42 int 43 main () 44 { 45 int i; 46 asm volatile ("" : : : "memory"); 47 for (i = 0; i < 256; i++) 48 if (foo (i) != (i < 32 ? tab1[i] : 0)) 49 __builtin_abort (); 50 for (i = 0; i < 256; i++) 51 if (bar (i) != (i < 64 ? tab2[i] : 0)) 52 __builtin_abort (); 53 return 0; 54 }