* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / pr81325.C
blob47f321344772d6079a6afcda16ec01da374cd9cd
1 // PR target/81325
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-O2 -fcompare-debug" }
5 struct A { A(const char *, const int & = 0); };
6 template <typename> struct B;
7 template <typename> struct C {
8   int _M_i;
9   void m_fn1() { __atomic_fetch_add(&_M_i, 0, __ATOMIC_RELAXED); }
11 struct D {
12   int *Data;
13   long Length = 0;
14   D(int) : Data() {}
16 template <> struct B<int> : C<int> {};
17 struct F {
18   B<int> RefCount;
19   void m_fn2() { RefCount.m_fn1(); }
21 struct G {
22   F *Obj;
23   G(const G &p1) : Obj(p1.Obj) {
24     if (Obj) {
25       F *a = 0;
26       a->m_fn2();
27     }
28   }
30 struct H {
31   int CPlusPlus : 1;
33 struct I {
34   enum {} KindId;
36 template <typename ResultT, typename ArgT> struct J {
37   void operator()();
38   ResultT operator()(ArgT) { return ResultT(); }
40 struct K {
41   int AllowBind;
42   I SupportedKind;
43   I RestrictKind;
44   G Implementation;
46 struct L {
47   L(int) : Implementation(Implementation) {}
48   K Implementation;
50 struct M {
51   int Param1;
53 struct N {
54   N(int, L &p2) : Param2(p2) {}
55   L Param2;
57 struct O {
58   L m_fn3();
60 L ignoringImpCasts(L);
61 J<O, L> b;
62 L hasName(const A &);
63 M hasOverloadedOperatorName(D);
64 J<O, int> c;
65 struct P {
66   void m_fn4(L, int);
68 struct Q {
69   void m_fn5(P *);
71 H d;
72 void Q::m_fn5(P *p1) {
73   if (!d.CPlusPlus) {
74     c();
75     L e = 0, f = ignoringImpCasts(e);
76     b(ignoringImpCasts(f)).m_fn3();
77   }
78   hasOverloadedOperatorName(0);
79   hasName("");
80   L g = 0;
81   N(0, g);
82   L h(0);
83   p1->m_fn4(h, 0);