https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101180
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:8d70737492a5bdec41c6ae2c351c6882896b16b1 commit r14-11680-g8d70737492a5bdec41c6ae2c351c6882896b16b1 Author: Jason Merrill <ja...@redhat.com> Date: Wed Apr 16 12:02:58 2025 -0400 c++: templates, attributes, #pragma target [PR114772] Since r12-5426 apply_late_template_attributes suppresses various global state to avoid applying active pragmas to earlier declarations; we also need to override target_option_current_node. PR c++/114772 PR c++/101180 gcc/cp/ChangeLog: * pt.cc (apply_late_template_attributes): Also override target_option_current_node. gcc/testsuite/ChangeLog: * g++.dg/ext/pragma-target2.C: New test. (cherry picked from commit 5fdb0145fb9499f5db9e27f775895ce4a39215e4)