From 00a7ba584062ce49f20fd9e10e5396b296b0a7b5 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 3 Jul 2014 16:39:05 +0200 Subject: gcov-io.c (gcov_read_words): Don't call memmove if excess is 0. * gcov-io.c (gcov_read_words): Don't call memmove if excess is 0. * data-streamer-in.c (streamer_read_hwi): Shift UHWI 1 instead of HWI 1 and negate the unsigned value. * expmed.c (expand_sdiv_pow2): For modes wider than word always use AND instead of shift. * wide-int-print.cc (print_decs): Negate UHWI instead of HWI. c-family/ * c-ada-spec.c (dump_ada_nodes): Don't call qsort if comments->count <= 1, as comments->entries might be NULL. From-SVN: r212264 --- gcc/gcov-io.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gcc/gcov-io.c') diff --git a/gcc/gcov-io.c b/gcc/gcov-io.c index 1fdb958..547276f 100644 --- a/gcc/gcov-io.c +++ b/gcc/gcov-io.c @@ -489,14 +489,15 @@ gcov_read_words (unsigned words) if (excess < words) { gcov_var.start += gcov_var.offset; -#if IN_LIBGCOV if (excess) { +#if IN_LIBGCOV memcpy (gcov_var.buffer, gcov_var.buffer + gcov_var.offset, 4); - } #else - memmove (gcov_var.buffer, gcov_var.buffer + gcov_var.offset, excess * 4); + memmove (gcov_var.buffer, gcov_var.buffer + gcov_var.offset, + excess * 4); #endif + } gcov_var.offset = 0; gcov_var.length = excess; #if IN_LIBGCOV -- cgit v1.1