OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [template25.C] - Diff between revs 305 and 338

Only display areas with differences | Details | Blame | View Log

Rev 305 Rev 338
// { dg-do run  }
// { dg-do run  }
// PRMS Id: 6393
// PRMS Id: 6393
// Bug: g++ is too lax in considering UPTs to be the same.
// Bug: g++ is too lax in considering UPTs to be the same.
template 
template 
class Bar
class Bar
{
{
public:
public:
  R do_bar (T arg);
  R do_bar (T arg);
};
};
template 
template 
class Foo
class Foo
{
{
  T i;
  T i;
public:
public:
  void do_foo () {}
  void do_foo () {}
  void do_foo (T const & t) {}
  void do_foo (T const & t) {}
  void do_foo (Bar const & bar);  // {} Put the body here and it works
  void do_foo (Bar const & bar);  // {} Put the body here and it works
  void do_foo (Bar const & bar);     // {} Put the body here and it works
  void do_foo (Bar const & bar);     // {} Put the body here and it works
};
};
// These definitions don't work
// These definitions don't work
template 
template 
inline void Foo::
inline void Foo::
do_foo (Bar const & bar)
do_foo (Bar const & bar)
{}
{}
template 
template 
inline void Foo::
inline void Foo::
do_foo (Bar const & bar)
do_foo (Bar const & bar)
{}
{}
int main ()
int main ()
{ int i;
{ int i;
  Bar bar1;
  Bar bar1;
  Bar  bar2;
  Bar  bar2;
  Foo foo;
  Foo foo;
  foo.do_foo();
  foo.do_foo();
  foo.do_foo(i);
  foo.do_foo(i);
  foo.do_foo(bar1);
  foo.do_foo(bar1);
  foo.do_foo(bar2);
  foo.do_foo(bar2);
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.