https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110515
Bug ID: 110515 Summary: [14 Regression] llvm-15.0.7 possibly invalid code on -O3 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- Created attachment 55447 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55447&action=edit DwarfCompileUnit.cpp Initially the failure is observed on r14-2233-gfca6d9c12f5bf0 where llvm-15.0.7 test suite fails a single test: Failed Tests (1): LLVM :: DebugInfo/X86/vla-multi.ll I think I shrunk it down to DwarfCompileUnit.cpp: $ g++ -std=c++14 DwarfCompileUnit.cpp -O2 $cxxflags -o bug-O2 && ./bug-O2 Illegal instruction (core dumped) $ g++ -std=c++14 DwarfCompileUnit.cpp -O1 $cxxflags -o bug-O1 && ./bug-O1 <ok> It's a very fragile test: - any inlines I try seem to repair the test - -fno-strict-aliasing unbreaks it (I believe the code is strict-aliasing clean) - optimization option changes repair the test $ g++ -v Using built-in specs. COLLECT_GCC=/<<NIX>>/gcc-14.0.0/bin/g++ COLLECT_LTO_WRAPPER=/<<NIX>>/gcc-14.0.0/libexec/gcc/x86_64-unknown-linux-gnu/14.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.0 99999999 (experimental) (GCC)