[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / pr84279.C
bloba88d3fb847038dc8b156a95f4a9c9241af52350f
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-require-effective-target powerpc_p8vector_ok } */
4 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
5 /* { dg-options "-O3 -mcpu=power8 -g -fPIC -fvisibility=hidden -fstack-protector-strong" } */
7 template <typename, typename T> struct E { T e; };
8 struct J {
9   unsigned k, l;
10   J (unsigned x, unsigned y) : k(x), l(y) {}
12 typedef struct A {
13   J n, p;
14   A ();
15   A (J x, J y) : n(x), p(y) {}
16 } *S;
17 S t;
18 struct B {
19   struct C {
20     S q, r;
21     int u, v;
22     bool m1 (S, A &);
23     J m2 () const;
24     J m3 () const;
25     A m4 () const;
26   };
27   typedef E<unsigned, S> D;
28   void m5 (D *);
29   void m6 (unsigned, A);
31 bool B::C::m1 (S, A &x) { bool o; x = m4 (); return o; }
32 J B::C::m2 () const { unsigned g (u == 0); unsigned h (v); return J (g, h); }
33 J B::C::m3 () const { unsigned g (q != t); unsigned h (r != t); return J (g, h); }
34 A B::C::m4 () const { return A (m2 (), m3 ()); }
35 void B::m5 (D *c) { unsigned x; C ar; A am; if (ar.m1 (c->e, am)) m6 (x, am); }