Debian Codegraph @

gcc/testsuite/g++.dg/template/friend18.C

raw
1 // { dg-do run }
2
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 26 Mar 2003 <[email protected]>
5
6 // PR 10158. implicit inline template friends ICE'd
7
8 typedef int int32_t __attribute__((mode (__SI__)));
9
10 template <int32_t N> struct X
11 {
12 template <int32_t M> friend int32_t foo(X const &, X<M> const&)
13 {
14 return N * 10000 + M;
15 }
16 };
17 X<1234> bring;
18 X<5678> brung;
19
20 int main() {
21 return foo (bring, brung) != 12345678;
22 }