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++.pt/] [explicit54.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  }
extern "C" void abort ();
extern "C" void abort ();
template  inline int fact2 ();
template  inline int fact2 ();
template  inline int fact ()
template  inline int fact ()
{
{
  return a * fact2 ();
  return a * fact2 ();
}
}
template <> inline int fact<1> ()
template <> inline int fact<1> ()
{
{
  return 1;
  return 1;
}
}
template  inline int fact2 ()
template  inline int fact2 ()
{
{
  return a*fact();
  return a*fact();
}
}
template <> inline int fact2<1> ()
template <> inline int fact2<1> ()
{
{
  return 1;
  return 1;
}
}
int main()
int main()
{
{
  if (fact<3> () != 6 || fact<1> () != 1
  if (fact<3> () != 6 || fact<1> () != 1
      || fact<3> () != 6 || fact<1> () != 1 || fact<1+0> () != 1)
      || fact<3> () != 6 || fact<1> () != 1 || fact<1+0> () != 1)
    abort ();
    abort ();
  if (fact2<3> () != 6 || fact2<1> () != 1
  if (fact2<3> () != 6 || fact2<1> () != 1
      || fact2<3> () != 6 || fact2<1> () != 1 || fact2<1+0> () != 1)
      || fact2<3> () != 6 || fact2<1> () != 1 || fact2<1+0> () != 1)
    abort ();
    abort ();
  if (fact2<4> () != 24 || fact<4> () != 24)
  if (fact2<4> () != 24 || fact<4> () != 24)
    abort ();
    abort ();
}
}
 
 

powered by: WebSVN 2.1.0

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