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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [pr50682.C] - Rev 749

Go to most recent revision | Compare with Previous | Blame | View Log

// PR tree-optimization/50682
// { dg-do compile }
// { dg-options "-O2 -fnon-call-exceptions -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce" }

void foo () __attribute__ ((__noreturn__));
int baz ();

const int &
bar (const int &x, const int &y)
{
  if (x >= y)
    return y;
  return x;
}

int a, b;

struct S
{
  ~S ();
  bool m ()
  {
    int l = bar (a, b);
    int r = baz ();
    if (r)
        r = l;
      return r;
  }
};

void
test ()
{
  S s;
  if (!s.m ())
    foo ();
  if (!s.m ())
    foo ();
}

Go to most recent revision | 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.