1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdelete-null-pointer-checks -fisolate-erroneous-paths-attribute -fdump-tree-isolate-paths -fdump-tree-phicprop1" } */
3 /* { dg-skip-if "" keeps_null_pointer_checks } */
6 extern void foo(void *) __attribute__ ((__nonnull__ (1)));
13 foo (a
== 42 ? &z
: (void *) 0);
22 /* We testing that the path isolation code can take advantage of the
23 returns non-null attribute to isolate a path where NULL flows into
26 We also verify that after isolation phi-cprop simplifies the
27 return statement so that it returns &z directly. */
28 /* { dg-final { scan-tree-dump-times "__builtin_trap" 2 "isolate-paths"} } */
29 /* { dg-final { scan-tree-dump-times "foo .&z.;" 1 "phicprop1"} } */