[PATCH, ARM] Fix redefinition of cpp macros with #pragma GCC pop,reset

Christian Bruel christian.bruel@st.com
Wed Feb 17 12:51:00 GMT 2016


target_option_current_node, used in c-pragma.c to check if a state
should be popped or reseted to the previous value, was not set when
switching state with #pragma GCC target (I missed to see that, since it
is done for pop,reset). So in some cases the state might not be reset
correctly.

This patch sets it for #pragma GCC target paths and update the comments
as well to clarify this point.

As a benefit we now use this cached value instead of 
build_target_option_node (&global_options), this should speed up (a
little bit) this path when processing arm_neon.h.

One effect of it is that some predicate tests (e.g arm_neonv2_ok) in the
testsuite was returning the wrong value, thus marking some test as
UNRESOLVED instead of PASS. See the reduced case of the issue attached
is the patch.

Regtested, a few new PASS for -mfpu=neon-fp-armv8








-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpp_fma.patch
Type: text/x-patch
Size: 3233 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160217/f7c9d822/attachment.bin>


More information about the Gcc-patches mailing list