(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
builtin-apply3.c
       1  /* PR middle-end/12210 */
       2  /* Origin: Ossadchy Yury A. <waspcoder@mail.ru> */
       3  
       4  /* This used to fail on i686 because the argument was not copied
       5     to the right location by __builtin_apply after the direct call.  */
       6  
       7  /* { dg-do run } */
       8  /* { dg-require-effective-target untyped_assembly } */
       9  /* { dg-xfail-run-if "can cause stack underflow" { amdgcn-*-* } } */
      10  
      11  
      12  #define INTEGER_ARG  5
      13  
      14  extern void abort(void);
      15  
      16  void foo(int arg)
      17  {
      18    if (arg != INTEGER_ARG)
      19      abort();
      20  }
      21  
      22  void bar(int arg)
      23  {
      24    foo(arg);
      25    __builtin_apply(foo, __builtin_apply_args(), 16);
      26  }
      27  
      28  int main(void)
      29  {
      30    bar(INTEGER_ARG);
      31  
      32    return 0;
      33  }