Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / analyzer / fanalyzer-show-events-in-system-headers.C
blobcc177e3d0bb2e66501297cb25d4f0bd9e0f45115
1 /* { dg-additional-options "-fanalyzer-show-events-in-system-headers" } */
2 /* { dg-skip-if "no shared_ptr in C++98" { c++98_only }  } */
3 /* { dg-skip-if "requires hosted libstdc++ for memory shared_ptr" { ! hostedlib } } */
5 #include <memory>
7 struct A {int x; int y;};
9 int main () { /* { dg-message "\\(1\\) entry to 'main'" "telltale event that we are going within a deeper frame than 'main'" } */
10   std::shared_ptr<A> a;
11   a->x = 4; /* { dg-line deref_a } */ 
12   /* { dg-warning "dereference of NULL" "" { target *-*-* } deref_a } */
14   return 0;