[gcn] mkoffload.cc: Print fatal error if -march has no multilib but generic has
[gcc.git] / gcc / testsuite / g++.dg / debug / dwarf2 / ref-3.C
blob6294d023d519aee351872b0a212e4b089fbf3cc3
1 // { dg-do compile { target c++11 } }
2 // { dg-options "-g -gno-strict-dwarf -dA" }
3 // { dg-final { scan-assembler-times " DW_AT_reference" 5 } }
4 // { dg-final { scan-assembler-times " DW_AT_rvalue_reference" 5 } }
5 // { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_subroutine_type" 6 } }
6 // { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_ptr_to_member_type" 7 } }
7 // { dg-final { scan-assembler-times " DW_AT_use_location" 1 } }
9 struct S
11   void foo1 ();
12   void bar1 () &;
13   void baz1 () &&;
14   void foo2 () const;
15   void bar2 () const &;
16   void baz2 () const &&;
17   void foo3 () const;
18   void bar3 () const &;
19   void baz3 () const &&;
20   int d;
23 void
24 test ()
26   S s;
27   auto o1 = &S::foo1;
28   auto r1 = &S::bar1;
29   auto z1 = &S::baz1;
30   auto o2 = &S::foo2;
31   auto r2 = &S::bar2;
32   auto z2 = &S::baz2;
33   auto o3 = &S::foo3;
34   auto r3 = &S::bar3;
35   auto z3 = &S::baz3;
36   auto d1 = &S::d;
37   void (S::*o4) () const;
38   o4 = &S::foo3;
39   void (S::*r4) () const &;
40   r4 = &S::bar3;
41   void (S::*z4) () const &&;
42   z4 = &S::baz3;
43   (s.*o1) ();
44   (s.*r1) ();
45   (S ().*z1) ();
46   (s.*o2) ();
47   (s.*r2) ();
48   (S ().*z2) ();
49   (s.*o3) ();
50   (s.*r3) ();
51   (S ().*z3) ();
52   (s.*o4) ();
53   (s.*r4) ();
54   (S ().*z4) ();
55   s.*d1 = 2;