aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan P. Stanić <mps@arvanta.net>2019-11-22 15:28:54 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2019-11-25 06:38:44 +0000
commit8bf9f79cc196e46e5e1c1920490960c0f9d687f4 (patch)
treedc04bf0d5a4270c8e3fa9a6cea9ba05a1d05bbc0
parentde50c82bc4c857ac153096dede12febd9479fd32 (diff)
downloadaports-8bf9f79cc196e46e5e1c1920490960c0f9d687f4.tar.bz2
aports-8bf9f79cc196e46e5e1c1920490960c0f9d687f4.tar.xz
main/gcc: fix gimplify.c omp_default_clause
add upstream patch: PR middle-end/91920 fixes #10909
-rw-r--r--main/gcc/APKBUILD6
-rw-r--r--main/gcc/gcc10-pr91920.patch41
2 files changed, 45 insertions, 2 deletions
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD
index 49331ec5ba..73fc54d991 100644
--- a/main/gcc/APKBUILD
+++ b/main/gcc/APKBUILD
@@ -6,7 +6,7 @@ pkgver=9.2.0
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname="$pkgname$_target"
-pkgrel=2
+pkgrel=3
pkgdesc="The GNU Compiler Collection"
url="http://gcc.gnu.org"
arch="all"
@@ -172,6 +172,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
gcc-pure64-mips.patch
0016-invalid_tls_model.patch
+ gcc10-pr91920.patch
"
# gcc-4.8-build-args.patch
@@ -585,4 +586,5 @@ cceeac95f47ea8664e1c16c5ebecb472b5aaa56040e943c1b97c7873b50e3a2bf972d9f743d342a2
a1f7750bc7b8b7d916a5dee34fcc736bd4fb249c96538b547d495794e6cfd49356aa3974506a15074b4cb58edd5d7e2868607c902dd003e8c464d5066fd4a575 libgnarl-musl.patch
f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45b58ba8764ab1eb575d4eb6d6dfc550a87a183f8b94e76181 320-libffi-gnulinux.patch
86be3338cc9c33089608bc4c5e3b7918c4e500a345c338f361b18c342119a6ed69af5495d72950de7106d760f003528b46ad14795e805f8a3331e206dcb234e3 gcc-pure64-mips.patch
-17e0faeef742d32d57a070d983480367dd28cd28d47a8966ce327afdff3a38ea76803a833c90aff7d3a93aa66dae76c9be47b2408500913b40571af25b85aca7 0016-invalid_tls_model.patch"
+17e0faeef742d32d57a070d983480367dd28cd28d47a8966ce327afdff3a38ea76803a833c90aff7d3a93aa66dae76c9be47b2408500913b40571af25b85aca7 0016-invalid_tls_model.patch
+e9fef7677f9541848cd1df0bf3c330f06f1369bdf1d228238b7f1d03d8f2c4be07fd62be503b7bf72b6b1e2d4e404ddd957157b56b8050e3657820ade77491aa gcc10-pr91920.patch"
diff --git a/main/gcc/gcc10-pr91920.patch b/main/gcc/gcc10-pr91920.patch
new file mode 100644
index 0000000000..001522c5d4
--- /dev/null
+++ b/main/gcc/gcc10-pr91920.patch
@@ -0,0 +1,41 @@
+2019-09-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/91920
+ * gimplify.c (omp_default_clause): Predetermine DECL_IN_CONSTANT_POOL
+ variables as shared.
+
+ * c-c++-common/gomp/pr91920.c: New test.
+
+--- a/gcc/gimplify.c.jj 2019-09-20 12:25:46.829408105 +0200
++++ b/gcc/gimplify.c 2019-09-27 11:52:17.458446652 +0200
+@@ -7132,6 +7132,8 @@ omp_default_clause (struct gimplify_omp_
+ kind = lang_hooks.decls.omp_predetermined_sharing (decl);
+ if (kind != OMP_CLAUSE_DEFAULT_UNSPECIFIED)
+ default_kind = kind;
++ else if (VAR_P (decl) && TREE_STATIC (decl) && DECL_IN_CONSTANT_POOL (decl))
++ default_kind = OMP_CLAUSE_DEFAULT_SHARED;
+
+ switch (default_kind)
+ {
+--- a/gcc/testsuite/c-c++-common/gomp/pr91920.c.jj 2019-09-27 11:57:26.066813061 +0200
++++ b/gcc/testsuite/c-c++-common/gomp/pr91920.c 2019-09-27 11:57:08.931070237 +0200
+@@ -0,0 +1,19 @@
++/* PR middle-end/91920 */
++
++void bar (float *);
++
++void
++foo (void)
++{
++ int i;
++ float f[3] = { 0.0f, 0.0f, 0.0f };
++#pragma omp parallel for default(none) reduction(+:f[:3])
++ for (i = 0; i < 1000; i++)
++ {
++ int j;
++ float k[3] = { 0.25f, 0.5f, 0.75f };
++ for (j = 0; j < 3; j++)
++ f[j] += k[j];
++ }
++ bar (f);
++}