Debian Codegraph @

gcc/testsuite/g++.dg/opt/dtor1.C

raw
1 // { dg-do run }
2 // { dg-options "-O2" }
3
4 int i;
5
6 struct S {
7 S ();
8 S (const S&);
9 ~S ();
10 };
11
12 S::S () { ++i; }
13 S::S (const S&) { ++i; }
14 S::~S () { --i; }
15
16 inline void f (S) {
17 }
18
19 int main () {
20 {
21 S s;
22 f (s);
23 }
24
25 return i;
26 }
27