re PR other/58712 (issues found by --enable-checking=valgrind)
authorJakub Jelinek <jakub@redhat.com>
Tue, 4 Feb 2014 12:19:32 +0000 (13:19 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 4 Feb 2014 12:19:32 +0000 (13:19 +0100)
PR other/58712
* omp-low.c (simd_clone_struct_copy): If from->inbranch
is set, copy one less argument.

From-SVN: r207461

gcc/ChangeLog
gcc/omp-low.c

index 41fc97792a677bc573a7282b1c3cae5f502211cb..681ab7b6692bcd042621326c8da393d5ab6b0a8d 100644 (file)
@@ -1,5 +1,9 @@
 2014-02-04  Jakub Jelinek  <jakub@redhat.com>
 
+       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.
index d7589aa9ec14e9b544b5e056966ec437a4028276..900c1ba221ccfef8476fd922e610e1bf67c07db4 100644 (file)
@@ -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