(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr104288.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -fdump-tree-evrp -fdelete-null-pointer-checks" } */
       3  /* { dg-skip-if "" { keeps_null_pointer_checks } } */
       4  
       5  void keep(int result) __attribute__((noipa));
       6  void keep(int result)
       7  {
       8      if (result)
       9          __builtin_exit(0);
      10  }
      11  
      12  void foo (void *p) __attribute__((nonnull(1)));
      13  
      14  void bar (void *p)
      15  {
      16    keep (p == 0);
      17    foo (p);
      18    if (!p)
      19      __builtin_abort ();
      20  }
      21  
      22  /* { dg-final { scan-tree-dump-not "abort" "evrp" } } */
      23  /* { dg-final { scan-tree-dump-times  "== 0B;" 1 "evrp" } } */