public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/105234] [12 Regression] inlining failed in call to 'always_inline' 'memset': target specific option mismatch since r12-5920-g01ad8c54fdca1d
Date: Wed, 13 Apr 2022 08:14:24 +0000	[thread overview]
Message-ID: <bug-105234-4-F4RIWdc252@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105234-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:41f8f8b8a4ffcf28961cdc077fd7f0770f4bb7cc

commit r12-8135-g41f8f8b8a4ffcf28961cdc077fd7f0770f4bb7cc
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Apr 13 10:12:56 2022 +0200

    attribs: Restrict decl_attributes DECL_FUNCTION_SPECIFIC_TARGET changes to
targets that care about target attributes/pragmas [PR105234]

    The following code is rejected e.g. on mips64el-linux (but I think many
    other targets which don't support target attribute or pragma).
    The problem is that the change to decl_attributes below is done
    unconditionally and with just #pragma GCC push_options/pop_options pair
    we have target_option_default_node NULL, but after popping options
    target_option_current_node becomes non-NULL and this decl_attribute
    spot fills in DECL_FUNCTION_SPECIFIC_TARGET of a subset of a functions.
    Those appearing before push_options/pop_options will have it NULL and
    as target_option_default_node is also NULL on those targets, the default
    can_inline_p will refuse to inline any functions defined with NULL
    DECL_FUNCTION_SPECIFIC_TARGET into any function with non-NULL
    DECL_FUNCTION_SPECIFIC_TARGET (even when nothing in the options really
    changed).

    The following patch restricts that snippet to targets that care (initialize
    target_option_default_node to non-NULL to the command line options early)
    which include all targets that actually implement target attribute and/or
    pragma.

    2022-04-13  Jakub Jelinek  <jakub@redhat.com>

            PR target/105234
            * attribs.cc (decl_attributes): Don't set
            DECL_FUNCTION_SPECIFIC_TARGET if target_option_default_node is
            NULL.

            * gcc.c-torture/compile/pr105234.c: New test.

  parent reply	other threads:[~2022-04-13  8:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12  2:28 [Bug c++/105234] New: nlining failed in call to 'always_inline' 'fmt::v8::basic_format_string<Char, Args>::basic_format_string(const S&) raj.khem at gmail dot com
2022-04-12  2:49 ` [Bug c++/105234] inlining " raj.khem at gmail dot com
2022-04-12  2:49 ` raj.khem at gmail dot com
2022-04-12  2:58 ` [Bug c++/105234] inlining failed in call to 'always_inline' 'memset': target specific option mismatch raj.khem at gmail dot com
2022-04-12  8:51 ` [Bug target/105234] " marxin at gcc dot gnu.org
2022-04-12  8:51 ` marxin at gcc dot gnu.org
2022-04-12  9:45 ` [Bug target/105234] [12 Regression] inlining failed in call to 'always_inline' 'memset': target specific option mismatch since r12-5920-g01ad8c54fdca1d marxin at gcc dot gnu.org
2022-04-12 10:32 ` jakub at gcc dot gnu.org
2022-04-12 10:33 ` jakub at gcc dot gnu.org
2022-04-12 10:45 ` jakub at gcc dot gnu.org
2022-04-12 10:49 ` redi at gcc dot gnu.org
2022-04-12 11:00 ` marxin at gcc dot gnu.org
2022-04-12 11:03 ` jakub at gcc dot gnu.org
2022-04-12 11:09 ` jakub at gcc dot gnu.org
2022-04-12 11:16 ` marxin at gcc dot gnu.org
2022-04-13  1:50 ` linkw at gcc dot gnu.org
2022-04-13  8:14 ` cvs-commit at gcc dot gnu.org [this message]
2022-04-13  8:36 ` jakub 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-105234-4-F4RIWdc252@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).