diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2005-01-07 17:09:15 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2005-01-07 17:09:15 +0000 |
commit | 5aa56f9d8f55f8575046ee7c0059c53e0337906b (patch) | |
tree | a5b28a5bfc7cb9b61346d65b341acdbc5a5dc65c /gcc/testsuite | |
parent | 6992cbd163459446e6a2063ccb3d5f9fb0306622 (diff) | |
download | gcc-5aa56f9d8f55f8575046ee7c0059c53e0337906b.zip gcc-5aa56f9d8f55f8575046ee7c0059c53e0337906b.tar.gz gcc-5aa56f9d8f55f8575046ee7c0059c53e0337906b.tar.bz2 |
re PR c++/19298 (dependent type (references) and calling a function method)
cp:
PR c++/19298
* pt.c (tsubst_qualified_id): Call convert_from_reference.
testsuite:
PR c++/19298
* g++.dg/template/ref2.C: New.
From-SVN: r93055
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/ref2.C | 27 |
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 832d43a..46a2093 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-01-07 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/19298 + * g++.dg/template/ref2.C: New. + 2005-01-07 Andrew Pinski <pinskia@physics.uc.edu> * gcc.c-torture/compile/pr17529.c (y): Change size of array to 1 diff --git a/gcc/testsuite/g++.dg/template/ref2.C b/gcc/testsuite/g++.dg/template/ref2.C new file mode 100644 index 0000000..9feb19d --- /dev/null +++ b/gcc/testsuite/g++.dg/template/ref2.C @@ -0,0 +1,27 @@ +// Copyright (C) 2005 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 7 Jan 2005 <nathan@codesourcery.com> + +// PR 19298: Rejects legal +// Origin: Andrew Pinski <pinskia@gcc.gnu.org> + +struct t +{ + void f() const; +}; + +template <typename _Tp> +struct A +{ + static t const& c; +}; + +template <typename _Tp> +void g(void) +{ + A<_Tp>::c.f(); +} + +void h(void) +{ + g<int>(); +} |