Skip to content

Turn off uninitialized warnings for GCC up to 14. #147968

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 13, 2025

Conversation

hvdijk
Copy link
Contributor

@hvdijk hvdijk commented Jul 10, 2025

Although the false positives that caused it to be disabled originally may have been fixed in GCC 12, GCC also suffers from a problem where -Wuninitialized may cause the build to hang on some platforms (GCC #120729). This has been fixed in GCC 15, so turn on -Wuninitialized for GCC 15+ instead of GCC 12+.

Although the false positives that caused it to be disabled originally
may have been fixed in GCC 12, GCC also suffers from a problem where
-Wuninitialized may cause the build to hang on some platforms
(GCC llvm#120729). This has been fixed in GCC 15, so turn on -Wuninitialized
for GCC 15+ instead of GCC 12+.
@llvmbot llvmbot added the cmake Build system in general and CMake in particular label Jul 10, 2025
@hvdijk hvdijk requested review from cjacek and MaskRay July 10, 2025 13:57
@hvdijk
Copy link
Contributor Author

hvdijk commented Jul 10, 2025

The current limit of GCC 12 comes from #76251, so @cjacek, @MaskRay, are you okay with raising the limit, or is it important that we keep -Wuninitialized on those platforms that are not affected by that GCC bug?

@MaskRay
Copy link
Member

MaskRay commented Jul 13, 2025

The current limit of GCC 12 comes from #76251, so @cjacek, @MaskRay, are you okay with raising the limit, or is it important that we keep -Wuninitialized on those platforms that are not affected by that GCC bug?

Clang does better job at sometimes-ininitialized warnings, and we do not want to uglify code to appease GCC false positives. I think it's reasonable to bump the version.

@hvdijk hvdijk merged commit 21491ed into llvm:main Jul 13, 2025
11 checks passed
@hvdijk hvdijk deleted the no-gcc14-wuninitialized branch July 13, 2025 09:44
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 13, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-sve-vla-2stage running on linaro-g3-02 while building llvm at step 12 "ninja check 2".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/41/builds/7843

Here is the relevant piece of the build log for the reference
Step 12 (ninja check 2) failure: stage 2 checked (failure)
******************** TEST 'LLVM :: tools/llvm-exegesis/RISCV/rvv/filter.test' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
/home/tcwg-buildbot/worker/clang-aarch64-sve-vla-2stage/stage2/bin/llvm-exegesis -mtriple=riscv64 -mcpu=sifive-x280 -benchmark-phase=assemble-measured-code --mode=inverse_throughput --opcode-name=PseudoVNCLIPU_WX_M1_MASK     --riscv-filter-config='vtype = {VXRM: rod, AVL: VLMAX, SEW: e(8|16), Policy: ta/mu}' --max-configs-per-opcode=1000 --min-instructions=10 | /home/tcwg-buildbot/worker/clang-aarch64-sve-vla-2stage/stage2/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-sve-vla-2stage/llvm/llvm/test/tools/llvm-exegesis/RISCV/rvv/filter.test # RUN: at line 1
+ /home/tcwg-buildbot/worker/clang-aarch64-sve-vla-2stage/stage2/bin/llvm-exegesis -mtriple=riscv64 -mcpu=sifive-x280 -benchmark-phase=assemble-measured-code --mode=inverse_throughput --opcode-name=PseudoVNCLIPU_WX_M1_MASK '--riscv-filter-config=vtype = {VXRM: rod, AVL: VLMAX, SEW: e(8|16), Policy: ta/mu}' --max-configs-per-opcode=1000 --min-instructions=10
+ /home/tcwg-buildbot/worker/clang-aarch64-sve-vla-2stage/stage2/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-sve-vla-2stage/llvm/llvm/test/tools/llvm-exegesis/RISCV/rvv/filter.test
PseudoVNCLIPU_WX_M1_MASK: Failed to produce any snippet via: instruction has tied variables, avoiding Read-After-Write issue, picking random def and use registers not aliasing each other, for uses, one unique register for each position
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/tcwg-buildbot/worker/clang-aarch64-sve-vla-2stage/stage2/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-sve-vla-2stage/llvm/llvm/test/tools/llvm-exegesis/RISCV/rvv/filter.test

--

********************


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake Build system in general and CMake in particular
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants