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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [cfg1.C] - Blame information for rev 718

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

Line No. Rev Author Line
1 693 jeremybenn
// PR optimization/11083
2
// Origin: 
3
// Reduced testcase by Wolfgang Bangerth 
4
 
5
// The compiler used to keep unreachable basic blocks after dead edges
6
// had been purged, which fooled the LCM code of the GCSE pass.
7
 
8
// { dg-do compile }
9
// { dg-options "-O2 -fnon-call-exceptions" }
10
 
11
extern void *memmove (void *, const void *, unsigned int) throw ();
12
 
13
struct S {
14
    int *q;
15
 
16
    S(int *i) : q(i) {}
17
};
18
 
19
struct X {
20
    int *p;
21
 
22
    void foo(S first, S last) {
23
      try        { memmove(0, 0, last.q - first.q); }
24
      catch(...) { throw; }
25
    }
26
 
27
   void bar (const X& x);
28
};
29
 
30
void X::bar (const X& x)
31
{
32
  const unsigned int xlen = S(x.p).q - S(x.p).q;
33
 
34
  if (xlen > 0)
35
    foo(S(x.p), S(x.p));
36
}

powered by: WebSVN 2.1.0

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