From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5F3C13858D20; Sun, 9 Jun 2024 08:54:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F3C13858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717923250; bh=VSgMu2rJipabaoNafi0NWKU00PG+pZyqYc/IORl1hhs=; h=From:To:Subject:Date:From; b=K+pHrU9NiFDfG2iIikkHKdnU+AwR50UT+MfPOf8qdBvmqPV2eMeXZBm6nNGl7tv8R yYr0exBIs6FskhrbOsUhwibEbbemNzBs2l1dMSzubSbz7j20w//4aEz14pMO5AzF7/ f9jyJJRkU8ns7C37umedR6I7Vdc8bevm9JXaDuD8= From: "slyfox at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/115403] New: [15 Regression] highway build from git fails with 'target specific option mismatch' since r15-902-geff00046409a72 Date: Sun, 09 Jun 2024 08:54:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 15.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D115403 Bug ID: 115403 Summary: [15 Regression] highway build from git fails with 'target specific option mismatch' since r15-902-geff00046409a72 Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- I was not able to extract small example yet from highway. The build failure happens on gcc-15 since r15-902-geff00046409a72 (bisected): commit eff00046409a7289bfdc1861e68b532895f91c0e Author: Jason Merrill Date: Wed Feb 14 17:18:17 2024 -0500 c++: pragma target and static init [PR109753] Looks relevant. The build fails as: hwy/base.h:1006:40: error: inlining failed in call to 'always_inline' 'constexpr To hwy::BitCastScalar(const From&) [with To =3D short unsigned i= nt; >From =3D float16_t; EnableIf<((bool)(! IsSpecialFloat()))>* = =3D 0]': target specific option mismatch 1006 | HWY_API HWY_BITCASTSCALAR_CONSTEXPR To BitCastScalar(const From& va= l) { | ^~~~~~~~~~~~~ I think it's a gcc bug. highway uses `__attribute__((target(...)))` on a per-function basis. To reproduce: $ git clone https://github.com/google/highway.git # I got 026be6bf23c026eb2ab6d28dfb9e4ecdda909d4d locally $ cd highway/ $ mkdir b $ cd b $ cmake .. $ make [ 42%] Building CXX object CMakeFiles/float_test.dir/hwy/tests/float_test.cc.o ... In file included from highway/hwy/tests/float_test.cc:22: highway/hwy/base.h: In function 'constexpr bool hwy::ScalarIsInf(T) [with T= =3D float16_t]': highway/hwy/base.h:1006:40: error: inlining failed in call to 'always_inlin= e' 'constexpr To hwy::BitCastScalar(const From&) [with To =3D short unsigned i= nt; >From =3D float16_t; EnableIf<((bool)(! IsSpecialFloat()))>* = =3D 0]': target specific option mismatch 1006 | HWY_API HWY_BITCASTSCALAR_CONSTEXPR To BitCastScalar(const From& va= l) { | ^~~~~~~~~~~~~ highway/hwy/base.h:2855:43: note: called from here 2855 | return static_cast(BitCastScalar(static_cast(val)) <<= 1) =3D=3D | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ $ gcc -v |& unnix Using built-in specs. COLLECT_GCC=3D/<>/gcc-15.0.0/bin/gcc COLLECT_LTO_WRAPPER=3D/<>/gcc-15.0.0/libexec/gcc/x86_64-unknown-linux-= gnu/15.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../source/configure --prefix=3D/<>/gcc-15.0.0 --with-gmp-include=3D/<>/gmp-6.3.0-dev/include --with-gmp-lib=3D/<>/gmp-6.3.0/lib --with-mpfr-include=3D/<>/mpfr-4.2.1-dev/include --with-mpfr-lib=3D/<>/mpfr-4.2.1/lib --with-mpc=3D/<>/libmpc-1.3.1 --with-native-system-header-dir=3D/<>/glibc-2.39-52-dev/include --with-build-sysroot=3D/ --with-gxx-include-dir=3D/<>/gcc-15.0.0/include/c++/15.0.0/ --program-prefix=3D --enable-lto --disable-libstdcxx-pch --without-included-gettext --with-system-zlib --enable-checking=3Drelease --enable-static --enable-languages=3Dc,c++ --disable-multilib --enable-plug= in --disable-libcc1 --with-isl=3D/<>/isl-0.20 --disable-bootstrap --build=3Dx86_64-unknown-linux-gnu --host=3Dx86_64-unknown-linux-gnu --target=3Dx86_64-unknown-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 99999999 (experimental) (GCC)=