view gcc/testsuite/gcc.target/arm/div64-unwinding.c @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 04ced10e8804
children 1830386684a0
line wrap: on
line source

/* Performing a 64-bit division should not pull in the unwinder.  */

/* { dg-do run { target { ! *-*-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);
}