modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/execute/20050203-1.c (about)

     1  /* Reduced testcase extracted from Samba source code.  */
     2  
     3  #include <stdlib.h>
     4  
     5  static void __attribute__((__noinline__))
     6       foo (unsigned char *p) {
     7    *p = 0x81;
     8  }
     9  
    10  static void __attribute__((__noinline__))
    11       bar (int x) {
    12    asm ("");
    13  }
    14  
    15  int main() {
    16    unsigned char b;
    17  
    18    foo(&b);
    19    if (b & 0x80)
    20      {
    21        bar (b & 0x7f);
    22        exit (0);
    23      }
    24    else
    25      {
    26        bar (b & 1);
    27        abort ();
    28      }
    29  }