From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 16C9D3851C1B; Fri, 1 Jan 2021 00:53:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 16C9D3851C1B From: "gabravier at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/98438] Rather bad optimization of midpoint implementation for __int128 (and other types) Date: Fri, 01 Jan 2021 00:53:25 +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.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: gabravier at gmail dot com X-Bugzilla-Status: WAITING 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:53:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98438 --- Comment #5 from Gabriel Ravier --- If you're wondering, the `using x =3D y;` syntax is roughly equivalent to `typedef y x;`, and the code just expects _Up to be the unsigned counterpar= t of _Tp, but here are the details as demanded by https://gcc.gnu.org/bugs/#need (sorry if the preprocessed file is a bit large, I usually use a template for examining GCC bugs): Exact version of GCC: gcc version 11.0.0 20201230 (experimental) (Compiler-Explorer-Build) System type: Assuming that's the target, x86_64-linux-gnu Options given when GCC was configured/built: ../gcc-trunk-20201231/configure --prefix=3D/opt/compiler-explorer/gcc-build/staging --build=3Dx86_64-linux-= gnu --host=3Dx86_64-linux-gnu --target=3Dx86_64-linux-gnu --disable-bootstrap --enable-multiarch --with-abi=3Dm64 --with-multilib-list=3Dm32,m64,mx32 --enable-multilib --enable-clocale=3Dgnu --enable-languages=3Dc,c++,fortran= ,ada,d --enable-ld=3Dyes --enable-gold=3Dyes --enable-libstdcxx-debug --enable-libstdcxx-time=3Dyes --enable-linker-build-id --enable-lto --enable-plugins --enable-threads=3Dposix --with-pkgversion=3DCompiler-Explorer-Build Complete command line that triggers the bug: g++ -g -o /tmp/compiler-explorer-compiler202101-4546-1y1nk07.gl18/output.s -masm=3Din= tel -S -fdiagnostics-color=3Dalways -O3 -std=3Dgnu++2a -DNDEBUG -g0 /tmp/compiler-explorer-compiler202101-4546-1y1nk07.gl18/example.cpp Compiler output (error messages, warnings, etc.): (nothing) Preprocessed file (*.i*) that triggers the bug: Would have been sent as an attachment to this message but was accidentally previously sent as an attachment to a blank message, so you can find it there.=