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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1
   Target Milestone|---                         |11.3
   Last reconfirmed|                            |2022-02-23
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r11-7693.

commit 1c7bec8bfbc5457c1b57d0e3b67f5d6bc8812e57
Author: Martin Liska <mli...@suse.cz>
Date:   Wed Mar 3 09:38:55 2021 +0100

    c++: support target attr for DECL_LOCAL_DECL_P fns [PR99108]

    We crash when target attribute get_function_versions_dispatcher is called
    for a function that is not registered in call graph.  This was happening
    because we were calling it for the function-local decls that aren't in the
    symbol table, instead of the corresponding namespace-scope decls that are.

    gcc/cp/ChangeLog:

            PR c++/99108
            * call.c (get_function_version_dispatcher): Handle
            DECL_LOCAL_DECL_P.
            * decl.c (maybe_version_functions): Likewise.
            (maybe_mark_function_versioned): New.
            * name-lookup.c (push_local_extern_decl_alias): No longer static.
            * name-lookup.h (push_local_extern_decl_alias): Adjust.

    gcc/testsuite/ChangeLog:

            PR c++/99108
            * g++.target/i386/pr99108.C: New test.

    Co-authored-by: Jason Merrill <ja...@redhat.com>

Reply via email to