OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [fold-compare.C] - Rev 693

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" } } */

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.