summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/s390-1.C
blob: bf37ca449e34f98779804968da0ff04c3466b3d7 (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
// { dg-do compile { target s390x-*-* } }
// { dg-options "-O3 -fPIC" }

class A
{
public:
  void f (void) { _M_a = 0; }
  void g (void) { _M_a = 1; }
  void h (void);

private:
  int _M_a;
};

class B : virtual public A
{
};

void
test (B& x)
{
  for (int i = 0; i < 17; i++)
   {
     x.f ();
     (x.*&A::g) ();
     x.h ();
   }
}

// Check that every call to A::g goes via the PLT.
// { dg-final { scan-assembler-not "brasl\[^@\]*\n" } }