https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103696
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Liska <mar...@gcc.gnu.org>: https://gcc.gnu.org/g:5b8f5a50a93c5fd44fa1ecb6f431fee1df267571 commit r12-6018-g5b8f5a50a93c5fd44fa1ecb6f431fee1df267571 Author: Martin Liska <mli...@suse.cz> Date: Wed Dec 15 17:27:56 2021 +0100 pragma: respect pragma in lambda functions In g:01ad8c54fdca we started supporting target pragma changes that are primarily caused by optimization option. The same can happen in the opposite way and we need to check for changes both in optimization_current_node and target_option_current_node. PR c++/103696 gcc/ChangeLog: * attribs.c (decl_attributes): Check if target_option_current_node is changed. gcc/testsuite/ChangeLog: * g++.target/i386/pr103696.C: New test.