annotate gcc/testsuite/g++.dg/cpp1y/pr79253.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++14 } }
kono
parents:
diff changeset
2 // PR 79253 ICE instantiating lambda body.
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 template <typename> struct A;
kono
parents:
diff changeset
5 template <typename = A<int>> class B {};
kono
parents:
diff changeset
6 template <class T, class U, class V> void foo (U, V) { T (0, 0); }
kono
parents:
diff changeset
7 struct C {};
kono
parents:
diff changeset
8 template <template <bool, bool, bool> class F, class>
kono
parents:
diff changeset
9 void
kono
parents:
diff changeset
10 bar ()
kono
parents:
diff changeset
11 {
kono
parents:
diff changeset
12 F<0, 0, 0>::baz;
kono
parents:
diff changeset
13 }
kono
parents:
diff changeset
14 struct G { int l; };
kono
parents:
diff changeset
15 template <int, int, int> struct E : C
kono
parents:
diff changeset
16 {
kono
parents:
diff changeset
17 E (int, int) : e (0)
kono
parents:
diff changeset
18 {
kono
parents:
diff changeset
19 auto &m = this->m ();
kono
parents:
diff changeset
20 auto c = [&] { m.l; };
kono
parents:
diff changeset
21 }
kono
parents:
diff changeset
22 G &m ();
kono
parents:
diff changeset
23 int e;
kono
parents:
diff changeset
24 };
kono
parents:
diff changeset
25 struct D
kono
parents:
diff changeset
26 {
kono
parents:
diff changeset
27 void
kono
parents:
diff changeset
28 baz () { bar<F, B<>>; }
kono
parents:
diff changeset
29 template <bool, bool, bool> struct F
kono
parents:
diff changeset
30 {
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
31 static B<> baz () { foo<E<0, 0, 0>> (0, 0); return B<>(); }
111
kono
parents:
diff changeset
32 };
kono
parents:
diff changeset
33 };