[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / pr38984.c
blob5e68e8858bc0fd946a496263a37ce297f9e3301c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fno-delete-null-pointer-checks -fdump-tree-optimized -fno-isolate-erroneous-paths-dereference" }
3 * */
5 int f(int *p)
7 int a = *p;
8 int *null = 0;
9 *null = 5;
10 return *p == a;
13 /* { dg-final { scan-tree-dump-times "\\\*p" 2 "optimized" } } */
14 /* { dg-final { scan-tree-dump-not "return 1" "optimized" } } */