1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdelete-null-pointer-checks -fisolate-erroneous-paths-attribute -fdump-tree-isolate-paths -fdump-tree-forwprop3" } */
3 /* { dg-skip-if "" keeps_null_pointer_checks } */
9 int * foo(int a
) __attribute__((returns_nonnull
));
10 int * bar(void) __attribute__((returns_nonnull
));
32 /* We testing that the path isolation code can take advantage of the
33 returns non-null attribute to isolate a path where NULL flows into
34 a return statement. We test this twice, once where the NULL flows
35 from a PHI, the second with an explicit return 0 in the IL.
37 We also verify that after isolation cprop simplifies the
38 return statement so that it returns &z directly. */
39 /* { dg-final { scan-tree-dump-times "__builtin_trap" 2 "isolate-paths"} } */
40 /* { dg-final { scan-tree-dump-times "return &z;" 1 "forwprop3"} } */