blob: 88367a2bff564d53b47de581af8ea9950c03354e [file] [log] [blame]
/* { 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" } } */