[Bug c++/109753] [13/14/15 Regression] pragma GCC target causes std::vector not to compile (always_inline on constructor)
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 29 13:51:49 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109753
--- Comment #18 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:eff00046409a7289bfdc1861e68b532895f91c0e
commit r15-902-geff00046409a7289bfdc1861e68b532895f91c0e
Author: Jason Merrill <jason@redhat.com>
Date: Wed Feb 14 17:18:17 2024 -0500
c++: pragma target and static init [PR109753]
#pragma target and optimize should also apply to implicitly-generated
functions like static initialization functions and defaulted special
member
functions.
The handle_optimize_attribute change is necessary to avoid regressing
g++.dg/opt/pr105306.C; maybe_clone_body creates a cgraph_node for the ~B
alias before handle_optimize_attribute, and the alias never goes through
finalize_function, so we need to adjust semantic_interposition somewhere
else.
PR c++/109753
gcc/c-family/ChangeLog:
* c-attribs.cc (handle_optimize_attribute): Set
cgraph_node::semantic_interposition.
gcc/cp/ChangeLog:
* decl.cc (start_preparsed_function): Call decl_attributes.
gcc/testsuite/ChangeLog:
* g++.dg/opt/always_inline1.C: New test.
More information about the Gcc-bugs
mailing list