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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [ext/] [label3.C] - Blame information for rev 301

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// Bug: we were removing the p = q assignment in dce, and then reinserting
2
// it *after* the try/catch in out-of-ssa.  Oops.
3
 
4
// testcase reduced from libjava/interpret.cc.
5
 
6
// { dg-do run }
7
// { dg-options "-O2" }
8
 
9
extern "C" int printf (const char *, ...);
10
 
11
bool b;
12
 
13
int main()
14
{
15
  __label__ one, two, done;
16
  void *labs[] = { &&one, &&two, &&done };
17
  const void **q = (const void **)labs;
18
  const void **p = q;
19
 
20
  try
21
    {
22
    one:
23
      printf ("one!\n");
24
      if (b)
25
        throw 42;
26
      goto **p++;
27
 
28
    two:
29
      printf ("two!\n");
30
      goto **p++;
31
 
32
    done:
33
      printf ("done!\n");
34
    }
35
  catch (int)
36
    {
37
      printf ("caught!\n");
38
    }
39
}

powered by: WebSVN 2.1.0

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