From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8B15C3858D39; Wed, 15 Mar 2023 08:43:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B15C3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678869785; bh=Bu/WZ8/+x637J0ipNduKWA7Y4k1eau6FI3yWv+lktOE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mD1QNZs0uzwJt2Z/LrAjPgvZ9WjEUr9AduACV5FxRcPVcInZqX5tqZrbZEcKcWbcG LA9b8vRQyVuUYCbkyhZPjmVelbBJ9vBvuxlaB+9Zkt0Ce0QCCy6RL2j/oqufoN9ZXc 1oePEmAXC2pax+qNBFTSzb7XQ8bqMlhCAlcsjuLM= From: "jakub at gcc dot gnu.org" 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: Wed, 15 Mar 2023 08:43:05 +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: jakub at gcc dot gnu.org 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: cc 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 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- You haven't told what you think is a bug and what you think is correct behavior. I've tried to compile using 12.2.1 20221121 g++ -o test_p64-test{0,.ii} -mcpu=3Dpower9 -O0 -fpie -pie g++ -o test_p64-test{2,.ii} -mcpu=3Dpower9 -O2 -fpie -pie ./test_p64-test0 > 0 ./test_p64-test2 > 2 diff -up 0 2 g++ -o test_p64-test{0,.ii} -mcpu=3Dpower8 -O0 -fpie -pie g++ -o test_p64-test{2,.ii} -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations -mcpu=3Dpower9 -O2 -fpie -pie ./test_p64-test0 > 0 ./test_p64-test2 > 2 diff -up 0 2 And neither shows any differences. Attaching a screenshot is a very bad idea, one can't copy from it. Only preprocessed source should be attached, the rest should go in text here, describe what to run and what is correct and what is wrong (best testcases = just abort if they don't behave as expected and exit with 0 otherwise).=