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] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR tree-optimization/50682
2
// { dg-do compile }
3
// { dg-options "-O2 -fnon-call-exceptions -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce" }
4
 
5
void foo () __attribute__ ((__noreturn__));
6
int baz ();
7
 
8
const int &
9
bar (const int &x, const int &y)
10
{
11
  if (x >= y)
12
    return y;
13
  return x;
14
}
15
 
16
int a, b;
17
 
18
struct S
19
{
20
  ~S ();
21
  bool m ()
22
  {
23
    int l = bar (a, b);
24
    int r = baz ();
25
    if (r)
26
        r = l;
27
      return r;
28
  }
29
};
30
 
31
void
32
test ()
33
{
34
  S s;
35
  if (!s.m ())
36
    foo ();
37
  if (!s.m ())
38
    foo ();
39
}

powered by: WebSVN 2.1.0

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