summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/eh/arm-vfp-unwind.C
blob: 62263c0c3b06d77eb5016f822b66c5e839e02c18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* { dg-do run } */
/* { dg-require-effective-target arm32 } */

/* Test to catch off-by-one errors in arm/pr-support.c.  */

#if defined (__VFP_FP__) && !defined (__SOFTFP__)

#include <iostream>
#include <stdlib.h>

using namespace std;

static void donkey ()
{
  asm volatile ("fcpyd d9, %P0" : : "w" (1.2345) : "d9");
  throw 1;
}

int main()
{
  try
    {
      donkey ();
    }
  catch (int foo)
    {
      return 0;
    }
  return 1;
}

#else

int main()
{
  return 0;
}

#endif