1 extern void unknown_returns (const char *p
);
2 extern void unknown_noreturn (const char *p
) __attribute__((__noreturn__
));
4 void test_1 (const char *p
)
8 __builtin_strcmp ("a", p
); /* { dg-message "pointer 'p' is dereferenced here" "" { target c } } */
9 if (p
) /* { dg-warning "check of 'p' for NULL after already dereferencing it" "" { target c } } */
11 __builtin_strcmp ("a", p
);
14 void test_2 (const char *p
)
18 __builtin_strcmp ("a", p
);
19 if (p
) /* { dg-bogus "check of 'p' for NULL after already dereferencing it" } */
21 __builtin_strcmp ("a", p
);