Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / template / friend18.C
blob04ba26e9830c569235565efeb719831bba30291a
1 // { dg-do run }
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 26 Mar 2003 <nathan@codesourcery.com>
6 // PR 10158. implicit inline template friends ICE'd
8 template <int N> struct X
10   template <int M> friend int foo(X const &)
11   {
12     return N * 10000 + M;
13   }
15 X<1234> bring;
17 int main() {
18   return foo<5678> (bring) != 12345678;