Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.old-deja/g++.pt/crash23.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // { dg-do assemble } |
2 | |
3 template <class A, class B> void foo(); | |
4 template <class C> class bar { | |
5 public: | |
6 int i; | |
131 | 7 template <class B> friend void foo<C,B>(); // { dg-error "34:invalid use of template-id" } |
111 | 8 }; |
9 template <class A, class B> void foo() { | |
10 bar<A> baz; baz.i = 1; | |
11 bar<int> buz; buz.i = 1; | |
12 } | |
13 int main() { | |
14 foo<void,void>(); | |
15 foo<int,void>(); | |
16 } |