modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/compile/pr89280.c (about)

     1  /* PR tree-optimization/89280 */
     2  
     3  int a;
     4  void foo (void);
     5  __attribute__ ((returns_twice)) int bar (void);
     6  void baz (int, int);
     7  void *buf[5];
     8  
     9  static inline void
    10  inl (int x)
    11  {
    12    while (x)
    13      foo ();
    14  }
    15  
    16  void
    17  test1 (void)
    18  {
    19    for (;;)
    20      foo ();
    21    baz (bar (), a);
    22  }
    23  
    24  void
    25  test2 (void)
    26  {
    27    for (;;)
    28      foo ();
    29    baz (__builtin_setjmp (buf), a);
    30    if (a)
    31      __builtin_longjmp (buf, 1);
    32  }
    33  
    34  void
    35  test3 (void)
    36  {
    37    inl (1);
    38    baz (bar (), a);
    39  }
    40  
    41  void
    42  test4 (void)
    43  {
    44    inl (2);
    45    baz (__builtin_setjmp (buf), a);
    46    if (a)
    47      __builtin_longjmp (buf, 1);
    48  }