URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
// { dg-do run }
|
// { dg-do run }
|
// Origin: Jo Totland
|
// Origin: Jo Totland
|
|
|
// PR c++/6620
|
// PR c++/6620
|
// Partial specialization involving expression of non-type template
|
// Partial specialization involving expression of non-type template
|
// parameter causes ICE.
|
// parameter causes ICE.
|
|
|
extern "C" void abort();
|
extern "C" void abort();
|
|
|
template struct HoldInt
|
template struct HoldInt
|
{
|
{
|
};
|
};
|
|
|
template struct Add
|
template struct Add
|
{
|
{
|
};
|
};
|
|
|
template struct Add, HoldInt<-N> >
|
template struct Add, HoldInt<-N> >
|
{
|
{
|
typedef int type;
|
typedef int type;
|
int f() { return 0; }
|
int f() { return 0; }
|
};
|
};
|
|
|
template
|
template
|
struct Add, HoldInt >
|
struct Add, HoldInt >
|
{
|
{
|
typedef HoldInt type;
|
typedef HoldInt type;
|
int f() { return 1; }
|
int f() { return 1; }
|
};
|
};
|
|
|
int main() {
|
int main() {
|
Add, HoldInt<-1> > a;
|
Add, HoldInt<-1> > a;
|
Add, HoldInt<-2> > b;
|
Add, HoldInt<-2> > b;
|
if (a.f() != 0 || b.f() != 1)
|
if (a.f() != 0 || b.f() != 1)
|
abort();
|
abort();
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.