annotate gcc/testsuite/g++.dg/cpp0x/alias-decl-8.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // { dg-do compile { target c++11 } }
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 struct A {
kono
parents:
diff changeset
4 template <class U> using C = U;
kono
parents:
diff changeset
5 };
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 // The particularity of the below struct is to have more than 7
kono
parents:
diff changeset
8 // fields. In this case, looking up a member here should exercise
kono
parents:
diff changeset
9 // cp/search.c:lookup_field_1 in such a way that it finds it in the
kono
parents:
diff changeset
10 // CLASSTYPE_SORTED_FIELDS of struct A7.
kono
parents:
diff changeset
11 struct A7 {
kono
parents:
diff changeset
12 int f0;
kono
parents:
diff changeset
13 int f1;
kono
parents:
diff changeset
14 int f2;
kono
parents:
diff changeset
15 int f3;
kono
parents:
diff changeset
16 int f4;
kono
parents:
diff changeset
17 int f5;
kono
parents:
diff changeset
18 int f6;
kono
parents:
diff changeset
19 int f7;
kono
parents:
diff changeset
20 template <class U> using C = U;
kono
parents:
diff changeset
21 };
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 template <class T>
kono
parents:
diff changeset
24 struct B {
kono
parents:
diff changeset
25 typename T::template C<int> n; //#0
kono
parents:
diff changeset
26 };
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 // These should trigger the lookup
kono
parents:
diff changeset
29 // of template C inside class A or
kono
parents:
diff changeset
30 // A7, via #0.
kono
parents:
diff changeset
31 B<A> b;
kono
parents:
diff changeset
32 B<A7> c;