URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [tags/] [gnu-dev/] [fsf-gcc-snapshot-1-mar-12/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [rv-cast3.C] - Rev 693
Go to most recent revision | Compare with Previous | Blame | View Log
// PR c++/51406
// { dg-do run { target c++11 } }
extern "C" int printf(const char *,...);
extern "C" void abort();
struct A { int a; A() : a(1) {} };
struct B { int b; B() : b(2) {} };
struct X : A, B {};
int main() {
X x;
int a=static_cast<A&&>(x).a;
int b=static_cast<B&&>(x).b;
// printf ("%d %d\n", a, b);
if (a!=1 || b!=2) abort();
}
Go to most recent revision | Compare with Previous | Blame | View Log