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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [eh19.C] - Rev 699

Compare with Previous | Blame | View Log

// { dg-do assemble  }
// { dg-options "-fexceptions" }

class test1 {
public:
  class fehler{public:fehler(){};};
  void func(int a) {
    if( a == 0 )
      throw fehler();
  }
};

int main() {
  test1 var;

  try {
    var.func(1);
    var.func(0);
  } catch(test1::fehler())              // function type promoted to pointer
    {
      ;
    }
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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