2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / eh / arm-vfp-unwind.C
blob62263c0c3b06d77eb5016f822b66c5e839e02c18
1 /* { dg-do run } */
2 /* { dg-require-effective-target arm32 } */
4 /* Test to catch off-by-one errors in arm/pr-support.c.  */
6 #if defined (__VFP_FP__) && !defined (__SOFTFP__)
8 #include <iostream>
9 #include <stdlib.h>
11 using namespace std;
13 static void donkey ()
15   asm volatile ("fcpyd d9, %P0" : : "w" (1.2345) : "d9");
16   throw 1;
19 int main()
21   try
22     {
23       donkey ();
24     }
25   catch (int foo)
26     {
27       return 0;
28     }
29   return 1;
32 #else
34 int main()
36   return 0;
39 #endif