summaryrefslogtreecommitdiffstats
path: root/source/d/gcc/patches/7185690.diff
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2021-08-25 20:32:43 +0000
committer Eric Hameleers <alien@slackware.com>2021-08-26 08:59:56 +0200
commit870839f17971c34028003e9b8e2f6a1f7ac500b0 (patch)
treef8790e26753581b125a5ef2af5aafd576b5de17d /source/d/gcc/patches/7185690.diff
parentfc858c42d353ccaf46bda445fe55f7e97de18f90 (diff)
downloadcurrent-870839f17971c34028003e9b8e2f6a1f7ac500b0.tar.gz
current-870839f17971c34028003e9b8e2f6a1f7ac500b0.tar.xz
Wed Aug 25 20:32:43 UTC 202120210825203243
d/cmake-3.21.2-x86_64-1.txz: Upgraded. d/gcc-11.2.0-x86_64-2.txz: Rebuilt. d/gcc-brig-11.2.0-x86_64-2.txz: Rebuilt. d/gcc-g++-11.2.0-x86_64-2.txz: Rebuilt. d/gcc-gdc-11.2.0-x86_64-2.txz: Rebuilt. d/gcc-gfortran-11.2.0-x86_64-2.txz: Rebuilt. d/gcc-gnat-11.2.0-x86_64-2.txz: Rebuilt. d/gcc-go-11.2.0-x86_64-2.txz: Rebuilt. [PATCH] compiler: correct condition for calling memclrHasPointers This fixes bootstrapping golang 1.17 with gcc-go. Thanks to Heinz Wiesinger. d/gcc-objc-11.2.0-x86_64-2.txz: Rebuilt. kde/latte-dock-0.10.1-x86_64-1.txz: Upgraded. n/mutt-2.1.2-x86_64-1.txz: Upgraded. n/php-7.4.23-x86_64-1.txz: Upgraded. x/ibus-table-1.14.1-x86_64-1.txz: Upgraded. x/libglvnd-1.3.4-x86_64-1.txz: Upgraded. xap/mozilla-thunderbird-91.0.3-x86_64-1.txz: Upgraded. This is a bugfix release. For more information, see: https://www.mozilla.org/en-US/thunderbird/91.0.3/releasenotes/ extra/php8/php8-8.0.10-x86_64-1.txz: Upgraded.
Diffstat (limited to '')
-rw-r--r--source/d/gcc/patches/7185690.diff27
1 files changed, 27 insertions, 0 deletions
diff --git a/source/d/gcc/patches/7185690.diff b/source/d/gcc/patches/7185690.diff
new file mode 100644
index 000000000..4d0824fd3
--- /dev/null
+++ b/source/d/gcc/patches/7185690.diff
@@ -0,0 +1,27 @@
+From 71856902b87505ff8ab6845533b598bffe5333bb Mon Sep 17 00:00:00 2001
+From: Ian Lance Taylor <iant@golang.org>
+Date: Sat, 21 Aug 2021 12:42:19 -0700
+Subject: [PATCH] compiler: correct condition for calling memclrHasPointers
+
+When compiling append(s, make([]typ, ln)...), where typ has a pointer,
+and the append fits within the existing capacity of s, the condition
+used to clear out the new elements was reversed.
+
+Fixes golang/go#47771
+
+Change-Id: Ia880adc08ab723afe3f927e65c9e081f9f717f90
+---
+
+diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc
+index 8d4d168..ddb1d91 100644
+--- a/gcc/go/gofrontend/expressions.cc
++++ b/gcc/go/gofrontend/expressions.cc
+@@ -9350,7 +9350,7 @@
+ ref2 = Expression::make_cast(uint_type, ref2, loc);
+ cond = Expression::make_binary(OPERATOR_GT, ref, ref2, loc);
+ zero = Expression::make_integer_ul(0, int_type, loc);
+- call = Expression::make_conditional(cond, call, zero, loc);
++ call = Expression::make_conditional(cond, zero, call, loc);
+ }
+ }
+ else