From 92d05580aad3bb3efa2e15b56e00da2e3e57f14c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 4 Feb 2014 13:19:32 +0100 Subject: [PATCH] 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 --- gcc/ChangeLog | 4 ++++ gcc/omp-low.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) 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 -- 2.30.2