2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr60058.C
blob1144137cb91831155690747de097a11d65a63380
1 /* { dg-do compile } */
2 /* { dg-require-visibility "" } */
4 typedef enum {} UErrorCode;
5 class A {
6 public:
7   virtual A &m_fn1(A &, const A &, UErrorCode &) const;
8   void m_fn2();
9   A();
10   A(int);
12 class __attribute__((visibility("hidden"))) B : public A {
13 public:
14   B(A &p1) : norm2(p1), set(0) {}
15   A &m_fn1(A &, const A &, UErrorCode &) const;
16   A &norm2;
17   const int &set;
20 UErrorCode a;
21 A c;
22 void fn1(A *p1) {
23   A b;
24   p1->m_fn1(b, 0, a).m_fn2();
27 void fn2() {
28   B d(c);
29   fn1(&d);