From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 027C33858D37; Fri, 3 Mar 2023 11:58:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 027C33858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677844691; bh=GTsxNiK5lQoMPUBy/8FqkeKRkiXzLijH5qiNJcH2WX4=; h=From:To:Subject:Date:From; b=T1NRwISamtAKcPxDFsRAeYGJOTwGNY8b53Zz9CGaL+NZ97KrN4SX9UFpjRuQ33kbd +2KpB4HH/oSXsKlM/L/0eUTEPegiZRrwtxDoVCL0ZBfLLLxaZzW6ODiv6Bo9tGw/AG mS+uqxqXESW2tUY2o8F9bmMcjg6dbl8SNvobrE5g= From: "bugreporter66 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109007] New: building for POWER8 leaks into POWER9 ISA with g++ 11.3 (cross-compiler on x86_64 host) Date: Fri, 03 Mar 2023 11:58:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bugreporter66 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109007 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=3D54577&action=3Dedit 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=3Dpower8) creates binary that has illegal instru= ction 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=