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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [eh/] [subreg-1.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* The lower-subreg pass would ICE on this test case with
2
   TODO_verify_flow on 32-bit PowerPC.  It didn't handle REG_EH_REGION
3
   notes correctly.  This is reduced from interpret.cc in libjava.  */
4
 
5
/* { dg-do compile } */
6
/* { dg-options "-O2 -fnon-call-exceptions" } */
7
 
8
union _Jv_word
9
{
10
  double *o;
11
  int i;
12
  int ia[1];
13
};
14
union _Jv_word2
15
{
16
  int ia[2];
17
  double d;
18
};
19
 
20
class _Jv_InterpMethod
21
{
22
  static void run_debug (_Jv_word *);
23
};
24
 
25
void
26
_Jv_InterpMethod::run_debug (_Jv_word *sp)
27
{
28
  try
29
  {
30
    {
31
      int index = ((int) (--sp)->i);
32
      double *arr = (double *) ((--sp)->o);
33
      _Jv_word2 w2;
34
      w2.d = arr[index];
35
      (sp++)->ia[0] = w2.ia[0];
36
    }
37
  }
38
  catch (int * ex)
39
  {
40
  }
41
}

powered by: WebSVN 2.1.0

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