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

Subversion Repositories openrisc

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

Compare with Previous | Blame | View Log

// { dg-do assemble  }
// { dg-options "-fexceptions" }
// GROUPS passed exceptions
// except file
// From: GUSTAVO%DRAGON@orion.cpqd.ansp.br
// Date:     15 Dec 1993 09:33:30 +0000 (C)
// Subject:  exception handling problem
// Message-ID: <01H6I5GEAF5UPBJ0UV@VENUS.CPQD.ANSP.BR>

struct Exception
 {
     int v;
     Exception(int i) { v = i; };
 };

void inc(int &i)
 {
     try {
         if (i == 0)
             throw Exception(i);
         else
             i++;
     }
     catch (Exception v) {
         i = v.v;
     }
 }

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.