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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [pr51117.C] - Blame information for rev 751

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR tree-optimization/51117
2
// { dg-do compile }
3
// { dg-options "-O2 -fexceptions" }
4
 
5
struct A { char buf[64]; };
6
void bar (A *);
7
 
8
int
9
foo ()
10
{
11
  A c;
12
  bar (&c);
13
  try
14
  {
15
    {
16
      A a;
17
      bar (&a);
18
      if (a.buf[13])
19
        throw 1;
20
      else if (a.buf[52])
21
        throw 3;
22
    }
23
    {
24
      A b;
25
      bar (&b);
26
      if (b.buf[13])
27
        throw 2;
28
    }
29
  }
30
  catch ( ...)
31
  {
32
    return 1;
33
  }
34
  return 0;
35
}
36
 
37
// { dg-final { scan-assembler-not "__cxa_rethrow" } }

powered by: WebSVN 2.1.0

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