From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F2D03383803A; Sun, 18 Jul 2021 04:18:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F2D03383803A From: "rin at NetBSD dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/101469] wrong code with "-O2 -fPIE" for SH Date: Sun, 18 Jul 2021 04:18:04 +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: 10.3.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rin at NetBSD 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 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: Sun, 18 Jul 2021 04:18:05 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101469 --- Comment #1 from Rin Okuyama --- I've confirmed that the problem also occurs for sh3-none-elf: ---- $ sh3-none-elf-gcc -v Using built-in specs. COLLECT_GCC=3D/usr/pkg/cross-sh3-none-elf/bin/sh3-none-elf-gcc COLLECT_LTO_WRAPPER=3D/usr/pkg/cross-sh3-none-elf/libexec/gcc/sh3-none-elf/= 10.3.0/lto-wrapper Target: sh3-none-elf Configured with: /build/pkgsrc/cross/sh3-none-elf-gcc/work.x86_64/gcc-10.3.0/configure --target=3Dsh3-none-elf --enable-languages=3Dc,c++ --with-newlib --disable-= nls --disable-libstdcxx-pch --prefix=3D/usr/pkg/cross-sh3-none-elf --build=3Dx86_64--netbsd --host=3Dx86_64--netbsd --infodir=3D/usr/pkg/cross-sh3-none-elf/info --mandir=3D/usr/pkg/cross-sh3-none-elf/man Thread model: single Supported LTO compression algorithms: zlib gcc version 10.3.0 (GCC) ---- So, this is not NetBSD-specific. Also, for shle--netbsdelf, GCC 7.5 and 5.5 has the same problem; this is not a recent regression. Thanks, rin=