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.
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