Daily bump.
[gcc.git] / gcc / testsuite / g++.dg / analyzer / ctor-dtor-1.C
blob440ac4d0db4b1e6f62ec9bc0e9998cf2c92c0804
1 #include "../../gcc.dg/analyzer/analyzer-decls.h"
3 int foo_count;
5 struct foo
7   foo () __attribute__((noinline))
8   {
9     foo_count++;
10   }  
11   ~foo () __attribute__((noinline))
12   {
13     foo_count--;
14   }
17 int main ()
19   __analyzer_eval (foo_count == 0); // { dg-warning "TRUE" }
20   {
21     foo f;
22     __analyzer_eval (foo_count == 1); // { dg-warning "TRUE" }
23   }
24   __analyzer_eval (foo_count == 0); // { dg-warning "TRUE" }
25   return 0;