]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: templates, attributes, #pragma target [PR114772]
authorJason Merrill <jason@redhat.com>
Wed, 16 Apr 2025 16:02:58 +0000 (12:02 -0400)
committerJason Merrill <jason@redhat.com>
Wed, 16 Apr 2025 18:50:13 +0000 (14:50 -0400)
commit5fdb0145fb9499f5db9e27f775895ce4a39215e4
tree96e47f1d0328a0624cf4e38ea78aa7479a608de0
parentb0d7d644f3c25af9bf60c948ab26aa7b09a68787
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.
gcc/cp/pt.cc
gcc/testsuite/g++.dg/ext/pragma-target2.C [new file with mode: 0644]