[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / eh / subreg-1.C
blob1ac976dae61a4182dcb397f0dbb4377e21480ebe
1 /* 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.  */
5 /* { dg-do compile } */
6 /* { dg-options "-O2 -fnon-call-exceptions" } */
8 union _Jv_word
10   double *o;
11   int i;
12   int ia[1];
14 union _Jv_word2
16   int ia[2];
17   double d;
20 class _Jv_InterpMethod
22   static void run_debug (_Jv_word *);
25 void
26 _Jv_InterpMethod::run_debug (_Jv_word *sp)
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   }