OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [eh/] [comdat1.C] - Diff between revs 301 and 384

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 384
// 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 ();
  }
  }
}
}
 
 

powered by: WebSVN 2.1.0

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