(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
ipa/
ipa-pta-10.c
       1  /* { dg-do run } */
       2  /* { dg-options "-O2 -fipa-pta -fdump-ipa-pta2-details" } */
       3  
       4  #include <stdarg.h>
       5  
       6  static void __attribute__((noinline,noclone))
       7  foo (int i, ...)
       8  {
       9    va_list ap;
      10    int *p;
      11    va_start (ap, i);
      12    p = va_arg (ap, int *);
      13    *p = 1;
      14    va_end (ap);
      15  }
      16  extern void abort (void);
      17  int main()
      18  {
      19    int i = 0;
      20    foo (0, &i);
      21    if (i != 1)
      22      abort ();
      23    return 0;
      24  }
      25  
      26  /* Verify we properly handle variadic arguments and do not let escape
      27     stuff through it.  */
      28  
      29  /* { dg-final { scan-ipa-dump "ESCAPED = { (ESCAPED )?(NONLOCAL )?}" "pta2" } } */