[ARM] Fix PR target/79239 - unrecognized insn after pragma gcc pop_options
{committed for rearnsha} It turns out that because the compiler uses a hash table to save the cl_target_option structures it is unsafe to modify the result of build_target_option_node() (doing so will cause the hash lookup to fail). This PR was due to not properly understanding this limitation. The fix is to create temporary copies of the cl_target_option nodes for use during target option processing and then only creating the tree node once the options have been suitably modified. gcc: PR target/79239 * arm.c (arm_option_override): Don't call build_target_option_node until after doing all option overrides. (arm_valid_target_attribute_tree): Likewise. gcc/testsuite: * gcc.target/arm/pr79239.c: New test. From-SVN: r244965
Showing
gcc/testsuite/gcc.target/arm/pr79239.c
0 → 100644
Please
register
or
sign in
to comment