https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109007
Bug ID: 109007 Summary: building for POWER8 leaks into POWER9 ISA with g++ 11.3 (cross-compiler on x86_64 host) Product: gcc Version: 11.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: bugreporter66 at gmail dot com Target Milestone: --- Created attachment 54577 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54577&action=edit archive with the source code and screenshot to reproduce the issue The code sample is attached with the source files and a screenshot. It's a regression from g++ 9.x series, where it worked properly. Building for POWER8 (-mcpu=power8) creates binary that has illegal instruction for POWER8 ISA, as confirmed by running the code with QEMU (see screenshot). The command line for building is the following (change to test directory first): make -f core_make_p64.mk build_le -j4 The command line for emulation with QEMU (spits illegal instruction): qemu-ppc64le -cpu POWER8 core_test.p64f32Lp8 The test case is taken from https://github.com/VectorChief/QuadRay-engine, where that test fails (master) for POWER8 target on Ubuntu MATE 22.04.2