(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.c-torture/
execute/
pr103052.c
       1  static void js_error(void);
       2  static int top;
       3  static void js_throw(void)
       4  {
       5  	__builtin_exit(0);
       6  }
       7  
       8  // LOCATION A -- if js_pop is here, the bug is present
       9  static void js_pop(void)
      10  {
      11  	if (++top > 100)
      12  		js_error();
      13  }
      14  
      15  static void jsC_error(const char *v)
      16  {
      17  	if (v[0] == 0)
      18  		js_error();
      19  	js_throw();
      20  }
      21  static void checkfutureword(const char *exp)
      22  {
      23  	if (!__builtin_strcmp(exp, "const"))
      24  		jsC_error("boom");
      25  }
      26  static void js_error(void) {
      27  	checkfutureword("foo");
      28  	checkfutureword("bar");
      29  	js_pop();
      30  }
      31  int main(void)
      32  {
      33  	checkfutureword("const");
      34  	__builtin_abort ();
      35  }