OSDN Git Service

* gcc.dg/20020201-1.c: Use cleanup-coverage_files.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / ref4.C
1 // { dg-do assemble  }
2 // 
3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 29 Apr 2001 <nathan@codesourcery.com>
5
6 // Bug 2664. We failed to convert_from_reference for non-type
7 // template parms.
8
9 struct cow { };
10
11 cow c;
12
13 void func     (cow &c) {}
14 void operator-(cow &c) {}
15
16 template<cow &C> void test()
17 {
18   func(C); //OK
19   -C;      //bogus error
20 }
21
22 int main()
23 {
24   test<c> ();
25 }