mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-11 08:54:35 +08:00
* g++.dg/parse/parse6.C: New test.
From-SVN: r60795
This commit is contained in:
parent
bf16e74582
commit
f349fb24ba
@ -1,3 +1,7 @@
|
||||
2003-01-02 Neil Booth <neil@daikokuya.co.uk>
|
||||
|
||||
* g++.dg/parse/parse6.C: New test.
|
||||
|
||||
2003-01-02 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
* gcc.dg/h8300-stack-1.c: New.
|
||||
|
31
gcc/testsuite/g++.dg/parse/parse6.C
Normal file
31
gcc/testsuite/g++.dg/parse/parse6.C
Normal file
@ -0,0 +1,31 @@
|
||||
/* PR c++/3012 */
|
||||
/* { dg-do compile } */
|
||||
|
||||
class A
|
||||
{
|
||||
public:
|
||||
|
||||
template <class T>
|
||||
void foo() const
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template <class T>
|
||||
class B
|
||||
{
|
||||
public:
|
||||
|
||||
void bar(const A& a) const
|
||||
{
|
||||
// Compile used to fail with parse error before `;' token
|
||||
a.foo<double>();
|
||||
}
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
A a;
|
||||
B<int> b;
|
||||
b.bar(a);
|
||||
}
|
Loading…
Reference in New Issue
Block a user