(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
ipa/
propmalloc-1.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -fdump-ipa-pure-const-details -fdelete-null-pointer-checks" } */
       3  
       4  __attribute__((noinline, no_icf, used))
       5  static void *f(__SIZE_TYPE__ n)
       6  {
       7    void *p = __builtin_malloc (n);
       8    if (p == 0)
       9      __builtin_abort ();
      10    return p;
      11  }
      12  
      13  __attribute__((noinline, no_icf, used))
      14  static void *bar(__SIZE_TYPE__ n)
      15  {
      16    void *p = f (n);
      17    return p;
      18  }
      19  
      20  /* { dg-final { scan-ipa-dump "Function f/\[0-9+\]+ found to be malloc" "pure-const" } } */
      21  /* { dg-final { scan-ipa-dump "Function bar/\[0-9+\]+ found to be malloc" "pure-const" } } */