Summary: | sys-devel/gcc-14: miscompiles dev-libs/libgcrypt-1.10.3-r1 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sam James <sam> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | base-system |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113135 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113467 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 914580 |
Description
Sam James
![]() ![]() ![]() ![]() I managed to reduce at least the test itself quite a bit so far: $ git diff --stat 88cacf20894b41fa271522040962030390a1e416..HEAD tests/t-mpi-point.c tests/t-mpi-point.c | 4268 ++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 file changed, 82 insertions(+), 4186 deletions(-) the test itself isn't miscompiled, so need to start looking at which TU in libgcrypt is broken 6cb155a6cf314232248a12bdd395ed4151ae5a28 is the first bad commit commit 6cb155a6cf314232248a12bdd395ed4151ae5a28 Author: Tamar Christina <tamar.christina@arm.com> Date: Fri Jan 12 15:24:49 2024 +0000 middle-end: make memory analysis for early break more deterministic [PR113135] Instead of searching for where to move stores to, they should always be in exit belonging to the latch. We can only ever delay stores and even if we pick a different exit than the latch one as the main one, effects still happen in program order when vectorized. If we don't move the stores to the latch exit but instead to whever we pick as the "main" exit then we can perform incorrect memory accesses (luckily these are trapped by verify_ssa). We used to iterate over the conds and check the loads and stores inside them. However this relies on the conds being ordered in program order. Additionally if there is a basic block between two conds we would not have analyzed it. Instead this now walks from the preds of the destination basic block up to the loop header and analyzes every block along the way. As a later optimization we could stop as soon as we've seen all the BBs we have conds for. For now the header will always contain the first cond, but this can change when we support arbitrary control flow. gcc/ChangeLog: PR tree-optimization/113135 * tree-vect-data-refs.cc (vect_analyze_early_break_dependences): Rework dependency analysis. gcc/testsuite/ChangeLog: PR tree-optimization/113135 * gcc.dg/vect/vect-early-break_103-pr113135.c: New test. .../gcc.dg/vect/vect-early-break_103-pr113135.c | 14 +++++++ gcc/tree-vect-data-refs.cc | 43 +++++++++------------- 2 files changed, 32 insertions(+), 25 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_103-pr113135.c bisect found first bad commit My earlier bisect was bad. New result: ``` There are only 'skip'ped commits left to test. The first bad commit could be any of: 411de96dbf2bdafc7a90ebbfc63e68afd6388d29 6cb155a6cf314232248a12bdd395ed4151ae5a28 99c0a540d6689ede068f9ba98af6f38c3cd71362 We cannot bisect more! error: bisect run cannot continue any more ``` mpi-add.o is miscompiled (In reply to Sam James from comment #4) > mpi-add.o is miscompiled _gcry_mpi_add_ui The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a1e21703f86e5d60a68a53839774535ccdb8403e commit a1e21703f86e5d60a68a53839774535ccdb8403e Author: Sam James <sam@gentoo.org> AuthorDate: 2024-01-19 07:44:41 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-01-19 07:44:41 +0000 14.0.0: add 76_all_PR113467-vect-miscompile.patch Bug: https://gcc.gnu.org/PR113467 Bug: https://bugs.gentoo.org/922195 Signed-off-by: Sam James <sam@gentoo.org> 14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77a9314cece73d71ceec164369789b08e744a252 commit 77a9314cece73d71ceec164369789b08e744a252 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-01-22 04:56:08 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-01-22 04:56:30 +0000 sys-devel/gcc: add 14.0.1_pre20240121 Includes a workaround for bug #922195. Closes: https://bugs.gentoo.org/922195 Closes: https://bugs.gentoo.org/922580 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc/Manifest | 1 + sys-devel/gcc/gcc-14.0.1_pre20240121.ebuild | 64 +++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) |