pragma: respect pragma in lambda functions
authorMartin Liska <mliska@suse.cz>
Wed, 15 Dec 2021 16:27:56 +0000 (17:27 +0100)
committerMartin Liska <mliska@suse.cz>
Thu, 16 Dec 2021 16:49:49 +0000 (17:49 +0100)
commit5b8f5a50a93c5fd44fa1ecb6f431fee1df267571
treed44a3f87ab74cf460800ef7668a64f1e72a770bc
parentc14f38d4292ec22462a4080841d526f87428130a
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.
gcc/attribs.c
gcc/testsuite/g++.target/i386/pr103696.C [new file with mode: 0644]