summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/abi/mangle31.C
blob: 4be2e0b03fc92ddd2e8f054c6f3a418aac2d1ad4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// PR c++/39095
// { dg-do compile }

struct B
{
  int b;
};

struct A
{
  B *operator->();
  A ();
  B b;
};

A::A ()
{
}

B *
A::operator->()
{
  return &b;
}

A a;

int
foo ()
{
  return a->b;
}

// { dg-final { scan-assembler "_ZN1AptEv" } }
// { dg-final { scan-assembler-not "_ZN1AdtEv" } }