URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
// PR target/29487
|
// PR target/29487
|
// { dg-do link }
|
// { dg-do link }
|
// { dg-options "-O2" }
|
// { dg-options "-O2" }
|
|
|
/* This function is not defined. The compiler should optimize away
|
/* This function is not defined. The compiler should optimize away
|
all calls to it. */
|
all calls to it. */
|
extern void undefined () throw ();
|
extern void undefined () throw ();
|
|
|
extern void f1();
|
extern void f1();
|
|
|
inline void f2() {
|
inline void f2() {
|
f1();
|
f1();
|
}
|
}
|
|
|
/* This function will be COMDAT if not inlined. */
|
/* This function will be COMDAT if not inlined. */
|
inline void f1() {}
|
inline void f1() {}
|
|
|
/* This function will be COMDAT. */
|
/* This function will be COMDAT. */
|
template
|
template
|
void f3() {
|
void f3() {
|
if (false)
|
if (false)
|
throw 3;
|
throw 3;
|
}
|
}
|
|
|
inline void f4() {
|
inline void f4() {
|
if (false)
|
if (false)
|
throw 7;
|
throw 7;
|
}
|
}
|
|
|
int main () {
|
int main () {
|
try {
|
try {
|
f1();
|
f1();
|
f2();
|
f2();
|
f3();
|
f3();
|
f4();
|
f4();
|
} catch (...) {
|
} catch (...) {
|
/* The compiler should recognize that none of the functions above
|
/* The compiler should recognize that none of the functions above
|
can throw exceptions, and therefore remove this code as
|
can throw exceptions, and therefore remove this code as
|
unreachable. */
|
unreachable. */
|
undefined ();
|
undefined ();
|
}
|
}
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.