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

     1  /* submitted by kenneth zadeck */
     2  
     3  static int test_var;
     4  
     5  /* the idea here is that not only is inlinable, inlinable but since it
     6     is static, the cgraph node will not be marked as output.  The
     7     current version of the code ignores these cgraph nodes.  */
     8  
     9  void not_inlinable()  __attribute__((noinline));
    10  
    11  static void  
    12  inlinable ()
    13  {
    14    test_var = -10;
    15  }
    16  
    17  void 
    18  not_inlinable ()
    19  {
    20    inlinable();
    21  }
    22  
    23  main ()
    24  {
    25    test_var = 10;
    26    /* Variable test_var should be considered call-clobbered by the call
    27       to not_inlinable().  */
    28    not_inlinable ();
    29    if (test_var == 10)
    30      abort ();
    31    return 0;
    32  }