From 3478fe3a92a8c85fa342a38ef3bf9bcc704bea94 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 21 Aug 2017 17:07:36 -0700 Subject: rshift.c: Replace assert with DEBUG and abort assert in stdlib/rshift.c should be for debug purpose only and there is no such check in any rshift assembly implementations nor in lshift.c. This patch replaces assert with DEBUG and abort, similar to lshift.c so that generic GMP codes from libc.a can be linked with libc.so in atest-exp, atest-exp2 and atest-sincos, which depend on the GMP implementation in glibc. * stdlib/rshift.c (mpn_rshift): Replace ssert with DEBUG and abort. --- stdlib/rshift.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stdlib/rshift.c b/stdlib/rshift.c index d4c7f77..ab69dd7 100644 --- a/stdlib/rshift.c +++ b/stdlib/rshift.c @@ -42,7 +42,10 @@ mpn_rshift (register mp_ptr wp, register mp_size_t i; mp_limb_t retval; - assert (usize != 0 && cnt != 0); +#ifdef DEBUG + if (usize == 0 || cnt == 0) + abort (); +#endif sh_1 = cnt; -- cgit v1.1