https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105234

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
On the other side, most of the targets actually don't initialize
target_option_default_node.  List of targets that do so:
aarch64/aarch64.cc:  target_option_default_node = target_option_current_node
arm/arm.cc:  target_option_default_node = target_option_current_node
csky/csky.cc:  target_option_default_node = target_option_current_node
i386/i386-options.cc:      target_option_default_node =
target_option_current_node
nios2/nios2.cc:  target_option_default_node = target_option_current_node
pru/pru.cc:  target_option_default_node = target_option_current_node
rs6000/rs6000.cc:    target_option_default_node = target_option_current_node
s390/s390.cc:  target_option_default_node = build_target_option_node
(&global_options, &global_options_set);
v850/v850.cc:  target_option_default_node = target_option_current_node
and list of targets that actually support target attribute:
aarch64/aarch64.cc:#define TARGET_OPTION_VALID_ATTRIBUTE_P
aarch64_option_valid_attribute_p
arm/arm.cc:#define TARGET_OPTION_VALID_ATTRIBUTE_P arm_valid_target_attribute_p
i386/i386.cc:#define TARGET_OPTION_VALID_ATTRIBUTE_P
ix86_valid_target_attribute_p
nios2/nios2.cc:#define TARGET_OPTION_VALID_ATTRIBUTE_P
nios2_valid_target_attribute_p
rs6000/rs6000.cc:#define TARGET_OPTION_VALID_ATTRIBUTE_P
rs6000_valid_attribute_p
s390/s390.cc:#define TARGET_OPTION_VALID_ATTRIBUTE_P
s390_valid_target_attribute_p

So perhaps the generic r12-5920 change should be guarded on
target_option_default_node being non-NULL, so that targets that don't care can
stay as is?
The question is what to do with csky, pru and v850 that initialize it but don't
support target attributes?

Reply via email to