Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.old-deja / g++.other / refinit2.C
blobab84542d004dff26a3e8f3508ecdc0bc82c38f54
1 // { dg-do assemble  }
2 // 
3 // Copyright (C) 2000, 2002 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 10 Aug 2000 <nathan@codesourcery.com>
6 // bug 381. We gave slightly different diagnostics, when binding an rvalue to
7 // a non-const reference, depending on the precise type to the rvalue.
9 namespace A { 
10 template <class T> void f(T) {}
12 void (* &h)(int) = A::f<int>;       // { dg-error "" } rvalue to non-const
13 void (*const volatile &i)(int) = A::f<int>;  // { dg-error "" } rvalue to volatile
14 void (*const &j)(int) = A::f<int>;
16 int &k = 1;                         // { dg-error "" } rvalue to non-const
17 int &const volatile l = 1;          // { dg-error "" } rvalue to volatile
18 int const &m = 1;