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/] [tree-ssa/] [fold-compare.C] - Rev 847
Go to most recent revision | Compare with Previous | Blame | View Log
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
struct ExtentsBase {
ExtentsBase() : startx_(), endx_() { }
ExtentsBase(const ExtentsBase &b) {
*this = b;
}
const ExtentsBase & operator=(const ExtentsBase &b) {
if (this != &b) {
startx_ = b.startx_;
}
return *this;
}
int startx_;
int endx_;
};
int f(const ExtentsBase &e1) {
ExtentsBase my_extents = e1;
return my_extents.startx_;
}
/* { dg-final { scan-tree-dump-not "&my_extents" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
Go to most recent revision | Compare with Previous | Blame | View Log