(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr109238.c
       1  /* PR tree-optimization/109238 */
       2  /* { dg-do compile } */
       3  /* { dg-options "-O2 -Wall" } */
       4  
       5  void foo (void *) __attribute__((noreturn));
       6  void bar (void *);
       7  
       8  void
       9  baz (void *p)
      10  {
      11    void *c = __builtin_realloc (p, 16);
      12    if (c)
      13      foo (c);
      14    for (;;)
      15      bar (__builtin_realloc (p, 8));	/* { dg-bogus "pointer 'p' may be used after '__builtin_realloc'" } */
      16  }