URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [opt/] [ptrmem5.C] - Rev 154
Compare with Previous | Blame | View Log
// PR tree-opt/18904
// { dg-do compile }
// { dg-options "-O3" }
struct Data;
struct Wrapper {
Data* D;
};
struct Data {
int X;
void init(Wrapper&);
};
void Data::init( Wrapper &w ) {
int Data::* res = &Data::X;
w.D = this;
for( int i = 0; i < 4; i++ )
(w.D->*res) = 0;
}