summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authordoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2015-05-18 21:14:14 +0000
committerdoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2015-05-18 21:14:14 +0000
commit70dc99a7d892ee60f65b7df560668e962c0c7aff (patch)
treeca3f485750b9e695481792102005244976eaea5c /debian
parent1d7345ecd38240f5ff985cde80db1cb0f4d0099e (diff)
downloadgcc-5-70dc99a7d892ee60f65b7df560668e962c0c7aff.tar.gz
* Backport patch for gccgo (not yet applied):
- gccgo: If unary & does not escape, the var does not escape. git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-5@8046 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog2
-rw-r--r--debian/patches/go-escape-analysis4.diff22
-rw-r--r--debian/rules.patch2
3 files changed, 26 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 6329d8f..bde419d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,8 @@ gcc-5 (5.1.1-6) UNRELEASED; urgency=medium
Closes: #782257.
- Allow libgnatprj and libgnatvsn to cross build. Addresses: #783372.
- New patch ada-gnattools-cross.diff (no documentation).
+ * Backport patch for gccgo (not yet applied):
+ - gccgo: If unary & does not escape, the var does not escape.
-- Matthias Klose <doko@debian.org> Sun, 10 May 2015 02:01:20 +0200
diff --git a/debian/patches/go-escape-analysis4.diff b/debian/patches/go-escape-analysis4.diff
new file mode 100644
index 0000000..eec8bd9
--- /dev/null
+++ b/debian/patches/go-escape-analysis4.diff
@@ -0,0 +1,22 @@
+# DP: gccgo: If unary & does not escape, the var does not escape.
+
+If we have a unary & that takes the address of a variable, do
+not force the variable to escape if the unary & does not
+escape.
+
+--- a/src/gcc/go/gofrontend/expressions.cc
++++ b/src/gcc/go/gofrontend/expressions.cc
+@@ -3668,7 +3668,12 @@
+
+ if (this->op_ == OPERATOR_AND)
+ {
+- if (this->expr_->var_expression() != NULL)
++ // If this->escapes_ is false at this point, then it was set to
++ // false by an explicit call to set_does_not_escape, and the
++ // value does not escape. If this->escapes_ is true, we may be
++ // able to set it to false if taking the address of a variable
++ // that does not escape.
++ if (this->escapes_ && this->expr_->var_expression() != NULL)
+ {
+ Named_object* var = this->expr_->var_expression()->named_object();
+ if (var->is_variable())
diff --git a/debian/rules.patch b/debian/rules.patch
index 2191b3d..88d2134 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -83,11 +83,13 @@ debian_patches += \
go-escape-analysis \
go-escape-analysis2 \
go-escape-analysis3 \
+ go-escape-analysis4 \
# don't apply yet, test it first ...
# go-escape-analysis \
# go-escape-analysis2 \
# go-escape-analysis3 \
+# go-escape-analysis4 \
# $(if $(filter yes, $(DEB_CROSS)),,gcc-print-file-name) \
# libstdc++-nothumb-check \