aboutsummaryrefslogtreecommitdiffstats
path: root/community/gcc6
diff options
context:
space:
mode:
authorMilan P. Stanić <mps@arvanta.net>2020-01-29 10:31:39 +0100
committerMilan P. Stanić <mps@arvanta.net>2020-01-30 19:29:59 +0100
commit2d9c1a116c0c793da953e5ab4bdec19424580c16 (patch)
tree6c95bacabf57924a41967e4b5fa60981b77c7d33 /community/gcc6
parentb3222f541ef1ce02e8b5708066a0364cd0872a10 (diff)
downloadaports-2d9c1a116c0c793da953e5ab4bdec19424580c16.tar.bz2
aports-2d9c1a116c0c793da953e5ab4bdec19424580c16.tar.xz
community/gcc6: fix wrong code when returning padded struct
bug report https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93402
Diffstat (limited to 'community/gcc6')
-rw-r--r--community/gcc6/0017-pr93402.patch45
-rw-r--r--community/gcc6/APKBUILD6
2 files changed, 49 insertions, 2 deletions
diff --git a/community/gcc6/0017-pr93402.patch b/community/gcc6/0017-pr93402.patch
new file mode 100644
index 0000000000..c985fb6825
--- /dev/null
+++ b/community/gcc6/0017-pr93402.patch
@@ -0,0 +1,45 @@
+2020-01-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/93402
+ * postreload.c (reload_combine_recognize_pattern): Don't try to adjust
+ USE insns.
+
+ * gcc.c-torture/execute/pr93402.c: New test.
+
+--- a/gcc/postreload.c.jj 2020-01-12 11:54:36.000000000 +0100
++++ b/gcc/postreload.c 2020-01-23 17:23:25.359929516 +0100
+@@ -1078,6 +1078,10 @@ reload_combine_recognize_pattern (rtx_in
+ struct reg_use *use = reg_state[regno].reg_use + i;
+ if (GET_MODE (*use->usep) != mode)
+ return false;
++ /* Don't try to adjust (use (REGX)). */
++ if (GET_CODE (PATTERN (use->insn)) == USE
++ && &XEXP (PATTERN (use->insn), 0) == use->usep)
++ return false;
+ }
+
+ /* Look for (set (REGX) (CONST_INT))
+--- a/gcc/testsuite/gcc.c-torture/execute/pr93402.c.jj 2020-01-23 17:25:46.496803852 +0100
++++ b/gcc/testsuite/gcc.c-torture/execute/pr93402.c 2020-01-23 17:25:05.221425501 +0100
+@@ -0,0 +1,21 @@
++/* PR rtl-optimization/93402 */
++
++struct S { unsigned int a; unsigned long long b; };
++
++__attribute__((noipa)) struct S
++foo (unsigned long long x)
++{
++ struct S ret;
++ ret.a = 0;
++ ret.b = x * 11111111111ULL + 111111111111ULL;
++ return ret;
++}
++
++int
++main ()
++{
++ struct S a = foo (1);
++ if (a.a != 0 || a.b != 122222222222ULL)
++ __builtin_abort ();
++ return 0;
++}
diff --git a/community/gcc6/APKBUILD b/community/gcc6/APKBUILD
index 4c11afddea..c13db6d940 100644
--- a/community/gcc6/APKBUILD
+++ b/community/gcc6/APKBUILD
@@ -3,7 +3,7 @@ pkgname=gcc6
pkgver=6.4.0
_ver=${pkgver%%.*}
pkgname="$pkgname"
-pkgrel=10
+pkgrel=11
pkgdesc="The GNU Compiler Collection"
url="https://gcc.gnu.org/"
arch="all"
@@ -66,6 +66,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
fix-linux-header-use-in-libgcc.patch
gcc-pure64-mips.patch
fix-ppc64le-coercion-r261621.patch
+ 0017-pr93402.patch
"
sonameprefix="$pkgname:"
@@ -354,4 +355,5 @@ f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45
01c71cd5881fc07ea3b9b980697e89b3ca0fe98502958ceafc3fca18b2604c844e2f457feab711baf8e03f00a5383b0e38aac7eb954034e306f43d4a37f165ed fix-rs6000-pie.patch
34a818d5be67eb1f34e44a80b83c28a9b9c17d37fc9fac639f490d6bb5b53ebe3318140d09c236a17d7c98f5a7792ae3d6cefccda8067a5e942d6305b9d1f87c fix-linux-header-use-in-libgcc.patch
86be3338cc9c33089608bc4c5e3b7918c4e500a345c338f361b18c342119a6ed69af5495d72950de7106d760f003528b46ad14795e805f8a3331e206dcb234e3 gcc-pure64-mips.patch
-aae9d510326bed6eca0b1f680d2caf64dd804e73fb9d726c8932faa845c07e1be6ab12920972d8fb80a33dafedcaafca71487b0eaf10e6d5fa7deb853926b933 fix-ppc64le-coercion-r261621.patch"
+aae9d510326bed6eca0b1f680d2caf64dd804e73fb9d726c8932faa845c07e1be6ab12920972d8fb80a33dafedcaafca71487b0eaf10e6d5fa7deb853926b933 fix-ppc64le-coercion-r261621.patch
+0e20a5717c20ddc1d9f00276453b0abb4868adff0496604ad7d5b766a1028181c09c2061c5648bcfd4cb29dca7048cc866d2f27c013d82c2440164f17eac685d 0017-pr93402.patch"