blob: 440ac4d0db4b1e6f62ec9bc0e9998cf2c92c0804 [file] [log] [blame]
#include "../../gcc.dg/analyzer/analyzer-decls.h"
int foo_count;
struct foo
{
foo () __attribute__((noinline))
{
foo_count++;
}
~foo () __attribute__((noinline))
{
foo_count--;
}
};
int main ()
{
__analyzer_eval (foo_count == 0); // { dg-warning "TRUE" }
{
foo f;
__analyzer_eval (foo_count == 1); // { dg-warning "TRUE" }
}
__analyzer_eval (foo_count == 0); // { dg-warning "TRUE" }
return 0;
}