From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D994E3858409; Thu, 21 Sep 2023 09:51:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D994E3858409 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1695289876; bh=+aVDE/VDTKc9TbamU5wnOGPGpf7yuNeu7jxb4Ba60hY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dyqJ4q/raKltcPra7v4XcMEtZZEfzsoldGdmI/cUNLk6dC/kyvh6alW8hnG08nRzF f4bUuvvjI6mIV+hY+k5nMgpb44EB0SljCxXphcJFr4gNR3UGzKHO3DPaIaMrXnQBvb ZafHbMvYWV9KNE9TrHGusEzcq+hsNR+DrQz2GEfY= From: "malat at debian dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110622] x87: Miscompilation at O2 level (O1 is working) Date: Thu, 21 Sep 2023 09:51: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: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: malat at debian dot 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: --- 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=3D110622 --- Comment #11 from Mathieu Malaterre --- Typical setup: g++ -fno-asynchronous-unwind-tables -fno-exceptions -fno-rtti -DHIDESYMPTOM -std=3Dc++11 -g -m32 -fexcess-precision=3Dfast -O2 -o works math_test.cc -Wfatal-errors -Wall -Wextra -Wpedantic -Wconversion -Werror and: g++ -fno-asynchronous-unwind-tables -fno-exceptions -fno-rtti -std=3Dc++11 = -g -m32 -fexcess-precision=3Dfast -O2 -o fails math_test.cc -Wfatal-errors -Wa= ll -Wextra -Wpedantic -Wconversion -Werror You can observe that the only difference is that I am preventing an elision= : ``` % grep -A2 HIDE math_test.cc #ifdef HIDESYMPTOM asm volatile("" : "+r"(y.raw[0]) : : "memory"); #endif ```=