Debian Codegraph @

gcc/testsuite/g++.dg/other/s390-1.C

raw
1 // { dg-do compile { target s390x-*-* } }
2 // { dg-options "-O3 -fPIC" }
3
4 class A
5 {
6 public:
7 void f (void) { _M_a = 0; }
8 void g (void) { _M_a = 1; }
9 void h (void);
10
11 private:
12 int _M_a;
13 };
14
15 class B : virtual public A
16 {
17 };
18
19 void
20 test (B& x)
21 {
22 for (int i = 0; i < 17; i++)
23 {
24 x.f ();
25 (x.*&A::g) ();
26 x.h ();
27 }
28 }
29
30 // Check that every call to A::g goes via the PLT.
31 // { dg-final { scan-assembler-not "brasl\[^@\]*\n" } }
32