diff options
author | Milan P. Stanić <mps@arvanta.net> | 2020-01-25 01:15:12 +0100 |
---|---|---|
committer | Ariadne Conill <ariadne@dereferenced.org> | 2020-02-26 21:56:02 +0000 |
commit | c9db19308b023aab8d56db5774a6f7c3f983d6d6 (patch) | |
tree | d60c422c6300682a12425e0fa3df5b4f029e6787 | |
parent | 9d5b5719bffa3a03b936da25c9508cc35f8ec943 (diff) | |
download | aports-c9db19308b023aab8d56db5774a6f7c3f983d6d6.tar.bz2 aports-c9db19308b023aab8d56db5774a6f7c3f983d6d6.tar.xz |
main/gcc: fix wrong code when returning padded struct
bug report https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93402
-rw-r--r-- | main/gcc/0017-pr93402.patch | 45 | ||||
-rw-r--r-- | main/gcc/APKBUILD | 4 |
2 files changed, 48 insertions, 1 deletions
diff --git a/main/gcc/0017-pr93402.patch b/main/gcc/0017-pr93402.patch new file mode 100644 index 0000000000..c985fb6825 --- /dev/null +++ b/main/gcc/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/main/gcc/APKBUILD b/main/gcc/APKBUILD index 8dec4e05fe..c4a3968e50 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=5 +pkgrel=6 pkgdesc="The GNU Compiler Collection" url="https://gcc.gnu.org" arch="all" @@ -190,6 +190,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 + 0017-pr93402.patch 400-dlang-phobos.patch 401-dlang-32bits.patch @@ -641,6 +642,7 @@ f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45 86be3338cc9c33089608bc4c5e3b7918c4e500a345c338f361b18c342119a6ed69af5495d72950de7106d760f003528b46ad14795e805f8a3331e206dcb234e3 gcc-pure64-mips.patch 17e0faeef742d32d57a070d983480367dd28cd28d47a8966ce327afdff3a38ea76803a833c90aff7d3a93aa66dae76c9be47b2408500913b40571af25b85aca7 0016-invalid_tls_model.patch e9fef7677f9541848cd1df0bf3c330f06f1369bdf1d228238b7f1d03d8f2c4be07fd62be503b7bf72b6b1e2d4e404ddd957157b56b8050e3657820ade77491aa gcc10-pr91920.patch +0e20a5717c20ddc1d9f00276453b0abb4868adff0496604ad7d5b766a1028181c09c2061c5648bcfd4cb29dca7048cc866d2f27c013d82c2440164f17eac685d 0017-pr93402.patch 38772c5b0905455a44c43d6ef7e5f140530006e2bde9f5ffd6b569c7cf9633992515f666b486d7a78c30ab8da99b92b2775c90fde47821ae542ef1c49dc405df 400-dlang-phobos.patch 84bdbdfcb972161765b81220ea2e80e83c32f3ab27596b77eb451d8cac4bd6312210df468581c2b0e1363f5e3b31654e369c47ae84c907f3b54a1786d7c17830 401-dlang-32bits.patch 9d73f21eaa2458d28a144dd0e5478ed52763a4d8bbf62084b607db52bce1e2242f773c853fc34e6aae2d53c4124948139954627064e850e9dabaddaef5cb9d69 402-dlang-stat.patch |