aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/arm/div64-unwinding.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/arm/div64-unwinding.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/arm/div64-unwinding.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/arm/div64-unwinding.c b/gcc-4.9/gcc/testsuite/gcc.target/arm/div64-unwinding.c
new file mode 100644
index 000000000..7f112eeab
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/arm/div64-unwinding.c
@@ -0,0 +1,24 @@
+/* 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);
+}