URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// Test that converting a COND_EXPR to void doesn't result in trying to
|
// Test that converting a COND_EXPR to void doesn't result in trying to
|
// bitwise copy a class with a nontrivial copy constructor (and thus a
|
// bitwise copy a class with a nontrivial copy constructor (and thus a
|
// compiler abort).
|
// compiler abort).
|
|
|
// { dg-options "-O" }
|
// { dg-options "-O" }
|
|
|
struct A {
|
struct A {
|
virtual ~A() { }
|
virtual ~A() { }
|
};
|
};
|
|
|
A a1, a2;
|
A a1, a2;
|
inline A& one () { return a1; }
|
inline A& one () { return a1; }
|
inline A& two () { return a2; }
|
inline A& two () { return a2; }
|
|
|
inline void f (int i)
|
inline void f (int i)
|
{
|
{
|
i ? a1 : a2;
|
i ? a1 : a2;
|
i ? one() : two();
|
i ? one() : two();
|
}
|
}
|
|
|
int main ()
|
int main ()
|
{
|
{
|
f (1);
|
f (1);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.