aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/div64-unwinding.c
blob: d10fb2bdd5bd98962cef1f4f4f464fb8aeb74ef9 (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
/* Performing a 64-bit division should not pull in the unwinder.  */

/* The test is expected to fail for GNU/Linux; see PR54723.  */
/* { dg-do run { xfail *-*-linux* } } */
/* { dg-options "-O0" } */

#include <stdlib.h>

long long
foo (long long c, long long d)
{
  return c/d;
}

long long x = 0;
long long y = 1;

extern int (*_Unwind_RaiseException) (void *) __attribute__((weak));

int main(void)
{
  if (&_Unwind_RaiseException != NULL)
    abort ();;
  return foo (x, y);
}