PR lto/84212 - -Wno-* does not disable warnings from -flto link stage
[official-gcc.git] / gcc / testsuite / g++.dg / tc1 / dr20.C
blob93338518190ecd5ee649865b7c942688b7884b45
1 // { dg-do run }
2 // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
3 // DR20: Some clarifications needed for 12.8 para 15 
5 extern "C" int printf(const char*, ...);
6 extern "C" void abort(void);
8 int count = 0;
10 class Thing {
11 public:
12   Thing() {
13   }
14   ~Thing() {
15   }
16   Thing(const Thing&)
17   {
18     count += 1;
19   }
22 Thing f() {
23   Thing t;
24   return t;
27 int main(void)
29   Thing t2 = f();
30   printf("%d %x\n", count, &t2);
31   if (count != 0)
32     abort();
33   return 0;