Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.dg / eh / simd-1.C
blob465b7826da09b516abe97a66914d6c40b720f7c9
1 // Test EH when V2SI SIMD registers are involved.
2 // Contributed by Aldy Hernandez (aldy@quesejoda.com).
3 // { dg-options "-O" }
4 // { dg-options "-O -w" { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
5 // { dg-do run }
7 typedef int __attribute__((vector_size (8))) vecint;
9 vecint vecfunc (vecint beachbum)
11   return beachbum;
14 void f3 (void)
16   /* Force a use of a V2SI register if available.  On the PPC/E500,
17      this will cause the compiler to save the registers in this
18      function in 64-bits.  */
19   vecint foobar = (vecint) {0, 0};
20   foobar = vecfunc (foobar);
22   throw int();
25 void f2 (void)
27   vecint foobar = (vecint) {0, 0};
28   foobar = vecfunc (foobar);
30   f3 ();
33 void f1 (void)
35   int i;
36   try
37     {
38       f2 ();
39     }
40   catch (int)
41     {
42       i = 9;
43     }
46 int main ()
48   f1 ();
49   return 0;