[gcn] mkoffload.cc: Print fatal error if -march has no multilib but generic has
[gcc.git] / gcc / testsuite / g++.dg / debug / dwarf2 / deallocator.C
blobc1d387922ba290d909d9b692f4a165d66f69392c
1 // Test that debug info generated for auto-inserted deallocator is
2 // correctly attributed.
3 // This patch scans for the lineno directly from assembly, which may
4 // differ between different architectures. Because it mainly tests
5 // FE generated debug info, without losing generality, only x86
6 // assembly is scanned in this test.
7 // { dg-do compile { target { i?86-*-* x86_64-*-* } } }
8 // { dg-options "-O2 -fno-exceptions -gdwarf-2 -dA" }
10 struct t {
11   t ();
12   ~t ();
13   void foo();
14   void bar();
17 int bar();
19 void foo(int i)
21   t test_outside;
22   for (int j = 0; j < 10; j++)
23     {
24       t test;
25       test.foo();
26       if (i + j)
27         {
28           test.bar();
29           return;
30         }
31     }
32   if (i) // Threader makes everything after here disappear.
33     {
34       t test;
35       if (i == 10)
36         {
37           test.bar();
38         }
39     }
40   test_outside.foo();
41   return;
43 // { dg-final { scan-assembler "deallocator.C:29" } }
44 // { dg-final { scan-assembler "deallocator.C:24" } }
45 // { dg-final { scan-assembler "deallocator.C:21" } }