3 // Copyright (C) 2001, 2002 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 31 Dec 2001 <nathan@codesourcery.com>
6 // PR 4379. We created pointers to member references and pointers to
7 // member fields when we shouldn't have.
11 int &m; // { dg-error "invalid use of non-static data member" "" }
17 template<class T> int f1(T x);
18 template<class T> int f2(T x);
22 f1( &D::m); // { dg-error "cannot create pointer to ref" "" }
31 f1( &D::m); // { dg-error "cannot create pointer to ref" "" }
32 f1( &(D::m)); // { dg-error "from this location" "" }