Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / pr65263.C
blob34459a2667b19497fce06dc128cc6e43559aea07
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -c -w" } */
4 template <class> class A;
5 template <class R> struct VirtualMatrice {
6   virtual bool m_fn1(int) const { return true; }
7   struct B {
8     A<R> x;
9     B(VirtualMatrice *p1, A<R> p2) : x(p2) { p1->m_fn1(0) ?: throw; }
10   };
11   void operator*(A<R> p1) { B(this, p1); }
12   ~VirtualMatrice();
15 template <class> class A {
16 public:
17   operator int *();
18   A(int *, long);
21 class G : public A<int> {
22 public:
23   G(long);
25 int typedef Complex;
26 template <class> class H : VirtualMatrice<int> {};
27 template <class> class C;
28 template <> class C<int> : H<Complex>, VirtualMatrice<Complex> {
29   bool m_fn1(int) const { return true; }
31 template <class K, class Mat>
32 void DoIdoAction(int, int, A<K> p3, A<K>, A<K>, A<K>, Mat, Mat &p8) {
33   p8 *p3;
36 class D {
37   typedef int K;
38   class F {
39     int operator()() const;
40   };
42 int D::F::operator()() const {
43   VirtualMatrice<K> *a;
44   VirtualMatrice<K> b, &B = *a;
45   G c(0), g(1);
46   int d, e, f;
47   A<K> h(&g[f], 0), i(&g[e], 0), j(&g[d], 0);
48   DoIdoAction(0, 3, h, i, j, c, b, B);