URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
// PR optimization/11083
|
// PR optimization/11083
|
// Origin:
|
// Origin:
|
// Reduced testcase by Wolfgang Bangerth
|
// Reduced testcase by Wolfgang Bangerth
|
|
|
// The compiler used to keep unreachable basic blocks after dead edges
|
// The compiler used to keep unreachable basic blocks after dead edges
|
// had been purged, which fooled the LCM code of the GCSE pass.
|
// had been purged, which fooled the LCM code of the GCSE pass.
|
|
|
// { dg-do compile }
|
// { dg-do compile }
|
// { dg-options "-O2 -fnon-call-exceptions" }
|
// { dg-options "-O2 -fnon-call-exceptions" }
|
|
|
extern void *memmove (void *, const void *, unsigned int) throw ();
|
extern void *memmove (void *, const void *, unsigned int) throw ();
|
|
|
struct S {
|
struct S {
|
int *q;
|
int *q;
|
|
|
S(int *i) : q(i) {}
|
S(int *i) : q(i) {}
|
};
|
};
|
|
|
struct X {
|
struct X {
|
int *p;
|
int *p;
|
|
|
void foo(S first, S last) {
|
void foo(S first, S last) {
|
try { memmove(0, 0, last.q - first.q); }
|
try { memmove(0, 0, last.q - first.q); }
|
catch(...) { throw; }
|
catch(...) { throw; }
|
}
|
}
|
|
|
void bar (const X& x);
|
void bar (const X& x);
|
};
|
};
|
|
|
void X::bar (const X& x)
|
void X::bar (const X& x)
|
{
|
{
|
const unsigned int xlen = S(x.p).q - S(x.p).q;
|
const unsigned int xlen = S(x.p).q - S(x.p).q;
|
|
|
if (xlen > 0)
|
if (xlen > 0)
|
foo(S(x.p), S(x.p));
|
foo(S(x.p), S(x.p));
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.