From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 126533858D35; Thu, 16 Mar 2023 11:01:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 126533858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678964499; bh=+4vcaZ9HKekMvL+KA9KKDr/dHynMRFCJEokzslevHjM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rlhyLuI7xyqh6AujKOF1jb/HVrRfyUYbarPDVM2eDRfGmssHByirXxtaNo+8zNd33 6FF2zs6LM1jEiqfjU5oRznA0BKTz5yiDyiYovyEqxc5RBz+fhCxAbTyd73yi06Layh BtycXMTHl/D/S7mQ16w5kZ5YLAijWkN3sCjG7CSM= From: "bugreporter66 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109004] [10/11/12/13 Regression] wrong code for -O2 (any above -O0) with g++ 11.3 for POWER9 (cross-compiler on x86_64 host) Date: Thu, 16 Mar 2023 11:01:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.3.0 X-Bugzilla-Keywords: wrong-code 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: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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=3D109004 --- Comment #5 from bugreporter66 at gmail dot com --- The exact command line used to produce the new binaries (added -static): ubuntu-mate@ubuntu-mate:~/Downloads/bug$ powerpc64le-linux-gnu-g++ -o test_p64-test{0,.ii} -mcpu=3Dpower9 -O0 -fpie -pie -static ubuntu-mate@ubuntu-mate:~/Downloads/bug$=20 ubuntu-mate@ubuntu-mate:~/Downloads/bug$ powerpc64le-linux-gnu-g++ -o test_p64-test{2,.ii} -mcpu=3Dpower9 -O2 -fpie -pie -static Also tried different QEMU versions (6.2.0, 5.1.0, 4.2.0) to eliminate the possibility of emulation issue. The source and the compiler are the same as with the original report. ubuntu-mate@ubuntu-mate:~/Downloads/bug$ powerpc64le-linux-gnu-g++ --versi= on powerpc64le-linux-gnu-g++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0=