From: Jakub Jelinek Date: Tue, 4 Feb 2014 12:19:32 +0000 (+0100) Subject: re PR other/58712 (issues found by --enable-checking=valgrind) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=92d05580aad3bb3efa2e15b56e00da2e3e57f14c;p=gcc.git re PR other/58712 (issues found by --enable-checking=valgrind) PR other/58712 * omp-low.c (simd_clone_struct_copy): If from->inbranch is set, copy one less argument. From-SVN: r207461 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 41fc97792a6..681ab7b6692 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2014-02-04 Jakub Jelinek + PR other/58712 + * omp-low.c (simd_clone_struct_copy): If from->inbranch + is set, copy one less argument. + PR rtl-optimization/57915 * recog.c (simplify_while_replacing): If all unary/binary/relational operation arguments are constant, attempt to simplify those. diff --git a/gcc/omp-low.c b/gcc/omp-low.c index d7589aa9ec1..900c1ba221c 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -10660,7 +10660,8 @@ simd_clone_struct_copy (struct cgraph_simd_clone *to, struct cgraph_simd_clone *from) { memcpy (to, from, (sizeof (struct cgraph_simd_clone) - + from->nargs * sizeof (struct cgraph_simd_clone_arg))); + + ((from->nargs - from->inbranch) + * sizeof (struct cgraph_simd_clone_arg)))); } /* Return vector of parameter types of function FNDECL. This uses