public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "slyfox at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/115403] [15 Regression]  highway build from git fails with 'target specific option mismatch' since r15-902-geff00046409a72
Date: Sun, 09 Jun 2024 10:17:41 +0000	[thread overview]
Message-ID: <bug-115403-4-1rEnJh95dZ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-115403-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115403

--- Comment #2 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
`cvise` came up with this example:

    //$ cat float_test.cc.cc
    template <typename> __attribute__((always_inline)) inline void
AssertEqual() {}
    void TestAllF16FromF32() { AssertEqual<float>(); }
    #pragma GCC target "sse4.1"

Looks valid?

gcc-14 can handle it, gcc-15 can't:

$ g++-14 -O2 -std=c++17 -c float_test.cc.cc

$ g++-15 -O2 -std=c++17 -c float_test.cc.cc
float_test.cc.cc: In function 'void TestAllF16FromF32()':
float_test.cc.cc:1:64: error: inlining failed in call to 'always_inline' 'void
AssertEqual() [with <template-parameter-1-1> = float]': target specific option
mismatch
    1 | template <typename> __attribute__((always_inline)) inline void
AssertEqual() {}
      |                                                               
^~~~~~~~~~~
float_test.cc.cc:2:46: note: called from here
    2 | void TestAllF16FromF32() { AssertEqual<float>(); }
      |                            ~~~~~~~~~~~~~~~~~~^~

  parent reply	other threads:[~2024-06-09 10:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-09  8:54 [Bug c++/115403] New: " slyfox at gcc dot gnu.org
2024-06-09  8:59 ` [Bug c++/115403] " slyfox at gcc dot gnu.org
2024-06-09 10:17 ` slyfox at gcc dot gnu.org [this message]
2024-06-09 16:46 ` [Bug c++/115403] [15 Regression] highway build from git fails with 'target specific option mismatch' (templates) " pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-115403-4-1rEnJh95dZ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).