From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 28A783858D35; Thu, 16 Mar 2023 12:48:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 28A783858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678970897; bh=wVYQlwPFC9LDaZhh+9gAne4cit48SPWzvEKxMDwfyTE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LD7mg8qWhYlMY0sWgCGpEsGSJwl+4VvBQ/WMYSpG3NLBV3gQu0Lb7h8cGNYCm6E5v pv72PrV05NRBlUdo/EOL1uB6Y/9kAgJjsOWwk80idQhQdu+fFKjBo/BLM0Q7+ZB5ka hC/ve9ikZRvK4XzgFeAGPOz0ZX7hAHSyhpyAtEZA= 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 12:48:16 +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: RESOLVED X-Bugzilla-Resolution: WORKSFORME 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 #10 from bugreporter66 at gmail dot com --- I checked the simple version of the test with QEMU 6.2.0 and 7.0.0: ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$=20 ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$ powerpc64le-linux-gnu-g++ -O2 -mcpu=3Dpower9 -ffast-math -static sample.cpp -o sample_p64 ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$=20 ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$=20 ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$ qemu-ppc64le --version qemu-ppc64le version 6.2.0 Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$=20 ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$=20 ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$ qemu-ppc64le -cpu POWER9 sample_p64=20 qemu: uncaught target signal 6 (Aborted) - core dumped Aborted (core dumped) ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$=20 ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$=20 ... ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$=20 ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$=20 ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$ qemu-ppc64le --version qemu-ppc64le version 7.0.0 Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$=20 ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$=20 ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$=20 ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$ qemu-ppc64le -cpu POWER9 sample_p64=20 ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$=20 ubuntu-mate@ubuntu-mate:~/Downloads/test_p64$=20 So it works after 7.0.0=