From 6fb783b39f914574a1889aa51d06c08cf55678b4 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Wed, 30 Apr 2014 13:01:02 -0400
Subject: [PATCH 2/2] Autogenerated part of introduction of GCC_OPTION macro

gcc/

	Patch autogenerated by refactor_options.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 918f845b08a66d601574bda0a6ae87f1d42e5c06

	* alias.c (base_alias_check): Wrap option usage in GCC_OPTION macro.
	(mems_in_disjoint_alias_sets_p): Likewise.
	(get_deref_alias_set): Likewise.
	(get_alias_set): Likewise.
	(new_alias_set): Likewise.
	(nonoverlapping_component_refs_p): Likewise.
	* asan.c (gate_asan_O0): Likewise.
	(asan_finish_file): Likewise.
	(gate_asan): Likewise.
	(gate_sanopt): Likewise.
	(asan_dynamic_init_call): Likewise.
	(asan_add_global): Likewise.
	* auto-inc-dec.c (gate_auto_inc_dec): Likewise.
	* bb-reorder.c (gate_duplicate_computed_gotos): Likewise.
	(better_edge_p): Likewise.
	(gate_handle_reorder_blocks): Likewise.
	(gate_handle_partition_blocks): Likewise.
	* bt-load.c (branch_target_load_optimize): Likewise.
	(gate_handle_branch_target_load_optimize1): Likewise.
	(gate_handle_branch_target_load_optimize2): Likewise.
	(rest_of_handle_branch_target_load_optimize2): Likewise.
	(btr_def_live_range): Likewise.
	(combine_btr_defs): Likewise.
	(migrate_btr_def): Likewise.
	* builtins.c (expand_builtin_sync_operation): Likewise.
	(fold_builtin_1): Likewise.
	(expand_builtin_fork_or_exec): Likewise.
	(fold_builtin_0): Likewise.
	(expand_builtin_atomic_exchange): Likewise.
	(expand_builtin_atomic_compare_exchange): Likewise.
	(expand_builtin_atomic_load): Likewise.
	(expand_builtin_atomic_store): Likewise.
	(expand_builtin_atomic_fetch_op): Likewise.
	(fold_builtin_atomic_is_lock_free): Likewise.
	(expand_builtin_atomic_is_lock_free): Likewise.
	(expand_builtin): Likewise.
	(fold_builtin_cabs): Likewise.
	(fold_builtin_sqrt): Likewise.
	(fold_builtin_cbrt): Likewise.
	(fold_builtin_tan): Likewise.
	(fold_builtin_cexp): Likewise.
	(fold_builtin_logarithm): Likewise.
	(fold_builtin_hypot): Likewise.
	(fold_builtin_exponent): Likewise.
	(expand_builtin_expect): Likewise.
	(fold_builtin_fmin_fmax): Likewise.
	(is_builtin_name): Likewise.
	(expand_builtin_mathfn): Likewise.
	(expand_builtin_mathfn_2): Likewise.
	(interclass_mathfn_icode): Likewise.
	(expand_builtin_int_roundingfn_2): Likewise.
	(fold_trunc_transparent_mathfn): Likewise.
	(fold_fixed_mathfn): Likewise.
	(fold_builtin_floor): Likewise.
	(fold_builtin_ceil): Likewise.
	(fold_builtin_round): Likewise.
	(fold_builtin_pow): Likewise.
	(do_mpfr_ckconv): Likewise.
	(do_mpc_ckconv): Likewise.
	* builtins.def (DEF_TM_BUILTIN): Likewise.
	(DEF_SANITIZER_BUILTIN): Likewise.
	(DEF_GOMP_BUILTIN): Likewise.
	(DEF_CILKPLUS_BUILTIN): Likewise.
	* caller-save.c (setup_save_areas): Likewise.
	(saved_hard_reg_compare_func): Likewise.
	* calls.c (precompute_register_parameters): Likewise.
	(flags_from_decl_or_type): Likewise.
	(prepare_call_address): Likewise.
	(initialize_argument_information): Likewise.
	(emit_call_1): Likewise.
	(expand_call): Likewise.
	(emit_library_call_value_1): Likewise.
	* cfgbuild.c (make_edges): Likewise.
	* cfgcleanup.c (try_forward_edges): Likewise.
	(old_insns_match_p): Likewise.
	(execute_jump2): Likewise.
	(execute_jump): Likewise.
	* cfgexpand.c (partition_stack_vars): Likewise.
	(expand_stack_vars): Likewise.
	(defer_stack_allocation): Likewise.
	(stack_protect_decl_phase): Likewise.
	(expand_debug_locations): Likewise.
	(gimple_expand_cfg): Likewise.
	(expand_used_vars): Likewise.
	* cfgloopanal.c (estimate_reg_pressure_cost): Likewise.
	* cfgrtl.c (rtl_merge_blocks): Likewise.
	(try_redirect_by_replacing_jump): Likewise.
	(fixup_reorder_chain): Likewise.
	(cfg_layout_can_merge_blocks_p): Likewise.
	(cfg_layout_merge_blocks): Likewise.
	(purge_dead_edges): Likewise.
	(rest_of_pass_free_cfg): Likewise.
	* cgraph.c (cgraph_node_cannot_return): Likewise.
	(cgraph_edge_cannot_lead_to_return): Likewise.
	(cgraph_remove_node): Likewise.
	(verify_cgraph_node): Likewise.
	(cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise.
	(cgraph_get_body): Likewise.
	* cgraphclones.c (cgraph_create_virtual_clone): Likewise.
	(cgraph_function_versioning): Likewise.
	* cgraphunit.c (varpool_finalize_decl): Likewise.
	(expand_function): Likewise.
	(cgraph_finalize_function): Likewise.
	(finalize_compilation_unit): Likewise.
	(analyze_functions): Likewise.
	(expand_thunk): Likewise.
	(ipa_passes): Likewise.
	(compile): Likewise.
	(expand_all_functions): Likewise.
	* cilk.h (fn_contains_cilk_spawn_p): Likewise.
	* combine-stack-adj.c (gate_handle_stack_adjustments): Likewise.
	* combine.c (gate_handle_combine): Likewise.
	(make_extraction): Likewise.
	(try_combine): Likewise.
	(simplify_if_then_else): Likewise.
	(apply_distributive_law): Likewise.
	(distribute_and_simplify_rtx): Likewise.
	(combine_simplify_rtx): Likewise.
	* common/config/arc/arc-common.c (arc_option_init_struct): Likewise.
	* compare-elim.c (gate_compare_elim_after_reload): Likewise.
	* config/aarch64/aarch64.c (aarch64_expand_mov_immediate): Likewise.
	(aarch64_parse_tune): Likewise.
	(initialize_aarch64_code_model): Likewise.
	(aarch64_parse_arch): Likewise.
	(aarch64_parse_cpu): Likewise.
	(aarch64_override_options): Likewise.
	(aarch64_lra_p): Likewise.
	(aarch64_frame_pointer_required): Likewise.
	(aarch64_override_options_after_change): Likewise.
	(aarch64_add_stmt_cost): Likewise.
	(aarch64_expand_prologue): Likewise.
	(aarch64_cannot_change_mode_class): Likewise.
	* config/aarch64/aarch64.h (CONSTANT_ALIGNMENT): Likewise.
	(HARD_REGNO_CALL_PART_CLOBBERED): Likewise.
	(AARCH64_ROUND_DOWN): Likewise.
	* config/aarch64/aarch64.md (add<mode>3): Likewise.
	* config/alpha/alpha.c (alpha_add_builtins): Likewise.
	(alpha_in_small_data_p): Likewise.
	(alpha_elf_select_rtx_section): Likewise.
	(alpha_align_insns): Likewise.
	(alpha_elf_reloc_rw_mask): Likewise.
	(alpha_handle_trap_shadows): Likewise.
	(alpha_emit_set_const_1): Likewise.
	(alpha_emit_conditional_branch): Likewise.
	(alpha_emit_conditional_move): Likewise.
	(alpha_reorg): Likewise.
	(alpha_option_override): Likewise.
	(alpha_start_function): Likewise.
	(alpha_output_function_end_prologue): Likewise.
	(alpha_end_function): Likewise.
	(alpha_expand_prologue): Likewise.
	* config/alpha/alpha.h (TARGET_CPU_CPP_BUILTINS): Likewise.
	* config/alpha/alpha.md (bswapsi2): Likewise.
	(bswapdi2): Likewise.
	(exception_receiver): Likewise.
	(*exception_receiver_2): Likewise.
	* config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
	* config/alpha/linux.h (TARGET_OS_CPP_BUILTINS): Likewise.
	* config/alpha/predicates.md (small_symbolic_operand): Likewise.
	(direct_call_operand): Likewise.
	* config/alpha/vms.h (ASM_OUTPUT_DEF): Likewise.
	(SUBTARGET_OS_CPP_BUILTINS): Likewise.
	(INIT_CUMULATIVE_ARGS): Likewise.
	* config/arc/arc.c (arc_rtx_costs): Likewise.
	(LEGITIMATE_SCALED_ADDRESS_P): Likewise.
	(gen_compare_reg): Likewise.
	(arc_compute_function_type): Likewise.
	(arc_finalize_pic): Likewise.
	(arc_print_operand_address): Likewise.
	(arc_output_pic_addr_const): Likewise.
	(arc_legitimate_constant_p): Likewise.
	(arc_can_use_doloop_p): Likewise.
	(prepare_move_operands): Likewise.
	(arc_legitimize_address_0): Likewise.
	(arc_ccfsm_advance): Likewise.
	(arc_expand_builtin): Likewise.
	(arc_reorg): Likewise.
	(arc_pad_return): Likewise.
	(arc_profile_call): Likewise.
	(arc_legitimate_address_p): Likewise.
	(arc_register_priority): Likewise.
	(arc_unalign_branch_p): Likewise.
	(arc_compute_frame_size): Likewise.
	(arc_expand_epilogue): Likewise.
	(valid_brcc_with_delay_p): Likewise.
	(arc_expand_movmem): Likewise.
	(arc_get_insn_variants): Likewise.
	(arc_branch_size_unknown_p): Likewise.
	(arc_conditional_register_usage): Likewise.
	(arc_is_shortcall_p): Likewise.
	(arc_output_libcall): Likewise.
	(arc_final_prescan_insn): Likewise.
	(arc_print_operand): Likewise.
	(arc_init): Likewise.
	(arc_need_delay): Likewise.
	(arc_expand_prologue): Likewise.
	(arc_override_options): Likewise.
	* config/arc/arc.h (arc_select_cc_mode): Likewise.
	(if): Likewise.
	(arc_print_operand_address): Likewise.
	(TARGET_OS_CPP_BUILTINS): Likewise.
	* config/arc/arc.md (casesi_compact_jump): Likewise.
	(addsi3): Likewise.
	(subsi3): Likewise.
	(casesi): Likewise.
	(casesi_load): Likewise.
	(doloop_begin_i): Likewise.
	(*movdi_insn): Likewise.
	(return): Likewise.
	(*btst): Likewise.
	(cbranchsi4_scratch): Likewise.
	(annul_ret_delay_insn): Likewise.
	(*movsicc_insn): Likewise.
	(adc): Likewise.
	(sbc): Likewise.
	(type): Likewise.
	(cond): Likewise.
	(tune): Likewise.
	(adddi3): Likewise.
	(subdi3): Likewise.
	* config/arc/arc600.md (mul_600_fast): Likewise.
	(mul_600_slow): Likewise.
	* config/arc/constraints.md (Rcw): Likewise.
	(Rcr): Likewise.
	(Rcq): Likewise.
	* config/arc/predicates.md (move_src_operand): Likewise.
	* config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
	* config/arm/arm-fixed.md (ssmulsa3): Likewise.
	(usmulusa3): Likewise.
	* config/arm/arm-modes.def (FLOAT_MODE): Likewise.
	* config/arm/arm.c (thumb1_expand_epilogue): Likewise.
	(arm_get_pcs_model): Likewise.
	(arm_lra_p): Likewise.
	(use_return_insn): Likewise.
	(arm_pic_static_addr): Likewise.
	(arm_legitimate_address_outer_p): Likewise.
	(thumb2_legitimate_address_p): Likewise.
	(thumb1_legitimate_address_p): Likewise.
	(arm_legitimate_constant_p_1): Likewise.
	(thumb_legitimate_constant_p): Likewise.
	(arm_size_rtx_costs): Likewise.
	(arm_new_rtx_costs): Likewise.
	(arm_emit_call_insn): Likewise.
	(arm_output_mi_thunk): Likewise.
	(thumb2_output_casesi): Likewise.
	(arm_legitimize_address): Likewise.
	(arm_default_branch_cost): Likewise.
	(arm_reorg): Likewise.
	(arm_encode_section_info): Likewise.
	(legitimize_pic_address): Likewise.
	(arm_assemble_integer): Likewise.
	(arm_builtin_vectorized_function): Likewise.
	(thumb_legitimize_address): Likewise.
	(adjacent_mem_locations): Likewise.
	(multiple_operation_profitable_p): Likewise.
	(arm_movmemqi_unaligned): Likewise.
	(arm_max_const_double_inline_cost): Likewise.
	(arm_const_double_by_parts): Likewise.
	(thumb2_reorg): Likewise.
	(arm_compute_save_reg_mask): Likewise.
	(arm_final_prescan_insn): Likewise.
	(thumb1_extra_regs_pushed): Likewise.
	(arm_unwind_emit_sequence): Likewise.
	(arm_conditional_register_usage): Likewise.
	(operands_ok_ldrd_strd): Likewise.
	(output_move_double): Likewise.
	(arm_emit_eabi_attribute): Likewise.
	(arm_load_pic_register): Likewise.
	(arm_compute_save_reg0_reg12_mask): Likewise.
	(thumb1_compute_save_reg_mask): Likewise.
	(arm_function_in_section_p): Likewise.
	(arm_return_in_memory): Likewise.
	(arm_function_ok_for_sibcall): Likewise.
	(arm_default_short_enums): Likewise.
	(thumb1_final_prescan_insn): Likewise.
	(arm_compute_func_type): Likewise.
	(arm_unwind_emit): Likewise.
	(arm_output_fn_unwind): Likewise.
	(arm_is_long_call_p): Likewise.
	(arm_init_libfuncs): Likewise.
	(arm_init_builtins): Likewise.
	(arm_scalar_mode_supported_p): Likewise.
	(arm_add_stmt_cost): Likewise.
	(arm_expand_prologue): Likewise.
	(thumb1_expand_prologue): Likewise.
	(void): Likewise.
	(arm_option_override): Likewise.
	(arm_gen_movmemqi): Likewise.
	(gen_movmem_ldrd_strd): Likewise.
	(arm_vector_alignment_reachable): Likewise.
	(arm_builtin_support_vector_misalignment): Likewise.
	(arm_file_start): Likewise.
	* config/arm/arm.h (CONSTANT_ADDRESS_P): Likewise.
	(FINAL_PRESCAN_INSN): Likewise.
	(LOCAL_ALIGNMENT): Likewise.
	(CONSTANT_ALIGNMENT): Likewise.
	(DATA_ALIGNMENT): Likewise.
	(MODE_BASE_REG_CLASS): Likewise.
	(ARM_INDEX_REGISTER_RTX_P): Likewise.
	(BRANCH_COST): Likewise.
	(ARM_INVERSE_CONDITION_CODE): Likewise.
	(PROMOTE_MODE): Likewise.
	(LARGEST_EXPONENT_IS_NORMAL): Likewise.
	(TARGET_CPU_CPP_BUILTINS): Likewise.
	* config/arm/arm.md (calculate_pic_address): Likewise.
	(pic_load_addr_unified): Likewise.
	(pic_load_addr_32bit): Likewise.
	(pic_load_addr_thumb1): Likewise.
	(pic_offset_arm): Likewise.
	(builtin_setjmp_receiver): Likewise.
	(arm_casesi_internal): Likewise.
	(tablejump): Likewise.
	(addsi3): Likewise.
	(subsi3): Likewise.
	(andsi3): Likewise.
	(iorsi3): Likewise.
	(xorsi3): Likewise.
	(movsi): Likewise.
	(movhi): Likewise.
	(movqi): Likewise.
	(insn_enabled): Likewise.
	(*minmax_arithsi): Likewise.
	(*minmax_arithsi_non_canon): Likewise.
	(*arm32_movhf): Likewise.
	(*arm_movsi_insn): Likewise.
	(*mulsi3_compare0_v6): Likewise.
	(*mulsi_compare0_scratch_v6): Likewise.
	(*mulsi3addsi_compare0_v6): Likewise.
	(*mulsi3addsi_compare0_scratch_v6): Likewise.
	(casesi): Likewise.
	(bswapsi2): Likewise.
	(insv): Likewise.
	(extzv): Likewise.
	(extv): Likewise.
	(unaligned_loadsi): Likewise.
	(unaligned_loadhis): Likewise.
	(unaligned_loadhiu): Likewise.
	(unaligned_storesi): Likewise.
	(unaligned_storehi): Likewise.
	(unaligned_loaddi): Likewise.
	(unaligned_storedi): Likewise.
	* config/arm/coff.h (tables): Likewise.
	* config/arm/constraints.md (Ts): Likewise.
	(Dc): Likewise.
	* config/arm/elf.h (ASM_DECLARE_FUNCTION_SIZE): Likewise.
	* config/arm/neon.md (*add<mode>3_neon): Likewise.
	(*sub<mode>3_neon): Likewise.
	(*mul<mode>3_neon): Likewise.
	(mul<mode>3add<mode>_neon): Likewise.
	(mul<mode>3neg<mode>add<mode>_neon): Likewise.
	(fma<VCVTF:mode>4): Likewise.
	(*fmsub<VCVTF:mode>4): Likewise.
	(quad_halves_<code>v4sf): Likewise.
	(reduc_splus_<mode>): Likewise.
	(reduc_smin_<mode>): Likewise.
	(reduc_smax_<mode>): Likewise.
	(vcond<mode><mode>): Likewise.
	(neon_vadd<mode>): Likewise.
	(neon_vmla<mode>): Likewise.
	(neon_vmls<mode>): Likewise.
	(neon_vsub<mode>): Likewise.
	(neon_vabd<mode>_2): Likewise.
	(neon_vabd<mode>_3): Likewise.
	(movmisalign<mode>): Likewise.
	(*movmisalign<mode>_neon_store): Likewise.
	(*movmisalign<mode>_neon_load): Likewise.
	(float<mode><V_cvtto>2): Likewise.
	(floatuns<mode><V_cvtto>2): Likewise.
	* config/arm/predicates.md (arm_cond_move_operator): Likewise.
	* config/arm/thumb2.md (thumb2_casesi_internal): Likewise.
	(thumb2_casesi_internal_pic): Likewise.
	(*thumb2_mov_negscc): Likewise.
	(*thumb2_mov_negscc_strict_it): Likewise.
	(*thumb2_mov_notscc): Likewise.
	(*thumb2_mov_notscc_strict_it): Likewise.
	(*thumb2_and_scc): Likewise.
	(*thumb2_ior_scc): Likewise.
	(*thumb2_ior_scc_strict_it): Likewise.
	(*thumb2_cond_move): Likewise.
	(*thumb2_cond_arith): Likewise.
	(*thumb2_cond_arith_strict_it): Likewise.
	(*thumb2_cond_sub): Likewise.
	(*thumb2_negscc): Likewise.
	(*thumb2_movcond): Likewise.
	(*thumb2_mulsi_short): Likewise.
	(*thumb2_mulsi_short_compare0): Likewise.
	(*thumb2_mulsi_short_compare0_scratch): Likewise.
	(doloop_end): Likewise.
	* config/arm/vec-common.md (add<mode>3): Likewise.
	(sub<mode>3): Likewise.
	(mul<mode>3): Likewise.
	(smin<mode>3): Likewise.
	(smax<mode>3): Likewise.
	* config/arm/vfp.md (*thumb2_movsfcc_vfp): Likewise.
	(*thumb2_movdfcc_vfp): Likewise.
	(*combine_vcvt_f32_<FCVTI32typename>): Likewise.
	(*combine_vcvt_f64_<FCVTI32typename>): Likewise.
	(*combine_vcvtf2i): Likewise.
	* config/avr/avr-c.c (avr_cpu_cpp_builtins): Likewise.
	* config/avr/avr-fixed.md (round<mode>3): Likewise.
	* config/avr/avr-log.c (avr_log_set_avr_log): Likewise.
	* config/avr/avr.c (avr_mode_code_base_reg_class): Likewise.
	(avr_regno_mode_code_ok_for_base_p): Likewise.
	(out_movqi_r_mr): Likewise.
	(out_movhi_r_mr): Likewise.
	(out_movqi_mr_r): Likewise.
	(avr_out_movhi_mr_r_xmega): Likewise.
	(out_movhi_mr_r): Likewise.
	(avr_address_cost): Likewise.
	(avr_reorg): Likewise.
	(avr_fold_builtin): Likewise.
	(out_shift_with_cnt): Likewise.
	(ashlhi3_out): Likewise.
	(ashrhi3_out): Likewise.
	(lshrhi3_out): Likewise.
	(avr_asm_function_rodata_section): Likewise.
	(avr_convert_to_type): Likewise.
	(avr_out_addto_sp): Likewise.
	(avr_out_insert_bits): Likewise.
	(avr_expand_prologue): Likewise.
	(avr_option_override): Likewise.
	* config/avr/avr.h (FUNCTION_ARG_REGNO_P): Likewise.
	(AVR_HAVE_EIJMP_EICALL): Likewise.
	(AVR_HAVE_SPH): Likewise.
	* config/avr/avr.md (insv): Likewise.
	(*negated_tstqi): Likewise.
	(*negated_tsthi): Likewise.
	(*negated_tstpsi): Likewise.
	(*negated_tstsi): Likewise.
	* config/bfin/bfin-opts.h (or): Likewise.
	* config/bfin/bfin-protos.h (or): Likewise.
	* config/bfin/bfin.c (bfin_load_pic_reg): Likewise.
	(bfin_expand_call): Likewise.
	(bfin_output_mi_thunk): Likewise.
	(bfin_conditional_register_usage): Likewise.
	(bfin_longcall_p): Likewise.
	(bfin_register_move_cost): Likewise.
	(split_load_immediate): Likewise.
	(bfin_expand_movmem): Likewise.
	(length_for_loop): Likewise.
	(gen_one_bundle): Likewise.
	(workaround_speculation): Likewise.
	(bfin_can_use_doloop_p): Likewise.
	(bfin_option_override): Likewise.
	(bfin_reorg): Likewise.
	* config/bfin/bfin.h (PROMOTE_MODE): Likewise.
	(NOTICE_UPDATE_CC): Likewise.
	(FUNCTION_PROFILER): Likewise.
	(TARGET_CPU_CPP_BUILTINS): Likewise.
	* config/bfin/bfin.md (tablejump): Likewise.
	(*movsi_insn32): Likewise.
	(umulsi3_highpart): Likewise.
	(smulsi3_highpart): Likewise.
	* config/c6x/c6x.c (c6x_function_ok_for_sibcall): Likewise.
	(c6x_expand_call): Likewise.
	(legitimize_pic_address): Likewise.
	(expand_move): Likewise.
	(c6x_legitimate_address_p_1): Likewise.
	(c6x_hwloops): Likewise.
	(c6x_select_rtx_section): Likewise.
	(c6x_can_output_mi_thunk): Likewise.
	(use_push_rts_p): Likewise.
	(c6x_file_start): Likewise.
	(c6x_expand_compare): Likewise.
	(c6x_option_override): Likewise.
	(c6x_function_in_section_p): Likewise.
	(c6x_reorg): Likewise.
	(c6x_output_file_unwind): Likewise.
	(c6x_output_fn_unwind): Likewise.
	(c6x_debug_unwind_info): Likewise.
	(c6x_long_call_p): Likewise.
	(c6x_function_end): Likewise.
	(c6x_expand_prologue): Likewise.
	* config/c6x/c6x.h (PLACE_IN_SDATA_P): Likewise.
	(ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise.
	* config/c6x/c6x.md (movsi_gotoff_lo_sum): Likewise.
	(movsi_gotoff_high): Likewise.
	(load_got_gotoff): Likewise.
	(load_sdata_pic): Likewise.
	(tablejump): Likewise.
	(*tablejump_internal): Likewise.
	(casesi): Likewise.
	(casesi_internal): Likewise.
	(doloop_end): Likewise.
	(loop_end): Likewise.
	(divmodsi4): Likewise.
	(udivmodsi4): Likewise.
	(divsf3): Likewise.
	(divdf3): Likewise.
	* config/cr16/cr16.c (cr16_conditional_register_usage): Likewise.
	(legitimize_pic_address): Likewise.
	(cr16_print_operand_address): Likewise.
	(cr16_legitimize_address): Likewise.
	(cr16_legitimate_address_p): Likewise.
	(cr16_address_cost): Likewise.
	(cr16_override_options): Likewise.
	(FUNC_IS_NORETURN_P): Likewise.
	* config/cr16/cr16.md (mov<mode>): Likewise.
	(tablejump): Likewise.
	(call): Likewise.
	(cr16_call_insn_branch_pic): Likewise.
	(cr16_call_insn_branch): Likewise.
	(call_value): Likewise.
	(cr16_call_value_insn_branch_pic): Likewise.
	(cr16_call_value_insn_branch): Likewise.
	* config/cris/constraints.md (S): Likewise.
	(U): Likewise.
	* config/cris/cris.c (cris_conditional_register_usage): Likewise.
	(cris_reg_saved_in_regsave_area): Likewise.
	(cris_constant_index_p): Likewise.
	(cris_valid_pic_const): Likewise.
	(cris_asm_output_mi_thunk): Likewise.
	(cris_asm_output_symbol_ref): Likewise.
	(cris_asm_output_label_ref): Likewise.
	(cris_output_addr_const_extra): Likewise.
	(cris_option_override): Likewise.
	(cris_print_operand): Likewise.
	(cris_file_start): Likewise.
	* config/cris/cris.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise.
	(__make_dp): Likewise.
	* config/cris/cris.md (movsi): Likewise.
	(*movsi_got_load): Likewise.
	(*movsi_internal): Likewise.
	(*addsi3_non_v32): Likewise.
	(call): Likewise.
	(call_value): Likewise.
	(cris_casesi_v32): Likewise.
	(sync.md): Likewise.
	(length): Likewise.
	* config/cris/linux.h (TARGET_OS_CPP_BUILTINS): Likewise.
	* config/cris/predicates.md (cris_bdap_const_operand): Likewise.
	(cris_general_operand_or_pic_source): Likewise.
	* config/darwin-c.c (version_as_macro): Likewise.
	(darwin_register_objc_includes): Likewise.
	(darwin_objc_construct_string): Likewise.
	(darwin_cpp_builtins): Likewise.
	* config/darwin.c (darwin_patch_builtins): Likewise.
	(darwin_libc_has_function): Likewise.
	(output_objc_section_asm_op): Likewise.
	(darwin_objc2_section): Likewise.
	(darwin_objc1_section): Likewise.
	(darwin_rename_builtins): Likewise.
	(darwin_fold_builtin): Likewise.
	(machopic_select_section): Likewise.
	(darwin_asm_declare_constant_name): Likewise.
	(darwin_emit_local_bss): Likewise.
	(fprintf): Likewise.
	(darwin_use_anchors_for_symbol_p): Likewise.
	(darwin_kextabi_p): Likewise.
	(darwin_mergeable_string_section): Likewise.
	(darwin_mergeable_constant_section): Likewise.
	(darwin_build_constant_cfstring): Likewise.
	(darwin_function_section): Likewise.
	(darwin_file_end): Likewise.
	(darwin_override_options): Likewise.
	* config/darwin.h (GCC_OPTION): Likewise.
	(while): Likewise.
	(DEF_SECTION): Likewise.
	(if): Likewise.
	(DARWIN_REGISTER_TARGET_PRAGMAS): Likewise.
	* config/elfos.h (ASM_DECLARE_OBJECT_NAME): Likewise.
	(ASM_DECLARE_FUNCTION_SIZE): Likewise.
	* config/epiphany/constraints.md (Cal): Likewise.
	(Cm1): Likewise.
	(Cl1): Likewise.
	(Cr1): Likewise.
	* config/epiphany/epiphany-modes.def (VECTOR_MODE): Likewise.
	(ADJUST_ALIGNMENT): Likewise.
	* config/epiphany/epiphany.c (epiphany_optimize_mode_switching):
	Likewise.
	(epiphany_compute_frame_size): Likewise.
	(epiphany_override_options): Likewise.
	(epiphany_emit_save_restore): Likewise.
	(epiphany_expand_epilogue): Likewise.
	(epiphany_final_prescan_insn): Likewise.
	(epiphany_init): Likewise.
	(epiphany_mode_priority_to_mode): Likewise.
	(epiphany_mode_entry_exit): Likewise.
	(epiphany_epilogue_uses): Likewise.
	(gen_compare_reg): Likewise.
	(epiphany_min_divisions_for_recip_mul): Likewise.
	(epiphany_print_operand): Likewise.
	(epiphany_conditional_register_usage): Likewise.
	(epiphany_adjust_cost): Likewise.
	(epiphany_expand_prologue): Likewise.
	* config/epiphany/epiphany.h (MODE_ENTRY): Likewise.
	(BRANCH_COST): Likewise.
	(TARGET_CPU_CPP_BUILTINS): Likewise.
	(CLASS_MAX_NREGS): Likewise.
	(IMM16): Likewise.
	(RTX_OK_FOR_OFFSET_P): Likewise.
	(ASM_DECLARE_FUNCTION_SIZE): Likewise.
	* config/epiphany/epiphany.md (tablejump): Likewise.
	(fp_mode): Likewise.
	(*tablejump_hi_internal): Likewise.
	(maddsf): Likewise.
	(*maddsf_combine): Likewise.
	(*fmsub_combine): Likewise.
	(divsf3): Likewise.
	(*recipsf2_1): Likewise.
	(*recipsf2_2): Likewise.
	(one_cmplsi2): Likewise.
	(one_cmplsi2_i): Likewise.
	(mov<mode>): Likewise.
	(*mov<mode>_insn): Likewise.
	(<insn_opname>v2si3): Likewise.
	(<insn_opname>v2sf3_i): Likewise.
	(mul<mode>3_i): Likewise.
	(*fmadd<mode>_combine): Likewise.
	* config/epiphany/predicates.md (symbolic_operand): Likewise.
	* config/epiphany/resolve-sw-modes.c (gate_resolve_sw_modes):
	Likewise.
	* config/fr30/fr30.c (fr30_frame_pointer_required): Likewise.
	* config/frv/frv.c (frv_const_unspec_p): Likewise.
	(frv_in_small_data_p): Likewise.
	(frv_small_data_reloc_p): Likewise.
	(frv_option_override): Likewise.
	(frv_conditional_register_usage): Likewise.
	(frv_asm_output_mi_thunk): Likewise.
	(gen_inlined_tls_plt): Likewise.
	(frv_legitimize_tls_address): Likewise.
	(frv_expand_fdpic_call): Likewise.
	(frv_emit_movsi): Likewise.
	(frv_assemble_integer): Likewise.
	(frv_local_funcdesc_p): Likewise.
	(frv_reorg): Likewise.
	(frv_stack_info): Likewise.
	(frv_frame_pointer_required): Likewise.
	(frv_legitimate_address_p_1): Likewise.
	(frv_setup_incoming_varargs): Likewise.
	(frv_expand_builtin_saveregs): Likewise.
	(frv_expand_builtin_va_start): Likewise.
	(frv_init_cumulative_args): Likewise.
	(frv_function_arg_1): Likewise.
	(frv_function_arg_advance): Likewise.
	(frv_arg_partial_bytes): Likewise.
	(frv_ifcvt_add_insn): Likewise.
	(frv_ifcvt_modify_multiple_tests): Likewise.
	(frv_ifcvt_modify_insn): Likewise.
	(frv_initial_elimination_offset): Likewise.
	(frv_default_flags_for_cpu): Likewise.
	(frv_issue_rate): Likewise.
	(frv_acc_group): Likewise.
	(frv_for_each_packet): Likewise.
	(frv_print_operand_jump_hint): Likewise.
	(frv_expand_prologue): Likewise.
	* config/frv/frv.h (CONSTANT_ALIGNMENT): Likewise.
	(frv_ifcvt_modify_multiple_tests): Likewise.
	(__trampoline_setup): Likewise.
	(ADDR_ALIGN): Likewise.
	(fprintf): Likewise.
	* config/frv/frv.md (tablejump): Likewise.
	(casesi): Likewise.
	(cpu): Likewise.
	* config/frv/predicates.md (int_2word_operand): Likewise.
	(call_operand): Likewise.
	* config/h8300/constraints.md (d): Likewise.
	* config/h8300/elf.h (or): Likewise.
	* config/h8300/h8300.c (h8300_reorg): Likewise.
	(h8300_option_override): Likewise.
	(h8300_return_addr_rtx): Likewise.
	(h8sx_emit_movmd): Likewise.
	* config/h8300/h8300.md (jump): Likewise.
	* config/i386/constraints.md (Yf): Likewise.
	* config/i386/cygming.h (drectve_section): Likewise.
	(DBX_REGISTER_NUMBER): Likewise.
	(ASM_DECLARE_OBJECT_NAME): Likewise.
	(TARGET_SEH): Likewise.
	* config/i386/darwin.h (FUNCTION_PROFILER): Likewise.
	(DBX_REGISTER_NUMBER): Likewise.
	(DWARF2_FRAME_REG_OUT): Likewise.
	(TARGET_OS_CPP_BUILTINS): Likewise.
	* config/i386/djgpp.h (ASM_WEAKEN_LABEL): Likewise.
	* config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
	(ix86_target_macros): Likewise.
	* config/i386/i386-interix.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
	* config/i386/i386.c (set_ix86_tune_features): Likewise.
	(def_builtin): Likewise.
	(ix86_function_specific_restore): Likewise.
	(ix86_function_ok_for_sibcall): Likewise.
	(output_set_got): Likewise.
	(legitimize_tls_address): Likewise.
	(ix86_legitimize_address): Likewise.
	(output_pic_addr_const): Likewise.
	(ix86_print_operand_address): Likewise.
	(ix86_avoid_lea_for_addr): Likewise.
	(ix86_rtx_costs): Likewise.
	(x86_can_output_mi_thunk): Likewise.
	(init_cumulative_args): Likewise.
	(ix86_va_start): Likewise.
	(ix86_code_end): Likewise.
	(ix86_live_on_entry): Likewise.
	(ix86_legitimate_address_p): Likewise.
	(i386_asm_output_addr_const_extra): Likewise.
	(ix86_expand_move): Likewise.
	(ix86_expand_sse_cmp): Likewise.
	(ix86_expand_sse_movcc): Likewise.
	(ix86_expand_strlen): Likewise.
	(ix86_expand_binop_builtin): Likewise.
	(ix86_expand_multi_arg_builtin): Likewise.
	(ix86_expand_unop_vec_merge_builtin): Likewise.
	(ix86_expand_sse_compare): Likewise.
	(ix86_expand_sse_comi): Likewise.
	(ix86_expand_sse_round): Likewise.
	(ix86_expand_sse_round_vec_pack_sfix): Likewise.
	(ix86_expand_sse_ptest): Likewise.
	(ix86_expand_sse_pcmpestr): Likewise.
	(ix86_expand_sse_pcmpistr): Likewise.
	(ix86_expand_args_builtin): Likewise.
	(ix86_expand_sse_comi_round): Likewise.
	(ix86_expand_round_builtin): Likewise.
	(ix86_expand_special_args_builtin): Likewise.
	(ix86_expand_vec_ext_builtin): Likewise.
	(ix86_expand_builtin): Likewise.
	(ix86_reorg): Likewise.
	(classify_argument): Likewise.
	(ix86_function_arg_boundary): Likewise.
	(ix86_init_tm_builtins): Likewise.
	(ix86_builtin_vectorized_function): Likewise.
	(ix86_handle_cconv_attribute): Likewise.
	(ix86_option_override_internal): Likewise.
	(decide_alg): Likewise.
	(ix86_profile_before_prologue): Likewise.
	(ix86_function_regparm): Likewise.
	(ix86_function_sseregparm): Likewise.
	(ix86_frame_pointer_required): Likewise.
	(x86_function_profiler): Likewise.
	(ix86_veclibabi_svml): Likewise.
	(ix86_veclibabi_acml): Likewise.
	(decide_alignment): Likewise.
	(ix86_constant_alignment): Likewise.
	(ix86_data_alignment): Likewise.
	(x86_64_elf_select_section): Likewise.
	(x86_64_elf_unique_section): Likewise.
	(ix86_expand_split_stack_prologue): Likewise.
	(legitimate_pic_address_disp_p): Likewise.
	(legitimize_pic_address): Likewise.
	(ix86_tls_get_addr): Likewise.
	(legitimize_pe_coff_symbol): Likewise.
	(ix86_delegitimize_address): Likewise.
	(ix86_print_operand): Likewise.
	(construct_plt_address): Likewise.
	(ix86_expand_call): Likewise.
	(x86_output_mi_thunk): Likewise.
	(asm_preferred_eh_data_format): Likewise.
	(ix86_expand_sse_fp_minmax): Likewise.
	(ix86_builtin_reciprocal): Likewise.
	(has_dispatch): Likewise.
	(ix86_get_drap_rtx): Likewise.
	(parse_mtune_ctrl_str): Likewise.
	(ix86_minimum_incoming_stack_boundary): Likewise.
	(ix86_function_arg_regno_p): Likewise.
	(ix86_function_type_abi): Likewise.
	(ix86_function_abi): Likewise.
	(ix86_cfun_abi): Likewise.
	(ix86_call_abi_override): Likewise.
	(ix86_function_arg_advance): Likewise.
	(ix86_function_arg): Likewise.
	(ix86_pass_by_reference): Likewise.
	(ix86_function_value_regno_p): Likewise.
	(ix86_build_builtin_va_list): Likewise.
	(is_va_list_char_pointer): Likewise.
	(ix86_init_machine_status): Likewise.
	(ix86_debug_options): Likewise.
	(ix86_target_stack_probe): Likewise.
	(ix86_compute_frame_layout): Likewise.
	(ix86_in_large_data_p): Likewise.
	(x86_elf_aligned_common): Likewise.
	(x86_output_aligned_bss): Likewise.
	(ix86_finalize_stack_realign_flags): Likewise.
	(ix86_expand_epilogue): Likewise.
	(ix86_output_call_insn): Likewise.
	(ix86_expand_prologue): Likewise.
	(x86_file_start): Likewise.
	(ix86_function_specific_save): Likewise.
	* config/i386/i386.h (IX86_BASE_CALLCVT): Likewise.
	(TARGET_ISA_ROUND): Likewise.
	(SETUP_FRAME_ADDRESSES): Likewise.
	(ASM_OUTPUT_FUNCTION_LABEL): Likewise.
	(HARD_REGNO_CALL_PART_CLOBBERED): Likewise.
	(FIND_BASE_TERM): Likewise.
	(MOVE_RATIO): Likewise.
	(X87_ENABLE_FLOAT): Likewise.
	(TARGET_FPMATH_DEFAULT_P): Likewise.
	(BRANCH_COST): Likewise.
	* config/i386/i386.md (*movdi_internal): Likewise.
	(*movsi_internal): Likewise.
	(tablejump): Likewise.
	(builtin_setjmp_receiver): Likewise.
	(nonlocal_goto_receiver): Likewise.
	(*pushdi2_rex64): Likewise.
	(*ashl<mode>3_doubleword): Likewise.
	(*<shift_insn><mode>3_doubleword): Likewise.
	(l<rounding_insn><MODEF:mode><SWI48:mode>2): Likewise.
	(truncdfsf2): Likewise.
	(*truncdfsf_fast_mixed): Likewise.
	(*truncdfsf_fast_i387): Likewise.
	(truncxf<mode>2): Likewise.
	(truncxf<mode>2_i387_noop): Likewise.
	(*<sincos>xf2_i387): Likewise.
	(*<sincos>_extend<mode>xf2_i387): Likewise.
	(sincosxf3): Likewise.
	(sincos_extend<mode>xf3_i387): Likewise.
	(sincos<mode>3): Likewise.
	(fptanxf4_i387): Likewise.
	(fptan_extend<mode>xf4_i387): Likewise.
	(tanxf2): Likewise.
	(tan<mode>2): Likewise.
	(*fpatanxf3_i387): Likewise.
	(fpatan_extend<mode>xf3_i387): Likewise.
	(atan2xf3): Likewise.
	(atan2<mode>3): Likewise.
	(atanxf2): Likewise.
	(atan<mode>2): Likewise.
	(asinxf2): Likewise.
	(asin<mode>2): Likewise.
	(acosxf2): Likewise.
	(acos<mode>2): Likewise.
	(fyl2xxf3_i387): Likewise.
	(fyl2x_extend<mode>xf3_i387): Likewise.
	(logxf2): Likewise.
	(log<mode>2): Likewise.
	(log10xf2): Likewise.
	(log10<mode>2): Likewise.
	(log2xf2): Likewise.
	(log2<mode>2): Likewise.
	(fyl2xp1xf3_i387): Likewise.
	(fyl2xp1_extend<mode>xf3_i387): Likewise.
	(log1pxf2): Likewise.
	(log1p<mode>2): Likewise.
	(fxtractxf3_i387): Likewise.
	(fxtract_extend<mode>xf3_i387): Likewise.
	(logbxf2): Likewise.
	(logb<mode>2): Likewise.
	(ilogbxf2): Likewise.
	(ilogb<mode>2): Likewise.
	(*f2xm1xf2_i387): Likewise.
	(fscalexf4_i387): Likewise.
	(expNcorexf3): Likewise.
	(expxf2): Likewise.
	(exp<mode>2): Likewise.
	(exp10xf2): Likewise.
	(exp10<mode>2): Likewise.
	(exp2xf2): Likewise.
	(exp2<mode>2): Likewise.
	(expm1xf2): Likewise.
	(expm1<mode>2): Likewise.
	(ldexpxf3): Likewise.
	(ldexp<mode>3): Likewise.
	(scalbxf3): Likewise.
	(scalb<mode>3): Likewise.
	(significandxf2): Likewise.
	(significand<mode>2): Likewise.
	(rintxf2): Likewise.
	(rint<mode>2): Likewise.
	(frndintxf2_<rounding>): Likewise.
	(frndintxf2_<rounding>_i387): Likewise.
	(<rounding_insn>xf2): Likewise.
	(<rounding_insn><mode>2): Likewise.
	(frndintxf2_mask_pm): Likewise.
	(frndintxf2_mask_pm_i387): Likewise.
	(nearbyintxf2): Likewise.
	(nearbyint<mode>2): Likewise.
	(*fist<mode>2_<rounding>_1): Likewise.
	(fistdi2_<rounding>): Likewise.
	(fistdi2_<rounding>_with_temp): Likewise.
	(fist<mode>2_<rounding>): Likewise.
	(fist<mode>2_<rounding>_with_temp): Likewise.
	(l<rounding_insn>xf<mode>2): Likewise.
	(*movtf_internal): Likewise.
	(*movxf_internal): Likewise.
	(*movdf_internal): Likewise.
	(*movsf_internal): Likewise.
	(*tls_global_dynamic_64_largepic): Likewise.
	(*tls_local_dynamic_base_64_largepic): Likewise.
	(divsf3): Likewise.
	(sqrt<mode>2): Likewise.
	(untyped_call): Likewise.
	(round<mode>2): Likewise.
	(lround<X87MODEF:mode><SWI248x:mode>2): Likewise.
	* config/i386/mingw32.h (OUTPUT_QUOTED_STRING): Likewise.
	(EXTRA_OS_CPP_BUILTINS): Likewise.
	* config/i386/mmx.md (mmx_<code>v2sf3): Likewise.
	(*mmx_<code>v2sf3_finite): Likewise.
	* config/i386/msformat-c.c (TARGET_OVERRIDES_FORMAT_INIT): Likewise.
	* config/i386/netbsd-elf.h (DBX_REGISTER_NUMBER): Likewise.
	* config/i386/netbsd64.h (FUNCTION_PROFILER): Likewise.
	* config/i386/openbsd.h (FUNCTION_PROFILER): Likewise.
	* config/i386/openbsdelf.h (FUNCTION_PROFILER): Likewise.
	* config/i386/predicates.md (pic_32bit_operand): Likewise.
	(vsib_address_operand): Likewise.
	(cmpxchg8b_pic_memory_operand): Likewise.
	(x86_64_immediate_operand): Likewise.
	(x86_64_zext_immediate_operand): Likewise.
	(constant_call_address_operand): Likewise.
	* config/i386/sol2.h (ASM_PREFERRED_EH_DATA_FORMAT): Likewise.
	(ASM_DECLARE_OBJECT_NAME): Likewise.
	* config/i386/sse.md (round<mode>2): Likewise.
	(round<mode>2_sfix): Likewise.
	(round<mode>2_vec_pack_sfix): Likewise.
	(div<mode>3): Likewise.
	(sqrt<mode>2): Likewise.
	(<code><mode>3<mask_name><round_saeonly_name>): Likewise.
	(*<code><mode>3_finite<mask_name><round_saeonly_name>): Likewise.
	(*<code><mode>3<mask_name><round_saeonly_name>): Likewise.
	* config/i386/winnt-cxx.c (i386_pe_type_dllexport_p): Likewise.
	(i386_pe_type_dllimport_p): Likewise.
	* config/i386/winnt.c (i386_pe_unique_section): Likewise.
	(i386_pe_section_type_flags): Likewise.
	(i386_pe_asm_output_aligned_decl_common): Likewise.
	(i386_pe_determine_dllexport_p): Likewise.
	(i386_pe_valid_dllimport_attribute_p): Likewise.
	(i386_pe_start_function): Likewise.
	* config/ia64/constraints.md (Z): Likewise.
	* config/ia64/div.md (sqrtsf2): Likewise.
	(sqrtsf2_internal_thr): Likewise.
	(sqrtsf2_internal_lat): Likewise.
	(sqrtdf2): Likewise.
	(sqrtdf2_internal_thr): Likewise.
	(sqrtxf2): Likewise.
	(divsi3): Likewise.
	(modsi3): Likewise.
	(udivsi3): Likewise.
	(umodsi3): Likewise.
	(divsi3_internal): Likewise.
	(divdi3): Likewise.
	(moddi3): Likewise.
	(udivdi3): Likewise.
	(umoddi3): Likewise.
	(divdi3_internal_lat): Likewise.
	(divdi3_internal_thr): Likewise.
	(divsf3): Likewise.
	(divsf3_internal_thr): Likewise.
	(divsf3_internal_lat): Likewise.
	(divdf3): Likewise.
	(divdf3_internal_thr): Likewise.
	(divdf3_internal_lat): Likewise.
	(divxf3): Likewise.
	* config/ia64/ia64.c (ia64_reloc_rw_mask): Likewise.
	(ia64_dfa_sched_reorder): Likewise.
	(ia64_first_cycle_multipass_dfa_lookahead_guard): Likewise.
	(ia64_dfa_new_cycle): Likewise.
	(final_emit_insn_group_barriers): Likewise.
	(get_spec_check_gen_function): Likewise.
	(ia64_needs_block_p): Likewise.
	(ia64_adjust_cost_2): Likewise.
	(ia64_compute_frame_size): Likewise.
	(ia64_override_options_after_change): Likewise.
	(ia64_reorg): Likewise.
	(ia64_option_override): Likewise.
	(ia64_expand_prologue): Likewise.
	(ia64_set_sched_flags): Likewise.
	* config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Likewise.
	* config/ia64/ia64.md (cpu): Likewise.
	* config/ia64/predicates.md (ia64_cbranch_operator): Likewise.
	* config/iq2000/iq2000.c (iq2000_option_override): Likewise.
	(compute_frame_size): Likewise.
	(iq2000_can_use_return_insn): Likewise.
	(iq2000_select_section): Likewise.
	(init_cumulative_args): Likewise.
	(iq2000_function_arg_advance): Likewise.
	(iq2000_function_arg): Likewise.
	(iq2000_arg_partial_bytes): Likewise.
	* config/iq2000/iq2000.h (while): Likewise.
	* config/iq2000/iq2000.md (extendhisi2): Likewise.
	(extendqihi2): Likewise.
	(extendqisi2): Likewise.
	* config/linux.h (OPTION_BIONIC): Likewise.
	(OPTION_GLIBC): Likewise.
	(OPTION_UCLIBC): Likewise.
	* config/lm32/lm32.c (lm32_option_override): Likewise.
	(lm32_in_small_data_p): Likewise.
	(lm32_rtx_costs): Likewise.
	(lm32_compute_frame_size): Likewise.
	(lm32_return_addr_rtx): Likewise.
	* config/lm32/lm32.h (NONSTRICT_REG_OK_FOR_BASE_P): Likewise.
	(ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
	(ASM_OUTPUT_ALIGNED_COMMON): Likewise.
	* config/lm32/lm32.md (movsi): Likewise.
	(movsi_got): Likewise.
	(movsi_gotoff_hi16): Likewise.
	(movsi_gotoff_lo16): Likewise.
	(*movsi_lo_sum): Likewise.
	(tablejump): Likewise.
	(ashlsi3): Likewise.
	(ashrsi3): Likewise.
	(lshrsi3): Likewise.
	* config/lm32/predicates.md (no_pic_small_symbol): Likewise.
	* config/m32c/m32c.c (m32c_override_options_after_change): Likewise.
	(m32c_option_override): Likewise.
	* config/m32c/m32c.h (TARGET_CPU_CPP_BUILTINS): Likewise.
	* config/m32r/m32r-opts.h (them): Likewise.
	(TARGET_SDATA_NONE): Likewise.
	(TARGET_SDATA_SDATA): Likewise.
	(calls): Likewise.
	(TARGET_MODEL_SMALL): Likewise.
	(TARGET_MODEL_MEDIUM): Likewise.
	(TARGET_MODEL_LARGE): Likewise.
	(TARGET_CALL26): Likewise.
	* config/m32r/m32r.c (m32r_init): Likewise.
	(m32r_in_small_data_p): Likewise.
	(addr24_operand): Likewise.
	(addr32_operand): Likewise.
	(call26_operand): Likewise.
	(m32r_compute_frame_size): Likewise.
	(m32r_expand_prologue): Likewise.
	(m32r_legitimize_address): Likewise.
	(m32r_conditional_register_usage): Likewise.
	(m32r_expand_epilogue): Likewise.
	(m32r_expand_block_move): Likewise.
	(m32r_trampoline_init): Likewise.
	(m32r_file_start): Likewise.
	* config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_COMMON): Likewise.
	(ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
	(FUNCTION_PROFILER): Likewise.
	(RETURN_ADDR_RTX): Likewise.
	(ASM_OUTPUT_ALIGNED_BSS): Likewise.
	(ASM_OUTPUT_ADDR_VEC_ELT): Likewise.
	* config/m32r/m32r.md (movqi): Likewise.
	(movhi): Likewise.
	(movsi): Likewise.
	(movdi): Likewise.
	(movsf): Likewise.
	(movdf): Likewise.
	(tablejump): Likewise.
	(call): Likewise.
	(call_value): Likewise.
	(*call_value_via_label): Likewise.
	(pic_load_addr): Likewise.
	(gotoff_load_addr): Likewise.
	(get_pc): Likewise.
	(builtin_setjmp_receiver): Likewise.
	(andsi3): Likewise.
	(iorsi3): Likewise.
	(xorsi3): Likewise.
	(sle_insn): Likewise.
	(sge_insn): Likewise.
	(sleu_insn): Likewise.
	(sgeu_insn): Likewise.
	* config/m32r/predicates.md (seth_add3_operand): Likewise.
	* config/m68k/constraints.md (T): Likewise.
	* config/m68k/linux.h (FUNCTION_PROFILER): Likewise.
	* config/m68k/m68k.c (m68k_save_reg): Likewise.
	(m68k_legitimate_constant_address_p): Likewise.
	(m68k_get_reloc_decoration): Likewise.
	(print_operand_address): Likewise.
	(m68k_output_mi_thunk): Likewise.
	(m68k_conditional_register_usage): Likewise.
	(m68k_wrap_symbol): Likewise.
	(output_btst): Likewise.
	(print_operand): Likewise.
	(m68k_override_options_after_change): Likewise.
	(m68k_option_override): Likewise.
	(m68k_expand_prologue): Likewise.
	* config/m68k/m68k.h (TARGET_CPU_CPP_BUILTINS): Likewise.
	(__transfer_from_trampoline): Likewise.
	* config/m68k/m68k.md (movsi): Likewise.
	(movxf): Likewise.
	(sin<mode>2): Likewise.
	(cos<mode>2): Likewise.
	* config/m68k/netbsd-elf.h (FUNCTION_PROFILER): Likewise.
	* config/mcore/mcore-elf.h (ASM_DECLARE_OBJECT_NAME): Likewise.
	(ASM_FINISH_DECLARE_OBJECT): Likewise.
	* config/mcore/mcore.c (mcore_option_override): Likewise.
	(conditionalize_block): Likewise.
	(mcore_reorg): Likewise.
	(output_stack_adjust): Likewise.
	* config/mcore/mcore.md (allocate_stack): Likewise.
	(addsi3): Likewise.
	(addsi3_fp): Likewise.
	* config/mep/mep-pragma.c (mep_pragma_io_volatile): Likewise.
	(mep_pragma_coprocessor_width): Likewise.
	* config/mep/mep.c (mep_reg_set_in_function): Likewise.
	(mep_call_saves_register): Likewise.
	(mep_epilogue_uses): Likewise.
	(mep_expand_epilogue): Likewise.
	(mep_reorg): Likewise.
	(mep_expand_setcc_1): Likewise.
	(mep_rtx_cost): Likewise.
	(mep_init_intrinsics): Likewise.
	(mep_insert_attributes): Likewise.
	(mep_start_function): Likewise.
	(mep_select_section): Likewise.
	(mep_option_override): Likewise.
	* config/mep/mep.h (TARGET_CPU_CPP_BUILTINS): Likewise.
	* config/mep/mep.md (doloop_begin): Likewise.
	(doloop_end): Likewise.
	* config/microblaze/microblaze.c (get_base_reg): Likewise.
	(microblaze_classify_address): Likewise.
	(microblaze_legitimate_pic_operand): Likewise.
	(microblaze_legitimize_address): Likewise.
	(pic_address_needs_scratch): Likewise.
	(compute_frame_size): Likewise.
	(microblaze_asm_output_mi_thunk): Likewise.
	(microblaze_expand_move): Likewise.
	(microblaze_expand_block_move): Likewise.
	(microblaze_can_use_return_insn): Likewise.
	(microblaze_rtx_costs): Likewise.
	(microblaze_option_override): Likewise.
	(microblaze_function_prologue): Likewise.
	(microblaze_function_epilogue): Likewise.
	(microblaze_expand_prologue): Likewise.
	* config/microblaze/microblaze.h (CONSTANT_ADDRESS_P): Likewise.
	(ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
	(ASM_DECLARE_FUNCTION_SIZE): Likewise.
	(ASM_DECLARE_OBJECT_NAME): Likewise.
	(ASM_FINISH_DECLARE_OBJECT): Likewise.
	* config/microblaze/microblaze.md (movdi): Likewise.
	(movdf): Likewise.
	(tablejump): Likewise.
	(): Likewise.
	(call): Likewise.
	(call_internal_plt): Likewise.
	(call_value): Likewise.
	(call_value_intern_plt0): Likewise.
	(call_value_intern_plt): Likewise.
	(*ashlsi3_with_size_opt): Likewise.
	(*ashlsi3_with_rotate): Likewise.
	(bswapsi2): Likewise.
	(bswaphi2): Likewise.
	(movsi4_rev): Likewise.
	* config/microblaze/predicates.md (arith_plus_operand): Likewise.
	(move_src_operand): Likewise.
	* config/mips/mips-ps-3d.md (mips_addr_ps): Likewise.
	(reduc_splus_v2sf): Likewise.
	(mips_cvt_pw_ps): Likewise.
	(mips_cvt_ps_pw): Likewise.
	(mips_mulr_ps): Likewise.
	(mips_cabs_cond_<fmt>): Likewise.
	(mips_cabs_cond_4s): Likewise.
	(mips_cabs_cond_ps): Likewise.
	(bc1any4t): Likewise.
	(bc1any4f): Likewise.
	(bc1any2t): Likewise.
	(bc1any2f): Likewise.
	(mips_rsqrt1_<fmt>): Likewise.
	(mips_rsqrt2_<fmt>): Likewise.
	(mips_recip1_<fmt>): Likewise.
	(mips_recip2_<fmt>): Likewise.
	* config/mips/mips.c (mips_insert_attributes): Likewise.
	(mips_get_arg_info): Likewise.
	(mips_arg_regno): Likewise.
	(mips_function_arg_advance): Likewise.
	(mips_pad_arg_upward): Likewise.
	(mips_pass_by_reference): Likewise.
	(mips_callee_copies): Likewise.
	(mips_function_value_1): Likewise.
	(mips_mdebug_abi_name): Likewise.
	(mips_process_load_label): Likewise.
	(mips_expand_block_move): Likewise.
	(mips_split_addresses_p): Likewise.
	(mips_output_conditional_branch): Likewise.
	(mips_classify_symbol): Likewise.
	(mips_interrupt_extra_call_saved_reg_p): Likewise.
	(mips_vector_mode_supported_p): Likewise.
	(AVAIL_NON_MIPS16): Likewise.
	(mips_init_relocs): Likewise.
	(mips_encode_section_info): Likewise.
	(mips_trampoline_init): Likewise.
	(mips_conditional_register_usage): Likewise.
	(mips_case_values_threshold): Likewise.
	(mips_rtx_costs): Likewise.
	(mips_rtx_constant_in_small_data_p): Likewise.
	(mips_in_small_data_p): Likewise.
	(mips_output_filename): Likewise.
	(mips_call_may_need_jalx_p): Likewise.
	(mips_function_rodata_section): Likewise.
	(mips_file_start): Likewise.
	(mips_output_aligned_decl_common): Likewise.
	(mips_init_libfuncs): Likewise.
	(mips_reorg_process_insns): Likewise.
	(mips_set_compression_mode): Likewise.
	(mips_cfg_in_reorg): Likewise.
	(r10k_needs_protection_p): Likewise.
	(mips_df_reorg): Likewise.
	(mips_option_override): Likewise.
	(mips_start_function_definition): Likewise.
	(mips_end_function_definition): Likewise.
	(mips_declare_object_name): Likewise.
	(mips_finish_declare_object): Likewise.
	(mips_output_function_prologue): Likewise.
	(mips_expand_prologue): Likewise.
	* config/mips/mips.h (BLOCK_REG_PADDING): Likewise.
	(FUNCTION_PROFILER): Likewise.
	(ISA_HAS_FP_RECIP_RSQRT): Likewise.
	(CLASS_MAX_NREGS): Likewise.
	(CLZ_DEFINED_VALUE_AT_ZERO): Likewise.
	(MIPS_CALL): Likewise.
	(struct mips_cpu_info): Likewise.
	(TRULY_NOOP_TRUNCATION): Likewise.
	(TARGET_CPU_CPP_BUILTINS): Likewise.
	* config/mips/mips.md (abs<mode>2): Likewise.
	(neg<mode>2): Likewise.
	(*div<mode>3): Likewise.
	(sqrt<mode>2): Likewise.
	(*mul<mode>3): Likewise.
	(*mul<mode>3_r4300): Likewise.
	(clear_cache): Likewise.
	(extended_mips16): Likewise.
	(<optab><mode>3): Likewise.
	(*xgot_hi<mode>): Likewise.
	(*xgot_lo<mode>): Likewise.
	(madsi): Likewise.
	(<u>maddsidi4): Likewise.
	(may_clobber_hilo): Likewise.
	(div<mode>3): Likewise.
	(*recip<mode>3): Likewise.
	(*rsqrt<mode>a): Likewise.
	(*rsqrt<mode>b): Likewise.
	(*madd4<mode>): Likewise.
	(*madd3<mode>): Likewise.
	(*msub4<mode>): Likewise.
	(*msub3<mode>): Likewise.
	(*nmadd4<mode>): Likewise.
	(*nmadd3<mode>): Likewise.
	(*nmadd4<mode>_fastmath): Likewise.
	(*nmadd3<mode>_fastmath): Likewise.
	(*nmsub4<mode>): Likewise.
	(*nmsub3<mode>): Likewise.
	(*nmsub4<mode>_fastmath): Likewise.
	(*nmsub3<mode>_fastmath): Likewise.
	(*add<mode>3_mips16): Likewise.
	(*movdi_64bit_mips16): Likewise.
	(*mov<mode>_mips16): Likewise.
	(*movhi_mips16): Likewise.
	(*movqi_mips16): Likewise.
	(*lshrdi3_mips16): Likewise.
	(insn_count): Likewise.
	(<su>muldi3_highpart): Likewise.
	(<su>muldi3_highpart_internal): Likewise.
	(<u>mulditi3): Likewise.
	(<u>mulditi3_internal): Likewise.
	(<u>mulditi3_r4000): Likewise.
	(divmod<mode>4): Likewise.
	(*divmod<mode>4): Likewise.
	(divmod<mode>4_mips16): Likewise.
	(udivmod<mode>4): Likewise.
	* config/mips/netbsd.h (TARGET_OS_CPP_BUILTINS): Likewise.
	* config/mips/sb1.md (sb1_fp_pipes): Likewise.
	* config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Likewise.
	(TARGET_OS_CPP_BUILTINS): Likewise.
	* config/mmix/mmix.c (mmix_option_override): Likewise.
	(leaf_function_p): Likewise.
	* config/mn10300/constraints.md (S): Likewise.
	* config/mn10300/mn10300.c (mn10300_legitimize_address): Likewise.
	(mn10300_legitimate_address_p): Likewise.
	(mn10300_encode_section_info): Likewise.
	(mn10300_conditional_register_usage): Likewise.
	(mn10300_can_use_retf_insn): Likewise.
	(mn10300_register_move_cost): Likewise.
	(mn10300_reorg): Likewise.
	(mn10300_option_override): Likewise.
	(mn10300_expand_prologue): Likewise.
	* config/mn10300/mn10300.h (TARGET_CPU_CPP_BUILTINS): Likewise.
	* config/mn10300/mn10300.md (movsi): Likewise.
	(builtin_setjmp_receiver): Likewise.
	(casesi): Likewise.
	(call): Likewise.
	(call_value): Likewise.
	(load_pic): Likewise.
	(sqrtsf2): Likewise.
	* config/mn10300/predicates.md (call_address_operand): Likewise.
	* config/moxie/moxie.c (moxie_expand_prologue): Likewise.
	* config/msp430/msp430.c (msp430_mcu_name): Likewise.
	(msp430_is_f5_mcu): Likewise.
	(has_32bit_hw_mult): Likewise.
	(msp430_hwmult_enabled): Likewise.
	(msp430_expand_prologue): Likewise.
	(msp430_option_override): Likewise.
	* config/msp430/msp430.md (mulhisi3): Likewise.
	(umulhisi3): Likewise.
	(mulsidi3): Likewise.
	(umulsidi3): Likewise.
	* config/nds32/nds32.c (nds32_have_prologue_p): Likewise.
	(nds32_option_override): Likewise.
	(nds32_trampoline_init): Likewise.
	(nds32_emit_isr_vector_section): Likewise.
	(nds32_emit_isr_reset_content): Likewise.
	(nds32_register_priority): Likewise.
	(nds32_asm_file_start): Likewise.
	(nds32_fp_as_gp_check_available): Likewise.
	(nds32_target_alignment): Likewise.
	(nds32_compute_stack_frame): Likewise.
	* config/nds32/nds32.h (NDS32_REQUIRED_CALLEE_SAVED_P): Likewise.
	(CASE_VECTOR_SHORTEN_MODE): Likewise.
	* config/nios2/nios2.c (nios2_function_profiler): Likewise.
	(nios2_large_offset_p): Likewise.
	(nios2_load_pic_address): Likewise.
	(nios2_legitimize_constant_address): Likewise.
	(nios2_adjust_call_address): Likewise.
	(nios2_symbol_ref_in_small_data_p): Likewise.
	(nios2_option_override): Likewise.
	(nios2_custom_check_insns): Likewise.
	(nios2_handle_custom_fpu_cfg): Likewise.
	(nios2_asm_function_prologue): Likewise.
	(nios2_expand_prologue): Likewise.
	* config/nios2/nios2.h (while): Likewise.
	* config/nios2/nios2.md (jump): Likewise.
	(tablejump): Likewise.
	(nios2_cbranch): Likewise.
	* config/openbsd.h (while): Likewise.
	* config/pa/pa-hpux10.h (TARGET_OS_CPP_BUILTINS): Likewise.
	* config/pa/pa-hpux11.h (TARGET_OS_CPP_BUILTINS): Likewise.
	* config/pa/pa.c (fix_range): Likewise.
	(legitimize_tls_address): Likewise.
	(hppa_legitimize_address): Likewise.
	(pa_emit_move_sequence): Likewise.
	(pa_output_global_address): Likewise.
	(output_deferred_plabels): Likewise.
	(pa_secondary_reload): Likewise.
	(pa_conditional_register_usage): Likewise.
	(remove_useless_addtr_insns): Likewise.
	(pa_output_lbranch): Likewise.
	(pa_combine_instructions): Likewise.
	(pa_legitimize_reload_address): Likewise.
	(pa_file_start_space): Likewise.
	(pa_som_asm_init_sections): Likewise.
	(pa_file_start_mcount): Likewise.
	(pa_hpux64_gas_file_start): Likewise.
	(pa_adjust_cost): Likewise.
	(pa_issue_rate): Likewise.
	(pa_reorg): Likewise.
	(pa_attr_length_millicode_call): Likewise.
	(pa_output_millicode_call): Likewise.
	(pa_attr_length_call): Likewise.
	(pa_output_call): Likewise.
	(pa_attr_length_indirect_call): Likewise.
	(pa_asm_output_mi_thunk): Likewise.
	(pa_option_override): Likewise.
	(pa_file_start_file): Likewise.
	(pa_expand_prologue): Likewise.
	* config/pa/pa.h (HARD_REGNO_RENAME_OK): Likewise.
	(TEXT_SPACE_P): Likewise.
	(IS_ASM_LOGICAL_LINE_SEPARATOR): Likewise.
	(RETURN_ADDR_RTX): Likewise.
	(FUNCTION_PROFILER): Likewise.
	(FUNCTION_NAME_P): Likewise.
	* config/pa/pa.md (return_external_pic): Likewise.
	(epilogue): Likewise.
	(jump): Likewise.
	(casesi): Likewise.
	(casesi32): Likewise.
	(casesi32p): Likewise.
	(sibcall): Likewise.
	(sibcall_value): Likewise.
	(decrement_and_branch_until_zero): Likewise.
	(exception_receiver): Likewise.
	(builtin_setjmp_receiver): Likewise.
	(allocate_stack): Likewise.
	(movmemsi): Likewise.
	(movmemdi): Likewise.
	(setmemsi): Likewise.
	(setmemdi): Likewise.
	(movmemsi_prereload): Likewise.
	(movmemdi_prereload): Likewise.
	(clrmemsi_prereload): Likewise.
	(clrmemdi_prereload): Likewise.
	(call): Likewise.
	(call_value): Likewise.
	(negdf2): Likewise.
	(negsf2): Likewise.
	(): Likewise.
	* config/pa/predicates.md (pic_label_operand): Likewise.
	(read_only_operand): Likewise.
	(borx_reg_operand): Likewise.
	* config/pdp11/pdp11.c (output_addr_const_pdp11): Likewise.
	(pdp11_rtx_costs): Likewise.
	(output_jump): Likewise.
	* config/pdp11/pdp11.md (): Likewise.
	* config/picochip/picochip.c (picochip_legitimize_address): Likewise.
	(picochip_legitimize_reload_address): Likewise.
	(picochip_reorg): Likewise.
	(picochip_function_arg): Likewise.
	(picochip_arg_partial_bytes): Likewise.
	(picochip_reset_vliw): Likewise.
	(picochip_sched_adjust_cost): Likewise.
	(picochip_final_prescan_insn): Likewise.
	(picochip_get_hi_aligned_mem): Likewise.
	(picochip_option_override): Likewise.
	* config/picochip/picochip.h (TARGET_CPU_CPP_BUILTINS): Likewise.
	* config/picochip/picochip.md (cbranchhi4): Likewise.
	* config/rl78/rl78.c (record_content): Likewise.
	(gen_and_emit_move): Likewise.
	(rl78_alloc_physical_registers_op2): Likewise.
	(rl78_reorg): Likewise.
	(rl78_option_override): Likewise.
	(rl78_expand_prologue): Likewise.
	* config/rl78/rl78.h (ASM_OUTPUT_ALIGN): Likewise.
	(or): Likewise.
	(RL78_MUL_NONE): Likewise.
	(RL78_MUL_RL78): Likewise.
	* config/rs6000/750cl.h (or): Likewise.
	* config/rs6000/aix43.h (if): Likewise.
	* config/rs6000/aix51.h (if): Likewise.
	* config/rs6000/aix52.h (if): Likewise.
	* config/rs6000/aix53.h (if): Likewise.
	* config/rs6000/aix61.h (SET_CMODEL): Likewise.
	(TARGET_OS_CPP_BUILTINS): Likewise.
	(GCC_OPTION): Likewise.
	(if): Likewise.
	* config/rs6000/altivec.md (altivec_lvlx): Likewise.
	(altivec_lvlxl): Likewise.
	(altivec_lvrx): Likewise.
	(altivec_lvrxl): Likewise.
	(altivec_stvlx): Likewise.
	(altivec_stvlxl): Likewise.
	(altivec_stvrx): Likewise.
	(altivec_stvrxl): Likewise.
	* config/rs6000/darwin.h (TARGET_OS_CPP_BUILTINS): Likewise.
	(REGISTER_TARGET_PRAGMAS): Likewise.
	(BLOCK_REG_PADDING): Likewise.
	* config/rs6000/darwin.md (load_macho_picbase): Likewise.
	(load_macho_picbase_si): Likewise.
	(load_macho_picbase_di): Likewise.
	(reload_macho_picbase): Likewise.
	(reload_macho_picbase_si): Likewise.
	(reload_macho_picbase_di): Likewise.
	(nonlocal_goto_receiver): Likewise.
	* config/rs6000/e500.h (GCC_OPTION): Likewise.
	(or): Likewise.
	(TARGET_E500_SINGLE): Likewise.
	(TARGET_E500_DOUBLE): Likewise.
	* config/rs6000/eabialtivec.h (TARGET_DEFAULT): Likewise.
	* config/rs6000/freebsd.h (or): Likewise.
	* config/rs6000/freebsd64.h (or): Likewise.
	(CRT_CALL_STATIC_FUNCTION): Likewise.
	(DBX_REGISTER_NUMBER): Likewise.
	(while): Likewise.
	(ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
	(ASM_DECLARE_FUNCTION_SIZE): Likewise.
	(SET_CMODEL): Likewise.
	* config/rs6000/linux.h (OPTION_BIONIC): Likewise.
	(OPTION_GLIBC): Likewise.
	(OPTION_UCLIBC): Likewise.
	(TARGET_OS_CPP_BUILTINS): Likewise.
	* config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Likewise.
	(DEFAULT_ARCH64_P): Likewise.
	(GCC_OPTION): Likewise.
	(ELFv2_ABI_CHECK): Likewise.
	(BLOCK_REG_PADDING): Likewise.
	(while): Likewise.
	(ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
	(CRT_CALL_STATIC_FUNCTION): Likewise.
	(SET_CMODEL): Likewise.
	* config/rs6000/linuxaltivec.h (TARGET_DEFAULT): Likewise.
	* config/rs6000/paired.md (vcondv2sfv2sf): Likewise.
	(resv2sf2): Likewise.
	* config/rs6000/predicates.md (rs6000_cbranch_operator): Likewise.
	(quad_memory_operand): Likewise.
	(easy_fp_constant): Likewise.
	(cc_reg_not_micro_cr0_operand): Likewise.
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
	Likewise.
	(rs6000_pragma_longcall): Likewise.
	(rs6000_cpu_cpp_builtins): Likewise.
	* config/rs6000/rs6000.c (rs6000_lra_p): Likewise.
	(output_cbranch): Likewise.
	(rs6000_xcoff_unique_section): Likewise.
	(legitimate_small_data_p): Likewise.
	(macho_lo_sum_memory_operand): Likewise.
	(legitimate_lo_sum_address_p): Likewise.
	(rs6000_legitimize_address): Likewise.
	(rs6000_legitimize_reload_address): Likewise.
	(rs6000_conditional_register_usage): Likewise.
	(first_reg_to_save): Likewise.
	(rs6000_return_addr): Likewise.
	(rs6000_emit_load_toc_table): Likewise.
	(output_function_profiler): Likewise.
	(machopic_output_stub): Likewise.
	(rs6000_elf_reloc_rw_mask): Likewise.
	(rs6000_stack_protect_fail): Likewise.
	(altivec_expand_vec_ext_builtin): Likewise.
	(rs6000_issue_rate): Likewise.
	(rs6000_builtin_vectorization_cost): Likewise.
	(rs6000_emit_cmove): Likewise.
	(quad_load_store_p): Likewise.
	(rs6000_emit_move): Likewise.
	(rs6000_secondary_memory_needed_rtx): Likewise.
	(rs6000_secondary_reload): Likewise.
	(rs6000_secondary_reload_inner): Likewise.
	(rs6000_secondary_reload_gpr): Likewise.
	(rs6000_output_move_128bit): Likewise.
	(create_TOC_reference): Likewise.
	(rs6000_handle_altivec_attribute): Likewise.
	(rs6000_final_prescan_insn): Likewise.
	(rs6000_vector_alignment_reachable): Likewise.
	(rs6000_function_arg_advance_1): Likewise.
	(rs6000_pass_by_reference): Likewise.
	(rs6000_va_start): Likewise.
	(rs6000_function_ok_for_sibcall): Likewise.
	(force_new_group): Likewise.
	(pad_groups): Likewise.
	(rs6000_legitimize_tls_address): Likewise.
	(rs6000_builtin_vectorized_libmass): Likewise.
	(expand_block_clear): Likewise.
	(rs6000_savres_strategy): Likewise.
	(avoiding_indexed_address_p): Likewise.
	(restore_saved_cr): Likewise.
	(restore_saved_lr): Likewise.
	(rs6000_is_costly_dependence): Likewise.
	(validate_condition_mode): Likewise.
	(rs6000_reverse_condition): Likewise.
	(rs6000_elf_file_end): Likewise.
	(rs6000_stack_info): Likewise.
	(macho_branch_islands): Likewise.
	(rs6000_dbx_register_number): Likewise.
	(rs6000_trampoline_init): Likewise.
	(rs6000_variable_issue_1): Likewise.
	(is_branch_slot_insn): Likewise.
	(rs6000_sched_finish): Likewise.
	(rs6000_return_in_memory): Likewise.
	(rs6000_function_arg_boundary): Likewise.
	(rs6000_darwin64_struct_check_p): Likewise.
	(rs6000_gimplify_va_arg): Likewise.
	(invalid_arg_for_unprototyped_fn): Likewise.
	(rs6000_function_arg): Likewise.
	(rs6000_arg_partial_bytes): Likewise.
	(rs6000_init_libfuncs): Likewise.
	(rs6000_generate_compare): Likewise.
	(rs6000_reg_live_or_pic_offset_p): Likewise.
	(rs6000_set_up_by_prologue): Likewise.
	(small_data_operand): Likewise.
	(rs6000_output_function_entry): Likewise.
	(rs6000_elf_in_small_data_p): Likewise.
	(rs6000_darwin_file_start): Likewise.
	(altivec_expand_vec_perm_const): Likewise.
	(rs6000_output_function_prologue): Likewise.
	(output_toc): Likewise.
	(rs6000_hard_regno_mode_ok): Likewise.
	(rs6000_init_hard_regno_mode_ok): Likewise.
	(rs6000_xcoff_file_start): Likewise.
	(rs6000_file_start): Likewise.
	(rs6000_inner_target_options): Likewise.
	(rs6000_valid_attribute_p): Likewise.
	(rs6000_pragma_target_parse): Likewise.
	(rs6000_add_stmt_cost): Likewise.
	(rs6000_output_function_epilogue): Likewise.
	(rs6000_emit_prologue): Likewise.
	(expand_block_move): Likewise.
	(rs6000_debug_reg_global): Likewise.
	(rs6000_expand_builtin): Likewise.
	(rs6000_builtin_decl): Likewise.
	(htm_init_builtins): Likewise.
	(rs6000_common_init_builtins): Likewise.
	(rs6000_builtin_vectorized_function): Likewise.
	(def_builtin): Likewise.
	(darwin_rs6000_override_options): Likewise.
	(init_cumulative_args): Likewise.
	(rs6000_set_default_type_attributes): Likewise.
	(rs6000_builtin_mask_calculate): Likewise.
	(rs6000_option_override_internal): Likewise.
	(rs6000_loop_align): Likewise.
	(rs6000_emit_epilogue): Likewise.
	(rs6000_adjust_cost): Likewise.
	(is_microcoded_insn): Likewise.
	(is_cracked_insn): Likewise.
	(rs6000_adjust_priority): Likewise.
	(rs6000_sched_reorder): Likewise.
	(rs6000_sched_reorder2): Likewise.
	(insn_must_be_first_in_group): Likewise.
	(insn_must_be_last_in_group): Likewise.
	(rs6000_register_move_cost): Likewise.
	(rs6000_call_aix): Likewise.
	* config/rs6000/rs6000.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise.
	(defined): Likewise.
	(CLASS_MAX_NREGS): Likewise.
	(CONSTANT_ALIGNMENT): Likewise.
	(PROMOTE_MODE): Likewise.
	(SET_TARGET_LINK_STACK): Likewise.
	(TARGET_CPU_DEFAULT): Likewise.
	(VECTOR_ALIGN): Likewise.
	* config/rs6000/rs6000.md (sibcall_epilogue): Likewise.
	(prologue): Likewise.
	(epilogue): Likewise.
	(movsi_got): Likewise.
	(*movsi_got_internal): Likewise.
	(extenddftf2_fprs): Likewise.
	(tls_gd_sysv<TLSmode:tls_sysv_suffix>): Likewise.
	(*tls_gd_call_sysv<TLSmode:tls_abi_suffix>): Likewise.
	(tls_ld_sysv<TLSmode:tls_sysv_suffix>): Likewise.
	(*tls_ld_call_sysv<TLSmode:tls_abi_suffix>): Likewise.
	(load_toc_v4_pic_si): Likewise.
	(load_toc_v4_PIC_1): Likewise.
	(load_toc_v4_PIC_1_normal): Likewise.
	(load_toc_v4_PIC_1_476): Likewise.
	(load_toc_v4_PIC_1b): Likewise.
	(load_toc_v4_PIC_1b_normal): Likewise.
	(load_toc_v4_PIC_1b_476): Likewise.
	(load_toc_v4_PIC_2): Likewise.
	(load_toc_v4_PIC_3b): Likewise.
	(load_toc_v4_PIC_3c): Likewise.
	(builtin_setjmp_receiver): Likewise.
	(*call_local32): Likewise.
	(*call_local64): Likewise.
	(*call_value_local32): Likewise.
	(*call_value_local64): Likewise.
	(*call_nonlocal_sysv<mode>): Likewise.
	(*call_nonlocal_sysv_secure<mode>): Likewise.
	(*call_value_nonlocal_sysv<mode>): Likewise.
	(*call_value_nonlocal_sysv_secure<mode>): Likewise.
	(*sibcall_local32): Likewise.
	(*sibcall_local64): Likewise.
	(*sibcall_value_local32): Likewise.
	(*sibcall_value_local64): Likewise.
	(*sibcall_nonlocal_sysv<mode>): Likewise.
	(*sibcall_value_nonlocal_sysv<mode>): Likewise.
	(smax<mode>3): Likewise.
	(smin<mode>3): Likewise.
	(*smin<mode>3_vsx): Likewise.
	(*fseldfsf4): Likewise.
	(floatunssisf2): Likewise.
	(*friz): Likewise.
	(floatsisf2): Likewise.
	(floatdisf2): Likewise.
	(strlensi): Likewise.
	(*eq<mode>_compare): Likewise.
	(*compare_plus_eqsi): Likewise.
	(*plus_eqsi_compare): Likewise.
	(*bswapdi2_64bit): Likewise.
	(bswapdi2_32bit): Likewise.
	(abstf2): Likewise.
	(recip<mode>3): Likewise.
	(trunctfdf2_internal1): Likewise.
	(trunctfdf2_internal2): Likewise.
	(*cmptf_internal1): Likewise.
	(*cmptf_internal2): Likewise.
	(*extendsidi2_nocell): Likewise.
	(): Likewise.
	(andsi3_mc): Likewise.
	(andsi3_nomc): Likewise.
	(andsi3_internal0_nomc): Likewise.
	(*andsi3_internal2_mc): Likewise.
	(*andsi3_internal3_mc): Likewise.
	(*andsi3_internal4): Likewise.
	(*andsi3_internal5_mc): Likewise.
	(*extzvdi_internal1): Likewise.
	(*extzvdi_internal2): Likewise.
	(anddi3_mc): Likewise.
	(anddi3_nomc): Likewise.
	(*anddi3_internal2_mc): Likewise.
	(*anddi3_internal3_mc): Likewise.
	(*movsi_update2): Likewise.
	(*movhi_update3): Likewise.
	* config/rs6000/singlefp.h (TARGET_DOUBLE_FLOAT): Likewise.
	(or): Likewise.
	(TARGET_SINGLE_FLOAT): Likewise.
	* config/rs6000/spe.md (cmpsfeq_gpr): Likewise.
	(tstsfeq_gpr): Likewise.
	(cmpsfgt_gpr): Likewise.
	(tstsfgt_gpr): Likewise.
	(cmpsflt_gpr): Likewise.
	(tstsflt_gpr): Likewise.
	(cmpdfeq_gpr): Likewise.
	(tstdfeq_gpr): Likewise.
	(cmpdfgt_gpr): Likewise.
	(tstdfgt_gpr): Likewise.
	(cmpdflt_gpr): Likewise.
	(tstdflt_gpr): Likewise.
	(cmptfeq_gpr): Likewise.
	(tsttfeq_gpr): Likewise.
	(cmptfgt_gpr): Likewise.
	(tsttfgt_gpr): Likewise.
	(cmptflt_gpr): Likewise.
	(tsttflt_gpr): Likewise.
	* config/rs6000/sysv4.h (CHOOSE_DYNAMIC_LINKER): Likewise.
	(TARGET_NO_EABI): Likewise.
	(TARGET_OS_SYSV_CPP_BUILTINS): Likewise.
	(TARGET_TOC): Likewise.
	(error): Likewise.
	(ADJUST_FIELD_ALIGN): Likewise.
	(or): Likewise.
	(GCC_OPTION): Likewise.
	(if): Likewise.
	(PCC_BITFIELD_TYPE_MATTERS): Likewise.
	(TARGET_BITFIELD_TYPE): Likewise.
	(ASM_DECLARE_FUNCTION_NAME): Likewise.
	(TARGET_BIG_ENDIAN): Likewise.
	* config/rs6000/vector.md (movmisalign<mode>): Likewise.
	* config/rs6000/vsx.md (*vsx_float_fix_<mode>2): Likewise.
	* config/rs6000/vxworks.h (TARGET_OS_CPP_BUILTINS): Likewise.
	* config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
	(ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
	* config/rs6000/xfpu.h (or): Likewise.
	* config/rx/rx.c (rx_align_for_label): Likewise.
	(rx_set_current_function): Likewise.
	(rx_override_options_after_change): Likewise.
	(ok_for_max_constant): Likewise.
	(rx_is_legitimate_constant): Likewise.
	(rx_expand_builtin_mvtipl): Likewise.
	(rx_small_data_operand): Likewise.
	(rx_conditional_register_usage): Likewise.
	(rx_in_small_data): Likewise.
	(rx_select_rtx_section): Likewise.
	(rx_select_section): Likewise.
	(rx_option_override): Likewise.
	(rx_expand_prologue): Likewise.
	* config/rx/rx.h (ASM_OUTPUT_LIMITED_STRING): Likewise.
	(TARGET_CPU_CPP_BUILTINS): Likewise.
	(MODES_TIEABLE_P): Likewise.
	* config/rx/rx.md (*xorsi3_flags): Likewise.
	(<memex_commutative:code>si3_<extend_types:code><small_int_modes:mode>
	): Likewise.
	(<memex_noncomm:code>si3_<extend_types:code><small_int_modes:mode>):
	Likewise.
	(<memex_nocc:code>si3_<extend_types:code><small_int_modes:mode>):
	Likewise.
	(comparesi3_<extend_types:code><small_int_modes:mode>): Likewise.
	* config/s390/predicates.md (bras_sym_operand): Likewise.
	(larl_operand): Likewise.
	* config/s390/s390.c (s390_decompose_address): Likewise.
	(s390_legitimate_constant_p): Likewise.
	(s390_cannot_force_const_mem): Likewise.
	(s390_preferred_reload_class): Likewise.
	(s390_secondary_reload): Likewise.
	(legitimize_pic_address): Likewise.
	(s390_emit_tls_call_insn): Likewise.
	(legitimize_tls_address): Likewise.
	(emit_symbolic_move): Likewise.
	(s390_legitimize_address): Likewise.
	(s390_split_branches): Likewise.
	(s390_register_info): Likewise.
	(global_not_special_regno_p): Likewise.
	(s390_function_profiler): Likewise.
	(s390_output_mi_thunk): Likewise.
	(s390_function_ok_for_sibcall): Likewise.
	(s390_emit_call): Likewise.
	(s390_conditional_register_usage): Likewise.
	(legitimize_reload_address): Likewise.
	(s390_va_start): Likewise.
	(s390_gimplify_va_arg): Likewise.
	(preferred_la_operand_p): Likewise.
	(s390_expand_movmem): Likewise.
	(s390_expand_cmpmem): Likewise.
	(s390_adjust_priority): Likewise.
	(s390_issue_rate): Likewise.
	(s390_reorg): Likewise.
	(s390_sched_reorder): Likewise.
	(s390_sched_variable_issue): Likewise.
	(s390_loop_unroll_adjust): Likewise.
	(s390_option_override): Likewise.
	(s390_emit_prologue): Likewise.
	* config/s390/s390.h (EH_RETURN_DATA_REGNO): Likewise.
	(STORE_BY_PIECES_P): Likewise.
	(TLS_SYMBOLIC_CONST): Likewise.
	(mode): Likewise.
	(TARGET_HTM): Likewise.
	* config/s390/s390.md (*cjump_31): Likewise.
	(*icjump_31): Likewise.
	(doloop_si31): Likewise.
	(*jump31): Likewise.
	(casesi): Likewise.
	(builtin_setjmp_receiver): Likewise.
	(movhi): Likewise.
	(movqi): Likewise.
	* config/score/score.c (score_compute_frame_size): Likewise.
	(score_select_rtx_section): Likewise.
	(score_asm_file_start): Likewise.
	(score_option_override): Likewise.
	(score_prologue): Likewise.
	(score_conditional_register_usage): Likewise.
	(score_rtx_costs): Likewise.
	(score_function_prologue): Likewise.
	(score_function_epilogue): Likewise.
	* config/score/score.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
	* config/score/score.md (jump): Likewise.
	(sibcall_internal_score7): Likewise.
	(sibcall_value_internal_score7): Likewise.
	(call_internal_score7): Likewise.
	(call_value_internal_score7): Likewise.
	(tablejump_internal_score7): Likewise.
	(cpload_score7): Likewise.
	(cprestore_use_fp_score7): Likewise.
	(cprestore_use_sp_score7): Likewise.
	* config/sh/linux.h (FUNCTION_PROFILER): Likewise.
	(DBX_REGISTER_NUMBER): Likewise.
	* config/sh/netbsd-elf.h (while): Likewise.
	* config/sh/sh-mem.cc (expand_block_move): Likewise.
	(sh_expand_cmpstr): Likewise.
	(sh_expand_cmpnstr): Likewise.
	* config/sh/sh.c (sh_expand_epilogue): Likewise.
	(initial_elimination_offset): Likewise.
	(sh_check_pch_target_flags): Likewise.
	(prepare_move_operands): Likewise.
	(output_far_jump): Likewise.
	(sh_cannot_copy_insn_p): Likewise.
	(fixup_mova): Likewise.
	(sh_media_register_for_return): Likewise.
	(sh_legitimize_address): Likewise.
	(sh_function_ok_for_sibcall): Likewise.
	(function_symbol): Likewise.
	(shmedia_prepare_call_address): Likewise.
	(sh_conditional_register_usage): Likewise.
	(print_slot): Likewise.
	(untangle_mova): Likewise.
	(gen_far_branch): Likewise.
	(split_branches): Likewise.
	(sh_hard_regno_mode_ok): Likewise.
	(sh_cannot_change_mode_class): Likewise.
	(parse_validate_atomic_model_option): Likewise.
	(expand_cbranchdi4): Likewise.
	(gen_block_redirect): Likewise.
	(sh_can_redirect_branch): Likewise.
	(sh_adjust_cost): Likewise.
	(sh_output_mi_thunk): Likewise.
	(and_xor_ior_costs): Likewise.
	(multcosts): Likewise.
	(find_barrier): Likewise.
	(barrier_align): Likewise.
	(sh_loop_align): Likewise.
	(shmedia_reserve_space_for_target_registers_p): Likewise.
	(sh_trampoline_init): Likewise.
	(sh_register_move_cost): Likewise.
	(final_prescan_insn): Likewise.
	(sh_print_operand): Likewise.
	(sh_reorg): Likewise.
	(calc_live_regs): Likewise.
	(sh_emit_compare_and_branch): Likewise.
	(sh_emit_compare_and_set): Likewise.
	(sh_expand_prologue): Likewise.
	(sh_option_override): Likewise.
	* config/sh/sh.h (TARGET_SUPERSCALAR): Likewise.
	(TARGET_SH4): Likewise.
	(HARD_REGNO_RENAME_OK): Likewise.
	(IS_NON_EXPLICIT_CONSTANT_P): Likewise.
	(MOVI_SHORI_BASE_OPERAND_P): Likewise.
	(ASM_PREFERRED_EH_DATA_FORMAT): Likewise.
	(BASE_REGISTER_RTX_P): Likewise.
	(ASM_OUTPUT_ADDR_VEC_ELT): Likewise.
	(REGCLASS_HAS_FP_REG): Likewise.
	(FUNCTION_PROFILER): Likewise.
	(MOVE_BY_PIECES_P): Likewise.
	(STORE_BY_PIECES_P): Likewise.
	(PROMOTE_MODE): Likewise.
	* config/sh/sh.md (*fmasf4): Likewise.
	(*fmasf4_media): Likewise.
	(movsi_const_16bit): Likewise.
	(movdi_const_16bit): Likewise.
	(call): Likewise.
	(call_pop): Likewise.
	(call_value): Likewise.
	(sibcall): Likewise.
	(sibcall_value): Likewise.
	(call_value_pop): Likewise.
	(*ptb): Likewise.
	(builtin_setjmp_receiver): Likewise.
	(casesi_worker_2): Likewise.
	(cmpeqdi_t): Likewise.
	(cmpstrsi): Likewise.
	(cmpstrnsi): Likewise.
	(strlensi): Likewise.
	(fpu_switch): Likewise.
	(*movsicc_div0s): Likewise.
	(*movsicc_t_false): Likewise.
	(*movsicc_t_true): Likewise.
	(movsicc): Likewise.
	(ic_invalidate_line): Likewise.
	(ic_invalidate_line_sh4a): Likewise.
	(sincossf3): Likewise.
	(fsca): Likewise.
	(symGOT_load): Likewise.
	(length): Likewise.
	(rsqrtsf2): Likewise.
	(cbranchdi4): Likewise.
	(cbranchdi4_i): Likewise.
	(negsi_cond): Likewise.
	(*cset_zero): Likewise.
	(ieee_ccmpeqsf_t): Likewise.
	(*ieee_ccmpeqsf_t_4): Likewise.
	(*ieee_ccmpeqdf_t): Likewise.
	(*divsi_inv_call_combine): Likewise.
	(divsi3): Likewise.
	* config/sh/sh_optimize_sett_clrt.cc (sh_optimize_sett_clrt::gate):
	Likewise.
	* config/sh/sh_treg_combine.cc (trace_reg_uses): Likewise.
	* config/sh/sync.md (atomic_test_and_set): Likewise.
	(tasb): Likewise.
	(atomic_test_and_set_soft_gusa): Likewise.
	(atomic_test_and_set_soft_tcb): Likewise.
	(atomic_test_and_set_soft_imask): Likewise.
	(atomic_test_and_set_hard): Likewise.
	* config/sh/vxworks.h (TARGET_OS_CPP_BUILTINS): Likewise.
	* config/sol2.c (solaris_override_options): Likewise.
	* config/sol2.h (ASM_DECLARE_FUNCTION_SIZE): Likewise.
	* config/sparc/sol2.h (ASM_PREFERRED_EH_DATA_FORMAT): Likewise.
	(ASM_DECLARE_OBJECT_NAME): Likewise.
	* config/sparc/sparc.c (sparc_struct_value_rtx): Likewise.
	(struct processor_costs): Likewise.
	(sparc_expand_move): Likewise.
	(sparc_cannot_force_const_mem): Likewise.
	(check_pic): Likewise.
	(constant_address_p): Likewise.
	(sparc_tls_got): Likewise.
	(sparc_legitimize_pic_address): Likewise.
	(sparc_legitimize_address): Likewise.
	(sparc_legitimize_reload_address): Likewise.
	(sparc_mode_dependent_address_p): Likewise.
	(gen_load_pcrel_sym): Likewise.
	(sparc_emit_call_insn): Likewise.
	(sparc_print_operand_address): Likewise.
	(sparc_secondary_reload): Likewise.
	(sparc_legitimate_address_p): Likewise.
	(mem_min_alignment): Likewise.
	(sparc_emit_membar_for_model): Likewise.
	(sparc_check_64): Likewise.
	(sparc_gate_work_around_errata): Likewise.
	(sparc_do_work_around_errata): Likewise.
	(output_return): Likewise.
	(output_sibcall): Likewise.
	(sparc_function_ok_for_sibcall): Likewise.
	(sparc_output_mi_thunk): Likewise.
	(sparc_file_end): Likewise.
	(sparc_print_operand): Likewise.
	(sparc32_initialize_trampoline): Likewise.
	(sparc64_initialize_trampoline): Likewise.
	(hypersparc_adjust_cost): Likewise.
	(sparc_use_sched_lookahead): Likewise.
	(sparc_issue_rate): Likewise.
	(sparc_register_move_cost): Likewise.
	(sparc_option_override): Likewise.
	(can_use_mov_pic_label_ref): Likewise.
	(sparc_expand_prologue): Likewise.
	(sparc_flat_expand_prologue): Likewise.
	* config/sparc/sparc.h (HARD_REGNO_RENAME_OK): Likewise.
	(function_arg_padding): Likewise.
	* config/sparc/sparc.md (pic): Likewise.
	(movsi_lo_sum_pic): Likewise.
	(movsi_high_pic): Likewise.
	(movsi_pic_gotdata_op): Likewise.
	(movsi_pic_label_ref): Likewise.
	(*movsi_high_pic_label_ref): Likewise.
	(*movsi_lo_sum_pic_label_ref): Likewise.
	(movdi_pic_label_ref): Likewise.
	(*movdi_high_pic_label_ref): Likewise.
	(*movdi_lo_sum_pic_label_ref): Likewise.
	(movdi_lo_sum_pic): Likewise.
	(movdi_high_pic): Likewise.
	(movdi_pic_gotdata_op): Likewise.
	(reload_indi): Likewise.
	(reload_outdi): Likewise.
	(tablejump): Likewise.
	(builtin_setjmp_receiver): Likewise.
	(fix_ut699): Likewise.
	(*muldf3_extend): Likewise.
	(*divdf3_nofix): Likewise.
	(*divdf3_fix): Likewise.
	(divsf3): Likewise.
	(*sqrtdf2_nofix): Likewise.
	(*sqrtdf2_fix): Likewise.
	(sqrtsf2): Likewise.
	(delayed_branch): Likewise.
	(load_pcrel_sym<P:mode>): Likewise.
	(update_return): Likewise.
	* config/sparc/sync.md (atomic_exchangesi): Likewise.
	(swapsi): Likewise.
	(atomic_test_and_set): Likewise.
	(ldstub): Likewise.
	* config/spu/spu-builtins.md (set_intr): Likewise.
	(set_intr_pic): Likewise.
	(set_intr_cc): Likewise.
	(set_intr_cc_pic): Likewise.
	* config/spu/spu-c.c (spu_resolve_overloaded_builtin): Likewise.
	(spu_cpu_cpp_builtins): Likewise.
	(spu_c_common_override_options): Likewise.
	* config/spu/spu.c (spu_split_immediate): Likewise.
	(need_to_save_reg): Likewise.
	(classify_immediate): Likewise.
	(spu_legitimate_constant_p): Likewise.
	(spu_conditional_register_usage): Likewise.
	(reloc_diagnostic): Likewise.
	(spu_machine_dependent_reorg): Likewise.
	(spu_sched_reorder): Likewise.
	(struct spu_builtin_range): Likewise.
	(ea_load_store_inline): Likewise.
	(expand_ea_mem): Likewise.
	(spu_var_tracking): Likewise.
	(spu_allocate_stack): Likewise.
	(spu_build_builtin_va_list): Likewise.
	(spu_sched_init): Likewise.
	(spu_option_override): Likewise.
	(spu_add_stmt_cost): Likewise.
	(spu_expand_prologue): Likewise.
	* config/spu/spu.h (TARGET_CPU_CPP_BUILTINS): Likewise.
	(c_register_addr_space): Likewise.
	* config/spu/spu.md (pic): Likewise.
	(load_pic_offset): Likewise.
	(casesi): Likewise.
	(*div<mode>3_fast): Likewise.
	(*div<mode>3_adjusted): Likewise.
	(floatunssidf2): Likewise.
	(floatunsdidf2): Likewise.
	(ceq_df): Likewise.
	(cgt_df): Likewise.
	(dsync): Likewise.
	* config/stormy16/stormy16.c (xstormy16_expand_prologue): Likewise.
	* config/tilegx/tilegx.c (tilegx_init_expanders): Likewise.
	(tilegx_tls_got): Likewise.
	(tilegx_legitimize_pic_address): Likewise.
	(tilegx_legitimize_address): Likewise.
	(load_pic_register): Likewise.
	(tilegx_expand_mov): Likewise.
	(tilegx_expand_tablejump): Likewise.
	(need_to_save_reg): Likewise.
	(tilegx_expand_epilogue): Likewise.
	(replace_mov_pcrel_step1): Likewise.
	(replace_mov_pcrel_step2): Likewise.
	(replace_mov_pcrel_step3): Likewise.
	(tilegx_print_operand): Likewise.
	(tilegx_function_profiler): Likewise.
	(tilegx_function_ok_for_sibcall): Likewise.
	(tilegx_compute_pcrel_address): Likewise.
	(tilegx_build_builtin_va_list): Likewise.
	(tilegx_option_override): Likewise.
	(tilegx_reorg): Likewise.
	(tilegx_expand_prologue): Likewise.
	* config/tilegx/tilegx.h (LOCAL_ALIGNMENT): Likewise.
	* config/tilegx/tilegx.md (mov_pcrel_step1<bitsuffix>): Likewise.
	(mov_pcrel_step2<bitsuffix>): Likewise.
	(mov_pcrel_step3<bitsuffix>): Likewise.
	(mov_large_pcrel_step1): Likewise.
	(mov_large_pcrel_step2): Likewise.
	(mov_large_pcrel_step3): Likewise.
	(mov_large_pcrel_step4): Likewise.
	(mov_plt_pcrel_step1): Likewise.
	(mov_plt_pcrel_step2): Likewise.
	(mov_plt_pcrel_step3): Likewise.
	(mov_plt_pcrel_step1_32bit): Likewise.
	(mov_plt_pcrel_step2_32bit): Likewise.
	(add_got16<bitsuffix>): Likewise.
	(mov_got32_step1<bitsuffix>): Likewise.
	(mov_got32_step2<bitsuffix>): Likewise.
	(call): Likewise.
	(call_value): Likewise.
	(doloop_end): Likewise.
	* config/tilepro/tilepro.c (tilepro_init_expanders): Likewise.
	(tilepro_tls_got): Likewise.
	(tilepro_legitimize_pic_address): Likewise.
	(tilepro_legitimize_address): Likewise.
	(load_pic_register): Likewise.
	(tilepro_expand_mov): Likewise.
	(tilepro_expand_tablejump): Likewise.
	(need_to_save_reg): Likewise.
	(tilepro_expand_epilogue): Likewise.
	(replace_pc_relative_symbol_ref): Likewise.
	(tilepro_print_operand): Likewise.
	(tilepro_function_profiler): Likewise.
	(tilepro_build_builtin_va_list): Likewise.
	(tilepro_option_override): Likewise.
	(tilepro_reorg): Likewise.
	(tilepro_expand_prologue): Likewise.
	* config/tilepro/tilepro.h (LOCAL_ALIGNMENT): Likewise.
	* config/tilepro/tilepro.md (addli_pcrel): Likewise.
	(auli_pcrel): Likewise.
	(add_got16): Likewise.
	(addhi_got32): Likewise.
	(addlo_got32): Likewise.
	(doloop_end): Likewise.
	* config/v850/predicates.md (call_address_operand): Likewise.
	(pattern_is_ok_for_prologue): Likewise.
	* config/v850/v850.c (use_prolog_function): Likewise.
	(construct_restore_jr): Likewise.
	(construct_save_jarl): Likewise.
	(v850_adjust_insn_length): Likewise.
	(substitute_ep_register): Likewise.
	(v850_option_override): Likewise.
	(v850_encode_data_area): Likewise.
	(expand_prologue): Likewise.
	* config/v850/v850.h (PROMOTE_MODE): Likewise.
	* config/v850/v850.md (long_calls): Likewise.
	(call): Likewise.
	(call_internal_short): Likewise.
	(call_internal_long): Likewise.
	(call_value): Likewise.
	(call_value_internal_short): Likewise.
	(call_value_internal_long): Likewise.
	(save_interrupt): Likewise.
	(return_interrupt): Likewise.
	(save_all_interrupt): Likewise.
	(_save_all_interrupt): Likewise.
	(restore_all_interrupt): Likewise.
	(_restore_all_interrupt): Likewise.
	* config/vax/constraints.md (T): Likewise.
	* config/vax/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Likewise.
	(FRAME_POINTER_CFA_OFFSET): Likewise.
	* config/vax/predicates.md (local_symbolic_operand): Likewise.
	(nonsymbolic_operand): Likewise.
	(illegal_blk_memory_operand): Likewise.
	(illegal_addsub_di_memory_operand): Likewise.
	* config/vax/vax.c (print_operand_address): Likewise.
	(print_operand): Likewise.
	(vax_output_int_add): Likewise.
	(legitimate_constant_address_p): Likewise.
	(indirectable_constant_address_p): Likewise.
	(indirectable_address_p): Likewise.
	(indexable_address_p): Likewise.
	(vax_mode_dependent_address_p): Likewise.
	(fixup_mathdi_operand): Likewise.
	(split_quadword_operands): Likewise.
	(vax_output_int_move): Likewise.
	(vax_file_start): Likewise.
	* config/vax/vax.md (movsi): Likewise.
	(pushlclsymreg): Likewise.
	(pushextsymreg): Likewise.
	(movlclsymreg): Likewise.
	(movextsymreg): Likewise.
	(ashlsi3): Likewise.
	(): Likewise.
	* config/vms/vms-c.c (vms_pragma_member_alignment): Likewise.
	(vms_pragma_pointer_size): Likewise.
	(vms_c_common_override_options): Likewise.
	* config/vms/vms.c (vms_patch_builtins): Likewise.
	(vms_start_function): Likewise.
	* config/vms/vms.h (TARGET_OS_CPP_BUILTINS): Likewise.
	* config/vxworks.c (vxworks_override_options): Likewise.
	* config/xtensa/predicates.md (call_insn_operand): Likewise.
	* config/xtensa/xtensa.c (xtensa_output_addr_const_extra): Likewise.
	(xtensa_expand_block_move): Likewise.
	(xtensa_option_override): Likewise.
	* config/xtensa/xtensa.h (FUNCTION_PROFILER): Likewise.
	(ASM_OUTPUT_ALIGN): Likewise.
	(EH_RETURN_DATA_REGNO): Likewise.
	(ASM_OUTPUT_POOL_PROLOGUE): Likewise.
	* config/xtensa/xtensa.md (tablejump): Likewise.
	(call): Likewise.
	(call_value): Likewise.
	(*recipsf2): Likewise.
	(*rsqrtsf2): Likewise.
	* convert.c (convert_to_integer): Likewise.
	(convert_to_real): Likewise.
	* coverage.c (coverage_init): Likewise.
	(coverage_finish): Likewise.
	(get_coverage_counts): Likewise.
	(coverage_compute_profile_id): Likewise.
	* cppbuiltin.c (define_builtin_macros_for_compilation_flags):
	Likewise.
	* cprop.c (gate_rtl_cprop): Likewise.
	* cse.c (gate_handle_cse): Likewise.
	(gate_handle_cse_after_global_opts): Likewise.
	(cse_main): Likewise.
	(cse_insn): Likewise.
	(rest_of_handle_cse): Likewise.
	(gate_handle_cse2): Likewise.
	(rest_of_handle_cse_after_global_opts): Likewise.
	* cselib.c (new_cselib_val): Likewise.
	(cselib_lookup_mem): Likewise.
	* dbxout.c (dbxout_block): Likewise.
	(stabstr_continue): Likewise.
	(dbxout_init): Likewise.
	(dbxout_begin_prologue): Likewise.
	(dbxout_type_fields): Likewise.
	(dbxout_type): Likewise.
	(print_int_cst_bounds_in_octal_p): Likewise.
	(dbxout_symbol): Likewise.
	(dbxout_parms): Likewise.
	(dbxout_function_end): Likewise.
	* dce.c (run_word_dce): Likewise.
	(run_fast_df_dce): Likewise.
	(run_fast_dce): Likewise.
	(gate_ud_dce): Likewise.
	(gate_fast_dce): Likewise.
	* ddg.c (create_ddg_dep_from_intra_loop_link): Likewise.
	(add_cross_iteration_register_deps): Likewise.
	(build_intra_loop_deps): Likewise.
	* defaults.h (ASM_OUTPUT_MEASURED_SIZE): Likewise.
	* df-core.c (rest_of_handle_df_initialize): Likewise.
	(gate_opt): Likewise.
	(gate_no_opt): Likewise.
	(df_ref_debug): Likewise.
	* df-problems.c (df_live_alloc): Likewise.
	* dojump.c (clear_pending_stack_adjust): Likewise.
	* dse.c (record_store): Likewise.
	(gate_dse1): Likewise.
	(gate_dse2): Likewise.
	* dumpfile.c (get_dump_file_name): Likewise.
	* dwarf2asm.c (dw2_asm_output_data): Likewise.
	(dw2_asm_output_delta): Likewise.
	(dw2_asm_output_vms_delta): Likewise.
	(dw2_asm_output_offset): Likewise.
	(dw2_asm_output_pcrel): Likewise.
	(dw2_asm_output_addr): Likewise.
	(dw2_asm_output_addr_rtx): Likewise.
	(dw2_asm_output_nstring): Likewise.
	(dw2_asm_output_data_uleb128): Likewise.
	(dw2_asm_output_data_sleb128): Likewise.
	(dw2_asm_output_delta_uleb128): Likewise.
	(dw2_asm_output_delta_sleb128): Likewise.
	(dw2_asm_output_encoded_addr_rtx): Likewise.
	* dwarf2cfi.c (output_cfi_directive): Likewise.
	(cfi_label_required_p): Likewise.
	(dwarf2out_do_frame): Likewise.
	(dwarf2out_do_cfi_asm): Likewise.
	* dwarf2out.c (dwarf2_build_local_stub): Likewise.
	(scompare_loc_descriptor): Likewise.
	(ucompare_loc_descriptor): Likewise.
	(minmax_loc_descriptor): Likewise.
	(parameter_ref_descriptor): Likewise.
	(mem_loc_descriptor): Likewise.
	(implicit_ptr_descriptor): Likewise.
	(output_macinfo_op): Likewise.
	(save_macinfo_strings): Likewise.
	(resolve_addr_in_expr): Likewise.
	(optimize_location_into_implicit_ptr): Likewise.
	(switch_to_eh_frame_section): Likewise.
	(matches_main_base): Likewise.
	(based_loc_descr): Likewise.
	(gen_producer_string): Likewise.
	(size_of_pubnames): Likewise.
	(output_pubname): Likewise.
	(dw_addr_op): Likewise.
	(set_indirect_string): Likewise.
	(add_addr_table_entry): Likewise.
	(remove_addr_table_entry): Likewise.
	(add_AT_addr): Likewise.
	(add_AT_lbl_id): Likewise.
	(add_AT_range_list): Likewise.
	(output_loc_list): Likewise.
	(output_loc_list_offset): Likewise.
	(output_attr_index_or_value): Likewise.
	(output_pubnames): Likewise.
	(output_aranges): Likewise.
	(output_macinfo): Likewise.
	(output_indirect_strings): Likewise.
	(compare_loc_operands): Likewise.
	(dwarf2out_begin_prologue): Likewise.
	(loc_list_plus_const): Likewise.
	(add_AT_low_high_pc): Likewise.
	(size_of_die): Likewise.
	(value_format): Likewise.
	(output_compilation_unit_header): Likewise.
	(output_skeleton_debug_sections): Likewise.
	(output_comdat_type_unit): Likewise.
	(output_line_info): Likewise.
	(base_type_die): Likewise.
	(modified_type_die): Likewise.
	(reg_loc_descriptor): Likewise.
	(address_of_int_loc_descriptor): Likewise.
	(loc_descriptor): Likewise.
	(dw_loc_list_1): Likewise.
	(new_loc_descr_op_bit_piece): Likewise.
	(loc_list_for_address_of_addr_expr_of_indirect_ref): Likewise.
	(loc_list_from_tree): Likewise.
	(add_accessibility_attribute): Likewise.
	(add_data_member_location_attribute): Likewise.
	(add_const_value_attribute): Likewise.
	(lower_bound_default): Likewise.
	(add_linkage_attr): Likewise.
	(add_calling_convention_attribute): Likewise.
	(record_type_tag): Likewise.
	(gen_enumeration_type_die): Likewise.
	(gen_formal_types_die): Likewise.
	(add_call_src_coords_attributes): Likewise.
	(add_high_low_attributes): Likewise.
	(gen_reference_type_die): Likewise.
	(gen_compile_unit_die): Likewise.
	(gen_inheritance_die): Likewise.
	(gen_type_die_with_usage): Likewise.
	(force_decl_die): Likewise.
	(dwarf2out_imported_module_or_decl_1): Likewise.
	(resolve_addr): Likewise.
	(output_call_frame_info): Likewise.
	(output_die): Likewise.
	(build_cfa_aligned_loc): Likewise.
	(want_pubnames): Likewise.
	(add_pure_or_virtual_attribute): Likewise.
	(add_linkage_name): Likewise.
	(scope_die_for): Likewise.
	(dwarf2out_abstract_function): Likewise.
	(gen_struct_or_union_type_die): Likewise.
	(gen_block_die): Likewise.
	(decls_for_scope): Likewise.
	(declare_in_namespace): Likewise.
	(gen_decl_die): Likewise.
	(dwarf2out_imported_module_or_decl): Likewise.
	(gen_namelist_decl): Likewise.
	(dwarf2out_decl): Likewise.
	(dwarf2out_source_line): Likewise.
	(dwarf2out_define): Likewise.
	(dwarf2out_undef): Likewise.
	(dwarf2out_init): Likewise.
	(new_addr_loc_descr): Likewise.
	(dwarf2out_frame_finish): Likewise.
	(dwarf2out_assembly_start): Likewise.
	(include_pubname_in_output): Likewise.
	(gen_subprogram_die): Likewise.
	(set_cur_line_info_table): Likewise.
	(dwarf2out_begin_function): Likewise.
	(add_top_level_skeleton_die_attrs): Likewise.
	(should_emit_struct_debug): Likewise.
	(fde_needed_for_eh_p): Likewise.
	(dwarf2out_start_source_file): Likewise.
	(dwarf2out_end_source_file): Likewise.
	(dwarf2out_finish): Likewise.
	* emit-rtl.c (add_insn_after_nobb): Likewise.
	(add_insn_before_nobb): Likewise.
	* except.c (init_eh): Likewise.
	(insn_could_throw_p): Likewise.
	(set_nothrow_function_flags): Likewise.
	(switch_to_exception_section): Likewise.
	(dw2_build_landing_pads): Likewise.
	(convert_to_eh_region_ranges): Likewise.
	* explow.c (use_anchored_address): Likewise.
	(allocate_dynamic_stack_space): Likewise.
	* expmed.c (expand_mult): Likewise.
	(expand_divmod): Likewise.
	(expand_mult_const): Likewise.
	(emit_cstore): Likewise.
	(emit_store_flag): Likewise.
	(strict_volatile_bitfield_p): Likewise.
	* expr.c (do_tablejump): Likewise.
	(convert_move): Likewise.
	(emit_move_insn): Likewise.
	(get_subtarget): Likewise.
	(expand_expr_real_2): Likewise.
	(expand_expr_real_1): Likewise.
	(get_inner_reference): Likewise.
	(expand_operands): Likewise.
	* final.c (compute_alignments): Likewise.
	(shorten_branches): Likewise.
	(leaf_function_p): Likewise.
	(rest_of_handle_final): Likewise.
	(dump_basic_block_info): Likewise.
	(final): Likewise.
	(dwarf2_debug_info_emitted_p): Likewise.
	(final_start_function): Likewise.
	(rest_of_clean_state): Likewise.
	(final_scan_insn): Likewise.
	(output_asm_insn): Likewise.
	* flags.h (abi_version_at_least): Likewise.
	* fold-const.c (fold_truth_andor): Likewise.
	(fold_negate_expr): Likewise.
	(invert_tree_comparison): Likewise.
	(combine_comparisons): Likewise.
	(fold_truth_not_expr): Likewise.
	(fold_cond_expr_with_comparison): Likewise.
	(fold_relational_const): Likewise.
	(tree_single_nonzero_warnv_p): Likewise.
	(split_tree): Likewise.
	(fold_binary_loc): Likewise.
	(fold_comparison): Likewise.
	(tree_expr_nonzero_warnv_p): Likewise.
	(fold_single_bit_test): Likewise.
	(fold_unary_loc): Likewise.
	(reorder_operands_p): Likewise.
	(tree_swap_operands_p): Likewise.
	(negate_mathfn_p): Likewise.
	(const_binop): Likewise.
	(fold_build_call_array_loc): Likewise.
	* function.c (aggregate_value_p): Likewise.
	(rest_of_handle_check_leaf_regs): Likewise.
	(use_register_for_decl): Likewise.
	(assign_parm_adjust_stack_rtl): Likewise.
	(thread_prologue_and_epilogue_insns): Likewise.
	(combine_temp_slots): Likewise.
	(used_types_insert): Likewise.
	(number_blocks): Likewise.
	(gimplify_parameters): Likewise.
	(expand_function_start): Likewise.
	(expand_function_end): Likewise.
	(allocate_struct_function): Likewise.
	(prepare_function_start): Likewise.
	(rest_of_handle_thread_prologue_and_epilogue): Likewise.
	* fwprop.c (gate_fwprop): Likewise.
	* gcc.c (sanitize_spec_function): Likewise.
	(init_spec): Likewise.
	(set_spec): Likewise.
	(load_specs): Likewise.
	(read_specs): Likewise.
	(delete_if_ordinary): Likewise.
	(xputenv): Likewise.
	(display_help): Likewise.
	(driver_handle_option): Likewise.
	(execute): Likewise.
	(process_command): Likewise.
	(do_spec_1): Likewise.
	(main): Likewise.
	* gcse.c (gate_rtl_pre): Likewise.
	(gate_rtl_hoist): Likewise.
	(simple_mem): Likewise.
	(hash_scan_set): Likewise.
	(should_hoist_expr_to_dom): Likewise.
	(hoist_code): Likewise.
	(one_code_hoisting_pass): Likewise.
	(oprs_unchanged_p): Likewise.
	(record_last_mem_set_info): Likewise.
	(one_pre_gcse_pass): Likewise.
	* ggc-page.c (ggc_collect): Likewise.
	* gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise.
	(fold_gimple_assign): Likewise.
	(gimple_fold_call): Likewise.
	(gimple_get_virt_method_for_vtable): Likewise.
	* gimple-low.c (lower_gimple_return): Likewise.
	(lower_stmt): Likewise.
	* gimple-ssa-isolate-paths.c (find_implicit_erroneous_behaviour):
	Likewise.
	(find_explicit_erroneous_behaviour): Likewise.
	(gate_isolate_erroneous_paths): Likewise.
	* gimple-ssa-strength-reduction.c (find_basis_for_candidate):
	Likewise.
	(alloc_cand_and_find_basis): Likewise.
	(gate_strength_reduction): Likewise.
	* gimple.c (infer_nonnull_range): Likewise.
	* gimplify.c (lookup_tmp_var): Likewise.
	(gimplify_cond_expr): Likewise.
	(gimplify_function_tree): Likewise.
	(gimplify_body): Likewise.
	(gimplify_bind_expr): Likewise.
	(gimplify_target_expr): Likewise.
	(flag_instrument_functions_exclude_p): Likewise.
	(gimplify_init_constructor): Likewise.
	(gimplify_decl_expr): Likewise.
	* graphite-clast-to-gimple.c (translate_clast_for_loop): Likewise.
	(init_cloog_input_file): Likewise.
	* graphite-poly.c (apply_poly_transforms): Likewise.
	* graphite-sese-to-poly.c (is_reduction_operation_p): Likewise.
	(build_poly_scop): Likewise.
	(dump_alias_graphs): Likewise.
	* graphite.c (gate_graphite_transforms): Likewise.
	* haifa-sched.c (sched_init): Likewise.
	(schedule_insn): Likewise.
	(early_queue_to_ready): Likewise.
	(ok_for_early_queue_removal): Likewise.
	(rank_for_schedule): Likewise.
	(sched_create_recovery_edges): Likewise.
	(setup_sched_dump): Likewise.
	* ifcvt.c (if_convert): Likewise.
	(gate_handle_if_conversion): Likewise.
	(dead_or_predicable): Likewise.
	(gate_handle_if_after_reload): Likewise.
	(rest_of_handle_if_conversion): Likewise.
	(gate_handle_if_after_combine): Likewise.
	* incpath.c (add_standard_paths): Likewise.
	* init-regs.c (initialize_uninitialized_regs): Likewise.
	(gate_initialize_regs): Likewise.
	* internal-fn.c (expand_BUILTIN_EXPECT): Likewise.
	* ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
	(good_cloning_opportunity_p): Likewise.
	(ipa_value_from_jfunc): Likewise.
	(cgraph_gate_cp): Likewise.
	(ipa_get_indirect_edge_target_1): Likewise.
	(ipcp_propagate_stage): Likewise.
	* ipa-devirt.c (maybe_record_node): Likewise.
	(record_target_from_binfo): Likewise.
	(possible_polymorphic_call_targets): Likewise.
	(gate_ipa_devirt): Likewise.
	(hash_type_name): Likewise.
	(add_type_duplicate): Likewise.
	(dump_possible_polymorphic_call_targets): Likewise.
	* ipa-inline-analysis.c (eliminated_by_inlining_prob): Likewise.
	(estimate_function_body_sizes): Likewise.
	(compute_inline_parameters): Likewise.
	(inline_analyze_function): Likewise.
	(inline_read_summary): Likewise.
	(inline_write_summary): Likewise.
	(estimate_edge_devirt_benefit): Likewise.
	(inline_generate_summary): Likewise.
	* ipa-inline-transform.c (inline_call): Likewise.
	(inline_transform): Likewise.
	* ipa-inline.c (want_early_inline_function_p): Likewise.
	(sanitize_attrs_match_for_inline_p): Likewise.
	(want_inline_small_function_p): Likewise.
	(early_inline_small_functions): Likewise.
	(edge_badness): Likewise.
	(early_inliner): Likewise.
	(inline_small_functions): Likewise.
	(ipa_inline): Likewise.
	* ipa-profile.c (ipa_propagate_frequency_1): Likewise.
	(ipa_propagate_frequency): Likewise.
	(gate_ipa_profile): Likewise.
	(ipa_profile): Likewise.
	* ipa-prop.c (ipa_free_all_structures_after_ipa_cp): Likewise.
	(update_indirect_edges_after_inlining): Likewise.
	(stmt_may_be_vtbl_ptr_store): Likewise.
	(ipa_get_vector_of_formal_parms): Likewise.
	(ipa_set_jf_known_type): Likewise.
	(ipa_set_ancestor_jf): Likewise.
	(detect_type_change): Likewise.
	(detect_type_change_ssa): Likewise.
	(compute_known_type_jump_func): Likewise.
	(ipa_analyze_virtual_call_uses): Likewise.
	(try_make_edge_direct_virtual_call): Likewise.
	(ipa_compute_jump_functions): Likewise.
	* ipa-prop.h (ipa_get_param): Likewise.
	* ipa-pure-const.c (gate_warn_function_noreturn): Likewise.
	(gate_pure_const): Likewise.
	(check_call): Likewise.
	(local_pure_const): Likewise.
	* ipa-reference.c (gate_reference): Likewise.
	* ipa-split.c (gate_split_functions): Likewise.
	(gate_feedback_split_functions): Likewise.
	(execute_split_functions): Likewise.
	* ipa.c (comdat_can_be_unshared_p_1): Likewise.
	(whole_program_function_and_variable_visibility): Likewise.
	(gate_whole_program_function_and_variable_visibility): Likewise.
	(process_references): Likewise.
	(local_function_and_variable_visibility): Likewise.
	(symtab_remove_unreachable_nodes): Likewise.
	(cgraph_externally_visible_p): Likewise.
	(varpool_externally_visible_p): Likewise.
	(function_and_variable_visibility): Likewise.
	(build_cdtor_fns): Likewise.
	(gate_ipa_cdtor_merge): Likewise.
	* ira-build.c (create_allocnos): Likewise.
	(propagate_allocno_info): Likewise.
	* ira-color.c (color_pass): Likewise.
	(color_allocnos): Likewise.
	(ira_sort_regnos_for_alter_reg): Likewise.
	(ira_reuse_stack_slot): Likewise.
	(allocno_reload_assign): Likewise.
	* ira-conflicts.c (ira_build_conflicts): Likewise.
	* ira-costs.c (record_reg_classes): Likewise.
	(setup_allocno_class_and_costs): Likewise.
	(print_allocno_costs): Likewise.
	(find_costs_and_classes): Likewise.
	(ira_set_pseudo_classes): Likewise.
	* ira-int.h (ira_assert): Likewise.
	* ira.c (setup_reg_equiv): Likewise.
	(decrease_live_ranges_number): Likewise.
	(update_equiv_regs): Likewise.
	(split_live_ranges_for_shrink_wrap): Likewise.
	(do_reload): Likewise.
	(ira_init): Likewise.
	(ira_setup_eliminable_regset): Likewise.
	(setup_reg_renumber): Likewise.
	(ira): Likewise.
	* langhooks.c (lhd_post_options): Likewise.
	* loop-init.c (gate_rtl_doloop): Likewise.
	(gate_rtl_unroll_and_peel_loops): Likewise.
	(rtl_unroll_and_peel_loops): Likewise.
	(gate_rtl_move_loop_invariants): Likewise.
	(gate_handle_loop2): Likewise.
	(gate_rtl_unswitch): Likewise.
	* loop-invariant.c (calculate_loop_reg_pressure): Likewise.
	(get_inv_cost): Likewise.
	(gain_for_invariant): Likewise.
	(best_gain_for_invariant): Likewise.
	(find_invariants_to_move): Likewise.
	(move_invariants): Likewise.
	(move_loop_invariants): Likewise.
	* loop-iv.c (get_simple_loop_desc): Likewise.
	* loop-unroll.c (peel_loop_completely): Likewise.
	(peel_loop_simple): Likewise.
	(analyze_insn_to_expand_var): Likewise.
	(unroll_loop_constant_iterations): Likewise.
	(unroll_loop_runtime_iterations): Likewise.
	(unroll_loop_stupid): Likewise.
	(analyze_insns_in_loop): Likewise.
	* lower-subreg.c (gate_handle_lower_subreg): Likewise.
	* lra-constraints.c (general_constant_p): Likewise.
	* lra-spills.c (assign_stack_slot_num_and_sort_pseudos): Likewise.
	* lra.c (has_nonexceptional_receiver): Likewise.
	* lto-cgraph.c (input_profile_summary): Likewise.
	(merge_profile_summaries): Likewise.
	(input_symtab): Likewise.
	(output_profile_summary): Likewise.
	(output_symtab): Likewise.
	(compute_ltrans_boundary): Likewise.
	* lto-compress.c (lto_normalized_zlib_level): Likewise.
	* lto-section-in.c (lto_get_section_data): Likewise.
	(lto_free_section_data): Likewise.
	* lto-section-out.c (lto_destroy_simple_output_block): Likewise.
	* lto-streamer-in.c (lto_init_eh): Likewise.
	(input_function): Likewise.
	* lto-streamer-out.c (create_output_block): Likewise.
	(DFS_write_tree): Likewise.
	(produce_asm): Likewise.
	(lto_output_toplevel_asms): Likewise.
	(copy_function): Likewise.
	(lto_output): Likewise.
	(produce_asm_for_decls): Likewise.
	(hash_tree): Likewise.
	* lto-streamer.c (print_lto_report): Likewise.
	(gate_lto_out): Likewise.
	* mode-switching.c (create_pre_exit): Likewise.
	* modulo-sched.c (gate_handle_sms): Likewise.
	(generate_prolog_epilog): Likewise.
	(sms_schedule): Likewise.
	* omp-low.c (scan_omp_parallel): Likewise.
	(scan_omp_task): Likewise.
	(maybe_catch_exception): Likewise.
	(optimize_omp_library_calls): Likewise.
	(expand_omp_taskreg): Likewise.
	(expand_omp_target): Likewise.
	(expand_omp_simd): Likewise.
	(gate_expand_omp): Likewise.
	(execute_lower_omp): Likewise.
	(diagnose_sb_0): Likewise.
	(gate_diagnose_omp_blocks): Likewise.
	(simd_clone_clauses_extract): Likewise.
	(ipa_omp_simd_clone): Likewise.
	(omp_max_vf): Likewise.
	* optabs.c (expand_abs_nojump): Likewise.
	(expand_abs): Likewise.
	(avoid_expensive_constant): Likewise.
	(prepare_cmp_insn): Likewise.
	(init_sync_libfuncs): Likewise.
	* opts-global.c (handle_common_deferred_options): Likewise.
	* opts.c (common_handle_option): Likewise.
	* passes.c (gate_all_early_optimizations): Likewise.
	(execute_function_todo): Likewise.
	(execute_one_ipa_transform_pass): Likewise.
	(ipa_write_summaries): Likewise.
	(execute_one_pass): Likewise.
	(finish_optimization_passes): Likewise.
	(do_per_function): Likewise.
	(ipa_write_summaries_1): Likewise.
	(ipa_write_optimization_summaries): Likewise.
	(create_pass_tab): Likewise.
	(rest_of_decl_compilation): Likewise.
	(gate_all_early_local_passes): Likewise.
	(gate_rest_of_compilation): Likewise.
	(gate_all_optimizations): Likewise.
	(gate_all_optimizations_g): Likewise.
	* plugin.c (default_plugin_dir_name): Likewise.
	* postreload-gcse.c (gate_handle_gcse2): Likewise.
	(hash_scan_set): Likewise.
	(eliminate_partially_redundant_load): Likewise.
	* postreload.c (gate_handle_postreload): Likewise.
	(reload_cse_regs): Likewise.
	* predict.c (maybe_hot_frequency_p): Likewise.
	(probably_never_executed): Likewise.
	(cgraph_optimize_for_size_p): Likewise.
	(optimize_function_for_size_p): Likewise.
	(cgraph_maybe_hot_edge_p): Likewise.
	(predict_insn): Likewise.
	(gimple_predict_edge): Likewise.
	(gate_estimate_probability): Likewise.
	(drop_profile): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* print-tree.c (dump_addr): Likewise.
	* profile.c (branch_prob): Likewise.
	(read_profile_edge_counts): Likewise.
	(compute_branch_probabilities): Likewise.
	* real.h (HONOR_NANS): Likewise.
	(HONOR_SNANS): Likewise.
	(HONOR_SIGNED_ZEROS): Likewise.
	(HONOR_SIGN_DEPENDENT_ROUNDING): Likewise.
	* recog.c (general_operand): Likewise.
	(immediate_operand): Likewise.
	(asm_operand_ok): Likewise.
	(rest_of_handle_split_after_reload): Likewise.
	(gate_handle_peephole2): Likewise.
	(gate_handle_split_before_regstack): Likewise.
	(gate_handle_split_before_sched2): Likewise.
	* ree.c (gate_handle_ree): Likewise.
	* reg-stack.c (get_true_reg): Likewise.
	(reg_to_stack): Likewise.
	* regcprop.c (gate_handle_cprop): Likewise.
	* regrename.c (gate_handle_regrename): Likewise.
	* regs.h (REG_N_SETS): Likewise.
	* reload.c (find_reloads): Likewise.
	(find_equiv_reg): Likewise.
	* reload1.c (init_eliminable_invariants): Likewise.
	(has_nonexceptional_receiver): Likewise.
	(emit_input_reload_insns): Likewise.
	(do_input_reload): Likewise.
	(do_output_reload): Likewise.
	(calculate_needs_all_insns): Likewise.
	(choose_reload_regs): Likewise.
	(emit_output_reload_insns): Likewise.
	(reload): Likewise.
	* reorg.c (fill_slots_from_thread): Likewise.
	(gate_handle_delay_slots): Likewise.
	* rtl.h (CONST_DOUBLE_AS_FLOAT_P): Likewise.
	* rtlanal.c (may_trap_p_1): Likewise.
	* sched-ebb.c (add_deps_for_risky_insns): Likewise.
	(schedule_ebbs): Likewise.
	* sched-rgn.c (gate_handle_sched): Likewise.
	(schedule_region): Likewise.
	(sched_rgn_init): Likewise.
	(sched_rgn_finish): Likewise.
	(rest_of_handle_live_range_shrinkage): Likewise.
	(find_rgns): Likewise.
	(gate_handle_live_range_shrinkage): Likewise.
	(find_single_block_region): Likewise.
	(gate_handle_sched2): Likewise.
	(compute_trg_info): Likewise.
	(rest_of_handle_sched): Likewise.
	(rest_of_handle_sched2): Likewise.
	(is_exception_free): Likewise.
	* sdbout.c (sdbout_begin_block): Likewise.
	* sel-sched-ir.c (init_fences): Likewise.
	(get_seqno_for_a_jump): Likewise.
	(cfg_preds_1): Likewise.
	(find_place_to_insert_bb): Likewise.
	(sel_create_basic_block): Likewise.
	(sel_split_edge): Likewise.
	(sel_find_rgns): Likewise.
	* sel-sched-ir.h (_succ_iter_cond): Likewise.
	(_eligible_successor_edge_p): Likewise.
	* sel-sched.c (sel_setup_region_sched_flags): Likewise.
	(sel_region_init): Likewise.
	* simplify-rtx.c (simplify_unary_operation_1): Likewise.
	(simplify_relational_operation_1): Likewise.
	(simplify_const_relational_operation): Likewise.
	(simplify_binary_operation_1): Likewise.
	(simplify_const_binary_operation): Likewise.
	* stmt.c (emit_case_dispatch_table): Likewise.
	(expand_switch_as_decision_tree_p): Likewise.
	(expand_sjlj_dispatch_table): Likewise.
	* stor-layout.c (layout_decl): Likewise.
	(update_alignment_for_field): Likewise.
	(place_field): Likewise.
	(finalize_record_size): Likewise.
	* store-motion.c (gate_rtl_store_motion): Likewise.
	* symtab.c (symtab_unregister_node): Likewise.
	(symtab_get_node): Likewise.
	* targhooks.c (option_affects_pch_p): Likewise.
	(default_hidden_stack_protect_fail): Likewise.
	(default_reloc_rw_mask): Likewise.
	(default_get_pch_validity): Likewise.
	(default_pch_valid_p): Likewise.
	(default_unspec_may_trap_p): Likewise.
	(default_debug_unwind_info): Likewise.
	* toplev.c (announce_function): Likewise.
	(check_global_declaration_1): Likewise.
	(finalize): Likewise.
	(output_stack_usage): Likewise.
	(lang_dependent_init): Likewise.
	(init_excess_precision): Likewise.
	(toplev_main): Likewise.
	(wrapup_global_declaration_2): Likewise.
	(init_alignments): Likewise.
	(open_auxiliary_file): Likewise.
	(do_compile): Likewise.
	(compile_file): Likewise.
	(init_asm_output): Likewise.
	(process_options): Likewise.
	* tracer.c (tail_duplicate): Likewise.
	(gate_tracer): Likewise.
	* trans-mem.c (is_tm_safe): Likewise.
	(gate_tm): Likewise.
	(gate_tm_init): Likewise.
	(gate_tm_memopt): Likewise.
	(lower_transaction): Likewise.
	* tree-call-cdce.c (gate_call_cdce): Likewise.
	* tree-cfg.c (gimple_can_merge_blocks_p): Likewise.
	(execute_warn_function_return): Likewise.
	(gate_warn_unused_result): Likewise.
	(verify_gimple_assign_single): Likewise.
	* tree-cfgcleanup.c (tree_forwarder_block_p): Likewise.
	(execute_cleanup_cfg_post_optimizing): Likewise.
	* tree-complex.c (some_nonzerop): Likewise.
	(expand_complex_multiplication): Likewise.
	(expand_complex_division): Likewise.
	* tree-data-ref.c (compute_affine_dependence): Likewise.
	* tree-eh.c (decide_copy_try_finally): Likewise.
	(execute_cleanup_eh_1): Likewise.
	(operation_could_trap_helper_p): Likewise.
	(lower_catch): Likewise.
	(lower_eh_filter): Likewise.
	(lower_eh_must_not_throw): Likewise.
	(lower_cleanup): Likewise.
	(stmt_could_throw_p): Likewise.
	(tree_could_throw_p): Likewise.
	(gate_refactor_eh): Likewise.
	(gate_lower_resx): Likewise.
	(operation_could_trap_p): Likewise.
	(stmt_could_throw_1_p): Likewise.
	* tree-if-conv.c (if_convertible_phi_p): Likewise.
	(if_convertible_gimple_assign_stmt_p): Likewise.
	(if_convertible_loop_p_1): Likewise.
	(if_convertible_loop_p): Likewise.
	(insert_gimplified_predicates): Likewise.
	(combine_blocks): Likewise.
	(ifcvt_can_use_mask_load_store): Likewise.
	(tree_if_conversion): Likewise.
	(main_tree_if_conversion): Likewise.
	(gate_tree_if_conversion): Likewise.
	* tree-inline.c (setup_one_parameter): Likewise.
	(estimate_move_cost): Likewise.
	(tree_inlinable_function_p): Likewise.
	(expand_call_inline): Likewise.
	(remap_decls): Likewise.
	* tree-loop-distribution.c (distribute_loop): Likewise.
	(classify_partition): Likewise.
	(gate_tree_loop_distribution): Likewise.
	* tree-nested.c (get_nonlocal_debug_decl): Likewise.
	(convert_nonlocal_reference_stmt): Likewise.
	(finalize_nesting_tree_1): Likewise.
	* tree-nrv.c (gate_pass_return_slot): Likewise.
	* tree-outof-ssa.c (rewrite_out_of_ssa): Likewise.
	(ssa_is_replaceable_p): Likewise.
	* tree-parloops.c (parallelize_loops): Likewise.
	(gate_tree_parallelize_loops): Likewise.
	* tree-predcom.c (gate_tree_predictive_commoning): Likewise.
	(may_reassociate_p): Likewise.
	* tree-profile.c (init_ic_make_global_vars): Likewise.
	(gimple_init_edge_profiler): Likewise.
	(gimple_gen_ic_func_profiler): Likewise.
	(gate_tree_profile_ipa): Likewise.
	(tree_profiling): Likewise.
	* tree-sra.c (ipa_early_sra_gate): Likewise.
	(gate_intra_sra): Likewise.
	* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Likewise.
	(indirect_refs_may_alias_p): Likewise.
	(refs_may_alias_p_1): Likewise.
	(call_may_clobber_ref_p_1): Likewise.
	* tree-ssa-ccp.c (get_default_value): Likewise.
	(evaluate_stmt): Likewise.
	(gate_ccp): Likewise.
	* tree-ssa-coalesce.c (coalesce_ssa_name): Likewise.
	* tree-ssa-copy.c (gate_copy_prop): Likewise.
	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Likewise.
	(gate_copyrename): Likewise.
	* tree-ssa-dce.c (tree_ssa_cd_dce): Likewise.
	(gate_dce): Likewise.
	* tree-ssa-dom.c (gate_dominator): Likewise.
	* tree-ssa-dse.c (gate_dse): Likewise.
	* tree-ssa-forwprop.c (gate_forwprop): Likewise.
	* tree-ssa-live.c (remove_unused_locals): Likewise.
	(remove_unused_scope_block_p): Likewise.
	* tree-ssa-loop-ch.c (copy_loop_headers): Likewise.
	(gate_ch): Likewise.
	* tree-ssa-loop-im.c (mem_refs_may_alias_p): Likewise.
	(tree_ssa_lim_initialize): Likewise.
	(gate_tree_ssa_loop_im): Likewise.
	(rewrite_bittest): Likewise.
	(movement_possibility): Likewise.
	* tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Likewise.
	(gate_tree_ssa_loop_ivcanon): Likewise.
	(tree_complete_unroll_inner): Likewise.
	(gate_tree_complete_unroll_inner): Likewise.
	(tree_complete_unroll): Likewise.
	* tree-ssa-loop-niter.c (do_warn_aggressive_loop_optimizations):
	Likewise.
	(find_loop_niter_by_eval): Likewise.
	(estimate_numbers_of_iterations_loop): Likewise.
	(infer_loop_bounds_from_pointer_arith): Likewise.
	(number_of_iterations_exit): Likewise.
	(finite_loop_p): Likewise.
	* tree-ssa-loop-prefetch.c (gate_tree_ssa_loop_prefetch): Likewise.
	* tree-ssa-loop-unswitch.c (gate_tree_ssa_loop_unswitch): Likewise.
	* tree-ssa-loop.c (gate_tree_loop): Likewise.
	(gate_check_data_deps): Likewise.
	(gate_tree_loop_vectorize): Likewise.
	(gate_scev_const_prop): Likewise.
	(gate_tree_ssa_loop_ivopts): Likewise.
	* tree-ssa-math-opts.c (convert_mult_to_fma): Likewise.
	(gate_cse_sincos): Likewise.
	(insert_reciprocals): Likewise.
	(gate_optimize_bswap): Likewise.
	(gate_optimize_widening_mul): Likewise.
	(compute_merit): Likewise.
	(gimple_expand_builtin_pow): Likewise.
	(gimple_expand_builtin_cabs): Likewise.
	(gate_cse_reciprocals): Likewise.
	* tree-ssa-operands.c (append_vdef): Likewise.
	(append_vuse): Likewise.
	* tree-ssa-phiopt.c (gate_hoist_loads): Likewise.
	(tree_ssa_phiopt_worker): Likewise.
	(gate_cselim): Likewise.
	* tree-ssa-phiprop.c (gate_phiprop): Likewise.
	* tree-ssa-pre.c (gate_pre): Likewise.
	(do_pre): Likewise.
	(inhibit_phi_insertion): Likewise.
	(gate_fre): Likewise.
	* tree-ssa-reassoc.c (acceptable_pow_call): Likewise.
	(reassociate_bb): Likewise.
	(gate_tree_ssa_reassoc): Likewise.
	(can_reassociate_p): Likewise.
	* tree-ssa-sccvn.c (vn_nary_may_trap): Likewise.
	* tree-ssa-sink.c (gate_sink): Likewise.
	* tree-ssa-strlen.c (gate_strlen): Likewise.
	* tree-ssa-structalias.c (gate_tree_pta): Likewise.
	(get_constraint_for_1): Likewise.
	(find_func_aliases_for_builtin_call): Likewise.
	(gate_ipa_pta): Likewise.
	* tree-ssa-tail-merge.c (tail_merge_optimize): Likewise.
	* tree-ssa-ter.c (ter_is_replaceable_p): Likewise.
	* tree-ssa-uncprop.c (gate_uncprop): Likewise.
	* tree-ssa-uninit.c (execute_early_warn_uninitialized): Likewise.
	(gate_warn_uninitialized): Likewise.
	* tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
	* tree-switch-conversion.c (check_final_bb): Likewise.
	(switchconv_gate): Likewise.
	* tree-tailcall.c (gate_tail_calls): Likewise.
	(process_assignment): Likewise.
	* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
	* tree-vect-generic.c (expand_vector_operation): Likewise.
	(expand_vector_operations_1): Likewise.
	* tree-vect-loop.c (vect_is_simple_iv_evolution): Likewise.
	(vect_is_simple_reduction_1): Likewise.
	* tree-vectorizer.c (vectorize_loops): Likewise.
	(gate_increase_alignment): Likewise.
	(gate_vect_slp): Likewise.
	* tree-vectorizer.h (unlimited_cost_model): Likewise.
	* tree-vrp.c (extract_range_from_binary_expr_1): Likewise.
	(extract_range_basic): Likewise.
	(gate_vrp): Likewise.
	(vrp_evaluate_conditional): Likewise.
	(vrp_finalize): Likewise.
	(gimple_stmt_nonzero_warnv_p): Likewise.
	* tree.c (set_call_expr_flags): Likewise.
	(handle_dll_attribute): Likewise.
	(attribute_value_equal): Likewise.
	(save_debug_info_for_decl): Likewise.
	(save_debug_info_for_type): Likewise.
	(add_tree_to_fld_list): Likewise.
	(build_common_builtin_nodes): Likewise.
	(warn_deprecated_use): Likewise.
	(get_file_function_name): Likewise.
	(free_lang_data): Likewise.
	(types_same_for_odr): Likewise.
	* tree.h (TYPE_OVERFLOW_TRAPS): Likewise.
	(TYPE_UNSIGNED): Likewise.
	(TYPE_OVERFLOW_UNDEFINED): Likewise.
	(TREE_OPERAND_LENGTH): Likewise.
	* tsan.c (tsan_gate): Likewise.
	(tsan_gate_O0): Likewise.
	(instrument_expr): Likewise.
	* ubsan.c (instrument_bool_enum_load): Likewise.
	(ubsan_pass): Likewise.
	(gate_ubsan): Likewise.
	* value-prof.c (check_counter): Likewise.
	(gimple_mod_subtract_transform): Likewise.
	* var-tracking.c (unshare_variable): Likewise.
	(get_init_value): Likewise.
	(variable_union): Likewise.
	(find_src_status): Likewise.
	(compute_bb_dataflow): Likewise.
	(set_slot_part): Likewise.
	(clobber_slot_part): Likewise.
	(emit_note_insn_var_location): Likewise.
	(gate_handle_var_tracking): Likewise.
	(variable_tracking_main_1): Likewise.
	(variable_tracking_main): Likewise.
	* varasm.c (bss_initializer_p): Likewise.
	(default_select_section): Likewise.
	(notice_global_symbol): Likewise.
	(default_binds_local_p): Likewise.
	(file_end_indicate_split_stack): Likewise.
	(decl_default_tls_model): Likewise.
	(assemble_noswitch_variable): Likewise.
	(output_constant_def_contents): Likewise.
	(place_block_symbol): Likewise.
	(output_object_block): Likewise.
	(get_variable_section): Likewise.
	(use_object_blocks_p): Likewise.
	(make_decl_rtl_for_debug): Likewise.
	(output_constructor): Likewise.
	(default_function_rodata_section): Likewise.
	(mergeable_string_section): Likewise.
	(mergeable_constant_section): Likewise.
	(categorize_decl_for_section): Likewise.
	(decide_function_section): Likewise.
	(assemble_start_function): Likewise.
	(assemble_end_function): Likewise.
	(default_file_start): Likewise.
	(default_function_section): Likewise.
	(assemble_zeros): Likewise.
	(assemble_variable): Likewise.
	(maybe_output_constant_def_contents): Likewise.
	(output_constant): Likewise.
	* varpool.c (varpool_remove_initializer): Likewise.
	(varpool_analyze_node): Likewise.
	* vmsdbgout.c (write_rtnbeg): Likewise.
	(vmsdbgout_begin_prologue): Likewise.
	(vmsdbgout_end_prologue): Likewise.
	(vmsdbgout_end_function): Likewise.
	(vmsdbgout_begin_epilogue): Likewise.
	(vmsdbgout_end_epilogue): Likewise.
	(vmsdbgout_begin_block): Likewise.
	(vmsdbgout_end_block): Likewise.
	(vmsdbgout_ignore_block): Likewise.
	(vmsdbgout_begin_function): Likewise.
	(vmsdbgout_source_line): Likewise.
	(vmsdbgout_start_source_file): Likewise.
	(vmsdbgout_end_source_file): Likewise.
	(vmsdbgout_init): Likewise.
	(vmsdbgout_assembly_start): Likewise.
	(vmsdbgout_define): Likewise.
	(vmsdbgout_undef): Likewise.
	(vmsdbgout_decl): Likewise.
	(vmsdbgout_global_decl): Likewise.
	(vmsdbgout_type_decl): Likewise.
	(vmsdbgout_abstract_function): Likewise.
	(vmsdbgout_finish): Likewise.
	(write_debug_header): Likewise.
	(write_debug_addr): Likewise.
	(write_debug_data1): Likewise.
	(write_debug_data2): Likewise.
	(write_debug_data4): Likewise.
	(write_debug_data8): Likewise.
	(write_debug_delta4): Likewise.
	(write_debug_string): Likewise.
	(write_pclines): Likewise.
	* vtable-verify.c (gate_tree_vtable_verify): Likewise.
	(verify_bb_vtables): Likewise.
	* web.c (gate_handle_web): Likewise.
	* xcoffout.c (xcoffout_block): Likewise.
	(ASM_OUTPUT_LFB): Likewise.
	(xcoffout_source_file): Likewise.

gcc/ada/

	Patch autogenerated by refactor_options.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 918f845b08a66d601574bda0a6ae87f1d42e5c06

	* gcc-interface/decl.c (elaborate_expression_1): Wrap option usage in
	GCC_OPTION macro.
	(gnat_to_gnu_entity): Likewise.
	* gcc-interface/gigi.h (create_var_decl_1): Likewise.
	* gcc-interface/trans.c (Attribute_to_gnu): Likewise.
	(Loop_Statement_to_gnu): Likewise.
	(build_return_expr): Likewise.
	(Subprogram_Body_to_gnu): Likewise.
	(Compilation_Unit_to_gnu): Likewise.
	(gigi): Likewise.
	(gnat_to_gnu): Likewise.
	(Pragma_to_gnu): Likewise.
	(Raise_Error_to_gnu): Likewise.
	* gcc-interface/utils.c (convert_to_index_type): Likewise.
	(relate_alias_sets): Likewise.
	(create_var_decl_1): Likewise.
	* gcc-interface/utils2.c (build_unary_op): Likewise.

gcc/c-family/

	Patch autogenerated by refactor_options.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 918f845b08a66d601574bda0a6ae87f1d42e5c06

	* c-ada-spec.c (get_ada_package): Wrap option usage in GCC_OPTION
	macro.
	* c-common.c (check_function_sentinel): Likewise.
	(decl_constant_value_for_optimization): Likewise.
	(handle_tls_model_attribute): Likewise.
	(match_case_to_enum_1): Likewise.
	(c_common_truthvalue_conversion): Likewise.
	(warn_about_parentheses): Likewise.
	(vector_types_convertible_p): Likewise.
	(warnings_for_convert_and_check): Likewise.
	(complete_array_type): Likewise.
	(pointer_int_sum): Likewise.
	(c_sizeof_or_alignof_type): Likewise.
	(do_warn_double_promotion): Likewise.
	(check_function_arguments): Likewise.
	(c_determine_visibility): Likewise.
	(c_common_nodes_and_builtins): Likewise.
	(c_common_to_target_charset): Likewise.
	(strict_aliasing_warning): Likewise.
	(parse_optimize_options): Likewise.
	(record_locally_defined_typedef): Likewise.
	(maybe_warn_unused_local_typedefs): Likewise.
	(c_do_switch_warnings): Likewise.
	(c_cpp_error): Likewise.
	(shorten_compare): Likewise.
	(check_cxx_fundamental_alignment_constraints): Likewise.
	(conversion_warning): Likewise.
	(c_define_builtins): Likewise.
	(fix_string_type): Likewise.
	(constant_expression_warning): Likewise.
	(def_builtin_1): Likewise.
	* c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Likewise.
	(cpp_iec_559_value): Likewise.
	(cpp_iec_559_complex_value): Likewise.
	(c_cpp_builtins): Likewise.
	* c-format.c (maybe_read_dollar_number): Likewise.
	(check_format_types): Likewise.
	(decode_format_attr): Likewise.
	(check_format_info_main): Likewise.
	(check_function_format): Likewise.
	(check_format_info): Likewise.
	* c-gimplify.c (c_gimplify_expr): Likewise.
	* c-lex.c (cb_ident): Likewise.
	(cb_def_pragma): Likewise.
	(update_header_times): Likewise.
	(interpret_float): Likewise.
	(init_c_lex): Likewise.
	* c-opts.c (c_finish_options): Likewise.
	(cb_file_change): Likewise.
	(c_common_init): Likewise.
	(push_command_line_include): Likewise.
	(sanitize_cpp_opts): Likewise.
	(c_common_post_options): Likewise.
	(set_std_c89): Likewise.
	(set_std_c99): Likewise.
	(set_std_c11): Likewise.
	(set_std_cxx98): Likewise.
	(set_std_cxx11): Likewise.
	(set_std_cxx1y): Likewise.
	(c_common_handle_option): Likewise.
	* c-pch.c (or): Likewise.
	(pch_init): Likewise.
	(c_common_valid_pch): Likewise.
	* c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
	(c_register_pragma_1): Likewise.
	(handle_pragma_pack): Likewise.
	(push_visibility): Likewise.
	(pop_visibility): Likewise.
	(init_pragma): Likewise.
	* cilk.c (check_outlined_calls): Likewise.

gcc/c/

	Patch autogenerated by refactor_options.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 918f845b08a66d601574bda0a6ae87f1d42e5c06

	* c-aux-info.c (gen_aux_info_record): Wrap option usage in GCC_OPTION
	macro.
	* c-decl.c (implicit_decl_warning): Likewise.
	(c_register_addr_space): Likewise.
	(mark_forward_parm_decls): Likewise.
	(warn_variable_length_array): Likewise.
	(finish_function): Likewise.
	(store_parm_decls): Likewise.
	(c_pop_function_context): Likewise.
	(is_duplicate_field): Likewise.
	(detect_field_duplicates_hash): Likewise.
	(detect_field_duplicates): Likewise.
	(pop_scope): Likewise.
	(merge_decls): Likewise.
	(start_function): Likewise.
	(decl_jump_unsafe): Likewise.
	(pushtag): Likewise.
	(finish_decl): Likewise.
	(check_compound_literal_type): Likewise.
	(parser_xref_tag): Likewise.
	(start_struct): Likewise.
	(grokfield): Likewise.
	(finish_struct): Likewise.
	(start_enum): Likewise.
	(finish_enum): Likewise.
	(declspecs_add_type): Likewise.
	(warn_if_shadowing): Likewise.
	(c_write_global_declarations): Likewise.
	(diagnose_mismatched_decls): Likewise.
	(start_decl): Likewise.
	(grokdeclarator): Likewise.
	* c-parser.c (c_parser_transaction): Likewise.
	(c_parser_transaction_expression): Likewise.
	(c_parser_transaction_cancel): Likewise.
	(c_parser_enum_specifier): Likewise.
	(c_parser_struct_declaration): Likewise.
	(c_parser_compound_statement_nostart): Likewise.
	(c_parser_asm_string_literal): Likewise.
	(c_parser_declspecs): Likewise.
	(c_parser_omp_for): Likewise.
	(c_parser_omp_parallel): Likewise.
	(c_parser_omp_distribute): Likewise.
	(c_parser_omp_teams): Likewise.
	(c_parser_omp_target): Likewise.
	(c_parser_omp_declare): Likewise.
	(c_parse_file): Likewise.
	(c_parser_parms_list_declarator): Likewise.
	(c_parser_condition): Likewise.
	(c_parse_init): Likewise.
	(c_parser_declaration_or_fndef): Likewise.
	(c_parser_direct_declarator_inner): Likewise.
	(is_cilkplus_vector_p): Likewise.
	(c_parser_attributes): Likewise.
	(c_parser_compound_statement): Likewise.
	(c_parser_statement_after_labels): Likewise.
	(c_parser_if_statement): Likewise.
	(c_parser_switch_statement): Likewise.
	(c_parser_while_statement): Likewise.
	(c_parser_do_statement): Likewise.
	(c_parser_for_statement): Likewise.
	(c_parser_unary_expression): Likewise.
	(c_parser_postfix_expression): Likewise.
	(c_parser_postfix_expression_after_primary): Likewise.
	(c_parser_omp_clause_name): Likewise.
	(c_finish_omp_declare_simd): Likewise.
	(c_parser_cilk_verify_simd): Likewise.
	(disable_extension_diagnostics): Likewise.
	(restore_extension_diagnostics): Likewise.
	* c-typeck.c (build_indirect_ref): Likewise.
	(build_atomic_assign): Likewise.
	(pop_init_level): Likewise.
	(maybe_warn_string_init): Likewise.
	(start_init): Likewise.
	(build_c_cast): Likewise.
	(c_finish_stmt_expr): Likewise.
	(lookup_field): Likewise.
	(add_pending_init): Likewise.
	(c_start_case): Likewise.
	(c_process_expr_stmt): Likewise.
	(comp_target_types): Likewise.
	(array_to_pointer_conversion): Likewise.
	(build_external_ref): Likewise.
	(build_unary_op): Likewise.
	(build_conditional_expr): Likewise.
	(c_cast_expr): Likewise.
	(convert_for_assignment): Likewise.
	(digest_init): Likewise.
	(output_init_element): Likewise.
	(c_build_va_arg): Likewise.
	(build_array_ref): Likewise.
	(build_function_call_vec): Likewise.
	(build_compound_expr): Likewise.
	(c_finish_return): Likewise.
	(c_finish_if_stmt): Likewise.
	(c_finish_loop): Likewise.
	(build_binary_op): Likewise.
	(parser_build_binary_op): Likewise.
	(build_modify_expr): Likewise.
	(convert_arguments): Likewise.
	(push_init_level): Likewise.

gcc/cp/

	Patch autogenerated by refactor_options.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 918f845b08a66d601574bda0a6ae87f1d42e5c06

	* call.c (set_up_extended_ref_temp): Wrap option usage in GCC_OPTION
	macro.
	(build_new_function_call): Likewise.
	(build_user_type_conversion_1): Likewise.
	(perform_overload_resolution): Likewise.
	(build_op_call_1): Likewise.
	(build_conditional_expr_1): Likewise.
	(build_new_method_call_1): Likewise.
	(build_operator_new_call): Likewise.
	(op_error): Likewise.
	(convert_for_arg_passing): Likewise.
	(convert_arg_to_ellipsis): Likewise.
	(joust): Likewise.
	(build_over_call): Likewise.
	(magic_varargs_p): Likewise.
	(build_cxx_call): Likewise.
	(build_new_op_1): Likewise.
	* class.c (check_field_decls): Likewise.
	(layout_virtual_bases): Likewise.
	(layout_class_type): Likewise.
	(warn_about_ambiguous_bases): Likewise.
	(resolve_address_of_overloaded_function): Likewise.
	(instantiate_type): Likewise.
	(check_bases): Likewise.
	(set_method_tm_attributes): Likewise.
	(note_name_declared_in_class): Likewise.
	(finish_struct_1): Likewise.
	(build_rtti_vtbl_entries): Likewise.
	(maybe_warn_about_overly_private_class): Likewise.
	(check_bases_and_members): Likewise.
	(layout_empty_base): Likewise.
	* cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
	* cp-gimplify.c (gimplify_expr_stmt): Likewise.
	(cp_genericize): Likewise.
	* cvt.c (cp_convert_to_pointer): Likewise.
	(convert_to_void): Likewise.
	* decl.c (get_atexit_fn_ptr_type): Likewise.
	(get_atexit_node): Likewise.
	(start_cleanup_fn): Likewise.
	(register_dtor_fn): Likewise.
	(duplicate_decls): Likewise.
	(push_cp_library_fn): Likewise.
	(maybe_deduce_size_from_array_init): Likewise.
	(check_initializer): Likewise.
	(cp_complete_array_type_or_error): Likewise.
	(create_array_type_for_decl): Likewise.
	(finish_enum_value_list): Likewise.
	(maybe_commonize_var): Likewise.
	(check_goto): Likewise.
	(check_redeclaration_exception_specification): Likewise.
	(compute_array_index_type): Likewise.
	(grok_op_properties): Likewise.
	(cxx_init_decl_processing): Likewise.
	(check_default_argument): Likewise.
	(use_eh_spec_block): Likewise.
	(expand_static_init): Likewise.
	(start_preparsed_function): Likewise.
	(grokdeclarator): Likewise.
	(finish_function): Likewise.
	(grokfndecl): Likewise.
	(poplevel): Likewise.
	(check_tag_decl): Likewise.
	* decl2.c (possibly_inlined_p): Likewise.
	(comdat_linkage): Likewise.
	(maybe_make_one_only): Likewise.
	(import_export_class): Likewise.
	(decl_needed_p): Likewise.
	(is_late_template_attribute): Likewise.
	(one_static_initialization_or_destruction): Likewise.
	(do_static_initialization_or_destruction): Likewise.
	(get_tls_init_fn): Likewise.
	(determine_visibility): Likewise.
	(import_export_decl): Likewise.
	(maybe_emit_vtables): Likewise.
	(cp_write_global_declarations): Likewise.
	* error.c (print_instantiation_partial_context): Likewise.
	(dump_expr): Likewise.
	(get_non_default_template_args_count): Likewise.
	(dump_type): Likewise.
	(dump_aggr_type): Likewise.
	(dump_function_decl): Likewise.
	* except.c (type_noexcept_p): Likewise.
	(do_begin_catch): Likewise.
	(do_end_catch): Likewise.
	(do_allocate_exception): Likewise.
	(build_throw): Likewise.
	(expand_start_catch_block): Likewise.
	(build_must_not_throw_expr): Likewise.
	(doing_eh): Likewise.
	(expr_noexcept_p): Likewise.
	* friend.c (do_friend): Likewise.
	* init.c (emit_mem_initializers): Likewise.
	(build_offset_ref): Likewise.
	(perform_member_init): Likewise.
	(build_vec_init): Likewise.
	(build_delete): Likewise.
	(sort_mem_initializers): Likewise.
	(build_new_1): Likewise.
	* lex.c (init_reswords): Likewise.
	(handle_pragma_interface): Likewise.
	(handle_pragma_implementation): Likewise.
	(in_main_input_context): Likewise.
	(unqualified_fn_lookup_error): Likewise.
	* mangle.c (finish_mangling_internal): Likewise.
	(mangle_decl): Likewise.
	* method.c (lazily_declare_fn): Likewise.
	(make_alias_for_thunk): Likewise.
	(use_thunk): Likewise.
	* name-lookup.c (pushdecl_maybe_friend_1): Likewise.
	(push_overloaded_decl_1): Likewise.
	(check_for_out_of_scope_variable): Likewise.
	* optimize.c (maybe_thunk_body): Likewise.
	* parser.c (cp_lexer_get_preprocessor_token): Likewise.
	(cp_parser_binary_expression): Likewise.
	(cp_parser_transaction_expression): Likewise.
	(cp_parser_transaction_cancel): Likewise.
	(cp_parser_primary_expression): Likewise.
	(cp_parser_unary_expression): Likewise.
	(cp_parser_declaration): Likewise.
	(cp_parser_block_declaration): Likewise.
	(cp_parser_member_declaration): Likewise.
	(cp_parser_extension_opt): Likewise.
	(cp_parser_optional_template_keyword): Likewise.
	(cp_parser_cast_expression): Likewise.
	(cp_parser_class_specifier_1): Likewise.
	(cp_parser_omp_for): Likewise.
	(cp_parser_omp_parallel): Likewise.
	(cp_parser_omp_distribute): Likewise.
	(cp_parser_omp_teams): Likewise.
	(cp_parser_omp_target): Likewise.
	(cp_parser_omp_declare): Likewise.
	(c_parse_file): Likewise.
	(cp_parser_postfix_expression): Likewise.
	(cp_parser_postfix_open_square_expression): Likewise.
	(cp_parser_direct_declarator): Likewise.
	(is_cilkplus_vector_p): Likewise.
	(cp_parser_omp_clause_name): Likewise.
	(cp_parser_omp_all_clauses): Likewise.
	(cp_parser_template_id): Likewise.
	(cp_parser_parameter_declaration): Likewise.
	* pt.c (tsubst): Likewise.
	(mark_decl_instantiated): Likewise.
	(convert_template_argument): Likewise.
	(unify): Likewise.
	(tsubst_copy_and_build): Likewise.
	(apply_late_template_attributes): Likewise.
	* repo.c (init_repo): Likewise.
	(finish_repo): Likewise.
	(get_base_filename): Likewise.
	* rtti.c (emit_support_tinfos): Likewise.
	(typeid_ok_p): Likewise.
	(build_dynamic_cast_1): Likewise.
	* search.c (maybe_suppress_debug_info): Likewise.
	* semantics.c (begin_transaction_stmt): Likewise.
	(finish_decltype_type): Likewise.
	(push_cx_call_context): Likewise.
	(cxx_eval_call_expression): Likewise.
	(begin_class_definition): Likewise.
	(finish_call_expr): Likewise.
	(maybe_convert_cond): Likewise.
	(finish_expr_stmt): Likewise.
	(finish_return_stmt): Likewise.
	(finish_for_expr): Likewise.
	(finish_switch_cond): Likewise.
	(begin_for_scope): Likewise.
	(begin_for_stmt): Likewise.
	(finish_for_stmt): Likewise.
	(begin_range_for_stmt): Likewise.
	(verify_constant): Likewise.
	(cxx_eval_constant_expression): Likewise.
	(expand_or_defer_fn_1): Likewise.
	* typeck.c (cxx_mark_addressable): Likewise.
	(invalid_nonstatic_memfn_p): Likewise.
	(build_x_unary_op): Likewise.
	(cxx_sizeof_or_alignof_type): Likewise.
	(cp_build_indirect_ref): Likewise.
	(build_x_binary_op): Likewise.
	(build_class_member_access_expr): Likewise.
	(convert_member_func_to_ptr): Likewise.
	(cp_build_function_call_vec): Likewise.
	(convert_for_assignment): Likewise.
	(check_for_casting_away_constness): Likewise.
	(cp_build_binary_op): Likewise.
	(cp_build_addr_expr_1): Likewise.
	(maybe_warn_about_useless_cast): Likewise.
	(cp_build_array_ref): Likewise.
	(cp_build_compound_expr): Likewise.
	(cp_build_modify_expr): Likewise.
	(check_return_expr): Likewise.
	(build_reinterpret_cast_1): Likewise.
	* typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
	(check_narrowing): Likewise.
	* vtable-class-hierarchy.c (get_log_file_name): Likewise.
	(vtv_register_class_hierarchy_information): Likewise.
	(vtv_generate_init_routine): Likewise.
	(vtv_insert_single_class_info): Likewise.
	(vtv_save_class_info): Likewise.
	(vtv_build_vtable_verify_fndecl): Likewise.
	(init_functions): Likewise.
	(insert_call_to_register_pair): Likewise.
	(register_all_pairs): Likewise.
	(output_set_info): Likewise.
	(write_out_vtv_count_data): Likewise.

gcc/fortran/

	Patch autogenerated by refactor_options.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 918f845b08a66d601574bda0a6ae87f1d42e5c06

	* arith.c (gfc_check_integer_range): Wrap option usage in GCC_OPTION
	macro.
	* cpp.c (gfc_cpp_init_0): Likewise.
	(gfc_cpp_post_options): Likewise.
	* decl.c (contained_procedure): Likewise.
	* error.c (gfc_notification_std): Likewise.
	(gfc_error_now): Likewise.
	(gfc_error_check): Likewise.
	(gfc_warning): Likewise.
	(gfc_notify_std): Likewise.
	(gfc_warning_now): Likewise.
	(gfc_error): Likewise.
	* f95-lang.c (gfc_init): Likewise.
	(gfc_maybe_initialize_eh): Likewise.
	(gfc_init_builtin_functions): Likewise.
	* frontend-passes.c (optimize_comparison): Likewise.
	* io.c (next_char): Likewise.
	(check_format): Likewise.
	* options.c (gfc_handle_option): Likewise.
	(set_Wall): Likewise.
	(gfc_post_options): Likewise.
	* primary.c (next_string_char): Likewise.
	* resolve.c (resolve_types): Likewise.
	(resolve_elemental_actual): Likewise.
	(resolve_global_procedure): Likewise.
	* scanner.c (gfc_next_char_literal): Likewise.
	(load_line): Likewise.
	(gfc_define_undef_line): Likewise.
	(load_file): Likewise.
	* trans-decl.c (create_main_function): Likewise.
	(gfc_create_module_variable): Likewise.
	(gfc_trans_deferred_vars): Likewise.
	(gfc_generate_function_code): Likewise.
	(generate_local_decl): Likewise.
	* trans-expr.c (gfc_build_compare_string): Likewise.
	(gfc_conv_cst_int_power): Likewise.
	* trans-intrinsic.c (gfc_inline_intrinsic_function_p): Likewise.
	(gfc_conv_intrinsic_mod): Likewise.
	* trans-stmt.c (gfc_trans_character_select): Likewise.
	* trans.c (gfc_unlikely): Likewise.
	(gfc_likely): Likewise.

gcc/go/

	Patch autogenerated by refactor_options.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 918f845b08a66d601574bda0a6ae87f1d42e5c06

	* go-backend.c (go_imported_unsafe): Wrap option usage in GCC_OPTION
	macro.
	* go-lang.c (go_langhook_post_options): Likewise.
	(go_langhook_parse_file): Likewise.
	* gofrontend/expressions.cc (tree_to_expr): Likewise.
	(fold_convert_loc): Likewise.
	(if): Likewise.

gcc/java/

	Patch autogenerated by refactor_options.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 918f845b08a66d601574bda0a6ae87f1d42e5c06

	* boehm.c (get_boehm_type_descriptor): Wrap option usage in GCC_OPTION
	macro.
	(uses_jv_markobj_p): Likewise.
	* builtins.c (putObject_builtin): Likewise.
	(putVolatile_builtin): Likewise.
	(getVolatile_builtin): Likewise.
	(compareAndSwapInt_builtin): Likewise.
	(compareAndSwapLong_builtin): Likewise.
	(compareAndSwapObject_builtin): Likewise.
	(check_for_builtin): Likewise.
	* class.c (add_assume_compiled): Likewise.
	(build_utf8_ref): Likewise.
	(gen_indirect_dispatch_tables): Likewise.
	(build_static_field_ref): Likewise.
	(make_method_value): Likewise.
	(layout_class_methods): Likewise.
	(add_field): Likewise.
	(build_static_class_ref): Likewise.
	(cache_this_class_ref): Likewise.
	(build_class_ref): Likewise.
	(make_field_value): Likewise.
	(make_class_data): Likewise.
	(layout_class_method): Likewise.
	(register_class): Likewise.
	(emit_register_classes): Likewise.
	(make_local_function_alias): Likewise.
	* constants.c (build_ref_from_constant_pool): Likewise.
	* decl.c (java_init_decl_processing): Likewise.
	(force_poplevels): Likewise.
	(java_mark_class_local): Likewise.
	(parse_version): Likewise.
	* except.c (doing_eh): Likewise.
	(prepare_eh_table_type): Likewise.
	* expr.c (expand_byte_code): Likewise.
	(can_widen_reference_to): Likewise.
	(build_java_array_length_access): Likewise.
	(build_get_class): Likewise.
	(invoke_build_dtable): Likewise.
	(build_jni_stub): Likewise.
	(build_java_arrayaccess): Likewise.
	(pop_type_0): Likewise.
	(build_known_method_ref): Likewise.
	(build_invokevirtual): Likewise.
	(build_invokeinterface): Likewise.
	(expand_invoke): Likewise.
	(expand_java_field_op): Likewise.
	(cache_cpool_data_ref): Likewise.
	(java_check_reference): Likewise.
	(build_java_binop): Likewise.
	(build_field_ref): Likewise.
	(build_java_arraystore_check): Likewise.
	* java-tree.h (STATIC_CLASS_INIT_OPT_P): Likewise.
	* jcf-parse.c (jcf_parse): Likewise.
	(parse_class_file): Likewise.
	(load_class): Likewise.
	(set_source_filename): Likewise.
	(give_name_to_class): Likewise.
	(java_parse_file): Likewise.
	* jcf.h (jcf_open_exact_case): Likewise.
	* lang.c (java_post_options): Likewise.
	(java_init): Likewise.
	(java_handle_option): Likewise.
	* parse.h (SOURCE_FRONTEND_DEBUG): Likewise.
	* typeck.c (convert): Likewise.
	* verify-glue.c (vfy_is_assignable_from): Likewise.

gcc/lto/

	Patch autogenerated by refactor_options.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 918f845b08a66d601574bda0a6ae87f1d42e5c06

	* lto-lang.c (lto_handle_option): Wrap option usage in GCC_OPTION
	macro.
	(lto_write_globals): Likewise.
	(lto_post_options): Likewise.
	(lto_init): Likewise.
	(def_builtin_1): Likewise.
	* lto-partition.c (lto_balanced_map): Likewise.
	(lto_promote_cross_file_statics): Likewise.
	(node_cmp): Likewise.
	* lto-symtab.c (lto_symtab_merge_symbols): Likewise.
	(lto_symtab_resolve_replaceable_p): Likewise.
	* lto.c (lto_read_decls): Likewise.
	(read_cgraph_and_symbols): Likewise.
	(materialize_cgraph): Likewise.
	(lto_main): Likewise.
	(do_whole_program_analysis): Likewise.
	(print_lto_report_1): Likewise.
	(lto_process_name): Likewise.
	(lto_wpa_write_files): Likewise.

gcc/objc/

	Patch autogenerated by refactor_options.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 918f845b08a66d601574bda0a6ae87f1d42e5c06

	* objc-act.c (objc_finish_implementation): Wrap option usage in
	GCC_OPTION macro.
	(add_instance_variable): Likewise.
	(objc_build_ivar_assignment): Likewise.
	(objc_init): Likewise.
	(objc_build_string_object): Likewise.
	(objc_start_class_interface): Likewise.
	(objc_start_category_interface): Likewise.
	(objc_start_protocol): Likewise.
	(objc_set_visibility): Likewise.
	(objc_set_method_opt): Likewise.
	(objc_maybe_build_component_ref): Likewise.
	(objc_build_class_component_ref): Likewise.
	(objc_add_method_declaration): Likewise.
	(objc_build_keyword_decl): Likewise.
	(objc_add_synthesize_declaration): Likewise.
	(objc_add_dynamic_declaration): Likewise.
	(objc_finish_foreach_loop): Likewise.
	(objc_generate_write_barrier): Likewise.
	(objc_build_selector_expr): Likewise.
	(build_private_template): Likewise.
	(objc_maybe_warn_exceptions): Likewise.
	(objc_begin_try_stmt): Likewise.
	(synth_module_prologue): Likewise.
	(check_protocol): Likewise.
	(check_duplicates): Likewise.
	(objc_add_property_declaration): Likewise.
	(objc_write_global_declarations): Likewise.
	* objc-encoding.c (encode_pointer): Likewise.
	(encode_aggregate_within): Likewise.
	(encode_type): Likewise.
	(encode_field): Likewise.
	* objc-gnu-runtime-abi-01.c (build_objc_method_call): Likewise.
	(build_shared_structure_initializer): Likewise.
	(generate_static_references): Likewise.
	(build_gnu_selector_translation_table): Likewise.
	(objc_gnu_runtime_abi_01_init): Likewise.
	(objc_generate_v1_gnu_metadata): Likewise.
	* objc-next-runtime-abi-01.c (module): Likewise.
	(build_v1_class_template): Likewise.
	(build_v1_category_template): Likewise.
	(build_v1_protocol_template): Likewise.
	(generate_v1_protocols): Likewise.
	(build_v1_category_initializer): Likewise.
	(generate_v1_category): Likewise.
	(build_v1_shared_structure_initializer): Likewise.
	(generate_v1_class_structs): Likewise.
	(build_objc_method_call): Likewise.
	(objc_next_runtime_abi_01_init): Likewise.
	(next_runtime_abi_01_init_metadata_attributes): Likewise.
	(objc_build_exc_ptr): Likewise.
	(finish_try_stmt): Likewise.
	(next_runtime_abi_01_get_class_reference): Likewise.
	(next_runtime_abi_01_get_category_super_ref): Likewise.
	(objc_generate_v1_next_metadata): Likewise.
	* objc-next-runtime-abi-02.c
	(next_runtime_abi_02_build_objc_method_call): Likewise.
	(objc_next_runtime_abi_02_init): Likewise.
	(next_runtime_abi_02_init_metadata_attributes): Likewise.
	(next_runtime_abi_02_get_class_reference): Likewise.
	(next_runtime_abi_02_get_category_super_ref): Likewise.
	(objc_generate_v2_next_metadata): Likewise.
	* objc-runtime-shared-support.c (build_module_descriptor): Likewise.
	(build_next_selector_translation_table): Likewise.
---
 gcc/ada/gcc-interface/decl.c           |   14 +-
 gcc/ada/gcc-interface/gigi.h           |    2 +-
 gcc/ada/gcc-interface/trans.c          |   32 +-
 gcc/ada/gcc-interface/utils.c          |    6 +-
 gcc/ada/gcc-interface/utils2.c         |    2 +-
 gcc/alias.c                            |   14 +-
 gcc/asan.c                             |   14 +-
 gcc/auto-inc-dec.c                     |    2 +-
 gcc/bb-reorder.c                       |   14 +-
 gcc/bt-load.c                          |   20 +-
 gcc/builtins.c                         |  112 ++--
 gcc/builtins.def                       |   16 +-
 gcc/c-family/c-ada-spec.c              |    8 +-
 gcc/c-family/c-common.c                |   90 +--
 gcc/c-family/c-cppbuiltin.c            |   54 +-
 gcc/c-family/c-format.c                |   30 +-
 gcc/c-family/c-gimplify.c              |    4 +-
 gcc/c-family/c-lex.c                   |   18 +-
 gcc/c-family/c-opts.c                  |  158 ++---
 gcc/c-family/c-pch.c                   |   10 +-
 gcc/c-family/c-pragma.c                |   32 +-
 gcc/c-family/cilk.c                    |    2 +-
 gcc/c/c-aux-info.c                     |    2 +-
 gcc/c/c-decl.c                         |  146 ++---
 gcc/c/c-parser.c                       |  142 ++---
 gcc/c/c-typeck.c                       |  156 ++---
 gcc/caller-save.c                      |    4 +-
 gcc/calls.c                            |   22 +-
 gcc/cfgbuild.c                         |    2 +-
 gcc/cfgcleanup.c                       |   10 +-
 gcc/cfgexpand.c                        |   38 +-
 gcc/cfgloopanal.c                      |    4 +-
 gcc/cfgrtl.c                           |   16 +-
 gcc/cgraph.c                           |   12 +-
 gcc/cgraphclones.c                     |    6 +-
 gcc/cgraphunit.c                       |   66 +-
 gcc/cilk.h                             |    2 +-
 gcc/combine-stack-adj.c                |    2 +-
 gcc/combine.c                          |   22 +-
 gcc/common/config/arc/arc-common.c     |    2 +-
 gcc/compare-elim.c                     |    2 +-
 gcc/config/aarch64/aarch64.c           |   48 +-
 gcc/config/aarch64/aarch64.h           |    6 +-
 gcc/config/aarch64/aarch64.md          |    2 +-
 gcc/config/alpha/alpha.c               |  154 ++---
 gcc/config/alpha/alpha.h               |    2 +-
 gcc/config/alpha/alpha.md              |    8 +-
 gcc/config/alpha/elf.h                 |    4 +-
 gcc/config/alpha/linux.h               |    6 +-
 gcc/config/alpha/predicates.md         |    4 +-
 gcc/config/alpha/vms.h                 |   16 +-
 gcc/config/arc/arc.c                   |  138 ++--
 gcc/config/arc/arc.h                   |   38 +-
 gcc/config/arc/arc.md                  |   62 +-
 gcc/config/arc/arc600.md               |    4 +-
 gcc/config/arc/constraints.md          |    6 +-
 gcc/config/arc/predicates.md           |    2 +-
 gcc/config/arm/aout.h                  |    4 +-
 gcc/config/arm/arm-fixed.md            |    8 +-
 gcc/config/arm/arm-modes.def           |    2 +-
 gcc/config/arm/arm.c                   |  332 +++++-----
 gcc/config/arm/arm.h                   |   52 +-
 gcc/config/arm/arm.md                  |   84 +--
 gcc/config/arm/coff.h                  |    2 +-
 gcc/config/arm/constraints.md          |    6 +-
 gcc/config/arm/elf.h                   |    8 +-
 gcc/config/arm/neon.md                 |   56 +-
 gcc/config/arm/predicates.md           |    2 +-
 gcc/config/arm/thumb2.md               |   42 +-
 gcc/config/arm/vec-common.md           |   10 +-
 gcc/config/arm/vfp.md                  |   10 +-
 gcc/config/avr/avr-c.c                 |    2 +-
 gcc/config/avr/avr-fixed.md            |    2 +-
 gcc/config/avr/avr-log.c               |    6 +-
 gcc/config/avr/avr.c                   |   94 +--
 gcc/config/avr/avr.h                   |    6 +-
 gcc/config/avr/avr.md                  |   10 +-
 gcc/config/bfin/bfin-opts.h            |    2 +-
 gcc/config/bfin/bfin-protos.h          |   18 +-
 gcc/config/bfin/bfin.c                 |   68 +-
 gcc/config/bfin/bfin.h                 |   16 +-
 gcc/config/bfin/bfin.md                |   10 +-
 gcc/config/c6x/c6x.c                   |   74 +--
 gcc/config/c6x/c6x.h                   |   10 +-
 gcc/config/c6x/c6x.md                  |   40 +-
 gcc/config/cr16/cr16.c                 |   56 +-
 gcc/config/cr16/cr16.md                |   16 +-
 gcc/config/cris/constraints.md         |    4 +-
 gcc/config/cris/cris.c                 |   88 +--
 gcc/config/cris/cris.h                 |   12 +-
 gcc/config/cris/cris.md                |   28 +-
 gcc/config/cris/linux.h                |    2 +-
 gcc/config/cris/predicates.md          |    4 +-
 gcc/config/darwin-c.c                  |   22 +-
 gcc/config/darwin.c                    |  116 ++--
 gcc/config/darwin.h                    |   18 +-
 gcc/config/elfos.h                     |    6 +-
 gcc/config/epiphany/constraints.md     |    8 +-
 gcc/config/epiphany/epiphany-modes.def |    8 +-
 gcc/config/epiphany/epiphany.c         |   76 +--
 gcc/config/epiphany/epiphany.h         |   24 +-
 gcc/config/epiphany/epiphany.md        |   38 +-
 gcc/config/epiphany/predicates.md      |    2 +-
 gcc/config/epiphany/resolve-sw-modes.c |    2 +-
 gcc/config/fr30/fr30.c                 |    2 +-
 gcc/config/frv/frv.c                   |  114 ++--
 gcc/config/frv/frv.h                   |   44 +-
 gcc/config/frv/frv.md                  |    6 +-
 gcc/config/frv/predicates.md           |    8 +-
 gcc/config/h8300/constraints.md        |    2 +-
 gcc/config/h8300/elf.h                 |    2 +-
 gcc/config/h8300/h8300.c               |   28 +-
 gcc/config/h8300/h8300.md              |    4 +-
 gcc/config/i386/constraints.md         |    2 +-
 gcc/config/i386/cygming.h              |   18 +-
 gcc/config/i386/darwin.h               |   10 +-
 gcc/config/i386/djgpp.h                |    2 +-
 gcc/config/i386/i386-c.c               |   14 +-
 gcc/config/i386/i386-interix.h         |    2 +-
 gcc/config/i386/i386.c                 |  398 ++++++------
 gcc/config/i386/i386.h                 |   38 +-
 gcc/config/i386/i386.md                |  210 +++----
 gcc/config/i386/mingw32.h              |    4 +-
 gcc/config/i386/mmx.md                 |    4 +-
 gcc/config/i386/msformat-c.c           |    2 +-
 gcc/config/i386/netbsd-elf.h           |    2 +-
 gcc/config/i386/netbsd64.h             |    4 +-
 gcc/config/i386/openbsd.h              |    2 +-
 gcc/config/i386/openbsdelf.h           |    2 +-
 gcc/config/i386/predicates.md          |   42 +-
 gcc/config/i386/sol2.h                 |    4 +-
 gcc/config/i386/sse.md                 |   20 +-
 gcc/config/i386/winnt-cxx.c            |    4 +-
 gcc/config/i386/winnt.c                |   12 +-
 gcc/config/ia64/constraints.md         |    4 +-
 gcc/config/ia64/div.md                 |   60 +-
 gcc/config/ia64/ia64.c                 |   92 +--
 gcc/config/ia64/ia64.h                 |    6 +-
 gcc/config/ia64/ia64.md                |    2 +-
 gcc/config/ia64/predicates.md          |    2 +-
 gcc/config/iq2000/iq2000.c             |   20 +-
 gcc/config/iq2000/iq2000.h             |    2 +-
 gcc/config/iq2000/iq2000.md            |    6 +-
 gcc/config/linux.h                     |    6 +-
 gcc/config/lm32/lm32.c                 |   10 +-
 gcc/config/lm32/lm32.h                 |   12 +-
 gcc/config/lm32/lm32.md                |   22 +-
 gcc/config/lm32/predicates.md          |    2 +-
 gcc/config/m32c/m32c.c                 |   12 +-
 gcc/config/m32c/m32c.h                 |    8 +-
 gcc/config/m32r/m32r-opts.h            |   16 +-
 gcc/config/m32r/m32r.c                 |   34 +-
 gcc/config/m32r/m32r.h                 |   18 +-
 gcc/config/m32r/m32r.md                |   56 +-
 gcc/config/m32r/predicates.md          |    2 +-
 gcc/config/m68k/constraints.md         |    2 +-
 gcc/config/m68k/linux.h                |    2 +-
 gcc/config/m68k/m68k.c                 |   72 +--
 gcc/config/m68k/m68k.h                 |    4 +-
 gcc/config/m68k/m68k.md                |   10 +-
 gcc/config/m68k/netbsd-elf.h           |    2 +-
 gcc/config/mcore/mcore-elf.h           |    4 +-
 gcc/config/mcore/mcore.c               |   14 +-
 gcc/config/mcore/mcore.md              |    6 +-
 gcc/config/mep/mep-pragma.c            |    8 +-
 gcc/config/mep/mep.c                   |   60 +-
 gcc/config/mep/mep.h                   |    8 +-
 gcc/config/mep/mep.md                  |    4 +-
 gcc/config/microblaze/microblaze.c     |   96 +--
 gcc/config/microblaze/microblaze.h     |   10 +-
 gcc/config/microblaze/microblaze.md    |   28 +-
 gcc/config/microblaze/predicates.md    |    4 +-
 gcc/config/mips/mips-ps-3d.md          |   32 +-
 gcc/config/mips/mips.c                 |  334 +++++-----
 gcc/config/mips/mips.h                 |   72 +--
 gcc/config/mips/mips.md                |  140 ++---
 gcc/config/mips/netbsd.h               |    8 +-
 gcc/config/mips/sb1.md                 |    2 +-
 gcc/config/mips/sdemtk.h               |    4 +-
 gcc/config/mmix/mmix.c                 |    8 +-
 gcc/config/mn10300/constraints.md      |    2 +-
 gcc/config/mn10300/mn10300.c           |   40 +-
 gcc/config/mn10300/mn10300.h           |    6 +-
 gcc/config/mn10300/mn10300.md          |   14 +-
 gcc/config/mn10300/predicates.md       |    2 +-
 gcc/config/moxie/moxie.c               |    2 +-
 gcc/config/msp430/msp430.c             |   58 +-
 gcc/config/msp430/msp430.md            |    8 +-
 gcc/config/nds32/nds32.c               |   64 +-
 gcc/config/nds32/nds32.h               |    8 +-
 gcc/config/nios2/nios2.c               |   38 +-
 gcc/config/nios2/nios2.h               |    4 +-
 gcc/config/nios2/nios2.md              |    6 +-
 gcc/config/openbsd.h                   |    6 +-
 gcc/config/pa/pa-hpux10.h              |    2 +-
 gcc/config/pa/pa-hpux11.h              |    4 +-
 gcc/config/pa/pa.c                     |  152 ++---
 gcc/config/pa/pa.h                     |   18 +-
 gcc/config/pa/pa.md                    |  162 ++---
 gcc/config/pa/predicates.md            |    6 +-
 gcc/config/pdp11/pdp11.c               |   16 +-
 gcc/config/pdp11/pdp11.md              |    2 +-
 gcc/config/picochip/picochip.c         |   58 +-
 gcc/config/picochip/picochip.h         |    2 +-
 gcc/config/picochip/picochip.md        |    2 +-
 gcc/config/rl78/rl78.c                 |   20 +-
 gcc/config/rl78/rl78.h                 |    8 +-
 gcc/config/rs6000/750cl.h              |    2 +-
 gcc/config/rs6000/aix43.h              |    4 +-
 gcc/config/rs6000/aix51.h              |    2 +-
 gcc/config/rs6000/aix52.h              |    4 +-
 gcc/config/rs6000/aix53.h              |    4 +-
 gcc/config/rs6000/aix61.h              |   22 +-
 gcc/config/rs6000/altivec.md           |   16 +-
 gcc/config/rs6000/darwin.h             |   16 +-
 gcc/config/rs6000/darwin.md            |   14 +-
 gcc/config/rs6000/e500.h               |   10 +-
 gcc/config/rs6000/eabialtivec.h        |    2 +-
 gcc/config/rs6000/freebsd.h            |    2 +-
 gcc/config/rs6000/freebsd64.h          |   46 +-
 gcc/config/rs6000/linux.h              |    8 +-
 gcc/config/rs6000/linux64.h            |   62 +-
 gcc/config/rs6000/linuxaltivec.h       |    2 +-
 gcc/config/rs6000/paired.md            |    4 +-
 gcc/config/rs6000/predicates.md        |   12 +-
 gcc/config/rs6000/rs6000-c.c           |   26 +-
 gcc/config/rs6000/rs6000.c             | 1072 ++++++++++++++++----------------
 gcc/config/rs6000/rs6000.h             |   44 +-
 gcc/config/rs6000/rs6000.md            |  196 +++---
 gcc/config/rs6000/singlefp.h           |    6 +-
 gcc/config/rs6000/spe.md               |   36 +-
 gcc/config/rs6000/sysv4.h              |  176 +++---
 gcc/config/rs6000/vector.md            |    2 +-
 gcc/config/rs6000/vsx.md               |    4 +-
 gcc/config/rs6000/vxworks.h            |    2 +-
 gcc/config/rs6000/xcoff.h              |    4 +-
 gcc/config/rs6000/xfpu.h               |    2 +-
 gcc/config/rx/rx.c                     |   54 +-
 gcc/config/rx/rx.h                     |   16 +-
 gcc/config/rx/rx.md                    |   20 +-
 gcc/config/s390/predicates.md          |    6 +-
 gcc/config/s390/s390.c                 |  190 +++---
 gcc/config/s390/s390.h                 |   26 +-
 gcc/config/s390/s390.md                |   16 +-
 gcc/config/score/score.c               |   24 +-
 gcc/config/score/score.h               |    2 +-
 gcc/config/score/score.md              |   18 +-
 gcc/config/sh/linux.h                  |   12 +-
 gcc/config/sh/netbsd-elf.h             |    2 +-
 gcc/config/sh/sh-mem.cc                |   16 +-
 gcc/config/sh/sh.c                     |  350 +++++------
 gcc/config/sh/sh.h                     |   28 +-
 gcc/config/sh/sh.md                    |  126 ++--
 gcc/config/sh/sh_optimize_sett_clrt.cc |    2 +-
 gcc/config/sh/sh_treg_combine.cc       |    2 +-
 gcc/config/sh/sync.md                  |   14 +-
 gcc/config/sh/vxworks.h                |    2 +-
 gcc/config/sol2.c                      |    2 +-
 gcc/config/sol2.h                      |    2 +-
 gcc/config/sparc/sol2.h                |    4 +-
 gcc/config/sparc/sparc.c               |  268 ++++----
 gcc/config/sparc/sparc.h               |   24 +-
 gcc/config/sparc/sparc.md              |   56 +-
 gcc/config/sparc/sync.md               |    8 +-
 gcc/config/spu/spu-builtins.md         |    8 +-
 gcc/config/spu/spu-c.c                 |    6 +-
 gcc/config/spu/spu.c                   |   96 +--
 gcc/config/spu/spu.h                   |    4 +-
 gcc/config/spu/spu.md                  |   24 +-
 gcc/config/stormy16/stormy16.c         |    2 +-
 gcc/config/tilegx/tilegx.c             |   74 +--
 gcc/config/tilegx/tilegx.h             |    4 +-
 gcc/config/tilegx/tilegx.md            |   40 +-
 gcc/config/tilepro/tilepro.c           |   58 +-
 gcc/config/tilepro/tilepro.h           |    4 +-
 gcc/config/tilepro/tilepro.md          |   12 +-
 gcc/config/v850/predicates.md          |    8 +-
 gcc/config/v850/v850.c                 |   34 +-
 gcc/config/v850/v850.h                 |    2 +-
 gcc/config/v850/v850.md                |   38 +-
 gcc/config/vax/constraints.md          |    2 +-
 gcc/config/vax/elf.h                   |    4 +-
 gcc/config/vax/predicates.md           |   10 +-
 gcc/config/vax/vax.c                   |   44 +-
 gcc/config/vax/vax.md                  |   16 +-
 gcc/config/vms/vms-c.c                 |    8 +-
 gcc/config/vms/vms.c                   |   20 +-
 gcc/config/vms/vms.h                   |   10 +-
 gcc/config/vxworks.c                   |    6 +-
 gcc/config/xtensa/predicates.md        |    4 +-
 gcc/config/xtensa/xtensa.c             |   28 +-
 gcc/config/xtensa/xtensa.h             |    8 +-
 gcc/config/xtensa/xtensa.md            |   10 +-
 gcc/convert.c                          |   28 +-
 gcc/coverage.c                         |   26 +-
 gcc/cp/call.c                          |   62 +-
 gcc/cp/class.c                         |   44 +-
 gcc/cp/cp-cilkplus.c                   |    2 +-
 gcc/cp/cp-gimplify.c                   |    6 +-
 gcc/cp/cvt.c                           |    6 +-
 gcc/cp/decl.c                          |  110 ++--
 gcc/cp/decl2.c                         |   70 +--
 gcc/cp/error.c                         |   20 +-
 gcc/cp/except.c                        |   20 +-
 gcc/cp/friend.c                        |    2 +-
 gcc/cp/init.c                          |   24 +-
 gcc/cp/lex.c                           |   18 +-
 gcc/cp/mangle.c                        |    8 +-
 gcc/cp/method.c                        |   10 +-
 gcc/cp/name-lookup.c                   |   10 +-
 gcc/cp/optimize.c                      |    2 +-
 gcc/cp/parser.c                        |   78 +--
 gcc/cp/pt.c                            |   18 +-
 gcc/cp/repo.c                          |   10 +-
 gcc/cp/rtti.c                          |    6 +-
 gcc/cp/search.c                        |    4 +-
 gcc/cp/semantics.c                     |   44 +-
 gcc/cp/typeck.c                        |   78 +--
 gcc/cp/typeck2.c                       |    4 +-
 gcc/cp/vtable-class-hierarchy.c        |   30 +-
 gcc/cppbuiltin.c                       |   24 +-
 gcc/cprop.c                            |    2 +-
 gcc/cse.c                              |   26 +-
 gcc/cselib.c                           |    4 +-
 gcc/dbxout.c                           |   72 +--
 gcc/dce.c                              |   10 +-
 gcc/ddg.c                              |    6 +-
 gcc/defaults.h                         |    2 +-
 gcc/df-core.c                          |    8 +-
 gcc/df-problems.c                      |    2 +-
 gcc/dojump.c                           |    4 +-
 gcc/dse.c                              |    6 +-
 gcc/dumpfile.c                         |    2 +-
 gcc/dwarf2asm.c                        |   30 +-
 gcc/dwarf2cfi.c                        |   18 +-
 gcc/dwarf2out.c                        |  416 ++++++-------
 gcc/emit-rtl.c                         |    4 +-
 gcc/except.c                           |   16 +-
 gcc/explow.c                           |   20 +-
 gcc/expmed.c                           |   20 +-
 gcc/expr.c                             |   24 +-
 gcc/final.c                            |  100 +--
 gcc/flags.h                            |    4 +-
 gcc/fold-const.c                       |  128 ++--
 gcc/fortran/arith.c                    |    2 +-
 gcc/fortran/cpp.c                      |    6 +-
 gcc/fortran/decl.c                     |    2 +-
 gcc/fortran/error.c                    |   24 +-
 gcc/fortran/f95-lang.c                 |    6 +-
 gcc/fortran/frontend-passes.c          |    2 +-
 gcc/fortran/io.c                       |    4 +-
 gcc/fortran/options.c                  |   34 +-
 gcc/fortran/primary.c                  |    2 +-
 gcc/fortran/resolve.c                  |    8 +-
 gcc/fortran/scanner.c                  |   10 +-
 gcc/fortran/trans-decl.c               |   16 +-
 gcc/fortran/trans-expr.c               |    6 +-
 gcc/fortran/trans-intrinsic.c          |    4 +-
 gcc/fortran/trans-stmt.c               |    2 +-
 gcc/fortran/trans.c                    |    4 +-
 gcc/function.c                         |   48 +-
 gcc/fwprop.c                           |    2 +-
 gcc/gcc.c                              |  102 +--
 gcc/gcse.c                             |   38 +-
 gcc/ggc-page.c                         |    4 +-
 gcc/gimple-fold.c                      |   12 +-
 gcc/gimple-low.c                       |    4 +-
 gcc/gimple-ssa-isolate-paths.c         |   12 +-
 gcc/gimple-ssa-strength-reduction.c    |    6 +-
 gcc/gimple.c                           |    2 +-
 gcc/gimplify.c                         |   24 +-
 gcc/go/go-backend.c                    |    2 +-
 gcc/go/go-lang.c                       |    8 +-
 gcc/go/gofrontend/expressions.cc       |    8 +-
 gcc/graphite-clast-to-gimple.c         |    6 +-
 gcc/graphite-poly.c                    |   12 +-
 gcc/graphite-sese-to-poly.c            |   10 +-
 gcc/graphite.c                         |   18 +-
 gcc/haifa-sched.c                      |   34 +-
 gcc/ifcvt.c                            |   14 +-
 gcc/incpath.c                          |    8 +-
 gcc/init-regs.c                        |    6 +-
 gcc/internal-fn.c                      |    2 +-
 gcc/ipa-cp.c                           |   12 +-
 gcc/ipa-devirt.c                       |   24 +-
 gcc/ipa-inline-analysis.c              |   24 +-
 gcc/ipa-inline-transform.c             |    4 +-
 gcc/ipa-inline.c                       |   46 +-
 gcc/ipa-profile.c                      |    8 +-
 gcc/ipa-prop.c                         |   24 +-
 gcc/ipa-prop.h                         |    2 +-
 gcc/ipa-pure-const.c                   |   10 +-
 gcc/ipa-reference.c                    |    2 +-
 gcc/ipa-split.c                        |   12 +-
 gcc/ipa.c                              |   46 +-
 gcc/ira-build.c                        |    6 +-
 gcc/ira-color.c                        |   18 +-
 gcc/ira-conflicts.c                    |   10 +-
 gcc/ira-costs.c                        |   32 +-
 gcc/ira-int.h                          |    2 +-
 gcc/ira.c                              |   74 +--
 gcc/java/boehm.c                       |    8 +-
 gcc/java/builtins.c                    |   16 +-
 gcc/java/class.c                       |   76 +--
 gcc/java/constants.c                   |    2 +-
 gcc/java/decl.c                        |   10 +-
 gcc/java/except.c                      |    4 +-
 gcc/java/expr.c                        |   54 +-
 gcc/java/java-tree.h                   |    2 +-
 gcc/java/jcf-parse.c                   |   28 +-
 gcc/java/jcf.h                         |    2 +-
 gcc/java/lang.c                        |   20 +-
 gcc/java/parse.h                       |    2 +-
 gcc/java/typeck.c                      |    2 +-
 gcc/java/verify-glue.c                 |    2 +-
 gcc/langhooks.c                        |    2 +-
 gcc/loop-init.c                        |   26 +-
 gcc/loop-invariant.c                   |   32 +-
 gcc/loop-iv.c                          |    8 +-
 gcc/loop-unroll.c                      |   24 +-
 gcc/lower-subreg.c                     |    2 +-
 gcc/lra-constraints.c                  |    2 +-
 gcc/lra-spills.c                       |    2 +-
 gcc/lra.c                              |    2 +-
 gcc/lto-cgraph.c                       |   12 +-
 gcc/lto-compress.c                     |    2 +-
 gcc/lto-section-in.c                   |    4 +-
 gcc/lto-section-out.c                  |    2 +-
 gcc/lto-streamer-in.c                  |    4 +-
 gcc/lto-streamer-out.c                 |   18 +-
 gcc/lto-streamer.c                     |    6 +-
 gcc/lto/lto-lang.c                     |   32 +-
 gcc/lto/lto-partition.c                |   14 +-
 gcc/lto/lto-symtab.c                   |    4 +-
 gcc/lto/lto.c                          |   88 +--
 gcc/mode-switching.c                   |    2 +-
 gcc/modulo-sched.c                     |   14 +-
 gcc/objc/objc-act.c                    |   82 +--
 gcc/objc/objc-encoding.c               |   16 +-
 gcc/objc/objc-gnu-runtime-abi-01.c     |   20 +-
 gcc/objc/objc-next-runtime-abi-01.c    |   40 +-
 gcc/objc/objc-next-runtime-abi-02.c    |   14 +-
 gcc/objc/objc-runtime-shared-support.c |    4 +-
 gcc/omp-low.c                          |   42 +-
 gcc/optabs.c                           |   12 +-
 gcc/opts-global.c                      |    8 +-
 gcc/opts.c                             |    6 +-
 gcc/passes.c                           |   46 +-
 gcc/plugin.c                           |    4 +-
 gcc/postreload-gcse.c                  |    6 +-
 gcc/postreload.c                       |    4 +-
 gcc/predict.c                          |   24 +-
 gcc/print-rtl.c                        |   10 +-
 gcc/print-tree.c                       |    2 +-
 gcc/profile.c                          |   14 +-
 gcc/real.h                             |   10 +-
 gcc/recog.c                            |   16 +-
 gcc/ree.c                              |    2 +-
 gcc/reg-stack.c                        |    6 +-
 gcc/regcprop.c                         |    2 +-
 gcc/regrename.c                        |    2 +-
 gcc/regs.h                             |    4 +-
 gcc/reload.c                           |   10 +-
 gcc/reload1.c                          |   24 +-
 gcc/reorg.c                            |    4 +-
 gcc/rtl.h                              |    2 +-
 gcc/rtlanal.c                          |   10 +-
 gcc/sched-ebb.c                        |    4 +-
 gcc/sched-rgn.c                        |   36 +-
 gcc/sdbout.c                           |    2 +-
 gcc/sel-sched-ir.c                     |   16 +-
 gcc/sel-sched-ir.h                     |    4 +-
 gcc/sel-sched.c                        |    4 +-
 gcc/simplify-rtx.c                     |   28 +-
 gcc/stmt.c                             |    8 +-
 gcc/stor-layout.c                      |   20 +-
 gcc/store-motion.c                     |    2 +-
 gcc/symtab.c                           |    4 +-
 gcc/targhooks.c                        |   30 +-
 gcc/toplev.c                           |  378 +++++------
 gcc/tracer.c                           |    6 +-
 gcc/trans-mem.c                        |   10 +-
 gcc/tree-call-cdce.c                   |    2 +-
 gcc/tree-cfg.c                         |   10 +-
 gcc/tree-cfgcleanup.c                  |   28 +-
 gcc/tree-complex.c                     |    6 +-
 gcc/tree-data-ref.c                    |    2 +-
 gcc/tree-eh.c                          |   38 +-
 gcc/tree-if-conv.c                     |   34 +-
 gcc/tree-inline.c                      |   22 +-
 gcc/tree-loop-distribution.c           |   10 +-
 gcc/tree-nested.c                      |   10 +-
 gcc/tree-nrv.c                         |    2 +-
 gcc/tree-outof-ssa.c                   |    4 +-
 gcc/tree-parloops.c                    |   10 +-
 gcc/tree-predcom.c                     |    4 +-
 gcc/tree-profile.c                     |   24 +-
 gcc/tree-sra.c                         |    4 +-
 gcc/tree-ssa-alias.c                   |   14 +-
 gcc/tree-ssa-ccp.c                     |    8 +-
 gcc/tree-ssa-coalesce.c                |    4 +-
 gcc/tree-ssa-copy.c                    |    2 +-
 gcc/tree-ssa-copyrename.c              |    8 +-
 gcc/tree-ssa-dce.c                     |    4 +-
 gcc/tree-ssa-dom.c                     |    2 +-
 gcc/tree-ssa-dse.c                     |    2 +-
 gcc/tree-ssa-forwprop.c                |    2 +-
 gcc/tree-ssa-live.c                    |    8 +-
 gcc/tree-ssa-loop-ch.c                 |    4 +-
 gcc/tree-ssa-loop-im.c                 |   14 +-
 gcc/tree-ssa-loop-ivcanon.c            |   14 +-
 gcc/tree-ssa-loop-niter.c              |   20 +-
 gcc/tree-ssa-loop-prefetch.c           |    2 +-
 gcc/tree-ssa-loop-unswitch.c           |    2 +-
 gcc/tree-ssa-loop.c                    |   10 +-
 gcc/tree-ssa-math-opts.c               |   30 +-
 gcc/tree-ssa-operands.c                |    4 +-
 gcc/tree-ssa-phiopt.c                  |   14 +-
 gcc/tree-ssa-phiprop.c                 |    2 +-
 gcc/tree-ssa-pre.c                     |    8 +-
 gcc/tree-ssa-reassoc.c                 |    8 +-
 gcc/tree-ssa-sccvn.c                   |    4 +-
 gcc/tree-ssa-sink.c                    |    2 +-
 gcc/tree-ssa-strlen.c                  |    2 +-
 gcc/tree-ssa-structalias.c             |   10 +-
 gcc/tree-ssa-tail-merge.c              |    2 +-
 gcc/tree-ssa-ter.c                     |    4 +-
 gcc/tree-ssa-uncprop.c                 |    2 +-
 gcc/tree-ssa-uninit.c                  |    4 +-
 gcc/tree-streamer-out.c                |    2 +-
 gcc/tree-switch-conversion.c           |    6 +-
 gcc/tree-tailcall.c                    |    4 +-
 gcc/tree-vect-data-refs.c              |    2 +-
 gcc/tree-vect-generic.c                |    4 +-
 gcc/tree-vect-loop.c                   |    6 +-
 gcc/tree-vectorizer.c                  |    6 +-
 gcc/tree-vectorizer.h                  |    6 +-
 gcc/tree-vrp.c                         |   22 +-
 gcc/tree.c                             |   30 +-
 gcc/tree.h                             |   10 +-
 gcc/tsan.c                             |    6 +-
 gcc/ubsan.c                            |   12 +-
 gcc/value-prof.c                       |    4 +-
 gcc/var-tracking.c                     |   30 +-
 gcc/varasm.c                           |   94 +--
 gcc/varpool.c                          |    4 +-
 gcc/vmsdbgout.c                        |   84 +--
 gcc/vtable-verify.c                    |    4 +-
 gcc/web.c                              |    2 +-
 gcc/xcoffout.c                         |    6 +-
 550 files changed, 7445 insertions(+), 7445 deletions(-)

diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 4c9788d..c681e8f 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -1499,8 +1499,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
 	if (kind == E_Out_Parameter
 	    && definition
 	    && debug_info_p
-	    && !optimize
-	    && !flag_generate_lto)
+	    && !GCC_OPTION (optimize)
+	    && !GCC_OPTION (flag_generate_lto))
 	  {
 	    tree param = create_param_decl (gnu_entity_name, gnu_type, false);
 	    gnat_pushdecl (param, gnat_entity);
@@ -1536,7 +1536,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
 	     - if either itself or its type is aliased.  */
 	if (TREE_CODE (gnu_decl) == CONST_DECL
 	    && (definition || Sloc (gnat_entity) > Standard_Location)
-	    && ((!optimize && debug_info_p)
+	    && ((!GCC_OPTION (optimize) && debug_info_p)
 		|| (Is_Public (gnat_entity)
 		    && No (Address_Clause (gnat_entity)))
 		|| Address_Taken (gnat_entity)
@@ -1586,7 +1586,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
 		 && DECL_MODE (gnu_decl) != BLKmode
 		 && AGGREGATE_TYPE_P (TREE_TYPE (gnu_decl))
 		 && !TYPE_IS_FAT_POINTER_P (TREE_TYPE (gnu_decl))
-		 && !optimize)
+		 && !GCC_OPTION (optimize))
 	  TREE_ADDRESSABLE (gnu_decl) = 1;
 
 	/* If we are defining an object with variable size or an object with
@@ -1597,7 +1597,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
 	    && get_block_jmpbuf_decl ()
 	    && DECL_SIZE_UNIT (gnu_decl)
 	    && (TREE_CODE (DECL_SIZE_UNIT (gnu_decl)) != INTEGER_CST
-		|| (flag_stack_check == GENERIC_STACK_CHECK
+		|| (GCC_OPTION (flag_stack_check) == GENERIC_STACK_CHECK
 		    && compare_tree_int (DECL_SIZE_UNIT (gnu_decl),
 					 STACK_CHECK_MAX_VAR_SIZE) > 0)))
 	  add_stmt_with_node (build_call_n_expr
@@ -4239,7 +4239,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
 	       to let developers be notified on demand without risking false
 	       positives with common default sets of options.  */
 
-	    if (gnu_builtin_decl == NULL_TREE && warn_shadow)
+	    if (gnu_builtin_decl == NULL_TREE && GCC_OPTION (warn_shadow))
 	      post_error ("?gcc intrinsic not found for&!", gnat_entity);
 	  }
 
@@ -6319,7 +6319,7 @@ elaborate_expression_1 (tree gnu_expr, Entity_Id gnat_entity, tree gnu_name,
      use it for bounds of loop iteration scheme to avoid code duplication.  */
   use_variable = expr_variable_p
 		 && (expr_global_p
-		     || (!optimize
+		     || (!GCC_OPTION (optimize)
 		         && definition
 			 && Is_Itype (gnat_entity)
 			 && Nkind (Associated_Node_For_Itype (gnat_entity))
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h
index a565dc6..8b807aa 100644
--- a/gcc/ada/gcc-interface/gigi.h
+++ b/gcc/ada/gcc-interface/gigi.h
@@ -1060,7 +1060,7 @@ extern void enumerate_modes (void (*f) (const char *, int, int, int, int, int,
    Descriptors.  Always used in combination with TARGET_ABI_OPEN_VMS
    so no effect on non-VMS systems.  */
 #if TARGET_ABI_OPEN_VMS
-#define GCC_OPTION_flag_vms_malloc64 flag_vms_malloc64
+#define GCC_OPTION_flag_vms_malloc64 GCC_OPTION (flag_vms_malloc64)
 #else
 #define GCC_OPTION_flag_vms_malloc64 0
 #endif
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 4a4d0fa..8d464af 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -317,7 +317,7 @@ gigi (Node_Id gnat_root,
   type_annotate_only = (gigi_operating_mode == 1);
 
 #if TARGET_ABI_OPEN_VMS
-  vms_float_format = Float_Format;
+  GCC_OPTION (vms_float_format) = Float_Format;
 #endif
 
   for (i = 0; i < number_file; i++)
@@ -1297,17 +1297,17 @@ Pragma_to_gnu (Node_Id gnat_node)
 		     (First (Pragma_Argument_Associations (gnat_node)))))
 	{
 	case Name_Off:
-	  if (optimize)
+	  if (GCC_OPTION (optimize))
 	    post_error ("must specify -O0?", gnat_node);
 	  break;
 
 	case Name_Space:
-	  if (!optimize_size)
+	  if (!GCC_OPTION (optimize_size))
 	    post_error ("must specify -Os?", gnat_node);
 	  break;
 
 	case Name_Time:
-	  if (!optimize)
+	  if (!GCC_OPTION (optimize))
 	    post_error ("insufficient -O value?", gnat_node);
 	  break;
 
@@ -1317,7 +1317,7 @@ Pragma_to_gnu (Node_Id gnat_node)
       break;
 
     case Pragma_Reviewable:
-      if (write_symbols == NO_DEBUG)
+      if (GCC_OPTION (write_symbols) == NO_DEBUG)
 	post_error ("must specify -g?", gnat_node);
       break;
 
@@ -1913,7 +1913,7 @@ Attribute_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, int attribute)
 
 	/* When not optimizing, look up the slot associated with the parameter
 	   and the dimension in the cache and create a new one on failure.  */
-	if (!optimize && Present (gnat_param))
+	if (!GCC_OPTION (optimize) && Present (gnat_param))
 	  {
 	    FOR_EACH_VEC_SAFE_ELT (f_parm_attr_cache, i, pa)
 	      if (pa->id == gnat_param && pa->dim == Dimension)
@@ -2633,7 +2633,7 @@ Loop_Statement_to_gnu (Node_Id gnat_node)
 
 	 which works in all cases.  */
 
-      if (optimize)
+      if (GCC_OPTION (optimize))
 	{
 	  /* We can use the do-while form directly if GNU_FIRST-1 doesn't
 	     overflow.  */
@@ -3368,7 +3368,7 @@ build_return_expr (tree ret_obj, tree ret_val)
       /* If the function returns an aggregate type, find out whether this is
 	 a candidate for Named Return Value.  If so, record it.  Otherwise,
 	 if this is an expression of some kind, record it elsewhere.  */
-      if (optimize
+      if (GCC_OPTION (optimize)
 	  && AGGREGATE_TYPE_P (operation_type)
 	  && !TYPE_IS_FAT_POINTER_P (operation_type)
 	  && TYPE_MODE (operation_type) == BLKmode
@@ -3752,7 +3752,7 @@ Subprogram_Body_to_gnu (Node_Id gnat_node)
 
   /* If the function returns an aggregate type and we have candidates for
      a Named Return Value, finalize the optimization.  */
-  if (optimize && gnu_subprog_language->named_ret_val)
+  if (GCC_OPTION (optimize) && gnu_subprog_language->named_ret_val)
     {
       finalize_nrv (gnu_subprog_decl,
 		    gnu_subprog_language->named_ret_val,
@@ -5026,7 +5026,7 @@ Compilation_Unit_to_gnu (Node_Id gnat_node)
   add_stmt (gnat_to_gnu (gnat_unit));
 
   /* If we can inline, generate code for all the inlined subprograms.  */
-  if (optimize)
+  if (GCC_OPTION (optimize))
     {
       Entity_Id gnat_entity;
 
@@ -5164,7 +5164,7 @@ Raise_Error_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p)
 	     one of which has the checks eliminated and the other has
 	     the original checks reinstated, and a run time selection.
 	     The former loop will be suitable for vectorization.  */
-	  if (flag_unswitch_loops
+	  if (GCC_OPTION (flag_unswitch_loops)
 	      && (!gnu_low_bound
 		  || (gnu_low_bound = gnat_invariant_expr (gnu_low_bound)))
 	      && (!gnu_high_bound
@@ -6376,7 +6376,7 @@ gnat_to_gnu (Node_Id gnat_node)
     case N_Null_Statement:
       /* When not optimizing, turn null statements from source into gotos to
 	 the next statement that the middle-end knows how to preserve.  */
-      if (!optimize && Comes_From_Source (gnat_node))
+      if (!GCC_OPTION (optimize) && Comes_From_Source (gnat_node))
 	{
 	  tree stmt, label = create_label_decl (NULL_TREE, gnat_node);
 	  DECL_IGNORED_P (label) = 1;
@@ -6559,7 +6559,7 @@ gnat_to_gnu (Node_Id gnat_node)
 
 		/* And find out whether this is a candidate for Named Return
 		   Value.  If so, record it.  */
-		if (!TYPE_CI_CO_LIST (gnu_subprog_type) && optimize)
+		if (!TYPE_CI_CO_LIST (gnu_subprog_type) && GCC_OPTION (optimize))
 		  {
 		    tree ret_val = gnu_ret_val;
 
@@ -6624,7 +6624,7 @@ gnat_to_gnu (Node_Id gnat_node)
 				 gnu_return_label_stack->last ());
 
 	    /* When not optimizing, make sure the return is preserved.  */
-	    if (!optimize && Comes_From_Source (gnat_node))
+	    if (!GCC_OPTION (optimize) && Comes_From_Source (gnat_node))
 	      DECL_ARTIFICIAL (gnu_return_label_stack->last ()) = 0;
 	  }
 
@@ -7143,7 +7143,7 @@ gnat_to_gnu (Node_Id gnat_node)
     case N_Validate_Unchecked_Conversion:
       /* The only validation we currently do on an unchecked conversion is
 	 that of aliasing assumptions.  */
-      if (flag_strict_aliasing)
+      if (GCC_OPTION (flag_strict_aliasing))
 	gnat_validate_uc_list.safe_push (gnat_node);
       gnu_result = alloc_stmt_list ();
       break;
@@ -7171,7 +7171,7 @@ gnat_to_gnu (Node_Id gnat_node)
   /* When not optimizing, turn boolean rvalues B into B != false tests
      so that the code just below can put the location information of the
      reference to B on the inequality operator for better debug info.  */
-  if (!optimize
+  if (!GCC_OPTION (optimize)
       && TREE_CODE (gnu_result) != INTEGER_CST
       && (kind == N_Identifier
 	  || kind == N_Expanded_Name
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 014fe36..a9f803e 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -1330,7 +1330,7 @@ relate_alias_sets (tree gnu_new_type, tree gnu_old_type, enum alias_set_op op)
 	 aliasing settings because this can break the aliasing relationship
 	 between the array type and its element type.  */
 #ifndef ENABLE_CHECKING
-      if (flag_strict_aliasing)
+      if (GCC_OPTION (flag_strict_aliasing))
 #endif
 	gcc_assert (!(TREE_CODE (gnu_new_type) == ARRAY_TYPE
 		      && TREE_CODE (gnu_old_type) == ARRAY_TYPE
@@ -2199,7 +2199,7 @@ create_var_decl_1 (tree var_name, tree asm_name, tree type, tree var_init,
      try to fiddle with DECL_COMMON.  However, on platforms that don't
      support global BSS sections, uninitialized global variables would
      go in DATA instead, thus increasing the size of the executable.  */
-  if (!flag_no_common
+  if (!GCC_OPTION (flag_no_common)
       && TREE_CODE (var_decl) == VAR_DECL
       && TREE_PUBLIC (var_decl)
       && !have_global_bss_p ())
@@ -5051,7 +5051,7 @@ convert_to_index_type (tree expr)
 
   /* If the type is unsigned, overflow is allowed so we cannot be sure that
      EXPR doesn't overflow.  Keep it simple if optimization is disabled.  */
-  if (TYPE_UNSIGNED (type) || !optimize)
+  if (TYPE_UNSIGNED (type) || !GCC_OPTION (optimize))
     return convert (sizetype, expr);
 
   switch (code)
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c
index dd4151b..c95d984 100644
--- a/gcc/ada/gcc-interface/utils2.c
+++ b/gcc/ada/gcc-interface/utils2.c
@@ -1239,7 +1239,7 @@ build_unary_op (enum tree_code op_code, tree result_type, tree operand)
       /* When not optimizing, fold the result as invert_truthvalue_loc
 	 doesn't fold the result of comparisons.  This is intended to undo
 	 the trick used for boolean rvalues in gnat_to_gnu.  */
-      if (!optimize)
+      if (!GCC_OPTION (optimize))
 	result = fold (result);
       break;
 
diff --git a/gcc/alias.c b/gcc/alias.c
index 434ae7a..eb65e31 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -390,7 +390,7 @@ mems_in_disjoint_alias_sets_p (const_rtx mem1, const_rtx mem2)
    gen_rtx_MEM, and the MEM_ALIAS_SET is not cleared.  If we begin to
    use alias sets to indicate that spilled registers cannot alias each
    other, we might need to remove this check.  */
-  gcc_assert (flag_strict_aliasing
+  gcc_assert (GCC_OPTION (flag_strict_aliasing)
 	      || (!MEM_ALIAS_SET (mem1) && !MEM_ALIAS_SET (mem2)));
 
   return ! alias_sets_conflict_p (MEM_ALIAS_SET (mem1), MEM_ALIAS_SET (mem2));
@@ -597,7 +597,7 @@ get_deref_alias_set (tree t)
 {
   /* If we're not doing any alias analysis, just assume everything
      aliases everything else.  */
-  if (!flag_strict_aliasing)
+  if (!GCC_OPTION (flag_strict_aliasing))
     return 0;
 
   alias_set_type set = get_deref_alias_set_1 (t);
@@ -716,7 +716,7 @@ get_alias_set (tree t)
   /* If we're not doing any alias analysis, just assume everything
      aliases everything else.  Also return 0 if this or its type is
      an error.  */
-  if (! flag_strict_aliasing || t == error_mark_node
+  if (! GCC_OPTION (flag_strict_aliasing) || t == error_mark_node
       || (! TYPE_P (t)
 	  && (TREE_TYPE (t) == 0 || TREE_TYPE (t) == error_mark_node)))
     return 0;
@@ -902,7 +902,7 @@ get_alias_set (tree t)
 alias_set_type
 new_alias_set (void)
 {
-  if (flag_strict_aliasing)
+  if (GCC_OPTION (flag_strict_aliasing))
     {
       if (alias_sets == 0)
 	vec_safe_push (alias_sets, (alias_set_entry) 0);
@@ -1815,7 +1815,7 @@ base_alias_check (rtx x, rtx x_base, rtx y, rtx y_base,
     {
       rtx x_c;
 
-      if (! flag_expensive_optimizations || (x_c = canon_rtx (x)) == x)
+      if (! GCC_OPTION (flag_expensive_optimizations) || (x_c = canon_rtx (x)) == x)
 	return 1;
 
       x_base = find_base_term (x_c);
@@ -1826,7 +1826,7 @@ base_alias_check (rtx x, rtx x_base, rtx y, rtx y_base,
   if (y_base == 0)
     {
       rtx y_c;
-      if (! flag_expensive_optimizations || (y_c = canon_rtx (y)) == y)
+      if (! GCC_OPTION (flag_expensive_optimizations) || (y_c = canon_rtx (y)) == y)
 	return 1;
 
       y_base = find_base_term (y_c);
@@ -2268,7 +2268,7 @@ nonoverlapping_component_refs_p (const_rtx rtlx, const_rtx rtly)
   const_tree x = MEM_EXPR (rtlx), y = MEM_EXPR (rtly);
   const_tree fieldx, fieldy, typex, typey, orig_y;
 
-  if (!flag_strict_aliasing
+  if (!GCC_OPTION (flag_strict_aliasing)
       || !x || !y
       || TREE_CODE (x) != COMPONENT_REF
       || TREE_CODE (y) != COMPONENT_REF)
diff --git a/gcc/asan.c b/gcc/asan.c
index 53992a8..303cb35 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -2124,7 +2124,7 @@ asan_dynamic_init_call (bool after_p)
   if (!after_p)
     {
       pretty_printer module_name_pp;
-      pp_string (&module_name_pp, main_input_filename);
+      pp_string (&module_name_pp, GCC_OPTION (main_input_filename));
 
       if (shadow_ptr_types[0] == NULL_TREE)
 	asan_init_shadow_ptr_types ();
@@ -2193,7 +2193,7 @@ asan_add_global (tree decl, tree type, vec<constructor_elt, va_gc> *v)
     pp_string (&asan_pp, "<unknown>");
   str_cst = asan_pp_string (&asan_pp);
 
-  pp_string (&module_name_pp, main_input_filename);
+  pp_string (&module_name_pp, GCC_OPTION (main_input_filename));
   module_name_cst = asan_pp_string (&module_name_pp);
 
   if (asan_needs_local_alias (decl))
@@ -2399,7 +2399,7 @@ asan_finish_file (void)
   /* Avoid instrumenting code in the asan ctors/dtors.
      We don't need to insert padding after the description strings,
      nor after .LASAN* array.  */
-  flag_sanitize &= ~SANITIZE_ADDRESS;
+  GCC_OPTION (flag_sanitize) &= ~SANITIZE_ADDRESS;
 
   tree fn = builtin_decl_implicit (BUILT_IN_ASAN_INIT);
   append_to_statement_list (build_call_expr (fn, 0), &asan_ctor_statements);
@@ -2456,7 +2456,7 @@ asan_finish_file (void)
     }
   cgraph_build_static_cdtor ('I', asan_ctor_statements,
 			     MAX_RESERVED_INIT_PRIORITY - 1);
-  flag_sanitize |= SANITIZE_ADDRESS;
+  GCC_OPTION (flag_sanitize) |= SANITIZE_ADDRESS;
 }
 
 /* Instrument the current function.  */
@@ -2473,7 +2473,7 @@ asan_instrument (void)
 static bool
 gate_asan (void)
 {
-  return (flag_sanitize & SANITIZE_ADDRESS) != 0
+  return (GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS) != 0
 	  && !lookup_attribute ("no_sanitize_address",
 				DECL_ATTRIBUTES (current_function_decl));
 }
@@ -2521,7 +2521,7 @@ make_pass_asan (gcc::context *ctxt)
 static bool
 gate_asan_O0 (void)
 {
-  return !optimize && gate_asan ();
+  return !GCC_OPTION (optimize) && gate_asan ();
 }
 
 namespace {
@@ -2604,7 +2604,7 @@ execute_sanopt (void)
 static bool
 gate_sanopt (void)
 {
-  return flag_sanitize;
+  return GCC_OPTION (flag_sanitize);
 }
 
 namespace {
diff --git a/gcc/auto-inc-dec.c b/gcc/auto-inc-dec.c
index 47f516d..d0fef31 100644
--- a/gcc/auto-inc-dec.c
+++ b/gcc/auto-inc-dec.c
@@ -1499,7 +1499,7 @@ static bool
 gate_auto_inc_dec (void)
 {
 #ifdef AUTO_INC_DEC
-  return (optimize > 0 && flag_auto_inc_dec);
+  return (GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_auto_inc_dec));
 #else
   return false;
 #endif
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index 3364d93..ae13920 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -954,7 +954,7 @@ better_edge_p (const_basic_block bb, const_edge e, int prob, int freq,
      non-crossing edges over crossing edges.  */
 
   if (!is_better_edge
-      && flag_reorder_blocks_and_partition
+      && GCC_OPTION (flag_reorder_blocks_and_partition)
       && cur_best_edge
       && (cur_best_edge->flags & EDGE_CROSSING)
       && !(e->flags & EDGE_CROSSING))
@@ -2308,8 +2308,8 @@ gate_handle_reorder_blocks (void)
 {
   if (targetm.cannot_modify_jumps_p ())
     return false;
-  return (optimize > 0
-	  && (flag_reorder_blocks || flag_reorder_blocks_and_partition));
+  return (GCC_OPTION (optimize) > 0
+	  && (GCC_OPTION (flag_reorder_blocks) || GCC_OPTION (flag_reorder_blocks_and_partition)));
 }
 
 static unsigned int
@@ -2381,8 +2381,8 @@ gate_duplicate_computed_gotos (void)
 {
   if (targetm.cannot_modify_jumps_p ())
     return false;
-  return (optimize > 0
-	  && flag_expensive_optimizations
+  return (GCC_OPTION (optimize) > 0
+	  && GCC_OPTION (flag_expensive_optimizations)
 	  && ! optimize_function_for_size_p (cfun));
 }
 
@@ -2550,8 +2550,8 @@ gate_handle_partition_blocks (void)
      sections of the .o file does not work well with linkonce or with
      user defined section attributes.  Don't call it if either case
      arises.  */
-  return (flag_reorder_blocks_and_partition
-          && optimize
+  return (GCC_OPTION (flag_reorder_blocks_and_partition)
+          && GCC_OPTION (optimize)
 	  /* See gate_handle_reorder_blocks.  We should not partition if
 	     we are going to omit the reordering.  */
 	  && optimize_function_for_speed_p (cfun)
diff --git a/gcc/bt-load.c b/gcc/bt-load.c
index 4fa68f1..daaa30c 100644
--- a/gcc/bt-load.c
+++ b/gcc/bt-load.c
@@ -1019,13 +1019,13 @@ btr_def_live_range (btr_def def, HARD_REG_SET *btrs_live_in_range)
 
       bitmap_set_bit (def->live_range, def->bb->index);
       COPY_HARD_REG_SET (*btrs_live_in_range,
-			 (flag_btr_bb_exclusive
+			 (GCC_OPTION (flag_btr_bb_exclusive)
 			  ? btrs_live : btrs_live_at_end)[def->bb->index]);
 
       for (user = def->uses; user != NULL; user = user->next)
 	augment_live_range (def->live_range, btrs_live_in_range,
 			    def->bb, user->bb,
-			    (flag_btr_bb_exclusive
+			    (GCC_OPTION (flag_btr_bb_exclusive)
 			     || user->insn != BB_END (def->bb)
 			     || !JUMP_P (user->insn)));
     }
@@ -1036,7 +1036,7 @@ btr_def_live_range (btr_def def, HARD_REG_SET *btrs_live_in_range)
 	 of other PT instructions may have affected it.
       */
       unsigned bb;
-      unsigned def_bb = flag_btr_bb_exclusive ? -1 : def->bb->index;
+      unsigned def_bb = GCC_OPTION (flag_btr_bb_exclusive) ? -1 : def->bb->index;
       bitmap_iterator bi;
 
       CLEAR_HARD_REG_SET (*btrs_live_in_range);
@@ -1089,7 +1089,7 @@ combine_btr_defs (btr_def def, HARD_REG_SET *btrs_live_in_range)
 	  for (user = other_def->uses; user != NULL; user = user->next)
 	    augment_live_range (combined_live_range, &combined_btrs_live,
 				def->bb, user->bb,
-				(flag_btr_bb_exclusive
+				(GCC_OPTION (flag_btr_bb_exclusive)
 				 || user->insn != BB_END (def->bb)
 				 || !JUMP_P (user->insn)));
 
@@ -1356,7 +1356,7 @@ migrate_btr_def (btr_def def, int min_cost)
 	{
 	  int btr;
 	  augment_live_range (live_range, &btrs_live_in_range, def->bb, attempt,
-			      flag_btr_bb_exclusive);
+			      GCC_OPTION (flag_btr_bb_exclusive));
 	  if (dump_file)
 	    {
 	      fprintf (dump_file, "Now btrs live in range are: ");
@@ -1478,7 +1478,7 @@ branch_target_load_optimize (bool after_prologue_epilogue_gen)
 #if 1
 	  /* This may or may not be needed, depending on where we
 	     run this phase.  */
-	  cleanup_cfg (optimize ? CLEANUP_EXPENSIVE : 0);
+	  cleanup_cfg (GCC_OPTION (optimize) ? CLEANUP_EXPENSIVE : 0);
 #endif
 	}
       df_analyze ();
@@ -1497,7 +1497,7 @@ branch_target_load_optimize (bool after_prologue_epilogue_gen)
 static bool
 gate_handle_branch_target_load_optimize1 (void)
 {
-  return flag_branch_target_load_optimize;
+  return GCC_OPTION (flag_branch_target_load_optimize);
 }
 
 
@@ -1551,7 +1551,7 @@ make_pass_branch_target_load_optimize1 (gcc::context *ctxt)
 static bool
 gate_handle_branch_target_load_optimize2 (void)
 {
-  return (optimize > 0 && flag_branch_target_load_optimize2);
+  return (GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_branch_target_load_optimize2));
 }
 
 
@@ -1563,8 +1563,8 @@ rest_of_handle_branch_target_load_optimize2 (void)
   /* Leave this a warning for now so that it is possible to experiment
      with running this pass twice.  In 3.6, we should either make this
      an error, or use separate dump files.  */
-  if (flag_branch_target_load_optimize
-      && flag_branch_target_load_optimize2
+  if (GCC_OPTION (flag_branch_target_load_optimize)
+      && GCC_OPTION (flag_branch_target_load_optimize2)
       && !warned)
     {
       warning (0, "branch target register load optimization is not intended "
diff --git a/gcc/builtins.c b/gcc/builtins.c
index dd57b1a..29fc8ef 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -243,7 +243,7 @@ is_builtin_name (const char *name)
     return true;
   if (strncmp (name, "__atomic_", 9) == 0)
     return true;
-  if (flag_cilkplus 
+  if (GCC_OPTION (flag_cilkplus) 
       && (!strcmp (name, "__cilkrts_detach")   
 	  || !strcmp (name, "__cilkrts_pop_frame")))
     return true;
@@ -2091,7 +2091,7 @@ expand_builtin_mathfn (tree exp, rtx target, rtx subtarget)
       builtin_optab = round_optab; break;
     CASE_FLT_FN (BUILT_IN_NEARBYINT):
       builtin_optab = nearbyint_optab;
-      if (flag_trapping_math)
+      if (GCC_OPTION (flag_trapping_math))
 	break;
       /* Else fallthrough and expand as rint.  */
     CASE_FLT_FN (BUILT_IN_RINT):
@@ -2105,7 +2105,7 @@ expand_builtin_mathfn (tree exp, rtx target, rtx subtarget)
   /* Make a suitable register to place result in.  */
   mode = TYPE_MODE (TREE_TYPE (exp));
 
-  if (! flag_errno_math || ! HONOR_NANS (mode))
+  if (! GCC_OPTION (flag_errno_math) || ! HONOR_NANS (mode))
     errno_set = false;
 
   /* Before working hard, check whether the instruction is available, but try
@@ -2219,7 +2219,7 @@ expand_builtin_mathfn_2 (tree exp, rtx target, rtx subtarget)
 
   result = gen_reg_rtx (mode);
 
-  if (! flag_errno_math || ! HONOR_NANS (mode))
+  if (! GCC_OPTION (flag_errno_math) || ! HONOR_NANS (mode))
     errno_set = false;
 
   if (errno_set && optimize_insn_for_size_p ())
@@ -2465,7 +2465,7 @@ interclass_mathfn_icode (tree arg, tree fndecl)
     }
 
   /* There's no easy way to detect the case we need to set EDOM.  */
-  if (flag_errno_math && errno_set)
+  if (GCC_OPTION (flag_errno_math) && errno_set)
     return CODE_FOR_nothing;
 
   /* Optab mode depends on the mode of the input argument.  */
@@ -2890,14 +2890,14 @@ expand_builtin_int_roundingfn_2 (tree exp, rtx target)
     }
 
   /* There's no easy way to detect the case we need to set EDOM.  */
-  if (flag_errno_math && fallback_fn == BUILT_IN_NONE)
+  if (GCC_OPTION (flag_errno_math) && fallback_fn == BUILT_IN_NONE)
     return NULL_RTX;
 
   /* Make a suitable register to place result in.  */
   mode = TYPE_MODE (TREE_TYPE (exp));
 
   /* There's no easy way to detect the case we need to set EDOM.  */
-  if (!flag_errno_math)
+  if (!GCC_OPTION (flag_errno_math))
     {
       rtx result = gen_reg_rtx (mode);
 
@@ -4586,8 +4586,8 @@ expand_builtin_expect (tree exp, rtx target)
 
   target = expand_expr (arg, target, VOIDmode, EXPAND_NORMAL);
   /* When guessing was done, the hints should be already stripped away.  */
-  gcc_assert (!flag_guess_branch_prob
-	      || optimize == 0 || seen_error ());
+  gcc_assert (!GCC_OPTION (flag_guess_branch_prob)
+	      || GCC_OPTION (optimize) == 0 || seen_error ());
   return target;
 }
 
@@ -4977,7 +4977,7 @@ expand_builtin_fork_or_exec (tree fn, tree exp, rtx target, int ignore)
   tree call;
 
   /* If we are not profiling, just call the function.  */
-  if (!profile_arc_flag)
+  if (!GCC_OPTION (profile_arc_flag))
     return NULL_RTX;
 
   /* Otherwise call the wrapper.  This should be equivalent for the rest of
@@ -5110,7 +5110,7 @@ expand_builtin_sync_operation (enum machine_mode mode, tree exp,
   rtx val, mem;
   location_t loc = EXPR_LOCATION (exp);
 
-  if (code == NOT && warn_sync_nand)
+  if (code == NOT && GCC_OPTION (warn_sync_nand))
     {
       tree fndecl = get_callee_fndecl (exp);
       enum built_in_function fcode = DECL_FUNCTION_CODE (fndecl);
@@ -5277,7 +5277,7 @@ expand_builtin_atomic_exchange (enum machine_mode mode, tree exp, rtx target)
       return NULL_RTX;
     }
 
-  if (!flag_inline_atomics)
+  if (!GCC_OPTION (flag_inline_atomics))
     return NULL_RTX;
 
   /* Expand the operands.  */
@@ -5321,7 +5321,7 @@ expand_builtin_atomic_compare_exchange (enum machine_mode mode, tree exp,
       return NULL_RTX;
     }
   
-  if (!flag_inline_atomics)
+  if (!GCC_OPTION (flag_inline_atomics))
     return NULL_RTX;
 
   /* Expand the operands.  */
@@ -5380,7 +5380,7 @@ expand_builtin_atomic_load (enum machine_mode mode, tree exp, rtx target)
       return NULL_RTX;
     }
 
-  if (!flag_inline_atomics)
+  if (!GCC_OPTION (flag_inline_atomics))
     return NULL_RTX;
 
   /* Expand the operand.  */
@@ -5410,7 +5410,7 @@ expand_builtin_atomic_store (enum machine_mode mode, tree exp)
       return NULL_RTX;
     }
 
-  if (!flag_inline_atomics)
+  if (!GCC_OPTION (flag_inline_atomics))
     return NULL_RTX;
 
   /* Expand the operands.  */
@@ -5448,7 +5448,7 @@ expand_builtin_atomic_fetch_op (enum machine_mode mode, tree exp, rtx target,
   val = expand_expr_force_mode (CALL_EXPR_ARG (exp, 1), mode);
 
   /* Only try generating instructions if inlining is turned on.  */
-  if (flag_inline_atomics)
+  if (GCC_OPTION (flag_inline_atomics))
     {
       ret = expand_atomic_fetch_op (target, mem, val, code, model, fetch_after);
       if (ret)
@@ -5638,7 +5638,7 @@ expand_builtin_atomic_always_lock_free (tree exp)
 static tree
 fold_builtin_atomic_is_lock_free (tree arg0, tree arg1)
 {
-  if (!flag_inline_atomics)
+  if (!GCC_OPTION (flag_inline_atomics))
     return NULL_TREE;
   
   /* If it isn't always lock free, don't generate a result.  */
@@ -5668,7 +5668,7 @@ expand_builtin_atomic_is_lock_free (tree exp)
       return NULL_RTX;
     }
 
-  if (!flag_inline_atomics)
+  if (!GCC_OPTION (flag_inline_atomics))
     return NULL_RTX; 
 
   /* If the value is known at compile time, return the RTX for it.  */
@@ -5799,7 +5799,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
 
   /* When not optimizing, generate calls to library functions for a certain
      set of builtins.  */
-  if (!optimize
+  if (!GCC_OPTION (optimize)
       && !called_as_built_in (fndecl)
       && fcode != BUILT_IN_FORK
       && fcode != BUILT_IN_EXECL
@@ -5883,7 +5883,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
     CASE_FLT_FN (BUILT_IN_SIGNIFICAND):
       /* Treat these like sqrt only if unsafe math optimizations are allowed,
 	 because of possible accuracy problems.  */
-      if (! flag_unsafe_math_optimizations)
+      if (! GCC_OPTION (flag_unsafe_math_optimizations))
 	break;
     CASE_FLT_FN (BUILT_IN_SQRT):
     CASE_FLT_FN (BUILT_IN_FLOOR):
@@ -5904,7 +5904,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
       break;
 
     CASE_FLT_FN (BUILT_IN_ILOGB):
-      if (! flag_unsafe_math_optimizations)
+      if (! GCC_OPTION (flag_unsafe_math_optimizations))
 	break;
     CASE_FLT_FN (BUILT_IN_ISINF):
     CASE_FLT_FN (BUILT_IN_FINITE):
@@ -5948,7 +5948,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
     CASE_FLT_FN (BUILT_IN_SCALB):
     CASE_FLT_FN (BUILT_IN_SCALBN):
     CASE_FLT_FN (BUILT_IN_SCALBLN):
-      if (! flag_unsafe_math_optimizations)
+      if (! GCC_OPTION (flag_unsafe_math_optimizations))
 	break;
 
     CASE_FLT_FN (BUILT_IN_FMOD):
@@ -5967,7 +5967,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
 
     CASE_FLT_FN (BUILT_IN_SIN):
     CASE_FLT_FN (BUILT_IN_COS):
-      if (! flag_unsafe_math_optimizations)
+      if (! GCC_OPTION (flag_unsafe_math_optimizations))
 	break;
       target = expand_builtin_mathfn_3 (exp, target, subtarget);
       if (target)
@@ -5975,7 +5975,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
       break;
 
     CASE_FLT_FN (BUILT_IN_SINCOS):
-      if (! flag_unsafe_math_optimizations)
+      if (! GCC_OPTION (flag_unsafe_math_optimizations))
 	break;
       target = expand_builtin_sincos (exp);
       if (target)
@@ -6829,7 +6829,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
       break;
 
     case BUILT_IN_FREE:
-      if (warn_free_nonheap_object)
+      if (GCC_OPTION (warn_free_nonheap_object))
 	maybe_emit_free_warning (exp);
       break;
 
@@ -7230,10 +7230,10 @@ fold_trunc_transparent_mathfn (location_t loc, tree fndecl, tree arg)
 
   /* If argument is already integer valued, and we don't need to worry
      about setting errno, there's no need to perform rounding.  */
-  if (! flag_errno_math && integer_valued_real_p (arg))
+  if (! GCC_OPTION (flag_errno_math) && integer_valued_real_p (arg))
     return arg;
 
-  if (optimize)
+  if (GCC_OPTION (optimize))
     {
       tree arg0 = strip_float_extensions (arg);
       tree ftype = TREE_TYPE (TREE_TYPE (fndecl));
@@ -7265,11 +7265,11 @@ fold_fixed_mathfn (location_t loc, tree fndecl, tree arg)
 
   /* If argument is already integer valued, and we don't need to worry
      about setting errno, there's no need to perform rounding.  */
-  if (! flag_errno_math && integer_valued_real_p (arg))
+  if (! GCC_OPTION (flag_errno_math) && integer_valued_real_p (arg))
     return fold_build1_loc (loc, FIX_TRUNC_EXPR,
 			TREE_TYPE (TREE_TYPE (fndecl)), arg);
 
-  if (optimize)
+  if (GCC_OPTION (optimize))
     {
       tree ftype = TREE_TYPE (arg);
       tree arg0 = strip_float_extensions (arg);
@@ -7387,7 +7387,7 @@ fold_builtin_cabs (location_t loc, tree arg, tree type, tree fndecl)
 	return fold_build1_loc (loc, ABS_EXPR, type, real);
 
       /* cabs(x+xi) -> fabs(x)*sqrt(2).  */
-      if (flag_unsafe_math_optimizations
+      if (GCC_OPTION (flag_unsafe_math_optimizations)
 	  && operand_equal_p (real, imag, OEP_PURE_SAME))
         {
 	  const REAL_VALUE_TYPE sqrt2_trunc
@@ -7405,8 +7405,8 @@ fold_builtin_cabs (location_t loc, tree arg, tree type, tree fndecl)
     return build_call_expr_loc (loc, fndecl, 1, TREE_OPERAND (arg, 0));
 
   /* Don't do this when optimizing for size.  */
-  if (flag_unsafe_math_optimizations
-      && optimize && optimize_function_for_speed_p (cfun))
+  if (GCC_OPTION (flag_unsafe_math_optimizations)
+      && GCC_OPTION (optimize) && optimize_function_for_speed_p (cfun))
     {
       tree sqrtfn = mathfn_built_in (type, BUILT_IN_SQRT);
 
@@ -7525,7 +7525,7 @@ fold_builtin_sqrt (location_t loc, tree arg, tree type)
 
   /* Optimize sqrt(expN(x)) = expN(x*0.5).  */
   fcode = builtin_mathfn_code (arg);
-  if (flag_unsafe_math_optimizations && BUILTIN_EXPONENT_P (fcode))
+  if (GCC_OPTION (flag_unsafe_math_optimizations) && BUILTIN_EXPONENT_P (fcode))
     {
       tree expfn = TREE_OPERAND (CALL_EXPR_FN (arg), 0);
       arg = fold_build2_loc (loc, MULT_EXPR, type,
@@ -7535,7 +7535,7 @@ fold_builtin_sqrt (location_t loc, tree arg, tree type)
     }
 
   /* Optimize sqrt(Nroot(x)) -> pow(x,1/(2*N)).  */
-  if (flag_unsafe_math_optimizations && BUILTIN_ROOT_P (fcode))
+  if (GCC_OPTION (flag_unsafe_math_optimizations) && BUILTIN_ROOT_P (fcode))
     {
       tree powfn = mathfn_built_in (type, BUILT_IN_POW);
 
@@ -7561,7 +7561,7 @@ fold_builtin_sqrt (location_t loc, tree arg, tree type)
     }
 
   /* Optimize sqrt(pow(x,y)) = pow(|x|,y*0.5).  */
-  if (flag_unsafe_math_optimizations
+  if (GCC_OPTION (flag_unsafe_math_optimizations)
       && (fcode == BUILT_IN_POW
 	  || fcode == BUILT_IN_POWF
 	  || fcode == BUILT_IN_POWL))
@@ -7596,7 +7596,7 @@ fold_builtin_cbrt (location_t loc, tree arg, tree type)
   if ((res = do_mpfr_arg1 (arg, type, mpfr_cbrt, NULL, NULL, 0)))
     return res;
 
-  if (flag_unsafe_math_optimizations)
+  if (GCC_OPTION (flag_unsafe_math_optimizations))
     {
       /* Optimize cbrt(expN(x)) -> expN(x/3).  */
       if (BUILTIN_EXPONENT_P (fcode))
@@ -7760,7 +7760,7 @@ fold_builtin_tan (tree arg, tree type)
 
   /* Optimize tan(atan(x)) = x.  */
   fcode = builtin_mathfn_code (arg);
-  if (flag_unsafe_math_optimizations
+  if (GCC_OPTION (flag_unsafe_math_optimizations)
       && (fcode == BUILT_IN_ATAN
 	  || fcode == BUILT_IN_ATANF
 	  || fcode == BUILT_IN_ATANL))
@@ -7846,7 +7846,7 @@ fold_builtin_cexp (location_t loc, tree arg0, tree type)
 
   /* In case we can easily decompose real and imaginary parts split cexp
      to exp (r) * cexpi (i).  */
-  if (flag_unsafe_math_optimizations
+  if (GCC_OPTION (flag_unsafe_math_optimizations)
       && realp)
     {
       tree rfn, rcall, icall;
@@ -7915,7 +7915,7 @@ fold_builtin_floor (location_t loc, tree fndecl, tree arg)
       REAL_VALUE_TYPE x;
 
       x = TREE_REAL_CST (arg);
-      if (! REAL_VALUE_ISNAN (x) || ! flag_errno_math)
+      if (! REAL_VALUE_ISNAN (x) || ! GCC_OPTION (flag_errno_math))
 	{
 	  tree type = TREE_TYPE (TREE_TYPE (fndecl));
 	  REAL_VALUE_TYPE r;
@@ -7951,7 +7951,7 @@ fold_builtin_ceil (location_t loc, tree fndecl, tree arg)
       REAL_VALUE_TYPE x;
 
       x = TREE_REAL_CST (arg);
-      if (! REAL_VALUE_ISNAN (x) || ! flag_errno_math)
+      if (! REAL_VALUE_ISNAN (x) || ! GCC_OPTION (flag_errno_math))
 	{
 	  tree type = TREE_TYPE (TREE_TYPE (fndecl));
 	  REAL_VALUE_TYPE r;
@@ -7979,7 +7979,7 @@ fold_builtin_round (location_t loc, tree fndecl, tree arg)
       REAL_VALUE_TYPE x;
 
       x = TREE_REAL_CST (arg);
-      if (! REAL_VALUE_ISNAN (x) || ! flag_errno_math)
+      if (! REAL_VALUE_ISNAN (x) || ! GCC_OPTION (flag_errno_math))
 	{
 	  tree type = TREE_TYPE (TREE_TYPE (fndecl));
 	  REAL_VALUE_TYPE r;
@@ -8252,7 +8252,7 @@ fold_builtin_logarithm (location_t loc, tree fndecl, tree arg,
 	return res;
 
       /* Special case, optimize logN(expN(x)) = x.  */
-      if (flag_unsafe_math_optimizations
+      if (GCC_OPTION (flag_unsafe_math_optimizations)
 	  && ((func == mpfr_log
 	       && (fcode == BUILT_IN_EXP
 		   || fcode == BUILT_IN_EXPF
@@ -8267,7 +8267,7 @@ fold_builtin_logarithm (location_t loc, tree fndecl, tree arg,
       /* Optimize logN(func()) for various exponential functions.  We
 	 want to determine the value "x" and the power "exponent" in
 	 order to transform logN(x**exponent) into exponent*logN(x).  */
-      if (flag_unsafe_math_optimizations)
+      if (GCC_OPTION (flag_unsafe_math_optimizations))
 	{
 	  tree exponent = 0, x = 0;
 
@@ -8360,7 +8360,7 @@ fold_builtin_hypot (location_t loc, tree fndecl,
     return fold_build1_loc (loc, ABS_EXPR, type, arg0);
 
   /* hypot(x,x) -> fabs(x)*sqrt(2).  */
-  if (flag_unsafe_math_optimizations
+  if (GCC_OPTION (flag_unsafe_math_optimizations)
       && operand_equal_p (arg0, arg1, OEP_PURE_SAME))
     {
       const REAL_VALUE_TYPE sqrt2_trunc
@@ -8417,7 +8417,7 @@ fold_builtin_pow (location_t loc, tree fndecl, tree arg0, tree arg1, tree type)
 			    build_real (type, dconst1), arg0);
 
       /* Optimize pow(x,0.5) = sqrt(x).  */
-      if (flag_unsafe_math_optimizations
+      if (GCC_OPTION (flag_unsafe_math_optimizations)
 	  && REAL_VALUES_EQUAL (c, dconsthalf))
 	{
 	  tree sqrtfn = mathfn_built_in (type, BUILT_IN_SQRT);
@@ -8427,7 +8427,7 @@ fold_builtin_pow (location_t loc, tree fndecl, tree arg0, tree arg1, tree type)
 	}
 
       /* Optimize pow(x,1.0/3.0) = cbrt(x).  */
-      if (flag_unsafe_math_optimizations)
+      if (GCC_OPTION (flag_unsafe_math_optimizations))
 	{
 	  const REAL_VALUE_TYPE dconstroot
 	    = real_value_truncate (TYPE_MODE (type), dconst_third ());
@@ -8450,7 +8450,7 @@ fold_builtin_pow (location_t loc, tree fndecl, tree arg0, tree arg1, tree type)
 	  if (TREE_CODE (arg0) == REAL_CST
 	      && !TREE_OVERFLOW (arg0)
 	      && (n > 0
-		  || (!flag_trapping_math && !flag_errno_math)
+		  || (!GCC_OPTION (flag_trapping_math) && !GCC_OPTION (flag_errno_math))
 		  || !REAL_VALUES_EQUAL (TREE_REAL_CST (arg0), dconst0)))
 	    {
 	      REAL_VALUE_TYPE x;
@@ -8458,12 +8458,12 @@ fold_builtin_pow (location_t loc, tree fndecl, tree arg0, tree arg1, tree type)
 
 	      x = TREE_REAL_CST (arg0);
 	      inexact = real_powi (&x, TYPE_MODE (type), &x, n);
-	      if (flag_unsafe_math_optimizations || !inexact)
+	      if (GCC_OPTION (flag_unsafe_math_optimizations) || !inexact)
 		return build_real (type, x);
 	    }
 
 	  /* Strip sign ops from even integer powers.  */
-	  if ((n & 1) == 0 && flag_unsafe_math_optimizations)
+	  if ((n & 1) == 0 && GCC_OPTION (flag_unsafe_math_optimizations))
 	    {
 	      tree narg0 = fold_strip_sign_ops (arg0);
 	      if (narg0)
@@ -8472,7 +8472,7 @@ fold_builtin_pow (location_t loc, tree fndecl, tree arg0, tree arg1, tree type)
 	}
     }
 
-  if (flag_unsafe_math_optimizations)
+  if (GCC_OPTION (flag_unsafe_math_optimizations))
     {
       const enum built_in_function fcode = builtin_mathfn_code (arg0);
 
@@ -8590,7 +8590,7 @@ fold_builtin_exponent (location_t loc, tree fndecl, tree arg,
 	return res;
 
       /* Optimize expN(logN(x)) = x.  */
-      if (flag_unsafe_math_optimizations)
+      if (GCC_OPTION (flag_unsafe_math_optimizations))
 	{
 	  const enum built_in_function fcode = builtin_mathfn_code (arg);
 
@@ -9681,7 +9681,7 @@ fold_builtin_fmin_fmax (location_t loc, tree arg0, tree arg1,
 	 These tree codes don't honor that, so only transform if
 	 -ffinite-math-only is set.  C99 doesn't require -0.0 to be
 	 handled, so we don't have to worry about it either.  */
-      if (flag_finite_math_only)
+      if (GCC_OPTION (flag_finite_math_only))
 	return fold_build2_loc (loc, (max ? MAX_EXPR : MIN_EXPR), type,
 			    fold_convert_loc (loc, type, arg0),
 			    fold_convert_loc (loc, type, arg1));
@@ -10299,7 +10299,7 @@ fold_builtin_0 (location_t loc, tree fndecl, bool ignore ATTRIBUTE_UNUSED)
       return fold_builtin_classify_type (NULL_TREE);
 
     case BUILT_IN_UNREACHABLE:
-      if (flag_sanitize & SANITIZE_UNREACHABLE
+      if (GCC_OPTION (flag_sanitize) & SANITIZE_UNREACHABLE
 	  && (current_function_decl == NULL
 	      || !lookup_attribute ("no_sanitize_undefined",
 				    DECL_ATTRIBUTES (current_function_decl))))
@@ -10330,7 +10330,7 @@ fold_builtin_1 (location_t loc, tree fndecl, tree arg0, bool ignore)
 	/* Gimplification will pull the CALL_EXPR for the builtin out of
 	   an if condition.  When not optimizing, we'll not CSE it back.
 	   To avoid link error types of regressions, return false now.  */
-	if (!val && !optimize)
+	if (!val && !GCC_OPTION (optimize))
 	  val = integer_zero_node;
 
 	return val;
@@ -13578,7 +13578,7 @@ do_mpfr_ckconv (mpfr_srcptr m, tree type, int inexact)
      overflow/underflow occurred.  If -frounding-math, proceed iff the
      result of calling FUNC was exact.  */
   if (mpfr_number_p (m) && !mpfr_overflow_p () && !mpfr_underflow_p ()
-      && (!flag_rounding_math || !inexact))
+      && (!GCC_OPTION (flag_rounding_math) || !inexact))
     {
       REAL_VALUE_TYPE rr;
 
@@ -13618,7 +13618,7 @@ do_mpc_ckconv (mpc_srcptr m, tree type, int inexact, int force_convert)
   if (force_convert
       || (mpfr_number_p (mpc_realref (m)) && mpfr_number_p (mpc_imagref (m))
 	  && !mpfr_overflow_p () && !mpfr_underflow_p ()
-	  && (!flag_rounding_math || !inexact)))
+	  && (!GCC_OPTION (flag_rounding_math) || !inexact)))
     {
       REAL_VALUE_TYPE re, im;
 
diff --git a/gcc/builtins.def b/gcc/builtins.def
index 5a76ba3..810aadf 100644
--- a/gcc/builtins.def
+++ b/gcc/builtins.def
@@ -145,7 +145,7 @@ along with GCC; see the file COPYING3.  If not see
 #define DEF_GOMP_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
   DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE,    \
                false, true, true, ATTRS, false, \
-	       (flag_openmp || flag_tree_parallelize_loops))
+	       (GCC_OPTION (flag_openmp) || GCC_OPTION (flag_tree_parallelize_loops)))
 
 /* Builtin used by implementation of Cilk Plus.  Most of these are decomposed
    by the compiler but a few are implemented in libcilkrts.  */ 
@@ -159,7 +159,7 @@ along with GCC; see the file COPYING3.  If not see
 #undef DEF_TM_BUILTIN
 #define DEF_TM_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
   DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE,    \
-	       true, true, true, ATTRS, false, flag_tm)
+	       true, true, true, ATTRS, false, GCC_OPTION (flag_tm))
 
 /* Builtin used by the implementation of libsanitizer. These
    functions are mapped to the actual implementation of the 
@@ -168,19 +168,19 @@ along with GCC; see the file COPYING3.  If not see
 #define DEF_SANITIZER_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
   DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE,    \
 	       true, true, true, ATTRS, true, \
-	      (flag_sanitize & (SANITIZE_ADDRESS | SANITIZE_THREAD \
+	      (GCC_OPTION (flag_sanitize) & (SANITIZE_ADDRESS | SANITIZE_THREAD \
 				| SANITIZE_UNDEFINED)))
 
 #undef DEF_CILKPLUS_BUILTIN
 #define DEF_CILKPLUS_BUILTIN(ENUM, NAME, TYPE, ATTRS)  \
   DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, BT_FN_INT_VAR, BT_LAST, \
-  	       false, false, false, ATTRS, false, flag_cilkplus) 
+  	       false, false, false, ATTRS, false, GCC_OPTION (flag_cilkplus)) 
 
 /* Define an attribute list for math functions that are normally
    "impure" because some of them may write into global memory for
    `errno'.  If !flag_errno_math they are instead "const".  */
 #undef ATTR_MATHFN_ERRNO
-#define ATTR_MATHFN_ERRNO (flag_errno_math ? \
+#define ATTR_MATHFN_ERRNO (GCC_OPTION (flag_errno_math) ? \
 	ATTR_NOTHROW_LEAF_LIST : ATTR_CONST_NOTHROW_LEAF_LIST)
 
 /* Define an attribute list for math functions that are normally
@@ -189,7 +189,7 @@ along with GCC; see the file COPYING3.  If not see
    check the rounding mode which is akin to examining global
    memory.  */
 #undef ATTR_MATHFN_FPROUNDING
-#define ATTR_MATHFN_FPROUNDING (flag_rounding_math ? \
+#define ATTR_MATHFN_FPROUNDING (GCC_OPTION (flag_rounding_math) ? \
 	ATTR_PURE_NOTHROW_LEAF_LIST : ATTR_CONST_NOTHROW_LEAF_LIST)
 
 /* Define an attribute list for math functions that are normally
@@ -197,7 +197,7 @@ along with GCC; see the file COPYING3.  If not see
    `errno'.  If !flag_errno_math, we can possibly use "pure" or
    "const" depending on whether we care about FP rounding.  */
 #undef ATTR_MATHFN_FPROUNDING_ERRNO
-#define ATTR_MATHFN_FPROUNDING_ERRNO (flag_errno_math ? \
+#define ATTR_MATHFN_FPROUNDING_ERRNO (GCC_OPTION (flag_errno_math) ? \
 	ATTR_NOTHROW_LEAF_LIST : ATTR_MATHFN_FPROUNDING)
 
 /* Define an attribute list for math functions that need to mind FP
@@ -210,7 +210,7 @@ along with GCC; see the file COPYING3.  If not see
 /* Define an attribute list for leaf functions that do not throw
    exceptions normally, but may throw exceptions when using
    -fnon-call-exceptions.  */
-#define ATTR_NOTHROWCALL_LEAF_LIST (flag_non_call_exceptions ? \
+#define ATTR_NOTHROWCALL_LEAF_LIST (GCC_OPTION (flag_non_call_exceptions) ? \
 	ATTR_LEAF_LIST : ATTR_NOTHROW_LEAF_LIST)
 
 /* Make sure 0 is not a legitimate builtin.  */
diff --git a/gcc/c-family/c-ada-spec.c b/gcc/c-family/c-ada-spec.c
index fc21b62..0d60579 100644
--- a/gcc/c-family/c-ada-spec.c
+++ b/gcc/c-family/c-ada-spec.c
@@ -843,14 +843,14 @@ get_ada_package (const char *file)
   else
     base = lbasename (file);
 
-  if (ada_specs_parent == NULL)
+  if (GCC_OPTION (ada_specs_parent) == NULL)
     plen = 0;
   else
-    plen = strlen (ada_specs_parent) + 1;
+    plen = strlen (GCC_OPTION (ada_specs_parent)) + 1;
 
   res = XNEWVEC (char, plen + strlen (base) + 1);
-  if (ada_specs_parent != NULL) {
-    strcpy (res, ada_specs_parent);
+  if (GCC_OPTION (ada_specs_parent) != NULL) {
+    strcpy (res, GCC_OPTION (ada_specs_parent));
     res[plen - 1] = '.';
   }
 
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index abd96fb..184b485 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -987,7 +987,7 @@ fix_string_type (tree value)
      limit in C++98 Annex B is very large (65536) and is not normative,
      so we do not diagnose it (warn_overlength_strings is forced off
      in c_common_post_options).  */
-  if (warn_overlength_strings)
+  if (GCC_OPTION (warn_overlength_strings))
     {
       const int nchars_max = flag_isoc99 ? 4095 : 509;
       const int relevant_std = flag_isoc99 ? 99 : 90;
@@ -1019,7 +1019,7 @@ fix_string_type (tree value)
      unconditionally.  */
   i_type = build_index_type (size_int (nchars - 1));
   a_type = build_array_type (e_type, i_type);
-  if (c_dialect_cxx() || warn_write_strings)
+  if (c_dialect_cxx() || GCC_OPTION (warn_write_strings))
     a_type = c_build_qualified_type (a_type, TYPE_QUAL_CONST);
 
   TREE_TYPE (value) = a_type;
@@ -1515,7 +1515,7 @@ decl_constant_value_for_optimization (tree exp)
   if (c_dialect_cxx ())
     gcc_unreachable ();
 
-  if (!optimize
+  if (!GCC_OPTION (optimize)
       || TREE_CODE (exp) != VAR_DECL
       || TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE
       || DECL_MODE (exp) == BLKmode)
@@ -1539,7 +1539,7 @@ decl_constant_value_for_optimization (tree exp)
 void
 constant_expression_warning (tree value)
 {
-  if (warn_overflow && pedantic
+  if (GCC_OPTION (warn_overflow) && GCC_OPTION (pedantic)
       && (TREE_CODE (value) == INTEGER_CST || TREE_CODE (value) == REAL_CST
 	  || TREE_CODE (value) == FIXED_CST
 	  || TREE_CODE (value) == VECTOR_CST
@@ -1831,7 +1831,7 @@ strict_aliasing_warning (tree otype, tree type, tree expr)
   STRIP_NOPS (expr);
   otype = TREE_TYPE (expr);
 
-  if (!(flag_strict_aliasing
+  if (!(GCC_OPTION (flag_strict_aliasing)
 	&& POINTER_TYPE_P (type)
 	&& POINTER_TYPE_P (otype)
 	&& !VOID_TYPE_P (TREE_TYPE (type)))
@@ -1840,13 +1840,13 @@ strict_aliasing_warning (tree otype, tree type, tree expr)
       || TYPE_REF_CAN_ALIAS_ALL (type))
     return false;
 
-  if ((warn_strict_aliasing > 1) && TREE_CODE (expr) == ADDR_EXPR
+  if ((GCC_OPTION (warn_strict_aliasing) > 1) && TREE_CODE (expr) == ADDR_EXPR
       && (DECL_P (TREE_OPERAND (expr, 0))
           || handled_component_p (TREE_OPERAND (expr, 0))))
     {
       /* Casting the address of an object to non void pointer. Warn
          if the cast breaks type based aliasing.  */
-      if (!COMPLETE_TYPE_P (TREE_TYPE (type)) && warn_strict_aliasing == 2)
+      if (!COMPLETE_TYPE_P (TREE_TYPE (type)) && GCC_OPTION (warn_strict_aliasing) == 2)
 	{
 	  warning (OPT_Wstrict_aliasing, "type-punning to incomplete type "
 		   "might break strict-aliasing rules");
@@ -1867,7 +1867,7 @@ strict_aliasing_warning (tree otype, tree type, tree expr)
 		       "pointer will break strict-aliasing rules");
 	      return true;
 	    }
-          else if (warn_strict_aliasing == 2
+          else if (GCC_OPTION (warn_strict_aliasing) == 2
 		   && !alias_sets_must_conflict_p (set1, set2))
 	    {
 	      warning (OPT_Wstrict_aliasing, "dereferencing type-punned "
@@ -1877,7 +1877,7 @@ strict_aliasing_warning (tree otype, tree type, tree expr)
         }
     }
   else
-    if ((warn_strict_aliasing == 1) && !VOID_TYPE_P (TREE_TYPE (otype)))
+    if ((GCC_OPTION (warn_strict_aliasing) == 1) && !VOID_TYPE_P (TREE_TYPE (otype)))
       {
         /* At this level, warn for any conversions, even if an address is
            not taken in the same statement.  This will likely produce many
@@ -2285,7 +2285,7 @@ vector_types_convertible_p (const_tree t1, const_tree t2, bool emit_lax_note)
      && (INTEGRAL_TYPE_P (TREE_TYPE (t1))
 	 == INTEGRAL_TYPE_P (TREE_TYPE (t2))));
 
-  if (!convertible_lax || flag_lax_vector_conversions)
+  if (!convertible_lax || GCC_OPTION (flag_lax_vector_conversions))
     return convertible_lax;
 
   if (TYPE_VECTOR_SUBPARTS (t1) == TYPE_VECTOR_SUBPARTS (t2)
@@ -2717,7 +2717,7 @@ conversion_warning (location_t loc, tree type, tree expr)
   tree expr_type = TREE_TYPE (expr);
   enum conversion_safety conversion_kind;
 
-  if (!warn_conversion && !warn_sign_conversion && !warn_float_conversion)
+  if (!GCC_OPTION (warn_conversion) && !GCC_OPTION (warn_sign_conversion) && !GCC_OPTION (warn_float_conversion))
     return;
 
   /* This may happen, because for LHS op= RHS we preevaluate
@@ -2822,7 +2822,7 @@ warnings_for_convert_and_check (location_t loc, tree type, tree expr,
 	warning_at (loc, OPT_Woverflow,
 		 "overflow in implicit constant conversion");
       /* No warning for converting 0x80000000 to int.  */
-      else if (pedantic
+      else if (GCC_OPTION (pedantic)
 	       && (TREE_CODE (TREE_TYPE (expr)) != INTEGER_TYPE
 		   || TYPE_PRECISION (TREE_TYPE (expr))
 		   != TYPE_PRECISION (type)))
@@ -4297,7 +4297,7 @@ shorten_compare (location_t loc, tree *op0_ptr, tree *op1_ptr,
 	     the comparison isn't an issue, so suppress the
 	     warning.  */
 	  bool warn = 
-	    warn_type_limits && !in_system_header_at (loc)
+	    GCC_OPTION (warn_type_limits) && !in_system_header_at (loc)
 	    && !(TREE_CODE (primop0) == INTEGER_CST
 		 && !TREE_OVERFLOW (convert (c_common_signed_type (type),
 					     primop0)))
@@ -4357,7 +4357,7 @@ pointer_int_sum (location_t loc, enum tree_code resultcode,
 
   if (TREE_CODE (TREE_TYPE (result_type)) == VOID_TYPE)
     {
-      if (complain && warn_pointer_arith)
+      if (complain && GCC_OPTION (warn_pointer_arith))
 	pedwarn (loc, OPT_Wpointer_arith,
 		 "pointer of type %<void *%> used in arithmetic");
       else if (!complain)
@@ -4366,7 +4366,7 @@ pointer_int_sum (location_t loc, enum tree_code resultcode,
     }
   else if (TREE_CODE (TREE_TYPE (result_type)) == FUNCTION_TYPE)
     {
-      if (complain && warn_pointer_arith)
+      if (complain && GCC_OPTION (warn_pointer_arith))
 	pedwarn (loc, OPT_Wpointer_arith,
 		 "pointer to a function used in arithmetic");
       else if (!complain)
@@ -4674,7 +4674,7 @@ c_common_truthvalue_conversion (location_t location, tree expr)
 
     case MODIFY_EXPR:
       if (!TREE_NO_WARNING (expr)
-	  && warn_parentheses)
+	  && GCC_OPTION (warn_parentheses))
 	{
 	  warning (OPT_Wparentheses,
 		   "suggest parentheses around assignment used as truth value");
@@ -4950,7 +4950,7 @@ c_sizeof_or_alignof_type (location_t loc,
     {
       if (is_sizeof)
 	{
-	  if (complain && warn_pointer_arith)
+	  if (complain && GCC_OPTION (warn_pointer_arith))
 	    pedwarn (loc, OPT_Wpointer_arith,
 		     "invalid application of %<sizeof%> to a function type");
           else if (!complain)
@@ -4974,7 +4974,7 @@ c_sizeof_or_alignof_type (location_t loc,
   else if (type_code == VOID_TYPE || type_code == ERROR_MARK)
     {
       if (type_code == VOID_TYPE
-	  && complain && warn_pointer_arith)
+	  && complain && GCC_OPTION (warn_pointer_arith))
 	pedwarn (loc, OPT_Wpointer_arith,
 		 "invalid application of %qs to a void type", op_name);
       else if (!complain)
@@ -5269,7 +5269,7 @@ c_define_builtins (tree va_list_ref_type_node, tree va_list_arg_type_node)
 
   build_common_builtin_nodes ();
 
-  if (flag_cilkplus)
+  if (GCC_OPTION (flag_cilkplus))
     cilk_init_builtins ();
 }
 
@@ -5296,7 +5296,7 @@ c_common_nodes_and_builtins (void)
   tree va_list_ref_type_node;
   tree va_list_arg_type_node;
 
-  build_common_tree_nodes (flag_signed_char, flag_short_double);
+  build_common_tree_nodes (GCC_OPTION (flag_signed_char), GCC_OPTION (flag_short_double));
 
   /* Define `int' and `char' first so that dbx will output them first.  */
   record_builtin_type (RID_INT, NULL, integer_type_node);
@@ -5708,7 +5708,7 @@ c_common_nodes_and_builtins (void)
       va_list_ref_type_node = build_reference_type (va_list_type_node);
     }
 
-  if (!flag_preprocess_only)
+  if (!GCC_OPTION (flag_preprocess_only))
     c_define_builtins (va_list_ref_type_node, va_list_arg_type_node);
 
   main_identifier_node = get_identifier ("main");
@@ -5822,8 +5822,8 @@ def_builtin_1 (enum built_in_function fncode,
   set_builtin_decl (fncode, decl, implicit_p);
 
   if (both_p
-      && !flag_no_builtin && !builtin_function_disabled_p (libname)
-      && !(nonansi_p && flag_no_nonansi_builtin))
+      && !GCC_OPTION (flag_no_builtin) && !builtin_function_disabled_p (libname)
+      && !(nonansi_p && GCC_OPTION (flag_no_nonansi_builtin)))
     add_builtin_function (libname, libtype, fncode, fnclass,
 			  NULL, fnattrs);
 }
@@ -6112,12 +6112,12 @@ match_case_to_enum_1 (tree key, tree type, tree label)
 
   if (TYPE_NAME (type) == 0)
     warning_at (DECL_SOURCE_LOCATION (CASE_LABEL (label)),
-		warn_switch ? OPT_Wswitch : OPT_Wswitch_enum,
+		GCC_OPTION (warn_switch) ? OPT_Wswitch : OPT_Wswitch_enum,
 		"case value %qs not in enumerated type",
 		buf);
   else
     warning_at (DECL_SOURCE_LOCATION (CASE_LABEL (label)),
-		warn_switch ? OPT_Wswitch : OPT_Wswitch_enum,
+		GCC_OPTION (warn_switch) ? OPT_Wswitch : OPT_Wswitch_enum,
 		"case value %qs not in enumerated type %qT",
 		buf, type);
 }
@@ -6171,7 +6171,7 @@ c_do_switch_warnings (splay_tree cases, location_t switch_location,
   splay_tree_node node;
   tree chain;
 
-  if (!warn_switch && !warn_switch_enum && !warn_switch_default)
+  if (!GCC_OPTION (warn_switch) && !GCC_OPTION (warn_switch_enum) && !GCC_OPTION (warn_switch_default))
     return;
 
   default_node = splay_tree_lookup (cases, (splay_tree_key) NULL);
@@ -6184,7 +6184,7 @@ c_do_switch_warnings (splay_tree cases, location_t switch_location,
     return;
 
   /* From here on, we only care about -Wswitch and -Wswitch-enum.  */
-  if (!warn_switch_enum && !warn_switch)
+  if (!GCC_OPTION (warn_switch_enum) && !GCC_OPTION (warn_switch))
     return;
 
   /* Check the cases.  Warn about case values which are not members of
@@ -6246,7 +6246,7 @@ c_do_switch_warnings (splay_tree cases, location_t switch_location,
 	 to warn using -Wswitch because -Wswitch is enabled by -Wall
 	 while -Wswitch-enum is explicit.  */
       warning_at (switch_location,
-		  (default_node || !warn_switch
+		  (default_node || !GCC_OPTION (warn_switch)
 		   ? OPT_Wswitch_enum
 		   : OPT_Wswitch),
 		  "enumeration value %qE not handled in switch",
@@ -7469,7 +7469,7 @@ check_cxx_fundamental_alignment_constraints (tree node,
   unsigned requested_alignment = 1U << align_log;
   unsigned max_align = 0;
 
-  if ((!(flags & ATTR_FLAG_CXX11) && !warn_cxx_compat)
+  if ((!(flags & ATTR_FLAG_CXX11) && !GCC_OPTION (warn_cxx_compat))
       || (node == NULL_TREE || node == error_mark_node))
     return true;
 
@@ -7928,9 +7928,9 @@ c_determine_visibility (tree decl)
   if (!DECL_VISIBILITY_SPECIFIED (decl))
     {
       if (visibility_options.inpragma
-	  || DECL_VISIBILITY (decl) != default_visibility)
+	  || DECL_VISIBILITY (decl) != GCC_OPTION (default_visibility))
 	{
-	  DECL_VISIBILITY (decl) = default_visibility;
+	  DECL_VISIBILITY (decl) = GCC_OPTION (default_visibility);
 	  DECL_VISIBILITY_SPECIFIED (decl) = visibility_options.inpragma;
 	  /* If visibility changed and DECL already has DECL_RTL, ensure
 	     symbol flags are updated.  */
@@ -7975,7 +7975,7 @@ handle_tls_model_attribute (tree *node, tree name, tree args,
   else if (!strcmp (TREE_STRING_POINTER (id), "initial-exec"))
     kind = TLS_MODEL_INITIAL_EXEC;
   else if (!strcmp (TREE_STRING_POINTER (id), "local-dynamic"))
-    kind = optimize ? TLS_MODEL_LOCAL_DYNAMIC : TLS_MODEL_GLOBAL_DYNAMIC;
+    kind = GCC_OPTION (optimize) ? TLS_MODEL_LOCAL_DYNAMIC : TLS_MODEL_GLOBAL_DYNAMIC;
   else if (!strcmp (TREE_STRING_POINTER (id), "global-dynamic"))
     kind = TLS_MODEL_GLOBAL_DYNAMIC;
   else
@@ -8777,7 +8777,7 @@ check_function_sentinel (const_tree fntype, int nargs, tree *argarray)
 	     as wide as a pointer, and we don't want to force
 	     users to cast the NULL they have written there.
 	     We warn with -Wstrict-null-sentinel, though.  */
-	  && (warn_strict_null_sentinel || null_node != sentinel))
+	  && (GCC_OPTION (warn_strict_null_sentinel) || null_node != sentinel))
 	warning (OPT_Wformat_, "missing sentinel in function call");
     }
 }
@@ -9108,7 +9108,7 @@ parse_optimize_options (tree args, bool attr_p)
   for (i = 1; i < opt_argc; i++)
     opt_argv[i] = (*optimize_args)[i];
 
-  saved_flag_strict_aliasing = flag_strict_aliasing;
+  saved_flag_strict_aliasing = GCC_OPTION (flag_strict_aliasing);
 
   /* Now parse the options.  */
   decode_cmdline_options_to_array_default_mask (opt_argc, opt_argv,
@@ -9121,7 +9121,7 @@ parse_optimize_options (tree args, bool attr_p)
   targetm.override_options_after_change();
 
   /* Don't allow changing -fstrict-aliasing.  */
-  flag_strict_aliasing = saved_flag_strict_aliasing;
+  GCC_OPTION (flag_strict_aliasing) = saved_flag_strict_aliasing;
 
   optimize_args->truncate (0);
   return ret;
@@ -9217,15 +9217,15 @@ check_function_arguments (const_tree fntype, int nargs, tree *argarray)
   /* Check for null being passed in a pointer argument that must be
      non-null.  We also need to do this if format checking is enabled.  */
 
-  if (warn_nonnull)
+  if (GCC_OPTION (warn_nonnull))
     check_function_nonnull (TYPE_ATTRIBUTES (fntype), nargs, argarray);
 
   /* Check for errors in format strings.  */
 
-  if (warn_format || warn_suggest_attribute_format)
+  if (GCC_OPTION (warn_format) || GCC_OPTION (warn_suggest_attribute_format))
     check_function_format (TYPE_ATTRIBUTES (fntype), nargs, argarray);
 
-  if (warn_format)
+  if (GCC_OPTION (warn_format))
     check_function_sentinel (fntype, nargs, argarray);
 }
 
@@ -9683,7 +9683,7 @@ c_cpp_error (cpp_reader *pfile ATTRIBUTE_UNUSED, int level, int reason,
       dlevel = DK_WARNING;
       break;
     case CPP_DL_PEDWARN:
-      if (flag_no_output && !flag_pedantic_errors)
+      if (flag_no_output && !GCC_OPTION (flag_pedantic_errors))
 	return false;
       dlevel = DK_PEDWARN;
       break;
@@ -9730,7 +9730,7 @@ c_common_to_target_charset (HOST_WIDE_INT c)
 
   uc = cpp_host_to_exec_charset (parse_in, uc);
 
-  if (flag_signed_char)
+  if (GCC_OPTION (flag_signed_char))
     return ((HOST_WIDE_INT)uc) << (HOST_BITS_PER_WIDE_INT - CHAR_TYPE_SIZE)
 			       >> (HOST_BITS_PER_WIDE_INT - CHAR_TYPE_SIZE);
   else
@@ -10043,7 +10043,7 @@ complete_array_type (tree *ptype, tree initial_value, bool do_default)
 
 	  if (vec_safe_is_empty (v))
 	    {
-	      if (pedantic)
+	      if (GCC_OPTION (pedantic))
 		failure = 3;
 	      maxindex = ssize_int (-1);
 	    }
@@ -11011,7 +11011,7 @@ warn_about_parentheses (location_t loc, enum tree_code code,
 			enum tree_code code_left, tree arg_left,
 			enum tree_code code_right, tree arg_right)
 {
-  if (!warn_parentheses)
+  if (!GCC_OPTION (warn_parentheses))
     return;
 
   /* This macro tests that the expression ARG with original tree code
@@ -11364,7 +11364,7 @@ do_warn_double_promotion (tree result_type, tree type1, tree type2,
 {
   tree source_type;
 
-  if (!warn_double_promotion)
+  if (!GCC_OPTION (warn_double_promotion))
     return;
   /* If the conversion will not occur at run-time, there is no need to
      warn about it.  */
@@ -11473,7 +11473,7 @@ record_locally_defined_typedef (tree decl)
 {
   struct c_language_function *l;
 
-  if (!warn_unused_local_typedefs
+  if (!GCC_OPTION (warn_unused_local_typedefs)
       || cfun == NULL
       /* if this is not a locally defined typedef then we are not
 	 interested.  */
@@ -11517,7 +11517,7 @@ maybe_warn_unused_local_typedefs (void)
   if ((l = (struct c_language_function *) cfun->language) == NULL)
     return;
 
-  if (warn_unused_local_typedefs
+  if (GCC_OPTION (warn_unused_local_typedefs)
       && errorcount == unused_local_typedefs_warn_count)
     {
       FOR_EACH_VEC_SAFE_ELT (l->local_typedefs, i, decl)
diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
index 2f2e7ba..cfeeba8 100644
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -529,7 +529,7 @@ c_cpp_builtins_optimize_pragma (cpp_reader *pfile, tree prev_tree,
   bool cur_fast_math;
 
   /* -undef turns off target-specific built-ins.  */
-  if (flag_undef)
+  if (GCC_OPTION (flag_undef))
     return;
 
   /* Other target-independent built-ins determined by command-line
@@ -735,20 +735,20 @@ cpp_iec_559_value (void)
   if (flag_iso
       && !c_dialect_cxx ()
       && TARGET_FLT_EVAL_METHOD != 0
-      && flag_excess_precision_cmdline != EXCESS_PRECISION_STANDARD)
+      && GCC_OPTION (flag_excess_precision_cmdline) != EXCESS_PRECISION_STANDARD)
     ret = 0;
   if (flag_iso
       && !c_dialect_cxx ()
-      && flag_fp_contract_mode == FP_CONTRACT_FAST)
+      && GCC_OPTION (flag_fp_contract_mode) == FP_CONTRACT_FAST)
     ret = 0;
 
   /* Various options are contrary to IEEE 754 semantics.  */
-  if (flag_unsafe_math_optimizations
-      || flag_associative_math
-      || flag_reciprocal_math
-      || flag_finite_math_only
-      || !flag_signed_zeros
-      || flag_single_precision_constant)
+  if (GCC_OPTION (flag_unsafe_math_optimizations)
+      || GCC_OPTION (flag_associative_math)
+      || GCC_OPTION (flag_reciprocal_math)
+      || GCC_OPTION (flag_finite_math_only)
+      || !GCC_OPTION (flag_signed_zeros)
+      || GCC_OPTION (flag_single_precision_constant))
     ret = 0;
 
   /* If the target does not support IEEE 754 exceptions and rounding
@@ -768,7 +768,7 @@ cpp_iec_559_complex_value (void)
 
   /* Some options are contrary to the required default state of the
      CX_LIMITED_RANGE pragma.  */
-  if (flag_complex_method != 2)
+  if (GCC_OPTION (flag_complex_method) != 2)
     ret = 0;
 
   return ret;
@@ -779,7 +779,7 @@ void
 c_cpp_builtins (cpp_reader *pfile)
 {
   /* -undef turns off target-specific built-ins.  */
-  if (flag_undef)
+  if (GCC_OPTION (flag_undef))
     return;
 
   define_language_independent_builtin_macros (pfile);
@@ -796,25 +796,25 @@ c_cpp_builtins (cpp_reader *pfile)
 
   if (c_dialect_cxx ())
     {
-      if (flag_weak && SUPPORTS_ONE_ONLY)
+      if (GCC_OPTION (flag_weak) && SUPPORTS_ONE_ONLY)
 	cpp_define (pfile, "__GXX_WEAK__=1");
       else
 	cpp_define (pfile, "__GXX_WEAK__=0");
-      if (warn_deprecated)
+      if (GCC_OPTION (warn_deprecated))
 	cpp_define (pfile, "__DEPRECATED");
-      if (flag_rtti)
+      if (GCC_OPTION (flag_rtti))
 	cpp_define (pfile, "__GXX_RTTI");
       if (cxx_dialect >= cxx11)
         cpp_define (pfile, "__GXX_EXPERIMENTAL_CXX0X__");
     }
   /* Note that we define this for C as well, so that we know if
      __attribute__((cleanup)) will interface with EH.  */
-  if (flag_exceptions)
+  if (GCC_OPTION (flag_exceptions))
     cpp_define (pfile, "__EXCEPTIONS");
 
   /* Represents the C++ ABI version, always defined so it can be used while
      preprocessing C and assembler.  */
-  if (flag_abi_version == 0)
+  if (GCC_OPTION (flag_abi_version) == 0)
     /* Use a very large value so that:
 
 	 #if __GXX_ABI_VERSION >= <value for version X>
@@ -823,14 +823,14 @@ c_cpp_builtins (cpp_reader *pfile)
        "-fabi-version=0".  Do not use INT_MAX because that will be
        different from system to system.  */
     builtin_define_with_int_value ("__GXX_ABI_VERSION", 999999);
-  else if (flag_abi_version == 1)
+  else if (GCC_OPTION (flag_abi_version) == 1)
     /* Due to a historical accident, this version had the value
        "102".  */
     builtin_define_with_int_value ("__GXX_ABI_VERSION", 102);
   else
     /* Newer versions have values 1002, 1003, ....  */
     builtin_define_with_int_value ("__GXX_ABI_VERSION",
-				   1000 + flag_abi_version);
+				   1000 + GCC_OPTION (flag_abi_version));
 
   /* libgcc needs to know this.  */
   if (targetm_common.except_unwind_info (&global_options) == UI_SJLJ)
@@ -942,7 +942,7 @@ c_cpp_builtins (cpp_reader *pfile)
     }
 
   /* For libgcc-internal use only.  */
-  if (flag_building_libgcc)
+  if (GCC_OPTION (flag_building_libgcc))
     /* For libgcc enable-execute-stack.c.  */
     builtin_define_with_int_value ("__LIBGCC_TRAMPOLINE_SIZE__",
 				   TRAMPOLINE_SIZE);
@@ -952,18 +952,18 @@ c_cpp_builtins (cpp_reader *pfile)
   builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
 
   /* Misc.  */
-  if (flag_gnu89_inline)
+  if (GCC_OPTION (flag_gnu89_inline))
     cpp_define (pfile, "__GNUC_GNU_INLINE__");
   else
     cpp_define (pfile, "__GNUC_STDC_INLINE__");
 
-  if (flag_no_inline)
+  if (GCC_OPTION (flag_no_inline))
     cpp_define (pfile, "__NO_INLINE__");
 
   if (flag_iso)
     cpp_define (pfile, "__STRICT_ANSI__");
 
-  if (!flag_signed_char)
+  if (!GCC_OPTION (flag_signed_char))
     cpp_define (pfile, "__CHAR_UNSIGNED__");
 
   if (c_dialect_cxx () && TYPE_UNSIGNED (wchar_type_node))
@@ -977,7 +977,7 @@ c_cpp_builtins (cpp_reader *pfile)
 #endif
 
   /* Make the choice of ObjC runtime visible to source code.  */
-  if (c_dialect_objc () && flag_next_runtime)
+  if (c_dialect_objc () && GCC_OPTION (flag_next_runtime))
     cpp_define (pfile, "__NEXT_RUNTIME__");
 
   /* Show the availability of some target pragmas.  */
@@ -986,14 +986,14 @@ c_cpp_builtins (cpp_reader *pfile)
   /* Make the choice of the stack protector runtime visible to source code.
      The macro names and values here were chosen for compatibility with an
      earlier implementation, i.e. ProPolice.  */
-  if (flag_stack_protect == 3)
+  if (GCC_OPTION (flag_stack_protect) == 3)
     cpp_define (pfile, "__SSP_STRONG__=3");
-  if (flag_stack_protect == 2)
+  if (GCC_OPTION (flag_stack_protect) == 2)
     cpp_define (pfile, "__SSP_ALL__=2");
-  else if (flag_stack_protect == 1)
+  else if (GCC_OPTION (flag_stack_protect) == 1)
     cpp_define (pfile, "__SSP__=1");
 
-  if (flag_openmp)
+  if (GCC_OPTION (flag_openmp))
     cpp_define (pfile, "_OPENMP=201307");
 
   if (int128_integer_type_node != NULL_TREE)
diff --git a/gcc/c-family/c-format.c b/gcc/c-family/c-format.c
index cdc09c4..85a3129 100644
--- a/gcc/c-family/c-format.c
+++ b/gcc/c-family/c-format.c
@@ -331,7 +331,7 @@ decode_format_attr (tree args, function_format_info *info, int validated_p)
 /* Adjust a C standard version, which may be STD_C9L, to account for
    -Wno-long-long.  Returns other standard versions unchanged.  */
 #define ADJ_STD(VER)		((int) ((VER) == STD_C9L		      \
-				       ? (warn_long_long ? STD_C99 : STD_C89) \
+				       ? (GCC_OPTION (warn_long_long) ? STD_C99 : STD_C89) \
 				       : (VER)))
 
 /* Enum describing the kind of specifiers present in the format and
@@ -1004,7 +1004,7 @@ check_function_format (tree attrs, int nargs, tree *argarray)
 	  /* Yup; check it.  */
 	  function_format_info info;
 	  decode_format_attr (TREE_VALUE (a), &info, 1);
-	  if (warn_format)
+	  if (GCC_OPTION (warn_format))
 	    {
 	      /* FIXME: Rewrite all the internal functions in this file
 		 to use the ARGARRAY directly instead of constructing this
@@ -1015,7 +1015,7 @@ check_function_format (tree attrs, int nargs, tree *argarray)
 		params = tree_cons (NULL_TREE, argarray[i], params);
 	      check_format_info (&info, params);
 	    }
-	  if (warn_suggest_attribute_format && info.first_arg_num == 0
+	  if (GCC_OPTION (warn_suggest_attribute_format) && info.first_arg_num == 0
 	      && (format_types[info.format_type].flags
 		  & (int) FMT_FLAG_ARG_CONVERT))
 	    {
@@ -1163,7 +1163,7 @@ maybe_read_dollar_number (const char **format,
 	return 0;
     }
   *format = fcp + 1;
-  if (pedantic && !dollar_format_warned)
+  if (GCC_OPTION (pedantic) && !dollar_format_warned)
     {
       warning (OPT_Wformat_, "%s does not support %%n$ operand number formats",
 	       C_STD_NAME (STD_EXT));
@@ -1366,10 +1366,10 @@ check_format_info (function_format_info *info, tree params)
 	      params = TREE_CHAIN (params);
 	      ++arg_num;
 	    }
-	  if (params == 0 && warn_format_security)
+	  if (params == 0 && GCC_OPTION (warn_format_security))
 	    warning (OPT_Wformat_security,
 		     "format not a string literal and no format arguments");
-	  else if (params == 0 && warn_format_nonliteral)
+	  else if (params == 0 && GCC_OPTION (warn_format_nonliteral))
 	    warning (OPT_Wformat_nonliteral,
 		     "format not a string literal and no format arguments");
 	  else
@@ -1947,7 +1947,7 @@ check_format_info_main (format_check_results *res,
 	      flag_chars[i++] = fki->length_code_char;
 	      flag_chars[i] = 0;
 	    }
-	  if (pedantic)
+	  if (GCC_OPTION (pedantic))
 	    {
 	      /* Warn if the length modifier is non-standard.  */
 	      if (ADJ_STD (length_chars_std) > C_STD_VER)
@@ -2003,7 +2003,7 @@ check_format_info_main (format_check_results *res,
 		     format_char);
 	  continue;
 	}
-      if (pedantic)
+      if (GCC_OPTION (pedantic))
 	{
 	  if (ADJ_STD (fci->std) > C_STD_VER)
 	    warning (OPT_Wformat_, "%s does not support the %<%%%c%> %s format",
@@ -2027,7 +2027,7 @@ check_format_info_main (format_check_results *res,
 		d++;
 		continue;
 	      }
-	    if (pedantic)
+	    if (GCC_OPTION (pedantic))
 	      {
 		const format_flag_spec *t;
 		if (ADJ_STD (s->std) > C_STD_VER)
@@ -2098,7 +2098,7 @@ check_format_info_main (format_check_results *res,
 	}
 
       /* Give Y2K warnings.  */
-      if (warn_format_y2k)
+      if (GCC_OPTION (warn_format_y2k))
 	{
 	  int y2k_level = 0;
 	  if (strchr (fci->flags2, '4') != 0)
@@ -2154,7 +2154,7 @@ check_format_info_main (format_check_results *res,
                 params = TREE_CHAIN (params);
 	      continue;
 	    }
-	  else if (pedantic
+	  else if (GCC_OPTION (pedantic)
 		   /* Warn if non-standard, provided it is more non-standard
 		      than the length and type characters that may already
 		      have been warned for.  */
@@ -2372,7 +2372,7 @@ check_format_types (format_wanted_type *types)
 		 indirection, then this makes the types technically
 		 incompatible.  */
 	      if (i > 0
-		  && pedantic
+		  && GCC_OPTION (pedantic)
 		  && (TYPE_READONLY (cur_type)
 		      || TYPE_VOLATILE (cur_type)
 		      || TYPE_ATOMIC (cur_type)
@@ -2410,7 +2410,7 @@ check_format_types (format_wanted_type *types)
 	 With -Wpedantic, only allow pointers to void and to character
 	 types.  */
       if (wanted_type == void_type_node
-	  && (!pedantic || (i == 1 && char_type_flag)))
+	  && (!GCC_OPTION (pedantic) || (i == 1 && char_type_flag)))
 	continue;
       /* Don't warn about differences merely in signedness, unless
 	 -Wpedantic.  With -Wpedantic, warn if the type is a pointer
@@ -2418,7 +2418,7 @@ check_format_types (format_wanted_type *types)
 	 a second level of indirection.  */
       if (TREE_CODE (wanted_type) == INTEGER_TYPE
 	  && TREE_CODE (cur_type) == INTEGER_TYPE
-	  && (!pedantic || i == 0 || (i == 1 && char_type_flag))
+	  && (!GCC_OPTION (pedantic) || i == 0 || (i == 1 && char_type_flag))
 	  && (TYPE_UNSIGNED (wanted_type)
 	      ? wanted_type == c_common_unsigned_type (cur_type)
 	      : wanted_type == c_common_signed_type (cur_type)))
@@ -2426,7 +2426,7 @@ check_format_types (format_wanted_type *types)
       /* Likewise, "signed char", "unsigned char" and "char" are
 	 equivalent but the above test won't consider them equivalent.  */
       if (wanted_type == char_type_node
-	  && (!pedantic || i < 2)
+	  && (!GCC_OPTION (pedantic) || i < 2)
 	  && char_type_flag)
 	continue;
       if (types->scalar_identity_flag
diff --git a/gcc/c-family/c-gimplify.c b/gcc/c-family/c-gimplify.c
index 737be4d..49460f67 100644
--- a/gcc/c-family/c-gimplify.c
+++ b/gcc/c-family/c-gimplify.c
@@ -187,7 +187,7 @@ c_gimplify_expr (tree *expr_p, gimple_seq *pre_p ATTRIBUTE_UNUSED,
 	  && !DECL_EXTERNAL (DECL_EXPR_DECL (*expr_p))
 	  && !TREE_STATIC (DECL_EXPR_DECL (*expr_p))
 	  && (DECL_INITIAL (DECL_EXPR_DECL (*expr_p)) == DECL_EXPR_DECL (*expr_p))
-	  && !warn_init_self)
+	  && !GCC_OPTION (warn_init_self))
 	TREE_NO_WARNING (DECL_EXPR_DECL (*expr_p)) = 1;
       break;
 
@@ -200,7 +200,7 @@ c_gimplify_expr (tree *expr_p, gimple_seq *pre_p ATTRIBUTE_UNUSED,
 	if (INTEGRAL_TYPE_P (type) && c_promoting_integer_type_p (type))
 	  {
 	    if (TYPE_OVERFLOW_UNDEFINED (type)
-		|| ((flag_sanitize & SANITIZE_SI_OVERFLOW)
+		|| ((GCC_OPTION (flag_sanitize) & SANITIZE_SI_OVERFLOW)
 		    && !TYPE_OVERFLOW_WRAPS (type)))
 	      type = unsigned_type_for (type);
 	    return gimplify_self_mod_expr (expr_p, pre_p, post_p, 1, type);
diff --git a/gcc/c-family/c-lex.c b/gcc/c-family/c-lex.c
index e3e1da2..007d2d2 100644
--- a/gcc/c-family/c-lex.c
+++ b/gcc/c-family/c-lex.c
@@ -71,7 +71,7 @@ init_c_lex (void)
   /* The get_fileinfo data structure must be initialized before
      cpp_read_main_file is called.  */
   toplevel = get_fileinfo ("<top level>");
-  if (flag_detailed_statistics)
+  if (GCC_OPTION (flag_detailed_statistics))
     {
       header_time = 0;
       body_time = get_run_time ();
@@ -87,10 +87,10 @@ init_c_lex (void)
   cb->read_pch = c_common_read_pch;
 
   /* Set the debug callbacks if we can use them.  */
-  if ((debug_info_level == DINFO_LEVEL_VERBOSE
-       && (write_symbols == DWARF2_DEBUG
-	   || write_symbols == VMS_AND_DWARF2_DEBUG))
-      || flag_dump_go_spec != NULL)
+  if ((GCC_OPTION (debug_info_level) == DINFO_LEVEL_VERBOSE
+       && (GCC_OPTION (write_symbols) == DWARF2_DEBUG
+	   || GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG))
+      || GCC_OPTION (flag_dump_go_spec) != NULL)
     {
       cb->define = cb_define;
       cb->undef = cb_undef;
@@ -126,7 +126,7 @@ update_header_times (const char *name)
 {
   /* Changing files again.  This means currently collected time
      is charged against header time, and body time starts back at 0.  */
-  if (flag_detailed_statistics)
+  if (GCC_OPTION (flag_detailed_statistics))
     {
       int this_time = get_run_time ();
       struct c_fileinfo *file = get_fileinfo (name);
@@ -166,7 +166,7 @@ cb_ident (cpp_reader * ARG_UNUSED (pfile),
 	  unsigned int ARG_UNUSED (line),
 	  const cpp_string * ARG_UNUSED (str))
 {
-  if (!flag_no_ident)
+  if (!GCC_OPTION (flag_no_ident))
     {
       /* Convert escapes in the string.  */
       cpp_string cstr = { 0, 0 };
@@ -243,7 +243,7 @@ cb_def_pragma (cpp_reader *pfile, source_location loc)
   /* Issue a warning message if we have been asked to do so.  Ignore
      unknown pragmas in system headers unless an explicit
      -Wunknown-pragmas has been given.  */
-  if (warn_unknown_pragmas > in_system_header_at (input_location))
+  if (GCC_OPTION (warn_unknown_pragmas) > in_system_header_at (input_location))
     {
       const unsigned char *space, *name;
       const cpp_token *s;
@@ -748,7 +748,7 @@ interpret_float (const cpp_token *token, unsigned int flags,
     else if ((flags & CPP_N_WIDTH) == CPP_N_LARGE)
       type = long_double_type_node;
     else if ((flags & CPP_N_WIDTH) == CPP_N_SMALL
-	     || flag_single_precision_constant)
+	     || GCC_OPTION (flag_single_precision_constant))
       type = float_type_node;
     else
       type = double_type_node;
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 92ba481..0517c3e 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -442,7 +442,7 @@ c_common_handle_option (size_t scode, const char *arg, int value,
       /* Set to greater than 1, so that even unknown pragmas in
 	 system headers will be warned about.  */
       /* ??? There is no way to handle this automatically for now.  */
-      warn_unknown_pragmas = value * 2;
+      GCC_OPTION (warn_unknown_pragmas) = value * 2;
       break;
 
     case OPT_ansi:
@@ -489,7 +489,7 @@ c_common_handle_option (size_t scode, const char *arg, int value,
       /* Fall through....  */
     case OPT_fhosted:
       flag_hosted = value;
-      flag_no_builtin = !value;
+      GCC_OPTION (flag_no_builtin) = !value;
       break;
 
     case OPT_fconstant_string_class_:
@@ -513,7 +513,7 @@ c_common_handle_option (size_t scode, const char *arg, int value,
       break;
 
     case OPT_fpermissive:
-      flag_permissive = value;
+      GCC_OPTION (flag_permissive) = value;
       global_dc->permissive = value;
       break;
 
@@ -540,7 +540,7 @@ c_common_handle_option (size_t scode, const char *arg, int value,
     case OPT_frepo:
       flag_use_repository = value;
       if (value)
-	flag_implicit_templates = 0;
+	GCC_OPTION (flag_implicit_templates) = 0;
       break;
 
     case OPT_ftabstop_:
@@ -729,7 +729,7 @@ c_common_handle_option (size_t scode, const char *arg, int value,
       break;
 
     case OPT_Wabi:
-      warn_psabi = value;
+      GCC_OPTION (warn_psabi) = value;
       break;
     }
 
@@ -818,13 +818,13 @@ c_common_post_options (const char **pfilename)
      support.  */
   if (c_dialect_cxx ())
     {
-      if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD
+      if (GCC_OPTION (flag_excess_precision_cmdline) == EXCESS_PRECISION_STANDARD
 	  && TARGET_FLT_EVAL_METHOD_NON_DEFAULT)
 	sorry ("-fexcess-precision=standard for C++");
-      flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
+      GCC_OPTION (flag_excess_precision_cmdline) = EXCESS_PRECISION_FAST;
     }
-  else if (flag_excess_precision_cmdline == EXCESS_PRECISION_DEFAULT)
-    flag_excess_precision_cmdline = (flag_iso
+  else if (GCC_OPTION (flag_excess_precision_cmdline) == EXCESS_PRECISION_DEFAULT)
+    GCC_OPTION (flag_excess_precision_cmdline) = (flag_iso
 				     ? EXCESS_PRECISION_STANDARD
 				     : EXCESS_PRECISION_FAST);
 
@@ -835,52 +835,52 @@ c_common_post_options (const char **pfilename)
       && !c_dialect_cxx ()
       && (global_options_set.x_flag_fp_contract_mode
 	  == (enum fp_contract_mode) 0)
-      && flag_unsafe_math_optimizations == 0)
-    flag_fp_contract_mode = FP_CONTRACT_OFF;
+      && GCC_OPTION (flag_unsafe_math_optimizations) == 0)
+    GCC_OPTION (flag_fp_contract_mode) = FP_CONTRACT_OFF;
 
   /* By default we use C99 inline semantics in GNU99 or C99 mode.  C99
      inline semantics are not supported in GNU89 or C89 mode.  */
-  if (flag_gnu89_inline == -1)
-    flag_gnu89_inline = !flag_isoc99;
-  else if (!flag_gnu89_inline && !flag_isoc99)
+  if (GCC_OPTION (flag_gnu89_inline) == -1)
+    GCC_OPTION (flag_gnu89_inline) = !flag_isoc99;
+  else if (!GCC_OPTION (flag_gnu89_inline) && !flag_isoc99)
     error ("-fno-gnu89-inline is only supported in GNU99 or C99 mode");
 
   /* Default to ObjC sjlj exception handling if NeXT runtime.  */
-  if (flag_objc_sjlj_exceptions < 0)
-    flag_objc_sjlj_exceptions = flag_next_runtime;
-  if (flag_objc_exceptions && !flag_objc_sjlj_exceptions)
-    flag_exceptions = 1;
+  if (GCC_OPTION (flag_objc_sjlj_exceptions) < 0)
+    GCC_OPTION (flag_objc_sjlj_exceptions) = GCC_OPTION (flag_next_runtime);
+  if (GCC_OPTION (flag_objc_exceptions) && !GCC_OPTION (flag_objc_sjlj_exceptions))
+    GCC_OPTION (flag_exceptions) = 1;
 
   /* -Woverlength-strings is off by default, but is enabled by -Wpedantic.
      It is never enabled in C++, as the minimum limit is not normative
      in that standard.  */
   if (c_dialect_cxx ())
-    warn_overlength_strings = 0;
+    GCC_OPTION (warn_overlength_strings) = 0;
 
   /* Wmain is enabled by default in C++ but not in C.  */
   /* Wmain is disabled by default for -ffreestanding (!flag_hosted),
      even if -Wall or -Wpedantic was given (warn_main will be 2 if set
      by -Wall, 1 if set by -Wmain).  */
-  if (warn_main == -1)
-    warn_main = (c_dialect_cxx () && flag_hosted) ? 1 : 0;
-  else if (warn_main == 2)
-    warn_main = flag_hosted ? 1 : 0;
+  if (GCC_OPTION (warn_main) == -1)
+    GCC_OPTION (warn_main) = (c_dialect_cxx () && flag_hosted) ? 1 : 0;
+  else if (GCC_OPTION (warn_main) == 2)
+    GCC_OPTION (warn_main) = flag_hosted ? 1 : 0;
 
   /* In C, -Wall and -Wc++-compat enable -Wenum-compare; if it has not
      yet been set, it is disabled by default.  In C++, it is enabled
      by default.  */
-  if (warn_enum_compare == -1)
-    warn_enum_compare = c_dialect_cxx () ? 1 : 0;
+  if (GCC_OPTION (warn_enum_compare) == -1)
+    GCC_OPTION (warn_enum_compare) = c_dialect_cxx () ? 1 : 0;
 
   /* -Wpacked-bitfield-compat is on by default for the C languages.  The
      warning is issued in stor-layout.c which is not part of the front-end so
      we need to selectively turn it on here.  */
-  if (warn_packed_bitfield_compat == -1)
-    warn_packed_bitfield_compat = 1;
+  if (GCC_OPTION (warn_packed_bitfield_compat) == -1)
+    GCC_OPTION (warn_packed_bitfield_compat) = 1;
 
   /* Special format checking options don't work without -Wformat; warn if
      they are used.  */
-  if (!warn_format)
+  if (!GCC_OPTION (warn_format))
     {
       warning (OPT_Wformat_y2k,
 	       "-Wformat-y2k ignored without -Wformat");
@@ -897,40 +897,40 @@ c_common_post_options (const char **pfilename)
     }
 
   /* -Wimplicit-function-declaration is enabled by default for C99.  */
-  if (warn_implicit_function_declaration == -1)
-    warn_implicit_function_declaration = flag_isoc99;
+  if (GCC_OPTION (warn_implicit_function_declaration) == -1)
+    GCC_OPTION (warn_implicit_function_declaration) = flag_isoc99;
 
   /* Declone C++ 'structors if -Os.  */
-  if (flag_declone_ctor_dtor == -1)
-    flag_declone_ctor_dtor = optimize_size;
+  if (GCC_OPTION (flag_declone_ctor_dtor) == -1)
+    GCC_OPTION (flag_declone_ctor_dtor) = GCC_OPTION (optimize_size);
 
   if (cxx_dialect >= cxx11)
     {
       /* If we're allowing C++0x constructs, don't warn about C++98
 	 identifiers which are keywords in C++0x.  */
-      warn_cxx0x_compat = 0;
+      GCC_OPTION (warn_cxx0x_compat) = 0;
 
-      if (warn_narrowing == -1)
-	warn_narrowing = 1;
+      if (GCC_OPTION (warn_narrowing) == -1)
+	GCC_OPTION (warn_narrowing) = 1;
     }
-  else if (warn_narrowing == -1)
-    warn_narrowing = 0;
+  else if (GCC_OPTION (warn_narrowing) == -1)
+    GCC_OPTION (warn_narrowing) = 0;
 
-  if (flag_extern_tls_init)
+  if (GCC_OPTION (flag_extern_tls_init))
     {
 #if !defined (ASM_OUTPUT_DEF) || !SUPPORTS_WEAK
       /* Lazy TLS initialization for a variable in another TU requires
 	 alias and weak reference support. */
-      if (flag_extern_tls_init > 0)
+      if (GCC_OPTION (flag_extern_tls_init) > 0)
 	sorry ("external TLS initialization functions not supported "
 	       "on this target");
-      flag_extern_tls_init = 0;
+      GCC_OPTION (flag_extern_tls_init) = 0;
 #else
-      flag_extern_tls_init = 1;
+      GCC_OPTION (flag_extern_tls_init) = 1;
 #endif
     }
 
-  if (flag_preprocess_only)
+  if (GCC_OPTION (flag_preprocess_only))
     {
       /* Open the output now.  We must do so even if flag_no_output is
 	 on, because there may be other output than from the actual
@@ -964,12 +964,12 @@ c_common_post_options (const char **pfilename)
 	  c_common_no_more_pch ();
 	  /* Only -g0 and -gdwarf* are supported with PCH, for other
 	     debug formats we warn here and refuse to load any PCH files.  */
-	  if (write_symbols != NO_DEBUG && write_symbols != DWARF2_DEBUG)
+	  if (GCC_OPTION (write_symbols) != NO_DEBUG && GCC_OPTION (write_symbols) != DWARF2_DEBUG)
 	    warning (OPT_Wdeprecated,
 		     "the \"%s\" debug format cannot be used with "
-		     "pre-compiled headers", debug_type_names[write_symbols]);
+		     "pre-compiled headers", debug_type_names[GCC_OPTION (write_symbols)]);
 	}
-      else if (write_symbols != NO_DEBUG && write_symbols != DWARF2_DEBUG)
+      else if (GCC_OPTION (write_symbols) != NO_DEBUG && GCC_OPTION (write_symbols) != DWARF2_DEBUG)
 	c_common_no_more_pch ();
 
       /* Yuk.  WTF is this?  I do know ObjC relies on it somewhere.  */
@@ -992,18 +992,18 @@ c_common_post_options (const char **pfilename)
       return false;
     }
 
-  if (flag_working_directory
-      && flag_preprocess_only && !flag_no_line_commands)
+  if (GCC_OPTION (flag_working_directory)
+      && GCC_OPTION (flag_preprocess_only) && !flag_no_line_commands)
     pp_dir_change (parse_in, get_src_pwd ());
 
   /* Disable LTO output when outputting a precompiled header.  */
-  if (pch_file && flag_lto)
+  if (pch_file && GCC_OPTION (flag_lto))
     {
-      flag_lto = 0;
-      flag_generate_lto = 0;
+      GCC_OPTION (flag_lto) = 0;
+      GCC_OPTION (flag_generate_lto) = 0;
     }
 
-  return flag_preprocess_only;
+  return GCC_OPTION (flag_preprocess_only);
 }
 
 /* Front end initialization common to C, ObjC and C++.  */
@@ -1023,7 +1023,7 @@ c_common_init (void)
      are known.  */
   cpp_init_iconv (parse_in);
 
-  if (version_flag)
+  if (GCC_OPTION (version_flag))
     {
       int i;
       fputs ("Compiler executable checksum: ", stderr);
@@ -1035,7 +1035,7 @@ c_common_init (void)
   /* Has to wait until now so that cpplib has its hash table.  */
   init_pragma ();
 
-  if (flag_preprocess_only)
+  if (GCC_OPTION (flag_preprocess_only))
     {
       c_finish_options ();
       preprocess_file (parse_in);
@@ -1211,35 +1211,35 @@ sanitize_cpp_opts (void)
   else if (cpp_opts->deps.missing_files)
     error ("-MG may only be used with -M or -MM");
 
-  cpp_opts->unsigned_char = !flag_signed_char;
+  cpp_opts->unsigned_char = !GCC_OPTION (flag_signed_char);
   cpp_opts->stdc_0_in_system_headers = STDC_0_IN_SYSTEM_HEADERS;
-  cpp_opts->warn_date_time = cpp_warn_date_time;
+  cpp_opts->warn_date_time = GCC_OPTION (cpp_warn_date_time);
 
   /* Wlong-long is disabled by default. It is enabled by:
       [-Wpedantic | -Wtraditional] -std=[gnu|c]++98 ; or
       [-Wpedantic | -Wtraditional] -std=non-c99 .
 
       Either -Wlong-long or -Wno-long-long override any other settings.  */
-  if (warn_long_long == -1)
-    warn_long_long = ((pedantic || warn_traditional)
+  if (GCC_OPTION (warn_long_long) == -1)
+    GCC_OPTION (warn_long_long) = ((GCC_OPTION (pedantic) || GCC_OPTION (warn_traditional))
 		      && (c_dialect_cxx () ? cxx_dialect == cxx98 : !flag_isoc99));
-  cpp_opts->cpp_warn_long_long = warn_long_long;
+  cpp_opts->cpp_warn_long_long = GCC_OPTION (warn_long_long);
 
   /* Similarly with -Wno-variadic-macros.  No check for c99 here, since
      this also turns off warnings about GCCs extension.  */
   cpp_opts->warn_variadic_macros
-    = cpp_warn_variadic_macros && (pedantic || warn_traditional);
+    = GCC_OPTION (cpp_warn_variadic_macros) && (GCC_OPTION (pedantic) || GCC_OPTION (warn_traditional));
 
   /* If we're generating preprocessor output, emit current directory
      if explicitly requested or if debugging information is enabled.
      ??? Maybe we should only do it for debugging formats that
      actually output the current directory?  */
-  if (flag_working_directory == -1)
-    flag_working_directory = (debug_info_level != DINFO_LEVEL_NONE);
+  if (GCC_OPTION (flag_working_directory) == -1)
+    GCC_OPTION (flag_working_directory) = (GCC_OPTION (debug_info_level) != DINFO_LEVEL_NONE);
 
   if (cpp_opts->directives_only)
     {
-      if (cpp_warn_unused_macros)
+      if (GCC_OPTION (cpp_warn_unused_macros))
 	error ("-fdirectives-only is incompatible with -Wunused_macros");
       if (cpp_opts->traditional)
 	error ("-fdirectives-only is incompatible with -traditional");
@@ -1320,7 +1320,7 @@ c_finish_options (void)
 
       /* Start the main input file, if the debug writer wants it. */
       if (debug_hooks->start_end_main_source_file
-	  && !flag_preprocess_only)
+	  && !GCC_OPTION (flag_preprocess_only))
 	(*debug_hooks->start_source_file) (0, this_input_filename);
 
       /* Handle -imacros after -D and -U.  */
@@ -1344,7 +1344,7 @@ c_finish_options (void)
 
       /* Start the main input file, if the debug writer wants it. */
       if (debug_hooks->start_end_main_source_file
-	  && !flag_preprocess_only)
+	  && !GCC_OPTION (flag_preprocess_only))
 	(*debug_hooks->start_source_file) (0, this_input_filename);
     }
 
@@ -1382,7 +1382,7 @@ push_command_line_include (void)
     {
       include_cursor++;
       /* -Wunused-macros should only warn about macros defined hereafter.  */
-      cpp_opts->warn_unused_macros = cpp_warn_unused_macros;
+      cpp_opts->warn_unused_macros = GCC_OPTION (cpp_warn_unused_macros);
       /* Restore the line map from <command line>.  */
       if (!cpp_opts->preprocessed)
 	cpp_change_file (parse_in, LC_RENAME, this_input_filename);
@@ -1398,7 +1398,7 @@ static void
 cb_file_change (cpp_reader * ARG_UNUSED (pfile),
 		const struct line_map *new_map)
 {
-  if (flag_preprocess_only)
+  if (GCC_OPTION (flag_preprocess_only))
     pp_file_change (new_map);
   else
     fe_file_change (new_map);
@@ -1435,9 +1435,9 @@ set_std_c89 (int c94, int iso)
 {
   cpp_set_lang (parse_in, c94 ? CLK_STDC94: iso ? CLK_STDC89: CLK_GNUC89);
   flag_iso = iso;
-  flag_no_asm = iso;
-  flag_no_gnu_keywords = iso;
-  flag_no_nonansi_builtin = iso;
+  GCC_OPTION (flag_no_asm) = iso;
+  GCC_OPTION (flag_no_gnu_keywords) = iso;
+  GCC_OPTION (flag_no_nonansi_builtin) = iso;
   flag_isoc94 = c94;
   flag_isoc99 = 0;
   flag_isoc11 = 0;
@@ -1448,8 +1448,8 @@ static void
 set_std_c99 (int iso)
 {
   cpp_set_lang (parse_in, iso ? CLK_STDC99: CLK_GNUC99);
-  flag_no_asm = iso;
-  flag_no_nonansi_builtin = iso;
+  GCC_OPTION (flag_no_asm) = iso;
+  GCC_OPTION (flag_no_nonansi_builtin) = iso;
   flag_iso = iso;
   flag_isoc11 = 0;
   flag_isoc99 = 1;
@@ -1461,8 +1461,8 @@ static void
 set_std_c11 (int iso)
 {
   cpp_set_lang (parse_in, iso ? CLK_STDC11: CLK_GNUC11);
-  flag_no_asm = iso;
-  flag_no_nonansi_builtin = iso;
+  GCC_OPTION (flag_no_asm) = iso;
+  GCC_OPTION (flag_no_nonansi_builtin) = iso;
   flag_iso = iso;
   flag_isoc11 = 1;
   flag_isoc99 = 1;
@@ -1474,8 +1474,8 @@ static void
 set_std_cxx98 (int iso)
 {
   cpp_set_lang (parse_in, iso ? CLK_CXX98: CLK_GNUCXX);
-  flag_no_gnu_keywords = iso;
-  flag_no_nonansi_builtin = iso;
+  GCC_OPTION (flag_no_gnu_keywords) = iso;
+  GCC_OPTION (flag_no_nonansi_builtin) = iso;
   flag_iso = iso;
   cxx_dialect = cxx98;
 }
@@ -1485,8 +1485,8 @@ static void
 set_std_cxx11 (int iso)
 {
   cpp_set_lang (parse_in, iso ? CLK_CXX11: CLK_GNUCXX11);
-  flag_no_gnu_keywords = iso;
-  flag_no_nonansi_builtin = iso;
+  GCC_OPTION (flag_no_gnu_keywords) = iso;
+  GCC_OPTION (flag_no_nonansi_builtin) = iso;
   flag_iso = iso;
   /* C++11 includes the C99 standard library.  */
   flag_isoc94 = 1;
@@ -1499,8 +1499,8 @@ static void
 set_std_cxx1y (int iso)
 {
   cpp_set_lang (parse_in, iso ? CLK_CXX1Y: CLK_GNUCXX1Y);
-  flag_no_gnu_keywords = iso;
-  flag_no_nonansi_builtin = iso;
+  GCC_OPTION (flag_no_gnu_keywords) = iso;
+  GCC_OPTION (flag_no_nonansi_builtin) = iso;
   flag_iso = iso;
   /* C++11 includes the C99 standard library.  */
   flag_isoc94 = 1;
diff --git a/gcc/c-family/c-pch.c b/gcc/c-family/c-pch.c
index 93609b6..7947575 100644
--- a/gcc/c-family/c-pch.c
+++ b/gcc/c-family/c-pch.c
@@ -43,7 +43,7 @@ static const struct c_pch_matching
   int *flag_var;
   const char *flag_name;
 } pch_matching[] = {
-  { &flag_exceptions, "-fexceptions" },
+  { &GCC_OPTION (flag_exceptions), "-fexceptions" },
 };
 
 enum {
@@ -118,7 +118,7 @@ pch_init (void)
   gcc_assert (memcmp (executable_checksum, no_checksum, 16) != 0);
 
   memset (&v, '\0', sizeof (v));
-  v.debug_info_type = write_symbols;
+  v.debug_info_type = GCC_OPTION (write_symbols);
   {
     size_t i;
     for (i = 0; i < MATCH_SIZE; i++)
@@ -266,14 +266,14 @@ c_common_valid_pch (cpp_reader *pfile, const char *name, int fd)
   /* The allowable debug info combinations are that either the PCH file
      was built with the same as is being used now, or the PCH file was
      built for some kind of debug info but now none is in use.  */
-  if (v.debug_info_type != write_symbols
-      && write_symbols != NO_DEBUG)
+  if (v.debug_info_type != GCC_OPTION (write_symbols)
+      && GCC_OPTION (write_symbols) != NO_DEBUG)
     {
       if (cpp_get_options (pfile)->warn_invalid_pch)
 	cpp_error (pfile, CPP_DL_WARNING,
 		   "%s: created with -g%s, but used with -g%s", name,
 		   debug_type_names[v.debug_info_type],
-		   debug_type_names[write_symbols]);
+		   debug_type_names[GCC_OPTION (write_symbols)]);
       return 2;
     }
 
diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c
index 9e2a00e..82987b4 100644
--- a/gcc/c-family/c-pragma.c
+++ b/gcc/c-family/c-pragma.c
@@ -149,7 +149,7 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy))
   if (token == CPP_CLOSE_PAREN)
     {
       action = set;
-      align = initial_max_fld_align;
+      align = GCC_OPTION (initial_max_fld_align);
     }
   else if (token == CPP_NUMBER)
     {
@@ -205,7 +205,7 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy))
   if (pragma_lex (&x) != CPP_EOF)
     warning (OPT_Wpragmas, "junk at end of %<#pragma pack%>");
 
-  if (flag_pack_struct)
+  if (GCC_OPTION (flag_pack_struct))
     GCC_BAD ("#pragma pack has no effect with -fpack-struct - ignored");
 
   if (action != pop)
@@ -623,15 +623,15 @@ static vec<int> visstack;
 void
 push_visibility (const char *str, int kind)
 {
-  visstack.safe_push (((int) default_visibility) | (kind << 8));
+  visstack.safe_push (((int) GCC_OPTION (default_visibility)) | (kind << 8));
   if (!strcmp (str, "default"))
-    default_visibility = VISIBILITY_DEFAULT;
+    GCC_OPTION (default_visibility) = VISIBILITY_DEFAULT;
   else if (!strcmp (str, "internal"))
-    default_visibility = VISIBILITY_INTERNAL;
+    GCC_OPTION (default_visibility) = VISIBILITY_INTERNAL;
   else if (!strcmp (str, "hidden"))
-    default_visibility = VISIBILITY_HIDDEN;
+    GCC_OPTION (default_visibility) = VISIBILITY_HIDDEN;
   else if (!strcmp (str, "protected"))
-    default_visibility = VISIBILITY_PROTECTED;
+    GCC_OPTION (default_visibility) = VISIBILITY_PROTECTED;
   else
     GCC_BAD ("#pragma GCC visibility push() must specify default, internal, hidden or protected");
   visibility_options.inpragma = 1;
@@ -647,7 +647,7 @@ pop_visibility (int kind)
     return false;
   if ((visstack.last () >> 8) != kind)
     return false;
-  default_visibility
+  GCC_OPTION (default_visibility)
     = (enum symbol_visibility) (visstack.pop () & 0xff);
   visibility_options.inpragma
     = visstack.length () != 0;
@@ -1128,7 +1128,7 @@ handle_pragma_float_const_decimal64 (cpp_reader *ARG_UNUSED (dummy))
 {
   if (c_dialect_cxx ())
     {
-      if (warn_unknown_pragmas > in_system_header_at (input_location))
+      if (GCC_OPTION (warn_unknown_pragmas) > in_system_header_at (input_location))
 	warning (OPT_Wunknown_pragmas,
 		 "%<#pragma STDC FLOAT_CONST_DECIMAL64%> is not supported"
 		 " for C++");
@@ -1137,7 +1137,7 @@ handle_pragma_float_const_decimal64 (cpp_reader *ARG_UNUSED (dummy))
 
   if (!targetm.decimal_float_supported_p ())
     {
-      if (warn_unknown_pragmas > in_system_header_at (input_location))
+      if (GCC_OPTION (warn_unknown_pragmas) > in_system_header_at (input_location))
 	warning (OPT_Wunknown_pragmas,
 		 "%<#pragma STDC FLOAT_CONST_DECIMAL64%> is not supported"
 		 " on this target");
@@ -1255,7 +1255,7 @@ c_register_pragma_1 (const char *space, const char *name,
 {
   unsigned id;
 
-  if (flag_preprocess_only)
+  if (GCC_OPTION (flag_preprocess_only))
     {
       pragma_ns_name ns_name;
 
@@ -1378,7 +1378,7 @@ c_invoke_pragma_handler (unsigned int id)
 void
 init_pragma (void)
 {
-  if (flag_openmp)
+  if (GCC_OPTION (flag_openmp))
     {
       const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
       int i;
@@ -1387,7 +1387,7 @@ init_pragma (void)
 	cpp_register_deferred_pragma (parse_in, "omp", omp_pragmas[i].name,
 				      omp_pragmas[i].id, true, true);
     }
-  if (flag_openmp || flag_openmp_simd)
+  if (GCC_OPTION (flag_openmp) || GCC_OPTION (flag_openmp_simd))
     {
       const int n_omp_pragmas_simd = sizeof (omp_pragmas_simd)
 				     / sizeof (*omp_pragmas);
@@ -1398,15 +1398,15 @@ init_pragma (void)
 				      omp_pragmas_simd[i].id, true, true);
     }
 
-  if (flag_cilkplus)
+  if (GCC_OPTION (flag_cilkplus))
     cpp_register_deferred_pragma (parse_in, NULL, "simd", PRAGMA_CILK_SIMD,
 				  true, false);
 
-  if (!flag_preprocess_only)
+  if (!GCC_OPTION (flag_preprocess_only))
     cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
 				  PRAGMA_GCC_PCH_PREPROCESS, false, false);
 
-  if (!flag_preprocess_only)
+  if (!GCC_OPTION (flag_preprocess_only))
     cpp_register_deferred_pragma (parse_in, "GCC", "ivdep", PRAGMA_IVDEP, false,
 				  false);
 #ifdef HANDLE_PRAGMA_PACK_WITH_EXPANSION
diff --git a/gcc/c-family/cilk.c b/gcc/c-family/cilk.c
index 6a7bf4f..cbf2f06 100644
--- a/gcc/c-family/cilk.c
+++ b/gcc/c-family/cilk.c
@@ -411,7 +411,7 @@ check_outlined_calls (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED,
     return 0;
   flags = call_expr_flags (t);
 
-  if (!(flags & ECF_NOTHROW) && flag_exceptions)
+  if (!(flags & ECF_NOTHROW) && GCC_OPTION (flag_exceptions))
     *throws = true;
   if (flags & ECF_RETURNS_TWICE)
     error_at (EXPR_LOCATION (t), 
diff --git a/gcc/c/c-aux-info.c b/gcc/c/c-aux-info.c
index 4b6b2d0..1c1522f 100644
--- a/gcc/c/c-aux-info.c
+++ b/gcc/c/c-aux-info.c
@@ -530,7 +530,7 @@ void
 gen_aux_info_record (tree fndecl, int is_definition, int is_implicit,
 		     int is_prototyped)
 {
-  if (flag_gen_aux_info)
+  if (GCC_OPTION (flag_gen_aux_info))
     {
       static int compiled_from_record = 0;
       expanded_location xloc = expand_location (DECL_SOURCE_LOCATION (fndecl));
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c
index 2c41bf2..cf61dfe 100644
--- a/gcc/c/c-decl.c
+++ b/gcc/c/c-decl.c
@@ -598,7 +598,7 @@ decl_jump_unsafe (tree decl)
 
   /* Otherwise, only warn if -Wgoto-misses-init and this is an
      initialized automatic decl.  */
-  if (warn_jump_misses_init
+  if (GCC_OPTION (warn_jump_misses_init)
       && TREE_CODE (decl) == VAR_DECL
       && !TREE_STATIC (decl)
       && DECL_INITIAL (decl) != NULL_TREE)
@@ -1174,7 +1174,7 @@ pop_scope (void)
 	      /* C99 6.7.4p6: "a function with external linkage... declared
 		 with an inline function specifier ... shall also be defined
 		 in the same translation unit."  */
-	      if (!flag_gnu89_inline)
+	      if (!GCC_OPTION (flag_gnu89_inline))
 		pedwarn (input_location, 0,
 			 "inline function %q+D declared but never defined", p);
 	      DECL_EXTERNAL (p) = 1;
@@ -1464,7 +1464,7 @@ pushtag (location_t loc, tree name, tree type)
      This will be updated in pop_scope.  */
   TYPE_CONTEXT (type) = DECL_CONTEXT (TYPE_STUB_DECL (type));
 
-  if (warn_cxx_compat && name != NULL_TREE)
+  if (GCC_OPTION (warn_cxx_compat) && name != NULL_TREE)
     {
       struct c_binding *b = I_SYMBOL_BINDING (name);
 
@@ -1843,7 +1843,7 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl,
 		 newdecl);
 	  locate_old_decl (olddecl);
 	}
-      else if (pedantic && !flag_isoc11)
+      else if (GCC_OPTION (pedantic) && !flag_isoc11)
 	{
 	  pedwarn (input_location, OPT_Wpedantic,
 		   "redefinition of typedef %q+D", newdecl);
@@ -1889,7 +1889,7 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl,
 		 unit.  */
 	      if ((!DECL_EXTERN_INLINE (olddecl)
 		   || DECL_EXTERN_INLINE (newdecl)
-		   || (!flag_gnu89_inline
+		   || (!GCC_OPTION (flag_gnu89_inline)
 		       && (!DECL_DECLARED_INLINE_P (olddecl)
 			   || !lookup_attribute ("gnu_inline",
 						 DECL_ATTRIBUTES (olddecl)))
@@ -1949,7 +1949,7 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl,
 	      locate_old_decl (olddecl);
 	      return false;
 	    }
-	  else if (warn_traditional)
+	  else if (GCC_OPTION (warn_traditional))
 	    {
 	      warned |= warning (OPT_Wtraditional,
 				 "non-static declaration of %q+D "
@@ -2027,7 +2027,7 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl,
 		  locate_old_decl (olddecl);
 		  return false;
 		}
-	      else if (warn_traditional)
+	      else if (GCC_OPTION (warn_traditional))
 		{
 		  warned |= warning (OPT_Wtraditional,
 				     "non-static declaration of %q+D "
@@ -2073,7 +2073,7 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl,
 
       /* C++ does not permit a decl to appear multiple times at file
 	 scope.  */
-      if (warn_cxx_compat
+      if (GCC_OPTION (warn_cxx_compat)
 	  && DECL_FILE_SCOPE_P (newdecl)
 	  && !DECL_EXTERNAL (newdecl)
 	  && !DECL_EXTERNAL (olddecl))
@@ -2134,7 +2134,7 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl,
 
   /* Optional warning for completely redundant decls.  */
   if (!warned && !pedwarned
-      && warn_redundant_decls
+      && GCC_OPTION (warn_redundant_decls)
       /* Don't warn about a function declaration followed by a
 	 definition.  */
       && !(TREE_CODE (newdecl) == FUNCTION_DECL
@@ -2332,7 +2332,7 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
      function is not DECL_EXTERNAL, unless 'gnu_inline' attribute
      is present.  */
   if (TREE_CODE (newdecl) == FUNCTION_DECL
-      && !flag_gnu89_inline
+      && !GCC_OPTION (flag_gnu89_inline)
       && (DECL_DECLARED_INLINE_P (newdecl)
 	  || DECL_DECLARED_INLINE_P (olddecl))
       && (!DECL_DECLARED_INLINE_P (newdecl)
@@ -2552,7 +2552,7 @@ warn_if_shadowing (tree new_decl)
   struct c_binding *b;
 
   /* Shadow warnings wanted?  */
-  if (!warn_shadow
+  if (!GCC_OPTION (warn_shadow)
       /* No shadow warnings for internally generated vars.  */
       || DECL_IS_BUILTIN (new_decl)
       /* No shadow warnings for vars made for inlining.  */
@@ -2899,7 +2899,7 @@ pushdecl_top_level (tree x)
 static void
 implicit_decl_warning (tree id, tree olddecl)
 {
-  if (warn_implicit_function_declaration)
+  if (GCC_OPTION (warn_implicit_function_declaration))
     {
       bool warned;
 
@@ -4165,7 +4165,7 @@ start_decl (struct c_declarator *declarator, struct c_declspecs *declspecs,
       && !initialized
       && TREE_PUBLIC (decl)
       && !DECL_THREAD_LOCAL_P (decl)
-      && !flag_no_common)
+      && !GCC_OPTION (flag_no_common))
     DECL_COMMON (decl) = 1;
 
   /* Set attributes here so if duplicate decl, will have proper attributes.  */
@@ -4173,7 +4173,7 @@ start_decl (struct c_declarator *declarator, struct c_declspecs *declspecs,
 
   /* Handle gnu_inline attribute.  */
   if (declspecs->inline_p
-      && !flag_gnu89_inline
+      && !GCC_OPTION (flag_gnu89_inline)
       && TREE_CODE (decl) == FUNCTION_DECL
       && (lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (decl))
 	  || current_function_decl))
@@ -4327,7 +4327,7 @@ finish_decl (tree decl, location_t init_loc, tree init,
 	= (TREE_STATIC (decl)
 	   /* Even if pedantic, an external linkage array
 	      may have incomplete type at first.  */
-	   ? pedantic && !TREE_PUBLIC (decl)
+	   ? GCC_OPTION (pedantic) && !TREE_PUBLIC (decl)
 	   : !DECL_EXTERNAL (decl));
       int failure
 	= complete_array_type (&TREE_TYPE (decl), DECL_INITIAL (decl),
@@ -4351,7 +4351,7 @@ finish_decl (tree decl, location_t init_loc, tree init,
 	     If it is not `static', then do not mark extern;
 	     finish_incomplete_decl will give it a default size
 	     and it will get allocated.  */
-	  else if (!pedantic && TREE_STATIC (decl) && !TREE_PUBLIC (decl))
+	  else if (!GCC_OPTION (pedantic) && TREE_STATIC (decl) && !TREE_PUBLIC (decl))
 	    DECL_EXTERNAL (decl) = 1;
 	  break;
 
@@ -4581,7 +4581,7 @@ finish_decl (tree decl, location_t init_loc, tree init,
 	}
     }
 
-  if (warn_cxx_compat
+  if (GCC_OPTION (warn_cxx_compat)
       && TREE_CODE (decl) == VAR_DECL
       && !DECL_EXTERNAL (decl)
       && DECL_INITIAL (decl) == NULL_TREE)
@@ -4644,7 +4644,7 @@ mark_forward_parm_decls (void)
 {
   struct c_binding *b;
 
-  if (pedantic && !current_scope->warned_forward_parm_decls)
+  if (GCC_OPTION (pedantic) && !current_scope->warned_forward_parm_decls)
     {
       pedwarn (input_location, OPT_Wpedantic,
 	       "ISO C forbids forward parameter declarations");
@@ -4740,7 +4740,7 @@ build_compound_literal (location_t loc, tree type, tree init, bool non_const)
 void
 check_compound_literal_type (location_t loc, struct c_type_name *type_name)
 {
-  if (warn_cxx_compat
+  if (GCC_OPTION (warn_cxx_compat)
       && (type_name->specs->typespec_kind == ctsk_tagdef
           || type_name->specs->typespec_kind == ctsk_tagfirstref))
     warning_at (loc, OPT_Wc___compat,
@@ -4875,7 +4875,7 @@ warn_variable_length_array (tree name, tree size)
 {
   int const_size = TREE_CONSTANT (size);
 
-  if (!flag_isoc99 && pedantic && warn_vla != 0)
+  if (!flag_isoc99 && GCC_OPTION (pedantic) && GCC_OPTION (warn_vla) != 0)
     {
       if (const_size)
 	{
@@ -4898,7 +4898,7 @@ warn_variable_length_array (tree name, tree size)
 	    pedwarn (input_location, OPT_Wvla, "ISO C90 forbids variable length array");
 	}
     }
-  else if (warn_vla > 0)
+  else if (GCC_OPTION (warn_vla) > 0)
     {
       if (const_size)
         {
@@ -5093,7 +5093,7 @@ grokdeclarator (const struct c_declarator *declarator,
       /* Issue a warning if this is an ISO C 99 program or if
 	 -Wreturn-type and this is a function, or if -Wimplicit;
 	 prefer the former warning since it is more explicit.  */
-      if ((warn_implicit_int || warn_return_type || flag_isoc99)
+      if ((GCC_OPTION (warn_implicit_int) || GCC_OPTION (warn_return_type) || flag_isoc99)
 	  && funcdef_flag)
 	warn_about_return_type = 1;
       else
@@ -5111,7 +5111,7 @@ grokdeclarator (const struct c_declarator *declarator,
   /* Adjust the type if a bit-field is being declared,
      -funsigned-bitfields applied and the type is not explicitly
      "signed".  */
-  if (bitfield && !flag_signed_bitfields && !declspecs->explicit_signed_p
+  if (bitfield && !GCC_OPTION (flag_signed_bitfields) && !declspecs->explicit_signed_p
       && TREE_CODE (type) == INTEGER_TYPE)
     type = unsigned_type_for (type);
 
@@ -5135,7 +5135,7 @@ grokdeclarator (const struct c_declarator *declarator,
   as2 = TYPE_ADDR_SPACE (element_type);
   address_space = ADDR_SPACE_GENERIC_P (as1)? as2 : as1;
 
-  if (pedantic && !flag_isoc99)
+  if (GCC_OPTION (pedantic) && !flag_isoc99)
     {
       if (constp > 1)
 	pedwarn (loc, OPT_Wpedantic, "duplicate %<const%>");
@@ -5234,7 +5234,7 @@ grokdeclarator (const struct c_declarator *declarator,
          {
            /* It is fine to have 'extern const' when compiling at C
               and C++ intersection.  */
-           if (!(warn_cxx_compat && constp))
+           if (!(GCC_OPTION (warn_cxx_compat) && constp))
              warning_at (loc, 0, "%qE initialized and declared %<extern%>",
 		 	 name);
          }
@@ -5246,7 +5246,7 @@ grokdeclarator (const struct c_declarator *declarator,
       if (storage_class == csc_auto)
 	error_at (loc, "file-scope declaration of %qE specifies %<auto%>",
 	    	  name);
-      if (pedantic && storage_class == csc_register)
+      if (GCC_OPTION (pedantic) && storage_class == csc_register)
 	pedwarn (input_location, OPT_Wpedantic,
 		 "file-scope declaration of %qE specifies %<register%>", name);
     }
@@ -5368,7 +5368,7 @@ grokdeclarator (const struct c_declarator *declarator,
 		type = error_mark_node;
 	      }
 
-	    if (pedantic && !in_system_header_at (input_location)
+	    if (GCC_OPTION (pedantic) && !in_system_header_at (input_location)
 		&& flexible_array_type_p (type))
 	      pedwarn (loc, OPT_Wpedantic,
 		       "invalid use of structure with flexible array member");
@@ -5407,7 +5407,7 @@ grokdeclarator (const struct c_declarator *declarator,
 
 		size = c_fully_fold (size, false, &size_maybe_const);
 
-		if (pedantic && size_maybe_const && integer_zerop (size))
+		if (GCC_OPTION (pedantic) && size_maybe_const && integer_zerop (size))
 		  {
 		    if (name)
 		      pedwarn (loc, OPT_Wpedantic,
@@ -5460,7 +5460,7 @@ grokdeclarator (const struct c_declarator *declarator,
 		       with known value.  */
 		    this_size_varies = size_varies = true;
 		    warn_variable_length_array (name, size);
-		    if (flag_sanitize & SANITIZE_VLA
+		    if (GCC_OPTION (flag_sanitize) & SANITIZE_VLA
 		        && decl_context == NORMAL)
 		      {
 			/* Evaluate the array size only once.  */
@@ -5547,7 +5547,7 @@ grokdeclarator (const struct c_declarator *declarator,
 		    flexible_array_member = (t->kind == cdk_id);
 		  }
 		if (flexible_array_member
-		    && pedantic && !flag_isoc99
+		    && GCC_OPTION (pedantic) && !flag_isoc99
 		    && !in_system_header_at (input_location))
 		  pedwarn (loc, OPT_Wpedantic,
 			   "ISO C90 does not support flexible array members");
@@ -5754,7 +5754,7 @@ grokdeclarator (const struct c_declarator *declarator,
 			  "%<_Atomic%>-qualified function type");
 		type_quals &= ~TYPE_QUAL_ATOMIC;
 	      }
-	    else if (pedantic && TREE_CODE (type) == FUNCTION_TYPE
+	    else if (GCC_OPTION (pedantic) && TREE_CODE (type) == FUNCTION_TYPE
 		     && type_quals)
 	      pedwarn (loc, OPT_Wpedantic,
 		       "ISO C forbids qualified function types");
@@ -5952,7 +5952,7 @@ grokdeclarator (const struct c_declarator *declarator,
 		    "%<_Atomic%>-qualified function type");
 	  type_quals &= ~TYPE_QUAL_ATOMIC;
 	}
-      else if (pedantic && TREE_CODE (type) == FUNCTION_TYPE
+      else if (GCC_OPTION (pedantic) && TREE_CODE (type) == FUNCTION_TYPE
 	       && type_quals)
 	pedwarn (loc, OPT_Wpedantic,
 		 "ISO C forbids qualified function types");
@@ -5967,7 +5967,7 @@ grokdeclarator (const struct c_declarator *declarator,
       if (declspecs->noreturn_p)
 	pedwarn (loc, 0,"typedef %q+D declared %<_Noreturn%>", decl);
 
-      if (warn_cxx_compat && declarator->u.id != NULL_TREE)
+      if (GCC_OPTION (warn_cxx_compat) && declarator->u.id != NULL_TREE)
 	{
 	  struct c_binding *b = I_TAG_BINDING (declarator->u.id);
 
@@ -6005,7 +6005,7 @@ grokdeclarator (const struct c_declarator *declarator,
 		    "%<_Atomic%>-qualified function type");
 	  type_quals &= ~TYPE_QUAL_ATOMIC;
 	}
-      else if (pedantic && TREE_CODE (type) == FUNCTION_TYPE
+      else if (GCC_OPTION (pedantic) && TREE_CODE (type) == FUNCTION_TYPE
 	       && type_quals)
 	pedwarn (loc, OPT_Wpedantic,
 		 "ISO C forbids const or volatile function types");
@@ -6014,7 +6014,7 @@ grokdeclarator (const struct c_declarator *declarator,
       return type;
     }
 
-  if (pedantic && decl_context == FIELD
+  if (GCC_OPTION (pedantic) && decl_context == FIELD
       && variably_modified_type_p (type, NULL_TREE))
     {
       /* C99 6.7.2.1p8 */
@@ -6179,7 +6179,7 @@ grokdeclarator (const struct c_declarator *declarator,
 		      "%<_Atomic%>-qualified function type");
 	    type_quals &= ~TYPE_QUAL_ATOMIC;
 	  }
-	else if (pedantic && type_quals && !DECL_IN_SYSTEM_HEADER (decl))
+	else if (GCC_OPTION (pedantic) && type_quals && !DECL_IN_SYSTEM_HEADER (decl))
 	  pedwarn (loc, OPT_Wpedantic,
 		   "ISO C forbids qualified function types");
 
@@ -6197,7 +6197,7 @@ grokdeclarator (const struct c_declarator *declarator,
 	   'extern inline' is an external reference.  */
 	else if (declspecs->inline_p && storage_class != csc_static)
 	  DECL_EXTERNAL (decl) = ((storage_class == csc_extern)
-				  == flag_gnu89_inline);
+				  == GCC_OPTION (flag_gnu89_inline));
 	else
 	  DECL_EXTERNAL (decl) = !initialized;
 
@@ -6359,7 +6359,7 @@ grokdeclarator (const struct c_declarator *declarator,
      name of a variable.  Thus, if it's known before this, die horribly.  */
     gcc_assert (!DECL_ASSEMBLER_NAME_SET_P (decl));
 
-    if (warn_cxx_compat
+    if (GCC_OPTION (warn_cxx_compat)
 	&& TREE_CODE (decl) == VAR_DECL
 	&& TREE_PUBLIC (decl)
 	&& TREE_STATIC (decl)
@@ -6734,7 +6734,7 @@ parser_xref_tag (location_t loc, enum tree_code code, tree name)
     {
       if (C_TYPE_DEFINED_IN_STRUCT (ref)
 	  && loc != UNKNOWN_LOCATION
-	  && warn_cxx_compat)
+	  && GCC_OPTION (warn_cxx_compat))
 	{
 	  switch (code)
 	    {
@@ -6858,7 +6858,7 @@ start_struct (location_t loc, enum tree_code code, tree name,
     }
 
   C_TYPE_BEING_DEFINED (ref) = 1;
-  TYPE_PACKED (ref) = flag_pack_struct;
+  TYPE_PACKED (ref) = GCC_OPTION (flag_pack_struct);
 
   *enclosing_struct_parse_info = struct_parse_info;
   struct_parse_info = XNEW (struct c_struct_parse_info);
@@ -6870,7 +6870,7 @@ start_struct (location_t loc, enum tree_code code, tree name,
      within a statement expr used within sizeof, et. al.  This is not
      terribly serious as C++ doesn't permit statement exprs within
      sizeof anyhow.  */
-  if (warn_cxx_compat && (in_sizeof || in_typeof || in_alignof))
+  if (GCC_OPTION (warn_cxx_compat) && (in_sizeof || in_typeof || in_alignof))
     warning_at (loc, OPT_Wc___compat,
 		"defining type in %qs expression is invalid in C++",
 		(in_sizeof
@@ -6928,11 +6928,11 @@ grokfield (location_t loc,
       bool ok = false;
 
       if (type_ok
-	  && (flag_ms_extensions
-	      || flag_plan9_extensions
+	  && (GCC_OPTION (flag_ms_extensions)
+	      || GCC_OPTION (flag_plan9_extensions)
 	      || !declspecs->typedef_p))
 	{
-	  if (flag_ms_extensions || flag_plan9_extensions)
+	  if (GCC_OPTION (flag_ms_extensions) || GCC_OPTION (flag_plan9_extensions))
 	    ok = true;
 	  else if (TYPE_NAME (type) == NULL)
 	    ok = true;
@@ -6962,7 +6962,7 @@ grokfield (location_t loc,
   finish_decl (value, loc, NULL_TREE, NULL_TREE, NULL_TREE);
   DECL_INITIAL (value) = width;
 
-  if (warn_cxx_compat && DECL_NAME (value) != NULL_TREE)
+  if (GCC_OPTION (warn_cxx_compat) && DECL_NAME (value) != NULL_TREE)
     {
       /* If we currently have a binding for this field, set the
 	 in_struct field in the binding, so that we warn about lookups
@@ -6995,7 +6995,7 @@ is_duplicate_field (tree x, tree y)
 
   /* When using -fplan9-extensions, an anonymous field whose name is a
      typedef can duplicate a field name.  */
-  if (flag_plan9_extensions
+  if (GCC_OPTION (flag_plan9_extensions)
       && (DECL_NAME (x) == NULL_TREE || DECL_NAME (y) == NULL_TREE))
     {
       tree xt, xn, yt, yn;
@@ -7055,7 +7055,7 @@ detect_field_duplicates_hash (tree fieldlist,
 
 	/* When using -fplan9-extensions, an anonymous field whose
 	   name is a typedef can duplicate a field name.  */
-	if (flag_plan9_extensions
+	if (GCC_OPTION (flag_plan9_extensions)
 	    && TYPE_NAME (TREE_TYPE (x)) != NULL_TREE
 	    && TREE_CODE (TYPE_NAME (TREE_TYPE (x))) == TYPE_DECL)
 	  {
@@ -7115,7 +7115,7 @@ detect_field_duplicates (tree fieldlist)
 	/* When using -fplan9-extensions, we can have duplicates
 	   between typedef names and fields.  */
 	if (DECL_NAME (x)
-	    || (flag_plan9_extensions
+	    || (GCC_OPTION (flag_plan9_extensions)
 		&& DECL_NAME (x) == NULL_TREE
 		&& (TREE_CODE (TREE_TYPE (x)) == RECORD_TYPE
 		    || TREE_CODE (TREE_TYPE (x)) == UNION_TYPE)
@@ -7219,7 +7219,7 @@ finish_struct (location_t loc, tree t, tree fieldlist, tree attributes,
 
   decl_attributes (&t, attributes, (int) ATTR_FLAG_TYPE_IN_PLACE);
 
-  if (pedantic)
+  if (GCC_OPTION (pedantic))
     {
       for (x = fieldlist; x; x = DECL_CHAIN (x))
 	{
@@ -7325,7 +7325,7 @@ finish_struct (location_t loc, tree t, tree fieldlist, tree attributes,
 	    }
 	}
 
-      if (pedantic && TREE_CODE (t) == RECORD_TYPE
+      if (GCC_OPTION (pedantic) && TREE_CODE (t) == RECORD_TYPE
 	  && flexible_array_type_p (TREE_TYPE (x)))
 	pedwarn (DECL_SOURCE_LOCATION (x), OPT_Wpedantic,
 		 "invalid use of structure with flexible array member");
@@ -7482,7 +7482,7 @@ finish_struct (location_t loc, tree t, tree fieldlist, tree attributes,
     add_stmt (build_stmt (loc,
 			  DECL_EXPR, build_decl (loc, TYPE_DECL, NULL, t)));
 
-  if (warn_cxx_compat)
+  if (GCC_OPTION (warn_cxx_compat))
     warn_cxx_compat_finish_struct (fieldlist);
 
   struct_parse_info->struct_types.release ();
@@ -7494,7 +7494,7 @@ finish_struct (location_t loc, tree t, tree fieldlist, tree attributes,
 
   /* If this struct is defined inside a struct, add it to
      struct_types.  */
-  if (warn_cxx_compat
+  if (GCC_OPTION (warn_cxx_compat)
       && struct_parse_info != NULL
       && !in_sizeof && !in_typeof && !in_alignof)
     struct_parse_info->struct_types.safe_push (t);
@@ -7558,13 +7558,13 @@ start_enum (location_t loc, struct c_enum_contents *the_enum, tree name)
   the_enum->enum_next_value = integer_zero_node;
   the_enum->enum_overflow = 0;
 
-  if (flag_short_enums)
+  if (GCC_OPTION (flag_short_enums))
     TYPE_PACKED (enumtype) = 1;
 
   /* FIXME: This will issue a warning for a use of a type defined
      within sizeof in a statement expr.  This is not terribly serious
      as C++ doesn't permit statement exprs within sizeof anyhow.  */
-  if (warn_cxx_compat && (in_sizeof || in_typeof || in_alignof))
+  if (GCC_OPTION (warn_cxx_compat) && (in_sizeof || in_typeof || in_alignof))
     warning_at (loc, OPT_Wc___compat,
 		"defining type in %qs expression is invalid in C++",
 		(in_sizeof
@@ -7712,7 +7712,7 @@ finish_enum (tree enumtype, tree values, tree attributes)
 
   /* If this enum is defined inside a struct, add it to
      struct_types.  */
-  if (warn_cxx_compat
+  if (GCC_OPTION (warn_cxx_compat)
       && struct_parse_info != NULL
       && !in_sizeof && !in_typeof && !in_alignof)
     struct_parse_info->struct_types.safe_push (enumtype);
@@ -7876,7 +7876,7 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator,
 
   /* Handle gnu_inline attribute.  */
   if (declspecs->inline_p
-      && !flag_gnu89_inline
+      && !GCC_OPTION (flag_gnu89_inline)
       && TREE_CODE (decl1) == FUNCTION_DECL
       && (lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (decl1))
 	  || current_function_decl))
@@ -7898,7 +7898,7 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator,
 
   if (warn_about_return_type)
     pedwarn_c99 (loc, flag_isoc99 ? 0
-		 : (warn_return_type ? OPT_Wreturn_type : OPT_Wimplicit_int),
+		 : (GCC_OPTION (warn_return_type) ? OPT_Wreturn_type : OPT_Wimplicit_int),
 		 "return type defaults to %<int%>");
 
   /* Make the init_value nonzero so pushdecl knows this is not tentative.
@@ -7964,14 +7964,14 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator,
     }
 
   /* Optionally warn of old-fashioned def with no previous prototype.  */
-  if (warn_strict_prototypes
+  if (GCC_OPTION (warn_strict_prototypes)
       && old_decl != error_mark_node
       && !prototype_p (TREE_TYPE (decl1))
       && C_DECL_ISNT_PROTOTYPE (old_decl))
     warning_at (loc, OPT_Wstrict_prototypes,
 		"function declaration isn%'t a prototype");
   /* Optionally warn of any global def with no previous prototype.  */
-  else if (warn_missing_prototypes
+  else if (GCC_OPTION (warn_missing_prototypes)
 	   && old_decl != error_mark_node
 	   && TREE_PUBLIC (decl1)
 	   && !MAIN_NAME_P (DECL_NAME (decl1))
@@ -7981,7 +7981,7 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator,
 		"no previous prototype for %qD", decl1);
   /* Optionally warn of any def with no previous prototype
      if the function has already been used.  */
-  else if (warn_missing_prototypes
+  else if (GCC_OPTION (warn_missing_prototypes)
 	   && old_decl != 0
 	   && old_decl != error_mark_node
 	   && TREE_USED (old_decl)
@@ -7989,7 +7989,7 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator,
     warning_at (loc, OPT_Wmissing_prototypes,
 		"%qD was used with no prototype before its definition", decl1);
   /* Optionally warn of any global def with no previous declaration.  */
-  else if (warn_missing_declarations
+  else if (GCC_OPTION (warn_missing_declarations)
 	   && TREE_PUBLIC (decl1)
 	   && old_decl == 0
 	   && !MAIN_NAME_P (DECL_NAME (decl1)))
@@ -7998,7 +7998,7 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator,
 		decl1);
   /* Optionally warn of any def with no previous declaration
      if the function has already been used.  */
-  else if (warn_missing_declarations
+  else if (GCC_OPTION (warn_missing_declarations)
 	   && old_decl != 0
 	   && old_decl != error_mark_node
 	   && TREE_USED (old_decl)
@@ -8019,7 +8019,7 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator,
     maybe_apply_pragma_weak (decl1);
 
   /* Warn for unlikely, improbable, or stupid declarations of `main'.  */
-  if (warn_main && MAIN_NAME_P (DECL_NAME (decl1)))
+  if (GCC_OPTION (warn_main) && MAIN_NAME_P (DECL_NAME (decl1)))
     {
       if (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (decl1)))
 	  != integer_type_node)
@@ -8454,7 +8454,7 @@ store_parm_decls (void)
   /* Initialize the RTL code for the function.  */
   allocate_struct_function (fndecl, false);
 
-  if (warn_unused_local_typedefs)
+  if (GCC_OPTION (warn_unused_local_typedefs))
     cfun->language = ggc_alloc_cleared_language_function ();
 
   /* Begin the statement tree for this function.  */
@@ -8569,7 +8569,7 @@ finish_function (void)
   finish_fname_decls ();
 
   /* Complain if there's just no return statement.  */
-  if (warn_return_type
+  if (GCC_OPTION (warn_return_type)
       && TREE_CODE (TREE_TYPE (TREE_TYPE (fndecl))) != VOID_TYPE
       && !current_function_returns_value && !current_function_returns_null
       /* Don't complain if we are no-return.  */
@@ -8590,7 +8590,7 @@ finish_function (void)
     }
 
   /* Complain about parameters that are only set, but never otherwise used.  */
-  if (warn_unused_but_set_parameter)
+  if (GCC_OPTION (warn_unused_but_set_parameter))
     {
       tree decl;
 
@@ -8808,7 +8808,7 @@ c_pop_function_context (void)
   /* When -Wunused-local-typedefs is in effect, cfun->languages is
      used to store data throughout the life time of the current cfun,
      So don't deallocate it.  */
-  if (!warn_unused_local_typedefs)
+  if (!GCC_OPTION (warn_unused_local_typedefs))
     cfun->language = NULL;
 
   if (DECL_STRUCT_FUNCTION (current_function_decl) == 0
@@ -9774,7 +9774,7 @@ declspecs_add_type (location_t loc, struct c_declspecs *specs,
 
 	  /* If this typedef name is defined in a struct, then a C++
 	     lookup would return a different value.  */
-	  if (warn_cxx_compat
+	  if (GCC_OPTION (warn_cxx_compat)
 	      && I_SYMBOL_BINDING (DECL_NAME (type))->in_struct)
 	    warning_at (loc, OPT_Wc___compat,
 			"C++ lookup of %qD would return a field, not a type",
@@ -9782,7 +9782,7 @@ declspecs_add_type (location_t loc, struct c_declspecs *specs,
 
 	  /* If we are parsing a struct, record that a struct field
 	     used a typedef.  */
-	  if (warn_cxx_compat && struct_parse_info != NULL)
+	  if (GCC_OPTION (warn_cxx_compat) && struct_parse_info != NULL)
 	    struct_parse_info->typedefs_seen.safe_push (type);
 	}
     }
@@ -10364,11 +10364,11 @@ c_write_global_declarations (void)
   gcc_assert (!current_scope);
 
   /* Handle -fdump-ada-spec[-slim]. */
-  if (flag_dump_ada_spec || flag_dump_ada_spec_slim)
+  if (GCC_OPTION (flag_dump_ada_spec) || GCC_OPTION (flag_dump_ada_spec_slim))
     {
       /* Build a table of files to generate specs for */
-      if (flag_dump_ada_spec_slim)
-	collect_source_ref (main_input_filename);
+      if (GCC_OPTION (flag_dump_ada_spec_slim))
+	collect_source_ref (GCC_OPTION (main_input_filename));
       else
 	for_each_global_decl (collect_source_ref_cb);
 
@@ -10428,7 +10428,7 @@ c_register_addr_space (const char *word, addr_space_t as)
 
   /* Address space qualifiers are only supported
      in C with GNU extensions enabled.  */
-  if (c_dialect_objc () || flag_no_asm)
+  if (c_dialect_objc () || GCC_OPTION (flag_no_asm))
     return;
 
   id = get_identifier (word);
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index d0d35c5..c246c75 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -81,7 +81,7 @@ c_parse_init (void)
   mask |= D_CXXONLY;
   if (!flag_isoc99)
     mask |= D_C99;
-  if (flag_no_asm)
+  if (GCC_OPTION (flag_no_asm))
     {
       mask |= D_ASM | D_EXT;
       if (!flag_isoc99)
@@ -97,7 +97,7 @@ c_parse_init (void)
 	 and so create a canonical spelling that isn't a keyword.  */
       if (c_common_reswords[i].disable & mask)
 	{
-	  if (warn_cxx_compat
+	  if (GCC_OPTION (warn_cxx_compat)
 	      && (c_common_reswords[i].disable & D_CXXWARN))
 	    {
 	      id = get_identifier (c_common_reswords[i].word);
@@ -1065,20 +1065,20 @@ extern cpp_options *cpp_opts;
 static inline int
 disable_extension_diagnostics (void)
 {
-  int ret = (pedantic
-	     | (warn_pointer_arith << 1)
-	     | (warn_traditional << 2)
+  int ret = (GCC_OPTION (pedantic)
+	     | (GCC_OPTION (warn_pointer_arith) << 1)
+	     | (GCC_OPTION (warn_traditional) << 2)
 	     | (flag_iso << 3)
-	     | (warn_long_long << 4)
-	     | (warn_cxx_compat << 5)
-	     | (warn_overlength_strings << 6));
-  cpp_opts->cpp_pedantic = pedantic = 0;
-  warn_pointer_arith = 0;
-  cpp_opts->cpp_warn_traditional = warn_traditional = 0;
+	     | (GCC_OPTION (warn_long_long) << 4)
+	     | (GCC_OPTION (warn_cxx_compat) << 5)
+	     | (GCC_OPTION (warn_overlength_strings) << 6));
+  cpp_opts->cpp_pedantic = GCC_OPTION (pedantic) = 0;
+  GCC_OPTION (warn_pointer_arith) = 0;
+  cpp_opts->cpp_warn_traditional = GCC_OPTION (warn_traditional) = 0;
   flag_iso = 0;
-  cpp_opts->cpp_warn_long_long = warn_long_long = 0;
-  warn_cxx_compat = 0;
-  warn_overlength_strings = 0;
+  cpp_opts->cpp_warn_long_long = GCC_OPTION (warn_long_long) = 0;
+  GCC_OPTION (warn_cxx_compat) = 0;
+  GCC_OPTION (warn_overlength_strings) = 0;
   return ret;
 }
 
@@ -1088,13 +1088,13 @@ disable_extension_diagnostics (void)
 static inline void
 restore_extension_diagnostics (int flags)
 {
-  cpp_opts->cpp_pedantic = pedantic = flags & 1;
-  warn_pointer_arith = (flags >> 1) & 1;
-  cpp_opts->cpp_warn_traditional = warn_traditional = (flags >> 2) & 1;
+  cpp_opts->cpp_pedantic = GCC_OPTION (pedantic) = flags & 1;
+  GCC_OPTION (warn_pointer_arith) = (flags >> 1) & 1;
+  cpp_opts->cpp_warn_traditional = GCC_OPTION (warn_traditional) = (flags >> 2) & 1;
   flag_iso = (flags >> 3) & 1;
-  cpp_opts->cpp_warn_long_long = warn_long_long = (flags >> 4) & 1;
-  warn_cxx_compat = (flags >> 5) & 1;
-  warn_overlength_strings = (flags >> 6) & 1;
+  cpp_opts->cpp_warn_long_long = GCC_OPTION (warn_long_long) = (flags >> 4) & 1;
+  GCC_OPTION (warn_cxx_compat) = (flags >> 5) & 1;
+  GCC_OPTION (warn_overlength_strings) = (flags >> 6) & 1;
 }
 
 /* Possibly kinds of declarator to parse.  */
@@ -1919,7 +1919,7 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok,
       DECL_STRUCT_FUNCTION (current_function_decl)->function_start_locus
 	= c_parser_peek_token (parser)->location;
       fnbody = c_parser_compound_statement (parser);
-      if (flag_cilkplus && contains_array_notation_expr (fnbody))
+      if (GCC_OPTION (flag_cilkplus) && contains_array_notation_expr (fnbody))
 	fnbody = expand_array_notation_exprs (fnbody);
       if (nested)
 	{
@@ -2363,7 +2363,7 @@ c_parser_declspecs (c_parser *parser, struct c_declspecs *specs,
 	    sorry ("%<_Atomic%> in Objective-C");
 	  /* C parser handling of OpenMP constructs needs checking for
 	     correct lvalue-to-rvalue conversions.  */
-	  if (flag_openmp)
+	  if (GCC_OPTION (flag_openmp))
 	    sorry ("%<_Atomic%> with OpenMP");
 	  if (!flag_isoc11)
 	    {
@@ -2569,7 +2569,7 @@ c_parser_enum_specifier (c_parser *parser)
   ret = parser_xref_tag (ident_loc, ENUMERAL_TYPE, ident);
   /* In ISO C, enumerated types can be referred to only if already
      defined.  */
-  if (pedantic && !COMPLETE_TYPE_P (ret.spec))
+  if (GCC_OPTION (pedantic) && !COMPLETE_TYPE_P (ret.spec))
     {
       gcc_assert (ident);
       pedwarn (enum_loc, OPT_Wpedantic,
@@ -2853,7 +2853,7 @@ c_parser_struct_declaration (c_parser *parser)
 	{
 	  pedwarn (decl_loc, OPT_Wpedantic,
 		   "ISO C forbids member declarations with no members");
-	  shadow_tag_warned (specs, pedantic);
+	  shadow_tag_warned (specs, GCC_OPTION (pedantic));
 	  ret = NULL_TREE;
 	}
       else
@@ -3340,7 +3340,7 @@ c_parser_direct_declarator_inner (c_parser *parser, bool id_present,
 	      dimen.value = NULL_TREE;
 	      star_seen = false;
 	    }
-	  else if (flag_cilkplus
+	  else if (GCC_OPTION (flag_cilkplus)
 		   && c_parser_next_token_is (parser, CPP_COLON))
 	    {
 	      dimen.value = error_mark_node;
@@ -3371,7 +3371,7 @@ c_parser_direct_declarator_inner (c_parser *parser, bool id_present,
 	}
       if (c_parser_next_token_is (parser, CPP_CLOSE_SQUARE))
 	c_parser_consume_token (parser);
-      else if (flag_cilkplus
+      else if (GCC_OPTION (flag_cilkplus)
 	       && c_parser_next_token_is (parser, CPP_COLON))
 	{
 	  error_at (c_parser_peek_token (parser)->location,
@@ -3504,7 +3504,7 @@ c_parser_parms_list_declarator (c_parser *parser, tree attrs, tree expr)
     {
       struct c_arg_info *ret = build_arg_info ();
 
-      if (flag_allow_parameterless_variadic_functions)
+      if (GCC_OPTION (flag_allow_parameterless_variadic_functions))
         {
           /* F (...) is allowed.  */
           ret->types = NULL_TREE;
@@ -3660,8 +3660,8 @@ static tree
 c_parser_asm_string_literal (c_parser *parser)
 {
   tree str;
-  int save_flag = warn_overlength_strings;
-  warn_overlength_strings = 0;
+  int save_flag = GCC_OPTION (warn_overlength_strings);
+  GCC_OPTION (warn_overlength_strings) = 0;
   if (c_parser_next_token_is (parser, CPP_STRING))
     {
       str = c_parser_peek_token (parser)->value;
@@ -3679,7 +3679,7 @@ c_parser_asm_string_literal (c_parser *parser)
       c_parser_error (parser, "expected string literal");
       str = NULL_TREE;
     }
-  warn_overlength_strings = save_flag;
+  GCC_OPTION (warn_overlength_strings) = save_flag;
   return str;
 }
 
@@ -3783,7 +3783,7 @@ c_parser_attribute_any_word (c_parser *parser)
 static inline bool
 is_cilkplus_vector_p (tree name)
 { 
-  if (flag_cilkplus && is_attribute_p ("vector", name)) 
+  if (GCC_OPTION (flag_cilkplus) && is_attribute_p ("vector", name)) 
     return true;
   return false;
 }
@@ -4009,7 +4009,7 @@ c_parser_attributes (c_parser *parser)
       parser->lex_untranslated_string = false;
     }
 
-  if (flag_cilkplus && !vec_safe_is_empty (parser->cilk_simd_fn_tokens))
+  if (GCC_OPTION (flag_cilkplus) && !vec_safe_is_empty (parser->cilk_simd_fn_tokens))
     c_finish_cilk_simd_fn_tokens (parser);
   return attrs;
 }
@@ -4461,7 +4461,7 @@ c_parser_compound_statement (c_parser *parser)
   c_parser_compound_statement_nostart (parser);
 
   /* If the compound stmt contains array notations, then we expand them.  */
-  if (flag_cilkplus && contains_array_notation_expr (stmt))
+  if (GCC_OPTION (flag_cilkplus) && contains_array_notation_expr (stmt))
     stmt = expand_array_notation_exprs (stmt);
   return c_end_compound_stmt (brace_loc, stmt, true);
 }
@@ -4550,7 +4550,7 @@ c_parser_compound_statement_nostart (c_parser *parser)
 					 true, NULL, vNULL);
 	  if (last_stmt)
 	    pedwarn_c90 (loc,
-			 (pedantic && !flag_isoc99)
+			 (GCC_OPTION (pedantic) && !flag_isoc99)
 			 ? OPT_Wpedantic
 			 : OPT_Wdeclaration_after_statement,
 			 "ISO C90 forbids mixed declarations and code");
@@ -4580,7 +4580,7 @@ c_parser_compound_statement_nostart (c_parser *parser)
 		 disable this diagnostic.  */
 	      restore_extension_diagnostics (ext);
 	      if (last_stmt)
-		pedwarn_c90 (loc, (pedantic && !flag_isoc99)
+		pedwarn_c90 (loc, (GCC_OPTION (pedantic) && !flag_isoc99)
 			     ? OPT_Wpedantic
 			     : OPT_Wdeclaration_after_statement,
 			     "ISO C90 forbids mixed declarations and code");
@@ -4881,7 +4881,7 @@ c_parser_statement_after_labels (c_parser *parser)
 	case RID_CILK_SYNC:
 	  c_parser_consume_token (parser);
 	  c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>");
-	  if (!flag_cilkplus) 
+	  if (!GCC_OPTION (flag_cilkplus)) 
 	    error_at (loc, "-fcilkplus must be enabled to use %<_Cilk_sync%>");
 	  else 
 	    add_stmt (build_cilk_sync ());
@@ -5018,7 +5018,7 @@ c_parser_condition (c_parser *parser)
   cond = c_parser_expression_conv (parser).value;
   cond = c_objc_common_truthvalue_conversion (loc, cond);
   cond = c_fully_fold (cond, false, NULL);
-  if (warn_sequence_point)
+  if (GCC_OPTION (warn_sequence_point))
     verify_sequence_points (cond);
   return cond;
 }
@@ -5151,7 +5151,7 @@ c_parser_if_statement (c_parser *parser)
   if_stmt = c_end_compound_stmt (loc, block, flag_isoc99);
 
   /* If the if statement contains array notations, then we expand them.  */
-  if (flag_cilkplus && contains_array_notation_expr (if_stmt))
+  if (GCC_OPTION (flag_cilkplus) && contains_array_notation_expr (if_stmt))
     if_stmt = fix_conditional_array_notations (if_stmt);
   add_stmt (if_stmt);
 }
@@ -5178,7 +5178,7 @@ c_parser_switch_statement (c_parser *parser)
       ce = c_parser_expression (parser);
       ce = convert_lvalue_to_rvalue (switch_cond_loc, ce, true, false);
       expr = ce.value;
-      if (flag_cilkplus && contains_array_notation_expr (expr))
+      if (GCC_OPTION (flag_cilkplus) && contains_array_notation_expr (expr))
 	{
 	  error_at (switch_cond_loc,
 		    "array notations cannot be used as a condition for switch "
@@ -5224,7 +5224,7 @@ c_parser_while_statement (c_parser *parser, bool ivdep)
   block = c_begin_compound_stmt (flag_isoc99);
   loc = c_parser_peek_token (parser)->location;
   cond = c_parser_paren_condition (parser);
-  if (flag_cilkplus && contains_array_notation_expr (cond))
+  if (GCC_OPTION (flag_cilkplus) && contains_array_notation_expr (cond))
     {
       error_at (loc, "array notations cannot be used as a condition for while "
 		"statement");
@@ -5276,7 +5276,7 @@ c_parser_do_statement (c_parser *parser, bool ivdep)
   new_cont = c_cont_label;
   c_cont_label = save_cont;
   cond = c_parser_paren_condition (parser);
-  if (flag_cilkplus && contains_array_notation_expr (cond))
+  if (GCC_OPTION (flag_cilkplus) && contains_array_notation_expr (cond))
     {
       error_at (loc, "array notations cannot be used as a condition for a "
 		"do-while statement");
@@ -5474,7 +5474,7 @@ c_parser_for_statement (c_parser *parser, bool ivdep)
 	  else
 	    {
 	      cond = c_parser_condition (parser);
-	      if (flag_cilkplus && contains_array_notation_expr (cond))
+	      if (GCC_OPTION (flag_cilkplus) && contains_array_notation_expr (cond))
 		{
 		  error_at (loc, "array notations cannot be used in a "
 			    "condition for a for-loop");
@@ -6370,7 +6370,7 @@ c_parser_unary_expression (c_parser *parser)
       op = c_parser_cast_expression (parser, NULL);
 
       /* If there is array notations in op, we expand them.  */
-      if (flag_cilkplus && TREE_CODE (op.value) == ARRAY_NOTATION_REF)
+      if (GCC_OPTION (flag_cilkplus) && TREE_CODE (op.value) == ARRAY_NOTATION_REF)
 	return fix_array_notation_expr (exp_loc, PREINCREMENT_EXPR, op);
       else
 	{
@@ -6383,7 +6383,7 @@ c_parser_unary_expression (c_parser *parser)
       op = c_parser_cast_expression (parser, NULL);
       
       /* If there is array notations in op, we expand them.  */
-      if (flag_cilkplus && TREE_CODE (op.value) == ARRAY_NOTATION_REF)
+      if (GCC_OPTION (flag_cilkplus) && TREE_CODE (op.value) == ARRAY_NOTATION_REF)
 	return fix_array_notation_expr (exp_loc, PREDECREMENT_EXPR, op);
       else
 	{
@@ -7493,7 +7493,7 @@ c_parser_postfix_expression (c_parser *parser)
 	  break;
 	case RID_CILK_SPAWN:
 	  c_parser_consume_token (parser);
-	  if (!flag_cilkplus)
+	  if (!GCC_OPTION (flag_cilkplus))
 	    {
 	      error_at (loc, "-fcilkplus must be enabled to use "
 			"%<_Cilk_spawn%>");
@@ -7647,7 +7647,7 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
 	case CPP_OPEN_SQUARE:
 	  /* Array reference.  */
 	  c_parser_consume_token (parser);
-	  if (flag_cilkplus
+	  if (GCC_OPTION (flag_cilkplus)
 	      && c_parser_peek_token (parser)->type == CPP_COLON)
 	    /* If we are here, then we have something like this:
 	       Array [ : ]
@@ -7666,7 +7666,7 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
 		 For 2 and 3 we handle it like we handle array notations.  The
 		 idx value we have above becomes the initial/start index.
 	      */
-	      if (flag_cilkplus
+	      if (GCC_OPTION (flag_cilkplus)
 		  && c_parser_peek_token (parser)->type == CPP_COLON)
 		expr.value = c_parser_array_notation (expr_loc, parser, idx, 
 						      expr.value);
@@ -7698,7 +7698,7 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
 				     "expected %<)%>");
 	  orig_expr = expr;
 	  mark_exp_read (expr.value);
-	  if (warn_sizeof_pointer_memaccess)
+	  if (GCC_OPTION (warn_sizeof_pointer_memaccess))
 	    sizeof_pointer_memaccess_warning (sizeof_arg_loc,
 					      expr.value, exprlist,
 					      sizeof_arg,
@@ -7785,7 +7785,7 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
 	  /* Postincrement.  */
 	  c_parser_consume_token (parser);
 	  /* If the expressions have array notations, we expand them.  */
-	  if (flag_cilkplus
+	  if (GCC_OPTION (flag_cilkplus)
 	      && TREE_CODE (expr.value) == ARRAY_NOTATION_REF)
 	    expr = fix_array_notation_expr (expr_loc, POSTINCREMENT_EXPR, expr);
 	  else
@@ -7801,7 +7801,7 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
 	  /* Postdecrement.  */
 	  c_parser_consume_token (parser);
 	  /* If the expressions have array notations, we expand them.  */
-	  if (flag_cilkplus
+	  if (GCC_OPTION (flag_cilkplus)
 	      && TREE_CODE (expr.value) == ARRAY_NOTATION_REF)
 	    expr = fix_array_notation_expr (expr_loc, POSTDECREMENT_EXPR, expr);
 	  else
@@ -9634,7 +9634,7 @@ c_parser_omp_clause_name (c_parser *parser)
 	    result = PRAGMA_OMP_CLAUSE_MAP;
 	  else if (!strcmp ("mergeable", p))
 	    result = PRAGMA_OMP_CLAUSE_MERGEABLE;
-	  else if (flag_cilkplus && !strcmp ("mask", p))
+	  else if (GCC_OPTION (flag_cilkplus) && !strcmp ("mask", p))
 	    result = PRAGMA_CILK_CLAUSE_MASK;
 	  break;
 	case 'n':
@@ -9646,7 +9646,7 @@ c_parser_omp_clause_name (c_parser *parser)
 	    result = PRAGMA_OMP_CLAUSE_NUM_TEAMS;
 	  else if (!strcmp ("num_threads", p))
 	    result = PRAGMA_OMP_CLAUSE_NUM_THREADS;
-	  else if (flag_cilkplus && !strcmp ("nomask", p))
+	  else if (GCC_OPTION (flag_cilkplus) && !strcmp ("nomask", p))
 	    result = PRAGMA_CILK_CLAUSE_NOMASK;
 	  break;
 	case 'o':
@@ -9692,7 +9692,7 @@ c_parser_omp_clause_name (c_parser *parser)
 	    result = PRAGMA_OMP_CLAUSE_UNTIED;
 	  break;
 	case 'v':
-	  if (flag_cilkplus && !strcmp ("vectorlength", p))
+	  if (GCC_OPTION (flag_cilkplus) && !strcmp ("vectorlength", p))
 	    result = PRAGMA_CILK_CLAUSE_VECTORLENGTH;
 	  break;
 	}
@@ -11981,7 +11981,7 @@ c_parser_omp_for (location_t loc, c_parser *parser,
 	    cclauses = cclauses_buf;
 
 	  c_parser_consume_token (parser);
-	  if (!flag_openmp)  /* flag_openmp_simd  */
+	  if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
 	    return c_parser_omp_simd (loc, parser, p_name, mask, cclauses);
 	  block = c_begin_compound_stmt (true);
 	  ret = c_parser_omp_simd (loc, parser, p_name, mask, cclauses);
@@ -11997,7 +11997,7 @@ c_parser_omp_for (location_t loc, c_parser *parser,
 	  return ret;
 	}
     }
-  if (!flag_openmp)  /* flag_openmp_simd  */
+  if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
     {
       c_parser_skip_to_pragma_eol (parser);
       return NULL_TREE;
@@ -12204,7 +12204,7 @@ c_parser_omp_parallel (location_t loc, c_parser *parser,
 	cclauses = cclauses_buf;
 
       c_parser_consume_token (parser);
-      if (!flag_openmp)  /* flag_openmp_simd  */
+      if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
 	return c_parser_omp_for (loc, parser, p_name, mask, cclauses);
       block = c_begin_omp_parallel ();
       c_parser_omp_for (loc, parser, p_name, mask, cclauses);
@@ -12220,7 +12220,7 @@ c_parser_omp_parallel (location_t loc, c_parser *parser,
       c_parser_skip_to_pragma_eol (parser);
       return NULL_TREE;
     }
-  else if (!flag_openmp)  /* flag_openmp_simd  */
+  else if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
     {
       c_parser_skip_to_pragma_eol (parser);
       return NULL_TREE;
@@ -12455,7 +12455,7 @@ c_parser_omp_distribute (location_t loc, c_parser *parser,
 	  if (cclauses == NULL)
 	    cclauses = cclauses_buf;
 	  c_parser_consume_token (parser);
-	  if (!flag_openmp)  /* flag_openmp_simd  */
+	  if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
 	    {
 	      if (simd)
 		return c_parser_omp_simd (loc, parser, p_name, mask, cclauses);
@@ -12480,7 +12480,7 @@ c_parser_omp_distribute (location_t loc, c_parser *parser,
 	  return ret;
 	}
     }
-  if (!flag_openmp)  /* flag_openmp_simd  */
+  if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
     {
       c_parser_skip_to_pragma_eol (parser);
       return NULL_TREE;
@@ -12533,7 +12533,7 @@ c_parser_omp_teams (location_t loc, c_parser *parser,
 	    cclauses = cclauses_buf;
 
 	  c_parser_consume_token (parser);
-	  if (!flag_openmp)  /* flag_openmp_simd  */
+	  if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
 	    return c_parser_omp_distribute (loc, parser, p_name, mask, cclauses);
 	  block = c_begin_compound_stmt (true);
 	  ret = c_parser_omp_distribute (loc, parser, p_name, mask, cclauses);
@@ -12548,7 +12548,7 @@ c_parser_omp_teams (location_t loc, c_parser *parser,
 	  return add_stmt (ret);
 	}
     }
-  if (!flag_openmp)  /* flag_openmp_simd  */
+  if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
     {
       c_parser_skip_to_pragma_eol (parser);
       return NULL_TREE;
@@ -12672,7 +12672,7 @@ c_parser_omp_target (c_parser *parser, enum pragma_context context)
 
 	  c_parser_consume_token (parser);
 	  strcpy (p_name, "#pragma omp target");
-	  if (!flag_openmp)  /* flag_openmp_simd  */
+	  if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
 	    return c_parser_omp_teams (loc, parser, p_name,
 				       OMP_TARGET_CLAUSE_MASK, cclauses);
 	  keep_next_level ();
@@ -12689,7 +12689,7 @@ c_parser_omp_target (c_parser *parser, enum pragma_context context)
 	  add_stmt (stmt);
 	  return true;
 	}
-      else if (!flag_openmp)  /* flag_openmp_simd  */
+      else if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
 	{
 	  c_parser_skip_to_pragma_eol (parser);
 	  return NULL_TREE;
@@ -12858,7 +12858,7 @@ static void
 c_finish_omp_declare_simd (c_parser *parser, tree fndecl, tree parms,
 			   vec<c_token> clauses)
 {
-  if (flag_cilkplus
+  if (GCC_OPTION (flag_cilkplus)
       && clauses.exists () && !vec_safe_is_empty (parser->cilk_simd_fn_tokens))
     {
       error ("%<#pragma omp declare simd%> cannot be used in the same "
@@ -12895,7 +12895,7 @@ c_finish_omp_declare_simd (c_parser *parser, tree fndecl, tree parms,
   gcc_assert (parser->tokens == &parser->tokens_buf[0]);
   bool is_cilkplus_cilk_simd_fn = false;
   
-  if (flag_cilkplus && !vec_safe_is_empty (parser->cilk_simd_fn_tokens))
+  if (GCC_OPTION (flag_cilkplus) && !vec_safe_is_empty (parser->cilk_simd_fn_tokens))
     {
       parser->tokens = parser->cilk_simd_fn_tokens->address ();
       parser->tokens_avail = vec_safe_length (parser->cilk_simd_fn_tokens);
@@ -13372,7 +13372,7 @@ c_parser_omp_declare (c_parser *parser, enum pragma_context context)
 	  c_parser_omp_declare_reduction (parser, context);
 	  return;
 	}
-      if (!flag_openmp)  /* flag_openmp_simd  */
+      if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
 	{
 	  c_parser_skip_to_pragma_eol (parser);
 	  return;
@@ -13525,7 +13525,7 @@ static bool
 c_parser_cilk_verify_simd (c_parser *parser,
 				  enum pragma_context context)
 {
-  if (!flag_cilkplus)
+  if (!GCC_OPTION (flag_cilkplus))
     {
       warning (0, "pragma simd ignored because -fcilkplus is not enabled");
       c_parser_skip_until_found (parser, CPP_PRAGMA_EOL, NULL);
@@ -13863,7 +13863,7 @@ c_parser_transaction (c_parser *parser, enum rid keyword)
   stmt = c_parser_compound_statement (parser);
   parser->in_transaction = old_in;
 
-  if (flag_tm)
+  if (GCC_OPTION (flag_tm))
     stmt = c_finish_transaction (loc, stmt, this_in);
   else
     error_at (loc, (keyword == RID_TRANSACTION_ATOMIC ?
@@ -13930,7 +13930,7 @@ c_parser_transaction_expression (c_parser *parser, enum rid keyword)
     }
   parser->in_transaction = old_in;
 
-  if (!flag_tm)
+  if (!GCC_OPTION (flag_tm))
     error_at (loc, (keyword == RID_TRANSACTION_ATOMIC ?
 	"%<__transaction_atomic%> without transactional memory support enabled"
 	: "%<__transaction_relaxed %> "
@@ -13961,7 +13961,7 @@ c_parser_transaction_cancel (c_parser *parser)
   if (attrs)
     is_outer = (parse_tm_stmt_attr (attrs, TM_STMT_ATTR_OUTER) != 0);
 
-  if (!flag_tm)
+  if (!GCC_OPTION (flag_tm))
     {
       error_at (loc, "%<__transaction_cancel%> without "
 		"transactional memory support enabled");
@@ -14020,7 +14020,7 @@ c_parse_file (void)
     the_parser->tokens = &the_parser->tokens_buf[0];
 
   /* Initialize EH, if we've been told to do so.  */
-  if (flag_exceptions)
+  if (GCC_OPTION (flag_exceptions))
     using_eh_for_cleanups ();
 
   c_parser_translation_unit (the_parser);
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index 0bfc12b..ef036af 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -1243,7 +1243,7 @@ comp_target_types (location_t location, tree ttl, tree ttr)
   if (val == 2)
     pedwarn (location, OPT_Wpedantic, "types are not quite compatible");
 
-  if (val == 1 && enum_and_int_p && warn_cxx_compat)
+  if (val == 1 && enum_and_int_p && GCC_OPTION (warn_cxx_compat))
     warning_at (location, OPT_Wc___compat,
 		"pointer target types incompatible in C++");
 
@@ -1824,7 +1824,7 @@ array_to_pointer_conversion (location_t loc, tree exp)
   /* In C++ array compound literals are temporary objects unless they are
      const or appear in namespace scope, so they are destroyed too soon
      to use them for much of anything  (c++/53220).  */
-  if (warn_cxx_compat && TREE_CODE (exp) == COMPOUND_LITERAL_EXPR)
+  if (GCC_OPTION (warn_cxx_compat) && TREE_CODE (exp) == COMPOUND_LITERAL_EXPR)
     {
       tree decl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
       if (!TREE_READONLY (decl) && !TREE_STATIC (decl))
@@ -2174,7 +2174,7 @@ lookup_field (tree type, tree component)
 		      /* The Plan 9 compiler permits referring
 			 directly to an anonymous struct/union field
 			 using a typedef name.  */
-		      if (flag_plan9_extensions
+		      if (GCC_OPTION (flag_plan9_extensions)
 			  && TYPE_NAME (TREE_TYPE (field)) != NULL_TREE
 			  && (TREE_CODE (TYPE_NAME (TREE_TYPE (field)))
 			      == TYPE_DECL)
@@ -2221,7 +2221,7 @@ lookup_field (tree type, tree component)
 	      /* The Plan 9 compiler permits referring directly to an
 		 anonymous struct/union field using a typedef
 		 name.  */
-	      if (flag_plan9_extensions
+	      if (GCC_OPTION (flag_plan9_extensions)
 		  && TYPE_NAME (TREE_TYPE (field)) != NULL_TREE
 		  && TREE_CODE (TYPE_NAME (TREE_TYPE (field))) == TYPE_DECL
 		  && (DECL_NAME (TYPE_NAME (TREE_TYPE (field)))
@@ -2356,7 +2356,7 @@ build_indirect_ref (location_t loc, tree ptr, ref_operator errstring)
 	  /* If a warning is issued, mark it to avoid duplicates from
 	     the backend.  This only needs to be done at
 	     warn_strict_aliasing > 2.  */
-	  if (warn_strict_aliasing > 2)
+	  if (GCC_OPTION (warn_strict_aliasing) > 2)
 	    if (strict_aliasing_warning (TREE_TYPE (TREE_OPERAND (pointer, 0)),
 					 type, TREE_OPERAND (pointer, 0)))
 	      TREE_NO_WARNING (pointer) = 1;
@@ -2428,7 +2428,7 @@ build_array_ref (location_t loc, tree array, tree index)
       || TREE_TYPE (index) == error_mark_node)
     return error_mark_node;
 
-  if (flag_cilkplus && contains_array_notation_expr (index))
+  if (GCC_OPTION (flag_cilkplus) && contains_array_notation_expr (index))
     {
       size_t rank = 0;
       if (!find_rank (loc, index, index, true, &rank))
@@ -2510,7 +2510,7 @@ build_array_ref (location_t loc, tree array, tree index)
 	    return error_mark_node;
 	}
 
-      if (pedantic)
+      if (GCC_OPTION (pedantic))
 	{
 	  tree foo = array;
 	  while (TREE_CODE (foo) == COMPONENT_REF)
@@ -2621,7 +2621,7 @@ build_external_ref (location_t loc, tree id, int fun, tree *type)
     {
       used_types_insert (TREE_TYPE (ref));
 
-      if (warn_cxx_compat
+      if (GCC_OPTION (warn_cxx_compat)
 	  && TREE_CODE (TREE_TYPE (ref)) == ENUMERAL_TYPE
 	  && C_TYPE_DEFINED_IN_STRUCT (TREE_TYPE (ref)))
 	{
@@ -2850,7 +2850,7 @@ build_function_call_vec (location_t loc, vec<location_t> arg_loc,
 
       name = DECL_NAME (function);
 
-      if (flag_tm)
+      if (GCC_OPTION (flag_tm))
 	tm_malloc_replacement (function);
       fundecl = function;
       /* Atomic functions have type checking/casting already done.  They are 
@@ -2858,7 +2858,7 @@ build_function_call_vec (location_t loc, vec<location_t> arg_loc,
       if (name && !strncmp (IDENTIFIER_POINTER (name), "__atomic_", 9))
         origtypes = NULL;
 
-      if (flag_cilkplus
+      if (GCC_OPTION (flag_cilkplus)
 	  && is_cilkplus_reduce_builtin (function))
 	origtypes = NULL;
     }
@@ -2880,7 +2880,7 @@ build_function_call_vec (location_t loc, vec<location_t> arg_loc,
   if (!(TREE_CODE (fntype) == POINTER_TYPE
 	&& TREE_CODE (TREE_TYPE (fntype)) == FUNCTION_TYPE))
     {
-      if (!flag_diagnostics_show_caret)
+      if (!GCC_OPTION (flag_diagnostics_show_caret))
 	error_at (loc,
 		  "called object %qE is not a function or function pointer",
 		  function);
@@ -3037,7 +3037,7 @@ convert_arguments (location_t loc, vec<location_t> arg_loc, tree typelist,
 	  break;
 	}
     }
-  if (flag_cilkplus && fundecl && is_cilkplus_reduce_builtin (fundecl))
+  if (GCC_OPTION (flag_cilkplus) && fundecl && is_cilkplus_reduce_builtin (fundecl))
     return vec_safe_length (values);
 
   /* Scan the given expressions and types, producing individual
@@ -3106,7 +3106,7 @@ convert_arguments (location_t loc, vec<location_t> arg_loc, tree typelist,
 
 	      /* Optionally warn about conversions that
 		 differ from the default conversions.  */
-	      if (warn_traditional_conversion || warn_traditional)
+	      if (GCC_OPTION (warn_traditional_conversion) || GCC_OPTION (warn_traditional))
 		{
 		  unsigned int formal_prec = TYPE_PRECISION (type);
 
@@ -3183,7 +3183,7 @@ convert_arguments (location_t loc, vec<location_t> arg_loc, tree typelist,
 		  /* Detect integer changing in width or signedness.
 		     These warnings are only activated with
 		     -Wtraditional-conversion, not with -Wtraditional.  */
-		  else if (warn_traditional_conversion && INTEGRAL_TYPE_P (type)
+		  else if (GCC_OPTION (warn_traditional_conversion) && INTEGRAL_TYPE_P (type)
 			   && INTEGRAL_TYPE_P (valtype))
 		    {
 		      tree would_have_been = default_conversion (val);
@@ -3265,7 +3265,7 @@ convert_arguments (location_t loc, vec<location_t> arg_loc, tree typelist,
 	  else
 	    {
 	      /* Convert `float' to `double'.  */
-	      if (warn_double_promotion && !c_inhibit_evaluation_warnings)
+	      if (GCC_OPTION (warn_double_promotion) && !c_inhibit_evaluation_warnings)
 		warning_at (arg_loc[parmnum], OPT_Wdouble_promotion,
 			 "implicit conversion from %qT to %qT when passing "
 			 "argument to function",
@@ -3366,11 +3366,11 @@ parser_build_binary_op (location_t location, enum tree_code code,
 
   /* Check for cases such as x+y<<z which users are likely
      to misinterpret.  */
-  if (warn_parentheses)
+  if (GCC_OPTION (warn_parentheses))
     warn_about_parentheses (location, code, code1, arg1.value, code2,
 			    arg2.value);
 
-  if (warn_logical_op)
+  if (GCC_OPTION (warn_logical_op))
     warn_logical_operator (location, code, TREE_TYPE (result.value),
 			   code1, arg1.value, code2, arg2.value);
 
@@ -3394,7 +3394,7 @@ parser_build_binary_op (location_t location, enum tree_code code,
     overflow_warning (location, result.value);
 
   /* Warn about comparisons of different enum types.  */
-  if (warn_enum_compare
+  if (GCC_OPTION (warn_enum_compare)
       && TREE_CODE_CLASS (code) == tcc_comparison
       && TREE_CODE (type1) == ENUMERAL_TYPE
       && TREE_CODE (type2) == ENUMERAL_TYPE
@@ -3672,7 +3672,7 @@ build_atomic_assign (location_t loc, tree lhs, enum tree_code modifycode,
 
   /* Create the expressions for floating-point environment
      manipulation, if required.  */
-  bool need_fenv = (flag_trapping_math
+  bool need_fenv = (GCC_OPTION (flag_trapping_math)
 		    && (FLOAT_TYPE_P (lhs_type) || FLOAT_TYPE_P (rhs_type)));
   tree hold_call = NULL_TREE, clear_call = NULL_TREE, update_call = NULL_TREE;
   if (need_fenv)
@@ -3924,7 +3924,7 @@ build_unary_op (location_t location,
 				    : lv_decrement)))
 	return error_mark_node;
 
-      if (warn_cxx_compat && TREE_CODE (TREE_TYPE (arg)) == ENUMERAL_TYPE)
+      if (GCC_OPTION (warn_cxx_compat) && TREE_CODE (TREE_TYPE (arg)) == ENUMERAL_TYPE)
 	{
 	  if (code == PREINCREMENT_EXPR || code == POSTINCREMENT_EXPR)
 	    warning_at (location, OPT_Wc___compat,
@@ -4464,7 +4464,7 @@ build_conditional_expr (location_t colon_loc, tree ifexp, bool ifexp_bcp,
 	}
     }
 
-  if (warn_cxx_compat)
+  if (GCC_OPTION (warn_cxx_compat))
     {
       tree t1 = op1_original_type ? op1_original_type : TREE_TYPE (orig_op1);
       tree t2 = op2_original_type ? op2_original_type : TREE_TYPE (orig_op2);
@@ -4544,7 +4544,7 @@ build_conditional_expr (location_t colon_loc, tree ifexp, bool ifexp_bcp,
 		  c_inhibit_evaluation_warnings
 		    -= (ifexp == truthvalue_true_node);
 
-		  if (warn_sign_compare)
+		  if (GCC_OPTION (warn_sign_compare))
 		    {
 		      if ((unsigned_op2
 			   && tree_expr_nonnegative_warnv_p (op1, &ovf))
@@ -4723,7 +4723,7 @@ build_compound_expr (location_t loc, tree expr1, tree expr2)
   tree eptype = NULL_TREE;
   tree ret;
 
-  if (flag_cilkplus
+  if (GCC_OPTION (flag_cilkplus)
       && (TREE_CODE (expr1) == CILK_SPAWN_STMT
 	  || TREE_CODE (expr2) == CILK_SPAWN_STMT))
     {
@@ -4751,7 +4751,7 @@ build_compound_expr (location_t loc, tree expr1, tree expr2)
       /* The left-hand operand of a comma expression is like an expression
 	 statement: with -Wunused, we should warn if it doesn't have
 	 any side-effects, unless it was explicitly cast to (void).  */
-      if (warn_unused_value)
+      if (GCC_OPTION (warn_unused_value))
 	{
 	  if (VOID_TYPE_P (TREE_TYPE (expr1))
 	      && CONVERT_EXPR_P (expr1))
@@ -4766,7 +4766,7 @@ build_compound_expr (location_t loc, tree expr1, tree expr2)
 	}
     }
   else if (TREE_CODE (expr1) == COMPOUND_EXPR
-	   && warn_unused_value)
+	   && GCC_OPTION (warn_unused_value))
     {
       tree r = expr1;
       location_t cloc = loc;
@@ -4787,7 +4787,7 @@ build_compound_expr (location_t loc, tree expr1, tree expr2)
      side-effects, but computes a value which is not used.  For example, in
      `foo() + bar(), baz()' the result of the `+' operator is not used,
      so we should issue a warning.  */
-  else if (warn_unused_value)
+  else if (GCC_OPTION (warn_unused_value))
     warn_if_unused_value (expr1, loc);
 
   if (expr2 == error_mark_node)
@@ -4993,7 +4993,7 @@ build_c_cast (location_t loc, tree type, tree expr)
       otype = TREE_TYPE (value);
 
       /* Optionally warn about potentially worrisome casts.  */
-      if (warn_cast_qual
+      if (GCC_OPTION (warn_cast_qual)
 	  && TREE_CODE (type) == POINTER_TYPE
 	  && TREE_CODE (otype) == POINTER_TYPE)
 	handle_warn_cast_qual (loc, type, otype);
@@ -5069,13 +5069,13 @@ build_c_cast (location_t loc, tree type, tree expr)
 		    OPT_Wint_to_pointer_cast, "cast to pointer from integer "
 		    "of different size");
 
-      if (warn_strict_aliasing <= 2)
+      if (GCC_OPTION (warn_strict_aliasing) <= 2)
         strict_aliasing_warning (otype, type, expr);
 
       /* If pedantic, warn for conversions between function and object
 	 pointer types, except for converting a null pointer constant
 	 to function pointer type.  */
-      if (pedantic
+      if (GCC_OPTION (pedantic)
 	  && TREE_CODE (type) == POINTER_TYPE
 	  && TREE_CODE (otype) == POINTER_TYPE
 	  && TREE_CODE (TREE_TYPE (otype)) == FUNCTION_TYPE
@@ -5083,7 +5083,7 @@ build_c_cast (location_t loc, tree type, tree expr)
 	pedwarn (loc, OPT_Wpedantic, "ISO C forbids "
 		 "conversion of function pointer to object pointer type");
 
-      if (pedantic
+      if (GCC_OPTION (pedantic)
 	  && TREE_CODE (type) == POINTER_TYPE
 	  && TREE_CODE (otype) == POINTER_TYPE
 	  && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE
@@ -5148,14 +5148,14 @@ c_cast_expr (location_t loc, struct c_type_name *type_name, tree expr)
   tree type_expr = NULL_TREE;
   bool type_expr_const = true;
   tree ret;
-  int saved_wsp = warn_strict_prototypes;
+  int saved_wsp = GCC_OPTION (warn_strict_prototypes);
 
   /* This avoids warnings about unprototyped casts on
      integers.  E.g. "#define SIG_DFL (void(*)())0".  */
   if (TREE_CODE (expr) == INTEGER_CST)
-    warn_strict_prototypes = 0;
+    GCC_OPTION (warn_strict_prototypes) = 0;
   type = groktypename (type_name, &type_expr, &type_expr_const);
-  warn_strict_prototypes = saved_wsp;
+  GCC_OPTION (warn_strict_prototypes) = saved_wsp;
 
   ret = build_c_cast (loc, type, expr);
   if (type_expr)
@@ -5173,7 +5173,7 @@ c_cast_expr (location_t loc, struct c_type_name *type_name, tree expr)
 
   /* C++ does not permits types to be defined in a cast, but it
      allows references to incomplete types.  */
-  if (warn_cxx_compat && type_name->specs->typespec_kind == ctsk_tagdef)
+  if (GCC_OPTION (warn_cxx_compat) && type_name->specs->typespec_kind == ctsk_tagdef)
     warning_at (loc, OPT_Wc___compat,
 		"defining a type in a cast is invalid in C++");
 
@@ -5329,7 +5329,7 @@ build_modify_expr (location_t location, tree lhs, tree lhs_origtype,
   /* Issue -Wc++-compat warnings about an assignment to an enum type
      when LHS does not have its original type.  This happens for,
      e.g., an enum bitfield in a struct.  */
-  if (warn_cxx_compat
+  if (GCC_OPTION (warn_cxx_compat)
       && lhs_origtype != NULL_TREE
       && lhs_origtype != lhstype
       && TREE_CODE (lhs_origtype) == ENUMERAL_TYPE)
@@ -5373,7 +5373,7 @@ build_modify_expr (location_t location, tree lhs, tree lhs_origtype,
     }
 
   /* Emit ObjC write barrier, if necessary.  */
-  if (c_dialect_objc () && flag_objc_gc)
+  if (c_dialect_objc () && GCC_OPTION (flag_objc_gc))
     {
       result = objc_generate_write_barrier (lhs, modifycode, newrhs);
       if (result)
@@ -5665,7 +5665,7 @@ convert_for_assignment (location_t location, location_t expr_loc, tree type,
       objc_ok = objc_compare_types (type, rhstype, parmno, rname);
     }
 
-  if (warn_cxx_compat)
+  if (GCC_OPTION (warn_cxx_compat))
     {
       tree checktype = origtype != NULL_TREE ? origtype : rhstype;
       if (checktype != error_mark_node
@@ -5903,7 +5903,7 @@ convert_for_assignment (location_t location, location_t expr_loc, tree type,
       /* The Plan 9 compiler permits a pointer to a struct to be
 	 automatically converted into a pointer to an anonymous field
 	 within the struct.  */
-      if (flag_plan9_extensions
+      if (GCC_OPTION (flag_plan9_extensions)
 	  && (TREE_CODE (mvl) == RECORD_TYPE || TREE_CODE(mvl) == UNION_TYPE)
 	  && (TREE_CODE (mvr) == RECORD_TYPE || TREE_CODE(mvr) == UNION_TYPE)
 	  && mvl != mvr)
@@ -5963,7 +5963,7 @@ convert_for_assignment (location_t location, location_t expr_loc, tree type,
 
       /* Check if the right-hand side has a format attribute but the
 	 left-hand side doesn't.  */
-      if (warn_suggest_attribute_format
+      if (GCC_OPTION (warn_suggest_attribute_format)
 	  && check_missing_format_attribute (type, rhstype))
 	{
 	  switch (errtype)
@@ -6007,7 +6007,7 @@ convert_for_assignment (location_t location, location_t expr_loc, tree type,
 		  == c_common_signed_type (mvr))
 	      && TYPE_ATOMIC (mvl) == TYPE_ATOMIC (mvr)))
 	{
-	  if (pedantic
+	  if (GCC_OPTION (pedantic)
 	      && ((VOID_TYPE_P (ttl) && TREE_CODE (ttr) == FUNCTION_TYPE)
 		  ||
 		  (VOID_TYPE_P (ttr)
@@ -6049,7 +6049,7 @@ convert_for_assignment (location_t location, location_t expr_loc, tree type,
 		       || target_cmp)
 		;
 	      /* If there is a mismatch, do warn.  */
-	      else if (warn_pointer_sign)
+	      else if (GCC_OPTION (warn_pointer_sign))
 		WARN_FOR_ASSIGNMENT (location, OPT_Wpointer_sign,
 				     G_("pointer targets in passing argument "
 					"%d of %qE differ in signedness"),
@@ -6447,7 +6447,7 @@ warning_init (int opt, const char *gmsgid)
 void
 maybe_warn_string_init (tree type, struct c_expr expr)
 {
-  if (pedantic
+  if (GCC_OPTION (pedantic)
       && TREE_CODE (type) == ARRAY_TYPE
       && TREE_CODE (expr.value) == STRING_CST
       && expr.original_code != STRING_CST)
@@ -6576,7 +6576,7 @@ digest_init (location_t init_loc, tree type, tree init, tree origtype,
 		pedwarn_init (init_loc, 0,
 			      ("initializer-string for array of chars "
 			       "is too long"));
-	      else if (warn_cxx_compat
+	      else if (GCC_OPTION (warn_cxx_compat)
 		       && 0 > compare_tree_int (TYPE_SIZE_UNIT (type), len))
 		warning_at (init_loc, OPT_Wc___compat,
 			    ("initializer-string for array chars "
@@ -6627,7 +6627,7 @@ digest_init (location_t init_loc, tree type, tree init, tree origtype,
 	}
     }
 
-  if (warn_sequence_point)
+  if (GCC_OPTION (warn_sequence_point))
     verify_sequence_points (inside_init);
 
   /* Any type can be initialized
@@ -6688,7 +6688,7 @@ digest_init (location_t init_loc, tree type, tree init, tree origtype,
       /* Compound expressions can only occur here if -Wpedantic or
 	 -pedantic-errors is specified.  In the later case, we always want
 	 an error.  In the former case, we simply want a warning.  */
-      if (require_constant && pedantic
+      if (require_constant && GCC_OPTION (pedantic)
 	  && TREE_CODE (inside_init) == COMPOUND_EXPR)
 	{
 	  inside_init
@@ -6699,7 +6699,7 @@ digest_init (location_t init_loc, tree type, tree init, tree origtype,
 	  else
 	    pedwarn_init (init_loc, OPT_Wpedantic,
 			  "initializer element is not constant");
-	  if (flag_pedantic_errors)
+	  if (GCC_OPTION (flag_pedantic_errors))
 	    inside_init = error_mark_node;
 	}
       else if (require_constant
@@ -6967,7 +6967,7 @@ start_init (tree decl, tree asmspec_tree ATTRIBUTE_UNUSED, int top_level)
     {
       require_constant_value = TREE_STATIC (decl);
       require_constant_elements
-	= ((TREE_STATIC (decl) || (pedantic && !flag_isoc99))
+	= ((TREE_STATIC (decl) || (GCC_OPTION (pedantic) && !flag_isoc99))
 	   /* For a scalar, you can always use any value to initialize,
 	      even within braces.  */
 	   && (TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE
@@ -7278,7 +7278,7 @@ push_init_level (int implicit, struct obstack * braced_init_obstack)
 	set_nonincremental_init (braced_init_obstack);
     }
 
-  if (implicit == 1 && warn_missing_braces && !missing_braces_mentioned)
+  if (implicit == 1 && GCC_OPTION (warn_missing_braces) && !missing_braces_mentioned)
     {
       missing_braces_mentioned = 1;
       warning_init (OPT_Wmissing_braces, "missing braces around initializer");
@@ -7416,7 +7416,7 @@ pop_init_level (int implicit, struct obstack * braced_init_obstack)
     }
 
   /* Warn when some struct elements are implicitly initialized to zero.  */
-  if (warn_missing_field_initializers
+  if (GCC_OPTION (warn_missing_field_initializers)
       && constructor_type
       && TREE_CODE (constructor_type) == RECORD_TYPE
       && constructor_unfilled_fields)
@@ -7782,7 +7782,7 @@ add_pending_init (tree purpose, tree value, tree origtype, bool implicit,
 		{
 		  if (TREE_SIDE_EFFECTS (p->value))
 		    warning_init (0, "initialized field with side-effects overwritten");
-		  else if (warn_override_init)
+		  else if (GCC_OPTION (warn_override_init))
 		    warning_init (OPT_Woverride_init, "initialized field overwritten");
 		}
 	      p->value = value;
@@ -7809,7 +7809,7 @@ add_pending_init (tree purpose, tree value, tree origtype, bool implicit,
 		{
 		  if (TREE_SIDE_EFFECTS (p->value))
 		    warning_init (0, "initialized field with side-effects overwritten");
-		  else if (warn_override_init)
+		  else if (GCC_OPTION (warn_override_init))
 		    warning_init (OPT_Woverride_init, "initialized field overwritten");
 		}
 	      p->value = value;
@@ -8249,7 +8249,7 @@ output_init_element (tree value, tree origtype, bool strict_string, tree type,
 
   /* Issue -Wc++-compat warnings about initializing a bitfield with
      enum type.  */
-  if (warn_cxx_compat
+  if (GCC_OPTION (warn_cxx_compat)
       && field != NULL_TREE
       && TREE_CODE (field) == FIELD_DECL
       && DECL_BIT_FIELD_TYPE (field) != NULL_TREE
@@ -8336,7 +8336,7 @@ output_init_element (tree value, tree origtype, bool strict_string, tree type,
 	  if (TREE_SIDE_EFFECTS (constructor_elements->last ().value))
 	    warning_init (0,
 			  "initialized field with side-effects overwritten");
-	  else if (warn_override_init)
+	  else if (GCC_OPTION (warn_override_init))
 	    warning_init (OPT_Woverride_init, "initialized field overwritten");
 	}
 
@@ -9127,7 +9127,7 @@ c_finish_return (location_t loc, tree retval, tree origtype)
     warning_at (loc, 0,
 		"function declared %<noreturn%> has a %<return%> statement");
 
-  if (flag_cilkplus && contains_array_notation_expr (retval))
+  if (GCC_OPTION (flag_cilkplus) && contains_array_notation_expr (retval))
     {
       /* Array notations are allowed in a return statement if it is inside a
 	 built-in array notation reduction function.  */
@@ -9140,7 +9140,7 @@ c_finish_return (location_t loc, tree retval, tree origtype)
 	  return error_mark_node;
 	}
     }
-  if (flag_cilkplus && retval && contains_cilk_spawn_stmt (retval))
+  if (GCC_OPTION (flag_cilkplus) && retval && contains_cilk_spawn_stmt (retval))
     {
       error_at (loc, "use of %<_Cilk_spawn%> in a return statement is not "
 		"allowed");
@@ -9163,7 +9163,7 @@ c_finish_return (location_t loc, tree retval, tree origtype)
   if (!retval)
     {
       current_function_returns_null = 1;
-      if ((warn_return_type || flag_isoc99)
+      if ((GCC_OPTION (warn_return_type) || flag_isoc99)
 	  && valtype != 0 && TREE_CODE (valtype) != VOID_TYPE)
 	{
 	  pedwarn_c99 (loc, flag_isoc99 ? 0 : OPT_Wreturn_type,
@@ -9260,7 +9260,7 @@ c_finish_return (location_t loc, tree retval, tree origtype)
       retval = build2 (MODIFY_EXPR, TREE_TYPE (res), res, t);
       SET_EXPR_LOCATION (retval, loc);
 
-      if (warn_sequence_point)
+      if (GCC_OPTION (warn_sequence_point))
 	verify_sequence_points (retval);
     }
 
@@ -9339,7 +9339,7 @@ c_start_case (location_t switch_loc,
 	  exp = c_fully_fold (exp, false, NULL);
 	  exp = default_conversion (exp);
 
-	  if (warn_sequence_point)
+	  if (GCC_OPTION (warn_sequence_point))
 	    verify_sequence_points (exp);
 	}
     }
@@ -9441,7 +9441,7 @@ c_finish_if_stmt (location_t if_locus, tree cond, tree then_block,
      else_block must be either 0 or be equal to the rank of the condition.  If
      the condition does not have array notations then break them up as it is
      broken up in a normal expression.  */
-  if (flag_cilkplus && contains_array_notation_expr (cond))
+  if (GCC_OPTION (flag_cilkplus) && contains_array_notation_expr (cond))
     {
       size_t then_rank = 0, cond_rank = 0, else_rank = 0;
       if (!find_rank (if_locus, cond, cond, true, &cond_rank))
@@ -9466,7 +9466,7 @@ c_finish_if_stmt (location_t if_locus, tree cond, tree then_block,
 	}
     }
   /* Diagnose an ambiguous else if if-then-else is nested inside if-then.  */
-  if (warn_parentheses && nested_if && else_block == NULL)
+  if (GCC_OPTION (warn_parentheses) && nested_if && else_block == NULL)
     {
       tree inner_if = then_block;
 
@@ -9516,7 +9516,7 @@ c_finish_loop (location_t start_locus, tree cond, tree incr, tree body,
 {
   tree entry = NULL, exit = NULL, t;
 
-  if (flag_cilkplus && contains_array_notation_expr (cond))
+  if (GCC_OPTION (flag_cilkplus) && contains_array_notation_expr (cond))
     {
       error_at (start_locus, "array notation expression cannot be used in a "
 		"loop%'s condition");
@@ -9690,7 +9690,7 @@ c_process_expr_stmt (location_t loc, tree expr)
 
   expr = c_fully_fold (expr, false, NULL);
 
-  if (warn_sequence_point)
+  if (GCC_OPTION (warn_sequence_point))
     verify_sequence_points (expr);
 
   if (TREE_TYPE (expr) != error_mark_node
@@ -9702,7 +9702,7 @@ c_process_expr_stmt (location_t loc, tree expr)
      Warnings for statement expressions will be emitted later, once we figure
      out which is the result.  */
   if (!STATEMENT_LIST_STMT_EXPR (cur_stmt_list)
-      && warn_unused_value)
+      && GCC_OPTION (warn_unused_value))
     emit_side_effect_warnings (loc, expr);
 
   exprv = expr;
@@ -9793,7 +9793,7 @@ c_finish_stmt_expr (location_t loc, tree body)
 
       /* If we're supposed to generate side effects warnings, process
 	 all of the statements except the last.  */
-      if (warn_unused_value)
+      if (GCC_OPTION (warn_unused_value))
 	{
 	  for (i = tsi_start (last); !tsi_one_before_end_p (i); tsi_next (&i))
 	    {
@@ -10066,12 +10066,12 @@ build_binary_op (location_t location, enum tree_code code,
   /* When Cilk Plus is enabled and there are array notations inside op0, then
      we check to see if there are builtin array notation functions.  If
      so, then we take on the type of the array notation inside it.  */
-  if (flag_cilkplus && contains_array_notation_expr (op0)) 
+  if (GCC_OPTION (flag_cilkplus) && contains_array_notation_expr (op0)) 
     orig_type0 = type0 = find_correct_array_notation_type (op0);
   else
     orig_type0 = type0 = TREE_TYPE (op0);
 
-  if (flag_cilkplus && contains_array_notation_expr (op1))
+  if (GCC_OPTION (flag_cilkplus) && contains_array_notation_expr (op1))
     orig_type1 = type1 = find_correct_array_notation_type (op1);
   else 
     orig_type1 = type1 = TREE_TYPE (op1);
@@ -10561,13 +10561,13 @@ build_binary_op (location_t location, enum tree_code code,
 	    }
 	  else if (VOID_TYPE_P (tt0) && !TYPE_ATOMIC (tt0))
 	    {
-	      if (pedantic && TREE_CODE (tt1) == FUNCTION_TYPE)
+	      if (GCC_OPTION (pedantic) && TREE_CODE (tt1) == FUNCTION_TYPE)
 		pedwarn (location, OPT_Wpedantic, "ISO C forbids "
 			 "comparison of %<void *%> with function pointer");
 	    }
 	  else if (VOID_TYPE_P (tt1) && !TYPE_ATOMIC (tt1))
 	    {
-	      if (pedantic && TREE_CODE (tt0) == FUNCTION_TYPE)
+	      if (GCC_OPTION (pedantic) && TREE_CODE (tt0) == FUNCTION_TYPE)
 		pedwarn (location, OPT_Wpedantic, "ISO C forbids "
 			 "comparison of %<void *%> with function pointer");
 	    }
@@ -10671,20 +10671,20 @@ build_binary_op (location_t location, enum tree_code code,
       else if (code0 == POINTER_TYPE && null_pointer_constant_p (orig_op1))
 	{
 	  result_type = type0;
-	  if (pedantic)
+	  if (GCC_OPTION (pedantic))
 	    pedwarn (location, OPT_Wpedantic,
 		     "ordered comparison of pointer with integer zero");
-	  else if (extra_warnings)
+	  else if (GCC_OPTION (extra_warnings))
 	    warning_at (location, OPT_Wextra,
 			"ordered comparison of pointer with integer zero");
 	}
       else if (code1 == POINTER_TYPE && null_pointer_constant_p (orig_op0))
 	{
 	  result_type = type1;
-	  if (pedantic)
+	  if (GCC_OPTION (pedantic))
 	    pedwarn (location, OPT_Wpedantic,
 		     "ordered comparison of pointer with integer zero");
-	  else if (extra_warnings)
+	  else if (GCC_OPTION (extra_warnings))
 	    warning_at (location, OPT_Wextra,
 			"ordered comparison of pointer with integer zero");
 	}
@@ -10743,7 +10743,7 @@ build_binary_op (location_t location, enum tree_code code,
 	      || code == MULT_EXPR
 	      || (code == TRUNC_DIV_EXPR && first_complex))
 	  && TREE_CODE (TREE_TYPE (result_type)) == REAL_TYPE
-	  && flag_signed_zeros)
+	  && GCC_OPTION (flag_signed_zeros))
 	{
 	  /* An operation on mixed real/complex operands must be
 	     handled specially, but the language-independent code can
@@ -10927,7 +10927,7 @@ build_binary_op (location_t location, enum tree_code code,
 						  NULL);
 		}
 
-	      if (warn_sign_compare)
+	      if (GCC_OPTION (warn_sign_compare))
 		warn_for_sign_compare (location, orig_op0_folded,
 				       orig_op1_folded, op0, op1,
 				       result_type, resultcode);
@@ -10978,7 +10978,7 @@ build_binary_op (location_t location, enum tree_code code,
 	return error_mark_node;
     }
 
-  if ((flag_sanitize & (SANITIZE_SHIFT | SANITIZE_DIVIDE))
+  if ((GCC_OPTION (flag_sanitize) & (SANITIZE_SHIFT | SANITIZE_DIVIDE))
       && current_function_decl != 0
       && !lookup_attribute ("no_sanitize_undefined",
 			    DECL_ATTRIBUTES (current_function_decl))
@@ -10989,9 +10989,9 @@ build_binary_op (location_t location, enum tree_code code,
       op1 = c_save_expr (op1);
       op0 = c_fully_fold (op0, false, NULL);
       op1 = c_fully_fold (op1, false, NULL);
-      if (doing_div_or_mod && (flag_sanitize & SANITIZE_DIVIDE))
+      if (doing_div_or_mod && (GCC_OPTION (flag_sanitize) & SANITIZE_DIVIDE))
 	instrument_expr = ubsan_instrument_division (location, op0, op1);
-      else if (doing_shift && (flag_sanitize & SANITIZE_SHIFT))
+      else if (doing_shift && (GCC_OPTION (flag_sanitize) & SANITIZE_SHIFT))
 	instrument_expr = ubsan_instrument_shift (location, code, op0, op1);
     }
 
@@ -12289,7 +12289,7 @@ c_build_qualified_type (tree type, int type_quals)
 tree
 c_build_va_arg (location_t loc, tree expr, tree type)
 {
-  if (warn_cxx_compat && TREE_CODE (type) == ENUMERAL_TYPE)
+  if (GCC_OPTION (warn_cxx_compat) && TREE_CODE (type) == ENUMERAL_TYPE)
     warning_at (loc, OPT_Wc___compat,
 		"C++ requires promoted type, not enum type, in %<va_arg%>");
   return build_va_arg (loc, expr, type);
diff --git a/gcc/caller-save.c b/gcc/caller-save.c
index 59917a8..4dc67d4 100644
--- a/gcc/caller-save.c
+++ b/gcc/caller-save.c
@@ -378,7 +378,7 @@ saved_hard_reg_compare_func (const void *v1p, const void *v2p)
   const struct saved_hard_reg *p1 = *(struct saved_hard_reg * const *) v1p;
   const struct saved_hard_reg *p2 = *(struct saved_hard_reg * const *) v2p;
 
-  if (flag_omit_frame_pointer)
+  if (GCC_OPTION (flag_omit_frame_pointer))
     {
       if (p1->call_freq - p2->call_freq != 0)
 	return p1->call_freq - p2->call_freq;
@@ -494,7 +494,7 @@ setup_save_areas (void)
     }
 
   /* If requested, figure out which hard regs can share save slots.  */
-  if (optimize && flag_ira_share_save_slots)
+  if (GCC_OPTION (optimize) && GCC_OPTION (flag_ira_share_save_slots))
     {
       rtx slot;
       char *saved_reg_conflicts;
diff --git a/gcc/calls.c b/gcc/calls.c
index f0c92dd..4e0a838 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -187,7 +187,7 @@ prepare_call_address (tree fndecl, rtx funexp, rtx static_chain_value,
   else if (! sibcallp)
     {
 #ifndef NO_FUNCTION_CSE
-      if (optimize && ! flag_no_function_cse)
+      if (GCC_OPTION (optimize) && ! GCC_OPTION (flag_no_function_cse))
 	funexp = force_reg (Pmode, funexp);
 #endif
     }
@@ -466,7 +466,7 @@ emit_call_1 (rtx funexp, tree fntree ATTRIBUTE_UNUSED, tree fndecl ATTRIBUTE_UNU
 	  if (ecf_flags & ECF_NORETURN)
 	    /* Just pretend we did the pop.  */
 	    stack_pointer_delta -= rounded_stack_size;
-	  else if (flag_defer_pop && inhibit_defer_pop == 0
+	  else if (GCC_OPTION (flag_defer_pop) && inhibit_defer_pop == 0
 	      && ! (ecf_flags & (ECF_CONST | ECF_PURE)))
 	    pending_stack_adjust += rounded_stack_size;
 	  else
@@ -747,7 +747,7 @@ flags_from_decl_or_type (const_tree exp)
       if (TREE_NOTHROW (exp))
 	flags |= ECF_NOTHROW;
 
-      if (flag_tm)
+      if (GCC_OPTION (flag_tm))
 	{
 	  if (is_tm_builtin (exp))
 	    flags |= ECF_TM_BUILTIN;
@@ -764,7 +764,7 @@ flags_from_decl_or_type (const_tree exp)
       if (TYPE_READONLY (exp))
 	flags |= ECF_CONST;
 
-      if (flag_tm
+      if (GCC_OPTION (flag_tm)
 	  && ((flags & ECF_CONST) != 0
 	      || lookup_attribute ("transaction_pure", TYPE_ATTRIBUTES (exp))))
 	flags |= ECF_TM_PURE;
@@ -874,7 +874,7 @@ precompute_register_parameters (int num_actuals, struct arg_data *args,
 		    > COSTS_N_INSNS (1)
 		 && ((*reg_parm_seen
 		      && targetm.small_register_classes_for_mode_p (args[i].mode))
-		     || optimize))
+		     || GCC_OPTION (optimize)))
 	  args[i].value = copy_to_mode_reg (args[i].mode, args[i].value);
       }
 }
@@ -1235,7 +1235,7 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
 
 	      if (!COMPLETE_TYPE_P (type)
 		  || TREE_CODE (TYPE_SIZE_UNIT (type)) != INTEGER_CST
-		  || (flag_stack_check == GENERIC_STACK_CHECK
+		  || (GCC_OPTION (flag_stack_check) == GENERIC_STACK_CHECK
 		      && compare_tree_int (TYPE_SIZE_UNIT (type),
 					   STACK_CHECK_MAX_VAR_SIZE) > 0))
 		{
@@ -2573,7 +2573,7 @@ expand_call (tree exp, rtx target, int ignore)
      there's cleanups, as we know there's code to follow the call.  */
 
   if (currently_expanding_call++ != 0
-      || !flag_optimize_sibling_calls
+      || !GCC_OPTION (flag_optimize_sibling_calls)
       || args_size.var
       || dbg_cnt (tail_call) == false)
     try_tail_call = 0;
@@ -2710,7 +2710,7 @@ expand_call (tree exp, rtx target, int ignore)
 	  || (pending_stack_adjust > 0
 	      && (flags & ECF_MAY_BE_ALLOCA))
 	  || (pending_stack_adjust > 0
-	      && flag_exceptions && !(flags & ECF_NOTHROW))
+	      && GCC_OPTION (flag_exceptions) && !(flags & ECF_NOTHROW))
 	  || pass == 0)
 	do_pending_stack_adjust ();
 
@@ -2773,7 +2773,7 @@ expand_call (tree exp, rtx target, int ignore)
 	      stack_arg_under_construction = 0;
 	    }
 	  argblock = push_block (ARGS_SIZE_RTX (adjusted_args_size), 0, 0);
-	  if (flag_stack_usage_info)
+	  if (GCC_OPTION (flag_stack_usage_info))
 	    current_function_has_unbounded_dynamic_stack_size = 1;
 	}
       else
@@ -2981,7 +2981,7 @@ expand_call (tree exp, rtx target, int ignore)
       /* Record the maximum pushed stack space size.  We need to delay
 	 doing it this far to take into account the optimization done
 	 by combine_pending_stack_adjustment_and_call.  */
-      if (flag_stack_usage_info
+      if (GCC_OPTION (flag_stack_usage_info)
 	  && !ACCUMULATE_OUTGOING_ARGS
 	  && pass
 	  && adjusted_args_size.var == 0)
@@ -3881,7 +3881,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
   if (args_size.constant > crtl->outgoing_args_size)
     crtl->outgoing_args_size = args_size.constant;
 
-  if (flag_stack_usage_info && !ACCUMULATE_OUTGOING_ARGS)
+  if (GCC_OPTION (flag_stack_usage_info) && !ACCUMULATE_OUTGOING_ARGS)
     {
       int pushed = args_size.constant + pending_stack_adjust;
       if (pushed > current_function_pushed_stack_size)
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c
index ae1f114..49fe2b1 100644
--- a/gcc/cfgbuild.c
+++ b/gcc/cfgbuild.c
@@ -346,7 +346,7 @@ make_edges (basic_block min, basic_block max, int update_p)
 				     EDGE_ABNORMAL | EDGE_ABNORMAL_CALL);
 		}
 
-	      if (flag_tm)
+	      if (GCC_OPTION (flag_tm))
 		{
 		  rtx note;
 		  for (note = REG_NOTES (insn); note; note = XEXP (note, 1))
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 77196ee..f2556c1 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -473,7 +473,7 @@ try_forward_edges (int mode, basic_block b)
 	      new_target = single_succ (target);
 	      if (target == new_target)
 		counter = n_basic_blocks_for_fn (cfun);
-	      else if (!optimize)
+	      else if (!GCC_OPTION (optimize))
 		{
 		  /* When not optimizing, ensure that edges or forwarder
 		     blocks with different locus are not optimized out.  */
@@ -1159,7 +1159,7 @@ old_insns_match_p (int mode ATTRIBUTE_UNUSED, rtx i1, rtx i2)
 
       /* For address sanitizer, never crossjump __asan_report_* builtins,
 	 otherwise errors might be reported on incorrect lines.  */
-      if (flag_sanitize & SANITIZE_ADDRESS)
+      if (GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
 	{
 	  rtx call = get_call_rtx_from (i1);
 	  if (call && GET_CODE (XEXP (XEXP (call, 0), 0)) == SYMBOL_REF)
@@ -3084,8 +3084,8 @@ execute_jump (void)
   delete_trivially_dead_insns (get_insns (), max_reg_num ());
   if (dump_file)
     dump_flow_info (dump_file, dump_flags);
-  cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0)
-	       | (flag_thread_jumps ? CLEANUP_THREADING : 0));
+  cleanup_cfg ((GCC_OPTION (optimize) ? CLEANUP_EXPENSIVE : 0)
+	       | (GCC_OPTION (flag_thread_jumps) ? CLEANUP_THREADING : 0));
   return 0;
 }
 
@@ -3129,7 +3129,7 @@ make_pass_jump (gcc::context *ctxt)
 static unsigned int
 execute_jump2 (void)
 {
-  cleanup_cfg (flag_crossjumping ? CLEANUP_CROSSJUMP : 0);
+  cleanup_cfg (GCC_OPTION (flag_crossjumping) ? CLEANUP_CROSSJUMP : 0);
   return 0;
 }
 
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index b7f6360..32de2ea 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -798,7 +798,7 @@ partition_stack_vars (void)
 	     sizes, as the shorter vars wouldn't be adequately protected.
 	     Don't do that for "large" (unsupported) alignment objects,
 	     those aren't protected anyway.  */
-	  if ((flag_sanitize & SANITIZE_ADDRESS) && ASAN_STACK && isize != jsize
+	  if ((GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS) && ASAN_STACK && isize != jsize
 	      && ialign * BITS_PER_UNIT <= MAX_SUPPORTED_STACK_ALIGNMENT)
 	    break;
 
@@ -981,7 +981,7 @@ expand_stack_vars (bool (*pred) (size_t), struct stack_vars_data *data)
       if (alignb * BITS_PER_UNIT <= MAX_SUPPORTED_STACK_ALIGNMENT)
 	{
 	  base = virtual_stack_vars_rtx;
-	  if ((flag_sanitize & SANITIZE_ADDRESS) && ASAN_STACK && pred)
+	  if ((GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS) && ASAN_STACK && pred)
 	    {
 	      HOST_WIDE_INT prev_offset = frame_offset;
 	      tree repr_decl = NULL_TREE;
@@ -1160,7 +1160,7 @@ defer_stack_allocation (tree var, bool toplevel)
   /* If stack protection is enabled, *all* stack variables must be deferred,
      so that we can re-order the strings to the top of the frame.
      Similarly for Address Sanitizer.  */
-  if (flag_stack_protect || ((flag_sanitize & SANITIZE_ADDRESS) && ASAN_STACK))
+  if (GCC_OPTION (flag_stack_protect) || ((GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS) && ASAN_STACK))
     return true;
 
   /* We handle "large" alignment via dynamic allocation.  We want to handle
@@ -1172,14 +1172,14 @@ defer_stack_allocation (tree var, bool toplevel)
      might be detached from their block and appear at toplevel when we reach
      here.  We want to coalesce them with variables from other blocks when
      the immediate contribution to the frame size would be noticeable.  */
-  if (toplevel && optimize > 0 && DECL_IGNORED_P (var) && !smallish)
+  if (toplevel && GCC_OPTION (optimize) > 0 && DECL_IGNORED_P (var) && !smallish)
     return true;
 
   /* Variables declared in the outermost scope automatically conflict
      with every other variable.  The only reason to want to defer them
      at all is that, after sorting, we can more efficiently pack
      small variables in the stack frame.  Continue to defer at -O2.  */
-  if (toplevel && optimize < 2)
+  if (toplevel && GCC_OPTION (optimize) < 2)
     return false;
 
   /* Without optimization, *most* variables are allocated from the
@@ -1188,7 +1188,7 @@ defer_stack_allocation (tree var, bool toplevel)
      other hand, we don't want the function's stack frame size to
      get completely out of hand.  So we avoid adding scalars and
      "small" aggregates to the list at all.  */
-  if (optimize == 0 && smallish)
+  if (GCC_OPTION (optimize) == 0 && smallish)
     return false;
 
   return true;
@@ -1426,8 +1426,8 @@ stack_protect_decl_phase (tree decl)
   if (bits & SPCT_HAS_SMALL_CHAR_ARRAY)
     has_short_buffer = true;
 
-  if (flag_stack_protect == SPCT_FLAG_ALL
-      || flag_stack_protect == SPCT_FLAG_STRONG)
+  if (GCC_OPTION (flag_stack_protect) == SPCT_FLAG_ALL
+      || GCC_OPTION (flag_stack_protect) == SPCT_FLAG_STRONG)
     {
       if ((bits & (SPCT_HAS_SMALL_CHAR_ARRAY | SPCT_HAS_LARGE_CHAR_ARRAY))
 	  && !(bits & SPCT_HAS_AGGREGATE))
@@ -1657,7 +1657,7 @@ expand_used_vars (void)
 	 link performed at -O0.  */
       if (TREE_CODE (SSA_NAME_VAR (var)) == VAR_DECL)
 	expand_one_var (var, true, true);
-      else if (DECL_IGNORED_P (SSA_NAME_VAR (var)) || optimize || in_lto_p)
+      else if (DECL_IGNORED_P (SSA_NAME_VAR (var)) || GCC_OPTION (optimize) || GCC_OPTION (in_lto_p))
 	{
 	  /* This is a PARM_DECL or RESULT_DECL.  For those partitions that
 	     contain the default def (representing the parm or result itself)
@@ -1673,7 +1673,7 @@ expand_used_vars (void)
     }
   pointer_map_destroy (ssa_name_decls);
 
-  if (flag_stack_protect == SPCT_FLAG_STRONG)
+  if (GCC_OPTION (flag_stack_protect) == SPCT_FLAG_STRONG)
     FOR_EACH_LOCAL_DECL (cfun, i, var)
       if (!is_global_var (var))
 	{
@@ -1769,7 +1769,7 @@ expand_used_vars (void)
 
       /* If stack protection is enabled, we don't share space between
 	 vulnerable data and non-vulnerable data.  */
-      if (flag_stack_protect)
+      if (GCC_OPTION (flag_stack_protect))
 	add_stack_protection_conflicts ();
 
       /* Now that we have collected all stack variables, and have computed a
@@ -1779,7 +1779,7 @@ expand_used_vars (void)
 	dump_stack_var_partition ();
     }
 
-  switch (flag_stack_protect)
+  switch (GCC_OPTION (flag_stack_protect))
     {
     case SPCT_FLAG_ALL:
       create_stack_guard ();
@@ -1821,11 +1821,11 @@ expand_used_vars (void)
 	  expand_stack_vars (stack_protect_decl_phase_1, &data);
 
 	  /* Phase 2 contains other kinds of arrays.  */
-	  if (flag_stack_protect == 2)
+	  if (GCC_OPTION (flag_stack_protect) == 2)
 	    expand_stack_vars (stack_protect_decl_phase_2, &data);
 	}
 
-      if ((flag_sanitize & SANITIZE_ADDRESS) && ASAN_STACK)
+      if ((GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS) && ASAN_STACK)
 	/* Phase 3, any partitions that need asan protection
 	   in addition to phase 1 and 2.  */
 	expand_stack_vars (asan_decl_phase_3, &data);
@@ -4775,12 +4775,12 @@ expand_debug_locations (void)
 {
   rtx insn;
   rtx last = get_last_insn ();
-  int save_strict_alias = flag_strict_aliasing;
+  int save_strict_alias = GCC_OPTION (flag_strict_aliasing);
 
   /* New alias sets while setting up memory attributes cause
      -fcompare-debug failures, even though it doesn't bring about any
      codegen changes.  */
-  flag_strict_aliasing = 0;
+  GCC_OPTION (flag_strict_aliasing) = 0;
 
   for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
     if (DEBUG_INSN_P (insn))
@@ -4820,7 +4820,7 @@ expand_debug_locations (void)
 	  avoid_complex_debug_insns (insn2, &INSN_VAR_LOCATION_LOC (insn2), 0);
       }
 
-  flag_strict_aliasing = save_strict_alias;
+  GCC_OPTION (flag_strict_aliasing) = save_strict_alias;
 }
 
 /* Expand basic block BB from GIMPLE trees to RTL.  */
@@ -5591,7 +5591,7 @@ gimple_expand_cfg (void)
 
   /* Resovle the function section.  Some targets, like ARM EABI rely on knowledge
      of the function section at exapnsion time to predict distance of calls.  */
-  resolve_unique_section (current_function_decl, 0, flag_function_sections);
+  resolve_unique_section (current_function_decl, 0, GCC_OPTION (flag_function_sections));
 
   /* Expand the variables recorded during gimple lowering.  */
   timevar_push (TV_VAR_EXPAND);
@@ -5604,7 +5604,7 @@ gimple_expand_cfg (void)
   timevar_pop (TV_VAR_EXPAND);
 
   /* Honor stack protection warnings.  */
-  if (warn_stack_protect)
+  if (GCC_OPTION (warn_stack_protect))
     {
       if (cfun->calls_alloca)
 	warning (OPT_Wstack_protector,
diff --git a/gcc/cfgloopanal.c b/gcc/cfgloopanal.c
index e01b9cc..7a90da9 100644
--- a/gcc/cfgloopanal.c
+++ b/gcc/cfgloopanal.c
@@ -409,8 +409,8 @@ estimate_reg_pressure_cost (unsigned n_new, unsigned n_old, bool speed,
        one.  */
     cost = target_spill_cost [speed] * n_new;
 
-  if (optimize && (flag_ira_region == IRA_REGION_ALL
-		   || flag_ira_region == IRA_REGION_MIXED)
+  if (GCC_OPTION (optimize) && (GCC_OPTION (flag_ira_region) == IRA_REGION_ALL
+		   || GCC_OPTION (flag_ira_region) == IRA_REGION_MIXED)
       && number_of_loops (cfun) <= (unsigned) IRA_MAX_LOOPS_NUM)
     /* IRA regional allocation deals with high register pressure
        better.  So decrease the cost (to do more accurate the cost
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 60b0c06..47c1c7c 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -448,7 +448,7 @@ rest_of_pass_free_cfg (void)
 #ifdef DELAY_SLOTS
   /* The resource.c machinery uses DF but the CFG isn't guaranteed to be
      valid at that point so it would be too late to call df_analyze.  */
-  if (optimize > 0 && flag_delayed_branch)
+  if (GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_delayed_branch))
     {
       df_note_add_problem ();
       df_analyze ();
@@ -892,7 +892,7 @@ rtl_merge_blocks (basic_block a, basic_block b)
 
   /* When not optimizing CFG and the edge is the only place in RTL which holds
      some unique locus, emit a nop with that locus in between.  */
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     {
       emit_nop_for_unique_locus_between (a, b);
       a_end = BB_END (a);
@@ -1025,7 +1025,7 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout)
 
   if (!onlyjump_p (insn))
     return NULL;
-  if ((!optimize || reload_completed) && tablejump_p (insn, NULL, NULL))
+  if ((!GCC_OPTION (optimize) || reload_completed) && tablejump_p (insn, NULL, NULL))
     return NULL;
 
   /* Avoid removing branch with side effects.  */
@@ -3017,7 +3017,7 @@ purge_dead_edges (basic_block bb)
 	    ;
 	  else if ((e->flags & EDGE_EH) && can_throw_internal (insn))
 	    ;
-	  else if (flag_tm && find_reg_note (insn, REG_TM, NULL))
+	  else if (GCC_OPTION (flag_tm) && find_reg_note (insn, REG_TM, NULL))
 	    ;
 	  else
 	    remove = true;
@@ -3111,7 +3111,7 @@ purge_dead_edges (basic_block bb)
       if (dump_file)
 	fprintf (dump_file, "Purged edges from bb %i\n", bb->index);
 
-      if (!optimize)
+      if (!GCC_OPTION (optimize))
 	return purged;
 
       /* Redistribute probabilities.  */
@@ -3868,7 +3868,7 @@ fixup_reorder_chain (void)
 
   /* Ensure goto_locus from edges has some instructions with that locus
      in RTL.  */
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     FOR_EACH_BB_FN (bb, cfun)
       {
         edge e;
@@ -4540,7 +4540,7 @@ cfg_layout_can_merge_blocks_p (basic_block a, basic_block b)
 	     When not optimizing, try_redirect_by_replacing_jump will
 	     not allow us to redirect an edge by replacing a table jump.  */
 	  && (!JUMP_P (BB_END (a))
-	      || ((!optimize || reload_completed)
+	      || ((!GCC_OPTION (optimize) || reload_completed)
 		  ? simplejump_p (BB_END (a)) : onlyjump_p (BB_END (a)))));
 }
 
@@ -4572,7 +4572,7 @@ cfg_layout_merge_blocks (basic_block a, basic_block b)
 
   /* When not optimizing CFG and the edge is the only place in RTL which holds
      some unique locus, emit a nop with that locus in between.  */
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     emit_nop_for_unique_locus_between (a, b);
 
   /* Move things from b->footer after a->footer.  */
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 577352f..390b5bb 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1788,7 +1788,7 @@ cgraph_remove_node (struct cgraph_node *node)
 		  && (TREE_ASM_WRITTEN (n->decl)
 		      || DECL_EXTERNAL (n->decl)
 		      || !n->analyzed
-		      || (!flag_wpa && n->in_other_partition)))))
+		      || (!GCC_OPTION (flag_wpa) && n->in_other_partition)))))
 	cgraph_release_function_body (node);
     }
 
@@ -2349,7 +2349,7 @@ bool
 cgraph_node_cannot_return (struct cgraph_node *node)
 {
   int flags = flags_from_decl_or_type (node->decl);
-  if (!flag_exceptions)
+  if (!GCC_OPTION (flag_exceptions))
     return (flags & ECF_NORETURN) != 0;
   else
     return ((flags & (ECF_NORETURN | ECF_NOTHROW))
@@ -2369,7 +2369,7 @@ cgraph_edge_cannot_lead_to_return (struct cgraph_edge *e)
   if (e->indirect_unknown_callee)
     {
       int flags = e->indirect_info->ecf_flags;
-      if (!flag_exceptions)
+      if (!GCC_OPTION (flag_exceptions))
 	return (flags & ECF_NORETURN) != 0;
       else
 	return ((flags & (ECF_NORETURN | ECF_NOTHROW))
@@ -2454,7 +2454,7 @@ cgraph_will_be_removed_from_program_if_no_direct_calls (struct cgraph_node *node
   gcc_assert (!node->global.inlined_to);
   if (cgraph_for_node_and_aliases (node, used_from_object_file_p, NULL, true))
     return false;
-  if (!in_lto_p && !flag_whole_program)
+  if (!GCC_OPTION (in_lto_p) && !GCC_OPTION (flag_whole_program))
     return cgraph_only_called_directly_p (node);
   else
     {
@@ -2830,7 +2830,7 @@ verify_cgraph_node (struct cgraph_node *node)
   else if (node->analyzed && gimple_has_body_p (node->decl)
            && !TREE_ASM_WRITTEN (node->decl)
            && (!DECL_EXTERNAL (node->decl) || node->global.inlined_to)
-           && !flag_wpa)
+           && !GCC_OPTION (flag_wpa))
     {
       if (this_cfun->cfg)
 	{
@@ -2992,7 +2992,7 @@ cgraph_get_body (struct cgraph_node *node)
   if (DECL_RESULT (decl))
     return false;
 
-  gcc_assert (in_lto_p);
+  gcc_assert (GCC_OPTION (in_lto_p));
 
   file_data = node->lto_file_data;
   name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c
index ca69033..bca5a03 100644
--- a/gcc/cgraphclones.c
+++ b/gcc/cgraphclones.c
@@ -416,7 +416,7 @@ cgraph_create_virtual_clone (struct cgraph_node *old_node,
   struct ipa_replace_map *map;
   char *name;
 
-  if (!in_lto_p)
+  if (!GCC_OPTION (in_lto_p))
     gcc_checking_assert  (tree_versionable_function_p (old_decl));
 
   gcc_assert (old_node->local.can_change_signature || !args_to_skip);
@@ -473,7 +473,7 @@ cgraph_create_virtual_clone (struct cgraph_node *old_node,
        && !DECL_EXTERNAL (old_decl)
        && !DECL_WEAK (old_decl)
        && !DECL_COMDAT (old_decl))
-      || in_lto_p)
+      || GCC_OPTION (in_lto_p))
     new_node->unique_name = true;
   FOR_EACH_VEC_SAFE_ELT (tree_map, i, map)
     ipa_maybe_record_reference (new_node, map->new_tree,
@@ -897,7 +897,7 @@ cgraph_function_versioning (struct cgraph_node *old_version_node,
        && !DECL_EXTERNAL (old_decl)
        && !DECL_WEAK (old_decl)
        && !DECL_COMDAT (old_decl))
-      || in_lto_p)
+      || GCC_OPTION (in_lto_p))
     new_version_node->unique_name = true;
 
   /* Update the call_expr on the edges to call the new version node. */
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 06283fc..85572f9 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -437,7 +437,7 @@ cgraph_finalize_function (tree decl, bool no_collect)
 
   /* With -fkeep-inline-functions we are keeping all inline functions except
      for extern inline ones.  */
-  if (flag_keep_inline_functions
+  if (GCC_OPTION (flag_keep_inline_functions)
       && DECL_DECLARED_INLINE_P (decl)
       && !DECL_EXTERNAL (decl)
       && !DECL_DISREGARD_INLINE_LIMITS (decl))
@@ -448,7 +448,7 @@ cgraph_finalize_function (tree decl, bool no_collect)
      declared inline and nested functions.  These were optimized out
      in the original implementation and it is unclear whether we want
      to change the behavior here.  */
-  if ((!optimize
+  if ((!GCC_OPTION (optimize)
        && !node->cpp_implicit_alias
        && !DECL_DISREGARD_INLINE_LIMITS (decl)
        && !DECL_DECLARED_INLINE_P (decl)
@@ -462,7 +462,7 @@ cgraph_finalize_function (tree decl, bool no_collect)
     (*debug_hooks->deferred_inline_function) (decl);
 
   /* Possibly warn about unused parameters.  */
-  if (warn_unused_parameter)
+  if (GCC_OPTION (warn_unused_parameter))
     do_warn_unused_parameter (decl);
 
   if (!no_collect)
@@ -824,7 +824,7 @@ varpool_finalize_decl (tree decl)
   if (TREE_THIS_VOLATILE (decl) || DECL_PRESERVE_P (decl)
       /* Traditionally we do not eliminate static variables when not
 	 optimizing and when not doing toplevel reoder.  */
-      || (!flag_toplevel_reorder && !DECL_COMDAT (node->decl)
+      || (!GCC_OPTION (flag_toplevel_reorder) && !DECL_COMDAT (node->decl)
 	  && !DECL_ARTIFICIAL (node->decl)))
     node->force_output = true;
 
@@ -837,7 +837,7 @@ varpool_finalize_decl (tree decl)
   /* Some frontends produce various interface variables after compilation
      finished.  */
   if (cgraph_state == CGRAPH_STATE_FINISHED
-      || (!flag_toplevel_reorder && cgraph_state == CGRAPH_STATE_EXPANSION))
+      || (!GCC_OPTION (flag_toplevel_reorder) && cgraph_state == CGRAPH_STATE_EXPANSION))
     varpool_assemble_decl (node);
 }
 
@@ -949,7 +949,7 @@ analyze_functions (void)
     FOR_EACH_SYMBOL (node)
       if (node->cpp_implicit_alias)
 	  fixup_same_cpp_alias_visibility (node, symtab_alias_target (node));
-  if (optimize && flag_devirtualize)
+  if (GCC_OPTION (optimize) && GCC_OPTION (flag_devirtualize))
     build_type_inheritance_graph ();
 
   /* Analysis adds static variables that in turn adds references to new functions.
@@ -1019,7 +1019,7 @@ analyze_functions (void)
 	      for (edge = cnode->callees; edge; edge = edge->next_callee)
 		if (edge->callee->definition)
 		   enqueue_node (edge->callee);
-	      if (optimize && flag_devirtualize)
+	      if (GCC_OPTION (optimize) && GCC_OPTION (flag_devirtualize))
 		{
 		  struct cgraph_edge *next;
 
@@ -1064,7 +1064,7 @@ analyze_functions (void)
           cgraph_process_new_functions ();
 	}
     }
-  if (optimize && flag_devirtualize)
+  if (GCC_OPTION (optimize) && GCC_OPTION (flag_devirtualize))
     update_type_inheritance_graph ();
 
   /* Collect entry points to the unit.  */
@@ -1481,14 +1481,14 @@ expand_thunk (struct cgraph_node *node, bool output_asm_thunks)
       if (!output_asm_thunks)
 	return false;
 
-      if (in_lto_p)
+      if (GCC_OPTION (in_lto_p))
 	cgraph_get_body (node);
       a = DECL_ARGUMENTS (thunk_fndecl);
       
       current_function_decl = thunk_fndecl;
 
       /* Ensure thunks are emitted in their correct sections.  */
-      resolve_unique_section (thunk_fndecl, 0, flag_function_sections);
+      resolve_unique_section (thunk_fndecl, 0, GCC_OPTION (flag_function_sections));
 
       DECL_RESULT (thunk_fndecl)
 	= build_decl (DECL_SOURCE_LOCATION (thunk_fndecl),
@@ -1534,14 +1534,14 @@ expand_thunk (struct cgraph_node *node, bool output_asm_thunks)
       gimple call;
       gimple ret;
 
-      if (in_lto_p)
+      if (GCC_OPTION (in_lto_p))
 	cgraph_get_body (node);
       a = DECL_ARGUMENTS (thunk_fndecl);
       
       current_function_decl = thunk_fndecl;
 
       /* Ensure thunks are emitted in their correct sections.  */
-      resolve_unique_section (thunk_fndecl, 0, flag_function_sections);
+      resolve_unique_section (thunk_fndecl, 0, GCC_OPTION (flag_function_sections));
 
       DECL_IGNORED_P (thunk_fndecl) = 1;
       bitmap_obstack_initialize (NULL);
@@ -1784,14 +1784,14 @@ expand_function (struct cgraph_node *node)
   /* If requested, warn about function definitions where the function will
      return a value (usually of some struct or union type) which itself will
      take up a lot of stack space.  */
-  if (warn_larger_than && !DECL_EXTERNAL (decl) && TREE_TYPE (decl))
+  if (GCC_OPTION (warn_larger_than) && !DECL_EXTERNAL (decl) && TREE_TYPE (decl))
     {
       tree ret_type = TREE_TYPE (TREE_TYPE (decl));
 
       if (ret_type && TYPE_SIZE_UNIT (ret_type)
 	  && TREE_CODE (TYPE_SIZE_UNIT (ret_type)) == INTEGER_CST
 	  && 0 < compare_tree_int (TYPE_SIZE_UNIT (ret_type),
-				   larger_than_size))
+				   GCC_OPTION (larger_than_size)))
 	{
 	  unsigned int size_as_int
 	    = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (ret_type));
@@ -1801,7 +1801,7 @@ expand_function (struct cgraph_node *node)
                      decl, size_as_int);
 	  else
 	    warning (OPT_Wlarger_than_, "size of return value of %q+D is larger than %wd bytes",
-                     decl, larger_than_size);
+                     decl, GCC_OPTION (larger_than_size));
 	}
     }
 
@@ -1888,7 +1888,7 @@ expand_all_functions (void)
     if (order[i]->process)
       order[new_order_pos++] = order[i];
 
-  if (flag_profile_reorder_functions)
+  if (GCC_OPTION (flag_profile_reorder_functions))
     qsort (order, new_order_pos, sizeof (struct cgraph_node *), node_cmp);
 
   for (i = new_order_pos - 1; i >= 0; i--)
@@ -1911,9 +1911,9 @@ expand_all_functions (void)
 
     if (dump_file)
       fprintf (dump_file, "Expanded functions with time profile (%s):%u/%u\n",
-               main_input_filename, profiled_func_count, expanded_func_count);
+               GCC_OPTION (main_input_filename), profiled_func_count, expanded_func_count);
 
-  if (cgraph_dump_file && flag_profile_reorder_functions)
+  if (cgraph_dump_file && GCC_OPTION (flag_profile_reorder_functions))
     fprintf (cgraph_dump_file, "Expanded functions with time profile:%u/%u\n",
              profiled_func_count, expanded_func_count);
 
@@ -2038,7 +2038,7 @@ ipa_passes (void)
 
   invoke_plugin_callbacks (PLUGIN_ALL_IPA_PASSES_START, NULL);
 
-  if (!in_lto_p)
+  if (!GCC_OPTION (in_lto_p))
     {
       execute_ipa_pass_list (passes->all_small_ipa_passes);
       if (seen_error ())
@@ -2056,7 +2056,7 @@ ipa_passes (void)
   if (cgraph_state < CGRAPH_STATE_IPA_SSA)
     cgraph_state = CGRAPH_STATE_IPA_SSA;
 
-  if (!in_lto_p)
+  if (!GCC_OPTION (in_lto_p))
     {
       /* Generate coverage variables and constructors.  */
       coverage_finish ();
@@ -2071,16 +2071,16 @@ ipa_passes (void)
     }
 
   /* Some targets need to handle LTO assembler output specially.  */
-  if (flag_generate_lto)
+  if (GCC_OPTION (flag_generate_lto))
     targetm.asm_out.lto_start ();
 
-  if (!in_lto_p)
+  if (!GCC_OPTION (in_lto_p))
     ipa_write_summaries ();
 
-  if (flag_generate_lto)
+  if (GCC_OPTION (flag_generate_lto))
     targetm.asm_out.lto_end ();
 
-  if (!flag_ltrans && (in_lto_p || !flag_lto || flag_fat_lto_objects))
+  if (!GCC_OPTION (flag_ltrans) && (GCC_OPTION (in_lto_p) || !GCC_OPTION (flag_lto) || GCC_OPTION (flag_fat_lto_objects)))
     execute_ipa_pass_list (passes->all_regular_ipa_passes);
   invoke_plugin_callbacks (PLUGIN_ALL_IPA_PASSES_END, NULL);
 
@@ -2156,17 +2156,17 @@ compile (void)
 #endif
 
   timevar_push (TV_CGRAPHOPT);
-  if (pre_ipa_mem_report)
+  if (GCC_OPTION (pre_ipa_mem_report))
     {
       fprintf (stderr, "Memory consumption before IPA\n");
       dump_memory_report (false);
     }
-  if (!quiet_flag)
+  if (!GCC_OPTION (quiet_flag))
     fprintf (stderr, "Performing interprocedural optimizations\n");
   cgraph_state = CGRAPH_STATE_IPA;
 
   /* If LTO is enabled, initialize the streamer hooks needed by GIMPLE.  */
-  if (flag_lto)
+  if (GCC_OPTION (flag_lto))
     lto_streamer_hooks_init ();
 
   /* Don't run the IPA passes if there was any error or sorry messages.  */
@@ -2175,7 +2175,7 @@ compile (void)
 
   /* Do nothing else if any IPA pass found errors or if we are just streaming LTO.  */
   if (seen_error ()
-      || (!in_lto_p && flag_lto && !flag_fat_lto_objects))
+      || (!GCC_OPTION (in_lto_p) && GCC_OPTION (flag_lto) && !GCC_OPTION (flag_fat_lto_objects)))
     {
       timevar_pop (TV_CGRAPHOPT);
       return;
@@ -2190,7 +2190,7 @@ compile (void)
       fprintf (cgraph_dump_file, "Optimized ");
       dump_symtab (cgraph_dump_file);
     }
-  if (post_ipa_mem_report)
+  if (GCC_OPTION (post_ipa_mem_report))
     {
       fprintf (stderr, "Memory consumption after IPA\n");
       dump_memory_report (false);
@@ -2199,7 +2199,7 @@ compile (void)
 
   /* Output everything.  */
   (*debug_hooks->assembly_start) ();
-  if (!quiet_flag)
+  if (!GCC_OPTION (quiet_flag))
     fprintf (stderr, "Assembling functions:\n");
 #ifdef ENABLE_CHECKING
   verify_symtab ();
@@ -2243,7 +2243,7 @@ compile (void)
 
   cgraph_state = CGRAPH_STATE_EXPANSION;
 
-  if (!flag_toplevel_reorder)
+  if (!GCC_OPTION (flag_toplevel_reorder))
     output_in_order ();
   else
     {
@@ -2306,13 +2306,13 @@ finalize_compilation_unit (void)
   /* Mark alias targets necessary and emit diagnostics.  */
   handle_alias_pairs ();
 
-  if (!quiet_flag)
+  if (!GCC_OPTION (quiet_flag))
     {
       fprintf (stderr, "\nAnalyzing compilation unit\n");
       fflush (stderr);
     }
 
-  if (flag_dump_passes)
+  if (GCC_OPTION (flag_dump_passes))
     dump_passes ();
 
   /* Gimplify and lower all functions, compute reachability and
diff --git a/gcc/cilk.h b/gcc/cilk.h
index ae96f53..f1b8b84 100644
--- a/gcc/cilk.h
+++ b/gcc/cilk.h
@@ -97,7 +97,7 @@ extern tree cilk_call_setjmp (tree);
 inline bool
 fn_contains_cilk_spawn_p (function *f)
 {
-  return (flag_cilkplus 
+  return (GCC_OPTION (flag_cilkplus) 
 	  && (f->calls_cilk_spawn || f->cilk_frame_decl != NULL_TREE));
 }
 
diff --git a/gcc/combine-stack-adj.c b/gcc/combine-stack-adj.c
index 69fd5ea..a660436 100644
--- a/gcc/combine-stack-adj.c
+++ b/gcc/combine-stack-adj.c
@@ -631,7 +631,7 @@ gate_handle_stack_adjustments (void)
   if (ACCUMULATE_OUTGOING_ARGS)
     return false;
 #endif
-  return flag_combine_stack_adjustments;
+  return GCC_OPTION (flag_combine_stack_adjustments);
 }
 
 static unsigned int
diff --git a/gcc/combine.c b/gcc/combine.c
index fc473b6..24be315 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -2481,7 +2481,7 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p,
       int ngood = 0;
       int nshift = 0;
 
-      if (!flag_expensive_optimizations)
+      if (!GCC_OPTION (flag_expensive_optimizations))
 	return 0;
 
       for (i = 0; i < 4; i++)
@@ -3040,7 +3040,7 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p,
 	 unmodified I2PAT is used in the PARALLEL and so a pattern
 	 with a modified I2SRC would not match.  */
 
-      if (flag_expensive_optimizations)
+      if (GCC_OPTION (flag_expensive_optimizations))
 	{
 	  /* Pass pc_rtx so no substitutions are done, just
 	     simplifications.  */
@@ -3547,7 +3547,7 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p,
 		       && GET_CODE (XEXP (src_op0, 0)) == code
 		       && (INTEGRAL_MODE_P (mode)
 			   || (FLOAT_MODE_P (mode)
-			       && flag_unsafe_math_optimizations)))
+			       && GCC_OPTION (flag_unsafe_math_optimizations))))
 		{
 		  rtx p = XEXP (XEXP (src_op0, 0), 0);
 		  rtx q = XEXP (XEXP (src_op0, 0), 1);
@@ -5374,7 +5374,7 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest,
        || code == AND || code == IOR || code == XOR
        || code == SMAX || code == SMIN || code == UMAX || code == UMIN)
       && ((INTEGRAL_MODE_P (mode) && code != DIV)
-	  || (flag_associative_math && FLOAT_MODE_P (mode))))
+	  || (GCC_OPTION (flag_associative_math) && FLOAT_MODE_P (mode))))
     {
       if (GET_CODE (XEXP (x, 0)) == code)
 	{
@@ -5648,7 +5648,7 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest,
 	}
 
       /* Try simplify a*(b/c) as (a*b)/c.  */
-      if (FLOAT_MODE_P (mode) && flag_associative_math
+      if (FLOAT_MODE_P (mode) && GCC_OPTION (flag_associative_math)
 	  && GET_CODE (XEXP (x, 0)) == DIV)
 	{
 	  rtx tem = simplify_binary_operation (MULT, mode,
@@ -6056,7 +6056,7 @@ simplify_if_then_else (rtx x)
 
   /* Look for MIN or MAX.  */
 
-  if ((! FLOAT_MODE_P (mode) || flag_unsafe_math_optimizations)
+  if ((! FLOAT_MODE_P (mode) || GCC_OPTION (flag_unsafe_math_optimizations))
       && comparison_p
       && rtx_equal_p (XEXP (cond, 0), true_rtx)
       && rtx_equal_p (XEXP (cond, 1), false_rtx)
@@ -7188,7 +7188,7 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos,
       /* If we know that no extraneous bits are set, and that the high
 	 bit is not set, convert the extraction to the cheaper of
 	 sign and zero extension, that are equivalent in these cases.  */
-      if (flag_expensive_optimizations
+      if (GCC_OPTION (flag_expensive_optimizations)
 	  && (HWI_COMPUTABLE_MODE_P (tmode)
 	      && ((nonzero_bits (new_rtx, tmode)
 		   & ~(((unsigned HOST_WIDE_INT)GET_MODE_MASK (tmode)) >> 1))
@@ -7372,7 +7372,7 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos,
 	 bit is not set, convert extraction to cheaper one - either
 	 SIGN_EXTENSION or ZERO_EXTENSION, that are equivalent in these
 	 cases.  */
-      if (flag_expensive_optimizations
+      if (GCC_OPTION (flag_expensive_optimizations)
 	  && (HWI_COMPUTABLE_MODE_P (GET_MODE (pos_rtx))
 	      && ((nonzero_bits (pos_rtx, GET_MODE (pos_rtx))
 		   & ~(((unsigned HOST_WIDE_INT)
@@ -9137,7 +9137,7 @@ apply_distributive_law (rtx x)
   /* Distributivity is not true for floating point as it can change the
      value.  So we don't do it unless -funsafe-math-optimizations.  */
   if (FLOAT_MODE_P (GET_MODE (x))
-      && ! flag_unsafe_math_optimizations)
+      && ! GCC_OPTION (flag_unsafe_math_optimizations))
     return x;
 
   /* The outer operation can only be one of the following:  */
@@ -9266,7 +9266,7 @@ distribute_and_simplify_rtx (rtx x, int n)
   /* Distributivity is not true for floating point as it can change the
      value.  So we don't do it unless -funsafe-math-optimizations.  */
   if (FLOAT_MODE_P (GET_MODE (x))
-      && ! flag_unsafe_math_optimizations)
+      && ! GCC_OPTION (flag_unsafe_math_optimizations))
     return NULL_RTX;
 
   decomposed = XEXP (x, n);
@@ -13856,7 +13856,7 @@ dump_combine_total_stats (FILE *file)
 static bool
 gate_handle_combine (void)
 {
-  return (optimize > 0);
+  return (GCC_OPTION (optimize) > 0);
 }
 
 /* Try combining insns through substitution.  */
diff --git a/gcc/common/config/arc/arc-common.c b/gcc/common/config/arc/arc-common.c
index 0398680..07105f8 100644
--- a/gcc/common/config/arc/arc-common.c
+++ b/gcc/common/config/arc/arc-common.c
@@ -34,7 +34,7 @@ arc_option_init_struct (struct gcc_options *opts)
   opts->x_flag_no_common = 255; /* Mark as not user-initialized.  */
 
   /* Which cpu we're compiling for (A5, ARC600, ARC601, ARC700).  */
-  arc_cpu = PROCESSOR_NONE;
+  GCC_OPTION (arc_cpu) = PROCESSOR_NONE;
 }
 
 /* Set default optimization options.  */
diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c
index 3fbe140..ada88b8 100644
--- a/gcc/compare-elim.c
+++ b/gcc/compare-elim.c
@@ -649,7 +649,7 @@ gate_compare_elim_after_reload (void)
   /* Setting this target hook value is how a backend indicates the need.  */
   if (targetm.flags_regnum == INVALID_REGNUM)
     return false;
-  return flag_compare_elim_after_reload;
+  return GCC_OPTION (flag_compare_elim_after_reload);
 }
 
 namespace {
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index ebd58c0..170d9bb 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -999,7 +999,7 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm)
   /* Remaining cases are all for DImode.  */
 
   val = INTVAL (imm);
-  subtargets = optimize && can_create_pseudo_p ();
+  subtargets = GCC_OPTION (optimize) && can_create_pseudo_p ();
 
   one_match = 0;
   zero_match = 0;
@@ -1700,9 +1700,9 @@ aarch64_frame_pointer_required (void)
      If we really did set flag_omit_frame_pointer normally, then we return false
      (no frame pointer required) in all cases.  */
 
-  if (flag_omit_frame_pointer && !faked_omit_frame_pointer)
+  if (GCC_OPTION (flag_omit_frame_pointer) && !faked_omit_frame_pointer)
     return false;
-  else if (flag_omit_leaf_frame_pointer)
+  else if (GCC_OPTION (flag_omit_leaf_frame_pointer))
     return !crtl->is_leaf || df_regs_ever_live_p (LR_REGNUM);
   return true;
 }
@@ -2051,7 +2051,7 @@ aarch64_expand_prologue (void)
   offset = frame_size = AARCH64_ROUND_UP (frame_size,
 					  STACK_BOUNDARY / BITS_PER_UNIT);
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = frame_size;
 
   fp_offset = (offset
@@ -4985,7 +4985,7 @@ aarch64_add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind,
   unsigned *cost = (unsigned *) data;
   unsigned retval = 0;
 
-  if (flag_vect_cost_model)
+  if (GCC_OPTION (flag_vect_cost_model))
     {
       tree vectype = stmt_info ? stmt_vectype (stmt_info) : NULL_TREE;
       int stmt_cost =
@@ -5085,10 +5085,10 @@ aarch64_parse_arch (void)
 {
   char *ext;
   const struct processor *arch;
-  char *str = (char *) alloca (strlen (aarch64_arch_string) + 1);
+  char *str = (char *) alloca (strlen (GCC_OPTION (aarch64_arch_string)) + 1);
   size_t len;
 
-  strcpy (str, aarch64_arch_string);
+  strcpy (str, GCC_OPTION (aarch64_arch_string));
 
   ext = strchr (str, '+');
 
@@ -5142,10 +5142,10 @@ aarch64_parse_cpu (void)
 {
   char *ext;
   const struct processor *cpu;
-  char *str = (char *) alloca (strlen (aarch64_cpu_string) + 1);
+  char *str = (char *) alloca (strlen (GCC_OPTION (aarch64_cpu_string)) + 1);
   size_t len;
 
-  strcpy (str, aarch64_cpu_string);
+  strcpy (str, GCC_OPTION (aarch64_cpu_string));
 
   ext = strchr (str, '+');
 
@@ -5190,8 +5190,8 @@ static void
 aarch64_parse_tune (void)
 {
   const struct processor *cpu;
-  char *str = (char *) alloca (strlen (aarch64_tune_string) + 1);
-  strcpy (str, aarch64_tune_string);
+  char *str = (char *) alloca (strlen (GCC_OPTION (aarch64_tune_string)) + 1);
+  strcpy (str, GCC_OPTION (aarch64_tune_string));
 
   /* Loop through the list of supported CPUs to find a match.  */
   for (cpu = all_cores; cpu->name != NULL; cpu++)
@@ -5221,17 +5221,17 @@ aarch64_override_options (void)
      So, first parse AARCH64_CPU_STRING, then the others, be careful
      with -march as, if -mcpu is not present on the command line, march
      must set a sensible default CPU.  */
-  if (aarch64_cpu_string)
+  if (GCC_OPTION (aarch64_cpu_string))
     {
       aarch64_parse_cpu ();
     }
 
-  if (aarch64_arch_string)
+  if (GCC_OPTION (aarch64_arch_string))
     {
       aarch64_parse_arch ();
     }
 
-  if (aarch64_tune_string)
+  if (GCC_OPTION (aarch64_tune_string))
     {
       aarch64_parse_tune ();
     }
@@ -5248,8 +5248,8 @@ aarch64_override_options (void)
   aarch64_build_bitmask_table ();
 
   /* This target defaults to strict volatile bitfields.  */
-  if (flag_strict_volatile_bitfields < 0 && abi_version_at_least (2))
-    flag_strict_volatile_bitfields = 1;
+  if (GCC_OPTION (flag_strict_volatile_bitfields) < 0 && abi_version_at_least (2))
+    GCC_OPTION (flag_strict_volatile_bitfields) = 1;
 
   /* If the user did not specify a processor, choose the default
      one for them.  This will be the CPU set during configuration using
@@ -5284,9 +5284,9 @@ aarch64_override_options_after_change (void)
      that aarch64_frame_pointer_required will be called.  We need to remember
      whether flag_omit_frame_pointer was turned on normally or just faked.  */
 
-  if (flag_omit_leaf_frame_pointer && !flag_omit_frame_pointer)
+  if (GCC_OPTION (flag_omit_leaf_frame_pointer) && !GCC_OPTION (flag_omit_frame_pointer))
     {
-      flag_omit_frame_pointer = true;
+      GCC_OPTION (flag_omit_frame_pointer) = true;
       faked_omit_frame_pointer = true;
     }
 }
@@ -5309,9 +5309,9 @@ aarch64_init_expanders (void)
 static void
 initialize_aarch64_code_model (void)
 {
-   if (flag_pic)
+   if (GCC_OPTION (flag_pic))
      {
-       switch (aarch64_cmodel_var)
+       switch (GCC_OPTION (aarch64_cmodel_var))
 	 {
 	 case AARCH64_CMODEL_TINY:
 	   aarch64_cmodel = AARCH64_CMODEL_TINY_PIC;
@@ -5321,13 +5321,13 @@ initialize_aarch64_code_model (void)
 	   break;
 	 case AARCH64_CMODEL_LARGE:
 	   sorry ("code model %qs with -f%s", "large",
-		  flag_pic > 1 ? "PIC" : "pic");
+		  GCC_OPTION (flag_pic) > 1 ? "PIC" : "pic");
 	 default:
 	   gcc_unreachable ();
 	 }
      }
    else
-     aarch64_cmodel = aarch64_cmodel_var;
+     aarch64_cmodel = GCC_OPTION (aarch64_cmodel_var);
 }
 
 /* Return true if SYMBOL_REF X binds locally.  */
@@ -6202,7 +6202,7 @@ aapcs_vfp_sub_candidate (const_tree type, enum machine_mode *modep)
 static bool
 aarch64_lra_p (void)
 {
-  return aarch64_lra_flag;
+  return GCC_OPTION (aarch64_lra_flag);
 }
 
 /* Return TRUE if the type, as described by TYPE and MODE, is a composite
@@ -8500,7 +8500,7 @@ aarch64_cannot_change_mode_class (enum machine_mode from,
 #undef TARGET_VECTORIZE_PREFERRED_SIMD_MODE
 #define TARGET_VECTORIZE_PREFERRED_SIMD_MODE aarch64_preferred_simd_mode
 
-#undef TARGET_VECTORIZE_BUILTINS
+#undef GCC_OPTION (TARGET_VECTORIZE_BUILTINS)
 #define TARGET_VECTORIZE_BUILTINS
 
 #undef TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index 7962aa4..9a67f52 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -127,7 +127,7 @@
    faster.  */
 #define CONSTANT_ALIGNMENT(EXP, ALIGN)		\
   ((TREE_CODE (EXP) == STRING_CST		\
-    && !optimize_size				\
+    && !GCC_OPTION (optimize_size)				\
     && (ALIGN) < BITS_PER_WORD)			\
    ? BITS_PER_WORD : ALIGN)
 
@@ -547,7 +547,7 @@ enum aarch64_abi_type
 #define AARCH64_ABI_DEFAULT AARCH64_ABI_LP64
 #endif
 
-#define TARGET_ILP32	(aarch64_abi & AARCH64_ABI_ILP32)
+#define TARGET_ILP32	(GCC_OPTION (aarch64_abi) & AARCH64_ABI_ILP32)
 
 enum arm_pcs
 {
@@ -833,7 +833,7 @@ do {									     \
 		(FP_REGNUM_P (REGNO) && GET_MODE_SIZE (MODE) > 8)
 
 /* Check TLS Descriptors mechanism is selected.  */
-#define TARGET_TLS_DESC (aarch64_tls_dialect == TLS_DESCRIPTORS)
+#define TARGET_TLS_DESC (GCC_OPTION (aarch64_tls_dialect) == TLS_DESCRIPTORS)
 
 extern enum aarch64_code_model aarch64_cmodel;
 
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 99a6ac8..0397535 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -1044,7 +1044,7 @@
   "
   if (! aarch64_plus_operand (operands[2], VOIDmode))
     {
-      rtx subtarget = ((optimize && can_create_pseudo_p ())
+      rtx subtarget = ((GCC_OPTION (optimize) && can_create_pseudo_p ())
 		       ? gen_reg_rtx (<MODE>mode) : operands[0]);
       HOST_WIDE_INT imm = INTVAL (operands[2]);
 
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index df4cc1b..a0479d0 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -282,13 +282,13 @@ alpha_option_override (void)
   /* Default to full IEEE compliance mode for Go language.  */
   if (strcmp (lang_hooks.name, "GNU Go") == 0
       && !(target_flags_explicit & MASK_IEEE))
-    target_flags |= MASK_IEEE;
+    GCC_OPTION (target_flags) |= MASK_IEEE;
 
   alpha_fprm = ALPHA_FPRM_NORM;
   alpha_tp = ALPHA_TP_PROG;
   alpha_fptm = ALPHA_FPTM_N;
 
-  if (TARGET_IEEE)
+  if (GCC_OPTION (TARGET_IEEE))
     {
       alpha_tp = ALPHA_TP_INSN;
       alpha_fptm = ALPHA_FPTM_SU;
@@ -299,68 +299,68 @@ alpha_option_override (void)
       alpha_fptm = ALPHA_FPTM_SUI;
     }
 
-  if (alpha_tp_string)
+  if (GCC_OPTION (alpha_tp_string))
     {
-      if (! strcmp (alpha_tp_string, "p"))
+      if (! strcmp (GCC_OPTION (alpha_tp_string), "p"))
 	alpha_tp = ALPHA_TP_PROG;
-      else if (! strcmp (alpha_tp_string, "f"))
+      else if (! strcmp (GCC_OPTION (alpha_tp_string), "f"))
 	alpha_tp = ALPHA_TP_FUNC;
-      else if (! strcmp (alpha_tp_string, "i"))
+      else if (! strcmp (GCC_OPTION (alpha_tp_string), "i"))
 	alpha_tp = ALPHA_TP_INSN;
       else
-	error ("bad value %qs for -mtrap-precision switch", alpha_tp_string);
+	error ("bad value %qs for -mtrap-precision switch", GCC_OPTION (alpha_tp_string));
     }
 
-  if (alpha_fprm_string)
+  if (GCC_OPTION (alpha_fprm_string))
     {
-      if (! strcmp (alpha_fprm_string, "n"))
+      if (! strcmp (GCC_OPTION (alpha_fprm_string), "n"))
 	alpha_fprm = ALPHA_FPRM_NORM;
-      else if (! strcmp (alpha_fprm_string, "m"))
+      else if (! strcmp (GCC_OPTION (alpha_fprm_string), "m"))
 	alpha_fprm = ALPHA_FPRM_MINF;
-      else if (! strcmp (alpha_fprm_string, "c"))
+      else if (! strcmp (GCC_OPTION (alpha_fprm_string), "c"))
 	alpha_fprm = ALPHA_FPRM_CHOP;
-      else if (! strcmp (alpha_fprm_string,"d"))
+      else if (! strcmp (GCC_OPTION (alpha_fprm_string),"d"))
 	alpha_fprm = ALPHA_FPRM_DYN;
       else
 	error ("bad value %qs for -mfp-rounding-mode switch",
-	       alpha_fprm_string);
+	       GCC_OPTION (alpha_fprm_string));
     }
 
-  if (alpha_fptm_string)
+  if (GCC_OPTION (alpha_fptm_string))
     {
-      if (strcmp (alpha_fptm_string, "n") == 0)
+      if (strcmp (GCC_OPTION (alpha_fptm_string), "n") == 0)
 	alpha_fptm = ALPHA_FPTM_N;
-      else if (strcmp (alpha_fptm_string, "u") == 0)
+      else if (strcmp (GCC_OPTION (alpha_fptm_string), "u") == 0)
 	alpha_fptm = ALPHA_FPTM_U;
-      else if (strcmp (alpha_fptm_string, "su") == 0)
+      else if (strcmp (GCC_OPTION (alpha_fptm_string), "su") == 0)
 	alpha_fptm = ALPHA_FPTM_SU;
-      else if (strcmp (alpha_fptm_string, "sui") == 0)
+      else if (strcmp (GCC_OPTION (alpha_fptm_string), "sui") == 0)
 	alpha_fptm = ALPHA_FPTM_SUI;
       else
-	error ("bad value %qs for -mfp-trap-mode switch", alpha_fptm_string);
+	error ("bad value %qs for -mfp-trap-mode switch", GCC_OPTION (alpha_fptm_string));
     }
 
-  if (alpha_cpu_string)
+  if (GCC_OPTION (alpha_cpu_string))
     {
       for (i = 0; i < ct_size; i++)
-	if (! strcmp (alpha_cpu_string, cpu_table [i].name))
+	if (! strcmp (GCC_OPTION (alpha_cpu_string), cpu_table [i].name))
 	  {
 	    alpha_tune = alpha_cpu = cpu_table[i].processor;
 	    line_size = cpu_table[i].line_size;
 	    l1_size = cpu_table[i].l1_size;
 	    l2_size = cpu_table[i].l2_size;
-	    target_flags &= ~ (MASK_BWX | MASK_MAX | MASK_FIX | MASK_CIX);
-	    target_flags |= cpu_table[i].flags;
+	    GCC_OPTION (target_flags) &= ~ (MASK_BWX | MASK_MAX | MASK_FIX | MASK_CIX);
+	    GCC_OPTION (target_flags) |= cpu_table[i].flags;
 	    break;
 	  }
       if (i == ct_size)
-	error ("bad value %qs for -mcpu switch", alpha_cpu_string);
+	error ("bad value %qs for -mcpu switch", GCC_OPTION (alpha_cpu_string));
     }
 
-  if (alpha_tune_string)
+  if (GCC_OPTION (alpha_tune_string))
     {
       for (i = 0; i < ct_size; i++)
-	if (! strcmp (alpha_tune_string, cpu_table [i].name))
+	if (! strcmp (GCC_OPTION (alpha_tune_string), cpu_table [i].name))
 	  {
 	    alpha_tune = cpu_table[i].processor;
 	    line_size = cpu_table[i].line_size;
@@ -369,7 +369,7 @@ alpha_option_override (void)
 	    break;
 	  }
       if (i == ct_size)
-	error ("bad value %qs for -mtune switch", alpha_tune_string);
+	error ("bad value %qs for -mtune switch", GCC_OPTION (alpha_tune_string));
     }
 
   if (line_size)
@@ -416,22 +416,22 @@ alpha_option_override (void)
 	}
       if (target_flags_explicit & MASK_LONG_DOUBLE_128)
 	warning (0, "128-bit long double not supported for VAX floats");
-      target_flags &= ~MASK_LONG_DOUBLE_128;
+      GCC_OPTION (target_flags) &= ~MASK_LONG_DOUBLE_128;
     }
 
   {
     char *end;
     int lat;
 
-    if (!alpha_mlat_string)
-      alpha_mlat_string = "L1";
+    if (!GCC_OPTION (alpha_mlat_string))
+      GCC_OPTION (alpha_mlat_string) = "L1";
 
-    if (ISDIGIT ((unsigned char)alpha_mlat_string[0])
-	&& (lat = strtol (alpha_mlat_string, &end, 10), *end == '\0'))
+    if (ISDIGIT ((unsigned char)GCC_OPTION (alpha_mlat_string)[0])
+	&& (lat = strtol (GCC_OPTION (alpha_mlat_string), &end, 10), *end == '\0'))
       ;
-    else if ((alpha_mlat_string[0] == 'L' || alpha_mlat_string[0] == 'l')
-	     && ISDIGIT ((unsigned char)alpha_mlat_string[1])
-	     && alpha_mlat_string[2] == '\0')
+    else if ((GCC_OPTION (alpha_mlat_string)[0] == 'L' || GCC_OPTION (alpha_mlat_string)[0] == 'l')
+	     && ISDIGIT ((unsigned char)GCC_OPTION (alpha_mlat_string)[1])
+	     && GCC_OPTION (alpha_mlat_string)[2] == '\0')
       {
 	static int const cache_latency[][4] =
 	{
@@ -440,7 +440,7 @@ alpha_option_override (void)
 	  { 3, 12, 30 },	/* ev6 -- Bcache from DS20 LMbench.  */
 	};
 
-	lat = alpha_mlat_string[1] - '0';
+	lat = GCC_OPTION (alpha_mlat_string)[1] - '0';
 	if (lat <= 0 || lat > 3 || cache_latency[alpha_tune][lat-1] == -1)
 	  {
 	    warning (0, "L%d cache latency unknown for %s",
@@ -450,7 +450,7 @@ alpha_option_override (void)
 	else
 	  lat = cache_latency[alpha_tune][lat-1];
       }
-    else if (! strcmp (alpha_mlat_string, "main"))
+    else if (! strcmp (GCC_OPTION (alpha_mlat_string), "main"))
       {
 	/* Most current memories have about 370ns latency.  This is
 	   a reasonable guess for a fast cpu.  */
@@ -458,7 +458,7 @@ alpha_option_override (void)
       }
     else
       {
-	warning (0, "bad value %qs for -mmemory-latency", alpha_mlat_string);
+	warning (0, "bad value %qs for -mmemory-latency", GCC_OPTION (alpha_mlat_string));
 	lat = 3;
       }
 
@@ -467,25 +467,25 @@ alpha_option_override (void)
 
   /* Default the definition of "small data" to 8 bytes.  */
   if (!global_options_set.x_g_switch_value)
-    g_switch_value = 8;
+    GCC_OPTION (g_switch_value) = 8;
 
   /* Infer TARGET_SMALL_DATA from -fpic/-fPIC.  */
-  if (flag_pic == 1)
-    target_flags |= MASK_SMALL_DATA;
-  else if (flag_pic == 2)
-    target_flags &= ~MASK_SMALL_DATA;
+  if (GCC_OPTION (flag_pic) == 1)
+    GCC_OPTION (target_flags) |= MASK_SMALL_DATA;
+  else if (GCC_OPTION (flag_pic) == 2)
+    GCC_OPTION (target_flags) &= ~MASK_SMALL_DATA;
 
   /* Align labels and loops for optimal branching.  */
   /* ??? Kludge these by not doing anything if we don't optimize.  */
-  if (optimize > 0)
+  if (GCC_OPTION (optimize) > 0)
     {
-      if (align_loops <= 0)
-	align_loops = 16;
-      if (align_jumps <= 0)
-	align_jumps = 16;
+      if (GCC_OPTION (align_loops) <= 0)
+	GCC_OPTION (align_loops) = 16;
+      if (GCC_OPTION (align_jumps) <= 0)
+	GCC_OPTION (align_jumps) = 16;
     }
-  if (align_functions <= 0)
-    align_functions = 16;
+  if (GCC_OPTION (align_functions) <= 0)
+    GCC_OPTION (align_functions) = 16;
 
   /* Register variables and functions with the garbage collector.  */
 
@@ -502,7 +502,7 @@ alpha_option_override (void)
 
 #ifdef TARGET_DEFAULT_LONG_DOUBLE_128
   if (!(target_flags_explicit & MASK_LONG_DOUBLE_128))
-    target_flags |= MASK_LONG_DOUBLE_128;
+    GCC_OPTION (target_flags) |= MASK_LONG_DOUBLE_128;
 #endif
 }
 
@@ -691,7 +691,7 @@ alpha_in_small_data_p (const_tree exp)
 
       /* If this is an incomplete type with size 0, then we can't put it
 	 in sdata because it might be too big when completed.  */
-      if (size > 0 && size <= g_switch_value)
+      if (size > 0 && size <= GCC_OPTION (g_switch_value))
 	return true;
     }
 
@@ -1607,7 +1607,7 @@ alpha_emit_set_const_1 (rtx target, enum machine_mode mode,
   int i, bits;
   /* Use a pseudo if highly optimizing and still generating RTL.  */
   rtx subtarget
-    = (flag_expensive_optimizations && can_create_pseudo_p () ? 0 : target);
+    = (GCC_OPTION (flag_expensive_optimizations) && can_create_pseudo_p () ? 0 : target);
   rtx temp, insn;
 
   /* If this is a sign-extended 32-bit constant, we can do this in at most
@@ -2425,7 +2425,7 @@ alpha_emit_conditional_branch (rtx operands[], enum machine_mode cmp_mode)
 
   if (cmp_mode == DFmode)
     {
-      if (flag_unsafe_math_optimizations && cmp_code != UNORDERED)
+      if (GCC_OPTION (flag_unsafe_math_optimizations) && cmp_code != UNORDERED)
 	{
 	  /* When we are not as concerned about non-finite values, and we
 	     are comparing against zero, we can branch directly.  */
@@ -2604,7 +2604,7 @@ alpha_emit_conditional_move (rtx cmp, enum machine_mode mode)
   enum machine_mode cmp_mode
     = (GET_MODE (op0) == VOIDmode ? DImode : GET_MODE (op0));
   enum machine_mode cmov_mode = VOIDmode;
-  int local_fast_math = flag_unsafe_math_optimizations;
+  int local_fast_math = GCC_OPTION (flag_unsafe_math_optimizations);
   rtx tem;
 
   if (cmp_mode == TFmode)
@@ -6527,7 +6527,7 @@ alpha_add_builtins (const struct alpha_builtin_def *p, size_t count,
   size_t i;
 
   for (i = 0; i < count; ++i, ++p)
-    if ((target_flags & p->target_mask) == p->target_mask)
+    if ((GCC_OPTION (target_flags) & p->target_mask) == p->target_mask)
       alpha_builtin_function (p->name, ftype, p->code,
 			      (p->is_const ? ECF_CONST : 0) | ECF_NOTHROW);
 }
@@ -7608,7 +7608,7 @@ alpha_expand_prologue (void)
   sa_size = alpha_sa_size ();
   frame_size = compute_frame_size (get_frame_size (), sa_size);
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = frame_size;
 
   if (TARGET_ABI_OPEN_VMS)
@@ -7643,7 +7643,7 @@ alpha_expand_prologue (void)
      Note that we are only allowed to adjust sp once in the prologue.  */
 
   probed_size = frame_size;
-  if (flag_stack_check)
+  if (GCC_OPTION (flag_stack_check))
     probed_size += STACK_CHECK_PROTECT;
 
   if (probed_size <= 32768)
@@ -7658,7 +7658,7 @@ alpha_expand_prologue (void)
 	  /* We only have to do this probe if we aren't saving registers or
 	     if we are probing beyond the frame because of -fstack-check.  */
 	  if ((sa_size == 0 && probed_size > probed - 4096)
-	      || flag_stack_check)
+	      || GCC_OPTION (flag_stack_check))
 	    emit_insn (gen_probe_stack (GEN_INT (-probed_size)));
 	}
 
@@ -7688,7 +7688,7 @@ alpha_expand_prologue (void)
 	 late in the compilation, generate the loop as a single insn.  */
       emit_insn (gen_prologue_stack_probe_loop (count, ptr));
 
-      if ((leftover > 4096 && sa_size == 0) || flag_stack_check)
+      if ((leftover > 4096 && sa_size == 0) || GCC_OPTION (flag_stack_check))
 	{
 	  rtx last = gen_rtx_MEM (DImode,
 				  plus_constant (Pmode, ptr, -leftover));
@@ -7696,7 +7696,7 @@ alpha_expand_prologue (void)
 	  emit_move_insn (last, const0_rtx);
 	}
 
-      if (flag_stack_check)
+      if (GCC_OPTION (flag_stack_check))
 	{
 	  /* If -fstack-check is specified we have to load the entire
 	     constant into a register and subtract from the sp in one go,
@@ -7893,7 +7893,7 @@ alpha_start_function (FILE *file, const char *fnname,
   alpha_sa_mask (&imask, &fmask);
 
   /* Issue function start and label.  */
-  if (TARGET_ABI_OPEN_VMS || !flag_inhibit_size_directive)
+  if (TARGET_ABI_OPEN_VMS || !GCC_OPTION (flag_inhibit_size_directive))
     {
       fputs ("\t.ent ", file);
       assemble_name (file, fnname);
@@ -7938,7 +7938,7 @@ alpha_start_function (FILE *file, const char *fnname,
 
   if (TARGET_ABI_OSF
       && TARGET_IEEE_CONFORMANT
-      && !flag_inhibit_size_directive)
+      && !GCC_OPTION (flag_inhibit_size_directive))
     {
       /* Set flags in procedure descriptor to request IEEE-conformant
 	 math-library routines.  The value we set it to is PDSC_EXC_IEEE
@@ -7959,7 +7959,7 @@ alpha_start_function (FILE *file, const char *fnname,
 	     vms_unwind_regno,
 	     frame_size >= (1UL << 31) ? 0 : frame_size,
 	     reg_offset);
-  else if (!flag_inhibit_size_directive)
+  else if (!GCC_OPTION (flag_inhibit_size_directive))
     fprintf (file, "\t.frame $%d," HOST_WIDE_INT_PRINT_DEC ",$26,%d\n",
 	     (frame_pointer_needed
 	      ? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM),
@@ -7978,7 +7978,7 @@ alpha_start_function (FILE *file, const char *fnname,
       if (alpha_procedure_type == PT_REGISTER)
 	fprintf (file, "\t.fp_save $%d\n", vms_save_fp_regno);
     }
-  else if (!flag_inhibit_size_directive)
+  else if (!GCC_OPTION (flag_inhibit_size_directive))
     {
       if (imask)
 	{
@@ -8026,7 +8026,7 @@ alpha_output_function_end_prologue (FILE *file)
 {
   if (TARGET_ABI_OPEN_VMS)
     fputs ("\t.prologue\n", file);
-  else if (!flag_inhibit_size_directive)
+  else if (!GCC_OPTION (flag_inhibit_size_directive))
     fprintf (file, "\t.prologue %d\n",
 	     alpha_function_needs_gp || cfun->is_thunk);
 }
@@ -8258,7 +8258,7 @@ alpha_end_function (FILE *file, const char *fnname, tree decl ATTRIBUTE_UNUSED)
 
   /* End the function.  */
   if (TARGET_ABI_OPEN_VMS
-      || !flag_inhibit_size_directive)
+      || !GCC_OPTION (flag_inhibit_size_directive))
     {
       fputs ("\t.end ", file);
       assemble_name (file, fnname);
@@ -8627,7 +8627,7 @@ alpha_handle_trap_shadows (void)
 	    }
 	  else if (alpha_tp == ALPHA_TP_INSN)
 	    {
-	      if (optimize > 0)
+	      if (GCC_OPTION (optimize) > 0)
 		{
 		  struct shadow_summary sum;
 
@@ -8704,7 +8704,7 @@ alpha_handle_trap_shadows (void)
 	  && GET_CODE (PATTERN (i)) != CLOBBER
 	  && get_attr_trap (i) == TRAP_YES)
 	{
-	  if (optimize && !trap_pending)
+	  if (GCC_OPTION (optimize) && !trap_pending)
 	    summarize_insn (PATTERN (i), &shadow, 0);
 	  trap_pending = 1;
 	}
@@ -9143,10 +9143,10 @@ alpha_align_insns (unsigned int max_align,
   /* Let shorten branches care for assigning alignments to code labels.  */
   shorten_branches (get_insns ());
 
-  if (align_functions < 4)
+  if (GCC_OPTION (align_functions) < 4)
     align = 4;
-  else if ((unsigned int) align_functions < max_align)
-    align = align_functions;
+  else if ((unsigned int) GCC_OPTION (align_functions) < max_align)
+    align = GCC_OPTION (align_functions);
   else
     align = max_align;
 
@@ -9349,15 +9349,15 @@ And in the noreturn case:
   if (current_function_has_exception_handlers ())
     alpha_pad_function_end ();
 
-  if (alpha_tp != ALPHA_TP_PROG || flag_exceptions)
+  if (alpha_tp != ALPHA_TP_PROG || GCC_OPTION (flag_exceptions))
     alpha_handle_trap_shadows ();
 
   /* Due to the number of extra trapb insns, don't bother fixing up
      alignment when trap precision is instruction.  Moreover, we can
      only do our job when sched2 is run.  */
-  if (optimize && !optimize_size
+  if (GCC_OPTION (optimize) && !GCC_OPTION (optimize_size)
       && alpha_tp != ALPHA_TP_INSN
-      && flag_schedule_insns_after_reload)
+      && GCC_OPTION (flag_schedule_insns_after_reload))
     {
       if (alpha_tune == PROCESSOR_EV4)
 	alpha_align_insns (8, alphaev4_next_group, alphaev4_next_nop);
@@ -9402,7 +9402,7 @@ alpha_file_start (void)
 static int
 alpha_elf_reloc_rw_mask (void)
 {
-  return flag_pic ? 3 : 2;
+  return GCC_OPTION (flag_pic) ? 3 : 2;
 }
 
 /* Return a section for X.  The only special thing we do here is to
@@ -9412,7 +9412,7 @@ static section *
 alpha_elf_select_rtx_section (enum machine_mode mode, rtx x,
 			      unsigned HOST_WIDE_INT align)
 {
-  if (TARGET_SMALL_DATA && GET_MODE_SIZE (mode) <= g_switch_value)
+  if (TARGET_SMALL_DATA && GET_MODE_SIZE (mode) <= GCC_OPTION (g_switch_value))
     /* ??? Consider using mergeable sdata sections.  */
     return sdata_section;
   else
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index 0ff793f..737411b 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -61,7 +61,7 @@ along with GCC; see the file COPYING3.  If not see
 	    builtin_define ("__alpha_ev4__");		\
 	    builtin_assert ("cpu=ev4");			\
 	  }						\
-	if (TARGET_IEEE || TARGET_IEEE_WITH_INEXACT)	\
+	if (GCC_OPTION (TARGET_IEEE) || TARGET_IEEE_WITH_INEXACT)	\
 	  builtin_define ("_IEEE_FP");			\
 	if (TARGET_IEEE_WITH_INEXACT)			\
 	  builtin_define ("_IEEE_FP_INEXACT");		\
diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md
index 795b4df..ea14fe1 100644
--- a/gcc/config/alpha/alpha.md
+++ b/gcc/config/alpha/alpha.md
@@ -1121,7 +1121,7 @@
 (define_expand "bswapsi2"
   [(set (match_operand:SI 0 "register_operand")
 	(bswap:SI (match_operand:SI 1 "register_operand")))]
-  "!optimize_size"
+  "!GCC_OPTION (optimize_size)"
 {
   rtx t0, t1;
 
@@ -1143,7 +1143,7 @@
 (define_expand "bswapdi2"
   [(set (match_operand:DI 0 "register_operand")
 	(bswap:DI (match_operand:DI 1 "register_operand")))]
-  "!optimize_size"
+  "!GCC_OPTION (optimize_size)"
 {
   rtx t0, t1;
 
@@ -5157,7 +5157,7 @@
   [(unspec_volatile [(match_dup 0)] UNSPECV_EHR)]
   "TARGET_ABI_OSF"
 {
-  if (flag_reorder_blocks_and_partition)
+  if (GCC_OPTION (flag_reorder_blocks_and_partition))
     operands[0] = alpha_gp_save_rtx ();
   else
     operands[0] = const0_rtx;
@@ -5165,7 +5165,7 @@
 
 (define_insn "*exception_receiver_2"
   [(unspec_volatile [(match_operand:DI 0 "memory_operand" "m")] UNSPECV_EHR)]
-  "TARGET_ABI_OSF && flag_reorder_blocks_and_partition"
+  "TARGET_ABI_OSF && GCC_OPTION (flag_reorder_blocks_and_partition)"
   "ldq $29,%0"
   [(set_attr "type" "ild")])
 
diff --git a/gcc/config/alpha/elf.h b/gcc/config/alpha/elf.h
index 5a6803a..de477e5 100644
--- a/gcc/config/alpha/elf.h
+++ b/gcc/config/alpha/elf.h
@@ -45,12 +45,12 @@ along with GCC; see the file COPYING3.  If not see
 #undef  ASM_OUTPUT_ALIGNED_LOCAL
 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)		\
 do {									\
-  if ((SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value)		\
+  if ((SIZE) <= (unsigned HOST_WIDE_INT) GCC_OPTION (g_switch_value))		\
     switch_to_section (sbss_section);					\
   else									\
     switch_to_section (bss_section);					\
   ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");			\
-  if (!flag_inhibit_size_directive)					\
+  if (!GCC_OPTION (flag_inhibit_size_directive))					\
     ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE);			\
   ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT));	\
   ASM_OUTPUT_LABEL(FILE, NAME);						\
diff --git a/gcc/config/alpha/linux.h b/gcc/config/alpha/linux.h
index 966e9b2..abecca8 100644
--- a/gcc/config/alpha/linux.h
+++ b/gcc/config/alpha/linux.h
@@ -62,9 +62,9 @@ along with GCC; see the file COPYING3.  If not see
 #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
 #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
 #else
-#define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
-#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
-#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
+#define OPTION_GLIBC  (GCC_OPTION (linux_libc) == LIBC_GLIBC)
+#define OPTION_UCLIBC (GCC_OPTION (linux_libc) == LIBC_UCLIBC)
+#define OPTION_BIONIC (GCC_OPTION (linux_libc) == LIBC_BIONIC)
 #endif
 
 /* Determine what functions are present at the runtime;
diff --git a/gcc/config/alpha/predicates.md b/gcc/config/alpha/predicates.md
index c68e83a..636cf85 100644
--- a/gcc/config/alpha/predicates.md
+++ b/gcc/config/alpha/predicates.md
@@ -271,7 +271,7 @@
   /* ??? TARGET_PROFILING_NEEDS_GP isn't really the right test,
      but is approximately correct for the OSF ABIs.  Don't know
      what to do for VMS, NT, or UMK.  */
-  if (!TARGET_PROFILING_NEEDS_GP && profile_flag)
+  if (!TARGET_PROFILING_NEEDS_GP && GCC_OPTION (profile_flag))
     return false;
 
   /* Must be a function.  In some cases folks create thunks in static
@@ -348,7 +348,7 @@
   if (CONSTANT_POOL_ADDRESS_P (op))
     {
       max_ofs = GET_MODE_SIZE (get_pool_mode (op));
-      if (max_ofs > g_switch_value)
+      if (max_ofs > GCC_OPTION (g_switch_value))
 	return false;
     }
   else if (SYMBOL_REF_LOCAL_P (op)
diff --git a/gcc/config/alpha/vms.h b/gcc/config/alpha/vms.h
index df0130c..3ac03d1 100644
--- a/gcc/config/alpha/vms.h
+++ b/gcc/config/alpha/vms.h
@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3.  If not see
 /* The maximum alignment 'malloc' honors.  */
 #undef  MALLOC_ABI_ALIGNMENT
 #define MALLOC_ABI_ALIGNMENT \
-  ((flag_vms_malloc64 && flag_vms_pointer_size != VMS_POINTER_SIZE_NONE	\
+  ((GCC_OPTION (flag_vms_malloc64) && GCC_OPTION (flag_vms_pointer_size) != VMS_POINTER_SIZE_NONE	\
    ? 16 : 8) * BITS_PER_UNIT)
 
 #undef FIXED_REGISTERS
@@ -154,7 +154,7 @@ typedef struct {int num_args; enum avms_arg_type atypes[6];} avms_arg_info;
 /* Even though pointers are 64bits, only 32bit ever remain significant in code
    addresses.  */
 #define MASK_RETURN_ADDR                                \
-  (flag_vms_pointer_size == VMS_POINTER_SIZE_NONE       \
+  (GCC_OPTION (flag_vms_pointer_size) == VMS_POINTER_SIZE_NONE       \
    ? constm1_rtx                                        \
    : GEN_INT (0xffffffff))
 
@@ -268,14 +268,14 @@ typedef struct {int num_args; enum avms_arg_type atypes[6];} avms_arg_info;
 #undef SUBTARGET_OVERRIDE_OPTIONS
 #define SUBTARGET_OVERRIDE_OPTIONS                  \
 do {                                                \
-  if (write_symbols == NO_DEBUG                     \
-      && debug_info_level == DINFO_LEVEL_NONE)      \
+  if (GCC_OPTION (write_symbols) == NO_DEBUG                     \
+      && GCC_OPTION (debug_info_level) == DINFO_LEVEL_NONE)      \
     {                                               \
-      write_symbols = VMS_DEBUG;                    \
-      debug_info_level = DINFO_LEVEL_TERSE;         \
+      GCC_OPTION (write_symbols) = VMS_DEBUG;                    \
+      GCC_OPTION (debug_info_level) = DINFO_LEVEL_TERSE;         \
     }                                               \
-  if (flag_pic)                                     \
-    flag_jump_tables = 0;                           \
+  if (GCC_OPTION (flag_pic))                                     \
+    GCC_OPTION (flag_jump_tables) = 0;                           \
 } while (0)
 
 #undef LINK_SPEC
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 0eaabed..48e5648 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -93,7 +93,7 @@ static const char *arc_cpu_string = "";
  && ((GET_MODE_SIZE (MODE) == 2 && INTVAL (XEXP (XEXP (X, 0), 1)) == 2) \
      || (GET_MODE_SIZE (MODE) == 4 && INTVAL (XEXP (XEXP (X, 0), 1)) == 4)) \
  && (RTX_OK_FOR_BASE_P (XEXP (X, 1), (STRICT)) \
-     || (flag_pic ? CONST_INT_P (XEXP (X, 1)) : CONSTANT_P (XEXP (X, 1)))))
+     || (GCC_OPTION (flag_pic) ? CONST_INT_P (XEXP (X, 1)) : CONSTANT_P (XEXP (X, 1)))))
 
 #define LEGITIMATE_SMALL_DATA_ADDRESS_P(X) \
   (GET_CODE (X) == PLUS \
@@ -701,35 +701,35 @@ arc_init (void)
     }
   else
     gcc_unreachable ();
-  if (arc_tune == TUNE_NONE)
-    arc_tune = tune_dflt;
+  if (GCC_OPTION (arc_tune) == TUNE_NONE)
+    GCC_OPTION (arc_tune) = tune_dflt;
   /* Note: arc_multcost is only used in rtx_cost if speed is true.  */
-  if (arc_multcost < 0)
-    switch (arc_tune)
+  if (GCC_OPTION (arc_multcost) < 0)
+    switch (GCC_OPTION (arc_tune))
       {
       case TUNE_ARC700_4_2_STD:
 	/* latency 7;
 	   max throughput (1 multiply + 4 other insns) / 5 cycles.  */
-	arc_multcost = COSTS_N_INSNS (4);
+	GCC_OPTION (arc_multcost) = COSTS_N_INSNS (4);
 	if (TARGET_NOMPY_SET)
-	  arc_multcost = COSTS_N_INSNS (30);
+	  GCC_OPTION (arc_multcost) = COSTS_N_INSNS (30);
 	break;
       case TUNE_ARC700_4_2_XMAC:
 	/* latency 5;
 	   max throughput (1 multiply + 2 other insns) / 3 cycles.  */
-	arc_multcost = COSTS_N_INSNS (3);
+	GCC_OPTION (arc_multcost) = COSTS_N_INSNS (3);
 	if (TARGET_NOMPY_SET)
-	  arc_multcost = COSTS_N_INSNS (30);
+	  GCC_OPTION (arc_multcost) = COSTS_N_INSNS (30);
 	break;
       case TUNE_ARC600:
 	if (TARGET_MUL64_SET)
 	  {
-	    arc_multcost = COSTS_N_INSNS (4);
+	    GCC_OPTION (arc_multcost) = COSTS_N_INSNS (4);
 	    break;
 	  }
 	/* Fall through.  */
       default:
-	arc_multcost = COSTS_N_INSNS (30);
+	GCC_OPTION (arc_multcost) = COSTS_N_INSNS (30);
 	break;
       }
 
@@ -763,10 +763,10 @@ arc_init (void)
     error ("FPX extensions not available on pre-ARC600 cores");
 
   /* Warn for unimplemented PIC in pre-ARC700 cores, and disable flag_pic.  */
-  if (flag_pic && !TARGET_ARC700)
+  if (GCC_OPTION (flag_pic) && !TARGET_ARC700)
     {
       warning (DK_WARNING, "PIC is not supported for %s. Generating non-PIC code only..", arc_cpu_string);
-      flag_pic = 0;
+      GCC_OPTION (flag_pic) = 0;
     }
 
   arc_init_reg_tables ();
@@ -780,7 +780,7 @@ arc_init (void)
   arc_punct_chars['^'] = 1;
   arc_punct_chars['&'] = 1;
 
-  if (optimize > 1 && !TARGET_NO_COND_EXEC)
+  if (GCC_OPTION (optimize) > 1 && !TARGET_NO_COND_EXEC)
     {
       /* There are two target-independent ifcvt passes, and arc_reorg may do
 	 one or more arc_ifcvt calls.  */
@@ -794,7 +794,7 @@ arc_init (void)
       register_pass (&arc_ifcvt5_info);
     }
 
-  if (flag_delayed_branch)
+  if (GCC_OPTION (flag_delayed_branch))
     {
       opt_pass *pass_arc_predicate_delay_insns
 	= make_pass_arc_predicate_delay_insns (g);
@@ -810,25 +810,25 @@ arc_init (void)
 static void
 arc_override_options (void)
 {
-  if (arc_cpu == PROCESSOR_NONE)
-    arc_cpu = PROCESSOR_ARC700;
+  if (GCC_OPTION (arc_cpu) == PROCESSOR_NONE)
+    GCC_OPTION (arc_cpu) = PROCESSOR_ARC700;
 
-  if (arc_size_opt_level == 3)
-    optimize_size = 1;
+  if (GCC_OPTION (arc_size_opt_level) == 3)
+    GCC_OPTION (optimize_size) = 1;
 
-  if (flag_pic)
-    target_flags |= MASK_NO_SDATA_SET;
+  if (GCC_OPTION (flag_pic))
+    GCC_OPTION (target_flags) |= MASK_NO_SDATA_SET;
 
-  if (flag_no_common == 255)
-    flag_no_common = !TARGET_NO_SDATA_SET;
+  if (GCC_OPTION (flag_no_common) == 255)
+    GCC_OPTION (flag_no_common) = !TARGET_NO_SDATA_SET;
 
   /* TARGET_COMPACT_CASESI needs the "q" register class.  */ \
   if (TARGET_MIXED_CODE)
-    TARGET_Q_CLASS = 1;
-  if (!TARGET_Q_CLASS)
-    TARGET_COMPACT_CASESI = 0;
-  if (TARGET_COMPACT_CASESI)
-    TARGET_CASE_VECTOR_PC_RELATIVE = 1;
+    GCC_OPTION (TARGET_Q_CLASS) = 1;
+  if (!GCC_OPTION (TARGET_Q_CLASS))
+    GCC_OPTION (TARGET_COMPACT_CASESI) = 0;
+  if (GCC_OPTION (TARGET_COMPACT_CASESI))
+    GCC_OPTION (TARGET_CASE_VECTOR_PC_RELATIVE) = 1;
 
   /* These need to be done at start up.  It's convenient to do them here.  */
   arc_init ();
@@ -1230,7 +1230,7 @@ arc_conditional_register_usage (void)
 	warning (0, "multiply option implies r%d is fixed", regno);
       fixed_regs [regno] = call_used_regs[regno] = 1;
     }
-  if (TARGET_Q_CLASS)
+  if (GCC_OPTION (TARGET_Q_CLASS))
     {
       reg_alloc_order[2] = 12;
       reg_alloc_order[3] = 13;
@@ -1298,7 +1298,7 @@ arc_conditional_register_usage (void)
     {
       if (i < 29)
 	{
-	  if (TARGET_Q_CLASS && ((i <= 3) || ((i >= 12) && (i <= 15))))
+	  if (GCC_OPTION (TARGET_Q_CLASS) && ((i <= 3) || ((i >= 12) && (i <= 15))))
 	    arc_regno_reg_class[i] = ARCOMPACT16_REGS;
 	  else
 	    arc_regno_reg_class[i] = GENERAL_REGS;
@@ -1316,7 +1316,7 @@ arc_conditional_register_usage (void)
     }
 
   /* ARCOMPACT16_REGS is empty, if TARGET_Q_CLASS has not been activated.  */
-  if (!TARGET_Q_CLASS)
+  if (!GCC_OPTION (TARGET_Q_CLASS))
     {
       CLEAR_HARD_REG_SET(reg_class_contents [ARCOMPACT16_REGS]);
       CLEAR_HARD_REG_SET(reg_class_contents [AC16_BASE_REGS]);
@@ -1497,7 +1497,7 @@ gen_compare_reg (rtx comparison, enum machine_mode omode)
 	  else
 	    x = copy_to_mode_reg (SImode, x);
 	}
-      if (GET_CODE (y) == SYMBOL_REF && flag_pic)
+      if (GET_CODE (y) == SYMBOL_REF && GCC_OPTION (flag_pic))
 	y = copy_to_mode_reg (SImode, y);
     }
   else
@@ -1954,7 +1954,7 @@ arc_compute_function_type (struct function *fun)
 #define MUST_SAVE_REGISTER(regno, interrupt_p) \
 (((regno) != RETURN_ADDR_REGNUM && (regno) != FRAME_POINTER_REGNUM \
   && (df_regs_ever_live_p (regno) && (!call_used_regs[regno] || interrupt_p))) \
- || (flag_pic && crtl->uses_pic_offset_table \
+ || (GCC_OPTION (flag_pic) && crtl->uses_pic_offset_table \
      && regno == PIC_OFFSET_TABLE_REGNUM) )
 
 #define MUST_SAVE_RETURN_ADDR \
@@ -2039,7 +2039,7 @@ arc_compute_frame_size (int size)	/* size = # of var. bytes allocated.  */
   frame_info->save_return_addr
     = (!crtl->is_leaf || df_regs_ever_live_p (RETURN_ADDR_REGNUM));
   /* Saving blink reg in case of leaf function for millicode thunk calls.  */
-  if (optimize_size && !TARGET_NO_MILLICODE_THUNK_SET)
+  if (GCC_OPTION (optimize_size) && !TARGET_NO_MILLICODE_THUNK_SET)
     {
       if (arc_compute_millicode_save_restore_regs (gmask, frame_info))
 	frame_info->save_return_addr = true;
@@ -2228,7 +2228,7 @@ arc_expand_prologue (void)
 	   ? arc_compute_frame_size (size)
 	   : cfun->machine->frame_info.total_size);
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = size;
 
   /* Keep track of frame size to be allocated.  */
@@ -2379,7 +2379,7 @@ arc_expand_epilogue (int sibcall_p)
      fast add to the stack pointer, do this now.  */
   if ((!SMALL_INT (first_offset)
        && cfun->machine->frame_info.gmask
-       && ((TARGET_ARC700 && !optimize_size)
+       && ((TARGET_ARC700 && !GCC_OPTION (optimize_size))
 	    ? first_offset <= 0x800
 	    : satisfies_constraint_C2a (GEN_INT (first_offset))))
        /* Also do this if we have both gprs and return
@@ -2401,7 +2401,7 @@ arc_expand_epilogue (int sibcall_p)
 	 the offset quickly to sp, do the latter.  */
       if (!SMALL_INT (ra_offs >> 2)
 	  && !cfun->machine->frame_info.gmask
-	  && ((TARGET_ARC700 && !optimize_size)
+	  && ((TARGET_ARC700 && !GCC_OPTION (optimize_size))
 	       ? ra_offs <= 0x800
 	       : satisfies_constraint_C2a (GEN_INT (ra_offs))))
 	{
@@ -2502,7 +2502,7 @@ arc_finalize_pic (void)
   if (crtl->uses_pic_offset_table == 0)
     return;
 
-  gcc_assert (flag_pic != 0);
+  gcc_assert (GCC_OPTION (flag_pic) != 0);
 
   pat = gen_rtx_SYMBOL_REF (Pmode, "_DYNAMIC");
   pat = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, pat), ARC_UNSPEC_GOT);
@@ -3105,7 +3105,7 @@ arc_print_operand (FILE *file, rtx x, int code)
 	}
       break;
     case '&':
-      if (TARGET_ANNOTATE_ALIGN && cfun->machine->size_reason)
+      if (GCC_OPTION (TARGET_ANNOTATE_ALIGN) && cfun->machine->size_reason)
 	fprintf (file, "; unalign: %d", cfun->machine->unalign);
       return;
     default :
@@ -3146,7 +3146,7 @@ arc_print_operand (FILE *file, rtx x, int code)
 	      output_address (addr);
 	    break;
 	  default:
-	    if (flag_pic && CONSTANT_ADDRESS_P (addr))
+	    if (GCC_OPTION (flag_pic) && CONSTANT_ADDRESS_P (addr))
 	      arc_output_pic_addr_const (file, addr, code);
 	    else
 	      output_address (addr);
@@ -3169,7 +3169,7 @@ arc_print_operand (FILE *file, rtx x, int code)
 	}
       /* Fall through.  Let output_addr_const deal with it.  */
     default :
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	arc_output_pic_addr_const (file, x, code);
       else
 	{
@@ -3248,7 +3248,7 @@ arc_print_operand_address (FILE *file , rtx addr)
       gcc_unreachable ();
       break;
     default :
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	arc_output_pic_addr_const (file, addr, 0);
       else
 	output_addr_const (file, addr);
@@ -3422,7 +3422,7 @@ arc_ccfsm_advance (rtx insn, struct arc_ccfsm *state)
   /* Allow -mdebug-ccfsm to turn this off so we can see how well it does.
      We can't do this in macro FINAL_PRESCAN_INSN because its called from
      final_scan_insn which has `optimize' as a local.  */
-  if (optimize < 2 || TARGET_NO_COND_EXEC)
+  if (GCC_OPTION (optimize) < 2 || TARGET_NO_COND_EXEC)
     return;
 
   /* Ignore notes and labels.  */
@@ -3923,7 +3923,7 @@ void
 arc_final_prescan_insn (rtx insn, rtx *opvec ATTRIBUTE_UNUSED,
 			int noperands ATTRIBUTE_UNUSED)
 {
-  if (TARGET_DUMPISIZE)
+  if (GCC_OPTION (TARGET_DUMPISIZE))
     fprintf (asm_out_file, "\n; at %04x\n", INSN_ADDRESSES (INSN_UID (insn)));
 
   /* Output a nop if necessary to prevent a hazard.
@@ -3937,7 +3937,7 @@ arc_final_prescan_insn (rtx insn, rtx *opvec ATTRIBUTE_UNUSED,
     {
       current_output_insn =
 	emit_insn_before (gen_nop (), NEXT_INSN (PREV_INSN (insn)));
-      final_scan_insn (current_output_insn, asm_out_file, optimize, 1, NULL);
+      final_scan_insn (current_output_insn, asm_out_file, GCC_OPTION (optimize), 1, NULL);
       current_output_insn = insn;
     }
   /* Restore extraction data which might have been clobbered by arc_hazard.  */
@@ -4209,7 +4209,7 @@ arc_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED,
       if ((TARGET_DPFP && GET_MODE (x) == DFmode))
 	*total = COSTS_N_INSNS (1);
       else if (speed)
-	*total= arc_multcost;
+	*total= GCC_OPTION (arc_multcost);
       /* We do not want synth_mult sequences when optimizing
 	 for size.  */
       else if (TARGET_MUL64_SET || (TARGET_ARC700 && !TARGET_NOMPY_SET))
@@ -4560,7 +4560,7 @@ arc_output_pic_addr_const (FILE * file, rtx x, int code)
   switch (GET_CODE (x))
     {
     case PC:
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	putc ('.', file);
       else
 	gcc_unreachable ();
@@ -4900,7 +4900,7 @@ arc_legitimate_pic_operand_p (rtx x)
 bool
 arc_legitimate_constant_p (enum machine_mode, rtx x)
 {
-  if (!flag_pic)
+  if (!GCC_OPTION (flag_pic))
     return true;
 
   switch (GET_CODE (x))
@@ -4953,7 +4953,7 @@ arc_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
 {
   if (RTX_OK_FOR_BASE_P (x, strict))
      return true;
-  if (LEGITIMATE_OFFSET_ADDRESS_P (mode, x, TARGET_INDEXED_LOADS, strict))
+  if (LEGITIMATE_OFFSET_ADDRESS_P (mode, x, GCC_OPTION (TARGET_INDEXED_LOADS), strict))
      return true;
   if (LEGITIMATE_SCALED_ADDRESS_P (mode, x, strict))
     return true;
@@ -4966,7 +4966,7 @@ arc_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
 	  || GET_CODE (x) == LABEL_REF
 	  || GET_CODE (x) == CONST))
     {
-      if (!flag_pic || arc_legitimate_pic_addr_p (x))
+      if (!GCC_OPTION (flag_pic) || arc_legitimate_pic_addr_p (x))
 	return true;
     }
   if ((GET_CODE (x) == PRE_DEC || GET_CODE (x) == PRE_INC
@@ -4978,7 +4978,7 @@ arc_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
       && GET_CODE (XEXP ((x), 1)) == PLUS
       && rtx_equal_p (XEXP ((x), 0), XEXP (XEXP (x, 1), 0))
       && LEGITIMATE_OFFSET_ADDRESS_P (QImode, XEXP (x, 1),
-				      TARGET_AUTO_MODIFY_REG, strict))
+				      GCC_OPTION (TARGET_AUTO_MODIFY_REG), strict))
     return true;
   return false;
 }
@@ -5369,7 +5369,7 @@ arc_expand_builtin (tree exp,
 	{
 	  /* If we can't fold the alignment to a constant integer
 	     whilst optimizing, this is probably a user error.  */
-	  if (optimize)
+	  if (GCC_OPTION (optimize))
 	    warning (0, "__builtin_arc_aligned with non-constant alignment");
 	}
       else
@@ -5566,7 +5566,7 @@ arc_is_shortcall_p (rtx sym_ref)
     return false;
 
   return (SYMBOL_REF_SHORT_CALL_P (sym_ref)
-	  || (!TARGET_LONG_CALLS_SET && !TARGET_MEDIUM_CALLS
+	  || (!TARGET_LONG_CALLS_SET && !GCC_OPTION (TARGET_MEDIUM_CALLS)
 	      && !SYMBOL_REF_LONG_CALL_P (sym_ref)
 	      && !SYMBOL_REF_MEDIUM_CALL_P (sym_ref)));
 
@@ -5580,7 +5580,7 @@ arc_profile_call (rtx callee)
 {
   rtx from = XEXP (DECL_RTL (current_function_decl), 0);
 
-  if (TARGET_UCB_MCOUNT)
+  if (GCC_OPTION (TARGET_UCB_MCOUNT))
     /* Profiling is done by instrumenting the callee.  */
     return false;
 
@@ -5706,7 +5706,7 @@ arc_can_use_doloop_p (double_int iterations, double_int,
       && !entered_at_top
       && iterations.high == 0
       && iterations.low > 0
-      && iterations.low <= (flag_pic ? 6 : 3))
+      && iterations.low <= (GCC_OPTION (flag_pic) ? 6 : 3))
     return false;
   return true;
 }
@@ -5988,7 +5988,7 @@ arc_reorg (void)
       init_insn_lengths();
       changed = 0;
 
-      if (optimize > 1 && !TARGET_NO_COND_EXEC)
+      if (GCC_OPTION (optimize) > 1 && !TARGET_NO_COND_EXEC)
 	{
 	  arc_ifcvt ();
 	  unsigned int flags = pass_data_arc_ifcvt.todo_flags_finish;
@@ -6222,7 +6222,7 @@ arc_reorg (void)
 bool
 valid_brcc_with_delay_p (rtx *operands)
 {
-  if (optimize_size && GET_MODE (operands[4]) == CC_Zmode)
+  if (GCC_OPTION (optimize_size) && GET_MODE (operands[4]) == CC_Zmode)
     return false;
   return brcc_nolimm_operator (operands[0], VOIDmode);
 }
@@ -7511,7 +7511,7 @@ arc_expand_movmem (rtx *operands)
     n_pieces = (size + 1) / 2U;
   else
     n_pieces = size;
-  if (n_pieces >= (unsigned int) (optimize_size ? 3 : 15))
+  if (n_pieces >= (unsigned int) (GCC_OPTION (optimize_size) ? 3 : 15))
     return false;
   if (piece > 4)
     piece = 4;
@@ -7561,7 +7561,7 @@ prepare_move_operands (rtx *operands, enum machine_mode mode)
     {
       if (!TARGET_NO_SDATA_SET && small_data_pattern (operands[0], Pmode))
 	operands[0] = arc_rewrite_small_data (operands[0]);
-      else if (mode == SImode && flag_pic && SYMBOLIC_CONST (operands[1]))
+      else if (mode == SImode && GCC_OPTION (flag_pic) && SYMBOLIC_CONST (operands[1]))
 	{
 	  emit_pic_move (operands, SImode);
 
@@ -7672,9 +7672,9 @@ arc_output_libcall (const char *fname)
 
   gcc_assert (len < sizeof buf - 35);
   if (TARGET_LONG_CALLS_SET
-     || (TARGET_MEDIUM_CALLS && arc_ccfsm_cond_exec_p ()))
+     || (GCC_OPTION (TARGET_MEDIUM_CALLS) && arc_ccfsm_cond_exec_p ()))
     {
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	sprintf (buf, "add r12,pcl,@%s-(.&-4)\n\tjl%%!%%* [r12]", fname);
       else
 	sprintf (buf, "jl%%! @%s", fname);
@@ -7897,7 +7897,7 @@ arc_get_insn_variants (rtx insn, int len, bool, bool target_p,
   enum attr_type type;
   /* shorten_branches doesn't take optimize_size into account yet for the
      get_variants mechanism, so turn this off for now.  */
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     return 0;
   if (GET_CODE (PATTERN (insn)) == SEQUENCE)
     {
@@ -8462,7 +8462,7 @@ arc_legitimize_address_0 (rtx x, rtx oldx ATTRIBUTE_UNUSED,
 {
   rtx addr, inner;
 
-  if (flag_pic && SYMBOLIC_CONST (x))
+  if (GCC_OPTION (flag_pic) && SYMBOLIC_CONST (x))
      (x) =  arc_legitimize_pic_address (x, 0);
   addr = x;
   if (GET_CODE (addr) == CONST)
@@ -8619,8 +8619,8 @@ arc_unalign_branch_p (rtx branch)
     return 0;
   note = find_reg_note (branch, REG_BR_PROB, 0);
   return (!note
-	  || (arc_unalign_prob_threshold && !br_prob_note_reliable_p (note))
-	  || INTVAL (XEXP (note, 0)) < arc_unalign_prob_threshold);
+	  || (GCC_OPTION (arc_unalign_prob_threshold) && !br_prob_note_reliable_p (note))
+	  || INTVAL (XEXP (note, 0)) < GCC_OPTION (arc_unalign_prob_threshold));
 }
 #endif
 
@@ -8636,7 +8636,7 @@ arc_unalign_branch_p (rtx branch)
 bool
 arc_branch_size_unknown_p (void)
 {
-  return !optimize_size && arc_reorg_in_progress;
+  return !GCC_OPTION (optimize_size) && arc_reorg_in_progress;
 }
 
 /* We are about to output a return insn.  Add padding if necessary to avoid
@@ -8694,7 +8694,7 @@ arc_pad_return (void)
 		      || !arc_hazard (prev_real_insn (insn), prev));
 	  cfun->machine->force_short_suffix = !want_long;
 	  rtx save_pred = current_insn_predicate;
-	  final_scan_insn (prev, asm_out_file, optimize, 1, NULL);
+	  final_scan_insn (prev, asm_out_file, GCC_OPTION (optimize), 1, NULL);
 	  cfun->machine->force_short_suffix = -1;
 	  INSN_DELETED_P (prev) = 1;
 	  current_output_insn = insn;
@@ -9099,7 +9099,7 @@ arc_need_delay (rtx insn)
 {
   rtx next;
 
-  if (!flag_delayed_branch)
+  if (!GCC_OPTION (flag_delayed_branch))
     return false;
   /* The return at the end of a function needs a delay slot.  */
   if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
@@ -9268,7 +9268,7 @@ arc_lra_p (void)
 static int
 arc_register_priority (int r)
 {
-  switch (arc_lra_priority_tag)
+  switch (GCC_OPTION (arc_lra_priority_tag))
     {
     case ARC_LRA_PRIORITY_NONE:
       return 0;
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index 8c7350f..c09b6f3 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -265,22 +265,22 @@ along with GCC; see the file COPYING3.  If not see
    that we can pick & choose features if we get a new cpu family member.  */
 
 /* Should we try to unalign likely taken branches without a delay slot.  */
-#define TARGET_UNALIGN_BRANCH (TARGET_ARC700 && !optimize_size)
+#define TARGET_UNALIGN_BRANCH (TARGET_ARC700 && !GCC_OPTION (optimize_size))
 
 /* Should we upsize short delayed branches with a short delay insn?  */
-#define TARGET_UPSIZE_DBR (TARGET_ARC700 && !optimize_size)
+#define TARGET_UPSIZE_DBR (TARGET_ARC700 && !GCC_OPTION (optimize_size))
 
 /* Should we add padding before a return insn to avoid mispredict?  */
-#define TARGET_PAD_RETURN (TARGET_ARC700 && !optimize_size)
+#define TARGET_PAD_RETURN (TARGET_ARC700 && !GCC_OPTION (optimize_size))
 
 /* For an anulled-true delay slot insn for a delayed branch, should we only
    use conditional execution?  */
 #define TARGET_AT_DBR_CONDEXEC  (!TARGET_ARC700)
 
-#define TARGET_A5 (arc_cpu == PROCESSOR_A5)
-#define TARGET_ARC600 (arc_cpu == PROCESSOR_ARC600)
-#define TARGET_ARC601 (arc_cpu == PROCESSOR_ARC601)
-#define TARGET_ARC700 (arc_cpu == PROCESSOR_ARC700)
+#define TARGET_A5 (GCC_OPTION (arc_cpu) == PROCESSOR_A5)
+#define TARGET_ARC600 (GCC_OPTION (arc_cpu) == PROCESSOR_ARC600)
+#define TARGET_ARC601 (GCC_OPTION (arc_cpu) == PROCESSOR_ARC601)
+#define TARGET_ARC700 (GCC_OPTION (arc_cpu) == PROCESSOR_ARC700)
 
 /* Recast the cpu class to be the cpu attribute.  */
 #define arc_cpu_attr ((enum attr_cpu)arc_cpu)
@@ -391,7 +391,7 @@ if (GET_MODE_CLASS (MODE) == MODE_INT		\
 #define DATA_ALIGNMENT(TYPE, ALIGN)		\
   (TREE_CODE (TYPE) == ARRAY_TYPE		\
    && TYPE_MODE (TREE_TYPE (TYPE)) == QImode	\
-   && arc_size_opt_level < 3			\
+   && GCC_OPTION (arc_size_opt_level) < 3			\
    && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
 
 /* Set this nonzero if move instructions will actually fail to work
@@ -942,7 +942,7 @@ extern int arc_initial_elimination_offset(int from, int to);
    We actually emit the profiler code at the call site, so leave this one
    empty.  */
 #define FUNCTION_PROFILER(FILE, LABELNO) \
-  if (TARGET_UCB_MCOUNT) \
+  if (GCC_OPTION (TARGET_UCB_MCOUNT)) \
     fprintf (FILE, "\t%s\n", arc_output_libcall ("__mcount"))
 
 #define NO_PROFILE_COUNTERS  1
@@ -980,7 +980,7 @@ extern int arc_initial_elimination_offset(int from, int to);
 
 /* Recognize any constant value that is a valid address.  */
 #define CONSTANT_ADDRESS_P(X) \
-(flag_pic?arc_legitimate_pic_addr_p (X): \
+(GCC_OPTION (flag_pic)?arc_legitimate_pic_addr_p (X): \
 (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF	\
  || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST))
 
@@ -1130,7 +1130,7 @@ arc_select_cc_mode (OP, X, Y)
    output in the text section, along with the assembler instructions.
    Otherwise, the readonly data section is used.
    This macro is irrelevant if there is no separate readonly data section.  */
-#define JUMP_TABLES_IN_TEXT_SECTION  (flag_pic || CASE_VECTOR_PC_RELATIVE)
+#define JUMP_TABLES_IN_TEXT_SECTION  (GCC_OPTION (flag_pic) || CASE_VECTOR_PC_RELATIVE)
 
 /* For DWARF.  Marginally different than default so output is "prettier"
    (and consistent with above).  */
@@ -1169,7 +1169,7 @@ arc_select_cc_mode (OP, X, Y)
 #define SDATA_BASE_REGNUM 26
 
 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
-  (flag_pic \
+  (GCC_OPTION (flag_pic) \
    ? (GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4 \
    : DW_EH_PE_absptr)
 
@@ -1392,7 +1392,7 @@ do {							\
   fprintf (FILE, "-");					\
   ASM_GENERATE_INTERNAL_LABEL (label, "L", REL);	\
   assemble_name (FILE, label);				\
-  if (TARGET_COMPACT_CASESI)				\
+  if (GCC_OPTION (TARGET_COMPACT_CASESI))				\
     fprintf (FILE, " + %d", 4 + arc_get_unalign ());	\
   fprintf(FILE, "\n");                                  \
 } while (0)
@@ -1410,7 +1410,7 @@ do {							\
     }                                                   \
   while (0)
 
-#define JUMP_ALIGN(LABEL) (arc_size_opt_level < 2 ? 2 : 0)
+#define JUMP_ALIGN(LABEL) (GCC_OPTION (arc_size_opt_level) < 2 ? 2 : 0)
 #define LABEL_ALIGN_AFTER_BARRIER(LABEL) \
   (JUMP_ALIGN(LABEL) \
    ? JUMP_ALIGN(LABEL) \
@@ -1503,17 +1503,17 @@ extern int arc_return_address_regs[4];
    If we have pc relative case vectors, we start the case vector shortening
    with QImode.  */
 #define CASE_VECTOR_MODE \
-  ((optimize && (CASE_VECTOR_PC_RELATIVE || flag_pic)) ? QImode : Pmode)
+  ((GCC_OPTION (optimize) && (CASE_VECTOR_PC_RELATIVE || GCC_OPTION (flag_pic))) ? QImode : Pmode)
 
 /* Define as C expression which evaluates to nonzero if the tablejump
    instruction expects the table to contain offsets from the address of the
    table.
    Do not define this if the table should contain absolute addresses.  */
-#define CASE_VECTOR_PC_RELATIVE TARGET_CASE_VECTOR_PC_RELATIVE
+#define CASE_VECTOR_PC_RELATIVE GCC_OPTION (TARGET_CASE_VECTOR_PC_RELATIVE)
 
 #define CASE_VECTOR_SHORTEN_MODE(MIN_OFFSET, MAX_OFFSET, BODY) \
   CASE_VECTOR_SHORTEN_MODE_1 \
-    (MIN_OFFSET, TARGET_COMPACT_CASESI ? MAX_OFFSET + 6 : MAX_OFFSET, BODY)
+    (MIN_OFFSET, GCC_OPTION (TARGET_COMPACT_CASESI) ? MAX_OFFSET + 6 : MAX_OFFSET, BODY)
 
 #define CASE_VECTOR_SHORTEN_MODE_1(MIN_OFFSET, MAX_OFFSET, BODY) \
 ((MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 255 \
@@ -1557,7 +1557,7 @@ extern int arc_return_address_regs[4];
 #define MOVE_BY_PIECES_P(LEN, ALIGN)  0
 #define CAN_MOVE_BY_PIECES(SIZE, ALIGN) \
   (move_by_pieces_ninsns (SIZE, ALIGN, MOVE_MAX_PIECES + 1) \
-   < (unsigned int) MOVE_RATIO (!optimize_size))
+   < (unsigned int) MOVE_RATIO (!GCC_OPTION (optimize_size)))
 
 /* Undo the effects of the movmem pattern presence on STORE_BY_PIECES_P .  */
 #define MOVE_RATIO(SPEED) ((SPEED) ? 15 : 3)
@@ -1691,6 +1691,6 @@ enum
    the pattern condition of all sfunc patterns which is only relevant for
    the predicated varaint.  */
 #define SFUNC_CHECK_PREDICABLE \
-  (GET_CODE (PATTERN (insn)) != COND_EXEC || !flag_pic || !TARGET_MEDIUM_CALLS)
+  (GET_CODE (PATTERN (insn)) != COND_EXEC || !GCC_OPTION (flag_pic) || !GCC_OPTION (TARGET_MEDIUM_CALLS))
 
 #endif /* GCC_ARC_H */
diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
index 80f6e33..be79882 100644
--- a/gcc/config/arc/arc.md
+++ b/gcc/config/arc/arc.md
@@ -167,8 +167,8 @@
    simd_valign, simd_valign_with_acc, simd_vcontrol,
    simd_vspecial_3cycle, simd_vspecial_4cycle, simd_dma"
   (cond [(eq_attr "is_sfunc" "yes")
-	 (cond [(match_test "!TARGET_LONG_CALLS_SET && (!TARGET_MEDIUM_CALLS || GET_CODE (PATTERN (insn)) != COND_EXEC)") (const_string "call")
-		(match_test "flag_pic") (const_string "sfunc")]
+	 (cond [(match_test "!TARGET_LONG_CALLS_SET && (!GCC_OPTION (TARGET_MEDIUM_CALLS) || GET_CODE (PATTERN (insn)) != COND_EXEC)") (const_string "call")
+		(match_test "GCC_OPTION (flag_pic)") (const_string "sfunc")]
 	       (const_string "call_no_delay_slot"))]
 	(const_string "binary")))
 
@@ -257,7 +257,7 @@
 
      (eq_attr "type" "call")
      (cond [(eq_attr "delay_slot_filled" "yes") (const_string "nocond")
-	    (match_test "!flag_pic") (const_string "canuse_limm")]
+	    (match_test "!GCC_OPTION (flag_pic)") (const_string "canuse_limm")]
 	   (const_string "nocond"))
 
      (eq_attr "iscompact" "maybe,false")
@@ -290,11 +290,11 @@
 	     (const_string "use")
 
 	     (eq_attr "is_sfunc" "yes")
-	     (cond [(match_test "(TARGET_MEDIUM_CALLS
+	     (cond [(match_test "(GCC_OPTION (TARGET_MEDIUM_CALLS)
 				  && !TARGET_LONG_CALLS_SET
-				  && flag_pic)")
+				  && GCC_OPTION (flag_pic))")
 		    (const_string "canuse_limm_add")
-		    (match_test "(TARGET_MEDIUM_CALLS
+		    (match_test "(GCC_OPTION (TARGET_MEDIUM_CALLS)
 				  && !TARGET_LONG_CALLS_SET)")
 		    (const_string "canuse_limm")]
 		   (const_string "canuse"))
@@ -497,7 +497,7 @@
 ;; filled delay slot is to conditionalize the delay slot insn.
 (define_delay (and (match_test "TARGET_AT_DBR_CONDEXEC")
 		   (eq_attr "type" "branch,uncond_branch,jump")
-		   (match_test "!optimize_size"))
+		   (match_test "!GCC_OPTION (optimize_size)"))
   [(eq_attr "in_delay_slot" "true")
    (eq_attr "cond_delay_insn" "yes")
    (eq_attr "cond_delay_insn" "yes")])
@@ -508,7 +508,7 @@
 ;; avoid confusing gcc.
 (define_delay (and (match_test "!TARGET_AT_DBR_CONDEXEC")
 		   (eq_attr "type" "branch,uncond_branch,jump")
-		   (match_test "!optimize_size"))
+		   (match_test "!GCC_OPTION (optimize_size)"))
   [(eq_attr "in_delay_slot" "true")
    (eq_attr "type" "!call,branch,uncond_branch,jump,brcc,return,sfunc")
    (eq_attr "cond_delay_insn" "yes")])
@@ -526,11 +526,11 @@
 
 (define_attr "tune" "none,arc600,arc700_4_2_std,arc700_4_2_xmac"
   (const
-   (cond [(symbol_ref "arc_tune == TUNE_ARC600")
+   (cond [(symbol_ref "GCC_OPTION (arc_tune) == TUNE_ARC600")
 	  (const_string "arc600")
-	  (symbol_ref "arc_tune == TUNE_ARC700_4_2_STD")
+	  (symbol_ref "GCC_OPTION (arc_tune) == TUNE_ARC700_4_2_STD")
 	  (const_string "arc700_4_2_std")
-	  (symbol_ref "arc_tune == TUNE_ARC700_4_2_XMAC")
+	  (symbol_ref "GCC_OPTION (arc_tune) == TUNE_ARC700_4_2_XMAC")
 	  (const_string "arc700_4_2_xmac")]
 	 (const_string "none"))))
 
@@ -976,7 +976,7 @@
 	}
     }
 }"
-  "&& reload_completed && optimize"
+  "&& reload_completed && GCC_OPTION (optimize)"
   [(set (match_dup 2) (match_dup 3)) (set (match_dup 4) (match_dup 5))]
   "arc_split_move (operands);"
   [(set_attr "type" "move,move,load,store")
@@ -1280,7 +1280,7 @@
       && satisfies_constraint_Rcq (operands[0]))
     return "sub%?.ne %0,%0,%0";
   /* ??? might be good for speed on ARC600 too, *if* properly scheduled.  */
-  if ((TARGET_ARC700 || optimize_size)
+  if ((TARGET_ARC700 || GCC_OPTION (optimize_size))
       && rtx_equal_p (operands[1], constm1_rtx)
       && GET_CODE (operands[3]) == LTU)
     return "sbc.cs %0,%0,%0";
@@ -2197,7 +2197,7 @@
 	(plus:SI (match_operand:SI 1 "register_operand" "")
 		 (match_operand:SI 2 "nonmemory_operand" "")))]
   ""
-  "if (flag_pic && arc_raw_symbolic_reference_mentioned_p (operands[2], false))
+  "if (GCC_OPTION (flag_pic) && arc_raw_symbolic_reference_mentioned_p (operands[2], false))
      {
        operands[2]=force_reg(SImode, operands[2]);
      }
@@ -2215,7 +2215,7 @@
 	      (clobber (reg:CC CC_REG))])]
   ""
 {
-  if (TARGET_EXPAND_ADDDI)
+  if (GCC_OPTION (TARGET_EXPAND_ADDDI))
     {
       rtx l0 = gen_lowpart (SImode, operands[0]);
       rtx h0 = disi_highpart (operands[0]);
@@ -2347,7 +2347,7 @@
 	adc %0,%1,%2"
   ; if we have a bad schedule after sched2, split.
   "reload_completed
-   && !optimize_size && TARGET_ARC700
+   && !GCC_OPTION (optimize_size) && TARGET_ARC700
    && arc_scheduling_not_expected ()
    && arc_sets_cc_p (prev_nonnote_insn (insn))
    /* If next comes a return or other insn that needs a delay slot,
@@ -2430,7 +2430,7 @@
       operands[1] = force_reg (SImode, operands[1]);
       c = 2;
     }
-  if (flag_pic && arc_raw_symbolic_reference_mentioned_p (operands[c], false))
+  if (GCC_OPTION (flag_pic) && arc_raw_symbolic_reference_mentioned_p (operands[c], false))
     operands[c] = force_reg (SImode, operands[c]);
   else if (!TARGET_NO_SDATA_SET && small_data_pattern (operands[c], Pmode))
       operands[c] = force_reg (SImode, arc_rewrite_small_data (operands[c]));
@@ -2473,7 +2473,7 @@
 {
   if (!register_operand (operands[2], DImode))
     operands[1] = force_reg (DImode, operands[1]);
-  if (TARGET_EXPAND_ADDDI)
+  if (GCC_OPTION (TARGET_EXPAND_ADDDI))
     {
       rtx l0 = gen_lowpart (SImode, operands[0]);
       rtx h0 = disi_highpart (operands[0]);
@@ -2561,7 +2561,7 @@
 	sbc %0,%1,%2"
   ; if we have a bad schedule after sched2, split.
   "reload_completed
-   && !optimize_size && TARGET_ARC700
+   && !GCC_OPTION (optimize_size) && TARGET_ARC700
    && arc_scheduling_not_expected ()
    && arc_sets_cc_p (prev_nonnote_insn (insn))
    /* If next comes a return or other insn that needs a delay slot,
@@ -3155,7 +3155,7 @@
 				      [(reg:CC_ZN CC_REG) (const_int 0)])
 		      (label_ref (match_operand 2 "" ""))
 		      (pc)))]
-  "TARGET_BBIT_PEEPHOLE && peep2_regno_dead_p (2, CC_REG)"
+  "GCC_OPTION (TARGET_BBIT_PEEPHOLE) && peep2_regno_dead_p (2, CC_REG)"
   [(parallel [(set (pc)
 		   (if_then_else
 		     (match_op_dup 3
@@ -3546,18 +3546,18 @@
   x = gen_rtx_IF_THEN_ELSE (VOIDmode, x,
 			    gen_rtx_LABEL_REF (VOIDmode, operands[4]), pc_rtx);
   emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx, x));
-  if (TARGET_COMPACT_CASESI)
+  if (GCC_OPTION (TARGET_COMPACT_CASESI))
     {
       emit_jump_insn (gen_casesi_compact_jump (operands[5], operands[7]));
     }
   else
     {
       operands[3] = gen_rtx_LABEL_REF (VOIDmode, operands[3]);
-      if (flag_pic || !cse_not_expected)
+      if (GCC_OPTION (flag_pic) || !cse_not_expected)
 	operands[3] = force_reg (Pmode, operands[3]);
       emit_insn (gen_casesi_load (operands[6],
 				  operands[3], operands[5], operands[7]));
-      if (CASE_VECTOR_PC_RELATIVE || flag_pic)
+      if (CASE_VECTOR_PC_RELATIVE || GCC_OPTION (flag_pic))
 	emit_insn (gen_addsi3 (operands[6], operands[6], operands[3]));
       emit_jump_insn (gen_casesi_jump (operands[6], operands[7]));
     }
@@ -3578,7 +3578,7 @@
     {
       gcc_assert (GET_CODE (diff_vec) == ADDR_VEC);
       gcc_assert (GET_MODE (diff_vec) == SImode);
-      gcc_assert (!CASE_VECTOR_PC_RELATIVE && !flag_pic);
+      gcc_assert (!CASE_VECTOR_PC_RELATIVE && !GCC_OPTION (flag_pic));
     }
 
   switch (GET_MODE (diff_vec))
@@ -3636,7 +3636,7 @@
 		   UNSPEC_CASESI))
    (use (label_ref (match_operand 1 "" "")))
    (clobber (match_scratch:SI 2 "=q,0"))]
-  "TARGET_COMPACT_CASESI"
+  "GCC_OPTION (TARGET_COMPACT_CASESI)"
   "*
 {
   rtx diff_vec = PATTERN (next_nonnote_insn (operands[1]));
@@ -4571,7 +4571,7 @@
 ;; non-constant predicate.
 (define_expand "return"
   [(return)]
-  "optimize < 0")
+  "GCC_OPTION (optimize) < 0")
 
  ;; Comment in final.c (insn_current_reference_address) says
  ;; forward branch addresses are calculated from the next insn after branch
@@ -4587,7 +4587,7 @@
 		      (pc)))
    (clobber (match_operand 4 "cc_register" ""))]
    "(reload_completed
-     || (TARGET_EARLY_CBRANCHSI
+     || (GCC_OPTION (TARGET_EARLY_CBRANCHSI)
 	 && brcc_nolimm_operator (operands[0], VOIDmode)))
     && !find_reg_note (insn, REG_CROSSING_JUMP, NULL_RTX)"
    "*
@@ -4787,7 +4787,7 @@
     }
   if (!INTVAL (operands[1]))
     return "; LITTLE LOST LOOP";
-  if (loop_start && flag_pic)
+  if (loop_start && GCC_OPTION (flag_pic))
     {
       /* ??? Can do better for when a scratch register
 	 is known.  But that would require extra testing.  */
@@ -4856,7 +4856,7 @@
   gcc_assert (n_insns || GET_CODE (next_nonnote_insn (insn)) == CODE_LABEL);
   if (size >= 2048 || (TARGET_ARC600 && n_insns == 1) || loop_start)
     {
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	{
 	  /* ??? Can do better for when a scratch register
 	     is known.  But that would require extra testing.  */
@@ -4889,8 +4889,8 @@
 ;     FIXME: length is usually 4, but we need branch shortening
 ;     to get this right.
 ;     [(if_then_else (match_test "TARGET_ARC600") (const_int 16) (const_int 4))
-     [(if_then_else (match_test "flag_pic") (const_int 24) (const_int 16))
-      (if_then_else (match_test "flag_pic") (const_int 28) (const_int 16))
+     [(if_then_else (match_test "GCC_OPTION (flag_pic)") (const_int 24) (const_int 16))
+      (if_then_else (match_test "GCC_OPTION (flag_pic)") (const_int 28) (const_int 16))
       (const_int 0)])]
   ;; ??? we should really branch shorten this insn, but then we'd
   ;; need a proper label first.  N.B. the end label can not only go out
diff --git a/gcc/config/arc/arc600.md b/gcc/config/arc/arc600.md
index 8255e24..549509f 100644
--- a/gcc/config/arc/arc600.md
+++ b/gcc/config/arc/arc600.md
@@ -45,13 +45,13 @@
 
 (define_insn_reservation "mul_600_fast" 3
   (and (eq_attr "tune" "arc600")
-       (match_test "arc_multcost < COSTS_N_INSNS (7)")
+       (match_test "GCC_OPTION (arc_multcost) < COSTS_N_INSNS (7)")
        (eq_attr "type" "multi,umulti"))
   "mul64_600*3")
 
 (define_insn_reservation "mul_600_slow" 8
   (and (eq_attr "tune" "arc600")
-       (match_test "arc_multcost >= COSTS_N_INSNS (7)")
+       (match_test "GCC_OPTION (arc_multcost) >= COSTS_N_INSNS (7)")
        (eq_attr "type" "multi,umulti"))
   "mul64_600*8")
 
diff --git a/gcc/config/arc/constraints.md b/gcc/config/arc/constraints.md
index d01e156..bec4504 100644
--- a/gcc/config/arc/constraints.md
+++ b/gcc/config/arc/constraints.md
@@ -336,7 +336,7 @@
    Registers usable in ARCompact 16-bit instructions: @code{r0}-@code{r3},
    @code{r12}-@code{r15}"
   (and (match_code "REG")
-       (match_test "TARGET_Rcq
+       (match_test "GCC_OPTION (TARGET_Rcq)
 		    && !arc_ccfsm_cond_exec_p ()
 		    && IN_RANGE (REGNO (op) ^ 4, 4, 11)")))
 
@@ -349,7 +349,7 @@
    Cryptic w - for use in early alternatives with matching constraint"
   (and (match_code "REG")
        (match_test
-	"TARGET_Rcw
+	"GCC_OPTION (TARGET_Rcw)
 	 && REGNO (op) < FIRST_PSEUDO_REGISTER
 	 && TEST_HARD_REG_BIT (reg_class_contents[WRITABLE_CORE_REGS],
 			       REGNO (op))")))
@@ -359,7 +359,7 @@
    Cryptic r - for use in early alternatives with matching constraint"
   (and (match_code "REG")
        (match_test
-	"TARGET_Rcw
+	"GCC_OPTION (TARGET_Rcw)
 	 && REGNO (op) < FIRST_PSEUDO_REGISTER
 	 && TEST_HARD_REG_BIT (reg_class_contents[GENERAL_REGS],
 			       REGNO (op))")))
diff --git a/gcc/config/arc/predicates.md b/gcc/config/arc/predicates.md
index 81bf627..0b1d0a0 100644
--- a/gcc/config/arc/predicates.md
+++ b/gcc/config/arc/predicates.md
@@ -353,7 +353,7 @@
     case SYMBOL_REF :
     case LABEL_REF :
     case CONST :
-      return (!flag_pic || arc_legitimate_pic_operand_p(op));
+      return (!GCC_OPTION (flag_pic) || arc_legitimate_pic_operand_p(op));
     case CONST_INT :
       return (LARGE_INT (INTVAL (op)));
     case CONST_DOUBLE :
diff --git a/gcc/config/arm/aout.h b/gcc/config/arm/aout.h
index 51d32a9..4a599e2 100644
--- a/gcc/config/arm/aout.h
+++ b/gcc/config/arm/aout.h
@@ -187,7 +187,7 @@
 	asm_fprintf (STREAM, "\tb\t%LL%d\n", VALUE);			\
       else if (TARGET_THUMB1)						\
 	{								\
-	  if (flag_pic || optimize_size)				\
+	  if (GCC_OPTION (flag_pic) || GCC_OPTION (optimize_size))				\
 	    {								\
 	      switch (GET_MODE(body))					\
 		{							\
@@ -223,7 +223,7 @@
 			   VALUE, REL);					\
 	      break;							\
 	    case SImode:						\
-	      if (flag_pic)						\
+	      if (GCC_OPTION (flag_pic))						\
 		asm_fprintf (STREAM, "\t.word\t%LL%d+1-%LL%d\n", VALUE, REL); \
 	      else							\
 		asm_fprintf (STREAM, "\t.word\t%LL%d+1\n", VALUE);	\
diff --git a/gcc/config/arm/arm-fixed.md b/gcc/config/arm/arm-fixed.md
index 4ab9d35..6945965 100644
--- a/gcc/config/arm/arm-fixed.md
+++ b/gcc/config/arm/arm-fixed.md
@@ -237,7 +237,7 @@
   output_asm_insn ("ssat\\t%R3, #15, %R3", operands);
   output_asm_insn ("mrs\\t%4, APSR", operands);
   output_asm_insn ("tst\\t%4, #1<<27", operands);
-  if (arm_restrict_it)
+  if (GCC_OPTION (arm_restrict_it))
     {
       output_asm_insn ("mvn\\t%4, %R3, asr #32", operands);
       output_asm_insn ("it\\tne", operands);
@@ -257,7 +257,7 @@
    (set_attr "type" "multiple")
    (set (attr "length")
 	(if_then_else (eq_attr "is_thumb" "yes")
-		      (if_then_else (match_test "arm_restrict_it")
+		      (if_then_else (match_test "GCC_OPTION (arm_restrict_it)")
 		                    (const_int 40)
 		                    (const_int 38))
 		      (const_int 32)))])
@@ -297,7 +297,7 @@
   output_asm_insn ("usat\\t%R3, #16, %R3", operands);
   output_asm_insn ("mrs\\t%4, APSR", operands);
   output_asm_insn ("tst\\t%4, #1<<27", operands);
-  if (arm_restrict_it)
+  if (GCC_OPTION (arm_restrict_it))
     {
       output_asm_insn ("sbfx\\t%4, %R3, #15, #1", operands);
       output_asm_insn ("it\\tne", operands);
@@ -317,7 +317,7 @@
    (set_attr "type" "multiple")
    (set (attr "length")
 	(if_then_else (eq_attr "is_thumb" "yes")
-		      (if_then_else (match_test "arm_restrict_it")
+		      (if_then_else (match_test "GCC_OPTION (arm_restrict_it)")
 		                    (const_int 40)
 		                    (const_int 38))
 		      (const_int 32)))])
diff --git a/gcc/config/arm/arm-modes.def b/gcc/config/arm/arm-modes.def
index 882aa55..b18266e 100644
--- a/gcc/config/arm/arm-modes.def
+++ b/gcc/config/arm/arm-modes.def
@@ -27,7 +27,7 @@ FLOAT_MODE (XF, 12, 0);
 
 /* Half-precision floating point */
 FLOAT_MODE (HF, 2, 0);
-ADJUST_FLOAT_FORMAT (HF, ((arm_fp16_format == ARM_FP16_FORMAT_ALTERNATIVE)
+ADJUST_FLOAT_FORMAT (HF, ((GCC_OPTION (arm_fp16_format) == ARM_FP16_FORMAT_ALTERNATIVE)
 			  ? &arm_half_format : &ieee_half_format));
 
 /* CCFPEmode should be used with floating inequalities,
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 0240cc7..6ee138e 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -629,7 +629,7 @@ static const struct attribute_spec arm_attribute_table[] =
 #undef TARGET_CLASS_LIKELY_SPILLED_P
 #define TARGET_CLASS_LIKELY_SPILLED_P arm_class_likely_spilled_p
 
-#undef TARGET_VECTORIZE_BUILTINS
+#undef GCC_OPTION (TARGET_VECTORIZE_BUILTINS)
 #define TARGET_VECTORIZE_BUILTINS
 
 #undef TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION
@@ -669,7 +669,7 @@ static const struct attribute_spec arm_attribute_table[] =
 #define TARGET_ASAN_SHADOW_OFFSET arm_asan_shadow_offset
 
 #undef MAX_INSN_PER_IT_BLOCK
-#define MAX_INSN_PER_IT_BLOCK (arm_restrict_it ? 1 : 4)
+#define MAX_INSN_PER_IT_BLOCK (GCC_OPTION (arm_restrict_it) ? 1 : 4)
 
 #undef TARGET_CAN_USE_DOLOOP_P
 #define TARGET_CAN_USE_DOLOOP_P can_use_doloop_if_innermost
@@ -1894,7 +1894,7 @@ static void
 arm_init_libfuncs (void)
 {
   /* For Linux, we have access to kernel support for atomic operations.  */
-  if (arm_abi == ARM_ABI_AAPCS_LINUX)
+  if (GCC_OPTION (arm_abi) == ARM_ABI_AAPCS_LINUX)
     init_sync_libfuncs (2 * UNITS_PER_WORD);
 
   /* There are no special library functions unless we are using the
@@ -2001,18 +2001,18 @@ arm_init_libfuncs (void)
 
   /* Half-precision float operations.  The compiler handles all operations
      with NULL libfuncs by converting the SFmode.  */
-  switch (arm_fp16_format)
+  switch (GCC_OPTION (arm_fp16_format))
     {
     case ARM_FP16_FORMAT_IEEE:
     case ARM_FP16_FORMAT_ALTERNATIVE:
 
       /* Conversions.  */
       set_conv_libfunc (trunc_optab, HFmode, SFmode,
-			(arm_fp16_format == ARM_FP16_FORMAT_IEEE
+			(GCC_OPTION (arm_fp16_format) == ARM_FP16_FORMAT_IEEE
 			 ? "__gnu_f2h_ieee"
 			 : "__gnu_f2h_alternative"));
       set_conv_libfunc (sext_optab, SFmode, HFmode,
-			(arm_fp16_format == ARM_FP16_FORMAT_IEEE
+			(GCC_OPTION (arm_fp16_format) == ARM_FP16_FORMAT_IEEE
 			 ? "__gnu_h2f_ieee"
 			 : "__gnu_h2f_alternative"));
 
@@ -2267,16 +2267,16 @@ static void
 arm_option_override (void)
 {
   if (global_options_set.x_arm_arch_option)
-    arm_selected_arch = &all_architectures[arm_arch_option];
+    arm_selected_arch = &all_architectures[GCC_OPTION (arm_arch_option)];
 
   if (global_options_set.x_arm_cpu_option)
     {
-      arm_selected_cpu = &all_cores[(int) arm_cpu_option];
-      arm_selected_tune = &all_cores[(int) arm_cpu_option];
+      arm_selected_cpu = &all_cores[(int) GCC_OPTION (arm_cpu_option)];
+      arm_selected_tune = &all_cores[(int) GCC_OPTION (arm_cpu_option)];
     }
 
   if (global_options_set.x_arm_tune_option)
-    arm_selected_tune = &all_cores[(int) arm_tune_option];
+    arm_selected_tune = &all_cores[(int) GCC_OPTION (arm_tune_option)];
 
 #ifdef SUBTARGET_OVERRIDE_OPTIONS
   SUBTARGET_OVERRIDE_OPTIONS;
@@ -2414,25 +2414,25 @@ arm_option_override (void)
   if (TARGET_INTERWORK && !((insn_flags & FL_THUMB) || TARGET_BPABI))
     {
       warning (0, "target CPU does not support interworking" );
-      target_flags &= ~MASK_INTERWORK;
+      GCC_OPTION (target_flags) &= ~MASK_INTERWORK;
     }
 
   if (TARGET_THUMB && !(insn_flags & FL_THUMB))
     {
       warning (0, "target CPU does not support THUMB instructions");
-      target_flags &= ~MASK_THUMB;
+      GCC_OPTION (target_flags) &= ~MASK_THUMB;
     }
 
   if (TARGET_APCS_FRAME && TARGET_THUMB)
     {
       /* warning (0, "ignoring -mapcs-frame because -mthumb was used"); */
-      target_flags &= ~MASK_APCS_FRAME;
+      GCC_OPTION (target_flags) &= ~MASK_APCS_FRAME;
     }
 
   /* Callee super interworking implies thumb interworking.  Adding
      this to the flags here simplifies the logic elsewhere.  */
   if (TARGET_THUMB && TARGET_CALLEE_INTERWORKING)
-    target_flags |= MASK_INTERWORK;
+    GCC_OPTION (target_flags) |= MASK_INTERWORK;
 
   /* TARGET_BACKTRACE calls leaf_function_p, which causes a crash if done
      from here where no function is being compiled currently.  */
@@ -2445,13 +2445,13 @@ arm_option_override (void)
   if (TARGET_APCS_STACK && !TARGET_APCS_FRAME)
     {
       warning (0, "-mapcs-stack-check incompatible with -mno-apcs-frame");
-      target_flags |= MASK_APCS_FRAME;
+      GCC_OPTION (target_flags) |= MASK_APCS_FRAME;
     }
 
   if (TARGET_POKE_FUNCTION_NAME)
-    target_flags |= MASK_APCS_FRAME;
+    GCC_OPTION (target_flags) |= MASK_APCS_FRAME;
 
-  if (TARGET_APCS_REENT && flag_pic)
+  if (TARGET_APCS_REENT && GCC_OPTION (flag_pic))
     error ("-fpic and -mapcs-reent are incompatible");
 
   if (TARGET_APCS_REENT)
@@ -2460,7 +2460,7 @@ arm_option_override (void)
   /* If this target is normally configured to use APCS frames, warn if they
      are turned off and debugging is turned on.  */
   if (TARGET_ARM
-      && write_symbols != NO_DEBUG
+      && GCC_OPTION (write_symbols) != NO_DEBUG
       && !TARGET_APCS_FRAME
       && (TARGET_DEFAULT & MASK_APCS_FRAME))
     warning (0, "-g with -mno-apcs-frame may not give sensible debugging");
@@ -2500,11 +2500,11 @@ arm_option_override (void)
   arm_arch_arm_hwdiv = (insn_flags & FL_ARM_DIV) != 0;
   arm_tune_cortex_a9 = (arm_tune == cortexa9) != 0;
   arm_arch_crc = (insn_flags & FL_CRC32) != 0;
-  if (arm_restrict_it == 2)
-    arm_restrict_it = arm_arch8 && TARGET_THUMB2;
+  if (GCC_OPTION (arm_restrict_it) == 2)
+    GCC_OPTION (arm_restrict_it) = arm_arch8 && TARGET_THUMB2;
 
   if (!TARGET_THUMB2)
-    arm_restrict_it = 0;
+    GCC_OPTION (arm_restrict_it) = 0;
 
   /* If we are not using the default (ARM mode) section anchor offset
      ranges, then set the correct ranges now.  */
@@ -2536,7 +2536,7 @@ arm_option_override (void)
     arm_cpp_interwork = 1;
 
   if (arm_arch5)
-    target_flags &= ~MASK_INTERWORK;
+    GCC_OPTION (target_flags) &= ~MASK_INTERWORK;
 
   if (TARGET_IWMMXT && !ARM_DOUBLEWORD_ALIGN)
     error ("iwmmxt requires an AAPCS compatible ABI for proper operation");
@@ -2555,12 +2555,12 @@ arm_option_override (void)
       target_fpu_name = "vfp";
 #endif
 
-      ok = opt_enum_arg_to_value (OPT_mfpu_, target_fpu_name, &arm_fpu_index,
+      ok = opt_enum_arg_to_value (OPT_mfpu_, target_fpu_name, &GCC_OPTION (arm_fpu_index),
 				  CL_TARGET);
       gcc_assert (ok);
     }
 
-  arm_fpu_desc = &all_fpus[arm_fpu_index];
+  arm_fpu_desc = &all_fpus[GCC_OPTION (arm_fpu_index)];
 
   switch (arm_fpu_desc->model)
     {
@@ -2590,7 +2590,7 @@ arm_option_override (void)
     error ("iWMMXt unsupported under Thumb mode");
 
   /* __fp16 support currently assumes the core has ldrh.  */
-  if (!arm_arch4 && arm_fp16_format != ARM_FP16_FORMAT_NONE)
+  if (!arm_arch4 && GCC_OPTION (arm_fp16_format) != ARM_FP16_FORMAT_NONE)
     sorry ("__fp16 and no ldrh");
 
   /* If soft-float is specified then don't use FPU.  */
@@ -2599,9 +2599,9 @@ arm_option_override (void)
 
   if (TARGET_AAPCS_BASED)
     {
-      if (arm_abi == ARM_ABI_IWMMXT)
+      if (GCC_OPTION (arm_abi) == ARM_ABI_IWMMXT)
 	arm_pcs_default = ARM_PCS_AAPCS_IWMMXT;
-      else if (arm_float_abi == ARM_FLOAT_ABI_HARD
+      else if (GCC_OPTION (arm_float_abi) == ARM_FLOAT_ABI_HARD
 	       && TARGET_HARD_FLOAT
 	       && TARGET_VFP)
 	arm_pcs_default = ARM_PCS_AAPCS_VFP;
@@ -2610,10 +2610,10 @@ arm_option_override (void)
     }
   else
     {
-      if (arm_float_abi == ARM_FLOAT_ABI_HARD && TARGET_VFP)
+      if (GCC_OPTION (arm_float_abi) == ARM_FLOAT_ABI_HARD && TARGET_VFP)
 	sorry ("-mfloat-abi=hard and VFP");
 
-      if (arm_abi == ARM_ABI_APCS)
+      if (GCC_OPTION (arm_abi) == ARM_ABI_APCS)
 	arm_pcs_default = ARM_PCS_APCS;
       else
 	arm_pcs_default = ARM_PCS_ATPCS;
@@ -2622,15 +2622,15 @@ arm_option_override (void)
   /* For arm2/3 there is no need to do any scheduling if we are doing
      software floating-point.  */
   if (TARGET_SOFT_FLOAT && (tune_flags & FL_MODE32) == 0)
-    flag_schedule_insns = flag_schedule_insns_after_reload = 0;
+    GCC_OPTION (flag_schedule_insns) = GCC_OPTION (flag_schedule_insns_after_reload) = 0;
 
   /* Use the cp15 method if it is available.  */
-  if (target_thread_pointer == TP_AUTO)
+  if (GCC_OPTION (target_thread_pointer) == TP_AUTO)
     {
       if (arm_arch6k && !TARGET_THUMB1)
-	target_thread_pointer = TP_CP15;
+	GCC_OPTION (target_thread_pointer) = TP_CP15;
       else
-	target_thread_pointer = TP_SOFT;
+	GCC_OPTION (target_thread_pointer) = TP_SOFT;
     }
 
   if (TARGET_HARD_TP && TARGET_THUMB1)
@@ -2640,47 +2640,47 @@ arm_option_override (void)
   if (!global_options_set.x_arm_structure_size_boundary)
     {
       if (TARGET_AAPCS_BASED)
-	arm_structure_size_boundary = 8;
+	GCC_OPTION (arm_structure_size_boundary) = 8;
     }
   else
     {
-      if (arm_structure_size_boundary != 8
-	  && arm_structure_size_boundary != 32
-	  && !(ARM_DOUBLEWORD_ALIGN && arm_structure_size_boundary == 64))
+      if (GCC_OPTION (arm_structure_size_boundary) != 8
+	  && GCC_OPTION (arm_structure_size_boundary) != 32
+	  && !(ARM_DOUBLEWORD_ALIGN && GCC_OPTION (arm_structure_size_boundary) == 64))
 	{
 	  if (ARM_DOUBLEWORD_ALIGN)
 	    warning (0,
 		     "structure size boundary can only be set to 8, 32 or 64");
 	  else
 	    warning (0, "structure size boundary can only be set to 8 or 32");
-	  arm_structure_size_boundary
+	  GCC_OPTION (arm_structure_size_boundary)
 	    = (TARGET_AAPCS_BASED ? 8 : DEFAULT_STRUCTURE_SIZE_BOUNDARY);
 	}
     }
 
-  if (!TARGET_ARM && TARGET_VXWORKS_RTP && flag_pic)
+  if (!TARGET_ARM && TARGET_VXWORKS_RTP && GCC_OPTION (flag_pic))
     {
       error ("RTP PIC is incompatible with Thumb");
-      flag_pic = 0;
+      GCC_OPTION (flag_pic) = 0;
     }
 
   /* If stack checking is disabled, we can use r10 as the PIC register,
      which keeps r9 available.  The EABI specifies r9 as the PIC register.  */
-  if (flag_pic && TARGET_SINGLE_PIC_BASE)
+  if (GCC_OPTION (flag_pic) && GCC_OPTION (TARGET_SINGLE_PIC_BASE))
     {
       if (TARGET_VXWORKS_RTP)
 	warning (0, "RTP PIC is incompatible with -msingle-pic-base");
       arm_pic_register = (TARGET_APCS_STACK || TARGET_AAPCS_BASED) ? 9 : 10;
     }
 
-  if (flag_pic && TARGET_VXWORKS_RTP)
+  if (GCC_OPTION (flag_pic) && TARGET_VXWORKS_RTP)
     arm_pic_register = 9;
 
-  if (arm_pic_register_string != NULL)
+  if (GCC_OPTION (arm_pic_register_string) != NULL)
     {
-      int pic_register = decode_reg_name (arm_pic_register_string);
+      int pic_register = decode_reg_name (GCC_OPTION (arm_pic_register_string));
 
-      if (!flag_pic)
+      if (!GCC_OPTION (flag_pic))
 	warning (0, "-mpic-register= is useless without -fpic");
 
       /* Prevent the user from choosing an obviously stupid PIC register.  */
@@ -2690,22 +2690,22 @@ arm_option_override (void)
 	       || pic_register >= PC_REGNUM
 	       || (TARGET_VXWORKS_RTP
 		   && (unsigned int) pic_register != arm_pic_register))
-	error ("unable to use '%s' for PIC register", arm_pic_register_string);
+	error ("unable to use '%s' for PIC register", GCC_OPTION (arm_pic_register_string));
       else
 	arm_pic_register = pic_register;
     }
 
   if (TARGET_VXWORKS_RTP
       && !global_options_set.x_arm_pic_data_is_text_relative)
-    arm_pic_data_is_text_relative = 0;
+    GCC_OPTION (arm_pic_data_is_text_relative) = 0;
 
   /* Enable -mfix-cortex-m3-ldrd by default for Cortex-M3 cores.  */
-  if (fix_cm3_ldrd == 2)
+  if (GCC_OPTION (fix_cm3_ldrd) == 2)
     {
       if (arm_selected_cpu->core == cortexm3)
-	fix_cm3_ldrd = 1;
+	GCC_OPTION (fix_cm3_ldrd) = 1;
       else
-	fix_cm3_ldrd = 0;
+	GCC_OPTION (fix_cm3_ldrd) = 0;
     }
 
   /* Enable -munaligned-access by default for
@@ -2717,27 +2717,27 @@ arm_option_override (void)
      - all pre-ARMv6 architecture-based processors
      - ARMv6-M architecture-based processors.  */
 
-  if (unaligned_access == 2)
+  if (GCC_OPTION (unaligned_access) == 2)
     {
       if (arm_arch6 && (arm_arch_notm || arm_arch7))
-	unaligned_access = 1;
+	GCC_OPTION (unaligned_access) = 1;
       else
-	unaligned_access = 0;
+	GCC_OPTION (unaligned_access) = 0;
     }
-  else if (unaligned_access == 1
+  else if (GCC_OPTION (unaligned_access) == 1
 	   && !(arm_arch6 && (arm_arch_notm || arm_arch7)))
     {
       warning (0, "target CPU does not support unaligned accesses");
-      unaligned_access = 0;
+      GCC_OPTION (unaligned_access) = 0;
     }
 
-  if (TARGET_THUMB1 && flag_schedule_insns)
+  if (TARGET_THUMB1 && GCC_OPTION (flag_schedule_insns))
     {
       /* Don't warn since it's on by default in -O2.  */
-      flag_schedule_insns = 0;
+      GCC_OPTION (flag_schedule_insns) = 0;
     }
 
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     {
       /* If optimizing for size, bump the number of instructions that we
          are prepared to conditionally execute (even on a StrongARM).  */
@@ -2748,15 +2748,15 @@ arm_option_override (void)
 
   /* Hot/Cold partitioning is not currently supported, since we can't
      handle literal pool placement in that case.  */
-  if (flag_reorder_blocks_and_partition)
+  if (GCC_OPTION (flag_reorder_blocks_and_partition))
     {
       inform (input_location,
 	      "-freorder-blocks-and-partition not supported on this architecture");
-      flag_reorder_blocks_and_partition = 0;
-      flag_reorder_blocks = 1;
+      GCC_OPTION (flag_reorder_blocks_and_partition) = 0;
+      GCC_OPTION (flag_reorder_blocks) = 1;
     }
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     /* Hoisting PIC address calculations more aggressively provides a small,
        but measurable, size reduction for PIC code.  Therefore, we decrease
        the bar for unrestricted expression hoisting to the cost of PIC address
@@ -2766,17 +2766,17 @@ arm_option_override (void)
 			   global_options_set.x_param_values);
 
   /* ARM EABI defaults to strict volatile bitfields.  */
-  if (TARGET_AAPCS_BASED && flag_strict_volatile_bitfields < 0
+  if (TARGET_AAPCS_BASED && GCC_OPTION (flag_strict_volatile_bitfields) < 0
       && abi_version_at_least(2))
-    flag_strict_volatile_bitfields = 1;
+    GCC_OPTION (flag_strict_volatile_bitfields) = 1;
 
   /* Enable sw prefetching at -O3 for CPUS that have prefetch, and we have deemed
      it beneficial (signified by setting num_prefetch_slots to 1 or more.)  */
-  if (flag_prefetch_loop_arrays < 0
+  if (GCC_OPTION (flag_prefetch_loop_arrays) < 0
       && HAVE_prefetch
-      && optimize >= 3
+      && GCC_OPTION (optimize) >= 3
       && current_tune->num_prefetch_slots > 0)
-    flag_prefetch_loop_arrays = 1;
+    GCC_OPTION (flag_prefetch_loop_arrays) = 1;
 
   /* Set up parameters to be used in prefetching algorithm.  Do not override the
      defaults unless we are tuning for a core we have researched values for.  */
@@ -2799,7 +2799,7 @@ arm_option_override (void)
   /* Use Neon to perform 64-bits operations rather than core
      registers.  */
   prefer_neon_for_64bits = current_tune->prefer_neon_for_64bits;
-  if (use_neon_for_64bits == 1)
+  if (GCC_OPTION (use_neon_for_64bits) == 1)
      prefer_neon_for_64bits = true;
 
   /* Use the alternative scheduling-pressure algorithm by default.  */
@@ -2810,15 +2810,15 @@ arm_option_override (void)
   /* Disable shrink-wrap when optimizing function for size, since it tends to
      generate additional returns.  */
   if (optimize_function_for_size_p (cfun) && TARGET_THUMB2)
-    flag_shrink_wrap = false;
+    GCC_OPTION (flag_shrink_wrap) = false;
   /* TBD: Dwarf info for apcs frame is not handled yet.  */
   if (TARGET_APCS_FRAME)
-    flag_shrink_wrap = false;
+    GCC_OPTION (flag_shrink_wrap) = false;
 
   /* We only support -mslow-flash-data on armv7-m targets.  */
   if (target_slow_flash_data
       && ((!(arm_arch7 && !arm_arch_notm) && !arm_arch7em)
-	  || (TARGET_THUMB1 || flag_pic || TARGET_NEON)))
+	  || (TARGET_THUMB1 || GCC_OPTION (flag_pic) || TARGET_NEON)))
     error ("-mslow-flash-data only supports non-pic code on armv7-m targets");
 
   /* Currently, for slow flash data, we just disable literal pools.  */
@@ -2910,10 +2910,10 @@ arm_compute_func_type (void)
      never return, and many memory cycles can be saved by not storing
      register values that will never be needed again.  This optimization
      was added to speed up context switching in a kernel application.  */
-  if (optimize > 0
+  if (GCC_OPTION (optimize) > 0
       && (TREE_NOTHROW (current_function_decl)
-          || !(flag_unwind_tables
-               || (flag_exceptions
+          || !(GCC_OPTION (flag_unwind_tables)
+               || (GCC_OPTION (flag_exceptions)
 		   && arm_except_unwind_info (&global_options) != UI_SJLJ)))
       && TREE_THIS_VOLATILE (current_function_decl))
     type |= ARM_FT_VOLATILE;
@@ -3148,7 +3148,7 @@ use_return_insn (int iscond, rtx sibling)
       if (saved_int_regs != 0 && saved_int_regs != (1 << LR_REGNUM))
 	return 0;
 
-      if (flag_pic
+      if (GCC_OPTION (flag_pic)
 	  && arm_pic_register != INVALID_REGNUM
 	  && df_regs_ever_live_p (PIC_OFFSET_TABLE_REGNUM))
 	return 0;
@@ -4708,7 +4708,7 @@ arm_return_in_memory (const_tree type, const_tree fntype)
     /* All simple types are returned in registers.  */
     return false;
 
-  if (arm_abi != ARM_ABI_APCS)
+  if (GCC_OPTION (arm_abi) != ARM_ABI_APCS)
     {
       /* ATPCS and later return aggregate types in memory only if they are
 	 larger than a word (or are variable size).  */
@@ -4878,7 +4878,7 @@ arm_get_pcs_model (const_tree type, const_tree decl)
 	return ARM_PCS_AAPCS;
       else if (user_convention)
 	return user_pcs;
-      else if (decl && flag_unit_at_a_time)
+      else if (decl && GCC_OPTION (flag_unit_at_a_time))
 	{
 	  /* Local functions never leak outside this compilation unit,
 	     so we are free to use whatever conventions are
@@ -5614,7 +5614,7 @@ arm_init_cumulative_args (CUMULATIVE_ARGS *pcum, tree fntype,
 static bool
 arm_lra_p (void)
 {
-  return arm_lra_flag;
+  return GCC_OPTION (arm_lra_flag);
 }
 
 /* Return true if mode/type need doubleword alignment.  */
@@ -6012,7 +6012,7 @@ arm_function_in_section_p (tree decl, section *section)
   if (!DECL_SECTION_NAME (decl))
     {
       /* Make sure that we will not create a unique section for DECL.  */
-      if (flag_function_sections || DECL_ONE_ONLY (decl))
+      if (GCC_OPTION (flag_function_sections) || DECL_ONE_ONLY (decl))
 	return false;
     }
 
@@ -6039,7 +6039,7 @@ arm_is_long_call_p (tree decl)
   tree attrs;
 
   if (!decl)
-    return TARGET_LONG_CALLS;
+    return GCC_OPTION (TARGET_LONG_CALLS);
 
   attrs = TYPE_ATTRIBUTES (TREE_TYPE (decl));
   if (lookup_attribute ("short_call", attrs))
@@ -6047,7 +6047,7 @@ arm_is_long_call_p (tree decl)
 
   /* For "f", be conservative, and only cater for cases in which the
      whole of the current function is placed in the same section.  */
-  if (!flag_reorder_blocks_and_partition
+  if (!GCC_OPTION (flag_reorder_blocks_and_partition)
       && TREE_CODE (decl) == FUNCTION_DECL
       && arm_function_in_section_p (decl, current_function_section ()))
     return false;
@@ -6055,7 +6055,7 @@ arm_is_long_call_p (tree decl)
   if (lookup_attribute ("long_call", attrs))
     return true;
 
-  return TARGET_LONG_CALLS;
+  return GCC_OPTION (TARGET_LONG_CALLS);
 }
 
 /* Return nonzero if it is ok to make a tail-call to DECL.  */
@@ -6073,7 +6073,7 @@ arm_function_ok_for_sibcall (tree decl, tree exp)
 
   /* The PIC register is live on entry to VxWorks PLT entries, so we
      must make the call before restoring the PIC register.  */
-  if (TARGET_VXWORKS_RTP && flag_pic && !targetm.binds_local_p (decl))
+  if (TARGET_VXWORKS_RTP && GCC_OPTION (flag_pic) && !targetm.binds_local_p (decl))
     return false;
 
   /* Cannot tail-call to long calls, since these are out of range of
@@ -6116,7 +6116,7 @@ arm_function_ok_for_sibcall (tree decl, tree exp)
      references should become a NOP.  Don't convert such calls into
      sibling calls.  */
   if (TARGET_AAPCS_BASED
-      && arm_abi == ARM_ABI_AAPCS
+      && GCC_OPTION (arm_abi) == ARM_ABI_AAPCS
       && decl
       && DECL_WEAK (decl))
     return false;
@@ -6232,7 +6232,7 @@ legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
 	   || (GET_CODE (orig) == SYMBOL_REF &&
 	       SYMBOL_REF_LOCAL_P (orig)))
 	  && NEED_GOT_RELOC
-	  && arm_pic_data_is_text_relative)
+	  && GCC_OPTION (arm_pic_data_is_text_relative))
 	insn = arm_pic_static_addr (orig, reg);
       else
 	{
@@ -6397,10 +6397,10 @@ arm_load_pic_register (unsigned long saved_regs ATTRIBUTE_UNUSED)
 {
   rtx l1, labelno, pic_tmp, pic_rtx, pic_reg;
 
-  if (crtl->uses_pic_offset_table == 0 || TARGET_SINGLE_PIC_BASE)
+  if (crtl->uses_pic_offset_table == 0 || GCC_OPTION (TARGET_SINGLE_PIC_BASE))
     return;
 
-  gcc_assert (flag_pic);
+  gcc_assert (GCC_OPTION (flag_pic));
 
   pic_reg = cfun->machine->pic_reg;
   if (TARGET_VXWORKS_RTP)
@@ -6471,7 +6471,7 @@ arm_pic_static_addr (rtx orig, rtx reg)
 {
   rtx l1, labelno, offset_rtx, insn;
 
-  gcc_assert (flag_pic);
+  gcc_assert (GCC_OPTION (flag_pic));
 
   /* We use an UNSPEC rather than a LABEL_REF because this label
      never appears in the code stream.  */
@@ -6611,7 +6611,7 @@ arm_legitimate_address_outer_p (enum machine_mode mode, rtx x, RTX_CODE outer,
   else if (GET_MODE_CLASS (mode) != MODE_FLOAT
 	   && code == SYMBOL_REF
 	   && CONSTANT_POOL_ADDRESS_P (x)
-	   && ! (flag_pic
+	   && ! (GCC_OPTION (flag_pic)
 		 && symbol_mentioned_p (get_pool_constant (x))
 		 && ! pcrel_constant_p (get_pool_constant (x))))
     return 1;
@@ -6705,7 +6705,7 @@ thumb2_legitimate_address_p (enum machine_mode mode, rtx x, int strict_p)
   else if (GET_MODE_CLASS (mode) != MODE_FLOAT
 	   && code == SYMBOL_REF
 	   && CONSTANT_POOL_ADDRESS_P (x)
-	   && ! (flag_pic
+	   && ! (GCC_OPTION (flag_pic)
 		 && symbol_mentioned_p (get_pool_constant (x))
 		 && ! pcrel_constant_p (get_pool_constant (x))))
     return 1;
@@ -6998,7 +6998,7 @@ thumb1_legitimate_address_p (enum machine_mode mode, rtx x, int strict_p)
   /* This is PC relative data before arm_reorg runs.  */
   else if (GET_MODE_SIZE (mode) >= 4 && CONSTANT_P (x)
 	   && GET_CODE (x) == SYMBOL_REF
-           && CONSTANT_POOL_ADDRESS_P (x) && !flag_pic)
+           && CONSTANT_POOL_ADDRESS_P (x) && !GCC_OPTION (flag_pic))
     return 1;
 
   /* This is PC relative data after arm_reorg runs.  */
@@ -7066,7 +7066,7 @@ thumb1_legitimate_address_p (enum machine_mode mode, rtx x, int strict_p)
 	   && GET_MODE_SIZE (mode) == 4
 	   && GET_CODE (x) == SYMBOL_REF
 	   && CONSTANT_POOL_ADDRESS_P (x)
-	   && ! (flag_pic
+	   && ! (GCC_OPTION (flag_pic)
 		 && symbol_mentioned_p (get_pool_constant (x))
 		 && ! pcrel_constant_p (get_pool_constant (x))))
     return 1;
@@ -7438,7 +7438,7 @@ arm_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode)
      with absolute addresses which often allows for the base register to
      be factorized for multiple adjacent memory references, and it might
      even allows for the mini pool to be avoided entirely. */
-  else if (CONST_INT_P (x) && optimize > 0)
+  else if (CONST_INT_P (x) && GCC_OPTION (optimize) > 0)
     {
       unsigned int bits;
       HOST_WIDE_INT mask, base, index;
@@ -7462,7 +7462,7 @@ arm_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode)
       x = plus_constant (Pmode, base_reg, index);
     }
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       /* We need to find and carefully transform any SYMBOL and LABEL
 	 references; so go back to the original address expression.  */
@@ -7493,7 +7493,7 @@ thumb_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode)
       /* Try and fold the offset into a biasing of the base register and
 	 then offsetting that.  Don't do this when optimizing for space
 	 since it can cause too many CSEs.  */
-      if (optimize_size && offset >= 0
+      if (GCC_OPTION (optimize_size) && offset >= 0
 	  && offset < 256 + 31 * GET_MODE_SIZE (mode))
 	{
 	  HOST_WIDE_INT delta;
@@ -7530,7 +7530,7 @@ thumb_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode)
       x = gen_rtx_PLUS (SImode, xop0, XEXP (x, 1));
     }
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       /* We need to find and carefully transform any SYMBOL and LABEL
 	 references; so go back to the original address expression.  */
@@ -7820,7 +7820,7 @@ arm_legitimate_constant_p_1 (enum machine_mode mode, rtx x)
   if (TARGET_NEON && VALID_NEON_STRUCT_MODE (mode))
     return false;
 
-  return flag_pic || !label_mentioned_p (x);
+  return GCC_OPTION (flag_pic) || !label_mentioned_p (x);
 }
 
 static bool
@@ -7829,7 +7829,7 @@ thumb_legitimate_constant_p (enum machine_mode mode ATTRIBUTE_UNUSED, rtx x)
   return (CONST_INT_P (x)
 	  || CONST_DOUBLE_P (x)
 	  || CONSTANT_ADDRESS_P (x)
-	  || flag_pic);
+	  || GCC_OPTION (flag_pic));
 }
 
 static bool
@@ -8758,7 +8758,7 @@ arm_size_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code,
 	 a single register, otherwise it costs one insn per word.  */
       if (REG_P (XEXP (x, 0)))
 	*total = COSTS_N_INSNS (1);
-      else if (flag_pic
+      else if (GCC_OPTION (flag_pic)
 	       && GET_CODE (XEXP (x, 0)) == PLUS
 	       && will_be_in_index_register (XEXP (XEXP (x, 0), 1)))
 	/* This will be split into two instructions.
@@ -9161,7 +9161,7 @@ arm_new_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code,
 	 a single register, otherwise it costs one insn per word.  */
       if (REG_P (XEXP (x, 0)))
 	*cost = COSTS_N_INSNS (1);
-      else if (flag_pic
+      else if (GCC_OPTION (flag_pic)
 	       && GET_CODE (XEXP (x, 0)) == PLUS
 	       && will_be_in_index_register (XEXP (XEXP (x, 0), 1)))
 	/* This will be split into two instructions.
@@ -10435,7 +10435,7 @@ arm_new_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code,
     case SYMBOL_REF:
       if (speed_p)
 	{
-	  if (arm_arch_thumb2 && !flag_pic)
+	  if (arm_arch_thumb2 && !GCC_OPTION (flag_pic))
 	    *cost = COSTS_N_INSNS (2);
 	  else
 	    *cost = COSTS_N_INSNS (1) + extra_cost->ldst.load;
@@ -10443,7 +10443,7 @@ arm_new_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code,
       else
 	*cost = COSTS_N_INSNS (2);
 
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	{
 	  *cost += COSTS_N_INSNS (1);
 	  if (speed_p)
@@ -11355,7 +11355,7 @@ arm_add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind,
   unsigned *cost = (unsigned *) data;
   unsigned retval = 0;
 
-  if (flag_vect_cost_model)
+  if (GCC_OPTION (flag_vect_cost_model))
     {
       tree vectype = stmt_info ? stmt_vectype (stmt_info) : NULL_TREE;
       int stmt_cost = arm_builtin_vectorization_cost (kind, vectype, misalign);
@@ -11617,7 +11617,7 @@ arm_default_branch_cost (bool speed_p, bool predictable_p ATTRIBUTE_UNUSED)
   if (TARGET_32BIT)
     return (TARGET_THUMB2 && !speed_p) ? 1 : 4;
   else
-    return (optimize > 0) ? 2 : 0;
+    return (GCC_OPTION (optimize) > 0) ? 2 : 0;
 }
 
 static int
@@ -12897,7 +12897,7 @@ adjacent_mem_locations (rtx a, rtx b)
 	  /* If the target has load delay slots, then there's no benefit
 	     to using an ldm instruction unless the offset is zero and
 	     we are optimizing for size.  */
-	  return (optimize_size && (REGNO (reg0) == REGNO (reg1))
+	  return (GCC_OPTION (optimize_size) && (REGNO (reg0) == REGNO (reg1))
 		  && (val0 == 0 || val1 == 0 || val0 == 4 || val1 == 4)
 		  && (val_diff == 4 || val_diff == -4));
 	}
@@ -13151,7 +13151,7 @@ multiple_operation_profitable_p (bool is_store ATTRIBUTE_UNUSED,
 
      As a compromise, we use ldr for counts of 1 or 2 regs, and ldm
      for counts of 3 or 4 regs.  */
-  if (nops <= 2 && arm_tune_xscale && !optimize_size)
+  if (nops <= 2 && arm_tune_xscale && !GCC_OPTION (optimize_size))
     return false;
   return true;
 }
@@ -14198,7 +14198,7 @@ arm_movmemqi_unaligned (rtx *operands)
 {
   HOST_WIDE_INT length = INTVAL (operands[2]);
   
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     {
       bool src_aligned = MEM_ALIGN (operands[1]) >= BITS_PER_WORD;
       bool dst_aligned = MEM_ALIGN (operands[0]) >= BITS_PER_WORD;
@@ -14245,7 +14245,7 @@ arm_gen_movmemqi (rtx *operands)
       || INTVAL (operands[2]) > 64)
     return 0;
 
-  if (unaligned_access && (INTVAL (operands[3]) & 3) != 0)
+  if (GCC_OPTION (unaligned_access) && (INTVAL (operands[3]) & 3) != 0)
     return arm_movmemqi_unaligned (operands);
 
   if (INTVAL (operands[3]) & 3)
@@ -14414,7 +14414,7 @@ gen_movmem_ldrd_strd (rtx *operands)
   /* Maximum alignment we can assume for both src and dst buffers.  */
   align = INTVAL (operands[3]);
 
-  if ((!unaligned_access) && (len >= 4) && ((align & 3) != 0))
+  if ((!GCC_OPTION (unaligned_access)) && (len >= 4) && ((align & 3) != 0))
     return false;
 
   /* Place src and dst addresses in registers
@@ -14431,7 +14431,7 @@ gen_movmem_ldrd_strd (rtx *operands)
   base = copy_to_mode_reg (SImode, XEXP (src, 0));
   src = adjust_automodify_address (src, VOIDmode, base, 0);
 
-  if (!unaligned_access && !(src_aligned && dst_aligned))
+  if (!GCC_OPTION (unaligned_access) && !(src_aligned && dst_aligned))
     return false;
 
   if (src_volatile || dst_volatile)
@@ -15300,7 +15300,7 @@ operands_ok_ldrd_strd (rtx rt, rtx rt2, rtx rn, HOST_WIDE_INT offset,
           || (!load && (n == PC_REGNUM))
           || (load && (t == t2))
           /* Triggers Cortex-M3 LDRD errata.  */
-          || (!wback && load && fix_cm3_ldrd && (n == t))))
+          || (!wback && load && GCC_OPTION (fix_cm3_ldrd) && (n == t))))
     return false;
 
   if ((TARGET_ARM)
@@ -16535,7 +16535,7 @@ arm_max_const_double_inline_cost ()
   if (arm_disable_literal_pool)
     return 99;
 
-  return ((optimize_size || arm_ld_sched) ? 3 : 4);
+  return ((GCC_OPTION (optimize_size) || arm_ld_sched) ? 3 : 4);
 }
 
 /* Return the cost of synthesizing a 64-bit constant VAL inline.
@@ -16576,7 +16576,7 @@ arm_const_double_by_parts (rtx val)
   enum machine_mode mode = GET_MODE (val);
   rtx part;
 
-  if (optimize_size || arm_ld_sched)
+  if (GCC_OPTION (optimize_size) || arm_ld_sched)
     return true;
 
   if (mode == VOIDmode)
@@ -16867,7 +16867,7 @@ thumb2_reorg (void)
 			 known implementations.  We do not even want to use
 			 MULS in cold code, if optimizing for speed, so we
 			 test the global flag here.  */
-		      if (!optimize_size)
+		      if (!GCC_OPTION (optimize_size))
 			break;
 		      /* else fall through.  */
 		    case AND:
@@ -16982,7 +16982,7 @@ arm_reorg (void)
      Otherwise, the pool placement code below may compute incorrect
      insn lengths.  Note that when optimizing, all insns have already
      been split at this point.  */
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     split_all_insns_noflow ();
 
   minipool_fix_head = minipool_fix_tail = NULL;
@@ -17374,7 +17374,7 @@ arm_emit_call_insn (rtx pat, rtx addr)
      If the call might use such an entry, add a use of the PIC register
      to the instruction's CALL_INSN_FUNCTION_USAGE.  */
   if (TARGET_VXWORKS_RTP
-      && flag_pic
+      && GCC_OPTION (flag_pic)
       && GET_CODE (addr) == SYMBOL_REF
       && (SYMBOL_REF_DECL (addr)
 	  ? !targetm.binds_local_p (SYMBOL_REF_DECL (addr))
@@ -17531,7 +17531,7 @@ output_move_double (rtx *operands, bool emit, int *count)
 	  if (emit)
 	    {
 	      if (TARGET_LDRD
-		  && !(fix_cm3_ldrd && reg0 == REGNO(XEXP (operands[1], 0))))
+		  && !(GCC_OPTION (fix_cm3_ldrd) && reg0 == REGNO(XEXP (operands[1], 0))))
 		output_asm_insn ("ldr%(d%)\t%0, [%m1]", operands);
 	      else
 		output_asm_insn ("ldm%(ia%)\t%m1, %M0", operands);
@@ -17723,7 +17723,7 @@ output_move_double (rtx *operands, bool emit, int *count)
 		      /* If both registers conflict, it will usually
 			 have been fixed by a splitter.  */
 		      if (reg_overlap_mentioned_p (operands[0], otherops[2])
-			  || (fix_cm3_ldrd && reg0 == REGNO (otherops[1])))
+			  || (GCC_OPTION (fix_cm3_ldrd) && reg0 == REGNO (otherops[1])))
 			{
 			  if (emit)
 			    {
@@ -18632,8 +18632,8 @@ arm_compute_save_reg0_reg12_mask (void)
 	  save_reg_mask |= (1 << reg);
 
       /* Also save the pic base register if necessary.  */
-      if (flag_pic
-	  && !TARGET_SINGLE_PIC_BASE
+      if (GCC_OPTION (flag_pic)
+	  && !GCC_OPTION (TARGET_SINGLE_PIC_BASE)
 	  && arm_pic_register != INVALID_REGNUM
 	  && crtl->uses_pic_offset_table)
 	save_reg_mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
@@ -18666,8 +18666,8 @@ arm_compute_save_reg0_reg12_mask (void)
 
       /* If we aren't loading the PIC register,
 	 don't stack it even though it may be live.  */
-      if (flag_pic
-	  && !TARGET_SINGLE_PIC_BASE
+      if (GCC_OPTION (flag_pic)
+	  && !GCC_OPTION (TARGET_SINGLE_PIC_BASE)
 	  && arm_pic_register != INVALID_REGNUM
 	  && (df_regs_ever_live_p (PIC_OFFSET_TABLE_REGNUM)
 	      || crtl->uses_pic_offset_table))
@@ -18760,7 +18760,7 @@ arm_compute_save_reg_mask (void)
      if we know that we will not need a fancy return sequence.  */
   if (df_regs_ever_live_p (LR_REGNUM)
       || (save_reg_mask
-	  && optimize_size
+	  && GCC_OPTION (optimize_size)
 	  && ARM_FUNC_TYPE (func_type) == ARM_FT_NORMAL
 	  && !crtl->calls_eh_return))
     save_reg_mask |= 1 << LR_REGNUM;
@@ -18798,7 +18798,7 @@ arm_compute_save_reg_mask (void)
 
   /* We may need to push an additional register for use initializing the
      PIC base register.  */
-  if (TARGET_THUMB2 && IS_NESTED (func_type) && flag_pic
+  if (TARGET_THUMB2 && IS_NESTED (func_type) && GCC_OPTION (flag_pic)
       && (save_reg_mask & THUMB2_WORK_REGS) == 0)
     {
       reg = thumb_find_work_register (1 << 4);
@@ -18823,8 +18823,8 @@ thumb1_compute_save_reg_mask (void)
     if (df_regs_ever_live_p (reg) && !call_used_regs[reg])
       mask |= 1 << reg;
 
-  if (flag_pic
-      && !TARGET_SINGLE_PIC_BASE
+  if (GCC_OPTION (flag_pic)
+      && !GCC_OPTION (TARGET_SINGLE_PIC_BASE)
       && arm_pic_register != INVALID_REGNUM
       && crtl->uses_pic_offset_table)
     mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
@@ -20856,7 +20856,7 @@ arm_expand_prologue (void)
       unsigned long dwarf_regs_mask = live_regs_mask;
 
       saved_regs += bit_count (live_regs_mask) * 4;
-      if (optimize_size && !frame_pointer_needed
+      if (GCC_OPTION (optimize_size) && !frame_pointer_needed
 	  && saved_regs == offsets->saved_regs - offsets->saved_args)
 	{
 	  /* If no coprocessor registers are being pushed and we don't have
@@ -20937,7 +20937,7 @@ arm_expand_prologue (void)
 	}
     }
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size
       = offsets->outgoing_args - offsets->saved_args;
 
@@ -20971,7 +20971,7 @@ arm_expand_prologue (void)
   if (frame_pointer_needed && TARGET_THUMB2)
     thumb_set_frame_pointer (offsets);
 
-  if (flag_pic && arm_pic_register != INVALID_REGNUM)
+  if (GCC_OPTION (flag_pic) && arm_pic_register != INVALID_REGNUM)
     {
       unsigned long mask;
 
@@ -20987,7 +20987,7 @@ arm_expand_prologue (void)
      scheduling in the prolog.  Similarly if we want non-call exceptions
      using the EABI unwinder, to prevent faulting instructions from being
      swapped with a stack adjustment.  */
-  if (crtl->profile || !TARGET_SCHED_PROLOG
+  if (crtl->profile || !GCC_OPTION (TARGET_SCHED_PROLOG)
       || (arm_except_unwind_info (&global_options) == UI_TARGET
 	  && cfun->can_throw_non_call_exceptions))
     emit_insn (gen_blockage ());
@@ -21858,12 +21858,12 @@ arm_assemble_integer (rtx x, unsigned int size, int aligned_p)
 
       /* Mark symbols as position independent.  We only do this in the
 	 .text segment, not in the .data segment.  */
-      if (NEED_GOT_RELOC && flag_pic && making_const_table &&
+      if (NEED_GOT_RELOC && GCC_OPTION (flag_pic) && making_const_table &&
 	  (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF))
 	{
 	  /* See legitimize_pic_address for an explanation of the
 	     TARGET_VXWORKS_RTP check.  */
-	  if (!arm_pic_data_is_text_relative
+	  if (!GCC_OPTION (arm_pic_data_is_text_relative)
 	      || (GET_CODE (x) == SYMBOL_REF && !SYMBOL_REF_LOCAL_P (x)))
 	    fputs ("(GOT)", asm_out_file);
 	  else
@@ -22453,7 +22453,7 @@ arm_final_prescan_insn (rtx insn)
 		 StrongARM), but still allow this if optimizing for size.  */
 	      else if (GET_CODE (scanbody) == return_code
 		       && !use_return_insn (TRUE, NULL)
-		       && !optimize_size)
+		       && !GCC_OPTION (optimize_size))
 		fail = TRUE;
 	      else if (GET_CODE (scanbody) == return_code)
 	        {
@@ -24519,7 +24519,7 @@ arm_init_builtins (void)
   if (TARGET_NEON)
     arm_init_neon_builtins ();
 
-  if (arm_fp16_format)
+  if (GCC_OPTION (arm_fp16_format))
     arm_init_fp16_builtins ();
 
   if (TARGET_CRC32)
@@ -24594,7 +24594,7 @@ static bool
 arm_scalar_mode_supported_p (enum machine_mode mode)
 {
   if (mode == HFmode)
-    return (arm_fp16_format != ARM_FP16_FORMAT_NONE);
+    return (GCC_OPTION (arm_fp16_format) != ARM_FP16_FORMAT_NONE);
   else if (ALL_FIXED_POINT_MODE_P (mode))
     return true;
   else
@@ -26153,7 +26153,7 @@ thumb_exit (FILE *f, int reg_containing_return_addr)
 void
 thumb1_final_prescan_insn (rtx insn)
 {
-  if (flag_print_asm_name)
+  if (GCC_OPTION (flag_print_asm_name))
     asm_fprintf (asm_out_file, "%@ 0x%04x\n",
 		 INSN_ADDRESSES (INSN_UID (insn)));
   /* Don't overwrite the previous setter when we get to a cbranch.  */
@@ -26349,7 +26349,7 @@ thumb1_extra_regs_pushed (arm_stack_offsets *offsets, bool for_prologue)
   /* If the stack frame size is 512 exactly, we can save one load
      instruction, which should make this a win even when optimizing
      for speed.  */
-  if (!optimize_size && amount != 512)
+  if (!GCC_OPTION (optimize_size) && amount != 512)
     return 0;
 
   /* Can't do this if there are high registers to push.  */
@@ -26370,7 +26370,7 @@ thumb1_extra_regs_pushed (arm_stack_offsets *offsets, bool for_prologue)
   /* Don't do this if thumb_expand_prologue wants to emit instructions
      between the push and the stack frame allocation.  */
   if (for_prologue
-      && ((flag_pic && arm_pic_register != INVALID_REGNUM)
+      && ((GCC_OPTION (flag_pic) && arm_pic_register != INVALID_REGNUM)
 	  || (!frame_pointer_needed && CALLER_INTERWORKING_SLOT_SIZE > 0)))
     return 0;
 
@@ -26899,14 +26899,14 @@ thumb1_expand_prologue (void)
 
   /* Load the pic register before setting the frame pointer,
      so we can use r7 as a temporary work register.  */
-  if (flag_pic && arm_pic_register != INVALID_REGNUM)
+  if (GCC_OPTION (flag_pic) && arm_pic_register != INVALID_REGNUM)
     arm_load_pic_register (live_regs_mask);
 
   if (!frame_pointer_needed && CALLER_INTERWORKING_SLOT_SIZE > 0)
     emit_move_insn (gen_rtx_REG (Pmode, ARM_HARD_FRAME_POINTER_REGNUM),
 		    stack_pointer_rtx);
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size
       = offsets->outgoing_args - offsets->saved_args;
 
@@ -26967,7 +26967,7 @@ thumb1_expand_prologue (void)
      scheduling in the prolog.  Similarly if we want non-call exceptions
      using the EABI unwinder, to prevent faulting instructions from being
      swapped with a stack adjustment.  */
-  if (crtl->profile || !TARGET_SCHED_PROLOG
+  if (crtl->profile || !GCC_OPTION (TARGET_SCHED_PROLOG)
       || (arm_except_unwind_info (&global_options) == UI_TARGET
 	  && cfun->can_throw_non_call_exceptions))
     emit_insn (gen_blockage ());
@@ -27067,7 +27067,7 @@ thumb1_expand_epilogue (void)
      the stack adjustment will not be deleted.  */
   emit_insn (gen_force_register_use (stack_pointer_rtx));
 
-  if (crtl->profile || !TARGET_SCHED_PROLOG)
+  if (crtl->profile || !GCC_OPTION (TARGET_SCHED_PROLOG))
     emit_insn (gen_blockage ());
 
   /* Emit a clobber for each insn that will be restored in the epilogue,
@@ -27887,7 +27887,7 @@ void
 arm_emit_eabi_attribute (const char *name, int num, int val)
 {
   asm_fprintf (asm_out_file, "\t.eabi_attribute %d, %d", num, val);
-  if (flag_verbose_asm || flag_debug_asm)
+  if (GCC_OPTION (flag_verbose_asm) || GCC_OPTION (flag_debug_asm))
     asm_fprintf (asm_out_file, "\t%s %s", ASM_COMMENT_START, name);
   asm_fprintf (asm_out_file, "\n");
 }
@@ -27964,42 +27964,42 @@ arm_file_start (void)
          are used.  However we don't have any easy way of figuring this out.
 	 Conservatively record the setting that would have been used.  */
 
-      if (flag_rounding_math)
+      if (GCC_OPTION (flag_rounding_math))
 	arm_emit_eabi_attribute ("Tag_ABI_FP_rounding", 19, 1);
 
-      if (!flag_unsafe_math_optimizations)
+      if (!GCC_OPTION (flag_unsafe_math_optimizations))
 	{
 	  arm_emit_eabi_attribute ("Tag_ABI_FP_denormal", 20, 1);
 	  arm_emit_eabi_attribute ("Tag_ABI_FP_exceptions", 21, 1);
 	}
-      if (flag_signaling_nans)
+      if (GCC_OPTION (flag_signaling_nans))
 	arm_emit_eabi_attribute ("Tag_ABI_FP_user_exceptions", 22, 1);
 
       arm_emit_eabi_attribute ("Tag_ABI_FP_number_model", 23,
-			   flag_finite_math_only ? 1 : 3);
+			   GCC_OPTION (flag_finite_math_only) ? 1 : 3);
 
       arm_emit_eabi_attribute ("Tag_ABI_align8_needed", 24, 1);
       arm_emit_eabi_attribute ("Tag_ABI_align8_preserved", 25, 1);
       arm_emit_eabi_attribute ("Tag_ABI_enum_size", 26,
-			       flag_short_enums ? 1 : 2);
+			       GCC_OPTION (flag_short_enums) ? 1 : 2);
 
       /* Tag_ABI_optimization_goals.  */
-      if (optimize_size)
+      if (GCC_OPTION (optimize_size))
 	val = 4;
-      else if (optimize >= 2)
+      else if (GCC_OPTION (optimize) >= 2)
 	val = 2;
-      else if (optimize)
+      else if (GCC_OPTION (optimize))
 	val = 1;
       else
 	val = 6;
       arm_emit_eabi_attribute ("Tag_ABI_optimization_goals", 30, val);
 
       arm_emit_eabi_attribute ("Tag_CPU_unaligned_access", 34,
-			       unaligned_access);
+			       GCC_OPTION (unaligned_access));
 
-      if (arm_fp16_format)
+      if (GCC_OPTION (arm_fp16_format))
 	arm_emit_eabi_attribute ("Tag_ABI_FP_16bit_format", 38,
-			     (int) arm_fp16_format);
+			     (int) GCC_OPTION (arm_fp16_format));
 
       if (arm_lang_output_object_attributes_hook)
 	arm_lang_output_object_attributes_hook();
@@ -28047,7 +28047,7 @@ arm_file_end (void)
 static void
 arm_encode_section_info (tree decl, rtx rtl, int first)
 {
-  if (optimize > 0 && TREE_CONSTANT (decl))
+  if (GCC_OPTION (optimize) > 0 && TREE_CONSTANT (decl))
     SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1;
 
   default_encode_section_info (decl, rtl, first);
@@ -28105,7 +28105,7 @@ arm_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
 	}
       assemble_name (file, label);
       fputc ('\n', file);
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	{
 	  /* If we are generating PIC, the ldr instruction below loads
 	     "(target - 7) - .LTHUNKPCn" into r12.  The pc reads as
@@ -28177,7 +28177,7 @@ arm_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
       ASM_OUTPUT_ALIGN (file, 2);
       assemble_name (file, label);
       fputs (":\n", file);
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	{
 	  /* Output ".word .LTHUNKn-7-.LTHUNKPCn".  */
 	  rtx tem = XEXP (DECL_RTL (function), 0);
@@ -28340,7 +28340,7 @@ arm_promote_function_mode (const_tree type ATTRIBUTE_UNUSED,
 static bool
 arm_default_short_enums (void)
 {
-  return TARGET_AAPCS_BASED && arm_abi != ARM_ABI_AAPCS_LINUX;
+  return TARGET_AAPCS_BASED && GCC_OPTION (arm_abi) != ARM_ABI_AAPCS_LINUX;
 }
 
 
@@ -28782,7 +28782,7 @@ arm_unwind_emit_sequence (FILE * asm_out_file, rtx p)
       e = XEXP (SET_DEST (e), 0);
       if (GET_CODE (e) == PLUS)
 	padfirst = INTVAL (XEXP (e, 1));
-      gcc_assert (padfirst == 0 || optimize_size);
+      gcc_assert (padfirst == 0 || GCC_OPTION (optimize_size));
       /* The function prologue may also push pc, but not annotate it as it is
 	 never restored.  We turn this into a stack pointer adjustment.  */
       e = XVECEXP (p, 0, nregs);
@@ -28954,7 +28954,7 @@ arm_unwind_emit (FILE * asm_out_file, rtx insn)
   if (arm_except_unwind_info (&global_options) != UI_TARGET)
     return;
 
-  if (!(flag_unwind_tables || crtl->uses_eh_lsda)
+  if (!(GCC_OPTION (flag_unwind_tables) || crtl->uses_eh_lsda)
       && (TREE_NOTHROW (current_function_decl)
 	  || crtl->all_throwers_are_sibcalls))
     return;
@@ -29088,7 +29088,7 @@ arm_output_fn_unwind (FILE * f, bool prologue)
       /* If this function will never be unwound, then mark it as such.
          The came condition is used in arm_unwind_emit to suppress
 	 the frame annotations.  */
-      if (!(flag_unwind_tables || crtl->uses_eh_lsda)
+      if (!(GCC_OPTION (flag_unwind_tables) || crtl->uses_eh_lsda)
 	  && (TREE_NOTHROW (current_function_decl)
 	      || crtl->all_throwers_are_sibcalls))
 	fputs("\t.cantunwind\n", f);
@@ -29368,7 +29368,7 @@ thumb2_output_casesi (rtx *operands)
     case HImode:
       return "tbh\t[%|pc, %0, lsl #1]";
     case SImode:
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	{
 	  output_asm_insn ("adr\t%4, %l2", operands);
 	  output_asm_insn ("ldr\t%5, [%4, %0, lsl #2]", operands);
@@ -29542,7 +29542,7 @@ arm_builtin_vectorized_function (tree fndecl, tree type_out, tree type_in)
 
   if (TREE_CODE (type_out) != VECTOR_TYPE
       || TREE_CODE (type_in) != VECTOR_TYPE
-      || !(TARGET_NEON && TARGET_FPU_ARMV8 && flag_unsafe_math_optimizations))
+      || !(TARGET_NEON && TARGET_FPU_ARMV8 && GCC_OPTION (flag_unsafe_math_optimizations)))
     return NULL_TREE;
 
   out_mode = TYPE_MODE (TREE_TYPE (type_out));
@@ -29611,7 +29611,7 @@ arm_vector_alignment_reachable (const_tree type, bool is_packed)
 {
   /* Vectors which aren't in packed structures will not be less aligned than
      the natural alignment of their element type, so this is safe.  */
-  if (TARGET_NEON && !BYTES_BIG_ENDIAN && unaligned_access)
+  if (TARGET_NEON && !BYTES_BIG_ENDIAN && GCC_OPTION (unaligned_access))
     return !is_packed;
 
   return default_builtin_vector_alignment_reachable (type, is_packed);
@@ -29622,7 +29622,7 @@ arm_builtin_support_vector_misalignment (enum machine_mode mode,
 					 const_tree type, int misalignment,
 					 bool is_packed)
 {
-  if (TARGET_NEON && !BYTES_BIG_ENDIAN && unaligned_access)
+  if (TARGET_NEON && !BYTES_BIG_ENDIAN && GCC_OPTION (unaligned_access))
     {
       HOST_WIDE_INT align = TYPE_ALIGN_UNIT (type);
 
@@ -29650,7 +29650,7 @@ arm_conditional_register_usage (void)
 {
   int regno;
 
-  if (TARGET_THUMB1 && optimize_size)
+  if (TARGET_THUMB1 && GCC_OPTION (optimize_size))
     {
       /* When optimizing for size on Thumb-1, it's better not
         to use the HI regs, because of the overhead of
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 7ca47a7..9d95b31 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -51,7 +51,7 @@ extern char arm_arch_name[];
            builtin_define ("__ARM_FEATURE_SAT");	\
         if (TARGET_CRYPTO)				\
 	   builtin_define ("__ARM_FEATURE_CRYPTO");	\
-	if (unaligned_access)				\
+	if (GCC_OPTION (unaligned_access))				\
 	  builtin_define ("__ARM_FEATURE_UNALIGNED");	\
 	if (TARGET_CRC32)				\
 	  builtin_define ("__ARM_FEATURE_CRC32");	\
@@ -68,7 +68,7 @@ extern char arm_arch_name[];
 								\
 	builtin_define_with_int_value (				\
 	  "__ARM_SIZEOF_MINIMAL_ENUM",				\
-	  flag_short_enums ? 1 : 4);				\
+	  GCC_OPTION (flag_short_enums) ? 1 : 4);				\
 	builtin_define_with_int_value (				\
 	  "__ARM_SIZEOF_WCHAR_T", WCHAR_TYPE_SIZE);		\
 	if (TARGET_ARM_ARCH_PROFILE)				\
@@ -118,9 +118,9 @@ extern char arm_arch_name[];
 	if (TARGET_ARM_FP)				\
 	  builtin_define_with_int_value (		\
 	    "__ARM_FP", TARGET_ARM_FP);			\
-	if (arm_fp16_format == ARM_FP16_FORMAT_IEEE)		\
+	if (GCC_OPTION (arm_fp16_format) == ARM_FP16_FORMAT_IEEE)		\
 	  builtin_define ("__ARM_FP16_FORMAT_IEEE");		\
-	if (arm_fp16_format == ARM_FP16_FORMAT_ALTERNATIVE)	\
+	if (GCC_OPTION (arm_fp16_format) == ARM_FP16_FORMAT_ALTERNATIVE)	\
 	  builtin_define ("__ARM_FP16_FORMAT_ALTERNATIVE");	\
         if (TARGET_FMA)					\
           builtin_define ("__ARM_FEATURE_FMA");		\
@@ -245,28 +245,28 @@ extern void (*arm_lang_output_object_attributes_hook)(void);
 #endif
 
 /* Run-time Target Specification.  */
-#define TARGET_SOFT_FLOAT		(arm_float_abi == ARM_FLOAT_ABI_SOFT)
+#define TARGET_SOFT_FLOAT		(GCC_OPTION (arm_float_abi) == ARM_FLOAT_ABI_SOFT)
 /* Use hardware floating point instructions. */
-#define TARGET_HARD_FLOAT		(arm_float_abi != ARM_FLOAT_ABI_SOFT)
+#define TARGET_HARD_FLOAT		(GCC_OPTION (arm_float_abi) != ARM_FLOAT_ABI_SOFT)
 /* Use hardware floating point calling convention.  */
-#define TARGET_HARD_FLOAT_ABI		(arm_float_abi == ARM_FLOAT_ABI_HARD)
+#define TARGET_HARD_FLOAT_ABI		(GCC_OPTION (arm_float_abi) == ARM_FLOAT_ABI_HARD)
 #define TARGET_VFP		(arm_fpu_desc->model == ARM_FP_MODEL_VFP)
 #define TARGET_IWMMXT			(arm_arch_iwmmxt)
 #define TARGET_IWMMXT2			(arm_arch_iwmmxt2)
 #define TARGET_REALLY_IWMMXT		(TARGET_IWMMXT && TARGET_32BIT)
 #define TARGET_REALLY_IWMMXT2		(TARGET_IWMMXT2 && TARGET_32BIT)
-#define TARGET_IWMMXT_ABI (TARGET_32BIT && arm_abi == ARM_ABI_IWMMXT)
+#define TARGET_IWMMXT_ABI (TARGET_32BIT && GCC_OPTION (arm_abi) == ARM_ABI_IWMMXT)
 #define TARGET_ARM                      (! TARGET_THUMB)
 #define TARGET_EITHER			1 /* (TARGET_ARM | TARGET_THUMB) */
 #define TARGET_BACKTRACE	        (leaf_function_p () \
 				         ? TARGET_TPCS_LEAF_FRAME \
 				         : TARGET_TPCS_FRAME)
 #define TARGET_AAPCS_BASED \
-    (arm_abi != ARM_ABI_APCS && arm_abi != ARM_ABI_ATPCS)
+    (GCC_OPTION (arm_abi) != ARM_ABI_APCS && GCC_OPTION (arm_abi) != ARM_ABI_ATPCS)
 
-#define TARGET_HARD_TP			(target_thread_pointer == TP_CP15)
-#define TARGET_SOFT_TP			(target_thread_pointer == TP_SOFT)
-#define TARGET_GNU2_TLS			(target_tls_dialect == TLS_GNU2)
+#define TARGET_HARD_TP			(GCC_OPTION (target_thread_pointer) == TP_CP15)
+#define TARGET_SOFT_TP			(GCC_OPTION (target_thread_pointer) == TP_SOFT)
+#define TARGET_GNU2_TLS			(GCC_OPTION (target_tls_dialect) == TLS_GNU2)
 
 /* Only 16-bit thumb code.  */
 #define TARGET_THUMB1			(TARGET_THUMB && !arm_arch_thumb2)
@@ -339,7 +339,7 @@ extern void (*arm_lang_output_object_attributes_hook)(void);
 #define TARGET_USE_MOVT \
   (arm_arch_thumb2 \
    && (arm_disable_literal_pool \
-       || (!optimize_size && !current_tune->prefer_constant_pool)))
+       || (!GCC_OPTION (optimize_size) && !current_tune->prefer_constant_pool)))
 
 /* We could use unified syntax for arm mode, but for now we just use it
    for Thumb-2.  */
@@ -438,7 +438,7 @@ extern int arm_fpu_attr;
 #endif
 
 #define LARGEST_EXPONENT_IS_NORMAL(bits) \
-    ((bits) == 16 && arm_fp16_format == ARM_FP16_FORMAT_ALTERNATIVE)
+    ((bits) == 16 && GCC_OPTION (arm_fp16_format) == ARM_FP16_FORMAT_ALTERNATIVE)
 
 #ifndef ARM_DEFAULT_ABI
 #define ARM_DEFAULT_ABI ARM_ABI_APCS
@@ -654,9 +654,9 @@ extern int arm_arch_crc;
 #define STACK_BOUNDARY  (ARM_DOUBLEWORD_ALIGN ? DOUBLEWORD_ALIGNMENT : 32)
 
 #define PREFERRED_STACK_BOUNDARY \
-    (arm_abi == ARM_ABI_ATPCS ? 64 : STACK_BOUNDARY)
+    (GCC_OPTION (arm_abi) == ARM_ABI_ATPCS ? 64 : STACK_BOUNDARY)
 
-#define FUNCTION_BOUNDARY  ((TARGET_THUMB && optimize_size) ? 16 : 32)
+#define FUNCTION_BOUNDARY  ((TARGET_THUMB && GCC_OPTION (optimize_size)) ? 16 : 32)
 
 /* The lowest bit is used to indicate Thumb-mode functions, so the
    vbit must go into the delta field of pointers to member
@@ -681,7 +681,7 @@ extern int arm_arch_crc;
 
 #define CONSTANT_ALIGNMENT(EXP, ALIGN)				\
    ((TREE_CODE (EXP) == STRING_CST				\
-     && !optimize_size						\
+     && !GCC_OPTION (optimize_size)						\
      && (ALIGN) < BITS_PER_WORD * CONSTANT_ALIGNMENT_FACTOR)	\
     ? BITS_PER_WORD * CONSTANT_ALIGNMENT_FACTOR : (ALIGN))
 
@@ -698,11 +698,11 @@ extern int arm_arch_crc;
 
 /* Align global data. */
 #define DATA_ALIGNMENT(EXP, ALIGN)			\
-  ARM_EXPAND_ALIGNMENT(!optimize_size, EXP, ALIGN)
+  ARM_EXPAND_ALIGNMENT(!GCC_OPTION (optimize_size), EXP, ALIGN)
 
 /* Similarly, make sure that objects on the stack are sensibly aligned.  */
 #define LOCAL_ALIGNMENT(EXP, ALIGN)				\
-  ARM_EXPAND_ALIGNMENT(!flag_conserve_stack, EXP, ALIGN)
+  ARM_EXPAND_ALIGNMENT(!GCC_OPTION (flag_conserve_stack), EXP, ALIGN)
 
 /* Setting STRUCTURE_SIZE_BOUNDARY to 32 produces more efficient code, but the
    value set in previous versions of this toolchain was 8, which produces more
@@ -711,7 +711,7 @@ extern int arm_arch_crc;
    however the value should be left at 32.  ARM SDT Reference Manual (ARM DUI
    0020D) page 2-20 says "Structures are aligned on word boundaries".
    The AAPCS specifies a value of 8.  */
-#define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary
+#define STRUCTURE_SIZE_BOUNDARY GCC_OPTION (arm_structure_size_boundary)
 
 /* This is the value used to initialize arm_structure_size_boundary.  If a
    particular arm target wants to change the default value it should change
@@ -1276,11 +1276,11 @@ enum reg_class
    when addressing quantities in QI or HI mode; if we don't know the
    mode, then we must be conservative.  */
 #define MODE_BASE_REG_CLASS(MODE)					\
-  (arm_lra_flag								\
+  (GCC_OPTION (arm_lra_flag)								\
    ? (TARGET_32BIT ? CORE_REGS						\
       : GET_MODE_SIZE (MODE) >= 4 ? BASE_REGS				\
       : LO_REGS)							\
-   : ((TARGET_ARM || (TARGET_THUMB2 && !optimize_size)) ? CORE_REGS	\
+   : ((TARGET_ARM || (TARGET_THUMB2 && !GCC_OPTION (optimize_size))) ? CORE_REGS	\
       : ((MODE) == SImode) ? BASE_REGS					\
       : LO_REGS))
 
@@ -1827,7 +1827,7 @@ enum arm_auto_incmodes
 #define CONSTANT_ADDRESS_P(X)  			\
   (GET_CODE (X) == SYMBOL_REF 			\
    && (CONSTANT_POOL_ADDRESS_P (X)		\
-       || (TARGET_ARM && optimize > 0 && SYMBOL_REF_FLAG (X))))
+       || (TARGET_ARM && GCC_OPTION (optimize) > 0 && SYMBOL_REF_FLAG (X))))
 
 /* True if SYMBOL + OFFSET constants must refer to something within
    SYMBOL's section.  */
@@ -1999,7 +1999,7 @@ enum arm_auto_incmodes
 
 #define CASE_VECTOR_PC_RELATIVE (TARGET_THUMB2				\
 				 || (TARGET_THUMB1			\
-				     && (optimize_size || flag_pic)))
+				     && (GCC_OPTION (optimize_size) || GCC_OPTION (flag_pic))))
 
 #define CASE_VECTOR_SHORTEN_MODE(min, max, body)			\
   (TARGET_THUMB1							\
@@ -2079,7 +2079,7 @@ enum arm_auto_incmodes
 
 /* False if short circuit operation is preferred.  */
 #define LOGICAL_OP_NON_SHORT_CIRCUIT				\
-  ((optimize_size)						\
+  ((GCC_OPTION (optimize_size))						\
    ? (TARGET_THUMB ? false : true)				\
    : (current_tune->logical_op_non_short_circuit[TARGET_ARM]))
 
@@ -2267,7 +2267,7 @@ extern int making_const_table;
    we're optimizing.  For Thumb-2 check if any IT instructions need
    outputting.  */
 #define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)	\
-  if (TARGET_ARM && optimize)				\
+  if (TARGET_ARM && GCC_OPTION (optimize))				\
     arm_final_prescan_insn (INSN);			\
   else if (TARGET_THUMB2)				\
     thumb2_final_prescan_insn (INSN);			\
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 2ddda02..7258e93 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -212,11 +212,11 @@
 
 	  (and (eq_attr "predicable_short_it" "no")
 	       (and (eq_attr "predicated" "yes")
-	            (match_test "arm_restrict_it")))
+	            (match_test "GCC_OPTION (arm_restrict_it)")))
 	  (const_string "no")
 
 	  (and (eq_attr "enabled_for_depr_it" "no")
-	       (match_test "arm_restrict_it"))
+	       (match_test "GCC_OPTION (arm_restrict_it)"))
 	  (const_string "no")
 
 	  (and (eq_attr "use_literal_pool" "yes")
@@ -645,7 +645,7 @@
     {
       arm_split_constant (PLUS, SImode, NULL_RTX,
 	                  INTVAL (operands[2]), operands[0], operands[1],
-			  optimize && can_create_pseudo_p ());
+			  GCC_OPTION (optimize) && can_create_pseudo_p ());
       DONE;
     }
   "
@@ -1346,7 +1346,7 @@
         {
           arm_split_constant (MINUS, SImode, NULL_RTX,
 	                      INTVAL (operands[1]), operands[0],
-	  		      operands[2], optimize && can_create_pseudo_p ());
+	  		      operands[2], GCC_OPTION (optimize) && can_create_pseudo_p ());
           DONE;
 	}
       else /* TARGET_THUMB1 */
@@ -1562,7 +1562,7 @@
 			 (const_int 0)))
    (set (match_operand:SI 0 "s_register_operand" "=r")
 	(mult:SI (match_dup 2) (match_dup 1)))]
-  "TARGET_ARM && arm_arch6 && optimize_size"
+  "TARGET_ARM && arm_arch6 && GCC_OPTION (optimize_size)"
   "mul%.\\t%0, %2, %1"
   [(set_attr "conds" "set")
    (set_attr "type" "muls")]
@@ -1588,7 +1588,7 @@
 			  (match_operand:SI 1 "s_register_operand" "r"))
 			 (const_int 0)))
    (clobber (match_scratch:SI 0 "=r"))]
-  "TARGET_ARM && arm_arch6 && optimize_size"
+  "TARGET_ARM && arm_arch6 && GCC_OPTION (optimize_size)"
   "mul%.\\t%0, %2, %1"
   [(set_attr "conds" "set")
    (set_attr "type" "muls")]
@@ -1649,7 +1649,7 @@
    (set (match_operand:SI 0 "s_register_operand" "=r")
 	(plus:SI (mult:SI (match_dup 2) (match_dup 1))
 		 (match_dup 3)))]
-  "TARGET_ARM && arm_arch6 && optimize_size"
+  "TARGET_ARM && arm_arch6 && GCC_OPTION (optimize_size)"
   "mla%.\\t%0, %2, %1, %3"
   [(set_attr "conds" "set")
    (set_attr "type" "mlas")]
@@ -1679,7 +1679,7 @@
 		  (match_operand:SI 3 "s_register_operand" "r"))
 	 (const_int 0)))
    (clobber (match_scratch:SI 0 "=r"))]
-  "TARGET_ARM && arm_arch6 && optimize_size"
+  "TARGET_ARM && arm_arch6 && GCC_OPTION (optimize_size)"
   "mla%.\\t%0, %2, %1, %3"
   [(set_attr "conds" "set")
    (set_attr "type" "mlas")]
@@ -2307,7 +2307,7 @@
 	    arm_split_constant (AND, SImode, NULL_RTX,
 				INTVAL (operands[2]), operands[0],
 				operands[1],
-				optimize && can_create_pseudo_p ());
+				GCC_OPTION (optimize) && can_create_pseudo_p ());
 
           DONE;
         }
@@ -2694,7 +2694,7 @@
 
     if (arm_arch_thumb2)
       {
-        if (unaligned_access && MEM_P (operands[0])
+        if (GCC_OPTION (unaligned_access) && MEM_P (operands[0])
 	    && s_register_operand (operands[3], GET_MODE (operands[3]))
 	    && (width == 16 || width == 32) && (start_bit % BITS_PER_UNIT) == 0)
 	  {
@@ -3142,7 +3142,7 @@
         {
           arm_split_constant (IOR, SImode, NULL_RTX,
 	                      INTVAL (operands[2]), operands[0], operands[1],
-			      optimize && can_create_pseudo_p ());
+			      GCC_OPTION (optimize) && can_create_pseudo_p ());
           DONE;
 	}
       else /* TARGET_THUMB1 */
@@ -3322,7 +3322,7 @@
         {
           arm_split_constant (XOR, SImode, NULL_RTX,
 	                      INTVAL (operands[2]), operands[0], operands[1],
-			      optimize && can_create_pseudo_p ());
+			      GCC_OPTION (optimize) && can_create_pseudo_p ());
           DONE;
 	}
       else /* TARGET_THUMB1 */
@@ -3757,7 +3757,7 @@
 	    (match_operand:SI 3 "arm_rhs_operand" "rI,rI")])
 	  (match_operand:SI 1 "s_register_operand" "0,?r")]))
    (clobber (reg:CC CC_REGNUM))]
-  "TARGET_32BIT && !arm_eliminable_register (operands[1]) && !arm_restrict_it"
+  "TARGET_32BIT && !arm_eliminable_register (operands[1]) && !GCC_OPTION (arm_restrict_it)"
   "*
   {
     enum rtx_code code = GET_CODE (operands[4]);
@@ -3803,7 +3803,7 @@
 	    (match_operand:SI 3 "arm_rhs_operand" "TsI,TsI")])))
    (clobber (reg:CC CC_REGNUM))]
   "TARGET_32BIT && !arm_eliminable_register (operands[1])
-   && !(arm_restrict_it && CONST_INT_P (operands[3]))"
+   && !(GCC_OPTION (arm_restrict_it) && CONST_INT_P (operands[3]))"
   "#"
   "TARGET_32BIT && !arm_eliminable_register (operands[1]) && reload_completed"
   [(set (reg:CC CC_REGNUM)
@@ -4309,7 +4309,7 @@
 	HOST_WIDE_INT width = INTVAL (operands[2]);
 	HOST_WIDE_INT bitpos = INTVAL (operands[3]);
 
-	if (unaligned_access && MEM_P (operands[1])
+	if (GCC_OPTION (unaligned_access) && MEM_P (operands[1])
 	    && (width == 16 || width == 32) && (bitpos % BITS_PER_UNIT) == 0)
 	  {
 	    rtx base_addr;
@@ -4394,7 +4394,7 @@
   HOST_WIDE_INT width = INTVAL (operands[2]);
   HOST_WIDE_INT bitpos = INTVAL (operands[3]);
 
-  if (unaligned_access && MEM_P (operands[1]) && (width == 16 || width == 32)
+  if (GCC_OPTION (unaligned_access) && MEM_P (operands[1]) && (width == 16 || width == 32)
       && (bitpos % BITS_PER_UNIT)  == 0)
     {
       rtx base_addr;
@@ -4460,7 +4460,7 @@
   [(set (match_operand:SI 0 "s_register_operand" "=l,r")
 	(unspec:SI [(match_operand:SI 1 "memory_operand" "Uw,m")]
 		   UNSPEC_UNALIGNED_LOAD))]
-  "unaligned_access && TARGET_32BIT"
+  "GCC_OPTION (unaligned_access) && TARGET_32BIT"
   "ldr%?\t%0, %1\t@ unaligned"
   [(set_attr "arch" "t2,any")
    (set_attr "length" "2,4")
@@ -4473,7 +4473,7 @@
 	(sign_extend:SI
 	  (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,m")]
 		     UNSPEC_UNALIGNED_LOAD)))]
-  "unaligned_access && TARGET_32BIT"
+  "GCC_OPTION (unaligned_access) && TARGET_32BIT"
   "ldr%(sh%)\t%0, %1\t@ unaligned"
   [(set_attr "arch" "t2,any")
    (set_attr "length" "2,4")
@@ -4486,7 +4486,7 @@
 	(zero_extend:SI
 	  (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,m")]
 		     UNSPEC_UNALIGNED_LOAD)))]
-  "unaligned_access && TARGET_32BIT"
+  "GCC_OPTION (unaligned_access) && TARGET_32BIT"
   "ldr%(h%)\t%0, %1\t@ unaligned"
   [(set_attr "arch" "t2,any")
    (set_attr "length" "2,4")
@@ -4498,7 +4498,7 @@
   [(set (match_operand:SI 0 "memory_operand" "=Uw,m")
 	(unspec:SI [(match_operand:SI 1 "s_register_operand" "l,r")]
 		   UNSPEC_UNALIGNED_STORE))]
-  "unaligned_access && TARGET_32BIT"
+  "GCC_OPTION (unaligned_access) && TARGET_32BIT"
   "str%?\t%1, %0\t@ unaligned"
   [(set_attr "arch" "t2,any")
    (set_attr "length" "2,4")
@@ -4510,7 +4510,7 @@
   [(set (match_operand:HI 0 "memory_operand" "=Uw,m")
 	(unspec:HI [(match_operand:HI 1 "s_register_operand" "l,r")]
 		   UNSPEC_UNALIGNED_STORE))]
-  "unaligned_access && TARGET_32BIT"
+  "GCC_OPTION (unaligned_access) && TARGET_32BIT"
   "str%(h%)\t%1, %0\t@ unaligned"
   [(set_attr "arch" "t2,any")
    (set_attr "length" "2,4")
@@ -4527,7 +4527,7 @@
   [(set (match_operand:DI 0 "s_register_operand" "=l,r")
 	(unspec:DI [(match_operand:DI 1 "memory_operand" "o,o")]
 		   UNSPEC_UNALIGNED_LOAD))]
-  "unaligned_access && TARGET_32BIT"
+  "GCC_OPTION (unaligned_access) && TARGET_32BIT"
   "#"
   "&& reload_completed"
   [(set (match_dup 0) (unspec:SI [(match_dup 1)] UNSPEC_UNALIGNED_LOAD))
@@ -4559,7 +4559,7 @@
   [(set (match_operand:DI 0 "memory_operand" "=o,o")
 	(unspec:DI [(match_operand:DI 1 "s_register_operand" "l,r")]
 		   UNSPEC_UNALIGNED_STORE))]
-  "unaligned_access && TARGET_32BIT"
+  "GCC_OPTION (unaligned_access) && TARGET_32BIT"
   "#"
   "&& reload_completed"
   [(set (match_dup 0) (unspec:SI [(match_dup 1)] UNSPEC_UNALIGNED_STORE))
@@ -6230,7 +6230,7 @@
         {
            arm_split_constant (SET, SImode, NULL_RTX,
 	                       INTVAL (operands[1]), operands[0], NULL_RTX,
-			       optimize && can_create_pseudo_p ());
+			       GCC_OPTION (optimize) && can_create_pseudo_p ());
           DONE;
         }
     }
@@ -6281,7 +6281,7 @@
         }
       operands[1] = tmp;
     }
-  else if (flag_pic
+  else if (GCC_OPTION (flag_pic)
 	   && (CONSTANT_P (operands[1])
 	       || symbol_mentioned_p (operands[1])
 	       || label_mentioned_p (operands[1])))
@@ -6393,7 +6393,7 @@
        (match_operand:SI 1 "general_operand" ""))]
   "TARGET_32BIT
    && TARGET_USE_MOVT && GET_CODE (operands[1]) == SYMBOL_REF
-   && !flag_pic && !target_word_relocations
+   && !GCC_OPTION (flag_pic) && !GCC_OPTION (target_word_relocations)
    && !arm_tls_referenced_p (operands[1])"
   [(clobber (const_int 0))]
 {
@@ -6494,7 +6494,7 @@
 	(mem:SI (plus:SI (match_operand:SI 1 "register_operand" "")
 			 (unspec:SI [(match_operand:SI 2 "" "")]
 				    UNSPEC_PIC_SYM))))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
 )
 
 ;; Split calculate_pic_address into pic_load_addr_* and a move.
@@ -6503,7 +6503,7 @@
 	(mem:SI (plus:SI (match_operand:SI 1 "register_operand" "")
 			 (unspec:SI [(match_operand:SI 2 "" "")]
 				    UNSPEC_PIC_SYM))))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   [(set (match_dup 3) (unspec:SI [(match_dup 2)] UNSPEC_PIC_SYM))
    (set (match_dup 0) (mem:SI (plus:SI (match_dup 1) (match_dup 3))))]
   "operands[3] = can_create_pseudo_p () ? gen_reg_rtx (SImode) : operands[0];"
@@ -6519,7 +6519,7 @@
 	(unspec:SI [(match_operand:SI 1 "" "mX,mX,mX") 
 		    (match_operand:SI 2 "" "")] 
 		    UNSPEC_PIC_UNIFIED))]
- "flag_pic"
+ "GCC_OPTION (flag_pic)"
  "#"
  "&& reload_completed"
  [(set (match_dup 0) (unspec:SI [(match_dup 1)] UNSPEC_PIC_SYM))
@@ -6540,7 +6540,7 @@
 (define_insn "pic_load_addr_32bit"
   [(set (match_operand:SI 0 "s_register_operand" "=r")
 	(unspec:SI [(match_operand:SI 1 "" "mX")] UNSPEC_PIC_SYM))]
-  "TARGET_32BIT && flag_pic"
+  "TARGET_32BIT && GCC_OPTION (flag_pic)"
   "ldr%?\\t%0, %1"
   [(set_attr "type" "load1")
    (set (attr "pool_range")
@@ -6556,7 +6556,7 @@
 (define_insn "pic_load_addr_thumb1"
   [(set (match_operand:SI 0 "s_register_operand" "=l")
 	(unspec:SI [(match_operand:SI 1 "" "mX")] UNSPEC_PIC_SYM))]
-  "TARGET_THUMB1 && flag_pic"
+  "TARGET_THUMB1 && GCC_OPTION (flag_pic)"
   "ldr\\t%0, %1"
   [(set_attr "type" "load1")
    (set (attr "pool_range") (const_int 1018))]
@@ -6636,14 +6636,14 @@
 	(mem:SI (plus:SI (match_operand:SI 1 "register_operand" "r")
 			 (unspec:SI [(match_operand:SI 2 "" "X")]
 				    UNSPEC_PIC_OFFSET))))]
-  "TARGET_VXWORKS_RTP && TARGET_ARM && flag_pic"
+  "TARGET_VXWORKS_RTP && TARGET_ARM && GCC_OPTION (flag_pic)"
   "ldr%?\\t%0, [%1,%2]"
   [(set_attr "type" "load1")]
 )
 
 (define_expand "builtin_setjmp_receiver"
   [(label_ref (match_operand 0 "" ""))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "
 {
   /* r3 is clobbered by set/longjmp, so we can use it as a scratch
@@ -6841,7 +6841,7 @@
 	      emit_insn (gen_movsi (reg, GEN_INT (val)));
 	      operands[1] = gen_lowpart (HImode, reg);
 	    }
-	  else if (arm_arch4 && optimize && can_create_pseudo_p ()
+	  else if (arm_arch4 && GCC_OPTION (optimize) && can_create_pseudo_p ()
 		   && MEM_P (operands[1]))
 	    {
 	      rtx reg = gen_reg_rtx (SImode);
@@ -6952,7 +6952,7 @@
 	      = replace_equiv_address (operands[1],
 				       copy_to_reg (XEXP (operands[1], 0)));
 
-	  if (MEM_P (operands[1]) && optimize > 0)
+	  if (MEM_P (operands[1]) && GCC_OPTION (optimize) > 0)
 	    {
 	      rtx reg = gen_reg_rtx (SImode);
 
@@ -7197,7 +7197,7 @@
 					copy_to_reg (XEXP (operands[1], 0)));
 	}
 
-      if (MEM_P (operands[1]) && optimize > 0)
+      if (MEM_P (operands[1]) && GCC_OPTION (optimize) > 0)
 	{
 	  rtx reg = gen_reg_rtx (SImode);
 
@@ -7291,7 +7291,7 @@
 (define_insn "*arm32_movhf"
   [(set (match_operand:HF 0 "nonimmediate_operand" "=r,m,r,r")
 	(match_operand:HF 1 "general_operand"	   " m,r,r,F"))]
-  "TARGET_32BIT && !(TARGET_HARD_FLOAT && TARGET_FP16) && !arm_restrict_it
+  "TARGET_32BIT && !(TARGET_HARD_FLOAT && TARGET_FP16) && !GCC_OPTION (arm_restrict_it)
    && (	  s_register_operand (operands[0], HFmode)
        || s_register_operand (operands[1], HFmode))"
   "*
@@ -9773,7 +9773,7 @@
    (match_operand:SI 2 "const_int_operand" "")	; total range
    (match_operand:SI 3 "" "")			; table label
    (match_operand:SI 4 "" "")]			; Out of range label
-  "TARGET_32BIT || optimize_size || flag_pic"
+  "TARGET_32BIT || GCC_OPTION (optimize_size) || GCC_OPTION (flag_pic)"
   "
   {
     enum insn_code code;
@@ -9791,7 +9791,7 @@
       code = CODE_FOR_arm_casesi_internal;
     else if (TARGET_THUMB1)
       code = CODE_FOR_thumb1_casesi_internal_pic;
-    else if (flag_pic)
+    else if (GCC_OPTION (flag_pic))
       code = CODE_FOR_thumb2_casesi_internal_pic;
     else
       code = CODE_FOR_thumb2_casesi_internal;
@@ -9819,7 +9819,7 @@
 	      (use (label_ref (match_dup 2)))])]
   "TARGET_ARM"
   "*
-    if (flag_pic)
+    if (GCC_OPTION (flag_pic))
       return \"cmp\\t%0, %1\;addls\\t%|pc, %|pc, %0, asl #2\;b\\t%l3\";
     return   \"cmp\\t%0, %1\;ldrls\\t%|pc, [%|pc, %0, asl #2]\;b\\t%l3\";
   "
@@ -12437,7 +12437,7 @@
 	      (use (label_ref (match_operand 1 "" "")))])]
   "TARGET_THUMB1"
   "
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       /* Hopefully, CSE will eliminate this copy.  */
       rtx reg1 = copy_addr_to_reg (gen_rtx_LABEL_REF (Pmode, operands[1]));
@@ -12712,7 +12712,7 @@
 (define_expand "bswapsi2"
   [(set (match_operand:SI 0 "s_register_operand" "=r")
   	(bswap:SI (match_operand:SI 1 "s_register_operand" "r")))]
-"TARGET_EITHER && (arm_arch6 || !optimize_size)"
+"TARGET_EITHER && (arm_arch6 || !GCC_OPTION (optimize_size))"
 "
     if (!arm_arch6)
       {
diff --git a/gcc/config/arm/coff.h b/gcc/config/arm/coff.h
index 7deb238..d0ac6f1 100644
--- a/gcc/config/arm/coff.h
+++ b/gcc/config/arm/coff.h
@@ -58,7 +58,7 @@
    the code more efficient, but for Thumb-1 it's better to put them out of
    band unless we are generating compressed tables.  */
 #define JUMP_TABLES_IN_TEXT_SECTION					\
-   (TARGET_32BIT || (TARGET_THUMB && (optimize_size || flag_pic)))
+   (TARGET_32BIT || (TARGET_THUMB && (GCC_OPTION (optimize_size) || GCC_OPTION (flag_pic))))
 
 #undef  READONLY_DATA_SECTION_ASM_OP
 #define READONLY_DATA_SECTION_ASM_OP	"\t.section .rdata"
diff --git a/gcc/config/arm/constraints.md b/gcc/config/arm/constraints.md
index 85dd116..c1ae05b 100644
--- a/gcc/config/arm/constraints.md
+++ b/gcc/config/arm/constraints.md
@@ -251,7 +251,7 @@
   if optimizing for space or when we have load-delay slots to fill."
  (and (match_code "const_double,const_int,const_vector")
       (match_test "TARGET_32BIT && arm_const_double_inline_cost (op) == 4
-		   && !(optimize_size || arm_ld_sched)")))
+		   && !(GCC_OPTION (optimize_size) || arm_ld_sched)")))
 
 (define_constraint "Dd"
  "@internal
@@ -340,8 +340,8 @@
   (and (match_code "const_double")
        (match_test "TARGET_32BIT && TARGET_VFP && vfp3_const_double_for_bits (op)")))
 
-(define_register_constraint "Ts" "(arm_restrict_it) ? LO_REGS : GENERAL_REGS"
- "For arm_restrict_it the core registers @code{r0}-@code{r7}.  GENERAL_REGS otherwise.")
+(define_register_constraint "Ts" "(GCC_OPTION (arm_restrict_it)) ? LO_REGS : GENERAL_REGS"
+ "For GCC_OPTION (arm_restrict_it) the core registers @code{r0}-@code{r7}.  GENERAL_REGS otherwise.")
 
 (define_memory_constraint "Ua"
  "@internal
diff --git a/gcc/config/arm/elf.h b/gcc/config/arm/elf.h
index 2ac8c8d..94febda 100644
--- a/gcc/config/arm/elf.h
+++ b/gcc/config/arm/elf.h
@@ -87,7 +87,7 @@
   do								\
     {								\
       ARM_OUTPUT_FN_UNWIND (FILE, FALSE);			\
-      if (!flag_inhibit_size_directive)				\
+      if (!GCC_OPTION (flag_inhibit_size_directive))				\
 	ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME);			\
     }								\
   while (0)
@@ -99,7 +99,7 @@
    the code more efficient, but for Thumb-1 it's better to put them out of
    band unless we are generating compressed tables.  */
 #define JUMP_TABLES_IN_TEXT_SECTION					\
-   (TARGET_32BIT || (TARGET_THUMB && (optimize_size || flag_pic)))
+   (TARGET_32BIT || (TARGET_THUMB && (GCC_OPTION (optimize_size) || GCC_OPTION (flag_pic))))
 
 #ifndef LINK_SPEC
 #define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
@@ -127,8 +127,8 @@
 #define TARGET_ASM_DESTRUCTOR arm_elf_asm_destructor
 
 /* For PIC code we need to explicitly specify (PLT) and (GOT) relocs.  */
-#define NEED_PLT_RELOC	flag_pic
-#define NEED_GOT_RELOC	flag_pic
+#define NEED_PLT_RELOC	GCC_OPTION (flag_pic)
+#define NEED_GOT_RELOC	GCC_OPTION (flag_pic)
 
 /* The ELF assembler handles GOT addressing differently to NetBSD.  */
 #define GOT_PCREL	0
diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md
index aad420c..b3bde9e 100644
--- a/gcc/config/arm/neon.md
+++ b/gcc/config/arm/neon.md
@@ -243,7 +243,7 @@
   [(set (match_operand:VDQX 0 "neon_perm_struct_or_reg_operand")
 	(unspec:VDQX [(match_operand:VDQX 1 "neon_perm_struct_or_reg_operand")]
 		     UNSPEC_MISALIGNED_ACCESS))]
-  "TARGET_NEON && !BYTES_BIG_ENDIAN && unaligned_access"
+  "TARGET_NEON && !BYTES_BIG_ENDIAN && GCC_OPTION (unaligned_access)"
 {
   rtx adjust_mem;
   /* This pattern is not permitted to fail during expansion: if both arguments
@@ -268,7 +268,7 @@
   [(set (match_operand:VDX 0 "neon_permissive_struct_operand"	"=Um")
 	(unspec:VDX [(match_operand:VDX 1 "s_register_operand" " w")]
 		    UNSPEC_MISALIGNED_ACCESS))]
-  "TARGET_NEON && !BYTES_BIG_ENDIAN && unaligned_access"
+  "TARGET_NEON && !BYTES_BIG_ENDIAN && GCC_OPTION (unaligned_access)"
   "vst1.<V_sz_elem>\t{%P1}, %A0"
   [(set_attr "type" "neon_store1_1reg<q>")])
 
@@ -277,7 +277,7 @@
 	(unspec:VDX [(match_operand:VDX 1 "neon_permissive_struct_operand"
 									" Um")]
 		    UNSPEC_MISALIGNED_ACCESS))]
-  "TARGET_NEON && !BYTES_BIG_ENDIAN && unaligned_access"
+  "TARGET_NEON && !BYTES_BIG_ENDIAN && GCC_OPTION (unaligned_access)"
   "vld1.<V_sz_elem>\t{%P0}, %A1"
   [(set_attr "type" "neon_load1_1reg<q>")])
 
@@ -285,7 +285,7 @@
   [(set (match_operand:VQX 0 "neon_permissive_struct_operand"  "=Um")
 	(unspec:VQX [(match_operand:VQX 1 "s_register_operand" " w")]
 		    UNSPEC_MISALIGNED_ACCESS))]
-  "TARGET_NEON && !BYTES_BIG_ENDIAN && unaligned_access"
+  "TARGET_NEON && !BYTES_BIG_ENDIAN && GCC_OPTION (unaligned_access)"
   "vst1.<V_sz_elem>\t{%q1}, %A0"
   [(set_attr "type" "neon_store1_1reg<q>")])
 
@@ -294,7 +294,7 @@
 	(unspec:VQX [(match_operand:VQX 1 "neon_permissive_struct_operand"
 									" Um")]
 		    UNSPEC_MISALIGNED_ACCESS))]
-  "TARGET_NEON && !BYTES_BIG_ENDIAN && unaligned_access"
+  "TARGET_NEON && !BYTES_BIG_ENDIAN && GCC_OPTION (unaligned_access)"
   "vld1.<V_sz_elem>\t{%q0}, %A1"
   [(set_attr "type" "neon_store1_1reg<q>")])
 
@@ -467,7 +467,7 @@
   [(set (match_operand:VDQ 0 "s_register_operand" "=w")
         (plus:VDQ (match_operand:VDQ 1 "s_register_operand" "w")
 		  (match_operand:VDQ 2 "s_register_operand" "w")))]
-  "TARGET_NEON && (!<Is_float_mode> || flag_unsafe_math_optimizations)"
+  "TARGET_NEON && (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))"
   "vadd.<V_if_elem>\t%<V_reg>0, %<V_reg>1, %<V_reg>2"
   [(set (attr "type")
       (if_then_else (match_test "<Is_float_mode>")
@@ -505,7 +505,7 @@
   [(set (match_operand:VDQ 0 "s_register_operand" "=w")
         (minus:VDQ (match_operand:VDQ 1 "s_register_operand" "w")
                    (match_operand:VDQ 2 "s_register_operand" "w")))]
-  "TARGET_NEON && (!<Is_float_mode> || flag_unsafe_math_optimizations)"
+  "TARGET_NEON && (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))"
   "vsub.<V_if_elem>\t%<V_reg>0, %<V_reg>1, %<V_reg>2"
   [(set (attr "type")
       (if_then_else (match_test "<Is_float_mode>")
@@ -540,7 +540,7 @@
   [(set (match_operand:VDQW 0 "s_register_operand" "=w")
         (mult:VDQW (match_operand:VDQW 1 "s_register_operand" "w")
                    (match_operand:VDQW 2 "s_register_operand" "w")))]
-  "TARGET_NEON && (!<Is_float_mode> || flag_unsafe_math_optimizations)"
+  "TARGET_NEON && (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))"
   "vmul.<V_if_elem>\t%<V_reg>0, %<V_reg>1, %<V_reg>2"
   [(set (attr "type")
       (if_then_else (match_test "<Is_float_mode>")
@@ -553,7 +553,7 @@
         (plus:VDQW (mult:VDQW (match_operand:VDQW 2 "s_register_operand" "w")
                             (match_operand:VDQW 3 "s_register_operand" "w"))
 		  (match_operand:VDQW 1 "s_register_operand" "0")))]
-  "TARGET_NEON && (!<Is_float_mode> || flag_unsafe_math_optimizations)"
+  "TARGET_NEON && (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))"
   "vmla.<V_if_elem>\t%<V_reg>0, %<V_reg>2, %<V_reg>3"
   [(set (attr "type")
       (if_then_else (match_test "<Is_float_mode>")
@@ -566,7 +566,7 @@
         (minus:VDQW (match_operand:VDQW 1 "s_register_operand" "0")
                     (mult:VDQW (match_operand:VDQW 2 "s_register_operand" "w")
                                (match_operand:VDQW 3 "s_register_operand" "w"))))]
-  "TARGET_NEON && (!<Is_float_mode> || flag_unsafe_math_optimizations)"
+  "TARGET_NEON && (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))"
   "vmls.<V_if_elem>\t%<V_reg>0, %<V_reg>2, %<V_reg>3"
   [(set (attr "type")
       (if_then_else (match_test "<Is_float_mode>")
@@ -584,7 +584,7 @@
         (fma:VCVTF (match_operand:VCVTF 1 "register_operand" "w")
 		 (match_operand:VCVTF 2 "register_operand" "w")
 		 (match_operand:VCVTF 3 "register_operand" "0")))]
-  "TARGET_NEON && TARGET_FMA && flag_unsafe_math_optimizations"
+  "TARGET_NEON && TARGET_FMA && GCC_OPTION (flag_unsafe_math_optimizations)"
   "vfma%?.<V_if_elem>\\t%<V_reg>0, %<V_reg>1, %<V_reg>2"
   [(set_attr "type" "neon_fp_mla_s<q>")]
 )
@@ -604,7 +604,7 @@
         (fma:VCVTF (neg:VCVTF (match_operand:VCVTF 1 "register_operand" "w"))
 		   (match_operand:VCVTF 2 "register_operand" "w")
 		   (match_operand:VCVTF 3 "register_operand" "0")))]
-  "TARGET_NEON && TARGET_FMA && flag_unsafe_math_optimizations"
+  "TARGET_NEON && TARGET_FMA && GCC_OPTION (flag_unsafe_math_optimizations)"
   "vfms%?.<V_if_elem>\\t%<V_reg>0, %<V_reg>1, %<V_reg>2"
   [(set_attr "type" "neon_fp_mla_s<q>")]
 )
@@ -1270,7 +1270,7 @@
                            (parallel [(const_int 0) (const_int 1)]))
           (vec_select:V2SF (match_dup 1)
                            (parallel [(const_int 2) (const_int 3)]))))]
-  "TARGET_NEON && flag_unsafe_math_optimizations"
+  "TARGET_NEON && GCC_OPTION (flag_unsafe_math_optimizations)"
   "<VQH_mnem>.f32\t%P0, %e1, %f1"
   [(set_attr "vqh_mnem" "<VQH_mnem>")
    (set_attr "type" "neon_fp_reduc_<VQH_type>_s_q")]
@@ -1337,7 +1337,7 @@
 (define_expand "reduc_splus_<mode>"
   [(match_operand:VD 0 "s_register_operand" "")
    (match_operand:VD 1 "s_register_operand" "")]
-  "TARGET_NEON && (!<Is_float_mode> || flag_unsafe_math_optimizations)"
+  "TARGET_NEON && (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))"
 {
   neon_pairwise_reduce (operands[0], operands[1], <MODE>mode,
 			&gen_neon_vpadd_internal<mode>);
@@ -1347,7 +1347,7 @@
 (define_expand "reduc_splus_<mode>"
   [(match_operand:VQ 0 "s_register_operand" "")
    (match_operand:VQ 1 "s_register_operand" "")]
-  "TARGET_NEON && (!<Is_float_mode> || flag_unsafe_math_optimizations)
+  "TARGET_NEON && (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))
    && !BYTES_BIG_ENDIAN"
 {
   rtx step1 = gen_reg_rtx (<V_HALF>mode);
@@ -1383,7 +1383,7 @@
 (define_expand "reduc_smin_<mode>"
   [(match_operand:VD 0 "s_register_operand" "")
    (match_operand:VD 1 "s_register_operand" "")]
-  "TARGET_NEON && (!<Is_float_mode> || flag_unsafe_math_optimizations)"
+  "TARGET_NEON && (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))"
 {
   neon_pairwise_reduce (operands[0], operands[1], <MODE>mode,
 			&gen_neon_vpsmin<mode>);
@@ -1393,7 +1393,7 @@
 (define_expand "reduc_smin_<mode>"
   [(match_operand:VQ 0 "s_register_operand" "")
    (match_operand:VQ 1 "s_register_operand" "")]
-  "TARGET_NEON && (!<Is_float_mode> || flag_unsafe_math_optimizations)
+  "TARGET_NEON && (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))
    && !BYTES_BIG_ENDIAN"
 {
   rtx step1 = gen_reg_rtx (<V_HALF>mode);
@@ -1409,7 +1409,7 @@
 (define_expand "reduc_smax_<mode>"
   [(match_operand:VD 0 "s_register_operand" "")
    (match_operand:VD 1 "s_register_operand" "")]
-  "TARGET_NEON && (!<Is_float_mode> || flag_unsafe_math_optimizations)"
+  "TARGET_NEON && (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))"
 {
   neon_pairwise_reduce (operands[0], operands[1], <MODE>mode,
 			&gen_neon_vpsmax<mode>);
@@ -1419,7 +1419,7 @@
 (define_expand "reduc_smax_<mode>"
   [(match_operand:VQ 0 "s_register_operand" "")
    (match_operand:VQ 1 "s_register_operand" "")]
-  "TARGET_NEON && (!<Is_float_mode> || flag_unsafe_math_optimizations)
+  "TARGET_NEON && (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))
    && !BYTES_BIG_ENDIAN"
 {
   rtx step1 = gen_reg_rtx (<V_HALF>mode);
@@ -1602,7 +1602,7 @@
 	     (match_operand:VDQW 5 "nonmemory_operand" "")])
 	  (match_operand:VDQW 1 "s_register_operand" "")
 	  (match_operand:VDQW 2 "s_register_operand" "")))]
-  "TARGET_NEON && (!<Is_float_mode> || flag_unsafe_math_optimizations)"
+  "TARGET_NEON && (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))"
 {
   HOST_WIDE_INT magic_word = (<MODE>mode == V2SFmode || <MODE>mode == V4SFmode)
 			     ? 3 : 1;
@@ -1848,7 +1848,7 @@
    (match_operand:SI 3 "immediate_operand" "i")]
   "TARGET_NEON"
 {
-  if (!<Is_float_mode> || flag_unsafe_math_optimizations)
+  if (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))
     emit_insn (gen_add<mode>3 (operands[0], operands[1], operands[2]));
   else
     emit_insn (gen_neon_vadd<mode>_unspec (operands[0], operands[1],
@@ -1966,7 +1966,7 @@
    (match_operand:SI 4 "immediate_operand" "i")]
   "TARGET_NEON"
 {
-  if (!<Is_float_mode> || flag_unsafe_math_optimizations)
+  if (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))
     emit_insn (gen_mul<mode>3add<mode>_neon (operands[0], operands[1],
 				             operands[2], operands[3]));
   else
@@ -2037,7 +2037,7 @@
    (match_operand:SI 4 "immediate_operand" "i")]
   "TARGET_NEON"
 {
-  if (!<Is_float_mode> || flag_unsafe_math_optimizations)
+  if (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))
     emit_insn (gen_mul<mode>3neg<mode>add<mode>_neon (operands[0],
 		 operands[1], operands[2], operands[3]));
   else
@@ -2138,7 +2138,7 @@
    (match_operand:SI 3 "immediate_operand" "i")]
   "TARGET_NEON"
 {
-  if (!<Is_float_mode> || flag_unsafe_math_optimizations)
+  if (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))
     emit_insn (gen_sub<mode>3 (operands[0], operands[1], operands[2]));
   else
     emit_insn (gen_neon_vsub<mode>_unspec (operands[0], operands[1],
@@ -3023,7 +3023,7 @@
 (define_insn "float<mode><V_cvtto>2"
   [(set (match_operand:<V_CVTTO> 0 "s_register_operand" "=w")
         (float:<V_CVTTO> (match_operand:VCVTI 1 "s_register_operand" "w")))]
-  "TARGET_NEON && !flag_rounding_math"
+  "TARGET_NEON && !GCC_OPTION (flag_rounding_math)"
   "vcvt.f32.s32\t%<V_reg>0, %<V_reg>1"
   [(set_attr "type" "neon_int_to_fp_<V_elem_ch><q>")]
 )
@@ -3031,7 +3031,7 @@
 (define_insn "floatuns<mode><V_cvtto>2"
   [(set (match_operand:<V_CVTTO> 0 "s_register_operand" "=w")
         (unsigned_float:<V_CVTTO> (match_operand:VCVTI 1 "s_register_operand" "w")))] 
-  "TARGET_NEON && !flag_rounding_math"
+  "TARGET_NEON && !GCC_OPTION (flag_rounding_math)"
   "vcvt.f32.u32\t%<V_reg>0, %<V_reg>1"
   [(set_attr "type" "neon_int_to_fp_<V_elem_ch><q>")]
 )
@@ -5724,7 +5724,7 @@
  [(set (match_operand:VDQ 0 "s_register_operand" "=w")
        (abs:VDQ (minus:VDQ (match_operand:VDQ 1 "s_register_operand" "w")
                            (match_operand:VDQ 2 "s_register_operand" "w"))))]
- "TARGET_NEON && (!<Is_float_mode> || flag_unsafe_math_optimizations)"
+ "TARGET_NEON && (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))"
  "vabd.<V_s_elem> %<V_reg>0, %<V_reg>1, %<V_reg>2"
  [(set (attr "type")
        (if_then_else (ne (symbol_ref "<Is_float_mode>") (const_int 0))
@@ -5737,7 +5737,7 @@
        (abs:VDQ (unspec:VDQ [(match_operand:VDQ 1 "s_register_operand" "w")
                              (match_operand:VDQ 2 "s_register_operand" "w")]
                  UNSPEC_VSUB)))]
- "TARGET_NEON && (!<Is_float_mode> || flag_unsafe_math_optimizations)"
+ "TARGET_NEON && (!<Is_float_mode> || GCC_OPTION (flag_unsafe_math_optimizations))"
  "vabd.<V_if_elem> %<V_reg>0, %<V_reg>1, %<V_reg>2"
  [(set (attr "type")
        (if_then_else (ne (symbol_ref "<Is_float_mode>") (const_int 0))
diff --git a/gcc/config/arm/predicates.md b/gcc/config/arm/predicates.md
index ce5c9a8..6de73ce 100644
--- a/gcc/config/arm/predicates.md
+++ b/gcc/config/arm/predicates.md
@@ -332,7 +332,7 @@
                     || maybe_get_arm_condition_code (op) == ARM_VC")))
 
 (define_special_predicate "arm_cond_move_operator"
-  (if_then_else (match_test "arm_restrict_it")
+  (if_then_else (match_test "GCC_OPTION (arm_restrict_it)")
                 (and (match_test "TARGET_FPU_ARMV8")
                      (match_operand 0 "arm_vsel_comparison_operator"))
                 (match_operand 0 "expandable_comparison_operator")))
diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md
index d84938f..f3ce14e 100644
--- a/gcc/config/arm/thumb2.md
+++ b/gcc/config/arm/thumb2.md
@@ -387,7 +387,7 @@
   [(set (match_operand:SI 0 "s_register_operand" "=r")
 	(neg:SI (match_operator:SI 1 "arm_comparison_operator"
 		 [(match_operand 2 "cc_register" "") (const_int 0)])))]
-  "TARGET_THUMB2 && !arm_restrict_it"
+  "TARGET_THUMB2 && !GCC_OPTION (arm_restrict_it)"
   "#"   ; "ite\\t%D1\;mov%D1\\t%0, #0\;mvn%d1\\t%0, #0"
   "TARGET_THUMB2"
   [(set (match_dup 0)
@@ -406,7 +406,7 @@
   [(set (match_operand:SI 0 "low_register_operand" "=l")
 	(neg:SI (match_operator:SI 1 "arm_comparison_operator"
 		 [(match_operand 2 "cc_register" "") (const_int 0)])))]
-  "TARGET_THUMB2 && arm_restrict_it"
+  "TARGET_THUMB2 && GCC_OPTION (arm_restrict_it)"
   "#"   ; ";mvn\\t%0, #0 ;it\\t%D1\;mov%D1\\t%0, #0\"
   "&& reload_completed"
   [(set (match_dup 0)
@@ -435,7 +435,7 @@
   [(set (match_operand:SI 0 "s_register_operand" "=r")
 	(not:SI (match_operator:SI 1 "arm_comparison_operator"
 		 [(match_operand 2 "cc_register" "") (const_int 0)])))]
-  "TARGET_THUMB2 && !arm_restrict_it"
+  "TARGET_THUMB2 && !GCC_OPTION (arm_restrict_it)"
   "#"   ; "ite\\t%D1\;mvn%D1\\t%0, #0\;mvn%d1\\t%0, #1"
   "TARGET_THUMB2"
   [(set (match_dup 0)
@@ -455,7 +455,7 @@
   [(set (match_operand:SI 0 "low_register_operand" "=l")
         (not:SI (match_operator:SI 1 "arm_comparison_operator"
                  [(match_operand 2 "cc_register" "") (const_int 0)])))]
-  "TARGET_THUMB2 && arm_restrict_it"
+  "TARGET_THUMB2 && GCC_OPTION (arm_restrict_it)"
   "#"   ; "mvn %0, #0 ; it%d1 ; lsl%d1 %0, %0, #1"
   "&& reload_completed"
   [(set (match_dup 0)
@@ -606,7 +606,7 @@
   }
   [(set_attr "conds" "use")
    (set_attr "type" "multiple")
-   (set (attr "length") (if_then_else (match_test "arm_restrict_it")
+   (set (attr "length") (if_then_else (match_test "GCC_OPTION (arm_restrict_it)")
                                       (const_int 8)
                                       (const_int 10)))]
 )
@@ -616,7 +616,7 @@
 	(ior:SI (match_operator:SI 1 "arm_comparison_operator"
 		 [(match_operand 2 "cc_register" "") (const_int 0)])
 		(match_operand:SI 3 "s_register_operand" "0,?r")))]
-  "TARGET_THUMB2 && !arm_restrict_it"
+  "TARGET_THUMB2 && !GCC_OPTION (arm_restrict_it)"
   "@
    it\\t%d1\;orr%d1\\t%0, %3, #1
    #"
@@ -647,7 +647,7 @@
 	(ior:SI (match_operator:SI 2 "arm_comparison_operator"
 		 [(match_operand 3 "cc_register" "") (const_int 0)])
 		(match_operand:SI 1 "s_register_operand" "0,?l")))]
-  "TARGET_THUMB2 && arm_restrict_it"
+  "TARGET_THUMB2 && GCC_OPTION (arm_restrict_it)"
   "@
    it\\t%d2\;mov%d2\\t%0, #1\;it\\t%d2\;orr%d2\\t%0, %1
    mov\\t%0, #1\;orr\\t%0, %1\;it\\t%D2\;mov%D2\\t%0, %1"
@@ -683,7 +683,7 @@
 	output_asm_insn (\"it\\t%D4\", operands);
 	break;
       case 2:
-	if (arm_restrict_it)
+	if (GCC_OPTION (arm_restrict_it))
 	  output_asm_insn (\"it\\t%D4\", operands);
 	else
 	  output_asm_insn (\"ite\\t%D4\", operands);
@@ -694,7 +694,7 @@
     if (which_alternative != 0)
       {
         output_asm_insn (\"mov%D4\\t%0, %1\", operands);
-        if (arm_restrict_it && which_alternative == 2)
+        if (GCC_OPTION (arm_restrict_it) && which_alternative == 2)
           output_asm_insn (\"it\\t%d4\", operands);
       }
     if (which_alternative != 1)
@@ -714,7 +714,7 @@
 	    (match_operand:SI 3 "arm_rhs_operand" "rI,rI")])
           (match_operand:SI 1 "s_register_operand" "0,?r")]))
    (clobber (reg:CC CC_REGNUM))]
-  "TARGET_THUMB2 && !arm_restrict_it"
+  "TARGET_THUMB2 && !GCC_OPTION (arm_restrict_it)"
   "*
     if (GET_CODE (operands[4]) == LT && operands[3] == const0_rtx)
       return \"%i5\\t%0, %1, %2, lsr #31\";
@@ -752,7 +752,7 @@
 	    (match_operand:SI 3 "arm_rhs_operand" "rI")])
           (match_operand:SI 1 "s_register_operand" "0")]))
    (clobber (reg:CC CC_REGNUM))]
-  "TARGET_THUMB2 && arm_restrict_it"
+  "TARGET_THUMB2 && GCC_OPTION (arm_restrict_it)"
   "#"
   "&& reload_completed"
   [(const_int 0)]
@@ -826,7 +826,7 @@
     output_asm_insn (\"cmp\\t%2, %3\", operands);
     if (which_alternative != 0)
       {
-	if (arm_restrict_it)
+	if (GCC_OPTION (arm_restrict_it))
 	  {
 	    output_asm_insn (\"mov\\t%0, %1\", operands);
 	    output_asm_insn (\"it\\t%d4\", operands);
@@ -869,7 +869,7 @@
                                                   GEN_INT (31))));
         DONE;
       }
-    else if (GET_CODE (operands[3]) == NE && !arm_restrict_it)
+    else if (GET_CODE (operands[3]) == NE && !GCC_OPTION (arm_restrict_it))
       {
         /* Emit subs\\t%0, %1, %2\;it\\tne\;mvnne\\t%0, #0 */
         if (CONST_INT_P (operands[2]))
@@ -977,7 +977,7 @@
       output_asm_insn (\"it\\t%d5\", operands);
       break;
     case 2:
-      if (arm_restrict_it)
+      if (GCC_OPTION (arm_restrict_it))
         {
           output_asm_insn (\"mov\\t%0, %1\", operands);
           output_asm_insn (\"it\\t%D5\", operands);
@@ -988,7 +988,7 @@
     default:
       abort();
     }
-  if (which_alternative != 0 && !(arm_restrict_it && which_alternative == 2))
+  if (which_alternative != 0 && !(GCC_OPTION (arm_restrict_it) && which_alternative == 2))
     output_asm_insn (\"mov%d5\\t%0, %1\", operands);
   if (which_alternative != 1)
     output_asm_insn (\"mov%D5\\t%0, %2\", operands);
@@ -1056,7 +1056,7 @@
 	      (clobber (reg:CC CC_REGNUM))
 	      (clobber (match_scratch:SI 4 "=&r"))
 	      (use (label_ref (match_dup 2)))])]
-  "TARGET_THUMB2 && !flag_pic"
+  "TARGET_THUMB2 && !GCC_OPTION (flag_pic)"
   "* return thumb2_output_casesi(operands);"
   [(set_attr "conds" "clob")
    (set_attr "length" "16")
@@ -1075,7 +1075,7 @@
 	      (clobber (match_scratch:SI 4 "=&r"))
 	      (clobber (match_scratch:SI 5 "=r"))
 	      (use (label_ref (match_dup 2)))])]
-  "TARGET_THUMB2 && flag_pic"
+  "TARGET_THUMB2 && GCC_OPTION (flag_pic)"
   "* return thumb2_output_casesi(operands);"
   [(set_attr "conds" "clob")
    (set_attr "length" "20")
@@ -1269,7 +1269,7 @@
         (mult:SI (match_operand:SI 1 "low_register_operand" "%0")
                  (match_operand:SI 2 "low_register_operand" "l")))
    (clobber (reg:CC CC_REGNUM))]
-  "TARGET_THUMB2 && optimize_size && reload_completed"
+  "TARGET_THUMB2 && GCC_OPTION (optimize_size) && reload_completed"
   "mul%!\\t%0, %2, %0"
   [(set_attr "predicable" "yes")
    (set_attr "length" "2")
@@ -1283,7 +1283,7 @@
          (const_int 0)))
    (set (match_operand:SI 0 "register_operand" "=l")
 	(mult:SI (match_dup 1) (match_dup 2)))]
-  "TARGET_THUMB2 && optimize_size"
+  "TARGET_THUMB2 && GCC_OPTION (optimize_size)"
   "muls\\t%0, %2, %0"
   [(set_attr "length" "2")
    (set_attr "type" "muls")])
@@ -1295,7 +1295,7 @@
 	          (match_operand:SI 2 "register_operand" "l"))
          (const_int 0)))
    (clobber (match_scratch:SI 0 "=l"))]
-  "TARGET_THUMB2 && optimize_size"
+  "TARGET_THUMB2 && GCC_OPTION (optimize_size)"
   "muls\\t%0, %2, %0"
   [(set_attr "length" "2")
    (set_attr "type" "muls")])
@@ -1463,7 +1463,7 @@
       adjusted by modifying this register prior to the loop.
       ??? The possible introduction of a new block to initialize the
       new IV can potentially affect branch optimizations.  */
-   if (optimize > 0 && flag_modulo_sched)
+   if (GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_modulo_sched))
    {
      rtx s0;
      rtx bcomp;
diff --git a/gcc/config/arm/vec-common.md b/gcc/config/arm/vec-common.md
index ba0b588..b6567bd 100644
--- a/gcc/config/arm/vec-common.md
+++ b/gcc/config/arm/vec-common.md
@@ -46,7 +46,7 @@
         (plus:VALL (match_operand:VALL 1 "s_register_operand" "")
                    (match_operand:VALL 2 "s_register_operand" "")))]
   "(TARGET_NEON && ((<MODE>mode != V2SFmode && <MODE>mode != V4SFmode)
-		    || flag_unsafe_math_optimizations))
+		    || GCC_OPTION (flag_unsafe_math_optimizations)))
    || (TARGET_REALLY_IWMMXT && VALID_IWMMXT_REG_MODE (<MODE>mode))"
 {
 })
@@ -56,7 +56,7 @@
         (minus:VALL (match_operand:VALL 1 "s_register_operand" "")
                     (match_operand:VALL 2 "s_register_operand" "")))]
   "(TARGET_NEON && ((<MODE>mode != V2SFmode && <MODE>mode != V4SFmode)
-		    || flag_unsafe_math_optimizations))
+		    || GCC_OPTION (flag_unsafe_math_optimizations)))
    || (TARGET_REALLY_IWMMXT && VALID_IWMMXT_REG_MODE (<MODE>mode))"
 {
 })
@@ -66,7 +66,7 @@
         (mult:VALLW (match_operand:VALLW 1 "s_register_operand" "")
 		    (match_operand:VALLW 2 "s_register_operand" "")))]
   "(TARGET_NEON && ((<MODE>mode != V2SFmode && <MODE>mode != V4SFmode)
-		    || flag_unsafe_math_optimizations))
+		    || GCC_OPTION (flag_unsafe_math_optimizations)))
    || (<MODE>mode == V4HImode && TARGET_REALLY_IWMMXT)"
 {
 })
@@ -76,7 +76,7 @@
 	(smin:VALLW (match_operand:VALLW 1 "s_register_operand" "")
 		    (match_operand:VALLW 2 "s_register_operand" "")))]
   "(TARGET_NEON && ((<MODE>mode != V2SFmode && <MODE>mode != V4SFmode)
-		    || flag_unsafe_math_optimizations))
+		    || GCC_OPTION (flag_unsafe_math_optimizations)))
    || (TARGET_REALLY_IWMMXT && VALID_IWMMXT_REG_MODE (<MODE>mode))"
 {
 })
@@ -95,7 +95,7 @@
 	(smax:VALLW (match_operand:VALLW 1 "s_register_operand" "")
 		    (match_operand:VALLW 2 "s_register_operand" "")))]
   "(TARGET_NEON && ((<MODE>mode != V2SFmode && <MODE>mode != V4SFmode)
-		    || flag_unsafe_math_optimizations))
+		    || GCC_OPTION (flag_unsafe_math_optimizations)))
    || (TARGET_REALLY_IWMMXT && VALID_IWMMXT_REG_MODE (<MODE>mode))"
 {
 })
diff --git a/gcc/config/arm/vfp.md b/gcc/config/arm/vfp.md
index e1a48ee..6f92b33 100644
--- a/gcc/config/arm/vfp.md
+++ b/gcc/config/arm/vfp.md
@@ -519,7 +519,7 @@
 	    [(match_operand 4 "cc_register" "") (const_int 0)])
 	  (match_operand:SF 1 "s_register_operand" "0,t,t,0,?r,?r,0,t,t")
 	  (match_operand:SF 2 "s_register_operand" "t,0,t,?r,0,?r,t,0,t")))]
-  "TARGET_THUMB2 && TARGET_HARD_FLOAT && TARGET_VFP && !arm_restrict_it"
+  "TARGET_THUMB2 && TARGET_HARD_FLOAT && TARGET_VFP && !GCC_OPTION (arm_restrict_it)"
   "@
    it\\t%D3\;fcpys%D3\\t%0, %2
    it\\t%d3\;fcpys%d3\\t%0, %1
@@ -565,7 +565,7 @@
 	    [(match_operand 4 "cc_register" "") (const_int 0)])
 	  (match_operand:DF 1 "s_register_operand" "0,w,w,0,?r,?r,0,w,w")
 	  (match_operand:DF 2 "s_register_operand" "w,0,w,?r,0,?r,w,0,w")))]
-  "TARGET_THUMB2 && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE && !arm_restrict_it"
+  "TARGET_THUMB2 && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE && !GCC_OPTION (arm_restrict_it)"
   "@
    it\\t%D3\;fcpyd%D3\\t%P0, %P2
    it\\t%d3\;fcpyd%d3\\t%P0, %P1
@@ -1226,7 +1226,7 @@
 	(mult:SF (FCVT:SF (match_operand:SI 1 "s_register_operand" "0"))
 		 (match_operand 2
 			"const_double_vcvt_power_of_two_reciprocal" "Dt")))]
-  "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !flag_rounding_math"
+  "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !GCC_OPTION (flag_rounding_math)"
   "vcvt%?.f32.<FCVTI32typename>\\t%0, %1, %v2"
   [(set_attr "predicable" "yes")
    (set_attr "predicable_short_it" "no")
@@ -1240,7 +1240,7 @@
 	(mult:DF (FCVT:DF (match_operand:SI 1 "s_register_operand" "r,t,r"))
 		 (match_operand 2
 		     "const_double_vcvt_power_of_two_reciprocal" "Dt,Dt,Dt")))]
-  "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !flag_rounding_math
+  "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !GCC_OPTION (flag_rounding_math)
   && !TARGET_VFP_SINGLE"
   "@
   vmov%?.f32\\t%0, %1\;vcvt%?.f64.<FCVTI32typename>\\t%P0, %P0, %v2
@@ -1258,7 +1258,7 @@
 	(fix:SI (fix:SF (mult:SF (match_operand:SF 1 "s_register_operand" "t")
 				 (match_operand 2
 				 "const_double_vcvt_power_of_two" "Dp")))))]
-  "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !flag_rounding_math"
+  "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !GCC_OPTION (flag_rounding_math)"
   "vcvt%?.s32.f32\\t%1, %1, %v2\;vmov%?\\t%0, %1"
   [(set_attr "predicable" "yes")
    (set_attr "predicable_short_it" "no")
diff --git a/gcc/config/avr/avr-c.c b/gcc/config/avr/avr-c.c
index 101d280..72edc55 100644
--- a/gcc/config/avr/avr-c.c
+++ b/gcc/config/avr/avr-c.c
@@ -338,7 +338,7 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile)
   else
     cpp_define (pfile, "__AVR_HAVE_16BIT_SP__");
 
-  if (avr_sp8)
+  if (GCC_OPTION (avr_sp8))
     cpp_define (pfile, "__AVR_SP8__");
 
   if (AVR_HAVE_SPH)
diff --git a/gcc/config/avr/avr-fixed.md b/gcc/config/avr/avr-fixed.md
index 1652415..dd98618 100644
--- a/gcc/config/avr/avr-fixed.md
+++ b/gcc/config/avr/avr-fixed.md
@@ -422,7 +422,7 @@
   ""
   {
     if (CONST_INT_P (operands[2])
-        && !(optimize_size
+        && !(GCC_OPTION (optimize_size)
              && 4 == GET_MODE_SIZE (<MODE>mode)))
       {
         emit_insn (gen_round<mode>3_const (operands[0], operands[1], operands[2]));
diff --git a/gcc/config/avr/avr-log.c b/gcc/config/avr/avr-log.c
index 8e27cec..4df7ba2 100644
--- a/gcc/config/avr/avr-log.c
+++ b/gcc/config/avr/avr-log.c
@@ -311,15 +311,15 @@ avr_log_set_avr_log (void)
 {
   bool all = TARGET_ALL_DEBUG != 0;
 
-  if (all || avr_log_details)
+  if (all || GCC_OPTION (avr_log_details))
     {
       /* Adding , at beginning and end of string makes searching easier.  */
 
-      char *str = (char*) alloca (3 + strlen (avr_log_details));
+      char *str = (char*) alloca (3 + strlen (GCC_OPTION (avr_log_details)));
       bool info;
 
       str[0] = ',';
-      strcat (stpcpy (str+1, avr_log_details), ",");
+      strcat (stpcpy (str+1, GCC_OPTION (avr_log_details)), ",");
 
       all |= NULL != strstr (str, ",all,");
       info = NULL != strstr (str, ",?,");
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 8ca7de0..db791d3 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -290,7 +290,7 @@ avr_to_int_mode (rtx x)
 static void
 avr_option_override (void)
 {
-  flag_delete_null_pointer_checks = 0;
+  GCC_OPTION (flag_delete_null_pointer_checks) = 0;
 
   /* caller-save.c looks for call-clobbered hard registers that are assigned
      to pseudos that cross calls and tries so save-restore them around calls
@@ -300,30 +300,30 @@ avr_option_override (void)
      with the challenge of AVR's very few address registers and fails to
      perform the requested spills.  */
 
-  if (avr_strict_X)
-    flag_caller_saves = 0;
+  if (GCC_OPTION (avr_strict_X))
+    GCC_OPTION (flag_caller_saves) = 0;
 
   /* Unwind tables currently require a frame pointer for correctness,
      see toplev.c:process_options().  */
 
-  if ((flag_unwind_tables
-       || flag_non_call_exceptions
-       || flag_asynchronous_unwind_tables)
+  if ((GCC_OPTION (flag_unwind_tables)
+       || GCC_OPTION (flag_non_call_exceptions)
+       || GCC_OPTION (flag_asynchronous_unwind_tables))
       && !ACCUMULATE_OUTGOING_ARGS)
     {
-      flag_omit_frame_pointer = 0;
+      GCC_OPTION (flag_omit_frame_pointer) = 0;
     }
 
-  if (flag_pic == 1)
+  if (GCC_OPTION (flag_pic) == 1)
     warning (OPT_fpic, "-fpic is not supported");
-  if (flag_pic == 2)
+  if (GCC_OPTION (flag_pic) == 2)
     warning (OPT_fPIC, "-fPIC is not supported");
-  if (flag_pie == 1)
+  if (GCC_OPTION (flag_pie) == 1)
     warning (OPT_fpie, "-fpie is not supported");
-  if (flag_pie == 2)
+  if (GCC_OPTION (flag_pie) == 2)
     warning (OPT_fPIE, "-fPIE is not supported");
 
-  avr_current_device = &avr_mcu_types[avr_mcu_index];
+  avr_current_device = &avr_mcu_types[GCC_OPTION (avr_mcu_index)];
   avr_current_arch = &avr_arch_types[avr_current_device->arch];
 
   /* RAM addresses of some SFRs common to all devices in respective arch. */
@@ -1354,7 +1354,7 @@ avr_expand_prologue (void)
 
   avr_prologue_setup_frame (size, set);
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = cfun->machine->stack_usage;
 }
 
@@ -3241,7 +3241,7 @@ out_movqi_r_mr (rtx insn, rtx op[], int *plen)
 
   if (CONSTANT_ADDRESS_P (x))
     {
-      return optimize > 0 && io_address_operand (x, QImode)
+      return GCC_OPTION (optimize) > 0 && io_address_operand (x, QImode)
         ? avr_asm_len ("in %0,%i1", op, plen, -1)
         : avr_asm_len ("lds %0,%m1", op, plen, -2);
     }
@@ -3400,7 +3400,7 @@ out_movhi_r_mr (rtx insn, rtx op[], int *plen)
     }
   else if (CONSTANT_ADDRESS_P (base))
     {
-      return optimize > 0 && io_address_operand (base, HImode)
+      return GCC_OPTION (optimize) > 0 && io_address_operand (base, HImode)
         ? avr_asm_len ("in %A0,%i1" CR_TAB
                        "in %B0,%i1+1", op, plen, -2)
 
@@ -4101,7 +4101,7 @@ out_movqi_mr_r (rtx insn, rtx op[], int *plen)
 
   if (CONSTANT_ADDRESS_P (x))
     {
-      return optimize > 0 && io_address_operand (x, QImode)
+      return GCC_OPTION (optimize) > 0 && io_address_operand (x, QImode)
         ? avr_asm_len ("out %i0,%1", op, plen, -1)
         : avr_asm_len ("sts %m0,%1", op, plen, -2);
     }
@@ -4173,7 +4173,7 @@ avr_out_movhi_mr_r_xmega (rtx insn, rtx op[], int *plen)
   int mem_volatile_p = MEM_VOLATILE_P (dest);
 
   if (CONSTANT_ADDRESS_P (base))
-    return optimize > 0 && io_address_operand (base, HImode)
+    return GCC_OPTION (optimize) > 0 && io_address_operand (base, HImode)
       ? avr_asm_len ("out %i0,%A1" CR_TAB
                      "out %i0+1,%B1", op, plen, -2)
 
@@ -4288,7 +4288,7 @@ out_movhi_mr_r (rtx insn, rtx op[], int *plen)
   mem_volatile_p = MEM_VOLATILE_P (dest);
 
   if (CONSTANT_ADDRESS_P (base))
-    return optimize > 0 && io_address_operand (base, HImode)
+    return GCC_OPTION (optimize) > 0 && io_address_operand (base, HImode)
       ? avr_asm_len ("out %i0+1,%B1" CR_TAB
                      "out %i0,%A1", op, plen, -2)
 
@@ -4746,7 +4746,7 @@ out_shift_with_cnt (const char *templ, rtx insn, rtx operands[],
       if (count < 8 && !scratch)
         use_zero_reg = true;
 
-      if (optimize_size)
+      if (GCC_OPTION (optimize_size))
         max_len = t_len + (scratch ? 3 : (use_zero_reg ? 4 : 5));
 
       if (t_len * count <= max_len)
@@ -4951,7 +4951,7 @@ ashlhi3_out (rtx insn, rtx operands[], int *len)
 		  "clr %A0");
 
 	case 4:
-	  if (optimize_size && scratch)
+	  if (GCC_OPTION (optimize_size) && scratch)
 	    break;  /* 5 */
 	  if (ldi_ok)
 	    {
@@ -4977,7 +4977,7 @@ ashlhi3_out (rtx insn, rtx operands[], int *len)
 	  break;  /* optimize_size ? 6 : 8 */
 
 	case 5:
-	  if (optimize_size)
+	  if (GCC_OPTION (optimize_size))
 	    break;  /* scratch ? 5 : 6 */
 	  if (ldi_ok)
 	    {
@@ -5007,7 +5007,7 @@ ashlhi3_out (rtx insn, rtx operands[], int *len)
 	  break;  /* 10 */
 
 	case 6:
-	  if (optimize_size)
+	  if (GCC_OPTION (optimize_size))
 	    break;  /* scratch ? 5 : 6 */
 	  *len = 9;
 	  return ("clr __tmp_reg__" CR_TAB
@@ -5098,7 +5098,7 @@ ashlhi3_out (rtx insn, rtx operands[], int *len)
 		      "clr %A0"     CR_TAB
 		      "clr __zero_reg__");
 	    }
-	  if (optimize_size && scratch)
+	  if (GCC_OPTION (optimize_size) && scratch)
 	    break;  /* 5 */
 	  if (scratch)
 	    {
@@ -5148,7 +5148,7 @@ ashlhi3_out (rtx insn, rtx operands[], int *len)
 		      "clr %A0"     CR_TAB
 		      "clr __zero_reg__");
 	    }
-	  if (optimize_size && ldi_ok)
+	  if (GCC_OPTION (optimize_size) && ldi_ok)
 	    {
 	      *len = 5;
 	      return ("mov %B0,%A0" CR_TAB
@@ -5157,7 +5157,7 @@ ashlhi3_out (rtx insn, rtx operands[], int *len)
 		      "dec %A0"     CR_TAB
 		      "brne 1b");
 	    }
-	  if (optimize_size && scratch)
+	  if (GCC_OPTION (optimize_size) && scratch)
 	    break;  /* 5 */
 	  *len = 6;
 	  return ("clr %B0" CR_TAB
@@ -5429,7 +5429,7 @@ ashrhi3_out (rtx insn, rtx operands[], int *len)
 	  break;
 
 	case 6:
-	  if (optimize_size)
+	  if (GCC_OPTION (optimize_size))
 	    break;  /* scratch ? 5 : 6 */
 	  *len = 8;
 	  return ("mov __tmp_reg__,%A0" CR_TAB
@@ -5489,7 +5489,7 @@ ashrhi3_out (rtx insn, rtx operands[], int *len)
 		      "sbc %B0,%B0"  CR_TAB
 		      "clr __zero_reg__");
 	    }
-	  if (optimize_size && scratch)
+	  if (GCC_OPTION (optimize_size) && scratch)
 	    break;  /* 5 */
 	  *len = 6;
 	  return ("mov %A0,%B0" CR_TAB
@@ -5509,7 +5509,7 @@ ashrhi3_out (rtx insn, rtx operands[], int *len)
 		      "sbc %B0,%B0"  CR_TAB
 		      "clr __zero_reg__");
 	    }
-	  if (optimize_size && scratch)
+	  if (GCC_OPTION (optimize_size) && scratch)
 	    break;  /* 5 */
 	  *len = 7;
 	  return ("mov %A0,%B0" CR_TAB
@@ -5530,7 +5530,7 @@ ashrhi3_out (rtx insn, rtx operands[], int *len)
 		      "sbc %B0,%B0"  CR_TAB
 		      "clr __zero_reg__");
 	    }
-	  if (optimize_size)
+	  if (GCC_OPTION (optimize_size))
 	    break;  /* scratch ? 5 : 7 */
 	  *len = 8;
 	  return ("mov %A0,%B0" CR_TAB
@@ -5846,7 +5846,7 @@ lshrhi3_out (rtx insn, rtx operands[], int *len)
 		  "clr %A0");
 
 	case 4:
-	  if (optimize_size && scratch)
+	  if (GCC_OPTION (optimize_size) && scratch)
 	    break;  /* 5 */
 	  if (ldi_ok)
 	    {
@@ -5872,7 +5872,7 @@ lshrhi3_out (rtx insn, rtx operands[], int *len)
 	  break;  /* optimize_size ? 6 : 8 */
 
 	case 5:
-	  if (optimize_size)
+	  if (GCC_OPTION (optimize_size))
 	    break;  /* scratch ? 5 : 6 */
 	  if (ldi_ok)
 	    {
@@ -5902,7 +5902,7 @@ lshrhi3_out (rtx insn, rtx operands[], int *len)
 	  break;  /* 10 */
 
 	case 6:
-	  if (optimize_size)
+	  if (GCC_OPTION (optimize_size))
 	    break;  /* scratch ? 5 : 6 */
 	  *len = 9;
 	  return ("clr __tmp_reg__" CR_TAB
@@ -5993,7 +5993,7 @@ lshrhi3_out (rtx insn, rtx operands[], int *len)
 		      "clr %B0"     CR_TAB
 		      "clr __zero_reg__");
 	    }
-	  if (optimize_size && scratch)
+	  if (GCC_OPTION (optimize_size) && scratch)
 	    break;  /* 5 */
 	  if (scratch)
 	    {
@@ -6043,7 +6043,7 @@ lshrhi3_out (rtx insn, rtx operands[], int *len)
 		      "clr %B0"     CR_TAB
 		      "clr __zero_reg__");
 	    }
-	  if (optimize_size && ldi_ok)
+	  if (GCC_OPTION (optimize_size) && ldi_ok)
 	    {
 	      *len = 5;
 	      return ("mov %A0,%B0" CR_TAB
@@ -6052,7 +6052,7 @@ lshrhi3_out (rtx insn, rtx operands[], int *len)
 		      "dec %B0"     CR_TAB
 		      "brne 1b");
 	    }
-	  if (optimize_size && scratch)
+	  if (GCC_OPTION (optimize_size) && scratch)
 	    break;  /* 5 */
 	  *len = 6;
 	  return ("clr %A0" CR_TAB
@@ -7001,7 +7001,7 @@ avr_out_addto_sp (rtx *op, int *plen)
 
   if (addend < 0)
     {
-      if (flag_verbose_asm || flag_print_asm_name)
+      if (GCC_OPTION (flag_verbose_asm) || GCC_OPTION (flag_print_asm_name))
         avr_asm_len (ASM_COMMENT_START "SP -= %n0", op, plen, 0);
 
       while (addend <= -pc_len)
@@ -7015,7 +7015,7 @@ avr_out_addto_sp (rtx *op, int *plen)
     }
   else if (addend > 0)
     {
-      if (flag_verbose_asm || flag_print_asm_name)
+      if (GCC_OPTION (flag_verbose_asm) || GCC_OPTION (flag_print_asm_name))
         avr_asm_len (ASM_COMMENT_START "SP += %0", op, plen, 0);
 
       while (addend-- > 0)
@@ -8462,11 +8462,11 @@ avr_asm_function_rodata_section (tree decl)
      but treat function-associated data-like jump tables as code
      rather than as user defined data.  AVR has no constant pools.  */
   {
-    int fdata = flag_data_sections;
+    int fdata = GCC_OPTION (flag_data_sections);
 
-    flag_data_sections = flag_function_sections;
+    GCC_OPTION (flag_data_sections) = GCC_OPTION (flag_function_sections);
     frodata = default_function_rodata_section (decl);
-    flag_data_sections = fdata;
+    GCC_OPTION (flag_data_sections) = fdata;
     flags = frodata->common.flags;
   }
 
@@ -9706,7 +9706,7 @@ avr_address_cost (rtx x, enum machine_mode mode ATTRIBUTE_UNUSED,
     }
   else if (CONSTANT_ADDRESS_P (x))
     {
-      if (optimize > 0
+      if (GCC_OPTION (optimize) > 0
           && io_address_operand (x, QImode))
         cost = 2;
     }
@@ -9981,7 +9981,7 @@ avr_reorg (void)
       if (!pattern)
         continue;
 
-      if (optimize
+      if (GCC_OPTION (optimize)
           && avr_reorg_remove_redundant_compare (insn))
         {
           continue;
@@ -10250,7 +10250,7 @@ avr_mode_code_base_reg_class (enum machine_mode mode ATTRIBUTE_UNUSED,
       return POINTER_Z_REGS;
     }
 
-  if (!avr_strict_X)
+  if (!GCC_OPTION (avr_strict_X))
     return reload_completed ? BASE_POINTER_REGS : POINTER_REGS;
 
   return PLUS == outer_code ? BASE_POINTER_REGS : POINTER_REGS;
@@ -10310,7 +10310,7 @@ avr_regno_mode_code_ok_for_base_p (int regno,
         }
     }
 
-  if (avr_strict_X
+  if (GCC_OPTION (avr_strict_X)
       && PLUS == outer_code
       && regno == REG_X)
     {
@@ -11080,7 +11080,7 @@ avr_convert_to_type (tree type, tree expr)
             code with progmem and pgm_read_xxx.
   */
 
-  if (avr_warn_addr_space_convert
+  if (GCC_OPTION (avr_warn_addr_space_convert)
       && expr != error_mark_node
       && POINTER_TYPE_P (type)
       && POINTER_TYPE_P (TREE_TYPE (expr)))
@@ -11651,7 +11651,7 @@ avr_out_insert_bits (rtx *op, int *plen)
 
   if (plen)
     *plen = 0;
-  else if (flag_print_asm_name)
+  else if (GCC_OPTION (flag_print_asm_name))
     fprintf (asm_out_file, ASM_COMMENT_START "map = 0x%08x\n", map);
 
   /* If MAP has fixed points it might be better to initialize the result
@@ -12169,7 +12169,7 @@ avr_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED, tree *arg,
   unsigned int fcode = DECL_FUNCTION_CODE (fndecl);
   tree val_type = TREE_TYPE (TREE_TYPE (fndecl));
 
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     return NULL_TREE;
 
   switch (fcode)
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 74be83c..6445703 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -89,9 +89,9 @@ enum
    there is always __AVR_SP8__ == __AVR_HAVE_8BIT_SP__.  */
 
 #define AVR_HAVE_8BIT_SP                                                \
-  (avr_current_device->short_sp || TARGET_TINY_STACK || avr_sp8)
+  (avr_current_device->short_sp || TARGET_TINY_STACK || GCC_OPTION (avr_sp8))
 
-#define AVR_HAVE_SPH (!avr_sp8)
+#define AVR_HAVE_SPH (!GCC_OPTION (avr_sp8))
 
 #define AVR_2_BYTE_PC (!AVR_HAVE_EIJMP_EICALL)
 #define AVR_3_BYTE_PC (AVR_HAVE_EIJMP_EICALL)
@@ -355,7 +355,7 @@ typedef struct avr_args
       }                                                                 \
   } while (0)
 
-#define BRANCH_COST(speed_p, predictable_p) avr_branch_cost
+#define BRANCH_COST(speed_p, predictable_p) GCC_OPTION (avr_branch_cost)
 
 #define SLOW_BYTE_ACCESS 0
 
diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md
index f2d8605..b44707d 100644
--- a/gcc/config/avr/avr.md
+++ b/gcc/config/avr/avr.md
@@ -4326,7 +4326,7 @@
   [(set (cc0)
         (compare (neg:QI (match_operand:QI 0 "register_operand" "r"))
                  (const_int 0)))]
-  "!flag_wrapv && !flag_trapv && flag_strict_overflow"
+  "!GCC_OPTION (flag_wrapv) && !GCC_OPTION (flag_trapv) && GCC_OPTION (flag_strict_overflow)"
   "cp __zero_reg__,%0"
   [(set_attr "cc" "compare")
    (set_attr "length" "1")])
@@ -4344,7 +4344,7 @@
   [(set (cc0)
         (compare (neg:HI (match_operand:HI 0 "register_operand" "r"))
                  (const_int 0)))]
-  "!flag_wrapv && !flag_trapv && flag_strict_overflow"
+  "!GCC_OPTION (flag_wrapv) && !GCC_OPTION (flag_trapv) && GCC_OPTION (flag_strict_overflow)"
   "cp __zero_reg__,%A0
 	cpc __zero_reg__,%B0"
 [(set_attr "cc" "compare")
@@ -4367,7 +4367,7 @@
   [(set (cc0)
         (compare (neg:PSI (match_operand:PSI 0 "register_operand" "r"))
                  (const_int 0)))]
-  "!flag_wrapv && !flag_trapv && flag_strict_overflow"
+  "!GCC_OPTION (flag_wrapv) && !GCC_OPTION (flag_trapv) && GCC_OPTION (flag_strict_overflow)"
   "cp __zero_reg__,%A0\;cpc __zero_reg__,%B0\;cpc __zero_reg__,%C0"
   [(set_attr "cc" "compare")
    (set_attr "length" "3")])
@@ -4386,7 +4386,7 @@
   [(set (cc0)
         (compare (neg:SI (match_operand:SI 0 "register_operand" "r"))
                  (const_int 0)))]
-  "!flag_wrapv && !flag_trapv && flag_strict_overflow"
+  "!GCC_OPTION (flag_wrapv) && !GCC_OPTION (flag_trapv) && GCC_OPTION (flag_strict_overflow)"
   "cp __zero_reg__,%A0
 	cpc __zero_reg__,%B0
 	cpc __zero_reg__,%C0
@@ -6229,7 +6229,7 @@
                          (match_operand:QI 1 "const1_operand" "")        ; width
                          (match_operand:QI 2 "const_0_to_7_operand" "")) ; pos
         (match_operand:QI 3 "nonmemory_operand" ""))]
-  "optimize")
+  "GCC_OPTION (optimize)")
 
 ;; Insert bit $2.0 into $0.$1
 (define_insn "*insv.reg"
diff --git a/gcc/config/bfin/bfin-opts.h b/gcc/config/bfin/bfin-opts.h
index b7cb39e..81ec1bb 100644
--- a/gcc/config/bfin/bfin-opts.h
+++ b/gcc/config/bfin/bfin-opts.h
@@ -21,7 +21,7 @@
 #define BFIN_OPTS_H
 
 /* CPU type.  */
-typedef enum bfin_cpu_type
+typedef enum GCC_OPTION (bfin_cpu_type)
 {
   BFIN_CPU_UNKNOWN,
   BFIN_CPU_BF512,
diff --git a/gcc/config/bfin/bfin-protos.h b/gcc/config/bfin/bfin-protos.h
index be26ad1..8c4f8d7 100644
--- a/gcc/config/bfin/bfin-protos.h
+++ b/gcc/config/bfin/bfin-protos.h
@@ -25,43 +25,43 @@
 /* For the anomaly 05-00-0245 */
 #define WA_SPECULATIVE_LOADS 0x00000001
 #define ENABLE_WA_SPECULATIVE_LOADS \
-  (bfin_workarounds & WA_SPECULATIVE_LOADS)
+  (GCC_OPTION (bfin_workarounds) & WA_SPECULATIVE_LOADS)
 
 /* For the anomaly 05-00-0244 */
 #define WA_SPECULATIVE_SYNCS 0x00000002
 #define ENABLE_WA_SPECULATIVE_SYNCS \
-  (bfin_workarounds & WA_SPECULATIVE_SYNCS)
+  (GCC_OPTION (bfin_workarounds) & WA_SPECULATIVE_SYNCS)
 
 /* For the anomaly 05-00-0371 */
 #define WA_RETS 0x00000004
 #define ENABLE_WA_RETS \
-  (bfin_workarounds & WA_RETS)
+  (GCC_OPTION (bfin_workarounds) & WA_RETS)
 
 /* For the anomaly 05-00-0426 */
 #define WA_INDIRECT_CALLS 0x00000008
 #define ENABLE_WA_INDIRECT_CALLS \
-  ((bfin_workarounds & WA_INDIRECT_CALLS) && !TARGET_ICPLB)
+  ((GCC_OPTION (bfin_workarounds) & WA_INDIRECT_CALLS) && !TARGET_ICPLB)
 
 #define WA_05000257 0x00000010
 #define ENABLE_WA_05000257 \
-  (bfin_workarounds & WA_05000257)
+  (GCC_OPTION (bfin_workarounds) & WA_05000257)
 
 #define WA_05000283 0x00000020
 #define ENABLE_WA_05000283 \
-  (bfin_workarounds & WA_05000283)
+  (GCC_OPTION (bfin_workarounds) & WA_05000283)
 
 #define WA_05000315 0x00000040
 #define ENABLE_WA_05000315 \
-  (bfin_workarounds & WA_05000315)
+  (GCC_OPTION (bfin_workarounds) & WA_05000315)
 
 /* For the anomaly 05-00-0312 */
 #define WA_LOAD_LCREGS 0x00000080
 #define ENABLE_WA_LOAD_LCREGS \
-  (bfin_workarounds & WA_LOAD_LCREGS)
+  (GCC_OPTION (bfin_workarounds) & WA_LOAD_LCREGS)
 
 #define WA_05000074 0x00000100
 #define ENABLE_WA_05000074 \
-  (bfin_workarounds & WA_05000074)
+  (GCC_OPTION (bfin_workarounds) & WA_05000074)
 
 extern bool function_arg_regno_p (int);
 
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 8b28211..a22778d 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -1053,7 +1053,7 @@ bfin_load_pic_reg (rtx dest)
       
   if (global_options_set.x_bfin_library_id)
     addr = plus_constant (Pmode, pic_offset_table_rtx,
-			   -4 - bfin_library_id * 4);
+			   -4 - GCC_OPTION (bfin_library_id) * 4);
   else
     addr = gen_rtx_PLUS (Pmode, pic_offset_table_rtx,
 			 gen_rtx_UNSPEC (Pmode, gen_rtvec (1, const0_rtx),
@@ -2006,7 +2006,7 @@ bfin_longcall_p (rtx op, int call_cookie)
     return 0;
   if (call_cookie & CALL_LONG)
     return 1;
-  if (TARGET_LONG_CALLS)
+  if (GCC_OPTION (TARGET_LONG_CALLS))
     return 1;
   return 0;
 }
@@ -2031,7 +2031,7 @@ bfin_expand_call (rtx retval, rtx fnaddr, rtx callarg1, rtx cookie, int sibcall)
     cookie = const0_rtx;
 
   /* Static functions and indirect calls don't need the pic register.  */
-  if (!TARGET_FDPIC && flag_pic
+  if (!TARGET_FDPIC && GCC_OPTION (flag_pic)
       && GET_CODE (callee) == SYMBOL_REF
       && !SYMBOL_REF_LOCAL_P (callee))
     use_reg (&use, pic_offset_table_rtx);
@@ -2167,7 +2167,7 @@ bfin_register_move_cost (enum machine_mode mode,
     return 4;
 
   /* If optimizing for size, always prefer reg-reg over reg-memory moves.  */
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     return 2;
 
   if (GET_MODE_CLASS (mode) == MODE_INT)
@@ -2326,28 +2326,28 @@ static void
 bfin_option_override (void)
 {
   /* If processor type is not specified, enable all workarounds.  */
-  if (bfin_cpu_type == BFIN_CPU_UNKNOWN)
+  if (GCC_OPTION (bfin_cpu_type) == BFIN_CPU_UNKNOWN)
     {
       int i;
 
       for (i = 0; bfin_cpus[i].name != NULL; i++)
-	bfin_workarounds |= bfin_cpus[i].workarounds;
+	GCC_OPTION (bfin_workarounds) |= bfin_cpus[i].workarounds;
 
-      bfin_si_revision = 0xffff;
+      GCC_OPTION (bfin_si_revision) = 0xffff;
     }
 
-  if (bfin_csync_anomaly == 1)
-    bfin_workarounds |= WA_SPECULATIVE_SYNCS;
-  else if (bfin_csync_anomaly == 0)
-    bfin_workarounds &= ~WA_SPECULATIVE_SYNCS;
+  if (GCC_OPTION (bfin_csync_anomaly) == 1)
+    GCC_OPTION (bfin_workarounds) |= WA_SPECULATIVE_SYNCS;
+  else if (GCC_OPTION (bfin_csync_anomaly) == 0)
+    GCC_OPTION (bfin_workarounds) &= ~WA_SPECULATIVE_SYNCS;
 
-  if (bfin_specld_anomaly == 1)
-    bfin_workarounds |= WA_SPECULATIVE_LOADS;
-  else if (bfin_specld_anomaly == 0)
-    bfin_workarounds &= ~WA_SPECULATIVE_LOADS;
+  if (GCC_OPTION (bfin_specld_anomaly) == 1)
+    GCC_OPTION (bfin_workarounds) |= WA_SPECULATIVE_LOADS;
+  else if (GCC_OPTION (bfin_specld_anomaly) == 0)
+    GCC_OPTION (bfin_workarounds) &= ~WA_SPECULATIVE_LOADS;
 
   if (TARGET_OMIT_LEAF_FRAME_POINTER)
-    flag_omit_frame_pointer = 1;
+    GCC_OPTION (flag_omit_frame_pointer) = 1;
 
 #ifdef SUBTARGET_FDPIC_NOT_SUPPORTED
   if (TARGET_FDPIC)
@@ -2376,10 +2376,10 @@ bfin_option_override (void)
     error ("cannot specify both -msep-data and -mid-shared-library");
   /* ... internally, however, it's nearly the same.  */
   if (TARGET_SEP_DATA)
-    target_flags |= MASK_ID_SHARED_LIBRARY | MASK_LEAF_ID_SHARED_LIBRARY;
+    GCC_OPTION (target_flags) |= MASK_ID_SHARED_LIBRARY | MASK_LEAF_ID_SHARED_LIBRARY;
 
-  if (TARGET_ID_SHARED_LIBRARY && flag_pic == 0)
-    flag_pic = 1;
+  if (TARGET_ID_SHARED_LIBRARY && GCC_OPTION (flag_pic) == 0)
+    GCC_OPTION (flag_pic) = 1;
 
   /* There is no single unaligned SI op for PIC code.  Sometimes we
      need to use ".4byte" and sometimes we need to use ".picptr".
@@ -2389,10 +2389,10 @@ bfin_option_override (void)
 
   /* Silently turn off flag_pic if not doing FDPIC or ID shared libraries,
      since we don't support it and it'll just break.  */
-  if (flag_pic && !TARGET_FDPIC && !TARGET_ID_SHARED_LIBRARY)
-    flag_pic = 0;
+  if (GCC_OPTION (flag_pic) && !TARGET_FDPIC && !TARGET_ID_SHARED_LIBRARY)
+    GCC_OPTION (flag_pic) = 0;
 
-  if (TARGET_MULTICORE && bfin_cpu_type != BFIN_CPU_BF561)
+  if (TARGET_MULTICORE && GCC_OPTION (bfin_cpu_type) != BFIN_CPU_BF561)
     error ("-mmulticore can only be used with BF561");
 
   if (TARGET_COREA && !TARGET_MULTICORE)
@@ -2404,7 +2404,7 @@ bfin_option_override (void)
   if (TARGET_COREA && TARGET_COREB)
     error ("-mcorea and -mcoreb can%'t be used together");
 
-  flag_schedule_insns = 0;
+  GCC_OPTION (flag_schedule_insns) = 0;
 
   init_machine_status = bfin_init_machine_status;
 }
@@ -2640,7 +2640,7 @@ split_load_immediate (rtx operands[])
   if (regno > REG_R7)
     return 0;
 
-  if (optimize_size
+  if (GCC_OPTION (optimize_size)
       && num_compl_zero && shifted_compl >= -64 && shifted_compl <= 63)
     {
       /* If optimizing for size, generate a sequence that has more instructions
@@ -3207,7 +3207,7 @@ bfin_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp)
     }
 
   /* If optimizing for size, only do single copies inline.  */
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     {
       if (count == 2 && align < 2)
 	return false;
@@ -3377,7 +3377,7 @@ bfin_can_use_doloop_p (double_int, double_int iterations_max,
   /* Due to limitations in the hardware (an initial loop count of 0
      does not loop 2^32 times) we must avoid to generate a hardware
      loops when we cannot rule out this case.  */
-  if (!flag_unsafe_loop_optimizations
+  if (!GCC_OPTION (flag_unsafe_loop_optimizations)
       && (iterations_max.high != 0
 	  || iterations_max.low >= 0xFFFFFFFF))
     return false;
@@ -3408,7 +3408,7 @@ static int
 length_for_loop (rtx insn)
 {
   int length = 0;
-  if (JUMP_P (insn) && any_condjump_p (insn) && !optimize_size)
+  if (JUMP_P (insn) && any_condjump_p (insn) && !GCC_OPTION (optimize_size))
     {
       if (ENABLE_WA_SPECULATIVE_SYNCS)
 	length = 8;
@@ -3896,7 +3896,7 @@ gen_one_bundle (rtx slot[3])
   gcc_assert (slot[1] != NULL_RTX);
 
   /* Don't add extra NOPs if optimizing for size.  */
-  if (optimize_size
+  if (GCC_OPTION (optimize_size)
       && (slot[0] == NULL_RTX || slot[2] == NULL_RTX))
     return false;
 
@@ -4408,7 +4408,7 @@ workaround_speculation (void)
 	  delay_needed -= cycles_since_jump;
 
 	  extract_insn (last_condjump);
-	  if (optimize_size)
+	  if (GCC_OPTION (optimize_size))
 	    {
 	      pat1 = gen_cbranch_predicted_taken (op[0], op[1], op[2],
 						 op[3]);
@@ -4602,7 +4602,7 @@ bfin_reorg (void)
      with old MDEP_REORGS that are not CFG based.  Recompute it now.  */
   compute_bb_for_insn ();
 
-  if (flag_schedule_insns_after_reload)
+  if (GCC_OPTION (flag_schedule_insns_after_reload))
     {
       splitting_for_sched = 1;
       split_all_insns ();
@@ -4611,7 +4611,7 @@ bfin_reorg (void)
       add_sched_insns_for_speculation ();
 
       timevar_push (TV_SCHED2);
-      if (flag_selective_scheduling2
+      if (GCC_OPTION (flag_selective_scheduling2)
 	  && !maybe_skip_selective_scheduling ())
         run_selective_scheduling ();
       else
@@ -4631,7 +4631,7 @@ bfin_reorg (void)
 
   workaround_speculation ();
 
-  if (flag_var_tracking)
+  if (GCC_OPTION (flag_var_tracking))
     {
       timevar_push (TV_VAR_TRACKING);
       variable_tracking_main ();
@@ -4986,7 +4986,7 @@ bfin_output_mi_thunk (FILE *file ATTRIBUTE_UNUSED,
     }
 
   xops[0] = XEXP (DECL_RTL (function), 0);
-  if (1 || !flag_pic || (*targetm.binds_local_p) (function))
+  if (1 || !GCC_OPTION (flag_pic) || (*targetm.binds_local_p) (function))
     output_asm_insn ("jump.l\t%P0", xops);
 }
 
@@ -5696,7 +5696,7 @@ bfin_conditional_register_usage (void)
   bfin_rets_rtx = gen_rtx_REG (Pmode, REG_RETS);
   if (TARGET_FDPIC)
     call_used_regs[FDPIC_REGNO] = 1;
-  if (!TARGET_FDPIC && flag_pic)
+  if (!TARGET_FDPIC && GCC_OPTION (flag_pic))
     {
       fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;
       call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;
diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h
index d6f4c61..b3460c2 100644
--- a/gcc/config/bfin/bfin.h
+++ b/gcc/config/bfin/bfin.h
@@ -40,7 +40,7 @@
       builtin_define ("__ADSPBLACKFIN__");	\
       builtin_define ("__ADSPLPBLACKFIN__");	\
 						\
-      switch (bfin_cpu_type)			\
+      switch (GCC_OPTION (bfin_cpu_type))			\
 	{					\
 	case BFIN_CPU_BF512:			\
 	  builtin_define ("__ADSPBF512__");	\
@@ -145,16 +145,16 @@
 	  break;                \
 	}					\
 						\
-      if (bfin_si_revision != -1)		\
+      if (GCC_OPTION (bfin_si_revision) != -1)		\
 	{					\
 	  /* space of 0xnnnn and a NUL */	\
 	  char *buf = XALLOCAVEC (char, 7);	\
 						\
-	  sprintf (buf, "0x%04x", bfin_si_revision);			\
+	  sprintf (buf, "0x%04x", GCC_OPTION (bfin_si_revision));			\
 	  builtin_define_with_value ("__SILICON_REVISION__", buf, 0);	\
 	}								\
 									\
-      if (bfin_workarounds)						\
+      if (GCC_OPTION (bfin_workarounds))						\
 	builtin_define ("__WORKAROUNDS_ENABLED");			\
       if (ENABLE_WA_SPECULATIVE_LOADS)					\
 	builtin_define ("__WORKAROUND_SPECULATIVE_LOADS");		\
@@ -173,7 +173,7 @@
       if (TARGET_ID_SHARED_LIBRARY		\
 	  && !TARGET_SEP_DATA)			\
 	builtin_define ("__ID_SHARED_LIB__");	\
-      if (flag_no_builtin)			\
+      if (GCC_OPTION (flag_no_builtin))			\
 	builtin_define ("__NO_BUILTIN");	\
       if (TARGET_MULTICORE)			\
 	builtin_define ("__BFIN_MULTICORE");	\
@@ -954,7 +954,7 @@ typedef struct {
      Do not define this macro if it would never modify M.*/
 
 #define BFIN_PROMOTE_MODE_P(MODE) \
-    (!TARGET_DSP && GET_MODE_CLASS (MODE) == MODE_INT	\
+    (!GCC_OPTION (TARGET_DSP) && GET_MODE_CLASS (MODE) == MODE_INT	\
       && GET_MODE_SIZE (MODE) < UNITS_PER_WORD)
 
 #define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE)     \
@@ -976,7 +976,7 @@ typedef struct {
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE SImode
 
-#define JUMP_TABLES_IN_TEXT_SECTION flag_pic
+#define JUMP_TABLES_IN_TEXT_SECTION GCC_OPTION (flag_pic)
 
 /* Define if operations between registers always perform the operation
    on the full register even if a narrower mode is specified. 
@@ -1108,7 +1108,7 @@ do { 						\
 #define FUNCTION_PROFILER(FILE, LABELNO)	\
   do {						\
     fprintf (FILE, "\t[--SP] = RETS;\n");	\
-    if (TARGET_LONG_CALLS)			\
+    if (GCC_OPTION (TARGET_LONG_CALLS))			\
       {						\
 	fprintf (FILE, "\tP2.h = __mcount;\n");	\
 	fprintf (FILE, "\tP2.l = __mcount;\n");	\
diff --git a/gcc/config/bfin/bfin.md b/gcc/config/bfin/bfin.md
index f5e64d3..8ced6cd 100644
--- a/gcc/config/bfin/bfin.md
+++ b/gcc/config/bfin/bfin.md
@@ -633,13 +633,13 @@
 (define_split
   [(set (match_operand:SI 0 "d_register_operand" "")
 	(const_int 0))]
-  "splitting_for_sched && !optimize_size"
+  "splitting_for_sched && !GCC_OPTION (optimize_size)"
   [(set (match_dup 0) (unspec:SI [(const_int 0)] UNSPEC_32BIT))])
 
 (define_split
   [(set (match_operand:SI 0 "d_register_operand" "")
 	(match_operand:SI 1 "d_register_operand" ""))]
-  "splitting_for_sched && !optimize_size"
+  "splitting_for_sched && !GCC_OPTION (optimize_size)"
   [(set (match_dup 0) (unspec:SI [(match_dup 1)] UNSPEC_32BIT))])
 
 (define_insn_and_split "*movv2hi_insn"
@@ -1548,7 +1548,7 @@
      (clobber (reg:PDI REG_A1))])]
   ""
 {
-  if (!optimize_size)
+  if (!GCC_OPTION (optimize_size))
     {
       rtx a1reg = gen_rtx_REG (PDImode, REG_A1);
       rtx a0reg = gen_rtx_REG (PDImode, REG_A0);
@@ -1599,7 +1599,7 @@
      (clobber (reg:PDI REG_A1))])]
   ""
 {
-  if (!optimize_size)
+  if (!GCC_OPTION (optimize_size))
     {
       rtx a1reg = gen_rtx_REG (PDImode, REG_A1);
       rtx a0reg = gen_rtx_REG (PDImode, REG_A0);
@@ -1910,7 +1910,7 @@
 {
   /* In PIC mode, the table entries are stored PC relative.
      Convert the relative address to an absolute address.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       rtx op1 = gen_rtx_LABEL_REF (Pmode, operands[1]);
 
diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c
index 9ba10df..3508e40 100644
--- a/gcc/config/c6x/c6x.c
+++ b/gcc/config/c6x/c6x.c
@@ -222,25 +222,25 @@ c6x_option_override (void)
       c6x_insn_mask |= all_isas[c6x_arch_option].features;
     }
 
-  c6x_flag_schedule_insns2 = flag_schedule_insns_after_reload;
-  flag_schedule_insns_after_reload = 0;
+  c6x_flag_schedule_insns2 = GCC_OPTION (flag_schedule_insns_after_reload);
+  GCC_OPTION (flag_schedule_insns_after_reload) = 0;
 
-  c6x_flag_modulo_sched = flag_modulo_sched;
-  flag_modulo_sched = 0;
+  c6x_flag_modulo_sched = GCC_OPTION (flag_modulo_sched);
+  GCC_OPTION (flag_modulo_sched) = 0;
 
   init_machine_status = c6x_init_machine_status;
 
   for (i = 0; i < ARRAY_SIZE (c6x_unit_names); i++)
     c6x_unit_codes[i] = get_cpu_unit_code (c6x_unit_names[i]);
 
-  if (flag_pic && !TARGET_DSBT)
+  if (GCC_OPTION (flag_pic) && !TARGET_DSBT)
     {
       error ("-fpic and -fPIC not supported without -mdsbt on this target");
-      flag_pic = 0;
+      GCC_OPTION (flag_pic) = 0;
     }
-  c6x_initial_flag_pic = flag_pic;
-  if (TARGET_DSBT && !flag_pic)
-    flag_pic = 1;
+  c6x_initial_flag_pic = GCC_OPTION (flag_pic);
+  if (TARGET_DSBT && !GCC_OPTION (flag_pic))
+    GCC_OPTION (flag_pic) = 1;
 }
 
 
@@ -389,8 +389,8 @@ c6x_file_start (void)
      of insns.  It also needs a valid CFG.  This can't be done in
      c6x_override_options, because flag_var_tracking is finalized after
      that.  */
-  c6x_flag_var_tracking = flag_var_tracking;
-  flag_var_tracking = 0;
+  c6x_flag_var_tracking = GCC_OPTION (flag_var_tracking);
+  GCC_OPTION (flag_var_tracking) = 0;
 
   done_cfi_sections = false;
   default_file_start ();
@@ -431,10 +431,10 @@ c6x_output_file_unwind (FILE * f)
   /* Output a .cfi_sections directive.  */
   if (dwarf2out_do_frame ())
     {
-      if (flag_unwind_tables || flag_exceptions)
+      if (GCC_OPTION (flag_unwind_tables) || GCC_OPTION (flag_exceptions))
 	{
-	  if (write_symbols == DWARF2_DEBUG
-	      || write_symbols == VMS_AND_DWARF2_DEBUG)
+	  if (GCC_OPTION (write_symbols) == DWARF2_DEBUG
+	      || GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
 	    asm_fprintf (f, "\t.cfi_sections .debug_frame, .c6xabi.exidx\n");
 	  else
 	    asm_fprintf (f, "\t.cfi_sections .c6xabi.exidx\n");
@@ -451,11 +451,11 @@ static void
 c6x_output_fn_unwind (FILE * f)
 {
   /* Return immediately if we are not generating unwinding tables.  */
-  if (! (flag_unwind_tables || flag_exceptions))
+  if (! (GCC_OPTION (flag_unwind_tables) || GCC_OPTION (flag_exceptions)))
     return;
 
   /* If this function will never be unwound, then mark it as such.  */
-  if (!(flag_unwind_tables || crtl->uses_eh_lsda)
+  if (!(GCC_OPTION (flag_unwind_tables) || crtl->uses_eh_lsda)
       && (TREE_NOTHROW (current_function_decl)
 	  || crtl->all_throwers_are_sibcalls))
     fputs("\t.cantunwind\n", f);
@@ -751,7 +751,7 @@ c6x_can_output_mi_thunk (const_tree thunk ATTRIBUTE_UNUSED,
 			 HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED,
 			 const_tree function ATTRIBUTE_UNUSED)
 {
-  return !TARGET_LONG_CALLS;
+  return !GCC_OPTION (TARGET_LONG_CALLS);
 }
 
 /* Output the assembler code for a thunk function.  THUNK is the
@@ -895,8 +895,8 @@ static section *
 c6x_select_rtx_section (enum machine_mode mode, rtx x,
 			unsigned HOST_WIDE_INT align)
 {
-  if (c6x_sdata_mode == C6X_SDATA_ALL
-      || (c6x_sdata_mode != C6X_SDATA_NONE && GET_MODE_SIZE (mode) <= 8))
+  if (GCC_OPTION (c6x_sdata_mode) == C6X_SDATA_ALL
+      || (GCC_OPTION (c6x_sdata_mode) != C6X_SDATA_NONE && GET_MODE_SIZE (mode) <= 8))
     /* ??? Consider using mergeable sdata sections.  */
     return sdata_section;
   else
@@ -1162,7 +1162,7 @@ c6x_function_ok_for_sibcall (tree decl, tree exp)
   if (c6x_call_saved_register_used (exp))
     return false;
 
-  if (!flag_pic)
+  if (!GCC_OPTION (flag_pic))
     return true;
 
   if (TARGET_DSBT)
@@ -1202,7 +1202,7 @@ c6x_function_in_section_p (tree decl, section *section)
   if (!DECL_SECTION_NAME (decl))
     {
       /* Make sure that we will not create a unique section for DECL.  */
-      if (flag_function_sections || DECL_ONE_ONLY (decl))
+      if (GCC_OPTION (flag_function_sections) || DECL_ONE_ONLY (decl))
 	return false;
     }
 
@@ -1216,7 +1216,7 @@ c6x_long_call_p (rtx op)
 {
   tree decl;
 
-  if (!TARGET_LONG_CALLS)
+  if (!GCC_OPTION (TARGET_LONG_CALLS))
     return false;
 
   decl = SYMBOL_REF_DECL (op);
@@ -1225,7 +1225,7 @@ c6x_long_call_p (rtx op)
      function.  Be conservative, and only cater for cases in which the
      whole of the current function is placed in the same section.  */
   if (decl != NULL_TREE
-      && !flag_reorder_blocks_and_partition
+      && !GCC_OPTION (flag_reorder_blocks_and_partition)
       && TREE_CODE (decl) == FUNCTION_DECL
       && c6x_function_in_section_p (decl, current_function_section ()))
     return false;
@@ -1260,7 +1260,7 @@ c6x_expand_call (rtx retval, rtx address, bool sibcall)
 	call_insn = emit_call_insn (gen_rtx_SET (GET_MODE (retval), retval,
 						 call_insn));
     }
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), pic_offset_table_rtx);
 }
 
@@ -1286,7 +1286,7 @@ legitimize_pic_address (rtx orig, rtx reg, rtx picreg)
 	  gcc_assert (can_create_pseudo_p ());
 	  reg = gen_reg_rtx (Pmode);
 	}
-      if (flag_pic == 2)
+      if (GCC_OPTION (flag_pic) == 2)
 	{
 	  if (can_create_pseudo_p ())
 	    tmp = gen_reg_rtx (Pmode);
@@ -1365,7 +1365,7 @@ expand_move (rtx *operands, enum machine_mode mode)
     operands[1] = force_reg (mode, op);
   else if (mode == SImode && symbolic_operand (op, SImode))
     {
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	{
 	  if (sdata_symbolic_operand (op, SImode))
 	    {
@@ -1484,7 +1484,7 @@ c6x_expand_compare (rtx comparison, enum machine_mode mode)
 	}
       cmp = cmp1;
     }
-  else if (TARGET_FP && !flag_finite_math_only
+  else if (TARGET_FP && !GCC_OPTION (flag_finite_math_only)
 	   && (op_mode == DFmode || op_mode == SFmode)
 	   && code != EQ && code != NE && code != LT && code != GT
 	   && code != UNLE && code != UNGE)
@@ -2409,13 +2409,13 @@ c6x_legitimate_address_p_1 (enum machine_mode mode, rtx x, bool strict,
       else
 	size = GET_MODE_SIZE (mode);
 
-      if (flag_pic
+      if (GCC_OPTION (flag_pic)
 	  && GET_CODE (XEXP (x, 1)) == UNSPEC
 	  && XINT (XEXP (x, 1), 1) == UNSPEC_LOAD_SDATA
 	  && XEXP (x, 0) == pic_offset_table_rtx
 	  && sdata_symbolic_operand (XVECEXP (XEXP (x, 1), 0, 0), SImode))
 	return !no_large_offset && size <= 4;
-      if (flag_pic == 1
+      if (GCC_OPTION (flag_pic) == 1
 	  && mode == Pmode
 	  && GET_CODE (XEXP (x, 1)) == UNSPEC
 	  && XINT (XEXP (x, 1), 1) == UNSPEC_LOAD_GOT
@@ -2450,7 +2450,7 @@ c6x_legitimate_address_p_1 (enum machine_mode mode, rtx x, bool strict,
       return (!no_large_offset
 	      /* With -fpic, we must wrap it in an unspec to show the B14
 		 dependency.  */
-	      && !flag_pic
+	      && !GCC_OPTION (flag_pic)
 	      && GET_MODE_SIZE (mode) <= UNITS_PER_WORD
 	      && sdata_symbolic_operand (x, Pmode));
 
@@ -2569,7 +2569,7 @@ use_push_rts_p (int nregs)
   if (TARGET_INSNS_64PLUS && optimize_function_for_size_p (cfun)
       && !cfun->machine->contains_sibcall
       && !cfun->returns_struct
-      && !TARGET_LONG_CALLS
+      && !GCC_OPTION (TARGET_LONG_CALLS)
       && nregs >= 6 && !frame_pointer_needed)
     return true;
   return false;
@@ -2758,7 +2758,7 @@ c6x_expand_prologue (void)
 
   c6x_compute_frame_layout (&frame);
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = frame.to_allocate;
 
   initial_offset = -frame.to_allocate;
@@ -5894,7 +5894,7 @@ static struct hw_doloop_hooks c6x_doloop_hooks =
 static void
 c6x_hwloops (void)
 {
-  if (optimize)
+  if (GCC_OPTION (optimize))
     reorg_loops (true, &c6x_doloop_hooks);
 }
 
@@ -5908,7 +5908,7 @@ c6x_reorg (void)
 {
   basic_block bb;
   rtx *call_labels;
-  bool do_selsched = (c6x_flag_schedule_insns2 && flag_selective_scheduling2
+  bool do_selsched = (c6x_flag_schedule_insns2 && GCC_OPTION (flag_selective_scheduling2)
 		      && !maybe_skip_selective_scheduling ());
 
   /* We are freeing block_for_insn in the toplev to keep compatibility
@@ -5919,7 +5919,7 @@ c6x_reorg (void)
   df_note_add_problem ();
 
   /* If optimizing, we'll have split before scheduling.  */
-  if (optimize == 0)
+  if (GCC_OPTION (optimize) == 0)
     split_all_insns ();
 
   df_analyze ();
@@ -5995,7 +5995,7 @@ c6x_function_end (FILE *file, const char *fname)
 
   insn_info.release ();
 
-  if (!flag_inhibit_size_directive)
+  if (!GCC_OPTION (flag_inhibit_size_directive))
     ASM_OUTPUT_MEASURED_SIZE (file, fname);
 }
 
@@ -6673,7 +6673,7 @@ c6x_expand_builtin (tree exp, rtx target ATTRIBUTE_UNUSED,
 static enum unwind_info_type
 c6x_debug_unwind_info (void)
 {
-  if (flag_unwind_tables || flag_exceptions)
+  if (GCC_OPTION (flag_unwind_tables) || GCC_OPTION (flag_exceptions))
     return UI_DWARF2;
 
   return default_debug_unwind_info ();
diff --git a/gcc/config/c6x/c6x.h b/gcc/config/c6x/c6x.h
index e0a60a9..cef94c9 100644
--- a/gcc/config/c6x/c6x.h
+++ b/gcc/config/c6x/c6x.h
@@ -547,8 +547,8 @@ do { char __buf[256];					\
 /* Determine whether to place EXP (an expression or a decl) should be
    placed into one of the small data sections.  */
 #define PLACE_IN_SDATA_P(EXP) \
-  (c6x_sdata_mode == C6X_SDATA_NONE ? false	\
-   : c6x_sdata_mode == C6X_SDATA_ALL ? true	\
+  (GCC_OPTION (c6x_sdata_mode) == C6X_SDATA_NONE ? false	\
+   : GCC_OPTION (c6x_sdata_mode) == C6X_SDATA_ALL ? true	\
    : !AGGREGATE_TYPE_P (TREE_TYPE (EXP)))
 
 #define SCOMMON_ASM_OP "\t.scomm\t"
@@ -577,15 +577,15 @@ do {									\
   else									\
     switch_to_section (bss_section);					\
   ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");			\
-  if (!flag_inhibit_size_directive)					\
+  if (!GCC_OPTION (flag_inhibit_size_directive))					\
     ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE);			\
   ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT));	\
   ASM_OUTPUT_LABEL(FILE, NAME);						\
   ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1);				\
 } while (0)
 
-#define CASE_VECTOR_PC_RELATIVE flag_pic
-#define JUMP_TABLES_IN_TEXT_SECTION flag_pic
+#define CASE_VECTOR_PC_RELATIVE GCC_OPTION (flag_pic)
+#define JUMP_TABLES_IN_TEXT_SECTION GCC_OPTION (flag_pic)
 
 #define ADDR_VEC_ALIGN(VEC) (JUMP_TABLES_IN_TEXT_SECTION ? 5 : 2)
 
diff --git a/gcc/config/c6x/c6x.md b/gcc/config/c6x/c6x.md
index 53032b1..2b914b8 100644
--- a/gcc/config/c6x/c6x.md
+++ b/gcc/config/c6x/c6x.md
@@ -410,7 +410,7 @@
 	(lo_sum:SI (match_operand:SI 1 "register_operand" "0")
 		   (unspec:SI [(match_operand:SI 2 "symbolic_operand" "S2")]
 			      UNSPEC_GOTOFF)))]
-  "flag_pic == 2"
+  "GCC_OPTION (flag_pic) == 2"
   "%|%.\\tmvkh\\t%$\\t$dpr_got%2, %0"
   [(set_attr "units" "s")])
 
@@ -418,7 +418,7 @@
   [(set (match_operand:SI 0 "register_operand" "=ab")
 	(high:SI (unspec:SI [(match_operand:SI 1 "symbolic_operand" "S2")]
 			    UNSPEC_GOTOFF)))]
-  "flag_pic == 2"
+  "GCC_OPTION (flag_pic) == 2"
   "%|%.\\tmvkl\\t%$\\t$dpr_got%1, %0"
   [(set_attr "units" "s")])
 
@@ -429,7 +429,7 @@
 	(unspec:SI [(match_operand:SI 1 "register_operand" "Z,Z")
 		    (match_operand:SI 2 "register_operand" "b,b")]
 		   UNSPEC_GOTOFF))]
-  "flag_pic == 2"
+  "GCC_OPTION (flag_pic) == 2"
   "%|%.\\tldw\\t%$\\t*+%1[%2], %0"
   [(set_attr "type" "load")
    (set_attr "units" "d_addr")
@@ -584,7 +584,7 @@
 	(plus:SI (match_operand:SI 1 "pic_register_operand" "Z,Z")
 		 (unspec:SI [(match_operand:SI 2 "sdata_symbolic_operand" "S0,S0")]
 			    UNSPEC_LOAD_SDATA)))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "@
    %|%.\\tadda%D2\\t%$\\t%1, %2, %0
    %|%.\\tadda%D2\\t%$\\t%1, %2, %0"
@@ -1257,14 +1257,14 @@
 (define_expand "tablejump"
   [(parallel [(set (pc) (match_operand:SI 0 "register_operand" ""))
               (use (label_ref (match_operand 1 "" "")))])]
-  "!flag_pic || !TARGET_INSNS_64"
+  "!GCC_OPTION (flag_pic) || !TARGET_INSNS_64"
 {
 })
 
 (define_insn "*tablejump_internal"
   [(set (pc) (match_operand:SI 0 "register_operand" "b"))
    (use (label_ref (match_operand 1 "" "")))]
-  "!flag_pic || !TARGET_INSNS_64"
+  "!GCC_OPTION (flag_pic) || !TARGET_INSNS_64"
   "%|\\tb\\t%$\\t%0"
   [(set_attr "type" "branch")
    (set_attr "predicable" "no")
@@ -1287,7 +1287,7 @@
    (use (match_operand:SI 2 "const_int_operand" ""))
    (use (match_operand 3 "" ""))
    (use (match_operand 4 "" ""))]
-  "flag_pic && TARGET_INSNS_64"
+  "GCC_OPTION (flag_pic) && TARGET_INSNS_64"
 {
   rtx indx;
   rtx low = operands[1];
@@ -1330,7 +1330,7 @@
 			 (label_ref (match_operand 1 "" "")))))
    (clobber (match_scratch:SI 2 "=&b"))
    (clobber (match_scratch:SI 3 "=b"))]
-  "flag_pic && TARGET_INSNS_64"
+  "GCC_OPTION (flag_pic) && TARGET_INSNS_64"
   "addkpc\t.s2\t%l1,%2, 0\n\t\tldw\t.d2t2\t*+%2[%0], %3\n\t\tnop\t\t4\n\t\tadd\t.l2\t%2, %3, %3\n\t\tb\t.s2\t%3"
   [(set_attr "type" "branch")
    (set_attr "predicable" "no")
@@ -1432,7 +1432,7 @@
 		   (plus:SI (match_dup 0)
 			    (const_int -1)))
 	      (clobber (match_dup 2))])] ; match_scratch
-  "TARGET_INSNS_64PLUS && optimize"
+  "TARGET_INSNS_64PLUS && GCC_OPTION (optimize)"
 {
   /* The loop optimizer doesn't check the predicates... */
   if (GET_MODE (operands[0]) != SImode)
@@ -1485,7 +1485,7 @@
 	(plus:SI (match_dup 3)
 		 (const_int -1)))
    (clobber (match_scratch:SI 2 "=X,&AB,&AB,&AB"))]
-  "TARGET_INSNS_64PLUS && optimize"
+  "TARGET_INSNS_64PLUS && GCC_OPTION (optimize)"
   "#"
   [(set_attr "type" "spkernel")])
 
@@ -2550,7 +2550,7 @@
 {
   rtx reg = NULL_RTX;
 
-  if (TARGET_LONG_CALLS)
+  if (GCC_OPTION (TARGET_LONG_CALLS))
     {
       if (reload_completed)
 	reg = gen_rtx_REG (SImode, REG_A6);
@@ -2561,7 +2561,7 @@
   emit_move_insn (gen_rtx_REG (SImode, REG_B4), operands[2]);
   if (find_reg_note (curr_insn, REG_UNUSED, operands[3]))
     {
-      if (TARGET_LONG_CALLS)
+      if (GCC_OPTION (TARGET_LONG_CALLS))
 	{
 	  emit_move_insn (reg, optab_libfunc (sdiv_optab, SImode));
 	  emit_insn (gen_divsi3_insn_indcall (reg));
@@ -2572,7 +2572,7 @@
     }
   else if (find_reg_note (curr_insn, REG_UNUSED, operands[0]))
     {
-      if (TARGET_LONG_CALLS)
+      if (GCC_OPTION (TARGET_LONG_CALLS))
 	{
 	  emit_move_insn (reg, optab_libfunc (smod_optab, SImode));
 	  emit_insn (gen_modsi3_insn_indcall (reg));
@@ -2583,7 +2583,7 @@
     }
   else
     {
-      if (TARGET_LONG_CALLS)
+      if (GCC_OPTION (TARGET_LONG_CALLS))
 	{
 	  emit_move_insn (reg, optab_libfunc (sdivmod_optab, SImode));
 	  emit_insn (gen_divmodsi4_insn_indcall (reg));
@@ -2623,7 +2623,7 @@
 {
   rtx reg = NULL_RTX;
 
-  if (TARGET_LONG_CALLS)
+  if (GCC_OPTION (TARGET_LONG_CALLS))
     {
       if (reload_completed)
 	reg = gen_rtx_REG (SImode, REG_A6);
@@ -2635,7 +2635,7 @@
   emit_move_insn (gen_rtx_REG (SImode, REG_B4), operands[2]);
   if (find_reg_note (curr_insn, REG_UNUSED, operands[3]))
     {
-      if (TARGET_LONG_CALLS)
+      if (GCC_OPTION (TARGET_LONG_CALLS))
 	{
 	  emit_move_insn (reg, optab_libfunc (udiv_optab, SImode));
 	  emit_insn (gen_udivsi3_insn_indcall (reg));
@@ -2646,7 +2646,7 @@
     }
   else if (find_reg_note (curr_insn, REG_UNUSED, operands[0]))
     {
-      if (TARGET_LONG_CALLS)
+      if (GCC_OPTION (TARGET_LONG_CALLS))
 	{
 	  emit_move_insn (reg, optab_libfunc (umod_optab, SImode));
 	  emit_insn (gen_umodsi3_insn_indcall (reg));
@@ -2657,7 +2657,7 @@
     }
   else
     {
-      if (TARGET_LONG_CALLS)
+      if (GCC_OPTION (TARGET_LONG_CALLS))
 	{
 	  emit_move_insn (reg, optab_libfunc (udivmod_optab, SImode));
 	  emit_insn (gen_udivmodsi4_insn_indcall (reg));
@@ -2808,7 +2808,7 @@
    (set (match_operand:SF 0 "register_operand" "")
 	(mult:SF (match_operand:SF 1 "register_operand")
 		 (match_dup 4)))]
-  "TARGET_FP && flag_reciprocal_math"
+  "TARGET_FP && GCC_OPTION (flag_reciprocal_math)"
 {
   operands[3] = force_reg (SFmode,
 			   CONST_DOUBLE_FROM_REAL_VALUE (dconst2, SFmode));
@@ -2833,7 +2833,7 @@
    (set (match_operand:DF 0 "register_operand" "")
 	(mult:DF (match_operand:DF 1 "register_operand")
 		 (match_dup 4)))]
-  "TARGET_FP && flag_reciprocal_math"
+  "TARGET_FP && GCC_OPTION (flag_reciprocal_math)"
 {
   operands[3] = force_reg (DFmode,
 			   CONST_DOUBLE_FROM_REAL_VALUE (dconst2, DFmode));
diff --git a/gcc/config/cr16/cr16.c b/gcc/config/cr16/cr16.c
index f5a444be..96b1e94 100644
--- a/gcc/config/cr16/cr16.c
+++ b/gcc/config/cr16/cr16.c
@@ -65,7 +65,7 @@
 /* Predicate that holds when we need to save registers even for 'noreturn'
    functions, to accommodate for unwinding.  */
 #define MUST_SAVE_REGS_P() \
-  (flag_unwind_tables || (flag_exceptions && !UI_SJLJ))
+  (GCC_OPTION (flag_unwind_tables) || (GCC_OPTION (flag_exceptions) && !UI_SJLJ))
 
 /* Nonzero if the rtx X is a signed const int of n bits.  */
 #define RTX_SIGNED_INT_FITS_N_BITS(X, n)                \
@@ -265,30 +265,30 @@ cr16_override_options (void)
      Programs which rely on NULL pointer dereferences _not_ halting the 
      program may not work properly with this option. So disable this 
      option.  */
-  flag_delete_null_pointer_checks = 0;
+  GCC_OPTION (flag_delete_null_pointer_checks) = 0;
 
   /* FIXME: To avoid spill_failure ICE during exception handling,
    * disable cse_fllow_jumps. The spill error occurs when compiler
    * can't find a suitable candidate in GENERAL_REGS class to reload
    * a 32bit register.
    * Need to find a better way of avoiding this situation. */
-  if (flag_exceptions)
-    flag_cse_follow_jumps = 0;
+  if (GCC_OPTION (flag_exceptions))
+    GCC_OPTION (flag_cse_follow_jumps) = 0;
 
   /* If -fpic option, data_model == DM_FAR.  */
-  if (flag_pic == NEAR_PIC)
+  if (GCC_OPTION (flag_pic) == NEAR_PIC)
     {
       data_model = DM_FAR;
     }
 
   /* The only option we want to examine is data model option.  */
-  if (cr16_data_model)
+  if (GCC_OPTION (cr16_data_model))
     {
-      if (strcmp (cr16_data_model, "medium") == 0)
+      if (strcmp (GCC_OPTION (cr16_data_model), "medium") == 0)
 	data_model = DM_DEFAULT;
-      else if (strcmp (cr16_data_model, "near") == 0)
+      else if (strcmp (GCC_OPTION (cr16_data_model), "near") == 0)
 	data_model = DM_NEAR;
-      else if (strcmp (cr16_data_model, "far") == 0)
+      else if (strcmp (GCC_OPTION (cr16_data_model), "far") == 0)
 	{
 	  if (TARGET_CR16CP)
 	    data_model = DM_FAR;
@@ -296,7 +296,7 @@ cr16_override_options (void)
 	    error ("data-model=far not valid for cr16c architecture");
 	}
       else
-	error ("invalid data model option -mdata-model=%s", cr16_data_model);
+	error ("invalid data model option -mdata-model=%s", GCC_OPTION (cr16_data_model));
     }
   else
     data_model = DM_DEFAULT;
@@ -306,7 +306,7 @@ cr16_override_options (void)
 static void
 cr16_conditional_register_usage (void)
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       fixed_regs[12] = call_used_regs[12] = 1;
     }
@@ -1165,13 +1165,13 @@ legitimize_pic_address (rtx orig, enum machine_mode mode ATTRIBUTE_UNUSED,
       if (reg == 0)
 	reg = gen_reg_rtx (Pmode);
 
-      if (flag_pic == NEAR_PIC)
+      if (GCC_OPTION (flag_pic) == NEAR_PIC)
 	{
 	  /* Unspec to handle -fpic option.  */
 	  emit_insn (gen_unspec_bro_addr (reg, orig));
 	  emit_insn (gen_addsi3 (reg, reg, pic_offset_table_rtx));
 	}
-      else if (flag_pic == FAR_PIC)
+      else if (GCC_OPTION (flag_pic) == FAR_PIC)
 	{
 	  /* Unspec to handle -fPIC option.  */
 	  emit_insn (gen_unspec_got_addr (reg, orig));
@@ -1215,7 +1215,7 @@ cr16_legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED,
   enum cr16_addrtype addrtype;
   struct cr16_address address;
 
-  if (TARGET_DEBUG_ADDR)
+  if (GCC_OPTION (TARGET_DEBUG_ADDR))
     {
       fprintf (stderr,
 	       "\n======\nTARGET_LEGITIMATE_ADDRESS_P, mode = %s, strict = %d",
@@ -1223,9 +1223,9 @@ cr16_legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED,
       debug_rtx (addr);
     }
   addrtype = cr16_decompose_address (addr, &address,
-				     (TARGET_DEBUG_ADDR ? 1 : 0), FALSE);
+				     (GCC_OPTION (TARGET_DEBUG_ADDR) ? 1 : 0), FALSE);
 
-  if (TARGET_DEBUG_ADDR)
+  if (GCC_OPTION (TARGET_DEBUG_ADDR))
     {
       const char *typestr;
 
@@ -1260,20 +1260,20 @@ cr16_legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED,
       if (address.base
 	  && !REGNO_MODE_OK_FOR_BASE_P (REGNO (address.base), mode))
 	{
-	  if (TARGET_DEBUG_ADDR)
+	  if (GCC_OPTION (TARGET_DEBUG_ADDR))
 	    fprintf (stderr, "base register not strict\n");
 	  return FALSE;
 	}
       if (address.index && !REGNO_OK_FOR_INDEX_P (REGNO (address.index)))
 	{
-	  if (TARGET_DEBUG_ADDR)
+	  if (GCC_OPTION (TARGET_DEBUG_ADDR))
 	    fprintf (stderr, "index register not strict\n");
 	  return FALSE;
 	}
     }
 
   /* Return true if addressing mode is register relative.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       if (addrtype == CR16_REG_REL || addrtype == CR16_REGP_REL)
 	return TRUE;
@@ -1328,7 +1328,7 @@ cr16_address_cost (rtx addr, enum machine_mode mode ATTRIBUTE_UNUSED,
       break;
     }
 
-  if (TARGET_DEBUG_ADDR)
+  if (GCC_OPTION (TARGET_DEBUG_ADDR))
     {
       fprintf (stderr, "\n======\nmacro TARGET_ADDRESS_COST = %d\n", cost);
       debug_rtx (addr);
@@ -1603,7 +1603,7 @@ cr16_print_operand_address (FILE * file, rtx addr)
       gcc_unreachable ();
     }
   /* Add qualifiers to the address expression that was just printed.  */
-  if (flag_pic < NEAR_PIC && address.code == 0)
+  if (GCC_OPTION (flag_pic) < NEAR_PIC && address.code == 0)
     {
       if (address.data == DM_FAR)
 	/* Addr contains SYMBOL_REF & far data ptr.  */
@@ -1616,23 +1616,23 @@ cr16_print_operand_address (FILE * file, rtx addr)
 	/* Addr contains SYMBOL_REF & near data ptr.  */
 	fprintf (file, "@s");
     }
-  else if (flag_pic == NEAR_PIC
+  else if (GCC_OPTION (flag_pic) == NEAR_PIC
 	   && (address.code == 0) && (address.data == DM_FAR
 				      || address.data == DM_DEFAULT
 				      || address.data == DM_NEAR))
     {
       fprintf (file, "@l");
     }
-  else if (flag_pic == NEAR_PIC && address.code == 2)
+  else if (GCC_OPTION (flag_pic) == NEAR_PIC && address.code == 2)
     {
       fprintf (file, "pic");
     }
-  else if (flag_pic == NEAR_PIC && address.code == 1)
+  else if (GCC_OPTION (flag_pic) == NEAR_PIC && address.code == 1)
     {
       fprintf (file, "@cpic");
     }
 
-  else if (flag_pic == FAR_PIC && address.code == 2)
+  else if (GCC_OPTION (flag_pic) == FAR_PIC && address.code == 2)
     {
       /* REVISIT: cr16 register indirect jump expects a 1-bit right shifted
          address ! GOTc tells assembler this symbol is a text-address 
@@ -1643,12 +1643,12 @@ cr16_print_operand_address (FILE * file, rtx addr)
          processor.  */
       fprintf (file, "GOT (%s)", reg_names[PIC_OFFSET_TABLE_REGNUM]);
     }
-  else if (flag_pic == FAR_PIC && address.code == 1)
+  else if (GCC_OPTION (flag_pic) == FAR_PIC && address.code == 1)
     {
       fprintf (file, "@cGOT (%s)", reg_names[PIC_OFFSET_TABLE_REGNUM]);
     }
 
-  else if (flag_pic == FAR_PIC &&
+  else if (GCC_OPTION (flag_pic) == FAR_PIC &&
 	   (address.data == DM_FAR || address.data == DM_DEFAULT
 	    || address.data == DM_NEAR))
     {
@@ -2049,7 +2049,7 @@ static rtx
 cr16_legitimize_address (rtx x, rtx orig_x ATTRIBUTE_UNUSED,
 			 enum machine_mode mode ATTRIBUTE_UNUSED)
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     return legitimize_pic_address (orig_x, mode, NULL_RTX);
   else
     return x;
diff --git a/gcc/config/cr16/cr16.md b/gcc/config/cr16/cr16.md
index fb2fc9b..08bee94 100644
--- a/gcc/config/cr16/cr16.md
+++ b/gcc/config/cr16/cr16.md
@@ -621,7 +621,7 @@
 	  }
 
 	  /* If operand-1 is a symbol, convert it into a BRO or GOT Format.  */
-	  if (flag_pic && ! legitimate_pic_operand_p (operands[1]))
+	  if (GCC_OPTION (flag_pic) && ! legitimate_pic_operand_p (operands[1]))
 	    {
 	      operands[1] = legitimize_pic_address (operands[1], <MODE>mode, 0);
 	    }
@@ -897,7 +897,7 @@
   [(set (pc)
 	(match_operand:SI 0 "register_operand" "r"))
    (use (label_ref:SI (match_operand 1 "" "")))]
-  "!flag_pic"
+  "!GCC_OPTION (flag_pic)"
   "jump\t%0"
   [(set_attr "length" "2")]
 )
@@ -908,7 +908,7 @@
 	 (match_operand 1 "" ""))]
   ""
   {
-    if (flag_pic && ! legitimate_pic_operand_p (operands[0]))
+    if (GCC_OPTION (flag_pic) && ! legitimate_pic_operand_p (operands[0]))
       {
 	operands[0] = gen_const_mem (QImode,
 	legitimize_pic_address (XEXP (operands[0], 0), Pmode, 0));
@@ -933,7 +933,7 @@
   [(call (mem:QI (match_operand:SI 0 "call_imm_operand" "i"))
 	 (match_operand 1 "" ""))
    (clobber (match_operand:SI 2 "register_operand" "+r"))]
-  "flag_pic == FAR_PIC"
+  "GCC_OPTION (flag_pic) == FAR_PIC"
   {
     if (GET_CODE (operands[0]) != CONST_INT)
       return "loadd\t%g0, %2 \n\tjal %2";
@@ -947,7 +947,7 @@
   [(call (mem:QI (match_operand:SI 0 "call_imm_operand" "i"))
 	 (match_operand 1 "" ""))
    (clobber (match_operand:SI 2 "register_operand" "+r"))]
-  "flag_pic == 0 || flag_pic == NEAR_PIC"
+  "GCC_OPTION (flag_pic) == 0 || GCC_OPTION (flag_pic) == NEAR_PIC"
   {
     /* Print the immediate address for bal 
        'b' is used instead of 'a' to avoid compiler calling
@@ -981,7 +981,7 @@
 	      (match_operand 2 "" "")))]
   ""
   {
-    if (flag_pic && !legitimate_pic_operand_p (operands[1]))
+    if (GCC_OPTION (flag_pic) && !legitimate_pic_operand_p (operands[1]))
       {
 	operands[1] = gen_const_mem (QImode,
 	legitimize_pic_address (XEXP (operands[1], 0), Pmode, 0));
@@ -1008,7 +1008,7 @@
 	(call (mem:QI (match_operand:SI 1 "call_imm_operand" "i"))
 	      (match_operand 2 "" "")))
    (clobber (match_operand:SI 3 "register_operand" "+r"))]
-  "flag_pic == FAR_PIC"
+  "GCC_OPTION (flag_pic) == FAR_PIC"
   {
     if (GET_CODE (operands[1]) != CONST_INT)
       return "loadd\t%g1, %3 \n\tjal %3";
@@ -1023,7 +1023,7 @@
 	(call (mem:QI (match_operand:SI 1 "call_imm_operand" "i"))
 	      (match_operand 2 "" "")))
    (clobber (match_operand:SI 3 "register_operand" "+r"))]
-  "flag_pic == 0 || flag_pic == NEAR_PIC"
+  "GCC_OPTION (flag_pic) == 0 || GCC_OPTION (flag_pic) == NEAR_PIC"
   {
     /* Print the immediate address for bal 
        'b' is used instead of 'a' to avoid compiler calling
diff --git a/gcc/config/cris/constraints.md b/gcc/config/cris/constraints.md
index 651fbed..9e47b44 100644
--- a/gcc/config/cris/constraints.md
+++ b/gcc/config/cris/constraints.md
@@ -152,13 +152,13 @@
 
 (define_constraint "S"
   "PIC-constructs for symbols."
-  (and (match_test "flag_pic")
+  (and (match_test "GCC_OPTION (flag_pic)")
        (match_code "const")
        (match_test "cris_valid_pic_const (op, false)")))
 
 (define_constraint "U"
   "@internal"
-  (and (match_test "flag_pic")
+  (and (match_test "GCC_OPTION (flag_pic)")
        (match_test "CONSTANT_P (op)")
        (match_operand 0 "cris_nonmemory_operand_or_callable_symbol")))
 
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index 209f127..04a1e07 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -470,7 +470,7 @@ cris_conditional_register_usage (void)
 {
   /* FIXME: This isn't nice.  We should be able to use that register for
      something else if the PIC table isn't needed.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     fixed_regs[PIC_OFFSET_TABLE_REGNUM]
       = call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;
 
@@ -684,7 +684,7 @@ cris_reg_saved_in_regsave_area (unsigned int regno, bool got_really_used)
       || (regno == PIC_OFFSET_TABLE_REGNUM
 	  && (got_really_used
 	      /* It is saved anyway, if there would be a gap.  */
-	      || (flag_pic
+	      || (GCC_OPTION (flag_pic)
 		  && df_regs_ever_live_p (regno + 1)
 		  && !call_used_regs[regno + 1]))))
      && (regno != FRAME_POINTER_REGNUM || !frame_pointer_needed)
@@ -833,7 +833,7 @@ cris_print_operand (FILE *file, rtx x, int code)
     case 'Z':
       /* If this is a GOT-symbol, print the size-letter corresponding to
 	 -fpic/-fPIC.  For everything else, print "d".  */
-      putc ((flag_pic == 1
+      putc ((GCC_OPTION (flag_pic) == 1
 	     && GET_CODE (x) == CONST
 	     && GET_CODE (XEXP (x, 0)) == UNSPEC
 	     && XINT (XEXP (x, 0), 1) == CRIS_UNSPEC_GOTREAD)
@@ -859,14 +859,14 @@ cris_print_operand (FILE *file, rtx x, int code)
 	 (supposed) muls/mulu insn isn't located at the end of a
 	 cache-line.  */
       if (TARGET_MUL_BUG)
-	fputs (optimize_size
+	fputs (GCC_OPTION (optimize_size)
 	       ? ".p2alignw 2,0x050f\n\t"
 	       : ".p2alignw 5,0x050f,2\n\t", file);
       return;
 
     case ':':
       /* The PIC register.  */
-      if (! flag_pic)
+      if (! GCC_OPTION (flag_pic))
 	internal_error ("invalid use of ':' modifier");
       fprintf (file, "$%s", reg_names [PIC_OFFSET_TABLE_REGNUM]);
       return;
@@ -1041,13 +1041,13 @@ cris_print_operand (FILE *file, rtx x, int code)
       /* If this is a GOT symbol, force it to be emitted as :GOT and
 	 :GOTPLT regardless of -fpic (i.e. not as :GOT16, :GOTPLT16).
 	 Avoid making this too much of a special case.  */
-      if (flag_pic == 1 && CONSTANT_P (operand))
+      if (GCC_OPTION (flag_pic) == 1 && CONSTANT_P (operand))
 	{
-	  int flag_pic_save = flag_pic;
+	  int flag_pic_save = GCC_OPTION (flag_pic);
 
-	  flag_pic = 2;
+	  GCC_OPTION (flag_pic) = 2;
 	  cris_output_addr_const (file, operand);
-	  flag_pic = flag_pic_save;
+	  GCC_OPTION (flag_pic) = flag_pic_save;
 	  return;
 	}
       break;
@@ -1076,7 +1076,7 @@ cris_print_operand (FILE *file, rtx x, int code)
 
     case 'u':
       /* Print "u.w" if a GOT symbol and flag_pic == 1, else ".d".  */
-      if (flag_pic == 1
+      if (GCC_OPTION (flag_pic) == 1
 	  && GET_CODE (operand) == CONST
 	  && GET_CODE (XEXP (operand, 0)) == UNSPEC
 	  && XINT (XEXP (operand, 0), 1) == CRIS_UNSPEC_GOTREAD)
@@ -1358,7 +1358,7 @@ reg_ok_for_index_p (const_rtx x, bool strict)
 bool
 cris_constant_index_p (const_rtx x)
 {
-  return (CONSTANT_P (x) && (!flag_pic || cris_valid_pic_const (x, true)));
+  return (CONSTANT_P (x) && (!GCC_OPTION (flag_pic) || cris_valid_pic_const (x, true)));
 }
 
 /* True if X is a valid base register.  */
@@ -2423,7 +2423,7 @@ cris_reg_overlap_mentioned_p (rtx x, rtx in)
 bool
 cris_valid_pic_const (const_rtx x, bool any_operand)
 {
-  gcc_assert (flag_pic);
+  gcc_assert (GCC_OPTION (flag_pic));
 
   switch (GET_CODE (x))
     {
@@ -2586,9 +2586,9 @@ cris_asm_output_case_end (FILE *stream, int num, rtx table)
 static void
 cris_option_override (void)
 {
-  if (cris_max_stackframe_str)
+  if (GCC_OPTION (cris_max_stackframe_str))
     {
-      cris_max_stackframe = atoi (cris_max_stackframe_str);
+      cris_max_stackframe = atoi (GCC_OPTION (cris_max_stackframe_str));
 
       /* Do some sanity checking.  */
       if (cris_max_stackframe < 0 || cris_max_stackframe > 0x20000000)
@@ -2603,33 +2603,33 @@ cris_option_override (void)
     cris_cpu_version = CRIS_CPU_ETRAX4;
 
   /* Parse -march=... and its synonym, the deprecated -mcpu=...  */
-  if (cris_cpu_str)
+  if (GCC_OPTION (cris_cpu_str))
     {
       cris_cpu_version
-	= (*cris_cpu_str == 'v' ? atoi (cris_cpu_str + 1) : -1);
+	= (*GCC_OPTION (cris_cpu_str) == 'v' ? atoi (GCC_OPTION (cris_cpu_str) + 1) : -1);
 
-      if (strcmp ("etrax4", cris_cpu_str) == 0)
+      if (strcmp ("etrax4", GCC_OPTION (cris_cpu_str)) == 0)
 	cris_cpu_version = 3;
 
-      if (strcmp ("svinto", cris_cpu_str) == 0
-	  || strcmp ("etrax100", cris_cpu_str) == 0)
+      if (strcmp ("svinto", GCC_OPTION (cris_cpu_str)) == 0
+	  || strcmp ("etrax100", GCC_OPTION (cris_cpu_str)) == 0)
 	cris_cpu_version = 8;
 
-      if (strcmp ("ng", cris_cpu_str) == 0
-	  || strcmp ("etrax100lx", cris_cpu_str) == 0)
+      if (strcmp ("ng", GCC_OPTION (cris_cpu_str)) == 0
+	  || strcmp ("etrax100lx", GCC_OPTION (cris_cpu_str)) == 0)
 	cris_cpu_version = 10;
 
       if (cris_cpu_version < 0 || cris_cpu_version > 32)
 	error ("unknown CRIS version specification in -march= or -mcpu= : %s",
-	       cris_cpu_str);
+	       GCC_OPTION (cris_cpu_str));
 
       /* Set the target flags.  */
       if (cris_cpu_version >= CRIS_CPU_ETRAX4)
-	target_flags |= MASK_ETRAX4_ADD;
+	GCC_OPTION (target_flags) |= MASK_ETRAX4_ADD;
 
       /* If this is Svinto or higher, align for 32 bit accesses.  */
       if (cris_cpu_version >= CRIS_CPU_SVINTO)
-	target_flags
+	GCC_OPTION (target_flags)
 	  |= (MASK_SVINTO | MASK_ALIGN_BY_32
 	      | MASK_STACK_ALIGN | MASK_CONST_ALIGN
 	      | MASK_DATA_ALIGN);
@@ -2639,38 +2639,38 @@ cris_option_override (void)
 	 TARGET_HAS_MUL_INSNS is (cris_cpu_version >= CRIS_CPU_NG).  */
     }
 
-  if (cris_tune_str)
+  if (GCC_OPTION (cris_tune_str))
     {
       int cris_tune
-	= (*cris_tune_str == 'v' ? atoi (cris_tune_str + 1) : -1);
+	= (*GCC_OPTION (cris_tune_str) == 'v' ? atoi (GCC_OPTION (cris_tune_str) + 1) : -1);
 
-      if (strcmp ("etrax4", cris_tune_str) == 0)
+      if (strcmp ("etrax4", GCC_OPTION (cris_tune_str)) == 0)
 	cris_tune = 3;
 
-      if (strcmp ("svinto", cris_tune_str) == 0
-	  || strcmp ("etrax100", cris_tune_str) == 0)
+      if (strcmp ("svinto", GCC_OPTION (cris_tune_str)) == 0
+	  || strcmp ("etrax100", GCC_OPTION (cris_tune_str)) == 0)
 	cris_tune = 8;
 
-      if (strcmp ("ng", cris_tune_str) == 0
-	  || strcmp ("etrax100lx", cris_tune_str) == 0)
+      if (strcmp ("ng", GCC_OPTION (cris_tune_str)) == 0
+	  || strcmp ("etrax100lx", GCC_OPTION (cris_tune_str)) == 0)
 	cris_tune = 10;
 
       if (cris_tune < 0 || cris_tune > 32)
 	error ("unknown CRIS cpu version specification in -mtune= : %s",
-	       cris_tune_str);
+	       GCC_OPTION (cris_tune_str));
 
       if (cris_tune >= CRIS_CPU_SVINTO)
 	/* We have currently nothing more to tune than alignment for
 	   memory accesses.  */
-	target_flags
+	GCC_OPTION (target_flags)
 	  |= (MASK_STACK_ALIGN | MASK_CONST_ALIGN
 	      | MASK_DATA_ALIGN | MASK_ALIGN_BY_32);
     }
 
   if (cris_cpu_version >= CRIS_CPU_V32)
-    target_flags &= ~(MASK_SIDE_EFFECT_PREFIXES|MASK_MUL_BUG);
+    GCC_OPTION (target_flags) &= ~(MASK_SIDE_EFFECT_PREFIXES|MASK_MUL_BUG);
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       /* Use error rather than warning, so invalid use is easily
 	 detectable.  Still change to the values we expect, to avoid
@@ -2678,7 +2678,7 @@ cris_option_override (void)
       if (! TARGET_LINUX)
 	{
 	  error ("-fPIC and -fpic are not supported in this configuration");
-	  flag_pic = 0;
+	  GCC_OPTION (flag_pic) = 0;
 	}
 
       /* Turn off function CSE.  We need to have the addresses reach the
@@ -2687,7 +2687,7 @@ cris_option_override (void)
 	 call expanders they will then be cse:ed, as the call expanders
 	 force_reg the addresses, effectively forcing flag_no_function_cse
 	 to 0.  */
-      flag_no_function_cse = 1;
+      GCC_OPTION (flag_no_function_cse) = 1;
     }
 
   /* Set the per-function-data initializer.  */
@@ -2715,7 +2715,7 @@ cris_asm_output_mi_thunk (FILE *stream,
 	     ADDITIVE_SIZE_MODIFIER (-delta), -delta,
 	     reg_names[CRIS_FIRST_ARG_REG]);
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       const char *name = XSTR (XEXP (DECL_RTL (funcdecl), 0), 0);
 
@@ -2757,7 +2757,7 @@ cris_file_start (void)
 {
   /* These expressions can vary at run time, so we cannot put
      them into TARGET_INITIALIZER.  */
-  targetm.asm_file_start_app_off = !(TARGET_PDEBUG || flag_print_asm_name);
+  targetm.asm_file_start_app_off = !(TARGET_PDEBUG || GCC_OPTION (flag_print_asm_name));
 
   default_file_start ();
 }
@@ -3864,7 +3864,7 @@ cris_asm_output_symbol_ref (FILE *file, rtx x)
 {
   gcc_assert (GET_CODE (x) == SYMBOL_REF);
 
-  if (flag_pic && in_code > 0)
+  if (GCC_OPTION (flag_pic) && in_code > 0)
     {
      const char *origstr = XSTR (x, 0);
      const char *str;
@@ -3884,7 +3884,7 @@ cris_asm_output_symbol_ref (FILE *file, rtx x)
 void
 cris_asm_output_label_ref (FILE *file, char *buf)
 {
-  if (flag_pic && in_code > 0)
+  if (GCC_OPTION (flag_pic) && in_code > 0)
     {
       assemble_name (file, buf);
 
@@ -3918,7 +3918,7 @@ cris_output_addr_const_extra (FILE *file, rtx xconst)
 	  /* We only get this with -fpic/PIC to tell it apart from an
 	     invalid symbol.  We can't tell here, but it should only
 	     be the operand of a call or movsi.  */
-	  gcc_assert (TARGET_V32 && flag_pic);
+	  gcc_assert (TARGET_V32 && GCC_OPTION (flag_pic));
 	  break;
 
 	case CRIS_UNSPEC_PLT_PCREL:
@@ -3937,14 +3937,14 @@ cris_output_addr_const_extra (FILE *file, rtx xconst)
 	  break;
 
 	case CRIS_UNSPEC_GOTREAD:
-	  if (flag_pic == 1)
+	  if (GCC_OPTION (flag_pic) == 1)
 	    fprintf (file, ":GOT16");
 	  else
 	    fprintf (file, ":GOT");
 	  break;
 
 	case CRIS_UNSPEC_PLTGOTREAD:
-	  if (flag_pic == 1)
+	  if (GCC_OPTION (flag_pic) == 1)
 	    fprintf (file, CRIS_GOTPLT_SUFFIX "16");
 	  else
 	    fprintf (file, CRIS_GOTPLT_SUFFIX);
diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h
index 37b562e..ff801fb 100644
--- a/gcc/config/cris/cris.h
+++ b/gcc/config/cris/cris.h
@@ -313,12 +313,12 @@ extern int cris_cpu_version;
 
 /* The "break" instruction was introduced with ETRAX 4.  */
 #define TARGET_TRAP_USING_BREAK8 \
- (cris_trap_using_break8 == 2 ? TARGET_HAS_BREAK : cris_trap_using_break8)
+ (GCC_OPTION (cris_trap_using_break8) == 2 ? TARGET_HAS_BREAK : GCC_OPTION (cris_trap_using_break8))
 
 /* Call library functions by default for GNU/Linux.  */
 #define TARGET_ATOMICS_MAY_CALL_LIBFUNCS		\
- (cris_atomics_calling_libfunc == 2			\
-  ? TARGET_LINUX : cris_atomics_calling_libfunc)
+ (GCC_OPTION (cris_atomics_calling_libfunc) == 2			\
+  ? TARGET_LINUX : GCC_OPTION (cris_atomics_calling_libfunc))
 
 /* The < v10 atomics turn off interrupts, so they don't need alignment.
    Incidentally, by default alignment is off there causing variables to
@@ -326,9 +326,9 @@ extern int cris_cpu_version;
    libraries use a proper atomic type (instead of "int"), one we'd
    specify as aligned.  */
 #define TARGET_TRAP_UNALIGNED_ATOMIC		\
- (cris_trap_unaligned_atomic == 2		\
+ (GCC_OPTION (cris_trap_unaligned_atomic) == 2		\
   ? (TARGET_V32 || cris_cpu_version == 10)	\
-  : cris_trap_unaligned_atomic)
+  : GCC_OPTION (cris_trap_unaligned_atomic))
 
 /* Node: Storage Layout */
 
@@ -842,7 +842,7 @@ enum cris_pic_symbol_type
     cris_invalid_pic_symbol = 4
   };
 
-#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? CRIS_GOT_REGNUM : INVALID_REGNUM)
+#define PIC_OFFSET_TABLE_REGNUM (GCC_OPTION (flag_pic) ? CRIS_GOT_REGNUM : INVALID_REGNUM)
 
 #define LEGITIMATE_PIC_OPERAND_P(X) cris_legitimate_pic_operand (X)
 
diff --git a/gcc/config/cris/cris.md b/gcc/config/cris/cris.md
index 47f6451..a54c861 100644
--- a/gcc/config/cris/cris.md
+++ b/gcc/config/cris/cris.md
@@ -191,7 +191,7 @@
 (define_delay (eq_attr "slottable" "has_call_slot")
   [(and (eq_attr "slottable" "yes")
 	(ior (not (match_test "RTX_FRAME_RELATED_P (insn)"))
-	     (not (match_test "flag_exceptions"))))
+	     (not (match_test "GCC_OPTION (flag_exceptions)"))))
    (nil) (nil)])
 
 ;; The insn in the return insn slot must not be the
@@ -933,7 +933,7 @@
      FIXME: Do we *have* to recognize anything that would normally be a
      valid symbol?  Can we exclude global PIC addresses with an added
      offset?  */
-    if (flag_pic
+    if (GCC_OPTION (flag_pic)
 	&& CONSTANT_ADDRESS_P (operands[1])
 	&& !cris_valid_pic_const (operands[1], false))
       {
@@ -1057,7 +1057,7 @@
 
 (define_insn "*movsi_got_load"
   [(set (reg:SI CRIS_GOT_REGNUM) (unspec:SI [(const_int 0)] CRIS_UNSPEC_GOT))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
 {
   return TARGET_V32
     ? "lapc _GLOBAL_OFFSET_TABLE_,%:"
@@ -1083,7 +1083,7 @@
     case 9:
       if (TARGET_V32)
        {
-	 if (!flag_pic
+	 if (!GCC_OPTION (flag_pic)
 	     && (GET_CODE (operands[1]) == SYMBOL_REF
 		 || GET_CODE (operands[1]) == LABEL_REF
 		 || GET_CODE (operands[1]) == CONST))
@@ -1095,7 +1095,7 @@
 	     CC_STATUS_INIT;
 	     return "lapc %1,%0";
 	   }
-	 if (flag_pic == 1
+	 if (GCC_OPTION (flag_pic) == 1
 	     && GET_CODE (operands[1]) == CONST
 	     && GET_CODE (XEXP (operands[1], 0)) == UNSPEC
 	     && XINT (XEXP (operands[1], 0), 1) == CRIS_UNSPEC_GOTREAD)
@@ -1157,7 +1157,7 @@
 	  case CRIS_UNSPEC_PLTGOTREAD:
 	    /* Using sign-extend mostly to be consistent with the
 	       indexed addressing mode.  */
-	    if (flag_pic == 1)
+	    if (GCC_OPTION (flag_pic) == 1)
 	      return "movs.w %1,%0";
 	    return "move.d %1,%0";
 
@@ -1781,7 +1781,7 @@
 	  case CRIS_UNSPEC_PLTGOTREAD:
 	    /* Using sign-extend mostly to be consistent with the
 	       indexed addressing mode.  */
-	    if (flag_pic == 1)
+	    if (GCC_OPTION (flag_pic) == 1)
 	      return "adds.w %2,%0";
 	    return "add.d %2,%0";
 
@@ -3709,7 +3709,7 @@
   ""
 {
   gcc_assert (MEM_P (operands[0]));
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     cris_expand_pic_call_address (&operands[0]);
 })
 
@@ -3763,7 +3763,7 @@
   ""
 {
   gcc_assert (MEM_P (operands[1]));
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     cris_expand_pic_call_address (&operands[1]);
 })
 
@@ -3913,7 +3913,7 @@
   operands[2] = plus_constant (SImode, operands[2], 1);
 
   /* Don't forget to decorate labels too, for PIC.  */
-  operands[11] = flag_pic
+  operands[11] = GCC_OPTION (flag_pic)
     ? gen_rtx_CONST (Pmode,
 		    gen_rtx_UNSPEC (Pmode, gen_rtvec (1, xlabel),
 				    CRIS_UNSPEC_PCREL))
@@ -5042,7 +5042,7 @@
        (const:SI
 	(unspec:SI [(match_operand:SI 2 "cris_general_operand_or_symbol" "")]
 		   CRIS_UNSPEC_PLTGOTREAD)))]))]
-  "flag_pic
+  "GCC_OPTION (flag_pic)
    && cris_valid_pic_const (XEXP (XEXP (operands[1], 0), 1), true)
    && REGNO_REG_CLASS (REGNO (operands[0])) == REGNO_REG_CLASS (0)"
   [(set (match_dup 0) (const:SI (unspec:SI [(match_dup 2)] CRIS_UNSPEC_PLT_GOTREL)))
@@ -5071,7 +5071,7 @@
   (parallel [(call (mem:QI (match_dup 0))
 		    (match_operand 4 "" ""))
 	      (clobber (reg:SI CRIS_SRP_REGNUM))])]
-  "flag_pic
+  "GCC_OPTION (flag_pic)
    && cris_valid_pic_const (XEXP (XEXP (operands[1], 0), 1), true)
    && peep2_reg_dead_p (2, operands[0])"
   [(parallel [(call (mem:QI (match_dup 1))
@@ -5104,7 +5104,7 @@
 		   (call (mem:QI (match_dup 0))
 			 (match_operand 4 "" "")))
 	      (clobber (reg:SI CRIS_SRP_REGNUM))])]
-  "flag_pic
+  "GCC_OPTION (flag_pic)
    && cris_valid_pic_const (XEXP (XEXP (operands[1], 0), 1), true)
    && peep2_reg_dead_p (2, operands[0])"
   [(parallel [(set (match_dup 5)
@@ -5134,7 +5134,7 @@
 	  (plus:SI (reg:SI CRIS_GOT_REGNUM)
 		   (const:SI
 		    (unspec:SI [(match_dup 2)] CRIS_UNSPEC_PLTGOTREAD))))])]
-  "flag_pic
+  "GCC_OPTION (flag_pic)
    && cris_valid_pic_const (XEXP (XEXP (operands[1], 0), 1), true)
    && REGNO_REG_CLASS (REGNO (operands[0])) == REGNO_REG_CLASS (0)"
   [(set (match_dup 3)
diff --git a/gcc/config/cris/linux.h b/gcc/config/cris/linux.h
index af27e10..5624af3 100644
--- a/gcc/config/cris/linux.h
+++ b/gcc/config/cris/linux.h
@@ -123,7 +123,7 @@ along with GCC; see the file COPYING3.  If not see
   do						\
     {						\
       GNU_USER_TARGET_OS_CPP_BUILTINS();	\
-      if (flag_leading_underscore <= 0)		\
+      if (GCC_OPTION (flag_leading_underscore) <= 0)		\
 	builtin_define ("__NO_UNDERSCORES__");	\
     }						\
   while (0)
diff --git a/gcc/config/cris/predicates.md b/gcc/config/cris/predicates.md
index 0169b0b..b162cae 100644
--- a/gcc/config/cris/predicates.md
+++ b/gcc/config/cris/predicates.md
@@ -62,7 +62,7 @@
 
 (define_predicate "cris_bdap_const_operand"
   (and (match_code "label_ref, symbol_ref, const_int, const_double, const")
-       (ior (not (match_test "flag_pic"))
+       (ior (not (match_test "GCC_OPTION (flag_pic)"))
 	    (match_test "cris_valid_pic_const (op, true)"))))
 
 (define_predicate "cris_simple_address_operand"
@@ -149,7 +149,7 @@
 
 (define_special_predicate "cris_general_operand_or_pic_source"
   (ior (match_operand 0 "general_operand")
-       (and (match_test "flag_pic")
+       (and (match_test "GCC_OPTION (flag_pic)")
 	    (match_test "cris_valid_pic_const (op, false)"))))
 
 ;; Since a PLT symbol is not a general_operand, we have to have a
diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c
index 892ba35..44d3fca 100644
--- a/gcc/config/darwin-c.c
+++ b/gcc/config/darwin-c.c
@@ -482,7 +482,7 @@ darwin_register_objc_includes (const char *sysroot, const char *iprefix,
   /* Register the GNU OBJC runtime include path if we are compiling  OBJC
     with GNU-runtime.  */
 
-  if (c_dialect_objc () && !flag_next_runtime)
+  if (c_dialect_objc () && !GCC_OPTION (flag_next_runtime))
     {
       char *str;
       /* See if our directory starts with the standard prefix.
@@ -579,20 +579,20 @@ version_as_macro (void)
 {
   static char result[] = "1000";
 
-  if (strncmp (darwin_macosx_version_min, "10.", 3) != 0)
+  if (strncmp (GCC_OPTION (darwin_macosx_version_min), "10.", 3) != 0)
     goto fail;
-  if (! ISDIGIT (darwin_macosx_version_min[3]))
+  if (! ISDIGIT (GCC_OPTION (darwin_macosx_version_min)[3]))
     goto fail;
-  result[2] = darwin_macosx_version_min[3];
-  if (darwin_macosx_version_min[4] != '\0'
-      && darwin_macosx_version_min[4] != '.')
+  result[2] = GCC_OPTION (darwin_macosx_version_min)[3];
+  if (GCC_OPTION (darwin_macosx_version_min)[4] != '\0'
+      && GCC_OPTION (darwin_macosx_version_min)[4] != '.')
     goto fail;
 
   return result;
 
  fail:
   error ("unknown value %qs of -mmacosx-version-min",
-	 darwin_macosx_version_min);
+	 GCC_OPTION (darwin_macosx_version_min));
   return "1000";
 }
 
@@ -610,7 +610,7 @@ darwin_cpp_builtins (cpp_reader *pfile)
      to be defined and won't work if it isn't.  */
   builtin_define_with_value ("__APPLE_CC__", "1", false);
 
-  if (darwin_constant_cfstrings)
+  if (GCC_OPTION (darwin_constant_cfstrings))
     builtin_define ("__CONSTANT_CFSTRINGS__");
 
   builtin_define_with_value ("__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__",
@@ -620,7 +620,7 @@ darwin_cpp_builtins (cpp_reader *pfile)
      following will cause a syntax error if one tries to compile gc attributed
      items.  However, without this, NeXT system headers cannot be parsed 
      properly (on systems >= darwin 9).  */
-  if (flag_objc_gc)
+  if (GCC_OPTION (flag_objc_gc))
     {
       builtin_define ("__strong=__attribute__((objc_gc(strong)))");
       builtin_define ("__weak=__attribute__((objc_gc(weak)))");
@@ -632,7 +632,7 @@ darwin_cpp_builtins (cpp_reader *pfile)
       builtin_define ("__weak=");
     }
 
-  if (CPP_OPTION (pfile, objc) && flag_objc_abi == 2)
+  if (CPP_OPTION (pfile, objc) && GCC_OPTION (flag_objc_abi) == 2)
     builtin_define ("__OBJC2__");
 }
 
@@ -666,7 +666,7 @@ handle_c_option (size_t code,
 static tree
 darwin_objc_construct_string (tree str)
 {
-  if (!darwin_constant_cfstrings)
+  if (!GCC_OPTION (darwin_constant_cfstrings))
     {
     /* Even though we are not using CFStrings, place our literal
        into the cfstring_htab hash table, so that the
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index adf370d..9d3186b 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -200,11 +200,11 @@ output_objc_section_asm_op (const void *directive)
       size_t i;
 
       been_here = true;
-      if (flag_objc_abi < 2)
+      if (GCC_OPTION (flag_objc_abi) < 2)
 	{
 	  for (i = 0; i < ARRAY_SIZE (tomark); i++)
 	    switch_to_section (darwin_sections[tomark[i]]);
-	  if (flag_objc_abi == 1)
+	  if (GCC_OPTION (flag_objc_abi) == 1)
 	    for (i = 0; i < ARRAY_SIZE (tomarkv1); i++)
 	      switch_to_section (darwin_sections[tomarkv1[i]]);
 	}
@@ -1254,7 +1254,7 @@ darwin_mergeable_string_section (tree exp,
      section.  Later versions of ld check and complain when CFStrings are 
      enabled.  Therefore we shall force the strings into .cstring since we
      don't support writable ones anyway.  */
-  if ((darwin_constant_cfstrings || flag_merge_constants)
+  if ((GCC_OPTION (darwin_constant_cfstrings) || GCC_OPTION (flag_merge_constants))
       && TREE_CODE (exp) == STRING_CST
       && TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE
       && align <= 256
@@ -1264,7 +1264,7 @@ darwin_mergeable_string_section (tree exp,
 	  == strlen (TREE_STRING_POINTER (exp)) + 1))
     return darwin_sections[cstring_section];
 
-  if (DARWIN_SECTION_ANCHORS && flag_section_anchors
+  if (DARWIN_SECTION_ANCHORS && GCC_OPTION (flag_section_anchors)
       && TREE_CODE (exp) == STRING_CST
       && TREE_STRING_LENGTH (exp) == 0)
     return darwin_sections[zobj_const_section];
@@ -1285,11 +1285,11 @@ darwin_mergeable_constant_section (tree exp,
   unsigned int modesize = GET_MODE_BITSIZE (mode);
 
   if (DARWIN_SECTION_ANCHORS 
-      && flag_section_anchors 
+      && GCC_OPTION (flag_section_anchors) 
       && zsize)
     return darwin_sections[zobj_const_section];
 
-  if (flag_merge_constants
+  if (GCC_OPTION (flag_merge_constants)
       && mode != VOIDmode
       && mode != BLKmode
       && modesize <= align
@@ -1369,7 +1369,7 @@ darwin_objc2_section (tree decl ATTRIBUTE_UNUSED, tree meta, section * base)
   gcc_assert (TREE_CODE (ident) == IDENTIFIER_NODE);
   p = IDENTIFIER_POINTER (ident);
 
-  gcc_checking_assert (flag_next_runtime == 1 && flag_objc_abi == 2);
+  gcc_checking_assert (GCC_OPTION (flag_next_runtime) == 1 && GCC_OPTION (flag_objc_abi) == 2);
 
   objc_metadata_seen = 1;
 
@@ -1432,7 +1432,7 @@ darwin_objc1_section (tree decl ATTRIBUTE_UNUSED, tree meta, section * base)
   gcc_assert (TREE_CODE (ident) == IDENTIFIER_NODE);
   p = IDENTIFIER_POINTER (ident);
 
-  gcc_checking_assert (flag_next_runtime == 1 && flag_objc_abi < 2);
+  gcc_checking_assert (GCC_OPTION (flag_next_runtime) == 1 && GCC_OPTION (flag_objc_abi) < 2);
 
   objc_metadata_seen = 1;
 
@@ -1568,7 +1568,7 @@ machopic_select_section (tree decl,
 	    base_section = darwin_sections[data_coal_section];
 	}
       else if (DARWIN_SECTION_ANCHORS 
-	       && flag_section_anchors
+	       && GCC_OPTION (flag_section_anchors)
 	       && zsize)
 	{
 	  /* If we're doing section anchors, then punt zero-sized objects into
@@ -1636,9 +1636,9 @@ machopic_select_section (tree decl,
 
       if (!strcmp (IDENTIFIER_POINTER (name), "__builtin_ObjCString"))
 	{
-	  if (flag_next_runtime)
+	  if (GCC_OPTION (flag_next_runtime))
 	    {
-	      if (flag_objc_abi == 2)
+	      if (GCC_OPTION (flag_objc_abi) == 2)
 		return darwin_sections[objc2_constant_string_object_section];
 	      else
 		return darwin_sections[objc_constant_string_object_section];
@@ -1656,7 +1656,7 @@ machopic_select_section (tree decl,
 	   && DECL_NAME (decl)
 	   && TREE_CODE (DECL_NAME (decl)) == IDENTIFIER_NODE
 	   && IDENTIFIER_POINTER (DECL_NAME (decl))
-	   && flag_next_runtime
+	   && GCC_OPTION (flag_next_runtime)
 	   && !strncmp (IDENTIFIER_POINTER (DECL_NAME (decl)), "_OBJC_", 6))
     {
       const char *name = IDENTIFIER_POINTER (DECL_NAME (decl));
@@ -2235,7 +2235,7 @@ fprintf (file, "# dadon: %s %s (%llu, %u) local %d weak %d"
 
       /* Check that we've correctly picked up the zero-sized item and placed it
          properly.  */
-      gcc_assert ((!DARWIN_SECTION_ANCHORS || !flag_section_anchors)
+      gcc_assert ((!DARWIN_SECTION_ANCHORS || !GCC_OPTION (flag_section_anchors))
 		  || (in_section 
 		      && (in_section->common.flags & SECTION_NO_ANCHOR)));
     }
@@ -2256,7 +2256,7 @@ darwin_asm_declare_constant_name (FILE *file, const char *name,
       fputs ("\t.space\t1\n", file);
       /* Check that we've correctly picked up the zero-sized item and placed it
          properly.  */
-      gcc_assert ((!DARWIN_SECTION_ANCHORS || !flag_section_anchors)
+      gcc_assert ((!DARWIN_SECTION_ANCHORS || !GCC_OPTION (flag_section_anchors))
 		  || (in_section 
 		      && (in_section->common.flags & SECTION_NO_ANCHOR)));
     }
@@ -2349,7 +2349,7 @@ darwin_emit_local_bss (FILE *fp, tree decl, const char *name,
    /* FIXME: We have a fudge to make this work with Java even when the target does
    not use sections anchors -- Java seems to need at least one small item in a
    non-zerofill segment.   */
-   if ((DARWIN_SECTION_ANCHORS && flag_section_anchors && size < BYTES_ZFILL)
+   if ((DARWIN_SECTION_ANCHORS && GCC_OPTION (flag_section_anchors) && size < BYTES_ZFILL)
        || (size && size <= 2))
     {
       /* Put smaller objects in _static_data, where the section anchors system
@@ -2522,7 +2522,7 @@ fprintf (fp, "# albss: %s (%lld,%d) ro %d cst %d stat %d com %d"
     }
 
   /* So we have a public symbol (small item fudge for Java, see above).  */
-  if ((DARWIN_SECTION_ANCHORS && flag_section_anchors && size < BYTES_ZFILL) 
+  if ((DARWIN_SECTION_ANCHORS && GCC_OPTION (flag_section_anchors) && size < BYTES_ZFILL) 
        || (size && size <= 2))
     {
       /* Put smaller objects in data, where the section anchors system can get
@@ -2879,10 +2879,10 @@ darwin_file_end (void)
      some) then we output the fix-and-continue marker (Image Info).
      This applies to Objective C, Objective C++ and LTO with either language
      as part of the input.  */
-  if (flag_next_runtime && objc_metadata_seen)
+  if (GCC_OPTION (flag_next_runtime) && objc_metadata_seen)
     {
       unsigned int flags = 0;
-      if (flag_objc_abi >= 2)
+      if (GCC_OPTION (flag_objc_abi) >= 2)
 	{
 	  flags = 16;
 	  output_section_asm_op
@@ -2895,8 +2895,8 @@ darwin_file_end (void)
       ASM_OUTPUT_ALIGN (asm_out_file, 2);
       fputs ("L_OBJC_ImageInfo:\n", asm_out_file);
 
-      flags |= (flag_replace_objc_classes && classes_seen) ? 1 : 0;
-      flags |= flag_objc_gc ? 2 : 0;
+      flags |= (GCC_OPTION (flag_replace_objc_classes) && classes_seen) ? 1 : 0;
+      flags |= GCC_OPTION (flag_objc_gc) ? 2 : 0;
 
       fprintf (asm_out_file, "\t.long\t0\n\t.long\t%u\n", flags);
      }
@@ -2992,7 +2992,7 @@ darwin_file_end (void)
 
   /* If we have section anchors, then we must prevent the linker from
      re-arranging data.  */
-  if (!DARWIN_SECTION_ANCHORS || !flag_section_anchors)
+  if (!DARWIN_SECTION_ANCHORS || !GCC_OPTION (flag_section_anchors))
     fprintf (asm_out_file, "\t.subsections_via_symbols\n");
 }
 
@@ -3026,7 +3026,7 @@ darwin_asm_output_anchor (rtx symbol)
 bool
 darwin_use_anchors_for_symbol_p (const_rtx symbol)
 {
-  if (DARWIN_SECTION_ANCHORS && flag_section_anchors) 
+  if (DARWIN_SECTION_ANCHORS && GCC_OPTION (flag_section_anchors)) 
     {
       section *sect;
       /* If the section contains a zero-sized object it's ineligible.  */
@@ -3058,18 +3058,18 @@ darwin_set_default_type_attributes (tree type)
 
 bool
 darwin_kextabi_p (void) {
-  return flag_apple_kext;
+  return GCC_OPTION (flag_apple_kext);
 }
 
 void
 darwin_override_options (void)
 {
   /* Keep track of which (major) version we're generating code for.  */
-  if (darwin_macosx_version_min)
+  if (GCC_OPTION (darwin_macosx_version_min))
     {
-      if (strverscmp (darwin_macosx_version_min, "10.6") >= 0)
+      if (strverscmp (GCC_OPTION (darwin_macosx_version_min), "10.6") >= 0)
 	generating_for_darwin_version = 10;
-      else if (strverscmp (darwin_macosx_version_min, "10.5") >= 0)
+      else if (strverscmp (GCC_OPTION (darwin_macosx_version_min), "10.5") >= 0)
 	generating_for_darwin_version = 9;
 
       /* Earlier versions are not specifically accounted, until required.  */
@@ -3083,14 +3083,14 @@ darwin_override_options (void)
   /* Unless set, force ABI=2 for NeXT and m64, 0 otherwise.  */
   if (!global_options_set.x_flag_objc_abi)
     global_options.x_flag_objc_abi
-	= (!flag_next_runtime)
+	= (!GCC_OPTION (flag_next_runtime))
 		? 0
 		: (TARGET_64BIT ? 2
 				: (generating_for_darwin_version >= 9) ? 1
 								       : 0);
 
   /* Objective-C family ABI 2 is only valid for next/m64 at present.  */
-  if (global_options_set.x_flag_objc_abi && flag_next_runtime)
+  if (global_options_set.x_flag_objc_abi && GCC_OPTION (flag_next_runtime))
     {
       if (TARGET_64BIT && global_options.x_flag_objc_abi < 2)
 	error_at (UNKNOWN_LOCATION, "%<-fobjc-abi-version%> >= 2 must be"
@@ -3105,9 +3105,9 @@ darwin_override_options (void)
   /* Don't emit DWARF3/4 unless specifically selected.  This is a 
      workaround for tool bugs.  */
   if (!global_options_set.x_dwarf_strict) 
-    dwarf_strict = 1;
+    GCC_OPTION (dwarf_strict) = 1;
   if (!global_options_set.x_dwarf_version)
-    dwarf_version = 2;
+    GCC_OPTION (dwarf_version) = 2;
 
   /* Do not allow unwind tables to be generated by default for m32.  
      fnon-call-exceptions will override this, regardless of what we do.  */
@@ -3136,60 +3136,60 @@ darwin_override_options (void)
       inform (input_location,
 	      "-freorder-blocks-and-partition does not work with exceptions "
 	      "on this architecture");
-      flag_reorder_blocks_and_partition = 0;
-      flag_reorder_blocks = 1;
+      GCC_OPTION (flag_reorder_blocks_and_partition) = 0;
+      GCC_OPTION (flag_reorder_blocks) = 1;
     }
 
     /* FIXME: flag_objc_sjlj_exceptions is no longer needed since there is only
        one valid choice of exception scheme for each runtime.  */
     if (!global_options_set.x_flag_objc_sjlj_exceptions)
       global_options.x_flag_objc_sjlj_exceptions = 
-				flag_next_runtime && !TARGET_64BIT;
+				GCC_OPTION (flag_next_runtime) && !TARGET_64BIT;
 
     /* FIXME: and this could be eliminated then too.  */
     if (!global_options_set.x_flag_exceptions
-	&& flag_objc_exceptions
+	&& GCC_OPTION (flag_objc_exceptions)
 	&& TARGET_64BIT)
-      flag_exceptions = 1;
+      GCC_OPTION (flag_exceptions) = 1;
 
-  if (flag_mkernel || flag_apple_kext)
+  if (GCC_OPTION (flag_mkernel) || GCC_OPTION (flag_apple_kext))
     {
       /* -mkernel implies -fapple-kext for C++ */
       if (strcmp (lang_hooks.name, "GNU C++") == 0)
-	flag_apple_kext = 1;
+	GCC_OPTION (flag_apple_kext) = 1;
 
-      flag_no_common = 1;
+      GCC_OPTION (flag_no_common) = 1;
 
       /* No EH in kexts.  */
-      flag_exceptions = 0;
+      GCC_OPTION (flag_exceptions) = 0;
       /* No -fnon-call-exceptions data in kexts.  */
-      flag_non_call_exceptions = 0;
+      GCC_OPTION (flag_non_call_exceptions) = 0;
       /* so no tables either.. */
-      flag_unwind_tables = 0;
-      flag_asynchronous_unwind_tables = 0;
+      GCC_OPTION (flag_unwind_tables) = 0;
+      GCC_OPTION (flag_asynchronous_unwind_tables) = 0;
       /* We still need to emit branch islands for kernel context.  */
       darwin_emit_branch_islands = true;
     }
 
-  if (flag_var_tracking_uninit == 0
+  if (GCC_OPTION (flag_var_tracking_uninit) == 0
       && generating_for_darwin_version >= 9
-      && (flag_gtoggle ? (debug_info_level == DINFO_LEVEL_NONE)
-      : (debug_info_level >= DINFO_LEVEL_NORMAL))
-      && write_symbols == DWARF2_DEBUG)
-    flag_var_tracking_uninit = flag_var_tracking;
+      && (GCC_OPTION (flag_gtoggle) ? (GCC_OPTION (debug_info_level) == DINFO_LEVEL_NONE)
+      : (GCC_OPTION (debug_info_level) >= DINFO_LEVEL_NORMAL))
+      && GCC_OPTION (write_symbols) == DWARF2_DEBUG)
+    GCC_OPTION (flag_var_tracking_uninit) = GCC_OPTION (flag_var_tracking);
 
   if (MACHO_DYNAMIC_NO_PIC_P)
     {
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	warning_at (UNKNOWN_LOCATION, 0,
 		 "%<-mdynamic-no-pic%> overrides %<-fpic%>, %<-fPIC%>,"
 		 " %<-fpie%> or %<-fPIE%>");
-      flag_pic = 0;
+      GCC_OPTION (flag_pic) = 0;
     }
-  else if (flag_pic == 1)
+  else if (GCC_OPTION (flag_pic) == 1)
     {
       /* Darwin's -fpic is -fPIC.  */
-      flag_pic = 2;
+      GCC_OPTION (flag_pic) = 2;
     }
 
   /* It is assumed that branch island stubs are needed for earlier systems.  */
@@ -3237,7 +3237,7 @@ darwin_patch_builtins (void)
     darwin_patch_builtin (fncode);
 #define PATCH_BUILTIN_VARIADIC(fncode)				  \
   if (!TARGET_64BIT						  \
-      && (strverscmp (darwin_macosx_version_min, "10.3.9") >= 0)) \
+      && (strverscmp (GCC_OPTION (darwin_macosx_version_min), "10.3.9") >= 0)) \
     darwin_patch_builtin (fncode);
 #include "darwin-ppc-ldouble-patch.def"
 #undef PATCH_BUILTIN
@@ -3365,7 +3365,7 @@ darwin_fold_builtin (tree fndecl, int n_args, tree *argp,
   
   if (fcode == darwin_builtin_cfstring)
     {
-      if (!darwin_constant_cfstrings)
+      if (!GCC_OPTION (darwin_constant_cfstrings))
 	{
 	  error ("built-in function %qD requires the" 
 		 " %<-mconstant-cfstrings%> flag", fndecl);
@@ -3394,7 +3394,7 @@ darwin_rename_builtins (void)
 
      When -ffast-math or -funsafe-math-optimizations is given, we can
      use the faster version.  */
-  if (!flag_unsafe_math_optimizations)
+  if (!GCC_OPTION (flag_unsafe_math_optimizations))
     {
       enum built_in_function dcode
 	= (enum built_in_function)(BUILT_IN_COMPLEX_DIV_MIN
@@ -3421,7 +3421,7 @@ darwin_libc_has_function (enum function_class fn_class)
   if (fn_class == function_c99_math_complex
       || fn_class == function_c99_misc)
     return (TARGET_64BIT
-	    || strverscmp (darwin_macosx_version_min, "10.3") >= 0);
+	    || strverscmp (GCC_OPTION (darwin_macosx_version_min), "10.3") >= 0);
 
   return true;
 }
@@ -3487,7 +3487,7 @@ darwin_build_constant_cfstring (tree str)
       vec<constructor_elt, va_gc> *v = NULL;
       int length = TREE_STRING_LENGTH (str) - 1;
 
-      if (darwin_warn_nonportable_cfstrings)
+      if (GCC_OPTION (darwin_warn_nonportable_cfstrings))
 	{
 	  const char *s = TREE_STRING_POINTER (str);
 	  int l = 0;
@@ -3495,7 +3495,7 @@ darwin_build_constant_cfstring (tree str)
 	  for (l = 0; l < length; l++)
 	    if (!s[l] || !isascii (s[l]))
 	      {
-		warning (darwin_warn_nonportable_cfstrings, "%s in CFString literal",
+		warning (GCC_OPTION (darwin_warn_nonportable_cfstrings), "%s in CFString literal",
 			 s[l] ? "non-ASCII character" : "embedded NUL");
 		break;
 	      }
@@ -3619,7 +3619,7 @@ darwin_function_section (tree decl, enum node_frequency freq,
   /* If we have LTO *and* feedback information, then let LTO handle
      the function ordering, it makes a better job (for normal, hot,
      startup and exit - hence the bailout for cold above).  */
-  if (in_lto_p && flag_profile_values)
+  if (GCC_OPTION (in_lto_p) && GCC_OPTION (flag_profile_values))
     goto default_function_sections;
 
   /* Non-cold startup code should go to startup subsection.  */
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 1263640..0120b5f 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -138,15 +138,15 @@ extern GTY(()) int darwin_ms_struct;
   } while (0)
 
 #define SUBTARGET_C_COMMON_OVERRIDE_OPTIONS do {                        \
-    if (flag_mkernel || flag_apple_kext)				\
+    if (GCC_OPTION (flag_mkernel) || GCC_OPTION (flag_apple_kext))				\
       {									\
-	if (flag_use_cxa_atexit == 2)					\
-	  flag_use_cxa_atexit = 0;					\
+	if (GCC_OPTION (flag_use_cxa_atexit) == 2)					\
+	  GCC_OPTION (flag_use_cxa_atexit) = 0;					\
 	/* kexts should always be built without the coalesced sections	\
 	   because the kernel loader doesn't grok such sections.  */	\
-	flag_weak = 0;							\
+	GCC_OPTION (flag_weak) = 0;							\
 	/* No RTTI in kexts.  */					\
-	flag_rtti = 0;							\
+	GCC_OPTION (flag_rtti) = 0;							\
       }									\
   } while (0)
 
@@ -746,10 +746,10 @@ enum machopic_addr_class {
 #undef  MACHO_DYNAMIC_NO_PIC_P
 #define MACHO_DYNAMIC_NO_PIC_P	(TARGET_MACHO_DYNAMIC_NO_PIC)
 #undef  MACHOPIC_INDIRECT
-#define MACHOPIC_INDIRECT	(flag_pic || MACHO_DYNAMIC_NO_PIC_P)
+#define MACHOPIC_INDIRECT	(GCC_OPTION (flag_pic) || MACHO_DYNAMIC_NO_PIC_P)
 #define MACHOPIC_JUST_INDIRECT	(MACHO_DYNAMIC_NO_PIC_P)
 #undef  MACHOPIC_PURE
-#define MACHOPIC_PURE		(flag_pic && ! MACHO_DYNAMIC_NO_PIC_P)
+#define MACHOPIC_PURE		(GCC_OPTION (flag_pic) && ! MACHO_DYNAMIC_NO_PIC_P)
 
 #undef TARGET_ENCODE_SECTION_INFO
 #define TARGET_ENCODE_SECTION_INFO  darwin_encode_section_info
@@ -851,7 +851,7 @@ enum machopic_addr_class {
 
 #define DARWIN_REGISTER_TARGET_PRAGMAS()			\
   do {								\
-    if (!flag_preprocess_only)					\
+    if (!GCC_OPTION (flag_preprocess_only))					\
       cpp_register_pragma (parse_in, NULL, "mark",		\
 			   darwin_pragma_ignore, false);	\
     c_register_pragma (0, "options", darwin_pragma_options);	\
@@ -896,7 +896,7 @@ void add_framework_path (char *);
 /* For Apple KEXTs, we make the constructors return this to match gcc
    2.95.  */
 #define TARGET_CXX_CDTOR_RETURNS_THIS (darwin_kextabi_p)
-#define TARGET_KEXTABI flag_apple_kext
+#define TARGET_KEXTABI GCC_OPTION (flag_apple_kext)
 
 /* We have target-specific builtins.  */
 #define SUBTARGET_FOLD_BUILTIN darwin_fold_builtin
diff --git a/gcc/config/elfos.h b/gcc/config/elfos.h
index 1fce701..7949722 100644
--- a/gcc/config/elfos.h
+++ b/gcc/config/elfos.h
@@ -309,7 +309,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 	ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");		\
 									\
       size_directive_output = 0;					\
-      if (!flag_inhibit_size_directive					\
+      if (!GCC_OPTION (flag_inhibit_size_directive)					\
 	  && (DECL) && DECL_SIZE (DECL))				\
 	{								\
 	  size_directive_output = 1;					\
@@ -334,7 +334,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
       const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);	\
       HOST_WIDE_INT size;					\
 								\
-      if (!flag_inhibit_size_directive				\
+      if (!GCC_OPTION (flag_inhibit_size_directive)				\
 	  && DECL_SIZE (DECL)					\
 	  && ! AT_END && TOP_LEVEL				\
 	  && DECL_INITIAL (DECL) == error_mark_node		\
@@ -352,7 +352,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL)		\
   do								\
     {								\
-      if (!flag_inhibit_size_directive)				\
+      if (!GCC_OPTION (flag_inhibit_size_directive))				\
 	ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME);			\
     }								\
   while (0)
diff --git a/gcc/config/epiphany/constraints.md b/gcc/config/epiphany/constraints.md
index 1c463e5..d1e99cf 100644
--- a/gcc/config/epiphany/constraints.md
+++ b/gcc/config/epiphany/constraints.md
@@ -48,23 +48,23 @@
   "A signed 11-bit constant added to -1"
   (and (match_code "const_int")
        (match_test "SIMM11 (ival+1)")
-       (match_test "epiphany_m1reg >= 0")))
+       (match_test "GCC_OPTION (epiphany_m1reg) >= 0")))
 
 (define_constraint "Cl1"
   "Left-shift of -1"
   (and (match_code "const_int")
        (match_test "ival == (ival | ~(ival-1))")
-       (match_test "epiphany_m1reg >= 0")))
+       (match_test "GCC_OPTION (epiphany_m1reg) >= 0")))
 
 (define_constraint "Cr1"
   "Right-shift of -1"
   (and (match_code "const_int")
        (match_test "ival == (ival & ~(ival+1))")
-       (match_test "epiphany_m1reg >= 0")))
+       (match_test "GCC_OPTION (epiphany_m1reg) >= 0")))
 
 (define_constraint "Cal"
   "Constant for arithmetic/logical operations"
-  (match_test "(flag_pic
+  (match_test "(GCC_OPTION (flag_pic)
 		? nonsymbolic_immediate_operand (op, VOIDmode)
 		: immediate_operand (op, VOIDmode))"))
 
diff --git a/gcc/config/epiphany/epiphany-modes.def b/gcc/config/epiphany/epiphany-modes.def
index 2a31d6e..e57ab74 100644
--- a/gcc/config/epiphany/epiphany-modes.def
+++ b/gcc/config/epiphany/epiphany-modes.def
@@ -34,7 +34,7 @@ RESET_FLOAT_FORMAT (DF, motorola_double_format);
 VECTOR_MODES (INT, 4);		/* V4QI V2HI */
 VECTOR_MODES (INT, 8);		/* V8QI V4HI V2SI */
 VECTOR_MODE (FLOAT, SF, 2);	/* V2SF */
-ADJUST_ALIGNMENT (V8QI, epiphany_vect_align);
-ADJUST_ALIGNMENT (V4HI, epiphany_vect_align);
-ADJUST_ALIGNMENT (V2SI, epiphany_vect_align);
-ADJUST_ALIGNMENT (V2SF, epiphany_vect_align);
+ADJUST_ALIGNMENT (V8QI, GCC_OPTION (epiphany_vect_align));
+ADJUST_ALIGNMENT (V4HI, GCC_OPTION (epiphany_vect_align));
+ADJUST_ALIGNMENT (V2SI, GCC_OPTION (epiphany_vect_align));
+ADJUST_ALIGNMENT (V2SF, GCC_OPTION (epiphany_vect_align));
diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c
index 59b2410..a310bc3 100644
--- a/gcc/config/epiphany/epiphany.c
+++ b/gcc/config/epiphany/epiphany.c
@@ -206,7 +206,7 @@ epiphany_init (void)
   epiphany_punct_chars['-'] = 1;
 
   epiphany_normal_fp_rounding
-    = (epiphany_normal_fp_mode == FP_MODE_ROUND_TRUNC
+    = (GCC_OPTION (epiphany_normal_fp_mode) == FP_MODE_ROUND_TRUNC
        ? FP_MODE_ROUND_TRUNC : FP_MODE_ROUND_NEAREST);
   register_pass (&mode_sw4_info);
   register_pass (&mode_sw2_info);
@@ -559,7 +559,7 @@ gen_compare_reg (enum machine_mode cmode, enum rtx_code code,
       if (mode == CC_FP_GTEmode
 	  && (code == LE || code == LT || code == UNGT || code == UNGE))
 	{
-	  if (flag_finite_math_only
+	  if (GCC_OPTION (flag_finite_math_only)
 	      && ((REG_P (x) && REGNO (x) == GPR_0)
 		  || (REG_P (y) && REGNO (y) == GPR_1)))
 	    switch (code)
@@ -1038,14 +1038,14 @@ epiphany_compute_frame_size (int size /* # of var. bytes allocated.  */)
     {
       reg_size += UNITS_PER_WORD;
       SET_HARD_REG_BIT (gmask, regno);
-      if (epiphany_stack_offset - reg_size == 0)
+      if (GCC_OPTION (epiphany_stack_offset) - reg_size == 0)
 	first_slot = regno;
     }
 
   if (interrupt_p)
     reg_size += 2 * UNITS_PER_WORD;
   else
-    small_slots = epiphany_stack_offset / UNITS_PER_WORD;
+    small_slots = GCC_OPTION (epiphany_stack_offset) / UNITS_PER_WORD;
 
   if (frame_pointer_needed)
     {
@@ -1078,7 +1078,7 @@ epiphany_compute_frame_size (int size /* # of var. bytes allocated.  */)
     MACHINE_FUNCTION (cfun)->lr_clobbered = 1;
   /* ??? Could sometimes do better than that.  */
   current_frame_info.small_threshold
-    = (optimize >= 3 || interrupt_p ? 0
+    = (GCC_OPTION (optimize) >= 3 || interrupt_p ? 0
        : pretend_size ? small_slots
        : 4 + small_slots - (first_slot == GPR_FP));
 
@@ -1089,12 +1089,12 @@ epiphany_compute_frame_size (int size /* # of var. bytes allocated.  */)
 	 stack slots when optimizing.  This rounding could be avoided with
 	 more complex reordering of the register saves, but that would seem
 	 to be a lot of code complexity for little gain.  */
-      || (reg_size > 8 && optimize))
+      || (reg_size > 8 && GCC_OPTION (optimize)))
     reg_size = EPIPHANY_STACK_ALIGN (reg_size);
   if (((total_size + reg_size
 	/* Reserve space for UNKNOWN_REGNUM.  */
 	+ EPIPHANY_STACK_ALIGN (4))
-       <= (unsigned) epiphany_stack_offset)
+       <= (unsigned) GCC_OPTION (epiphany_stack_offset))
       && !interrupt_p
       && crtl->is_leaf && !frame_pointer_needed)
     {
@@ -1104,21 +1104,21 @@ epiphany_compute_frame_size (int size /* # of var. bytes allocated.  */)
     }
   else if (reg_size
 	   && !interrupt_p
-	   && reg_size < (unsigned HOST_WIDE_INT) epiphany_stack_offset)
-    reg_size = epiphany_stack_offset;
+	   && reg_size < (unsigned HOST_WIDE_INT) GCC_OPTION (epiphany_stack_offset))
+    reg_size = GCC_OPTION (epiphany_stack_offset);
   if (interrupt_p)
     {
       if (total_size + reg_size < 0x3fc)
 	{
 	  first_slot_offset = EPIPHANY_STACK_ALIGN (total_size + reg_size);
-	  first_slot_offset += EPIPHANY_STACK_ALIGN (epiphany_stack_offset);
+	  first_slot_offset += EPIPHANY_STACK_ALIGN (GCC_OPTION (epiphany_stack_offset));
 	  last_slot = -1;
 	}
       else
 	{
 	  first_slot_offset = EPIPHANY_STACK_ALIGN (reg_size);
 	  last_slot_offset = EPIPHANY_STACK_ALIGN (total_size);
-	  last_slot_offset += EPIPHANY_STACK_ALIGN (epiphany_stack_offset);
+	  last_slot_offset += EPIPHANY_STACK_ALIGN (GCC_OPTION (epiphany_stack_offset));
 	  if (last_slot >= 0)
 	    CLEAR_HARD_REG_BIT (gmask, last_slot);
 	}
@@ -1130,17 +1130,17 @@ epiphany_compute_frame_size (int size /* # of var. bytes allocated.  */)
     }
   else
     {
-      if (total_size + reg_size <= (unsigned) epiphany_stack_offset)
+      if (total_size + reg_size <= (unsigned) GCC_OPTION (epiphany_stack_offset))
 	{
 	  gcc_assert (first_slot < 0);
-	  gcc_assert (reg_size == 0 || (int) reg_size == epiphany_stack_offset);
+	  gcc_assert (reg_size == 0 || (int) reg_size == GCC_OPTION (epiphany_stack_offset));
 	  last_slot_offset = EPIPHANY_STACK_ALIGN (total_size + reg_size);
 	}
       else
 	{
 	  first_slot_offset
 	    = (reg_size
-	       ? EPIPHANY_STACK_ALIGN (reg_size - epiphany_stack_offset) : 0);
+	       ? EPIPHANY_STACK_ALIGN (reg_size - GCC_OPTION (epiphany_stack_offset)) : 0);
 	  if (!first_slot_offset)
 	    {
 	      if (first_slot != GPR_FP || !current_frame_info.need_fp)
@@ -1149,7 +1149,7 @@ epiphany_compute_frame_size (int size /* # of var. bytes allocated.  */)
 	    }
 	  last_slot_offset = EPIPHANY_STACK_ALIGN (total_size);
 	  if (reg_size)
-	    last_slot_offset += EPIPHANY_STACK_ALIGN (epiphany_stack_offset);
+	    last_slot_offset += EPIPHANY_STACK_ALIGN (GCC_OPTION (epiphany_stack_offset));
 	}
       if (last_slot >= 0)
 	CLEAR_HARD_REG_BIT (gmask, last_slot);
@@ -1159,7 +1159,7 @@ epiphany_compute_frame_size (int size /* # of var. bytes allocated.  */)
     {
       CLEAR_HARD_REG_BIT (gmask, first_slot);
       if (TEST_HARD_REG_BIT (gmask, first_slot ^ 1)
-	  && epiphany_stack_offset - pretend_size >= 2 * UNITS_PER_WORD)
+	  && GCC_OPTION (epiphany_stack_offset) - pretend_size >= 2 * UNITS_PER_WORD)
 	{
 	  CLEAR_HARD_REG_BIT (gmask, first_slot ^ 1);
 	  first_slot_size = 2 * UNITS_PER_WORD;
@@ -1222,7 +1222,7 @@ epiphany_print_operand (FILE *file, rtx x, int code)
      break;
 
     case '-':
-    fprintf (file, "r%d", epiphany_m1reg);
+    fprintf (file, "r%d", GCC_OPTION (epiphany_m1reg));
     return;
 
     case 0 :
@@ -1387,7 +1387,7 @@ epiphany_final_prescan_insn (rtx insn ATTRIBUTE_UNUSED,
 			     rtx *opvec ATTRIBUTE_UNUSED,
 			     int noperands ATTRIBUTE_UNUSED)
 {
-  int i = epiphany_n_nops;
+  int i = GCC_OPTION (epiphany_n_nops);
   rtx pat ATTRIBUTE_UNUSED;
 
   while (i--)
@@ -1464,11 +1464,11 @@ epiphany_function_value_regno_p (const unsigned int regno ATTRIBUTE_UNUSED)
 static void
 epiphany_override_options (void)
 {
-  if (epiphany_stack_offset < 4)
+  if (GCC_OPTION (epiphany_stack_offset) < 4)
     error ("stack_offset must be at least 4");
-  if (epiphany_stack_offset & 3)
+  if (GCC_OPTION (epiphany_stack_offset) & 3)
     error ("stack_offset must be a multiple of 4");
-  epiphany_stack_offset = (epiphany_stack_offset + 3) & -4;
+  GCC_OPTION (epiphany_stack_offset) = (GCC_OPTION (epiphany_stack_offset) + 3) & -4;
 
   /* This needs to be done at start up.  It's convenient to do it here.  */
   epiphany_init ();
@@ -1565,11 +1565,11 @@ epiphany_emit_save_restore (int min, int limit, rtx addr, int epilogue_p)
 {
   int i;
   int stack_offset
-    = current_frame_info.first_slot >= 0 ? epiphany_stack_offset : 0;
+    = current_frame_info.first_slot >= 0 ? GCC_OPTION (epiphany_stack_offset) : 0;
   rtx skipped_mem = NULL_RTX;
   int last_saved = limit - 1;
 
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     while (last_saved >= 0
 	   && !TEST_HARD_REG_BIT (current_frame_info.gmask, last_saved))
       last_saved--;
@@ -1699,7 +1699,7 @@ epiphany_expand_prologue (void)
     epiphany_compute_frame_size (get_frame_size ());
 
   /* It is debatable if we should adjust this by epiphany_stack_offset.  */
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = current_frame_info.total_size;
 
   fn_type = epiphany_compute_function_type (current_function_decl);
@@ -1731,7 +1731,7 @@ epiphany_expand_prologue (void)
   else
     {
       addr = plus_constant (Pmode, stack_pointer_rtx,
-			    epiphany_stack_offset
+			    GCC_OPTION (epiphany_stack_offset)
 			    - (HOST_WIDE_INT) UNITS_PER_WORD);
       epiphany_emit_save_restore (0, current_frame_info.small_threshold,
 				  addr, 0);
@@ -1830,7 +1830,7 @@ epiphany_expand_epilogue (int sibcall_p)
     }
   restore_offset = (interrupt_p
 		    ? - 3 * UNITS_PER_WORD
-		    : epiphany_stack_offset - (HOST_WIDE_INT) UNITS_PER_WORD);
+		    : GCC_OPTION (epiphany_stack_offset) - (HOST_WIDE_INT) UNITS_PER_WORD);
   addr = plus_constant (Pmode, stack_pointer_rtx,
 			(current_frame_info.first_slot_offset
 			 + restore_offset));
@@ -1872,7 +1872,7 @@ epiphany_expand_epilogue (int sibcall_p)
 		      gen_frame_mem (DImode, addr));
     }
   addr = plus_constant (Pmode, stack_pointer_rtx,
-			epiphany_stack_offset - (HOST_WIDE_INT) UNITS_PER_WORD);
+			GCC_OPTION (epiphany_stack_offset) - (HOST_WIDE_INT) UNITS_PER_WORD);
   epiphany_emit_save_restore (0, current_frame_info.small_threshold, addr, 1);
   if (!sibcall_p)
     {
@@ -1964,7 +1964,7 @@ epiphany_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
 
 #define RTX_OK_FOR_INDEX_P(MODE, X) \
   ((GET_MODE_CLASS (MODE) != MODE_VECTOR_INT \
-    || epiphany_vect_align >= GET_MODE_SIZE (MODE)) \
+    || GCC_OPTION (epiphany_vect_align) >= GET_MODE_SIZE (MODE)) \
    && (REG_P (X) && REG_OK_FOR_INDEX_P (X)))
 
 #define LEGITIMATE_OFFSET_ADDRESS_P(MODE, X) \
@@ -2156,10 +2156,10 @@ epiphany_conditional_register_usage (void)
 	  call_used_regs[i] = 1;
 	}
     }
-  if (epiphany_m1reg >= 0)
+  if (GCC_OPTION (epiphany_m1reg) >= 0)
     {
-      fixed_regs[epiphany_m1reg] = 1;
-      call_used_regs[epiphany_m1reg] = 1;
+      fixed_regs[GCC_OPTION (epiphany_m1reg)] = 1;
+      call_used_regs[GCC_OPTION (epiphany_m1reg)] = 1;
     }
   if (!TARGET_PREFER_SHORT_INSN_REGS)
     CLEAR_HARD_REG_SET (reg_class_contents[SHORT_INSN_REGS]);
@@ -2265,14 +2265,14 @@ epiphany_optimize_mode_switching (int entity)
       return true;
     case EPIPHANY_MSW_ENTITY_NEAREST:
     case EPIPHANY_MSW_ENTITY_TRUNC:
-      return optimize > 0;
+      return GCC_OPTION (optimize) > 0;
     case EPIPHANY_MSW_ENTITY_ROUND_UNKNOWN:
       return MACHINE_FUNCTION (cfun)->unknown_mode_uses != 0;
     case EPIPHANY_MSW_ENTITY_ROUND_KNOWN:
       return (MACHINE_FUNCTION (cfun)->sw_entities_processed
 	      & (1 << EPIPHANY_MSW_ENTITY_ROUND_UNKNOWN)) != 0;
     case EPIPHANY_MSW_ENTITY_FPU_OMNIBUS:
-      return optimize == 0 || current_pass == pass_mode_switch_use;
+      return GCC_OPTION (optimize) == 0 || current_pass == pass_mode_switch_use;
     }
   gcc_unreachable ();
 }
@@ -2290,7 +2290,7 @@ epiphany_mode_priority_to_mode (int entity, unsigned priority)
       case 5: return FP_MODE_NONE;
       default: gcc_unreachable ();
       }
-  switch ((enum attr_fp_mode) epiphany_normal_fp_mode)
+  switch ((enum attr_fp_mode) GCC_OPTION (epiphany_normal_fp_mode))
     {
       case FP_MODE_INT:
 	switch (priority)
@@ -2389,7 +2389,7 @@ epiphany_mode_needed (int entity, rtx insn)
 int
 epiphany_mode_entry_exit (int entity, bool exit)
 {
-  int normal_mode = epiphany_normal_fp_mode ;
+  int normal_mode = GCC_OPTION (epiphany_normal_fp_mode) ;
 
   MACHINE_FUNCTION (cfun)->sw_entities_processed |= (1 << entity);
   if (epiphany_is_interrupt_p (current_function_decl))
@@ -2680,10 +2680,10 @@ epiphany_epilogue_uses (int regno)
       return true;
     }
   if (regno == FP_NEAREST_REGNUM
-      && epiphany_normal_fp_mode != FP_MODE_ROUND_TRUNC)
+      && GCC_OPTION (epiphany_normal_fp_mode) != FP_MODE_ROUND_TRUNC)
     return true;
   if (regno == FP_TRUNCATE_REGNUM
-      && epiphany_normal_fp_mode != FP_MODE_ROUND_NEAREST)
+      && GCC_OPTION (epiphany_normal_fp_mode) != FP_MODE_ROUND_NEAREST)
     return true;
   return false;
 }
@@ -2691,7 +2691,7 @@ epiphany_epilogue_uses (int regno)
 static unsigned int
 epiphany_min_divisions_for_recip_mul (enum machine_mode mode)
 {
-  if (flag_reciprocal_math && mode == SFmode)
+  if (GCC_OPTION (flag_reciprocal_math) && mode == SFmode)
     /* We'll expand into a multiply-by-reciprocal anyway, so we might a well do
        it already at the tree level and expose it to further optimizations.  */
     return 1;
diff --git a/gcc/config/epiphany/epiphany.h b/gcc/config/epiphany/epiphany.h
index cffb00c..5c6b6bb 100644
--- a/gcc/config/epiphany/epiphany.h
+++ b/gcc/config/epiphany/epiphany.h
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3.  If not see
 	builtin_define ("__epiphany__");	\
         builtin_define ("__little_endian__");	\
 	builtin_define_with_int_value ("__EPIPHANY_STACK_OFFSET__", \
-				       epiphany_stack_offset); \
+				       GCC_OPTION (epiphany_stack_offset)); \
 	builtin_assert ("cpu=epiphany");	\
 	builtin_assert ("machine=epiphany");	\
     } while (0)
@@ -479,21 +479,21 @@ typedef struct GTY (()) machine_function
    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
    first local allocated.  Otherwise, it is the offset to the BEGINNING
    of the first local allocated.  */
-#define STARTING_FRAME_OFFSET epiphany_stack_offset
+#define STARTING_FRAME_OFFSET GCC_OPTION (epiphany_stack_offset)
 
 /* Offset from the stack pointer register to the first location at which
    outgoing arguments are placed.  */
-#define STACK_POINTER_OFFSET epiphany_stack_offset
+#define STACK_POINTER_OFFSET GCC_OPTION (epiphany_stack_offset)
 
 /* Offset of first parameter from the argument pointer register value.  */
 /* 4 bytes for each of previous fp, return address, and previous gp.
    4 byte reserved area for future considerations.  */
 #define FIRST_PARM_OFFSET(FNDECL) \
-  (epiphany_stack_offset \
+  (GCC_OPTION (epiphany_stack_offset) \
    + (MACHINE_FUNCTION (DECL_STRUCT_FUNCTION (FNDECL))->pretend_args_odd \
       ? 4 : 0))
 
-#define INCOMING_FRAME_SP_OFFSET epiphany_stack_offset
+#define INCOMING_FRAME_SP_OFFSET GCC_OPTION (epiphany_stack_offset)
 
 /* Register to use for pushing function arguments.  */
 #define STACK_POINTER_REGNUM GPR_SP
@@ -641,7 +641,7 @@ typedef struct GTY (()) machine_function
 
 #define RTX_OK_FOR_OFFSET_P(MODE, X) \
   RTX_OK_FOR_OFFSET_1 (GET_MODE_CLASS (MODE) == MODE_VECTOR_INT \
-		       && epiphany_vect_align == 4 ? SImode : (MODE), X)
+		       && GCC_OPTION (epiphany_vect_align) == 4 ? SImode : (MODE), X)
 #define RTX_OK_FOR_OFFSET_1(MODE, X) \
   (GET_CODE (X) == CONST_INT \
    && !(INTVAL (X) & (GET_MODE_SIZE (MODE) - 1)) \
@@ -681,7 +681,7 @@ typedef struct GTY (()) machine_function
 /* ??? What's the right value here?  Branches are certainly more
    expensive than reg->reg moves.  */
 #define BRANCH_COST(speed_p, predictable_p) \
-  (speed_p ? epiphany_branch_cost : 1)
+  (speed_p ? GCC_OPTION (epiphany_branch_cost) : 1)
 
 /* Nonzero if access to memory by bytes is slow and undesirable.
    For RISC chips, it means that access to memory by bytes is no
@@ -709,7 +709,7 @@ typedef struct GTY (()) machine_function
    output in the text section, along with the assembler instructions.
    Otherwise, the readonly data section is used.
    This macro is irrelevant if there is no separate readonly data section.  */
-#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
+#define JUMP_TABLES_IN_TEXT_SECTION (GCC_OPTION (flag_pic))
 
 /* PIC */
 
@@ -720,7 +720,7 @@ typedef struct GTY (()) machine_function
    pointer and frame pointer registers.  If this macro is not defined, it
    is up to the machine-dependent files to allocate such a register (if
    necessary).  */
-#define PIC_OFFSET_TABLE_REGNUM  (flag_pic ? PIC_REGNO : INVALID_REGNUM)
+#define PIC_OFFSET_TABLE_REGNUM  (GCC_OPTION (flag_pic) ? PIC_REGNO : INVALID_REGNUM)
 
 /* Control the assembler format that we output.  */
 
@@ -809,7 +809,7 @@ do \
       const char *__name = (FNAME);					\
       tree attrs = DECL_ATTRIBUTES ((DECL));				\
 									\
-      if (!flag_inhibit_size_directive)					\
+      if (!GCC_OPTION (flag_inhibit_size_directive))					\
 	{								\
 	  if (lookup_attribute ("forwarder_section", attrs))			\
 	    {								\
@@ -841,7 +841,7 @@ do \
 
 /* Specify the machine mode that this machine uses
    for the index in the tablejump instruction.  */
-#define CASE_VECTOR_MODE (TARGET_SMALL16 && optimize_size ? HImode : Pmode)
+#define CASE_VECTOR_MODE (TARGET_SMALL16 && GCC_OPTION (optimize_size) ? HImode : Pmode)
 
 /* Define if operations between registers always perform the operation
    on the full register even if a narrower mode is specified.  */
@@ -936,7 +936,7 @@ extern rtl_opt_pass *make_pass_resolve_sw_modes (gcc::context *ctxt);
 
 /* This will need to be adjusted when FP_CONTRACT_ON is properly
    implemented.  */
-#define TARGET_FUSED_MADD (flag_fp_contract_mode == FP_CONTRACT_FAST)
+#define TARGET_FUSED_MADD (GCC_OPTION (flag_fp_contract_mode) == FP_CONTRACT_FAST)
 
 #undef ASM_DECLARE_FUNCTION_NAME
 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
diff --git a/gcc/config/epiphany/epiphany.md b/gcc/config/epiphany/epiphany.md
index 2844eee..e5dcb0e 100644
--- a/gcc/config/epiphany/epiphany.md
+++ b/gcc/config/epiphany/epiphany.md
@@ -82,7 +82,7 @@
   (cond [(eq_attr "type" "fp,v2fp,fp_sfunc")
 	 (symbol_ref "(enum attr_fp_mode) epiphany_normal_fp_rounding")
 	 (eq_attr "type" "call")
-	 (symbol_ref "(enum attr_fp_mode) epiphany_normal_fp_mode")
+	 (symbol_ref "(enum attr_fp_mode) GCC_OPTION (epiphany_normal_fp_mode)")
 	 (eq_attr "type" "fp_int")
 	 (const_string "int")]
 	(const_string "none")))
@@ -306,7 +306,7 @@
   if (GET_MODE_CLASS (<MODE>mode) == MODE_VECTOR_INT
       || GET_MODE_CLASS (<MODE>mode) == MODE_VECTOR_FLOAT)
     {
-      if (epiphany_vect_align == 4 && TARGET_SPLIT_VECMOVE_EARLY)
+      if (GCC_OPTION (epiphany_vect_align) == 4 && TARGET_SPLIT_VECMOVE_EARLY)
 	{
 	  rtx o0l, o0h, o1l, o1h;
 
@@ -331,7 +331,7 @@
       /* lower_subreg has a tendency to muck up vectorized code.
 	 To protect the wide memory accesses, we must use same-size
 	 subregs.  */
-      if (epiphany_vect_align != 4 /* == 8 */
+      if (GCC_OPTION (epiphany_vect_align) != 4 /* == 8 */
 	  && !reload_in_progress
 	  && (GET_CODE (operands[0]) == MEM || GET_CODE (operands[1]) == MEM)
 	  && !misaligned_operand (operands[1], <MODE>mode)
@@ -368,7 +368,7 @@
    && (((!MEM_P (operands[0]) || misaligned_operand (operands[0], <MODE>mode))
 	&& (!MEM_P (operands[1])
 	    || misaligned_operand (operands[1], <MODE>mode)))
-       || epiphany_vect_align == 4)"
+       || GCC_OPTION (epiphany_vect_align) == 4)"
   [(set (match_dup 2) (match_dup 3))
    (set (match_dup 4) (match_dup 5))]
 {
@@ -688,7 +688,7 @@
   [(set (match_operand:SF 0 "gpr_operand" "")
 	(div:SF (match_operand:SF 1 "gpr_operand" "")
 		(match_operand:SF 2 "gpr_operand" "")))]
-  "flag_reciprocal_math"
+  "GCC_OPTION (flag_reciprocal_math)"
 {
   rtx one = CONST1_RTX (SFmode);
   rtx dst = operands[0];
@@ -744,7 +744,7 @@
       (clobber (reg:SI GPR_LR))
       (clobber (reg:CC CC_REGNUM))
       (clobber (reg:CC_FP CCFP_REGNUM))])]
-  "flag_reciprocal_math"
+  "GCC_OPTION (flag_reciprocal_math)"
   "#"
   "&& reload_completed"
   [(set (reg:SI 1) (match_dup 3))
@@ -782,7 +782,7 @@
       (clobber (reg:SI GPR_LR))
       (clobber (reg:CC CC_REGNUM))
       (clobber (reg:CC_FP CCFP_REGNUM))])]
-  "flag_reciprocal_math"
+  "GCC_OPTION (flag_reciprocal_math)"
   "jalr r1"
   [(set_attr "type" "fp_sfunc")])
 
@@ -824,7 +824,7 @@
 			     (match_operand:SF 2 "gpr_operand" "r"))
 		    (match_operand:SF 3 "gpr_operand" "0")))
       (clobber (reg:CC_FP CCFP_REGNUM))])]
-  "TARGET_FUSED_MADD")
+  "GCC_OPTION (TARGET_FUSED_MADD)")
 
 (define_insn "*maddsf_combine"
   [(match_parallel 4 "float_operation"
@@ -833,7 +833,7 @@
 			     (match_operand:SF 2 "gpr_operand" "r"))
 		    (match_operand:SF 3 "gpr_operand" "0")))
       (clobber (reg:CC_FP CCFP_REGNUM))])]
-  "TARGET_FUSED_MADD"
+  "GCC_OPTION (TARGET_FUSED_MADD)"
   "fmadd %0,%1,%2"
   [(set_attr "type" "fp")])
 
@@ -865,7 +865,7 @@
 		      (mult:SF (match_operand:SF 1 "gpr_operand" "r")
 			       (match_operand:SF 2 "gpr_operand" "r"))))
       (clobber (reg:CC_FP CCFP_REGNUM))])]
-  "TARGET_FUSED_MADD"
+  "GCC_OPTION (TARGET_FUSED_MADD)"
   "fmsub %0,%1,%2"
   [(set_attr "type" "fp")])
 
@@ -1536,7 +1536,7 @@
 		(match_dup 2)))]
   ""
 {
-  if (epiphany_m1reg >= 0)
+  if (GCC_OPTION (epiphany_m1reg) >= 0)
     emit_insn (gen_one_cmplsi2_i (operands[0], operands[1]));
   else
     emit_insn (gen_xorsi3 (operands[0], operands[1],
@@ -1550,7 +1550,7 @@
   [(set (match_operand:SI 0 "gpr_operand" "=r")
         (not:SI (match_operand:SI 1 "gpr_operand" "r")))
    (clobber (reg:CC CC_REGNUM))]
-  "epiphany_m1reg >= 0"
+  "GCC_OPTION (epiphany_m1reg) >= 0"
   "eor %0,%1,%-")
 
 ;; Shift instructions.
@@ -2146,7 +2146,7 @@
 {
   /* In PIC mode, the table entries are stored PC relative.
      Convert the relative address to an absolute address.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       rtx op1 = gen_rtx_LABEL_REF (Pmode, operands[1]);
 
@@ -2165,7 +2165,7 @@
 (define_insn "*tablejump_hi_internal"
   [(set (pc) (match_operand:HI 0 "gpr_operand" "r"))
    (use (label_ref (match_operand 1 "" "")))]
-  "optimize_size && TARGET_SMALL16"
+  "GCC_OPTION (optimize_size) && TARGET_SMALL16"
   "jr %0;"
   [(set_attr "type" "uncond_branch")])
 
@@ -2477,7 +2477,7 @@
    (clobber (reg:CC CC_REGNUM))]
   ""
   "#"
-  "reload_completed || (epiphany_vect_align == 4 && TARGET_SPLIT_VECMOVE_EARLY)"
+  "reload_completed || (GCC_OPTION (epiphany_vect_align) == 4 && TARGET_SPLIT_VECMOVE_EARLY)"
   [(const_int 0)]
 {
   rtx o0l, o0h, o1l, o1h, o2l, o2h;
@@ -2513,7 +2513,7 @@
       (clobber (reg:CC_FP CCFP_REGNUM))])]
   ""
   "#"
-  "reload_completed || (epiphany_vect_align == 4 && TARGET_SPLIT_VECMOVE_EARLY)"
+  "reload_completed || (GCC_OPTION (epiphany_vect_align) == 4 && TARGET_SPLIT_VECMOVE_EARLY)"
   [(parallel
      [(set (match_dup 4) (addsub:SF (match_dup 5) (match_dup 6)))
       (clobber (reg:CC_FP CCFP_REGNUM))
@@ -2667,7 +2667,7 @@
       (clobber (reg:CC_FP CCFP_REGNUM))])]
   ""
   "#"
-  "reload_completed || (epiphany_vect_align == 4 && TARGET_SPLIT_VECMOVE_EARLY)"
+  "reload_completed || (GCC_OPTION (epiphany_vect_align) == 4 && TARGET_SPLIT_VECMOVE_EARLY)"
   [(parallel
      [(set (match_dup 4) (mult:<vmode_PART> (match_dup 5) (match_dup 6)))
       (clobber (reg:CC_FP CCFP_REGNUM))
@@ -2717,9 +2717,9 @@
 				(match_operand:<MODE> 2 "gpr_operand" "r"))
 			  (match_operand:<MODE> 3 "gpr_operand" "0")))
       (clobber (reg:CC_FP CCFP_REGNUM))])]
-  "TARGET_FUSED_MADD || <MODE>mode == V2SImode"
+  "GCC_OPTION (TARGET_FUSED_MADD) || <MODE>mode == V2SImode"
   "#"
-  "reload_completed || (epiphany_vect_align == 4 && TARGET_SPLIT_VECMOVE_EARLY)"
+  "reload_completed || (GCC_OPTION (epiphany_vect_align) == 4 && TARGET_SPLIT_VECMOVE_EARLY)"
   [(parallel
      [(set (match_dup 5)
 	   (plus:<vmode_PART> (mult:<vmode_PART> (match_dup 6) (match_dup 7))
diff --git a/gcc/config/epiphany/predicates.md b/gcc/config/epiphany/predicates.md
index fb8fd88..6b0acd6 100644
--- a/gcc/config/epiphany/predicates.md
+++ b/gcc/config/epiphany/predicates.md
@@ -26,7 +26,7 @@
 {
   if (GET_CODE (op) == SYMBOL_REF)
     return (!epiphany_is_long_call_p (op)
-	    && (!flag_pic || SYMBOL_REF_LOCAL_P (op)));
+	    && (!GCC_OPTION (flag_pic) || SYMBOL_REF_LOCAL_P (op)));
   if (GET_CODE (op) == LABEL_REF)
     return true;
   if (GET_CODE (op) == CONST)
diff --git a/gcc/config/epiphany/resolve-sw-modes.c b/gcc/config/epiphany/resolve-sw-modes.c
index 1684918..6dd07b0 100644
--- a/gcc/config/epiphany/resolve-sw-modes.c
+++ b/gcc/config/epiphany/resolve-sw-modes.c
@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3.  If not see
 static bool
 gate_resolve_sw_modes (void)
 {
-  return optimize;
+  return GCC_OPTION (optimize);
 }
 
 static unsigned
diff --git a/gcc/config/fr30/fr30.c b/gcc/config/fr30/fr30.c
index 65084f6..1f8baed 100644
--- a/gcc/config/fr30/fr30.c
+++ b/gcc/config/fr30/fr30.c
@@ -1009,7 +1009,7 @@ fr30_move_double (rtx * operands)
 bool
 fr30_frame_pointer_required (void)
 {
-  return (flag_omit_frame_pointer == 0 || crtl->args.pretend_args_size > 0);
+  return (GCC_OPTION (flag_omit_frame_pointer) == 0 || crtl->args.pretend_args_size > 0);
 }
 
 /*}}}*/
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index f2dadc3..c1f1c70 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -541,7 +541,7 @@ frv_small_data_reloc_p (rtx symbol, int reloc)
 {
   return (GET_CODE (symbol) == SYMBOL_REF
 	  && SYMBOL_REF_SMALL_P (symbol)
-	  && (!TARGET_FDPIC || flag_pic == 1)
+	  && (!TARGET_FDPIC || GCC_OPTION (flag_pic) == 1)
 	  && (reloc == R_FRV_GOTOFF12 || reloc == R_FRV_GPREL12));
 }
 
@@ -570,7 +570,7 @@ frv_const_unspec_p (rtx x, struct frv_unspec *unspec)
 
 	  if (frv_small_data_reloc_p (unspec->symbol, unspec->reloc)
 	      && unspec->offset > 0
-	      && unspec->offset < g_switch_value)
+	      && unspec->offset < GCC_OPTION (g_switch_value))
 	    return true;
 	}
     }
@@ -606,7 +606,7 @@ frv_cannot_force_const_mem (enum machine_mode mode ATTRIBUTE_UNUSED,
 static int
 frv_default_flags_for_cpu (void)
 {
-  switch (frv_cpu_type)
+  switch (GCC_OPTION (frv_cpu_type))
     {
     case FRV_CPU_GENERIC:
       return MASK_DEFAULT_FRV;
@@ -642,18 +642,18 @@ frv_option_override (void)
   int regno;
   unsigned int i;
 
-  target_flags |= (frv_default_flags_for_cpu () & ~target_flags_explicit);
+  GCC_OPTION (target_flags) |= (frv_default_flags_for_cpu () & ~target_flags_explicit);
 
   /* -mlibrary-pic sets -fPIC and -G0 and also suppresses warnings from the
      linker about linking pic and non-pic code.  */
   if (TARGET_LIBPIC)
     {
-      if (!flag_pic)		/* -fPIC */
-	flag_pic = 2;
+      if (!GCC_OPTION (flag_pic))		/* -fPIC */
+	GCC_OPTION (flag_pic) = 2;
 
       if (!global_options_set.x_g_switch_value)	/* -G0 */
 	{
-	  g_switch_value = 0;
+	  GCC_OPTION (g_switch_value) = 0;
 	}
     }
 
@@ -745,19 +745,19 @@ frv_option_override (void)
 
   /* Check for small data option */
   if (!global_options_set.x_g_switch_value && !TARGET_LIBPIC)
-    g_switch_value = SDATA_DEFAULT_SIZE;
+    GCC_OPTION (g_switch_value) = SDATA_DEFAULT_SIZE;
 
   /* There is no single unaligned SI op for PIC code.  Sometimes we
      need to use ".4byte" and sometimes we need to use ".picptr".
      See frv_assemble_integer for details.  */
-  if (flag_pic || TARGET_FDPIC)
+  if (GCC_OPTION (flag_pic) || TARGET_FDPIC)
     targetm.asm_out.unaligned_op.si = 0;
 
   if ((target_flags_explicit & MASK_LINKED_FP) == 0)
-    target_flags |= MASK_LINKED_FP;
+    GCC_OPTION (target_flags) |= MASK_LINKED_FP;
 
   if ((target_flags_explicit & MASK_OPTIMIZE_MEMBAR) == 0)
-    target_flags |= MASK_OPTIMIZE_MEMBAR;
+    GCC_OPTION (target_flags) |= MASK_OPTIMIZE_MEMBAR;
 
   for (i = 0; i < ARRAY_SIZE (frv_unit_names); i++)
     frv_unit_codes[i] = get_cpu_unit_code (frv_unit_names[i]);
@@ -831,10 +831,10 @@ frv_conditional_register_usage (void)
 
 #if 0
   /* If -fpic, SDA_BASE_REG is the PIC register.  */
-  if (g_switch_value == 0 && !flag_pic)
+  if (GCC_OPTION (g_switch_value) == 0 && !GCC_OPTION (flag_pic))
     fixed_regs[SDA_BASE_REG] = call_used_regs[SDA_BASE_REG] = 0;
 
-  if (!flag_pic)
+  if (!GCC_OPTION (flag_pic))
     fixed_regs[PIC_REGNO] = call_used_regs[PIC_REGNO] = 0;
 #endif
 }
@@ -1109,7 +1109,7 @@ frv_stack_info (void)
 	      if ((df_regs_ever_live_p (regno) && !call_used_regs[regno])
 		  || (crtl->calls_eh_return
 		      && (regno >= FIRST_EH_REGNUM && regno <= LAST_EH_REGNUM))
-		  || (!TARGET_FDPIC && flag_pic
+		  || (!TARGET_FDPIC && GCC_OPTION (flag_pic)
 		      && crtl->uses_pic_offset_table && regno == PIC_REGNO))
 		{
 		  info_ptr->save_p[regno] = REG_SAVE_1WORD;
@@ -1125,11 +1125,11 @@ frv_stack_info (void)
 
 	case STACK_REGS_LR:
 	  if (df_regs_ever_live_p (LR_REGNO)
-              || profile_flag
+              || GCC_OPTION (profile_flag)
 	      /* This is set for __builtin_return_address, etc.  */
 	      || cfun->machine->frame_needed
               || (TARGET_LINKED_FP && frame_pointer_needed)
-              || (!TARGET_FDPIC && flag_pic
+              || (!TARGET_FDPIC && GCC_OPTION (flag_pic)
 		  && crtl->uses_pic_offset_table))
 	    {
 	      info_ptr->save_p[LR_REGNO] = REG_SAVE_1WORD;
@@ -1757,10 +1757,10 @@ frv_expand_prologue (void)
   rtx fp = frame_pointer_rtx;
   frv_frame_accessor_t accessor;
 
-  if (TARGET_DEBUG_STACK)
+  if (GCC_OPTION (TARGET_DEBUG_STACK))
     frv_debug_stack (info);
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = info->total_size;
 
   if (info->total_size == 0)
@@ -1853,7 +1853,7 @@ frv_expand_prologue (void)
     emit_insn (gen_blockage ());
 
   /* Set up pic register/small data register for this function.  */
-  if (!TARGET_FDPIC && flag_pic && crtl->uses_pic_offset_table)
+  if (!TARGET_FDPIC && GCC_OPTION (flag_pic) && crtl->uses_pic_offset_table)
     emit_insn (gen_pic_prologue (gen_rtx_REG (Pmode, PIC_REGNO),
 				 gen_rtx_REG (Pmode, LR_REGNO),
 				 gen_rtx_REG (SImode, OFFSET_REGNO)));
@@ -1998,7 +1998,7 @@ frv_asm_output_mi_thunk (FILE *file,
       const char *name_pic = reg_names[FDPIC_REGNO];
       name_jmp = reg_names[FDPIC_FPTR_REGNO];
 
-      if (flag_pic != 1)
+      if (GCC_OPTION (flag_pic) != 1)
 	{
 	  fprintf (file, "\tsethi%s #gotofffuncdeschi(", parallel);
 	  assemble_name (file, name_func);
@@ -2017,7 +2017,7 @@ frv_asm_output_mi_thunk (FILE *file,
 	  fprintf (file, "\t)), %s\n", name_jmp);
 	}
     }
-  else if (!flag_pic)
+  else if (!GCC_OPTION (flag_pic))
     {
       fprintf (file, "\tsethi%s #hi(", parallel);
       assemble_name (file, name_func);
@@ -2081,10 +2081,10 @@ frv_frame_pointer_required (void)
   if (!crtl->sp_is_unchanging)
     return true;
 
-  if (!TARGET_FDPIC && flag_pic && crtl->uses_pic_offset_table)
+  if (!TARGET_FDPIC && GCC_OPTION (flag_pic) && crtl->uses_pic_offset_table)
     return true;
 
-  if (profile_flag)
+  if (GCC_OPTION (profile_flag))
     return true;
 
   if (cfun->machine->frame_needed)
@@ -2130,7 +2130,7 @@ frv_initial_elimination_offset (int from, int to)
   else
     gcc_unreachable ();
 
-  if (TARGET_DEBUG_STACK)
+  if (GCC_OPTION (TARGET_DEBUG_STACK))
     fprintf (stderr, "Eliminate %s to %s by adding %d\n",
 	     reg_names [from], reg_names[to], ret);
 
@@ -2149,7 +2149,7 @@ frv_setup_incoming_varargs (cumulative_args_t cum_v,
 {
   CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
 
-  if (TARGET_DEBUG_ARG)
+  if (GCC_OPTION (TARGET_DEBUG_ARG))
     fprintf (stderr,
 	     "setup_vararg: words = %2d, mode = %4s, pretend_size = %d, second_time = %d\n",
 	     *cum, GET_MODE_NAME (mode), *pretend_size, second_time);
@@ -2163,7 +2163,7 @@ frv_expand_builtin_saveregs (void)
 {
   int offset = UNITS_PER_WORD * FRV_NUM_ARG_REGS;
 
-  if (TARGET_DEBUG_ARG)
+  if (GCC_OPTION (TARGET_DEBUG_ARG))
     fprintf (stderr, "expand_builtin_saveregs: offset from ap = %d\n",
 	     offset);
 
@@ -2182,7 +2182,7 @@ frv_expand_builtin_va_start (tree valist, rtx nextarg)
   nextarg = gen_rtx_PLUS (Pmode, virtual_incoming_args_rtx,
 			  GEN_INT (UNITS_PER_WORD * num));
 
-  if (TARGET_DEBUG_ARG)
+  if (GCC_OPTION (TARGET_DEBUG_ARG))
     {
       fprintf (stderr, "va_start: args_info = %d, num = %d\n",
 	       crtl->args.info, num);
@@ -2680,7 +2680,7 @@ frv_print_operand_jump_hint (rtx insn)
     }
 
 #if 0
-  if (TARGET_DEBUG)
+  if (GCC_OPTION (TARGET_DEBUG))
     {
       char *direction;
 
@@ -3084,7 +3084,7 @@ frv_init_cumulative_args (CUMULATIVE_ARGS *cum,
 {
   *cum = FIRST_ARG_REGNUM;
 
-  if (TARGET_DEBUG_ARG)
+  if (GCC_OPTION (TARGET_DEBUG_ARG))
     {
       fprintf (stderr, "\ninit_cumulative_args:");
       if (!fndecl && fntype)
@@ -3166,7 +3166,7 @@ frv_function_arg_1 (cumulative_args_t cum_v, enum machine_mode mode,
       debstr = "memory";
     }
 
-  if (TARGET_DEBUG_ARG)
+  if (GCC_OPTION (TARGET_DEBUG_ARG))
     fprintf (stderr,
 	     "function_arg: words = %2d, mode = %4s, named = %d, size = %3d, arg = %s\n",
 	     arg_num, GET_MODE_NAME (mode), named, GET_MODE_SIZE (mode), debstr);
@@ -3213,7 +3213,7 @@ frv_function_arg_advance (cumulative_args_t cum_v,
 
   *cum = arg_num + words;
 
-  if (TARGET_DEBUG_ARG)
+  if (GCC_OPTION (TARGET_DEBUG_ARG))
     fprintf (stderr,
 	     "function_adv: words = %2d, mode = %4s, named = %d, size = %3d\n",
 	     arg_num, GET_MODE_NAME (mode), named, words * UNITS_PER_WORD);
@@ -3252,7 +3252,7 @@ frv_arg_partial_bytes (cumulative_args_t cum, enum machine_mode mode,
 	 : 0);
   ret *= UNITS_PER_WORD;
 
-  if (TARGET_DEBUG_ARG && ret)
+  if (GCC_OPTION (TARGET_DEBUG_ARG) && ret)
     fprintf (stderr, "frv_arg_partial_bytes: %d\n", ret);
 
   return ret;
@@ -3461,7 +3461,7 @@ frv_legitimate_address_p_1 (enum machine_mode mode,
       break;
     }
 
-  if (TARGET_DEBUG_ADDR)
+  if (GCC_OPTION (TARGET_DEBUG_ADDR))
     {
       fprintf (stderr, "\n========== legitimate_address_p, mode = %s, result = %d, addresses are %sstrict%s\n",
 	       GET_MODE_NAME (mode), ret, (strict_p) ? "" : "not ",
@@ -3488,7 +3488,7 @@ gen_inlined_tls_plt (rtx addr)
 
   dest = gen_reg_rtx (DImode);
 
-  if (flag_pic == 1)
+  if (GCC_OPTION (flag_pic) == 1)
     {
       /*
 	-fpic version:
@@ -3558,7 +3558,7 @@ frv_legitimize_tls_address (rtx addr, enum tls_model model)
   switch (model)
     {
     case TLS_MODEL_INITIAL_EXEC:
-      if (flag_pic == 1)
+      if (GCC_OPTION (flag_pic) == 1)
 	{
 	  /* -fpic version.
 	     ldi @(gr15, #gottlsoff12(x)), gr5
@@ -3677,13 +3677,13 @@ frv_local_funcdesc_p (rtx fnx)
     /* Private function descriptors for protected functions are not
        canonical.  Temporarily change the visibility to global.  */
     vis = VISIBILITY_DEFAULT;
-  else if (flag_shlib)
+  else if (GCC_OPTION (flag_shlib))
     /* If we're already compiling for a shared library (that, unlike
        executables, can't assume that the existence of a definition
        implies local binding), we can skip the re-testing.  */
     return TRUE;
 
-  ret = default_binds_local_p_1 (fn, flag_pic);
+  ret = default_binds_local_p_1 (fn, GCC_OPTION (flag_pic));
 
   DECL_VISIBILITY (fn) = vis;
 
@@ -3820,7 +3820,7 @@ frv_expand_fdpic_call (rtx *operands, bool ret_value, bool sibcall)
     {
       rtx x, dest;
       dest = gen_reg_rtx (SImode);
-      if (flag_pic != 1)
+      if (GCC_OPTION (flag_pic) != 1)
 	x = gen_symGOTOFF2reg_hilo (dest, addr, OUR_FDPIC_REG,
 				    GEN_INT (R_FRV_FUNCDESC_GOTOFF12));
       else
@@ -4060,7 +4060,7 @@ frv_emit_movsi (rtx dest, rtx src)
 	  else
 	    unspec = R_FRV_GOT12;
 	}
-      else if (flag_pic)
+      else if (GCC_OPTION (flag_pic))
 	base_regno = PIC_REGNO;
 
       break;
@@ -4120,7 +4120,7 @@ frv_emit_movsi (rtx dest, rtx src)
 		  case CONST:
 		  case SYMBOL_REF:
 		  case LABEL_REF:
-		    if (flag_pic)
+		    if (GCC_OPTION (flag_pic))
 		      {
 			unspec = R_FRV_GOTOFF12;
 			break;
@@ -4171,7 +4171,7 @@ frv_emit_movsi (rtx dest, rtx src)
       else if (SYMBOL_REF_SMALL_P (sym))
 	base_regno = SDA_BASE_REG;
 
-      else if (flag_pic)
+      else if (GCC_OPTION (flag_pic))
 	base_regno = PIC_REGNO;
 
       break;
@@ -4217,14 +4217,14 @@ frv_emit_movsi (rtx dest, rtx src)
 	    x = gen_symGPREL2reg (dest, src, OUR_FDPIC_REG, GEN_INT (unspec));
 	  break;
 	case R_FRV_FUNCDESC_GOTOFF12:
-	  if (flag_pic != 1)
+	  if (GCC_OPTION (flag_pic) != 1)
 	    x = gen_symGOTOFF2reg_hilo (dest, src, OUR_FDPIC_REG,
 					GEN_INT (unspec));
 	  else
 	    x = gen_symGOTOFF2reg (dest, src, OUR_FDPIC_REG, GEN_INT (unspec));
 	  break;
 	default:
-	  if (flag_pic != 1)
+	  if (GCC_OPTION (flag_pic) != 1)
 	    x = gen_symGOT2reg_hilo (dest, src, OUR_FDPIC_REG,
 				     GEN_INT (unspec));
 	  else
@@ -5253,7 +5253,7 @@ frv_ifcvt_add_insn (rtx pattern, rtx insn, int before_p)
   frv_ifcvt.added_insns_list = alloc_EXPR_LIST (VOIDmode, link,
 						frv_ifcvt.added_insns_list);
 
-  if (TARGET_DEBUG_COND_EXEC)
+  if (GCC_OPTION (TARGET_DEBUG_COND_EXEC))
     {
       fprintf (stderr,
 	       "\n:::::::::: frv_ifcvt_add_insn: add the following %s insn %d:\n",
@@ -5651,7 +5651,7 @@ frv_ifcvt_modify_multiple_tests (ce_if_block *ce_info,
   enum machine_mode mode = GET_MODE (true_expr);
   rtx (*logical_func)(rtx, rtx, rtx);
 
-  if (TARGET_DEBUG_COND_EXEC)
+  if (GCC_OPTION (TARGET_DEBUG_COND_EXEC))
     {
       fprintf (stderr,
 	       "\n:::::::::: frv_ifcvt_modify_multiple_tests, before modification for %s\ntrue insn:\n",
@@ -5726,7 +5726,7 @@ frv_ifcvt_modify_multiple_tests (ce_if_block *ce_info,
      inserted.  */
   frv_ifcvt_add_insn (check_insn, BB_END (bb), TRUE);
 
-  if (TARGET_DEBUG_COND_EXEC)
+  if (GCC_OPTION (TARGET_DEBUG_COND_EXEC))
     {
       fputs ("\n:::::::::: frv_ifcvt_modify_multiple_tests, after modification\ntrue insn:\n",
 	     stderr);
@@ -5749,7 +5749,7 @@ frv_ifcvt_modify_multiple_tests (ce_if_block *ce_info,
       *p_new_cr = NULL_RTX;
     }
 
-  if (TARGET_DEBUG_COND_EXEC)
+  if (GCC_OPTION (TARGET_DEBUG_COND_EXEC))
     fputs ("\n:::::::::: frv_ifcvt_modify_multiple_tests, failed.\n", stderr);
 
   return;
@@ -6150,7 +6150,7 @@ frv_ifcvt_modify_insn (ce_if_block *ce_info,
 	}
     }
 
-  if (TARGET_DEBUG_COND_EXEC)
+  if (GCC_OPTION (TARGET_DEBUG_COND_EXEC))
     {
       rtx orig_pattern = PATTERN (insn);
 
@@ -6166,7 +6166,7 @@ frv_ifcvt_modify_insn (ce_if_block *ce_info,
   return pattern;
 
  fail:
-  if (TARGET_DEBUG_COND_EXEC)
+  if (GCC_OPTION (TARGET_DEBUG_COND_EXEC))
     {
       rtx orig_pattern = PATTERN (insn);
 
@@ -6959,7 +6959,7 @@ frv_memory_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
 static bool
 frv_assemble_integer (rtx value, unsigned int size, int aligned_p)
 {
-  if ((flag_pic || TARGET_FDPIC) && size == UNITS_PER_WORD)
+  if ((GCC_OPTION (flag_pic) || TARGET_FDPIC) && size == UNITS_PER_WORD)
     {
       if (GET_CODE (value) == CONST
 	  || GET_CODE (value) == SYMBOL_REF
@@ -7020,7 +7020,7 @@ frv_issue_rate (void)
   if (!TARGET_PACK)
     return 1;
 
-  switch (frv_cpu_type)
+  switch (GCC_OPTION (frv_cpu_type))
     {
     default:
     case FRV_CPU_FR300:
@@ -7066,7 +7066,7 @@ int
 frv_acc_group (rtx insn)
 {
   /* This distinction only applies to the FR550 packing constraints.  */
-  if (frv_cpu_type != FRV_CPU_FR550)
+  if (GCC_OPTION (frv_cpu_type) != FRV_CPU_FR550)
     return ACC_GROUP_NONE;
   return for_each_rtx (&PATTERN (insn), frv_acc_group_1, 0);
 }
@@ -7456,8 +7456,8 @@ frv_for_each_packet (void (*handle_packet) (void))
   frv_packet.issue_rate = frv_issue_rate ();
 
   /* Early exit if we don't want to pack insns.  */
-  if (!optimize
-      || !flag_schedule_insns_after_reload
+  if (!GCC_OPTION (optimize)
+      || !GCC_OPTION (flag_schedule_insns_after_reload)
       || !TARGET_VLIW_BRANCH
       || frv_packet.issue_rate == 1)
     return false;
@@ -7490,7 +7490,7 @@ frv_for_each_packet (void (*handle_packet) (void))
 
 	  default:
 	    /* Calls mustn't be packed on a TOMCAT.  */
-	    if (CALL_P (insn) && frv_cpu_type == FRV_CPU_TOMCAT)
+	    if (CALL_P (insn) && GCC_OPTION (frv_cpu_type) == FRV_CPU_TOMCAT)
 	      frv_finish_packet (handle_packet);
 
 	    /* Since the last instruction in a packet determines the EH
@@ -8194,7 +8194,7 @@ frv_register_nop (rtx nop)
 static void
 frv_reorg (void)
 {
-  if (optimize > 0 && TARGET_OPTIMIZE_MEMBAR && cfun->machine->has_membar_p)
+  if (GCC_OPTION (optimize) > 0 && TARGET_OPTIMIZE_MEMBAR && cfun->machine->has_membar_p)
     frv_optimize_membar ();
 
   frv_num_nops = 0;
@@ -9515,7 +9515,7 @@ frv_in_small_data_p (const_tree decl)
     }
 
   size = int_size_in_bytes (TREE_TYPE (decl));
-  if (size > 0 && size <= g_switch_value)
+  if (size > 0 && size <= GCC_OPTION (g_switch_value))
     return true;
 
   return false;
diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h
index c936fd5..48cfa6b 100644
--- a/gcc/config/frv/frv.h
+++ b/gcc/config/frv/frv.h
@@ -150,7 +150,7 @@
       builtin_define_with_int_value ("__FRV_FPR__", NUM_FPRS);		\
       builtin_define_with_int_value ("__FRV_ACC__", NUM_ACCS);		\
 									\
-      switch (frv_cpu_type)						\
+      switch (GCC_OPTION (frv_cpu_type))						\
 	{								\
 	case FRV_CPU_GENERIC:						\
 	  builtin_define ("__CPU_GENERIC__");				\
@@ -183,7 +183,7 @@
 	builtin_define ("__FRV_DWORD__");				\
       if (TARGET_FDPIC)							\
 	builtin_define ("__FRV_FDPIC__");				\
-      if (flag_leading_underscore > 0)					\
+      if (GCC_OPTION (flag_leading_underscore) > 0)					\
 	builtin_define ("__FRV_UNDERSCORE__");				\
     }									\
   while (0)
@@ -199,7 +199,7 @@
 #define ACC_MASK						\
   (!TARGET_MEDIA ? 0						\
    : TARGET_ACC_4 ? 3						\
-   : frv_cpu_type == FRV_CPU_FR450 ? 11				\
+   : GCC_OPTION (frv_cpu_type) == FRV_CPU_FR450 ? 11				\
    : 7)
 
 /* Macros to identify the blend of media instructions available.  Revision 1
@@ -211,26 +211,26 @@
 
 #define TARGET_MEDIA_REV1					\
   (TARGET_MEDIA							\
-   && (frv_cpu_type == FRV_CPU_GENERIC				\
-       || frv_cpu_type == FRV_CPU_FR500))
+   && (GCC_OPTION (frv_cpu_type) == FRV_CPU_GENERIC				\
+       || GCC_OPTION (frv_cpu_type) == FRV_CPU_FR500))
 
 #define TARGET_MEDIA_REV2					\
   (TARGET_MEDIA							\
-   && (frv_cpu_type == FRV_CPU_FR400				\
-       || frv_cpu_type == FRV_CPU_FR405				\
-       || frv_cpu_type == FRV_CPU_FR450				\
-       || frv_cpu_type == FRV_CPU_FR550))
+   && (GCC_OPTION (frv_cpu_type) == FRV_CPU_FR400				\
+       || GCC_OPTION (frv_cpu_type) == FRV_CPU_FR405				\
+       || GCC_OPTION (frv_cpu_type) == FRV_CPU_FR450				\
+       || GCC_OPTION (frv_cpu_type) == FRV_CPU_FR550))
 
 #define TARGET_MEDIA_FR450					\
-  (frv_cpu_type == FRV_CPU_FR450)
+  (GCC_OPTION (frv_cpu_type) == FRV_CPU_FR450)
 
 #define TARGET_FR500_FR550_BUILTINS				\
-   (frv_cpu_type == FRV_CPU_FR500				\
-    || frv_cpu_type == FRV_CPU_FR550)
+   (GCC_OPTION (frv_cpu_type) == FRV_CPU_FR500				\
+    || GCC_OPTION (frv_cpu_type) == FRV_CPU_FR550)
 
 #define TARGET_FR405_BUILTINS					\
-  (frv_cpu_type == FRV_CPU_FR405				\
-   || frv_cpu_type == FRV_CPU_FR450)
+  (GCC_OPTION (frv_cpu_type) == FRV_CPU_FR405				\
+   || GCC_OPTION (frv_cpu_type) == FRV_CPU_FR450)
 
 #ifndef HAVE_AS_TLS
 #define HAVE_AS_TLS 0
@@ -409,7 +409,7 @@
 #define GPR_FP          (GPR_FIRST + 2)         /* Frame pointer */
 #define GPR_SP          (GPR_FIRST + 1)         /* Stack pointer */
 						/* small data register */
-#define SDA_BASE_REG    ((unsigned)(TARGET_FDPIC ? -1 : flag_pic ? PIC_REGNO : (GPR_FIRST + 16)))
+#define SDA_BASE_REG    ((unsigned)(TARGET_FDPIC ? -1 : GCC_OPTION (flag_pic) ? PIC_REGNO : (GPR_FIRST + 16)))
 #define PIC_REGNO       (GPR_FIRST + (TARGET_FDPIC?15:17))        /* PIC register.  */
 #define FDPIC_FPTR_REGNO  (GPR_FIRST + 14)        /* uClinux PIC function pointer register.  */
 #define FDPIC_REGNO   (GPR_FIRST + 15)        /* uClinux PIC register.  */
@@ -421,7 +421,7 @@
 #define FPR_FIRST       64			/* First FP reg */
 #define FPR_LAST        127			/* Last  FP reg */
 
-#define GPR_TEMP_NUM	frv_condexec_temps	/* # gprs to reserve for temps */
+#define GPR_TEMP_NUM	GCC_OPTION (frv_condexec_temps)	/* # gprs to reserve for temps */
 
 /* We reserve the last CR and CCR in each category to be used as a reload
    register to reload the CR/CCR registers.  This is a kludge.  */
@@ -1522,7 +1522,7 @@ __asm__("\n"								\
 
 /* A C expression for the cost of a branch instruction.  A value of 1 is the
    default; other values are interpreted relative to that.  */
-#define BRANCH_COST(speed_p, predictable_p) frv_branch_cost_int
+#define BRANCH_COST(speed_p, predictable_p) GCC_OPTION (frv_branch_cost_int)
 
 /* Define this macro as a C expression which is nonzero if accessing less than
    a word of memory (i.e. a `char' or a `short') is no faster than accessing a
@@ -1620,7 +1620,7 @@ do {									\
 } while (0)
 
 /* Whether to emit the gas specific dwarf2 line number support.  */
-#define DWARF2_ASM_LINE_DEBUG_INFO (TARGET_DEBUG_LOC)
+#define DWARF2_ASM_LINE_DEBUG_INFO (GCC_OPTION (TARGET_DEBUG_LOC))
 
 /* Output of Uninitialized Variables.  */
 
@@ -1651,7 +1651,7 @@ extern int size_directive_output;
 #undef ASM_OUTPUT_ALIGNED_DECL_LOCAL
 #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(STREAM, DECL, NAME, SIZE, ALIGN)	\
 do {                                                                   	\
-  if ((SIZE) > 0 && (SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value)	\
+  if ((SIZE) > 0 && (SIZE) <= (unsigned HOST_WIDE_INT) GCC_OPTION (g_switch_value))	\
     switch_to_section (get_named_section (NULL, ".sbss", 0));           \
   else                                                                 	\
     switch_to_section (bss_section);                                  	\
@@ -1813,7 +1813,7 @@ fprintf (STREAM, "\t.word .L%d-.L%d\n", VALUE, REL)
 #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \
 fprintf (STREAM, "\t.word .L%d\n", VALUE)
 
-#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
+#define JUMP_TABLES_IN_TEXT_SECTION (GCC_OPTION (flag_pic))
 
 /* Assembler Commands for Exception Regions.  */
 
@@ -1937,7 +1937,7 @@ fprintf (STREAM, "\t.word .L%d\n", VALUE)
    conditional execution instructions instead of a branch.  A value of
    BRANCH_COST+1 is the default if the machine does not use
    cc0, and 1 if it does use cc0.  */
-#define MAX_CONDITIONAL_EXECUTE frv_condexec_insns
+#define MAX_CONDITIONAL_EXECUTE GCC_OPTION (frv_condexec_insns)
 
 /* A C expression to modify the code described by the conditional if
    information CE_INFO, possibly updating the tests in TRUE_EXPR, and
@@ -2001,7 +2001,7 @@ frv_ifcvt_modify_multiple_tests (CE_INFO, BB, &TRUE_EXPR, &FALSE_EXPR)
    the more tries will be made to choose better schedule.  If the
    macro value is zero or negative there will be no multi-pass
    scheduling.  */
-#define FIRST_CYCLE_MULTIPASS_SCHEDULING_LOOKAHEAD frv_sched_lookahead
+#define FIRST_CYCLE_MULTIPASS_SCHEDULING_LOOKAHEAD GCC_OPTION (frv_sched_lookahead)
 
 enum frv_builtins
 {
diff --git a/gcc/config/frv/frv.md b/gcc/config/frv/frv.md
index d6268bf..b4b70d1 100644
--- a/gcc/config/frv/frv.md
+++ b/gcc/config/frv/frv.md
@@ -344,7 +344,7 @@
 ;; enumeration in frv-protos.h.
 
 (define_attr "cpu" "generic,fr550,fr500,fr450,fr405,fr400,fr300,simple,tomcat"
-  (const (symbol_ref "(enum attr_cpu) frv_cpu_type")))
+  (const (symbol_ref "(enum attr_cpu) GCC_OPTION (frv_cpu_type)")))
 
 ;; Attribute is "yes" for branches and jumps that span too great a distance
 ;; to be implemented in the most natural way.  Such instructions will use
@@ -5518,7 +5518,7 @@
 (define_expand "tablejump"
   [(parallel [(set (pc) (match_operand:SI 0 "address_operand" "p"))
 	      (use (label_ref (match_operand 1 "" "")))])]
-  "!flag_pic"
+  "!GCC_OPTION (flag_pic)"
   "")
 
 (define_insn "tablejump_insn"
@@ -5545,7 +5545,7 @@
    (use (match_operand:SI 2 "const_int_operand" ""))
    (use (match_operand 3 "" ""))
    (use (match_operand 4 "" ""))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "
 {
   rtx indx;
diff --git a/gcc/config/frv/predicates.md b/gcc/config/frv/predicates.md
index 972db99..731a3f2 100644
--- a/gcc/config/frv/predicates.md
+++ b/gcc/config/frv/predicates.md
@@ -516,10 +516,10 @@
       if (TARGET_FDPIC)
 	return FALSE;
       
-      return (flag_pic == 0);
+      return (GCC_OPTION (flag_pic) == 0);
 
     case CONST:
-      if (flag_pic || TARGET_FDPIC)
+      if (GCC_OPTION (flag_pic) || TARGET_FDPIC)
 	return FALSE;
 
       op = XEXP (op, 0);
@@ -532,7 +532,7 @@
 	return FALSE;
       
       /* small data references are already 1 word */
-      return (flag_pic == 0) && (! SYMBOL_REF_SMALL_P (op));
+      return (GCC_OPTION (flag_pic) == 0) && (! SYMBOL_REF_SMALL_P (op));
 
     case CONST_INT:
       return ! IN_RANGE (INTVAL (op), -32768, 32767);
@@ -1072,7 +1072,7 @@
     return FALSE;
 
   if (GET_CODE (op) == SYMBOL_REF)
-    return !TARGET_LONG_CALLS || SYMBOL_REF_LOCAL_P (op);
+    return !GCC_OPTION (TARGET_LONG_CALLS) || SYMBOL_REF_LOCAL_P (op);
 
   /* Note this doesn't allow reg+reg or reg+imm12 addressing (which should
      never occur anyway), but prevents reload from not handling the case
diff --git a/gcc/config/h8300/constraints.md b/gcc/config/h8300/constraints.md
index a1d295a..321c80a 100644
--- a/gcc/config/h8300/constraints.md
+++ b/gcc/config/h8300/constraints.md
@@ -57,7 +57,7 @@
 ;;     needed too late.
 
 (define_register_constraint "d"
-  "(!flag_omit_frame_pointer && !reload_completed
+  "(!GCC_OPTION (flag_omit_frame_pointer) && !reload_completed
     ? NO_REGS
     : (frame_pointer_needed && reload_in_progress
        ? NO_REGS
diff --git a/gcc/config/h8300/elf.h b/gcc/config/h8300/elf.h
index 97e844b..f3c0f61 100644
--- a/gcc/config/h8300/elf.h
+++ b/gcc/config/h8300/elf.h
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3.  If not see
 #undef USER_LABEL_PREFIX
 #define USER_LABEL_PREFIX "_"
 
-#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
+#define JUMP_TABLES_IN_TEXT_SECTION (GCC_OPTION (flag_pic))
 
 #undef LINK_SPEC
 #define LINK_SPEC "%{mh:%{mn:-m h8300hnelf}} %{mh:%{!mn:-m h8300helf}} %{ms:%{mn:-m h8300snelf}} %{ms:%{!mn:-m h8300self}} %{msx:%{mn:-m h8300sxnelf;:-m h8300sxelf}}"
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index e7ed03a..6b0faa2 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -322,7 +322,7 @@ h8300_option_override (void)
   if (TARGET_H8300SX)
     {
       error ("-msx is not supported in coff");
-      target_flags |= MASK_H8300S;
+      GCC_OPTION (target_flags) |= MASK_H8300S;
     }
 #endif
 
@@ -344,31 +344,31 @@ h8300_option_override (void)
   if (!TARGET_H8300S && TARGET_MAC)
     {
       error ("-ms2600 is used without -ms");
-      target_flags |= MASK_H8300S_1;
+      GCC_OPTION (target_flags) |= MASK_H8300S_1;
     }
 
   if (TARGET_H8300 && TARGET_NORMAL_MODE)
     {
       error ("-mn is used without -mh or -ms or -msx");
-      target_flags ^= MASK_NORMAL_MODE;
+      GCC_OPTION (target_flags) ^= MASK_NORMAL_MODE;
     }
 
   if (! TARGET_H8300S &&  TARGET_EXR)
     {
       error ("-mexr is used without -ms");
-      target_flags |= MASK_H8300S_1;
+      GCC_OPTION (target_flags) |= MASK_H8300S_1;
     }
 
   if (TARGET_H8300 && TARGET_INT32)
    {
       error ("-mint32 is not supported for H8300 and H8300L targets");
-      target_flags ^= MASK_INT32;
+      GCC_OPTION (target_flags) ^= MASK_INT32;
    }
 
  if ((!TARGET_H8300S  &&  TARGET_EXR) && (!TARGET_H8300SX && TARGET_EXR))
    {
       error ("-mexr is used without -ms or -msx");
-      target_flags |= MASK_H8300S_1;
+      GCC_OPTION (target_flags) |= MASK_H8300S_1;
    }
 
  if ((!TARGET_H8300S  &&  TARGET_NEXR) && (!TARGET_H8300SX && TARGET_NEXR))
@@ -381,7 +381,7 @@ h8300_option_override (void)
      See http://gcc.gnu.org/ml/gcc-patches/2002-07/msg01858.html
      If optimizing for size, change shift_alg for those shift to
      SHIFT_LOOP.  */
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     {
       /* H8/300 */
       shift_alg_hi[H8_300][SHIFT_ASHIFT][5] = SHIFT_LOOP;
@@ -418,7 +418,7 @@ h8300_option_override (void)
 	 h8sx instructions.  */
       h8300_move_ratio = 3;
     }
-  else if (flag_omit_frame_pointer)
+  else if (GCC_OPTION (flag_omit_frame_pointer))
     {
       /* movmd sequences are fairly cheap when er6 isn't fixed.  They can
 	 sometimes be as short as two individual memory-to-memory moves,
@@ -426,7 +426,7 @@ h8300_option_override (void)
 	 to allow up to three moves here.  */
       h8300_move_ratio = 4;
     }
-  else if (optimize_size)
+  else if (GCC_OPTION (optimize_size))
     {
       /* In this case we don't use movmd sequences since they tend
 	 to be longer than calls to memcpy().  Memory-to-memory
@@ -443,8 +443,8 @@ h8300_option_override (void)
     }
 
   /* This target defaults to strict volatile bitfields.  */
-  if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
-    flag_strict_volatile_bitfields = 1;
+  if (GCC_OPTION (flag_strict_volatile_bitfields) < 0 && abi_version_at_least(2))
+    GCC_OPTION (flag_strict_volatile_bitfields) = 1;
 }
 
 /* Return the byte register name for a register rtx X.  B should be 0
@@ -2006,7 +2006,7 @@ h8300_return_addr_rtx (int count, rtx frame)
   if (count == 0)
     ret = gen_rtx_MEM (Pmode,
 		       gen_rtx_REG (Pmode, RETURN_ADDRESS_POINTER_REGNUM));
-  else if (flag_omit_frame_pointer)
+  else if (GCC_OPTION (flag_omit_frame_pointer))
     return (rtx) 0;
   else
     ret = gen_rtx_MEM (Pmode,
@@ -2662,7 +2662,7 @@ bool
 h8sx_emit_movmd (rtx dest, rtx src, rtx length,
 		 HOST_WIDE_INT alignment)
 {
-  if (!flag_omit_frame_pointer && optimize_size)
+  if (!GCC_OPTION (flag_omit_frame_pointer) && GCC_OPTION (optimize_size))
     return false;
 
   if (GET_CODE (length) == CONST_INT)
@@ -5573,7 +5573,7 @@ output_simode_bld (int bild, rtx operands[])
 static void
 h8300_reorg (void)
 {
-  if (flag_delayed_branch)
+  if (GCC_OPTION (flag_delayed_branch))
     shorten_branches (get_insns ());
 }
 
diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md
index e20ed35..7980dff 100644
--- a/gcc/config/h8300/h8300.md
+++ b/gcc/config/h8300/h8300.md
@@ -2409,8 +2409,8 @@
 
 	  vec = XVEC (final_sequence, 0);
 	  final_sequence = 0;
-	  final_scan_insn (RTVEC_ELT (vec, 1), asm_out_file, optimize, 1, & seen);
-	  final_scan_insn (RTVEC_ELT (vec, 0), asm_out_file, optimize, 1, & seen);
+	  final_scan_insn (RTVEC_ELT (vec, 1), asm_out_file, GCC_OPTION (optimize), 1, & seen);
+	  final_scan_insn (RTVEC_ELT (vec, 0), asm_out_file, GCC_OPTION (optimize), 1, & seen);
 	  INSN_DELETED_P (RTVEC_ELT (vec, 1)) = 1;
 	  return "";
 	}
diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md
index 65335f1..cbcc6df 100644
--- a/gcc/config/i386/constraints.md
+++ b/gcc/config/i386/constraints.md
@@ -141,7 +141,7 @@
  "@internal Any integer register when integer XFmode moves are enabled.")
 
 (define_register_constraint "Yf"
- "(ix86_fpmath & FPMATH_387) ? FLOAT_REGS : NO_REGS"
+ "(GCC_OPTION (ix86_fpmath) & FPMATH_387) ? FLOAT_REGS : NO_REGS"
  "@internal Any x87 register when 80387 FP arithmetic is enabled.")
 
 (define_register_constraint "v" "TARGET_SSE ? ALL_SSE_REGS : NO_REGS"
diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h
index 039edcc..438ba29 100644
--- a/gcc/config/i386/cygming.h
+++ b/gcc/config/i386/cygming.h
@@ -32,7 +32,7 @@ along with GCC; see the file COPYING3.  If not see
 #endif
 
 #undef TARGET_SEH
-#define TARGET_SEH  (TARGET_64BIT_MS_ABI && flag_unwind_tables)
+#define TARGET_SEH  (TARGET_64BIT_MS_ABI && GCC_OPTION (flag_unwind_tables))
 
 /* Win64 with SEH cannot represent DRAP stack frames.  Disable its use.
    Force the use of different mechanisms to allocate aligned local data.  */
@@ -78,7 +78,7 @@ along with GCC; see the file COPYING3.  If not see
 #undef DBX_REGISTER_NUMBER
 #define DBX_REGISTER_NUMBER(n)				\
   (TARGET_64BIT ? dbx64_register_map[n]			\
-   : (write_symbols == DWARF2_DEBUG			\
+   : (GCC_OPTION (write_symbols) == DWARF2_DEBUG			\
       ? svr4_dbx_register_map[n] : dbx_register_map[n]))
 
 /* Map gcc register number to DWARF 2 CFA column number. For 32 bit
@@ -198,19 +198,19 @@ along with GCC; see the file COPYING3.  If not see
 #undef  SUBTARGET_OVERRIDE_OPTIONS
 #define SUBTARGET_OVERRIDE_OPTIONS					\
 do {									\
-  if (TARGET_64BIT && flag_pic != 1)					\
+  if (TARGET_64BIT && GCC_OPTION (flag_pic) != 1)					\
     {									\
-      if (flag_pic > 1)							\
+      if (GCC_OPTION (flag_pic) > 1)							\
         warning (0,							\
 	         "-fPIC ignored for target (all code is position independent)"\
                  );                         				\
-      flag_pic = 1;							\
+      GCC_OPTION (flag_pic) = 1;							\
     }									\
-  else if (!TARGET_64BIT && flag_pic)					\
+  else if (!TARGET_64BIT && GCC_OPTION (flag_pic))					\
     {									\
       warning (0, "-f%s ignored for target (all code is position independent)",\
-	       (flag_pic > 1) ? "PIC" : "pic");				\
-      flag_pic = 0;							\
+	       (GCC_OPTION (flag_pic) > 1) ? "PIC" : "pic");				\
+      GCC_OPTION (flag_pic) = 0;							\
     }									\
 } while (0)
 
@@ -272,7 +272,7 @@ do {						\
 #define CHECK_STACK_LIMIT 4000
 
 #undef STACK_BOUNDARY
-#define STACK_BOUNDARY	(TARGET_64BIT && ix86_abi == MS_ABI ? 128 : BITS_PER_WORD)
+#define STACK_BOUNDARY	(TARGET_64BIT && GCC_OPTION (ix86_abi) == MS_ABI ? 128 : BITS_PER_WORD)
 
 /* By default, target has a 80387, uses IEEE compatible arithmetic,
    returns float values in the 387 and needs stack probes.
diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h
index 5c9b073..7b188f4 100644
--- a/gcc/config/i386/darwin.h
+++ b/gcc/config/i386/darwin.h
@@ -69,7 +69,7 @@ extern int darwin_emit_branch_islands;
 /* For compatibility with OSX system tools, use the new style of pic stub
    if this is set.  */
 #undef  MACHOPIC_ATT_STUB
-#define MACHOPIC_ATT_STUB (darwin_macho_att_stub)
+#define MACHOPIC_ATT_STUB (GCC_OPTION (darwin_macho_att_stub))
 
 #undef MAX_BITS_PER_WORD
 #define MAX_BITS_PER_WORD 64
@@ -85,7 +85,7 @@ extern int darwin_emit_branch_islands;
    or dynamic loader.  */
 #undef STACK_BOUNDARY
 #define STACK_BOUNDARY \
- ((profile_flag || (TARGET_64BIT && ix86_abi == MS_ABI)) \
+ ((GCC_OPTION (profile_flag) || (TARGET_64BIT && GCC_OPTION (ix86_abi) == MS_ABI)) \
   ? 128 : BITS_PER_WORD)
 
 #undef MAIN_STACK_BOUNDARY
@@ -233,7 +233,7 @@ extern int darwin_emit_branch_islands;
 #define SUBTARGET_OVERRIDE_OPTIONS \
 do {									\
   if (TARGET_64BIT && MACHO_DYNAMIC_NO_PIC_P)				\
-    target_flags &= ~MASK_MACHO_DYNAMIC_NO_PIC;				\
+    GCC_OPTION (target_flags) &= ~MASK_MACHO_DYNAMIC_NO_PIC;				\
 } while (0)
 
 /* Darwin on x86_64 uses dwarf-2 by default.  Pre-darwin9 32-bit
@@ -249,13 +249,13 @@ do {									\
 #undef DBX_REGISTER_NUMBER
 #define DBX_REGISTER_NUMBER(n) 					\
   (TARGET_64BIT ? dbx64_register_map[n]				\
-   : write_symbols == DWARF2_DEBUG ? svr4_dbx_register_map[n]	\
+   : GCC_OPTION (write_symbols) == DWARF2_DEBUG ? svr4_dbx_register_map[n]	\
    : dbx_register_map[n])
 
 /* Unfortunately, the 32-bit EH information also doesn't use the standard
    DWARF register numbers.  */
 #define DWARF2_FRAME_REG_OUT(n, for_eh)					\
-  (! (for_eh) || write_symbols != DWARF2_DEBUG || TARGET_64BIT ? (n)	\
+  (! (for_eh) || GCC_OPTION (write_symbols) != DWARF2_DEBUG || TARGET_64BIT ? (n)	\
    : (n) == 5 ? 4							\
    : (n) == 4 ? 5							\
    : (n) >= 11 && (n) <= 18 ? (n) + 1					\
diff --git a/gcc/config/i386/djgpp.h b/gcc/config/i386/djgpp.h
index 6ddd833..d7f5897 100644
--- a/gcc/config/i386/djgpp.h
+++ b/gcc/config/i386/djgpp.h
@@ -166,7 +166,7 @@ along with GCC; see the file COPYING3.  If not see
 #define SUBTARGET_OVERRIDE_OPTIONS \
 do \
   { \
-    if (TARGET_BNU210) \
+    if (GCC_OPTION (TARGET_BNU210)) \
       {	\
         warning (0, "-mbnu210 is ignored (option is obsolete)"); \
       }	\
diff --git a/gcc/config/i386/i386-c.c b/gcc/config/i386/i386-c.c
index c9977bf..37bc5d2 100644
--- a/gcc/config/i386/i386-c.c
+++ b/gcc/config/i386/i386-c.c
@@ -49,10 +49,10 @@ ix86_target_macros_internal (HOST_WIDE_INT isa_flag,
 {
   /* For some of the k6/pentium varients there weren't separate ISA bits to
      identify which tune/arch flag was passed, so figure it out here.  */
-  size_t arch_len = strlen (ix86_arch_string);
-  size_t tune_len = strlen (ix86_tune_string);
-  int last_arch_char = ix86_arch_string[arch_len - 1];
-  int last_tune_char = ix86_tune_string[tune_len - 1];
+  size_t arch_len = strlen (GCC_OPTION (ix86_arch_string));
+  size_t tune_len = strlen (GCC_OPTION (ix86_tune_string));
+  int last_arch_char = GCC_OPTION (ix86_arch_string)[arch_len - 1];
+  int last_tune_char = GCC_OPTION (ix86_tune_string)[tune_len - 1];
 
   /* Built-ins based on -march=.  */
   switch (arch)
@@ -285,7 +285,7 @@ ix86_target_macros_internal (HOST_WIDE_INT isa_flag,
       break;
     }
 
-  switch (ix86_cmodel)
+  switch (GCC_OPTION (ix86_cmodel))
     {
     case CM_SMALL:
     case CM_SMALL_PIC:
@@ -521,10 +521,10 @@ ix86_target_macros (void)
   cpp_define_formatted (parse_in, "__ATOMIC_HLE_ACQUIRE=%d", IX86_HLE_ACQUIRE);
   cpp_define_formatted (parse_in, "__ATOMIC_HLE_RELEASE=%d", IX86_HLE_RELEASE);
 
-  ix86_target_macros_internal (ix86_isa_flags,
+  ix86_target_macros_internal (GCC_OPTION (ix86_isa_flags),
 			       ix86_arch,
 			       ix86_tune,
-			       ix86_fpmath,
+			       GCC_OPTION (ix86_fpmath),
 			       cpp_define);
 }
 
diff --git a/gcc/config/i386/i386-interix.h b/gcc/config/i386/i386-interix.h
index 59bbb50..0b80d7e 100644
--- a/gcc/config/i386/i386-interix.h
+++ b/gcc/config/i386/i386-interix.h
@@ -211,7 +211,7 @@ extern void i386_pe_unique_section (tree, int);
 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)			\
   do									\
     {									\
-      if (write_symbols != SDB_DEBUG)					\
+      if (GCC_OPTION (write_symbols) != SDB_DEBUG)					\
        i386_pe_declare_function_type (FILE, NAME, TREE_PUBLIC (DECL));	\
       ASM_OUTPUT_LABEL (FILE, NAME);       				\
     }									\
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 842be68..5d48c8f 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -2820,7 +2820,7 @@ ix86_target_string (HOST_WIDE_INT isa, int flags, const char *arch,
 static bool
 ix86_profile_before_prologue (void)
 {
-  return flag_fentry != 0;
+  return GCC_OPTION (flag_fentry) != 0;
 }
 
 /* Function that is callable from the debugger to print the current
@@ -2828,9 +2828,9 @@ ix86_profile_before_prologue (void)
 void ATTRIBUTE_UNUSED
 ix86_debug_options (void)
 {
-  char *opts = ix86_target_string (ix86_isa_flags, target_flags,
-				   ix86_arch_string, ix86_tune_string,
-				   ix86_fpmath, true);
+  char *opts = ix86_target_string (GCC_OPTION (ix86_isa_flags), GCC_OPTION (target_flags),
+				   GCC_OPTION (ix86_arch_string), GCC_OPTION (ix86_tune_string),
+				   GCC_OPTION (ix86_fpmath), true);
 
   if (opts)
     {
@@ -2984,11 +2984,11 @@ ix86_parse_stringop_strategy_string (char *strategy_str, bool is_memset)
 static void
 parse_mtune_ctrl_str (bool dump)
 {
-  if (!ix86_tune_ctrl_string)
+  if (!GCC_OPTION (ix86_tune_ctrl_string))
     return;
 
   char *next_feature_string = NULL;
-  char *curr_feature_string = xstrdup (ix86_tune_ctrl_string);
+  char *curr_feature_string = xstrdup (GCC_OPTION (ix86_tune_ctrl_string));
   char *orig = curr_feature_string;
   int i;
   do
@@ -3034,7 +3034,7 @@ set_ix86_tune_features (enum processor_type ix86_tune, bool dump)
 
   for (i = 0; i < X86_TUNE_LAST; ++i)
     {
-      if (ix86_tune_no_default)
+      if (GCC_OPTION (ix86_tune_no_default))
         ix86_tune_features[i] = 0;
       else
         ix86_tune_features[i] = !!(initial_ix86_tune_features[i] & ix86_tune_mask);
@@ -3615,11 +3615,11 @@ ix86_option_override_internal (bool main_args_p,
 	    && !(opts->x_ix86_isa_flags_explicit & OPTION_MASK_ISA_MOVBE))
 	  opts->x_ix86_isa_flags |= OPTION_MASK_ISA_MOVBE;
 	if (processor_alias_table[i].flags & PTA_AES
-	    && !(ix86_isa_flags_explicit & OPTION_MASK_ISA_AES))
-	  ix86_isa_flags |= OPTION_MASK_ISA_AES;
+	    && !(GCC_OPTION (ix86_isa_flags_explicit) & OPTION_MASK_ISA_AES))
+	  GCC_OPTION (ix86_isa_flags) |= OPTION_MASK_ISA_AES;
 	if (processor_alias_table[i].flags & PTA_SHA
-	    && !(ix86_isa_flags_explicit & OPTION_MASK_ISA_SHA))
-	  ix86_isa_flags |= OPTION_MASK_ISA_SHA;
+	    && !(GCC_OPTION (ix86_isa_flags_explicit) & OPTION_MASK_ISA_SHA))
+	  GCC_OPTION (ix86_isa_flags) |= OPTION_MASK_ISA_SHA;
 	if (processor_alias_table[i].flags & PTA_PCLMUL
 	    && !(opts->x_ix86_isa_flags_explicit & OPTION_MASK_ISA_PCLMUL))
 	  opts->x_ix86_isa_flags |= OPTION_MASK_ISA_PCLMUL;
@@ -4136,7 +4136,7 @@ ix86_option_override_internal (bool main_args_p,
      AVX unaligned load/store.  */
   if (!opts->x_optimize_size)
     {
-      if (flag_expensive_optimizations
+      if (GCC_OPTION (flag_expensive_optimizations)
 	  && !(opts_set->x_target_flags & MASK_VZEROUPPER))
 	opts->x_target_flags |= MASK_VZEROUPPER;
       if (!ix86_tune_features[X86_TUNE_AVX256_UNALIGNED_LOAD_OPTIMAL]
@@ -4344,7 +4344,7 @@ ix86_function_specific_save (struct cl_target_option *ptr,
   ptr->arch = ix86_arch;
   ptr->schedule = ix86_schedule;
   ptr->tune = ix86_tune;
-  ptr->branch_cost = ix86_branch_cost;
+  ptr->branch_cost = GCC_OPTION (ix86_branch_cost);
   ptr->tune_defaulted = ix86_tune_defaulted;
   ptr->arch_specified = ix86_arch_specified;
   ptr->x_ix86_isa_flags_explicit = opts->x_ix86_isa_flags_explicit;
@@ -4380,7 +4380,7 @@ ix86_function_specific_save (struct cl_target_option *ptr,
   gcc_assert (ptr->arch == ix86_arch);
   gcc_assert (ptr->schedule == ix86_schedule);
   gcc_assert (ptr->tune == ix86_tune);
-  gcc_assert (ptr->branch_cost == ix86_branch_cost);
+  gcc_assert (ptr->branch_cost == GCC_OPTION (ix86_branch_cost));
 }
 
 /* Restore the current options */
@@ -4395,7 +4395,7 @@ ix86_function_specific_restore (struct gcc_options *opts,
   int i;
 
   /* We don't change -fPIC.  */
-  opts->x_flag_pic = flag_pic;
+  opts->x_flag_pic = GCC_OPTION (flag_pic);
 
   ix86_arch = (enum processor_type) ptr->arch;
   ix86_schedule = (enum attr_cpu) ptr->schedule;
@@ -4997,7 +4997,7 @@ ix86_set_current_function (tree fndecl)
 static bool
 ix86_in_large_data_p (tree exp)
 {
-  if (ix86_cmodel != CM_MEDIUM && ix86_cmodel != CM_MEDIUM_PIC)
+  if (GCC_OPTION (ix86_cmodel) != CM_MEDIUM && GCC_OPTION (ix86_cmodel) != CM_MEDIUM_PIC)
     return false;
 
   /* Functions are never large data.  */
@@ -5018,7 +5018,7 @@ ix86_in_large_data_p (tree exp)
 
       /* If this is an incomplete type with size 0, then we can't put it
 	 in data because it might be too big when completed.  */
-      if (!size || size > ix86_section_threshold)
+      if (!size || size > GCC_OPTION (ix86_section_threshold))
 	return true;
     }
 
@@ -5034,7 +5034,7 @@ ATTRIBUTE_UNUSED static section *
 x86_64_elf_select_section (tree decl, int reloc,
 			   unsigned HOST_WIDE_INT align)
 {
-  if ((ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_MEDIUM_PIC)
+  if ((GCC_OPTION (ix86_cmodel) == CM_MEDIUM || GCC_OPTION (ix86_cmodel) == CM_MEDIUM_PIC)
       && ix86_in_large_data_p (decl))
     {
       const char *sname = NULL;
@@ -5121,7 +5121,7 @@ x86_64_elf_section_type_flags (tree decl, const char *name, int reloc)
 static void ATTRIBUTE_UNUSED
 x86_64_elf_unique_section (tree decl, int reloc)
 {
-  if ((ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_MEDIUM_PIC)
+  if ((GCC_OPTION (ix86_cmodel) == CM_MEDIUM || GCC_OPTION (ix86_cmodel) == CM_MEDIUM_PIC)
       && ix86_in_large_data_p (decl))
     {
       const char *prefix = NULL;
@@ -5189,8 +5189,8 @@ x86_elf_aligned_common (FILE *file,
 			const char *name, unsigned HOST_WIDE_INT size,
 			int align)
 {
-  if ((ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_MEDIUM_PIC)
-      && size > (unsigned int)ix86_section_threshold)
+  if ((GCC_OPTION (ix86_cmodel) == CM_MEDIUM || GCC_OPTION (ix86_cmodel) == CM_MEDIUM_PIC)
+      && size > (unsigned int)GCC_OPTION (ix86_section_threshold))
     fputs (".largecomm\t", file);
   else
     fputs (COMMON_ASM_OP, file);
@@ -5208,8 +5208,8 @@ x86_output_aligned_bss (FILE *file, tree decl ATTRIBUTE_UNUSED,
 			const char *name, unsigned HOST_WIDE_INT size,
 			int align)
 {
-  if ((ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_MEDIUM_PIC)
-      && size > (unsigned int)ix86_section_threshold)
+  if ((GCC_OPTION (ix86_cmodel) == CM_MEDIUM || GCC_OPTION (ix86_cmodel) == CM_MEDIUM_PIC)
+      && size > (unsigned int)GCC_OPTION (ix86_section_threshold))
     switch_to_section (get_named_section (decl, ".lbss", 0));
   else
     switch_to_section (bss_section);
@@ -5232,7 +5232,7 @@ bool
 ix86_target_stack_probe (void)
 {
   /* Do not probe the stack twice if static stack checking is enabled.  */
-  if (flag_stack_check == STATIC_BUILTIN_STACK_CHECK)
+  if (GCC_OPTION (flag_stack_check) == STATIC_BUILTIN_STACK_CHECK)
     return false;
 
   return TARGET_STACK_PROBE;
@@ -5253,7 +5253,7 @@ ix86_function_ok_for_sibcall (tree decl, tree exp)
      as the PLT requires %ebx be live. (Darwin does not have a PLT.)  */
   if (!TARGET_MACHO
       && !TARGET_64BIT
-      && flag_pic
+      && GCC_OPTION (flag_pic)
       && (!decl || !targetm.binds_local_p (decl)))
     return false;
 
@@ -5452,7 +5452,7 @@ ix86_handle_cconv_attribute (tree *node, tree name,
     }
   else if (is_attribute_p ("thiscall", name))
     {
-      if (TREE_CODE (*node) != METHOD_TYPE && pedantic)
+      if (TREE_CODE (*node) != METHOD_TYPE && GCC_OPTION (pedantic))
 	warning (OPT_Wattributes, "%qE attribute is used for none class-method",
 	         name);
       if (lookup_attribute ("stdcall", TYPE_ATTRIBUTES (*node)))
@@ -5596,7 +5596,7 @@ ix86_function_regparm (const_tree type, const_tree decl)
     return (ix86_function_type_abi (type) == SYSV_ABI
 	    ? X86_64_REGPARM_MAX : X86_64_MS_REGPARM_MAX);
   ccvt = ix86_get_callcvt (type);
-  regparm = ix86_regparm;
+  regparm = GCC_OPTION (ix86_regparm);
 
   if ((ccvt & IX86_CALLCVT_REGPARM) != 0)
     {
@@ -5621,7 +5621,7 @@ ix86_function_regparm (const_tree type, const_tree decl)
 	 and callee not, or vice versa.  Instead look at whether the callee
 	 is optimized or not.  */
       && opt_for_fn (decl, optimize)
-      && !(profile_flag && !flag_fentry))
+      && !(GCC_OPTION (profile_flag) && !GCC_OPTION (flag_fentry)))
     {
       /* FIXME: remove this CONST_CAST when cgraph.[ch] is constified.  */
       struct cgraph_local_info *i = cgraph_local_info (CONST_CAST_TREE (decl));
@@ -5641,7 +5641,7 @@ ix86_function_regparm (const_tree type, const_tree decl)
 	    local_regparm = 2;
 
 	  /* In 32-bit mode save a register for the split stack.  */
-	  if (!TARGET_64BIT && local_regparm == 3 && flag_split_stack)
+	  if (!TARGET_64BIT && local_regparm == 3 && GCC_OPTION (flag_split_stack))
 	    local_regparm = 2;
 
 	  /* Each fixed register usage increases register pressure,
@@ -5697,8 +5697,8 @@ ix86_function_sseregparm (const_tree type, const_tree decl, bool warn)
 
   /* For local functions, pass up to SSE_REGPARM_MAX SFmode
      (and DFmode for SSE2) arguments in SSE registers.  */
-  if (decl && TARGET_SSE_MATH && optimize
-      && !(profile_flag && !flag_fentry))
+  if (decl && TARGET_SSE_MATH && GCC_OPTION (optimize)
+      && !(GCC_OPTION (profile_flag) && !GCC_OPTION (flag_fentry)))
     {
       /* FIXME: remove this CONST_CAST when cgraph.[ch] is constified.  */
       struct cgraph_local_info *i = cgraph_local_info (CONST_CAST_TREE(decl));
@@ -5914,14 +5914,14 @@ ix86_function_arg_regno_p (int regno)
      default ABI.  */
 
   /* RAX is used as hidden argument to va_arg functions.  */
-  if (ix86_abi == SYSV_ABI && regno == AX_REG)
+  if (GCC_OPTION (ix86_abi) == SYSV_ABI && regno == AX_REG)
     return true;
 
-  if (ix86_abi == MS_ABI)
+  if (GCC_OPTION (ix86_abi) == MS_ABI)
     parm_regs = x86_64_ms_abi_int_parameter_registers;
   else
     parm_regs = x86_64_int_parameter_registers;
-  for (i = 0; i < (ix86_abi == MS_ABI
+  for (i = 0; i < (GCC_OPTION (ix86_abi) == MS_ABI
 		   ? X86_64_MS_REGPARM_MAX : X86_64_REGPARM_MAX); i++)
     if (regno == parm_regs[i])
       return true;
@@ -5966,7 +5966,7 @@ ix86_function_type_abi (const_tree fntype)
 {
   if (fntype != NULL_TREE && TYPE_ATTRIBUTES (fntype) != NULL_TREE)
     {
-      enum calling_abi abi = ix86_abi;
+      enum calling_abi abi = GCC_OPTION (ix86_abi);
       if (abi == SYSV_ABI)
 	{
 	  if (lookup_attribute ("ms_abi", TYPE_ATTRIBUTES (fntype)))
@@ -5976,7 +5976,7 @@ ix86_function_type_abi (const_tree fntype)
 	abi = SYSV_ABI;
       return abi;
     }
-  return ix86_abi;
+  return GCC_OPTION (ix86_abi);
 }
 
 /* We add this as a workaround in order to use libc_has_function
@@ -6005,7 +6005,7 @@ static enum calling_abi
 ix86_function_abi (const_tree fndecl)
 {
   if (! fndecl)
-    return ix86_abi;
+    return GCC_OPTION (ix86_abi);
   return ix86_function_type_abi (TREE_TYPE (fndecl));
 }
 
@@ -6015,7 +6015,7 @@ enum calling_abi
 ix86_cfun_abi (void)
 {
   if (! cfun)
-    return ix86_abi;
+    return GCC_OPTION (ix86_abi);
   return cfun->machine->call_abi;
 }
 
@@ -6072,7 +6072,7 @@ void
 ix86_call_abi_override (const_tree fndecl)
 {
   if (fndecl == NULL_TREE)
-    cfun->machine->call_abi = ix86_abi;
+    cfun->machine->call_abi = GCC_OPTION (ix86_abi);
   else
     cfun->machine->call_abi = ix86_function_type_abi (TREE_TYPE (fndecl));
 }
@@ -6117,7 +6117,7 @@ init_cumulative_args (CUMULATIVE_ARGS *cum,  /* Argument info to initialize */
   cum->caller = caller;
 
   /* Set up the number of registers to use for passing arguments.  */
-  cum->nregs = ix86_regparm;
+  cum->nregs = GCC_OPTION (ix86_regparm);
   if (TARGET_64BIT)
     {
       cum->nregs = (cum->call_abi == SYSV_ABI
@@ -6487,7 +6487,7 @@ classify_argument (enum machine_mode mode, const_tree type,
 			{
 			  static bool warned;
 
-			  if (!warned && warn_psabi)
+			  if (!warned && GCC_OPTION (warn_psabi))
 			    {
 			      warned = true;
 			      inform (input_location,
@@ -6604,7 +6604,7 @@ classify_argument (enum machine_mode mode, const_tree type,
 
 	      /* The first one should never be X86_64_X87UP_CLASS.  */
 	      gcc_assert (i != 0);
-	      if (!warned && warn_psabi)
+	      if (!warned && GCC_OPTION (warn_psabi))
 		{
 		  warned = true;
 		  inform (input_location,
@@ -6722,7 +6722,7 @@ classify_argument (enum machine_mode mode, const_tree type,
 	{
 	  static bool warned;
 
-	  if (!warned && warn_psabi)
+	  if (!warned && GCC_OPTION (warn_psabi))
 	    {
 	      warned = true;
 	      inform (input_location,
@@ -7244,7 +7244,7 @@ ix86_function_arg_advance (cumulative_args_t cum_v, enum machine_mode mode,
   if (type)
     mode = type_natural_mode (type, NULL, false);
 
-  if (TARGET_64BIT && (cum ? cum->call_abi : ix86_abi) == MS_ABI)
+  if (TARGET_64BIT && (cum ? cum->call_abi : GCC_OPTION (ix86_abi)) == MS_ABI)
     function_arg_advance_ms_64 (cum, bytes, words);
   else if (TARGET_64BIT)
     function_arg_advance_64 (cum, mode, type, words, named);
@@ -7495,7 +7495,7 @@ ix86_function_arg (cumulative_args_t cum_v, enum machine_mode omode,
   if (type && TREE_CODE (type) == VECTOR_TYPE)
     mode = type_natural_mode (type, cum, false);
 
-  if (TARGET_64BIT && (cum ? cum->call_abi : ix86_abi) == MS_ABI)
+  if (TARGET_64BIT && (cum ? cum->call_abi : GCC_OPTION (ix86_abi)) == MS_ABI)
     arg = function_arg_ms_64 (cum, mode, omode, named, bytes);
   else if (TARGET_64BIT)
     arg = function_arg_64 (cum, mode, omode, type, named);
@@ -7518,7 +7518,7 @@ ix86_pass_by_reference (cumulative_args_t cum_v, enum machine_mode mode,
   CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
 
   /* See Windows x64 Software Convention.  */
-  if (TARGET_64BIT && (cum ? cum->call_abi : ix86_abi) == MS_ABI)
+  if (TARGET_64BIT && (cum ? cum->call_abi : GCC_OPTION (ix86_abi)) == MS_ABI)
     {
       int msize = (int) GET_MODE_SIZE (mode);
       if (type)
@@ -7726,7 +7726,7 @@ ix86_function_arg_boundary (enum machine_mode mode, const_tree type)
 	    align = PARM_BOUNDARY;
 	}
 
-      if (warn_psabi
+      if (GCC_OPTION (warn_psabi)
 	  && !warned
 	  && align != ix86_compat_function_arg_boundary (mode, type,
 							 saved_align))
@@ -7754,7 +7754,7 @@ ix86_function_value_regno_p (const unsigned int regno)
       return true;
     case DI_REG:
     case SI_REG:
-      return TARGET_64BIT && ix86_abi != MS_ABI;
+      return TARGET_64BIT && GCC_OPTION (ix86_abi) != MS_ABI;
 
       /* Complex values are returned in %st(0)/%st(1) pair.  */
     case ST0_REG:
@@ -7762,7 +7762,7 @@ ix86_function_value_regno_p (const unsigned int regno)
       /* TODO: The function should depend on current function ABI but
        builtins.c would need updating then. Therefore we use the
        default ABI.  */
-      if (TARGET_64BIT && ix86_abi == MS_ABI)
+      if (TARGET_64BIT && GCC_OPTION (ix86_abi) == MS_ABI)
 	return false;
       return TARGET_FLOAT_RETURNS_IN_80387;
 
@@ -8139,13 +8139,13 @@ ix86_build_builtin_va_list_abi (enum calling_abi abi)
 static tree
 ix86_build_builtin_va_list (void)
 {
-  tree ret = ix86_build_builtin_va_list_abi (ix86_abi);
+  tree ret = ix86_build_builtin_va_list_abi (GCC_OPTION (ix86_abi));
 
   /* Initialize abi specific va_list builtin types.  */
   if (TARGET_64BIT)
     {
       tree t;
-      if (ix86_abi == MS_ABI)
+      if (GCC_OPTION (ix86_abi) == MS_ABI)
         {
           t = ix86_build_builtin_va_list_abi (SYSV_ABI);
           if (TREE_CODE (t) != RECORD_TYPE)
@@ -8159,7 +8159,7 @@ ix86_build_builtin_va_list (void)
             t = build_variant_type_copy (t);
           sysv_va_list_type_node = t;
         }
-      if (ix86_abi != MS_ABI)
+      if (GCC_OPTION (ix86_abi) != MS_ABI)
         {
           t = ix86_build_builtin_va_list_abi (MS_ABI);
           if (TREE_CODE (t) != RECORD_TYPE)
@@ -8332,7 +8332,7 @@ is_va_list_char_pointer (tree type)
     return true;
   canonic = ix86_canonical_va_list_type (type);
   return (canonic == ms_va_list_type_node
-          || (ix86_abi == MS_ABI && canonic == va_list_type_node));
+          || (GCC_OPTION (ix86_abi) == MS_ABI && canonic == va_list_type_node));
 }
 
 /* Implement va_start.  */
@@ -8346,7 +8346,7 @@ ix86_va_start (tree valist, rtx nextarg)
   tree type;
   rtx ovf_rtx;
 
-  if (flag_split_stack
+  if (GCC_OPTION (flag_split_stack)
       && cfun->machine->split_stack_varargs_pointer == NULL_RTX)
     {
       unsigned int scratch_regno;
@@ -9085,7 +9085,7 @@ ix86_frame_pointer_required (void)
 	  || ix86_current_function_calls_tls_descriptor))
     return true;
 
-  if (crtl->profile && !flag_fentry)
+  if (crtl->profile && !GCC_OPTION (flag_fentry))
     return true;
 
   return false;
@@ -9213,7 +9213,7 @@ ix86_code_end (void)
       current_function_decl = NULL;
     }
 
-  if (flag_split_stack)
+  if (GCC_OPTION (flag_split_stack))
     file_end_indicate_split_stack ();
 }
 
@@ -9226,7 +9226,7 @@ output_set_got (rtx dest, rtx label)
 
   xops[0] = dest;
 
-  if (TARGET_VXWORKS_RTP && flag_pic)
+  if (TARGET_VXWORKS_RTP && GCC_OPTION (flag_pic))
     {
       /* Load (*VXWORKS_GOTT_BASE) into the PIC register.  */
       xops[2] = gen_rtx_MEM (Pmode,
@@ -9244,7 +9244,7 @@ output_set_got (rtx dest, rtx label)
 
   xops[1] = gen_rtx_SYMBOL_REF (Pmode, GOT_SYMBOL_NAME);
 
-  if (!flag_pic)
+  if (!GCC_OPTION (flag_pic))
     {
       if (TARGET_MACHO)
 	/* We don't need a pic base, we're not producing pic.  */
@@ -9541,7 +9541,7 @@ ix86_compute_frame_layout (struct ix86_frame *frame)
       if (count)
 	count = (count - 1) * FAST_PROLOGUE_INSN_COUNT;
       if (node->frequency < NODE_FREQUENCY_NORMAL
-	  || (flag_branch_probabilities
+	  || (GCC_OPTION (flag_branch_probabilities)
 	      && node->frequency < NODE_FREQUENCY_HOT))
         cfun->machine->use_fast_prologue_epilogue = false;
       else
@@ -9553,7 +9553,7 @@ ix86_compute_frame_layout (struct ix86_frame *frame)
     = (TARGET_PROLOGUE_USING_MOVE && cfun->machine->use_fast_prologue_epilogue
        /* If static stack checking is enabled and done with probes,
 	  the registers need to be saved before allocating the frame.  */
-       && flag_stack_check != STATIC_BUILTIN_STACK_CHECK);
+       && GCC_OPTION (flag_stack_check) != STATIC_BUILTIN_STACK_CHECK);
 
   /* Skip return address.  */
   offset = UNITS_PER_WORD;
@@ -10096,7 +10096,7 @@ ix86_minimum_incoming_stack_boundary (bool sibcall)
      estimated stack alignment is 128bit.  */
   else if (!sibcall
 	   && !TARGET_64BIT
-	   && ix86_force_align_arg_pointer
+	   && GCC_OPTION (ix86_force_align_arg_pointer)
 	   && crtl->stack_alignment_estimated == 128)
     incoming_stack_boundary = MIN_STACK_BOUNDARY;
   else
@@ -10148,7 +10148,7 @@ ix86_update_stack_boundary (void)
 static rtx
 ix86_get_drap_rtx (void)
 {
-  if (ix86_force_drap || !ACCUMULATE_OUTGOING_ARGS)
+  if (GCC_OPTION (ix86_force_drap) || !ACCUMULATE_OUTGOING_ARGS)
     crtl->need_drap = true;
 
   if (stack_realign_drap)
@@ -10168,7 +10168,7 @@ ix86_get_drap_rtx (void)
       end_sequence ();
 
       insn = emit_insn_before (seq, NEXT_INSN (entry_of_function ()));
-      if (!optimize)
+      if (!GCC_OPTION (optimize))
 	{
 	  add_reg_note (insn, REG_CFA_SET_VDRAP, drap_vreg);
 	  RTX_FRAME_RELATED_P (insn) = 1;
@@ -10621,13 +10621,13 @@ ix86_finalize_stack_realign_flags (void)
   if (stack_realign
       && frame_pointer_needed
       && crtl->is_leaf
-      && flag_omit_frame_pointer
+      && GCC_OPTION (flag_omit_frame_pointer)
       && crtl->sp_is_unchanging
       && !ix86_current_function_calls_tls_descriptor
       && !crtl->accesses_prior_frames
       && !cfun->calls_alloca
       && !crtl->calls_eh_return
-      && !(flag_stack_check && STACK_CHECK_MOVING_SP)
+      && !(GCC_OPTION (flag_stack_check) && STACK_CHECK_MOVING_SP)
       && !ix86_frame_pointer_required ()
       && get_frame_size () == 0
       && ix86_nsaved_sseregs () == 0
@@ -10728,7 +10728,7 @@ ix86_expand_prologue (void)
 
       /* Check if profiling is active and we shall use profiling before
          prologue variant. If so sorry.  */
-      if (crtl->profile && flag_fentry != 0)
+      if (crtl->profile && GCC_OPTION (flag_fentry) != 0)
         sorry ("ms_hook_prologue attribute isn%'t compatible "
 	       "with -mfentry for 32-bit");
 
@@ -10938,7 +10938,7 @@ ix86_expand_prologue (void)
 
   allocate = frame.stack_pointer_offset - m->fs.sp_offset;
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     {
       /* We start to count from ARG_POINTER.  */
       HOST_WIDE_INT stack_size = frame.stack_pointer_offset;
@@ -10984,7 +10984,7 @@ ix86_expand_prologue (void)
 
   /* The stack has already been decremented by the instruction calling us
      so probe if the size is non-negative to preserve the protection area.  */
-  if (allocate >= 0 && flag_stack_check == STATIC_BUILTIN_STACK_CHECK)
+  if (allocate >= 0 && GCC_OPTION (flag_stack_check) == STATIC_BUILTIN_STACK_CHECK)
     {
       /* We expect the registers to be saved when probes are used.  */
       gcc_assert (int_registers_saved);
@@ -11161,7 +11161,7 @@ ix86_expand_prologue (void)
     {
       if (TARGET_64BIT)
 	{
-	  if (ix86_cmodel == CM_LARGE_PIC)
+	  if (GCC_OPTION (ix86_cmodel) == CM_LARGE_PIC)
 	    {
 	      rtx label, tmp_reg;
 
@@ -11192,7 +11192,7 @@ ix86_expand_prologue (void)
      when mcount needs it.  Blockage to avoid call movement across mcount
      call is emitted in generic code after the NOTE_INSN_PROLOGUE_END
      note.  */
-  if (crtl->profile && !flag_fentry && pic_reg_used)
+  if (crtl->profile && !GCC_OPTION (flag_fentry) && pic_reg_used)
     emit_insn (gen_prologue_use (pic_offset_table_rtx));
 
   if (crtl->drap_reg && !crtl->stack_realign_needed)
@@ -11579,7 +11579,7 @@ ix86_expand_epilogue (int style)
 	     epilogue sequence.  Unfortuantely crtl->uses_eh_lsda nor
 	     several other flags that would be interesting to test are
 	     not yet set up.  */
-	  if (flag_non_call_exceptions)
+	  if (GCC_OPTION (flag_non_call_exceptions))
 	    emit_insn (gen_nops (const1_rtx));
 	  else
 	    emit_insn (gen_blockage ());
@@ -11859,7 +11859,7 @@ ix86_expand_split_stack_prologue (void)
   rtx varargs_label = NULL_RTX;
   rtx fn;
 
-  gcc_assert (flag_split_stack && reload_completed);
+  gcc_assert (GCC_OPTION (flag_split_stack) && reload_completed);
 
   ix86_finalize_stack_realign_flags ();
   ix86_compute_frame_layout (&frame);
@@ -11951,7 +11951,7 @@ ix86_expand_split_stack_prologue (void)
 	  use_reg (&call_fusage, rax);
 	}
 
-      if ((ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
+      if ((GCC_OPTION (ix86_cmodel) == CM_LARGE || GCC_OPTION (ix86_cmodel) == CM_LARGE_PIC)
           && !TARGET_PECOFF)
 	{
 	  HOST_WIDE_INT argval;
@@ -11970,7 +11970,7 @@ ix86_expand_split_stack_prologue (void)
 	    split_stack_fn_large =
 	      gen_rtx_SYMBOL_REF (Pmode, "__morestack_large_model");
 
-	  if (ix86_cmodel == CM_LARGE_PIC)
+	  if (GCC_OPTION (ix86_cmodel) == CM_LARGE_PIC)
 	    {
 	      rtx label, x;
 
@@ -12102,7 +12102,7 @@ ix86_live_on_entry (bitmap regs)
 {
   if (cfun->machine->split_stack_varargs_pointer != NULL_RTX)
     {
-      gcc_assert (flag_split_stack);
+      gcc_assert (GCC_OPTION (flag_split_stack));
       bitmap_set_bit (regs, split_stack_prologue_scratch_regno ());
     }
 }
@@ -12647,20 +12647,20 @@ legitimate_pic_address_disp_p (rtx disp)
 	         large-model.
 	         For the small-model we don't need to resolve anything
 	         here.  */
-	      if ((ix86_cmodel != CM_LARGE_PIC
+	      if ((GCC_OPTION (ix86_cmodel) != CM_LARGE_PIC
 	           && SYMBOL_REF_FUNCTION_P (op0))
-		  || ix86_cmodel == CM_SMALL_PIC)
+		  || GCC_OPTION (ix86_cmodel) == CM_SMALL_PIC)
 		return true;
 	      /* Non-external symbols don't need to be resolved for
 	         large, and medium-model.  */
-	      if ((ix86_cmodel == CM_LARGE_PIC
-		   || ix86_cmodel == CM_MEDIUM_PIC)
+	      if ((GCC_OPTION (ix86_cmodel) == CM_LARGE_PIC
+		   || GCC_OPTION (ix86_cmodel) == CM_MEDIUM_PIC)
 		  && !SYMBOL_REF_EXTERNAL_P (op0))
 		return true;
 	    }
 	  else if (!SYMBOL_REF_FAR_ADDR_P (op0)
 		   && SYMBOL_REF_LOCAL_P (op0)
-		   && ix86_cmodel != CM_LARGE_PIC)
+		   && GCC_OPTION (ix86_cmodel) != CM_LARGE_PIC)
 	    return true;
 	  break;
 
@@ -12932,7 +12932,7 @@ ix86_legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED,
 	     them at all and use IP relative instead.  */
 	  case UNSPEC_GOT:
 	  case UNSPEC_GOTOFF:
-	    gcc_assert (flag_pic);
+	    gcc_assert (GCC_OPTION (flag_pic));
 	    if (!TARGET_64BIT)
 	      goto is_legitimate_pic;
 
@@ -12941,7 +12941,7 @@ ix86_legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED,
 
 	  case UNSPEC_GOTPCREL:
 	  case UNSPEC_PCREL:
-	    gcc_assert (flag_pic);
+	    gcc_assert (GCC_OPTION (flag_pic));
 	    goto is_legitimate_pic;
 
 	  case UNSPEC_GOTTPOFF:
@@ -12952,7 +12952,7 @@ ix86_legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED,
 	    break;
 
 	  case UNSPEC_STACK_CHECK:
-	    gcc_assert (flag_split_stack);
+	    gcc_assert (GCC_OPTION (flag_split_stack));
 	    break;
 
 	  default:
@@ -12961,7 +12961,7 @@ ix86_legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED,
 	  }
 
       else if (SYMBOLIC_CONST (disp)
-	       && (flag_pic
+	       && (GCC_OPTION (flag_pic)
 		   || (TARGET_MACHO
 #if TARGET_MACHO
 		       && MACHOPIC_INDIRECT
@@ -12983,7 +12983,7 @@ ix86_legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED,
 		/* Non-constant pic memory reference.  */
 		return false;
 	    }
-	  else if ((!TARGET_MACHO || flag_pic)
+	  else if ((!TARGET_MACHO || GCC_OPTION (flag_pic))
 		    && ! legitimate_pic_address_disp_p (disp))
 	    /* Displacement is an invalid pic construct.  */
 	    return false;
@@ -13103,7 +13103,7 @@ legitimize_pic_address (rtx orig, rtx reg)
   if (TARGET_64BIT && legitimate_pic_address_disp_p (addr))
     new_rtx = addr;
   else if (TARGET_64BIT && !TARGET_PECOFF
-	   && ix86_cmodel != CM_SMALL_PIC && gotoff_operand (addr, Pmode))
+	   && GCC_OPTION (ix86_cmodel) != CM_SMALL_PIC && gotoff_operand (addr, Pmode))
     {
       rtx tmpreg;
       /* This symbol may be referenced via a displacement from the PIC
@@ -13184,7 +13184,7 @@ legitimize_pic_address (rtx orig, rtx reg)
 	  emit_move_insn (reg, new_rtx);
 	  new_rtx = reg;
 	}
-      else if (TARGET_64BIT && ix86_cmodel != CM_LARGE_PIC)
+      else if (TARGET_64BIT && GCC_OPTION (ix86_cmodel) != CM_LARGE_PIC)
 	{
 	  new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTPCREL);
 	  new_rtx = gen_rtx_CONST (Pmode, new_rtx);
@@ -13355,7 +13355,7 @@ ix86_tls_get_addr (void)
       ix86_tls_symbol = gen_rtx_SYMBOL_REF (Pmode, sym);
     }
 
-  if (ix86_cmodel == CM_LARGE_PIC && !TARGET_PECOFF)
+  if (GCC_OPTION (ix86_cmodel) == CM_LARGE_PIC && !TARGET_PECOFF)
     {
       rtx unspec = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, ix86_tls_symbol),
 				   UNSPEC_PLTOFF);
@@ -13411,7 +13411,7 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
 
       if (!TARGET_64BIT)
 	{
-	  if (flag_pic && !TARGET_PECOFF)
+	  if (GCC_OPTION (flag_pic) && !TARGET_PECOFF)
 	    pic = pic_offset_table_rtx;
 	  else
 	    {
@@ -13466,7 +13466,7 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
 
       if (!TARGET_64BIT)
 	{
-	  if (flag_pic)
+	  if (GCC_OPTION (flag_pic))
 	    pic = pic_offset_table_rtx;
 	  else
 	    {
@@ -13551,7 +13551,7 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
 	  pic = NULL;
 	  type = UNSPEC_GOTNTPOFF;
 	}
-      else if (flag_pic)
+      else if (GCC_OPTION (flag_pic))
 	{
 	  if (reload_in_progress)
 	    df_set_regs_ever_live (PIC_OFFSET_TABLE_REGNUM, true);
@@ -13751,7 +13751,7 @@ legitimize_pe_coff_symbol (rtx addr, bool inreg)
 	}
     }
 
-  if (ix86_cmodel != CM_LARGE_PIC && ix86_cmodel != CM_MEDIUM_PIC)
+  if (GCC_OPTION (ix86_cmodel) != CM_LARGE_PIC && GCC_OPTION (ix86_cmodel) != CM_MEDIUM_PIC)
     return NULL_RTX;
   if (GET_CODE (addr) == SYMBOL_REF
       && !is_imported_p (addr)
@@ -13817,7 +13817,7 @@ ix86_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
         return tmp;
     }
 
-  if (flag_pic && SYMBOLIC_CONST (x))
+  if (GCC_OPTION (flag_pic) && SYMBOLIC_CONST (x))
     return legitimize_pic_address (x, 0);
 
 #if TARGET_MACHO
@@ -13939,7 +13939,7 @@ ix86_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
 	  && REG_P (XEXP (x, 0)))
 	return x;
 
-      if (flag_pic && SYMBOLIC_CONST (XEXP (x, 1)))
+      if (GCC_OPTION (flag_pic) && SYMBOLIC_CONST (XEXP (x, 1)))
 	{
 	  changed = 1;
 	  x = legitimize_pic_address (x, 0);
@@ -13993,7 +13993,7 @@ output_pic_addr_const (FILE *file, rtx x, int code)
   switch (GET_CODE (x))
     {
     case PC:
-      gcc_assert (flag_pic);
+      gcc_assert (GCC_OPTION (flag_pic));
       putc ('.', file);
       break;
 
@@ -14295,7 +14295,7 @@ ix86_delegitimize_address (rtx x)
 	  return x;
 	}
 
-      if (ix86_cmodel != CM_MEDIUM_PIC && ix86_cmodel != CM_LARGE_PIC)
+      if (GCC_OPTION (ix86_cmodel) != CM_MEDIUM_PIC && GCC_OPTION (ix86_cmodel) != CM_LARGE_PIC)
 	return ix86_delegitimize_tls_address (orig_x);
 
       /* Fall thru into the code shared with -m32 for -mcmodel=large -fpic
@@ -14337,7 +14337,7 @@ ix86_delegitimize_address (rtx x)
   if (GET_CODE (x) == UNSPEC
       && ((XINT (x, 1) == UNSPEC_GOT && MEM_P (orig_x) && !addend)
 	  || (XINT (x, 1) == UNSPEC_GOTOFF && !MEM_P (orig_x))
-	  || (XINT (x, 1) == UNSPEC_PLTOFF && ix86_cmodel == CM_LARGE_PIC
+	  || (XINT (x, 1) == UNSPEC_PLTOFF && GCC_OPTION (ix86_cmodel) == CM_LARGE_PIC
 	      && !MEM_P (orig_x) && !addend)))
     result = XVECEXP (x, 0, 0);
 
@@ -15259,7 +15259,7 @@ ix86_print_operand (FILE *file, rtx x, int code)
 	  {
 	    rtx x;
 
-	    if (!optimize
+	    if (!GCC_OPTION (optimize)
 	        || optimize_function_for_size_p (cfun)
 		|| !TARGET_BRANCH_PREDICTION_HINTS)
 	      return;
@@ -15305,7 +15305,7 @@ ix86_print_operand (FILE *file, rtx x, int code)
 	  /* The kernel uses a different segment register for performance
 	     reasons; a system call would not have to trash the userspace
 	     segment register, which would be expensive.  */
-	  if (TARGET_64BIT && ix86_cmodel != CM_KERNEL)
+	  if (TARGET_64BIT && GCC_OPTION (ix86_cmodel) != CM_KERNEL)
 	    fputs ("fs", file);
 	  else
 	    fputs ("gs", file);
@@ -15451,7 +15451,7 @@ ix86_print_operand (FILE *file, rtx x, int code)
 	}
       if (CONST_INT_P (x))
 	fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
-      else if (flag_pic || MACHOPIC_INDIRECT)
+      else if (GCC_OPTION (flag_pic) || MACHOPIC_INDIRECT)
 	output_pic_addr_const (file, x, code);
       else
 	output_addr_const (file, x);
@@ -15541,7 +15541,7 @@ ix86_print_operand_address (FILE *file, rtx addr)
 	    fputs ("ds:", file);
 	  fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (disp));
 	}
-      else if (flag_pic)
+      else if (GCC_OPTION (flag_pic))
 	output_pic_addr_const (file, disp, 0);
       else
 	output_addr_const (file, disp);
@@ -15598,7 +15598,7 @@ ix86_print_operand_address (FILE *file, rtx addr)
 	{
 	  if (disp)
 	    {
-	      if (flag_pic)
+	      if (GCC_OPTION (flag_pic))
 		output_pic_addr_const (file, disp, 0);
 	      else if (GET_CODE (disp) == LABEL_REF)
 		output_asm_label (disp);
@@ -15634,7 +15634,7 @@ ix86_print_operand_address (FILE *file, rtx addr)
 					XEXP (XEXP (disp, 0), 0));
 		}
 
-	      if (flag_pic)
+	      if (GCC_OPTION (flag_pic))
 		output_pic_addr_const (file, disp, 0);
 	      else if (GET_CODE (disp) == LABEL_REF)
 		output_asm_label (disp);
@@ -15729,7 +15729,7 @@ i386_asm_output_addr_const_extra (FILE *file, rtx x)
       {
 	int offset;
 
-	gcc_assert (flag_split_stack);
+	gcc_assert (GCC_OPTION (flag_split_stack));
 
 #ifdef TARGET_THREAD_SPLIT_STACK_OFFSET
 	offset = TARGET_THREAD_SPLIT_STACK_OFFSET;
@@ -16747,7 +16747,7 @@ ix86_expand_move (enum machine_mode mode, rtx operands[])
 	}
     }
 
-  if ((flag_pic || MACHOPIC_INDIRECT)
+  if ((GCC_OPTION (flag_pic) || MACHOPIC_INDIRECT)
       && symbolic_operand (op1, mode))
     {
       if (TARGET_MACHO && !TARGET_64BIT)
@@ -16819,7 +16819,7 @@ ix86_expand_move (enum machine_mode mode, rtx operands[])
 	  && immediate_operand (op1, mode)
 	  && !x86_64_zext_immediate_operand (op1, VOIDmode)
 	  && !register_operand (op0, mode)
-	  && optimize)
+	  && GCC_OPTION (optimize))
 	op1 = copy_to_mode_reg (mode, op1);
 
       if (can_create_pseudo_p ()
@@ -18217,7 +18217,7 @@ ix86_avoid_lea_for_addr (rtx insn, rtx operands[])
 
   /* We should not split into add if non legitimate pic
      operand is used as displacement. */
-  if (parts.disp && flag_pic && !LEGITIMATE_PIC_OPERAND_P (parts.disp))
+  if (parts.disp && GCC_OPTION (flag_pic) && !LEGITIMATE_PIC_OPERAND_P (parts.disp))
     return false;
 
   regno0 = true_regnum (operands[0]) ;
@@ -20769,7 +20769,7 @@ ix86_expand_sse_fp_minmax (rtx dest, enum rtx_code code, rtx cmp_op0,
 
   /* We want to check HONOR_NANS and HONOR_SIGNED_ZEROS here,
      but MODE may be a vector mode and thus not appropriate.  */
-  if (!flag_finite_math_only || !flag_unsafe_math_optimizations)
+  if (!GCC_OPTION (flag_finite_math_only) || !GCC_OPTION (flag_unsafe_math_optimizations))
     {
       int u = is_min ? UNSPEC_IEEE_MIN : UNSPEC_IEEE_MAX;
       rtvec v;
@@ -20819,7 +20819,7 @@ ix86_expand_sse_cmp (rtx dest, enum rtx_code code, rtx cmp_op0, rtx cmp_op1,
   if (!nonimmediate_operand (cmp_op1, cmp_ops_mode))
     cmp_op1 = force_reg (cmp_ops_mode, cmp_op1);
 
-  if (optimize
+  if (GCC_OPTION (optimize)
       || reg_overlap_mentioned_p (dest, op_true)
       || reg_overlap_mentioned_p (dest, op_false))
     dest = gen_reg_rtx (maskcmp ? cmp_mode : mode);
@@ -21000,7 +21000,7 @@ ix86_expand_sse_movcc (rtx dest, rtx cmp, rtx op_true, rtx op_false)
 	  op_true = force_reg (mode, op_true);
 
 	  t2 = gen_reg_rtx (mode);
-	  if (optimize)
+	  if (GCC_OPTION (optimize))
 	    t3 = gen_reg_rtx (mode);
 	  else
 	    t3 = dest;
@@ -23837,9 +23837,9 @@ decide_alg (HOST_WIDE_INT count, HOST_WIDE_INT expected_size,
     expected_size = min_size / 2 + max_size / 2;
 
   /* If user specified the algorithm, honnor it if possible.  */
-  if (ix86_stringop_alg != no_stringop
-      && alg_usable_p (ix86_stringop_alg, memset))
-    return ix86_stringop_alg;
+  if (GCC_OPTION (ix86_stringop_alg) != no_stringop
+      && alg_usable_p (GCC_OPTION (ix86_stringop_alg), memset))
+    return GCC_OPTION (ix86_stringop_alg);
   /* rep; movq or rep; movl is the smallest variant.  */
   else if (!optimize_for_speed)
     {
@@ -23959,7 +23959,7 @@ decide_alignment (int align,
       && (alg == rep_prefix_4_byte || alg == rep_prefix_1_byte))
     desired_align = 8;
 
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     desired_align = 1;
   if (desired_align < align)
     desired_align = align;
@@ -24750,7 +24750,7 @@ ix86_expand_strlen (rtx out, rtx src, rtx eoschar, rtx align)
   /* The generic case of strlen expander is long.  Avoid it's
      expanding unless TARGET_INLINE_ALL_STRINGOPS.  */
 
-  if (TARGET_UNROLL_STRLEN && eoschar == const0_rtx && optimize > 1
+  if (TARGET_UNROLL_STRLEN && eoschar == const0_rtx && GCC_OPTION (optimize) > 1
       && !TARGET_INLINE_ALL_STRINGOPS
       && !optimize_insn_for_size_p ()
       && (!CONST_INT_P (align) || INTVAL (align) < 4))
@@ -24759,7 +24759,7 @@ ix86_expand_strlen (rtx out, rtx src, rtx eoschar, rtx align)
   addr = force_reg (Pmode, XEXP (src, 0));
   scratch1 = gen_reg_rtx (Pmode);
 
-  if (TARGET_UNROLL_STRLEN && eoschar == const0_rtx && optimize > 1
+  if (TARGET_UNROLL_STRLEN && eoschar == const0_rtx && GCC_OPTION (optimize) > 1
       && !optimize_insn_for_size_p ())
     {
       /* Well it seems that some optimizer does not combine a call like
@@ -24814,7 +24814,7 @@ construct_plt_address (rtx symbol)
   rtx tmp, unspec;
 
   gcc_assert (GET_CODE (symbol) == SYMBOL_REF);
-  gcc_assert (ix86_cmodel == CM_LARGE_PIC && !TARGET_PECOFF);
+  gcc_assert (GCC_OPTION (ix86_cmodel) == CM_LARGE_PIC && !TARGET_PECOFF);
   gcc_assert (Pmode == DImode);
 
   tmp = gen_reg_rtx (Pmode);
@@ -24843,16 +24843,16 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1,
   if (TARGET_MACHO && !TARGET_64BIT)
     {
 #if TARGET_MACHO
-      if (flag_pic && GET_CODE (XEXP (fnaddr, 0)) == SYMBOL_REF)
+      if (GCC_OPTION (flag_pic) && GET_CODE (XEXP (fnaddr, 0)) == SYMBOL_REF)
 	fnaddr = machopic_indirect_call_target (fnaddr);
 #endif
     }
   else
     {
       /* Static functions and indirect calls don't need the pic register.  */
-      if (flag_pic
+      if (GCC_OPTION (flag_pic)
 	  && (!TARGET_64BIT
-	      || (ix86_cmodel == CM_LARGE_PIC
+	      || (GCC_OPTION (ix86_cmodel) == CM_LARGE_PIC
 		  && DEFAULT_ABI != MS_ABI))
 	  && GET_CODE (XEXP (fnaddr, 0)) == SYMBOL_REF
 	  && ! SYMBOL_REF_LOCAL_P (XEXP (fnaddr, 0)))
@@ -24866,7 +24866,7 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1,
       use_reg (&use, al);
     }
 
-  if (ix86_cmodel == CM_LARGE_PIC
+  if (GCC_OPTION (ix86_cmodel) == CM_LARGE_PIC
       && !TARGET_PECOFF
       && MEM_P (fnaddr)
       && GET_CODE (XEXP (fnaddr, 0)) == SYMBOL_REF
@@ -24959,7 +24959,7 @@ ix86_output_call_insn (rtx insn, rtx call_op)
 	     being adjacent to the standard epilogue sequence.  If non-
 	     call-exceptions, we'll have done this during epilogue emission. */
 	  if (NOTE_P (i) && NOTE_KIND (i) == NOTE_INSN_EPILOGUE_BEG
-	      && !flag_non_call_exceptions
+	      && !GCC_OPTION (flag_non_call_exceptions)
 	      && !can_throw_internal (insn))
 	    {
 	      seh_nop_p = true;
@@ -24997,7 +24997,7 @@ ix86_init_machine_status (void)
 
   f = ggc_alloc_cleared_machine_function ();
   f->use_fast_prologue_epilogue_nregs = -1;
-  f->call_abi = ix86_abi;
+  f->call_abi = GCC_OPTION (ix86_abi);
 
   return f;
 }
@@ -26547,7 +26547,7 @@ ix86_constant_alignment (tree exp, int align)
       else if (ALIGN_MODE_128 (TYPE_MODE (TREE_TYPE (exp))) && align < 128)
 	return 128;
     }
-  else if (!optimize_size && TREE_CODE (exp) == STRING_CST
+  else if (!GCC_OPTION (optimize_size) && TREE_CODE (exp) == STRING_CST
 	   && TREE_STRING_LENGTH (exp) >= 31 && align < BITS_PER_WORD)
     return BITS_PER_WORD;
 
@@ -26569,7 +26569,7 @@ ix86_data_alignment (tree type, int align, bool opt)
      used to assume.  */
 
   int max_align_compat
-    = optimize_size ? BITS_PER_WORD : MIN (256, MAX_OFILE_ALIGNMENT);
+    = GCC_OPTION (optimize_size) ? BITS_PER_WORD : MIN (256, MAX_OFILE_ALIGNMENT);
 
   /* A data structure, equal or greater than the size of a cache line
      (64 bytes in the Pentium 4 and other recent Intel processors, including
@@ -28784,7 +28784,7 @@ def_builtin (HOST_WIDE_INT mask, const char *name,
 
       mask &= ~OPTION_MASK_ISA_64BIT;
       if (mask == 0
-	  || (mask & ix86_isa_flags) != 0
+	  || (mask & GCC_OPTION (ix86_isa_flags)) != 0
 	  || (lang_hooks.builtin_function
 	      == lang_hooks.builtin_function_ext_scope))
 
@@ -30642,7 +30642,7 @@ ix86_init_tm_builtins (void)
   tree attrs_load, attrs_type_load, attrs_store, attrs_type_store;
   tree attrs_log, attrs_type_log;
 
-  if (!flag_tm)
+  if (!GCC_OPTION (flag_tm))
     return;
 
   /* If there are no builtins defined, we must be compiling in a
@@ -30667,7 +30667,7 @@ ix86_init_tm_builtins (void)
        i < ARRAY_SIZE (bdesc_tm);
        i++, d++)
     {
-      if ((d->mask & ix86_isa_flags) != 0
+      if ((d->mask & GCC_OPTION (ix86_isa_flags)) != 0
 	  || (lang_hooks.builtin_function
 	      == lang_hooks.builtin_function_ext_scope))
 	{
@@ -32730,7 +32730,7 @@ ix86_expand_binop_builtin (enum insn_code icode, tree exp, rtx target)
   if (VECTOR_MODE_P (mode1))
     op1 = safe_vector_operand (op1, mode1);
 
-  if (optimize || !target
+  if (GCC_OPTION (optimize) || !target
       || GET_MODE (target) != tmode
       || !insn_data[icode].operand[0].predicate (target, tmode))
     target = gen_reg_rtx (tmode);
@@ -32860,7 +32860,7 @@ ix86_expand_multi_arg_builtin (enum insn_code icode, tree exp, rtx target,
       gcc_unreachable ();
     }
 
-  if (optimize || !target
+  if (GCC_OPTION (optimize) || !target
       || GET_MODE (target) != tmode
       || !insn_data[icode].operand[0].predicate (target, tmode))
     target = gen_reg_rtx (tmode);
@@ -32939,7 +32939,7 @@ ix86_expand_multi_arg_builtin (enum insn_code icode, tree exp, rtx target,
 
 	  gcc_assert (GET_MODE (op) == mode || GET_MODE (op) == VOIDmode);
 
-	  if (optimize
+	  if (GCC_OPTION (optimize)
 	      || !insn_data[icode].operand[i+adjust+1].predicate (op, mode)
 	      || num_memory > 1)
 	    op = force_reg (mode, op);
@@ -33003,7 +33003,7 @@ ix86_expand_unop_vec_merge_builtin (enum insn_code icode, tree exp,
   enum machine_mode tmode = insn_data[icode].operand[0].mode;
   enum machine_mode mode0 = insn_data[icode].operand[1].mode;
 
-  if (optimize || !target
+  if (GCC_OPTION (optimize) || !target
       || GET_MODE (target) != tmode
       || !insn_data[icode].operand[0].predicate (target, tmode))
     target = gen_reg_rtx (tmode);
@@ -33011,7 +33011,7 @@ ix86_expand_unop_vec_merge_builtin (enum insn_code icode, tree exp,
   if (VECTOR_MODE_P (mode0))
     op0 = safe_vector_operand (op0, mode0);
 
-  if ((optimize && !register_operand (op0, mode0))
+  if ((GCC_OPTION (optimize) && !register_operand (op0, mode0))
       || !insn_data[icode].operand[1].predicate (op0, mode0))
     op0 = copy_to_mode_reg (mode0, op0);
 
@@ -33058,15 +33058,15 @@ ix86_expand_sse_compare (const struct builtin_description *d,
       op0 = tmp;
     }
 
-  if (optimize || !target
+  if (GCC_OPTION (optimize) || !target
       || GET_MODE (target) != tmode
       || !insn_data[d->icode].operand[0].predicate (target, tmode))
     target = gen_reg_rtx (tmode);
 
-  if ((optimize && !register_operand (op0, mode0))
+  if ((GCC_OPTION (optimize) && !register_operand (op0, mode0))
       || !insn_data[d->icode].operand[1].predicate (op0, mode0))
     op0 = copy_to_mode_reg (mode0, op0);
-  if ((optimize && !register_operand (op1, mode1))
+  if ((GCC_OPTION (optimize) && !register_operand (op1, mode1))
       || !insn_data[d->icode].operand[2].predicate (op1, mode1))
     op1 = copy_to_mode_reg (mode1, op1);
 
@@ -33111,10 +33111,10 @@ ix86_expand_sse_comi (const struct builtin_description *d, tree exp,
   emit_move_insn (target, const0_rtx);
   target = gen_rtx_SUBREG (QImode, target, 0);
 
-  if ((optimize && !register_operand (op0, mode0))
+  if ((GCC_OPTION (optimize) && !register_operand (op0, mode0))
       || !insn_data[d->icode].operand[0].predicate (op0, mode0))
     op0 = copy_to_mode_reg (mode0, op0);
-  if ((optimize && !register_operand (op1, mode1))
+  if ((GCC_OPTION (optimize) && !register_operand (op1, mode1))
       || !insn_data[d->icode].operand[1].predicate (op1, mode1))
     op1 = copy_to_mode_reg (mode1, op1);
 
@@ -33143,7 +33143,7 @@ ix86_expand_sse_round (const struct builtin_description *d, tree exp,
   enum machine_mode tmode = insn_data[d->icode].operand[0].mode;
   enum machine_mode mode0 = insn_data[d->icode].operand[1].mode;
 
-  if (optimize || target == 0
+  if (GCC_OPTION (optimize) || target == 0
       || GET_MODE (target) != tmode
       || !insn_data[d->icode].operand[0].predicate (target, tmode))
     target = gen_reg_rtx (tmode);
@@ -33151,7 +33151,7 @@ ix86_expand_sse_round (const struct builtin_description *d, tree exp,
   if (VECTOR_MODE_P (mode0))
     op0 = safe_vector_operand (op0, mode0);
 
-  if ((optimize && !register_operand (op0, mode0))
+  if ((GCC_OPTION (optimize) && !register_operand (op0, mode0))
       || !insn_data[d->icode].operand[0].predicate (op0, mode0))
     op0 = copy_to_mode_reg (mode0, op0);
 
@@ -33178,7 +33178,7 @@ ix86_expand_sse_round_vec_pack_sfix (const struct builtin_description *d,
   enum machine_mode mode0 = insn_data[d->icode].operand[1].mode;
   enum machine_mode mode1 = insn_data[d->icode].operand[2].mode;
 
-  if (optimize || target == 0
+  if (GCC_OPTION (optimize) || target == 0
       || GET_MODE (target) != tmode
       || !insn_data[d->icode].operand[0].predicate (target, tmode))
     target = gen_reg_rtx (tmode);
@@ -33186,10 +33186,10 @@ ix86_expand_sse_round_vec_pack_sfix (const struct builtin_description *d,
   op0 = safe_vector_operand (op0, mode0);
   op1 = safe_vector_operand (op1, mode1);
 
-  if ((optimize && !register_operand (op0, mode0))
+  if ((GCC_OPTION (optimize) && !register_operand (op0, mode0))
       || !insn_data[d->icode].operand[0].predicate (op0, mode0))
     op0 = copy_to_mode_reg (mode0, op0);
-  if ((optimize && !register_operand (op1, mode1))
+  if ((GCC_OPTION (optimize) && !register_operand (op1, mode1))
       || !insn_data[d->icode].operand[1].predicate (op1, mode1))
     op1 = copy_to_mode_reg (mode1, op1);
 
@@ -33226,10 +33226,10 @@ ix86_expand_sse_ptest (const struct builtin_description *d, tree exp,
   emit_move_insn (target, const0_rtx);
   target = gen_rtx_SUBREG (QImode, target, 0);
 
-  if ((optimize && !register_operand (op0, mode0))
+  if ((GCC_OPTION (optimize) && !register_operand (op0, mode0))
       || !insn_data[d->icode].operand[0].predicate (op0, mode0))
     op0 = copy_to_mode_reg (mode0, op0);
-  if ((optimize && !register_operand (op1, mode1))
+  if ((GCC_OPTION (optimize) && !register_operand (op1, mode1))
       || !insn_data[d->icode].operand[1].predicate (op1, mode1))
     op1 = copy_to_mode_reg (mode1, op1);
 
@@ -33283,7 +33283,7 @@ ix86_expand_sse_pcmpestr (const struct builtin_description *d,
     op0 = copy_to_mode_reg (modev2, op0);
   if (!insn_data[d->icode].operand[3].predicate (op1, modei3))
     op1 = copy_to_mode_reg (modei3, op1);
-  if ((optimize && !register_operand (op2, modev4))
+  if ((GCC_OPTION (optimize) && !register_operand (op2, modev4))
       || !insn_data[d->icode].operand[4].predicate (op2, modev4))
     op2 = copy_to_mode_reg (modev4, op2);
   if (!insn_data[d->icode].operand[5].predicate (op3, modei5))
@@ -33297,7 +33297,7 @@ ix86_expand_sse_pcmpestr (const struct builtin_description *d,
 
   if (d->code == IX86_BUILTIN_PCMPESTRI128)
     {
-      if (optimize || !target
+      if (GCC_OPTION (optimize) || !target
 	  || GET_MODE (target) != tmode0
 	  || !insn_data[d->icode].operand[0].predicate (target, tmode0))
 	target = gen_reg_rtx (tmode0);
@@ -33308,7 +33308,7 @@ ix86_expand_sse_pcmpestr (const struct builtin_description *d,
     }
   else if (d->code == IX86_BUILTIN_PCMPESTRM128)
     {
-      if (optimize || !target
+      if (GCC_OPTION (optimize) || !target
 	  || GET_MODE (target) != tmode1
 	  || !insn_data[d->icode].operand[1].predicate (target, tmode1))
 	target = gen_reg_rtx (tmode1);
@@ -33380,7 +33380,7 @@ ix86_expand_sse_pcmpistr (const struct builtin_description *d,
 
   if (!insn_data[d->icode].operand[2].predicate (op0, modev2))
     op0 = copy_to_mode_reg (modev2, op0);
-  if ((optimize && !register_operand (op1, modev3))
+  if ((GCC_OPTION (optimize) && !register_operand (op1, modev3))
       || !insn_data[d->icode].operand[3].predicate (op1, modev3))
     op1 = copy_to_mode_reg (modev3, op1);
 
@@ -33392,7 +33392,7 @@ ix86_expand_sse_pcmpistr (const struct builtin_description *d,
 
   if (d->code == IX86_BUILTIN_PCMPISTRI128)
     {
-      if (optimize || !target
+      if (GCC_OPTION (optimize) || !target
 	  || GET_MODE (target) != tmode0
 	  || !insn_data[d->icode].operand[0].predicate (target, tmode0))
 	target = gen_reg_rtx (tmode0);
@@ -33403,7 +33403,7 @@ ix86_expand_sse_pcmpistr (const struct builtin_description *d,
     }
   else if (d->code == IX86_BUILTIN_PCMPISTRM128)
     {
-      if (optimize || !target
+      if (GCC_OPTION (optimize) || !target
 	  || GET_MODE (target) != tmode1
 	  || !insn_data[d->icode].operand[1].predicate (target, tmode1))
 	target = gen_reg_rtx (tmode1);
@@ -33931,7 +33931,7 @@ ix86_expand_args_builtin (const struct builtin_description *d,
 
   if (rmode == VOIDmode || rmode == tmode)
     {
-      if (optimize
+      if (GCC_OPTION (optimize)
 	  || target == 0
 	  || GET_MODE (target) != tmode
 	  || !insn_p->operand[0].predicate (target, tmode))
@@ -34073,7 +34073,7 @@ ix86_expand_args_builtin (const struct builtin_description *d,
 
 	  if (GET_MODE (op) == mode || GET_MODE (op) == VOIDmode)
 	    {
-	      if (optimize || !match || num_memory > 1)
+	      if (GCC_OPTION (optimize) || !match || num_memory > 1)
 		op = copy_to_mode_reg (mode, op);
 	    }
 	  else
@@ -34245,10 +34245,10 @@ ix86_expand_sse_comi_round (const struct builtin_description *d,
   emit_move_insn (target, const0_rtx);
   target = gen_rtx_SUBREG (QImode, target, 0);
 
-  if ((optimize && !register_operand (op0, mode0))
+  if ((GCC_OPTION (optimize) && !register_operand (op0, mode0))
       || !insn_p->operand[0].predicate (op0, mode0))
     op0 = copy_to_mode_reg (mode0, op0);
-  if ((optimize && !register_operand (op1, mode1))
+  if ((GCC_OPTION (optimize) && !register_operand (op1, mode1))
       || !insn_p->operand[1].predicate (op1, mode1))
     op1 = copy_to_mode_reg (mode1, op1);
 
@@ -34384,7 +34384,7 @@ ix86_expand_round_builtin (const struct builtin_description *d,
     }
   gcc_assert (nargs <= ARRAY_SIZE (args));
 
-  if (optimize
+  if (GCC_OPTION (optimize)
       || target == 0
       || GET_MODE (target) != tmode
       || !insn_p->operand[0].predicate (target, tmode))
@@ -34440,7 +34440,7 @@ ix86_expand_round_builtin (const struct builtin_description *d,
 
 	  if (GET_MODE (op) == mode || GET_MODE (op) == VOIDmode)
 	    {
-	      if (optimize || !match)
+	      if (GCC_OPTION (optimize) || !match)
 		op = copy_to_mode_reg (mode, op);
 	    }
 	  else
@@ -34729,7 +34729,7 @@ ix86_expand_special_args_builtin (const struct builtin_description *d,
   else
     {
       arg_adjust = 0;
-      if (optimize
+      if (GCC_OPTION (optimize)
 	  || target == 0
 	  || !register_operand (target, tmode)
 	  || GET_MODE (target) != tmode)
@@ -34897,7 +34897,7 @@ ix86_expand_vec_ext_builtin (tree exp, rtx target)
 
   op0 = force_reg (mode0, op0);
 
-  if (optimize || !target || !register_operand (target, tmode))
+  if (GCC_OPTION (optimize) || !target || !register_operand (target, tmode))
     target = gen_reg_rtx (tmode);
 
   ix86_expand_vector_extract (true, target, op0, elt);
@@ -34991,7 +34991,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
      options, we need to check in the context of the function making the call
      whether it is supported.  */
   if (ix86_builtins_isa[fcode].isa
-      && !(ix86_builtins_isa[fcode].isa & ix86_isa_flags))
+      && !(ix86_builtins_isa[fcode].isa & GCC_OPTION (ix86_isa_flags)))
     {
       char *opts = ix86_target_string (ix86_builtins_isa[fcode].isa, 0, NULL,
 				       NULL, (enum fpmath_unit) 0, false);
@@ -35511,7 +35511,7 @@ addcarryx:
     case IX86_BUILTIN_READ_FLAGS:
       emit_insn (gen_push (gen_rtx_REG (word_mode, FLAGS_REG)));
 
-      if (optimize
+      if (GCC_OPTION (optimize)
 	  || target == NULL_RTX
 	  || !nonimmediate_operand (target, word_mode)
 	  || GET_MODE (target) != word_mode)
@@ -35828,7 +35828,7 @@ addcarryx:
 	 replace op0 with pc_rtx to signal that the instruction
 	 overwrites the whole destination and doesn't use its
 	 previous contents.  */
-      if (optimize)
+      if (GCC_OPTION (optimize))
 	{
 	  if (TREE_CODE (arg3) == INTEGER_CST)
 	    {
@@ -36190,7 +36190,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out,
     case BUILT_IN_LFLOOR:
     case BUILT_IN_LLFLOOR:
       /* The round insn does not trap on denormals.  */
-      if (flag_trapping_math || !TARGET_ROUND)
+      if (GCC_OPTION (flag_trapping_math) || !TARGET_ROUND)
 	break;
 
       if (out_mode == SImode && in_mode == DFmode)
@@ -36208,7 +36208,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out,
     case BUILT_IN_LFLOORF:
     case BUILT_IN_LLFLOORF:
       /* The round insn does not trap on denormals.  */
-      if (flag_trapping_math || !TARGET_ROUND)
+      if (GCC_OPTION (flag_trapping_math) || !TARGET_ROUND)
 	break;
 
       if (out_mode == SImode && in_mode == SFmode)
@@ -36224,7 +36224,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out,
     case BUILT_IN_LCEIL:
     case BUILT_IN_LLCEIL:
       /* The round insn does not trap on denormals.  */
-      if (flag_trapping_math || !TARGET_ROUND)
+      if (GCC_OPTION (flag_trapping_math) || !TARGET_ROUND)
 	break;
 
       if (out_mode == SImode && in_mode == DFmode)
@@ -36242,7 +36242,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out,
     case BUILT_IN_LCEILF:
     case BUILT_IN_LLCEILF:
       /* The round insn does not trap on denormals.  */
-      if (flag_trapping_math || !TARGET_ROUND)
+      if (GCC_OPTION (flag_trapping_math) || !TARGET_ROUND)
 	break;
 
       if (out_mode == SImode && in_mode == SFmode)
@@ -36282,7 +36282,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out,
     case BUILT_IN_LROUND:
     case BUILT_IN_LLROUND:
       /* The round insn does not trap on denormals.  */
-      if (flag_trapping_math || !TARGET_ROUND)
+      if (GCC_OPTION (flag_trapping_math) || !TARGET_ROUND)
 	break;
 
       if (out_mode == SImode && in_mode == DFmode)
@@ -36300,7 +36300,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out,
     case BUILT_IN_LROUNDF:
     case BUILT_IN_LLROUNDF:
       /* The round insn does not trap on denormals.  */
-      if (flag_trapping_math || !TARGET_ROUND)
+      if (GCC_OPTION (flag_trapping_math) || !TARGET_ROUND)
 	break;
 
       if (out_mode == SImode && in_mode == SFmode)
@@ -36338,7 +36338,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out,
 
     case BUILT_IN_FLOOR:
       /* The round insn does not trap on denormals.  */
-      if (flag_trapping_math || !TARGET_ROUND)
+      if (GCC_OPTION (flag_trapping_math) || !TARGET_ROUND)
 	break;
 
       if (out_mode == DFmode && in_mode == DFmode)
@@ -36352,7 +36352,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out,
 
     case BUILT_IN_FLOORF:
       /* The round insn does not trap on denormals.  */
-      if (flag_trapping_math || !TARGET_ROUND)
+      if (GCC_OPTION (flag_trapping_math) || !TARGET_ROUND)
 	break;
 
       if (out_mode == SFmode && in_mode == SFmode)
@@ -36366,7 +36366,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out,
 
     case BUILT_IN_CEIL:
       /* The round insn does not trap on denormals.  */
-      if (flag_trapping_math || !TARGET_ROUND)
+      if (GCC_OPTION (flag_trapping_math) || !TARGET_ROUND)
 	break;
 
       if (out_mode == DFmode && in_mode == DFmode)
@@ -36380,7 +36380,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out,
 
     case BUILT_IN_CEILF:
       /* The round insn does not trap on denormals.  */
-      if (flag_trapping_math || !TARGET_ROUND)
+      if (GCC_OPTION (flag_trapping_math) || !TARGET_ROUND)
 	break;
 
       if (out_mode == SFmode && in_mode == SFmode)
@@ -36394,7 +36394,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out,
 
     case BUILT_IN_TRUNC:
       /* The round insn does not trap on denormals.  */
-      if (flag_trapping_math || !TARGET_ROUND)
+      if (GCC_OPTION (flag_trapping_math) || !TARGET_ROUND)
 	break;
 
       if (out_mode == DFmode && in_mode == DFmode)
@@ -36408,7 +36408,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out,
 
     case BUILT_IN_TRUNCF:
       /* The round insn does not trap on denormals.  */
-      if (flag_trapping_math || !TARGET_ROUND)
+      if (GCC_OPTION (flag_trapping_math) || !TARGET_ROUND)
 	break;
 
       if (out_mode == SFmode && in_mode == SFmode)
@@ -36422,7 +36422,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out,
 
     case BUILT_IN_RINT:
       /* The round insn does not trap on denormals.  */
-      if (flag_trapping_math || !TARGET_ROUND)
+      if (GCC_OPTION (flag_trapping_math) || !TARGET_ROUND)
 	break;
 
       if (out_mode == DFmode && in_mode == DFmode)
@@ -36436,7 +36436,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out,
 
     case BUILT_IN_RINTF:
       /* The round insn does not trap on denormals.  */
-      if (flag_trapping_math || !TARGET_ROUND)
+      if (GCC_OPTION (flag_trapping_math) || !TARGET_ROUND)
 	break;
 
       if (out_mode == SFmode && in_mode == SFmode)
@@ -36450,7 +36450,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out,
 
     case BUILT_IN_ROUND:
       /* The round insn does not trap on denormals.  */
-      if (flag_trapping_math || !TARGET_ROUND)
+      if (GCC_OPTION (flag_trapping_math) || !TARGET_ROUND)
 	break;
 
       if (out_mode == DFmode && in_mode == DFmode)
@@ -36464,7 +36464,7 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out,
 
     case BUILT_IN_ROUNDF:
       /* The round insn does not trap on denormals.  */
-      if (flag_trapping_math || !TARGET_ROUND)
+      if (GCC_OPTION (flag_trapping_math) || !TARGET_ROUND)
 	break;
 
       if (out_mode == SFmode && in_mode == SFmode)
@@ -36522,7 +36522,7 @@ ix86_veclibabi_svml (enum built_in_function fn, tree type_out, tree type_in)
   int n, in_n;
 
   /* The SVML is suitable for unsafe math only.  */
-  if (!flag_unsafe_math_optimizations)
+  if (!GCC_OPTION (flag_unsafe_math_optimizations))
     return NULL_TREE;
 
   el_mode = TYPE_MODE (TREE_TYPE (type_out));
@@ -36639,7 +36639,7 @@ ix86_veclibabi_acml (enum built_in_function fn, tree type_out, tree type_in)
      it does not correctly support parts of IEEE with the required
      precision such as denormals.  */
   if (!TARGET_64BIT
-      || !flag_unsafe_math_optimizations)
+      || !GCC_OPTION (flag_unsafe_math_optimizations))
     return NULL_TREE;
 
   el_mode = TYPE_MODE (TREE_TYPE (type_out));
@@ -36807,8 +36807,8 @@ ix86_builtin_reciprocal (unsigned int fn, bool md_fn,
 			 bool sqrt ATTRIBUTE_UNUSED)
 {
   if (! (TARGET_SSE_MATH && !optimize_insn_for_size_p ()
-	 && flag_finite_math_only && !flag_trapping_math
-	 && flag_unsafe_math_optimizations))
+	 && GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math)
+	 && GCC_OPTION (flag_unsafe_math_optimizations)))
     return NULL_TREE;
 
   if (md_fn)
@@ -37793,7 +37793,7 @@ ix86_rtx_costs (rtx x, int code_i, int outer_code_i, int opno, int *total,
 	*total = 3;
       else if (TARGET_64BIT && !x86_64_zext_immediate_operand (x, VOIDmode))
 	*total = 2;
-      else if (flag_pic && SYMBOLIC_CONST (x)
+      else if (GCC_OPTION (flag_pic) && SYMBOLIC_CONST (x)
 	       && (!TARGET_64BIT
 		   || (!GET_CODE (x) != LABEL_REF
 		       && (GET_CODE (x) != SYMBOL_REF
@@ -37839,7 +37839,7 @@ ix86_rtx_costs (rtx x, int code_i, int outer_code_i, int opno, int *total,
       /* Fall back to (MEM (SYMBOL_REF)), since that's where
 	 it'll probably end up.  Add a penalty for size.  */
       *total = (COSTS_N_INSNS (1)
-		+ (flag_pic != 0 && !TARGET_64BIT)
+		+ (GCC_OPTION (flag_pic) != 0 && !TARGET_64BIT)
 		+ (mode == SFmode ? 0 : mode == DFmode ? 1 : 2));
       return true;
 
@@ -38638,7 +38638,7 @@ x86_can_output_mi_thunk (const_tree thunk ATTRIBUTE_UNUSED,
     return false;
 
   /* Need a free register for GOT references.  */
-  if (flag_pic && !targetm.binds_local_p (function))
+  if (GCC_OPTION (flag_pic) && !targetm.binds_local_p (function))
     return false;
 
   /* Otherwise ok.  */
@@ -38746,7 +38746,7 @@ x86_output_mi_thunk (FILE *file,
   fnaddr = XEXP (DECL_RTL (function), 0);
   if (TARGET_64BIT)
     {
-      if (!flag_pic || targetm.binds_local_p (function)
+      if (!GCC_OPTION (flag_pic) || targetm.binds_local_p (function)
 	  || TARGET_PECOFF)
 	;
       else
@@ -38758,7 +38758,7 @@ x86_output_mi_thunk (FILE *file,
     }
   else
     {
-      if (!flag_pic || targetm.binds_local_p (function))
+      if (!GCC_OPTION (flag_pic) || targetm.binds_local_p (function))
 	;
 #if TARGET_MACHO
       else if (TARGET_MACHO)
@@ -38787,7 +38787,7 @@ x86_output_mi_thunk (FILE *file,
     emit_jump_insn (gen_indirect_jump (fnaddr));
   else
     {
-      if (ix86_cmodel == CM_LARGE_PIC && SYMBOLIC_CONST (fnaddr))
+      if (GCC_OPTION (ix86_cmodel) == CM_LARGE_PIC && SYMBOLIC_CONST (fnaddr))
 	fnaddr = legitimize_pic_address (fnaddr,
 					 gen_rtx_REG (Pmode, tmp_regno));
 
@@ -38829,7 +38829,7 @@ x86_file_start (void)
     fputs ("\t.version\t\"01.01\"\n", asm_out_file);
   if (X86_FILE_START_FLTUSED)
     fputs ("\t.global\t__fltused\n", asm_out_file);
-  if (ix86_asm_dialect == ASM_INTEL)
+  if (GCC_OPTION (ix86_asm_dialect) == ASM_INTEL)
     fputs ("\t.intel_syntax noprefix\n", asm_out_file);
 }
 
@@ -38854,7 +38854,7 @@ x86_field_alignment (tree field, int computed)
 void
 x86_function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED)
 {
-  const char *mcount_name = (flag_fentry ? MCOUNT_NAME_BEFORE_PROLOGUE
+  const char *mcount_name = (GCC_OPTION (flag_fentry) ? MCOUNT_NAME_BEFORE_PROLOGUE
 					 : MCOUNT_NAME);
 
   if (TARGET_64BIT)
@@ -38863,12 +38863,12 @@ x86_function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED)
       fprintf (file, "\tleaq\t%sP%d(%%rip),%%r11\n", LPREFIX, labelno);
 #endif
 
-      if (!TARGET_PECOFF && flag_pic)
+      if (!TARGET_PECOFF && GCC_OPTION (flag_pic))
 	fprintf (file, "\tcall\t*%s@GOTPCREL(%%rip)\n", mcount_name);
       else
 	fprintf (file, "\tcall\t%s\n", mcount_name);
     }
-  else if (flag_pic)
+  else if (GCC_OPTION (flag_pic))
     {
 #ifndef NO_PROFILE_COUNTERS
       fprintf (file, "\tleal\t%sP%d@GOTOFF(%%ebx),%%" PROFILE_COUNT_REGISTER "\n",
@@ -39268,7 +39268,7 @@ ix86_reorg (void)
   if (TARGET_SEH && current_function_has_exception_handlers ())
     ix86_seh_fixup_eh_fallthru ();
 
-  if (optimize && optimize_function_for_speed_p (cfun))
+  if (GCC_OPTION (optimize) && optimize_function_for_speed_p (cfun))
     {
       if (TARGET_PAD_SHORT_FUNCTION)
 	ix86_pad_short_function ();
@@ -41536,17 +41536,17 @@ ix86_stack_protect_fail (void)
 int
 asm_preferred_eh_data_format (int code, int global)
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       int type = DW_EH_PE_sdata8;
       if (!TARGET_64BIT
-	  || ix86_cmodel == CM_SMALL_PIC
-	  || (ix86_cmodel == CM_MEDIUM_PIC && (global || code)))
+	  || GCC_OPTION (ix86_cmodel) == CM_SMALL_PIC
+	  || (GCC_OPTION (ix86_cmodel) == CM_MEDIUM_PIC && (global || code)))
 	type = DW_EH_PE_sdata4;
       return (global ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | type;
     }
-  if (ix86_cmodel == CM_SMALL
-      || (ix86_cmodel == CM_MEDIUM && code))
+  if (GCC_OPTION (ix86_cmodel) == CM_SMALL
+      || (GCC_OPTION (ix86_cmodel) == CM_MEDIUM && code))
     return DW_EH_PE_udata4;
   return DW_EH_PE_absptr;
 }
@@ -46184,7 +46184,7 @@ static bool
 has_dispatch (rtx insn, int action)
 {
   if ((TARGET_BDVER1 || TARGET_BDVER2 || TARGET_BDVER3 || TARGET_BDVER4)
-      && flag_dispatch_scheduler)
+      && GCC_OPTION (flag_dispatch_scheduler))
     switch (action)
       {
       default:
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index c5c1d58..4479bdc 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -142,7 +142,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 
 /* SSE4.1 defines round instructions */
 #define	OPTION_MASK_ISA_ROUND	OPTION_MASK_ISA_SSE4_1
-#define	TARGET_ISA_ROUND	((ix86_isa_flags & OPTION_MASK_ISA_ROUND) != 0)
+#define	TARGET_ISA_ROUND	((GCC_OPTION (ix86_isa_flags) & OPTION_MASK_ISA_ROUND) != 0)
 
 #include "config/vxworks-dummy.h"
 
@@ -484,14 +484,14 @@ extern unsigned char ix86_arch_features[X86_ARCH_LAST];
 extern unsigned char x86_prefetch_sse;
 #define TARGET_PREFETCH_SSE	x86_prefetch_sse
 
-#define ASSEMBLER_DIALECT	(ix86_asm_dialect)
+#define ASSEMBLER_DIALECT	(GCC_OPTION (ix86_asm_dialect))
 
-#define TARGET_SSE_MATH		((ix86_fpmath & FPMATH_SSE) != 0)
+#define TARGET_SSE_MATH		((GCC_OPTION (ix86_fpmath) & FPMATH_SSE) != 0)
 #define TARGET_MIX_SSE_I387 \
- ((ix86_fpmath & (FPMATH_SSE | FPMATH_387)) == (FPMATH_SSE | FPMATH_387))
+ ((GCC_OPTION (ix86_fpmath) & (FPMATH_SSE | FPMATH_387)) == (FPMATH_SSE | FPMATH_387))
 
-#define TARGET_GNU_TLS		(ix86_tls_dialect == TLS_DIALECT_GNU)
-#define TARGET_GNU2_TLS		(ix86_tls_dialect == TLS_DIALECT_GNU2)
+#define TARGET_GNU_TLS		(GCC_OPTION (ix86_tls_dialect) == TLS_DIALECT_GNU)
+#define TARGET_GNU2_TLS		(GCC_OPTION (ix86_tls_dialect) == TLS_DIALECT_GNU2)
 #define TARGET_ANY_GNU_TLS	(TARGET_GNU_TLS || TARGET_GNU2_TLS)
 #define TARGET_SUN_TLS		0
 
@@ -502,8 +502,8 @@ extern unsigned char x86_prefetch_sse;
 #define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT 0
 #endif
 
-#define TARGET_SSP_GLOBAL_GUARD (ix86_stack_protector_guard == SSP_GLOBAL)
-#define TARGET_SSP_TLS_GUARD    (ix86_stack_protector_guard == SSP_TLS)
+#define TARGET_SSP_GLOBAL_GUARD (GCC_OPTION (ix86_stack_protector_guard) == SSP_GLOBAL)
+#define TARGET_SSP_TLS_GUARD    (GCC_OPTION (ix86_stack_protector_guard) == SSP_TLS)
 
 /* Fence to use after loop using storent.  */
 
@@ -717,7 +717,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
 
 /* Boundary (in *bits*) on which stack pointer should be aligned.  */
 #define STACK_BOUNDARY \
- (TARGET_64BIT && ix86_abi == MS_ABI ? 128 : BITS_PER_WORD)
+ (TARGET_64BIT && GCC_OPTION (ix86_abi) == MS_ABI ? 128 : BITS_PER_WORD)
 
 /* Stack boundary of the main function guaranteed by OS.  */
 #define MAIN_STACK_BOUNDARY (TARGET_64BIT ? 128 : 32)
@@ -1215,9 +1215,9 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
 #define REAL_PIC_OFFSET_TABLE_REGNUM  BX_REG
 
 #define PIC_OFFSET_TABLE_REGNUM				\
-  ((TARGET_64BIT && (ix86_cmodel == CM_SMALL_PIC	\
+  ((TARGET_64BIT && (GCC_OPTION (ix86_cmodel) == CM_SMALL_PIC	\
                      || TARGET_PECOFF))		\
-   || !flag_pic ? INVALID_REGNUM			\
+   || !GCC_OPTION (flag_pic) ? INVALID_REGNUM			\
    : reload_completed ? REGNO (pic_offset_table_rtx)	\
    : REAL_PIC_OFFSET_TABLE_REGNUM)
 
@@ -1839,7 +1839,7 @@ do {									\
 /* Specify the machine mode that this machine uses
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE \
- (!TARGET_LP64 || (flag_pic && ix86_cmodel != CM_LARGE_PIC) ? SImode : DImode)
+ (!TARGET_LP64 || (GCC_OPTION (flag_pic) && GCC_OPTION (ix86_cmodel) != CM_LARGE_PIC) ? SImode : DImode)
 
 /* Define this as 1 if `char' should by default be signed; else as 0.  */
 #define DEFAULT_SIGNED_CHAR 1
@@ -1897,7 +1897,7 @@ do {							\
 /* Specify the machine mode that pointers have.
    After generation of rtl, the compiler makes no further distinction
    between pointers and any other objects of this machine mode.  */
-#define Pmode (ix86_pmode == PMODE_DI ? DImode : SImode)
+#define Pmode (GCC_OPTION (ix86_pmode) == PMODE_DI ? DImode : SImode)
 
 /* A C expression whose value is zero if pointers that need to be extended
    from being `POINTER_SIZE' bits wide to `Pmode' are sign-extended and
@@ -1916,7 +1916,7 @@ do {							\
    is the default; other values are interpreted relative to that.  */
 
 #define BRANCH_COST(speed_p, predictable_p) \
-  (!(speed_p) ? 2 : (predictable_p) ? 0 : ix86_branch_cost)
+  (!(speed_p) ? 2 : (predictable_p) ? 0 : GCC_OPTION (ix86_branch_cost))
 
 /* An integer expression for the size in bits of the largest integer machine
    mode that should actually be used.  We allow pairs of registers.  */
@@ -2176,7 +2176,7 @@ do {									\
    sections.  This is the case for x86_64 on Mach-O for example.  */
 
 #define JUMP_TABLES_IN_TEXT_SECTION \
-  (flag_pic && ((TARGET_MACHO && TARGET_64BIT) \
+  (GCC_OPTION (flag_pic) && ((TARGET_MACHO && TARGET_64BIT) \
    || (!TARGET_64BIT && !HAVE_AS_GOTOFF_IN_DATA)))
 
 /* Switch to init or fini section via SECTION_OP, emit a call to FUNC,
@@ -2531,10 +2531,10 @@ extern void debug_dispatch_window (int);
 			 | RECIP_MASK_VEC_DIV | RECIP_MASK_VEC_SQRT)
 #define RECIP_MASK_DEFAULT (RECIP_MASK_VEC_DIV | RECIP_MASK_VEC_SQRT)
 
-#define TARGET_RECIP_DIV	((recip_mask & RECIP_MASK_DIV) != 0)
-#define TARGET_RECIP_SQRT	((recip_mask & RECIP_MASK_SQRT) != 0)
-#define TARGET_RECIP_VEC_DIV	((recip_mask & RECIP_MASK_VEC_DIV) != 0)
-#define TARGET_RECIP_VEC_SQRT	((recip_mask & RECIP_MASK_VEC_SQRT) != 0)
+#define TARGET_RECIP_DIV	((GCC_OPTION (recip_mask) & RECIP_MASK_DIV) != 0)
+#define TARGET_RECIP_SQRT	((GCC_OPTION (recip_mask) & RECIP_MASK_SQRT) != 0)
+#define TARGET_RECIP_VEC_DIV	((GCC_OPTION (recip_mask) & RECIP_MASK_VEC_DIV) != 0)
+#define TARGET_RECIP_VEC_SQRT	((GCC_OPTION (recip_mask) & RECIP_MASK_VEC_SQRT) != 0)
 
 #define IX86_HLE_ACQUIRE (1 << 16)
 #define IX86_HLE_RELEASE (1 << 17)
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 4a8b463..0f41b2a 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -1672,7 +1672,7 @@
 (define_split
   [(set (match_operand:DI 0 "push_operand")
         (match_operand:DI 1 "immediate_operand"))]
-  "TARGET_64BIT && ((optimize > 0 && flag_peephole2)
+  "TARGET_64BIT && ((GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_peephole2))
 		    ? epilogue_completed : reload_completed)
    && !symbolic_operand (operands[1], DImode)
    && !x86_64_immediate_operand (operands[1], DImode)"
@@ -2064,7 +2064,7 @@
       return "lea{q}\t{%E1, %0|%0, %E1}";
 
     case TYPE_IMOV:
-      gcc_assert (!flag_pic || LEGITIMATE_PIC_OPERAND_P (operands[1]));
+      gcc_assert (!GCC_OPTION (flag_pic) || LEGITIMATE_PIC_OPERAND_P (operands[1]));
       if (get_attr_mode (insn) == MODE_SI)
 	return "mov{l}\t{%k1, %k0|%k0, %k1}";
       else if (which_alternative == 4)
@@ -2221,7 +2221,7 @@
       return "lea{l}\t{%E1, %0|%0, %E1}";
 
     case TYPE_IMOV:
-      gcc_assert (!flag_pic || LEGITIMATE_PIC_OPERAND_P (operands[1]));
+      gcc_assert (!GCC_OPTION (flag_pic) || LEGITIMATE_PIC_OPERAND_P (operands[1]));
       if (ix86_use_lea_for_mov (insn, operands))
 	return "lea{l}\t{%E1, %0|%0, %E1}";
       else
@@ -2830,7 +2830,7 @@
   "(TARGET_64BIT || TARGET_SSE)
    && !(MEM_P (operands[0]) && MEM_P (operands[1]))
    && (!can_create_pseudo_p ()
-       || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
+       || (GCC_OPTION (ix86_cmodel) == CM_MEDIUM || GCC_OPTION (ix86_cmodel) == CM_LARGE)
        || GET_CODE (operands[1]) != CONST_DOUBLE
        || (optimize_function_for_size_p (cfun)
 	   && standard_sse_constant_p (operands[1])
@@ -2899,7 +2899,7 @@
 	 "fm,f,G,Yx*roF,Yx*rF,Yx*rC"))]
   "!(MEM_P (operands[0]) && MEM_P (operands[1]))
    && (!can_create_pseudo_p ()
-       || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
+       || (GCC_OPTION (ix86_cmodel) == CM_MEDIUM || GCC_OPTION (ix86_cmodel) == CM_LARGE)
        || GET_CODE (operands[1]) != CONST_DOUBLE
        || (optimize_function_for_size_p (cfun)
 	   && standard_80387_constant_p (operands[1]) > 0
@@ -2939,7 +2939,7 @@
     "Yf*fm,Yf*f,G   ,Yd*roF,Yd*rF,rm,rC,C ,F ,C,v,m,v,C ,*x,m ,*x,Yj,r"))]
   "!(MEM_P (operands[0]) && MEM_P (operands[1]))
    && (!can_create_pseudo_p ()
-       || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
+       || (GCC_OPTION (ix86_cmodel) == CM_MEDIUM || GCC_OPTION (ix86_cmodel) == CM_LARGE)
        || GET_CODE (operands[1]) != CONST_DOUBLE
        || (optimize_function_for_size_p (cfun)
 	   && ((!(TARGET_SSE2 && TARGET_SSE_MATH)
@@ -3114,7 +3114,7 @@
 	  "Yf*fm,Yf*f,G   ,rmF,rF,C,v,m,v,Yj,r  ,*y ,m  ,*y,*Yn,r"))]
   "!(MEM_P (operands[0]) && MEM_P (operands[1]))
    && (!can_create_pseudo_p ()
-       || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
+       || (GCC_OPTION (ix86_cmodel) == CM_MEDIUM || GCC_OPTION (ix86_cmodel) == CM_LARGE)
        || GET_CODE (operands[1]) != CONST_DOUBLE
        || (optimize_function_for_size_p (cfun)
 	   && ((!TARGET_SSE_MATH
@@ -3970,7 +3970,7 @@
 {
   if (TARGET_SSE2 && TARGET_SSE_MATH && !TARGET_MIX_SSE_I387)
     ;
-  else if (flag_unsafe_math_optimizations)
+  else if (GCC_OPTION (flag_unsafe_math_optimizations))
     ;
   else
     {
@@ -4047,7 +4047,7 @@
   [(set (match_operand:SF 0 "nonimmediate_operand"   "=fm,x")
         (float_truncate:SF
           (match_operand:DF 1 "nonimmediate_operand" "f  ,xm")))]
-  "TARGET_SSE2 && TARGET_MIX_SSE_I387 && flag_unsafe_math_optimizations"
+  "TARGET_SSE2 && TARGET_MIX_SSE_I387 && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   switch (which_alternative)
     {
@@ -4079,7 +4079,7 @@
   [(set (match_operand:SF 0 "nonimmediate_operand"   "=fm")
         (float_truncate:SF
           (match_operand:DF 1 "nonimmediate_operand" "f")))]
-  "TARGET_80387 && flag_unsafe_math_optimizations"
+  "TARGET_80387 && GCC_OPTION (flag_unsafe_math_optimizations)"
   "* return output_387_reg_move (insn, operands);"
   [(set_attr "type" "fmov")
    (set_attr "mode" "SF")])
@@ -4158,7 +4158,7 @@
 	      (clobber (match_dup 2))])]
   "TARGET_80387"
 {
-  if (flag_unsafe_math_optimizations)
+  if (GCC_OPTION (flag_unsafe_math_optimizations))
     {
       rtx reg = REG_P (operands[0]) ? operands[0] : gen_reg_rtx (<MODE>mode);
       emit_insn (gen_truncxf<mode>2_i387_noop (reg, operands[1]));
@@ -4203,7 +4203,7 @@
   [(set (match_operand:MODEF 0 "register_operand" "=f")
 	(float_truncate:MODEF
 	  (match_operand:XF 1 "register_operand" "f")))]
-  "TARGET_80387 && flag_unsafe_math_optimizations"
+  "TARGET_80387 && GCC_OPTION (flag_unsafe_math_optimizations)"
   "* return output_387_reg_move (insn, operands);"
   [(set_attr "type" "fmov")
    (set_attr "mode" "<MODE>")])
@@ -6765,8 +6765,8 @@
   if (TARGET_SSE_MATH
       && TARGET_RECIP_DIV
       && optimize_insn_for_speed_p ()
-      && flag_finite_math_only && !flag_trapping_math
-      && flag_unsafe_math_optimizations)
+      && GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math)
+      && GCC_OPTION (flag_unsafe_math_optimizations))
     {
       ix86_emit_swdivsf (operands[0], operands[1],
 			 operands[2], SFmode);
@@ -8852,7 +8852,7 @@
 	(ashift:DWI (match_operand:DWI 1 "nonmemory_operand")
 		    (match_operand:QI 2 "nonmemory_operand")))
    (clobber (reg:CC FLAGS_REG))]
-  "(optimize && flag_peephole2) ? epilogue_completed : reload_completed"
+  "(GCC_OPTION (optimize) && GCC_OPTION (flag_peephole2)) ? epilogue_completed : reload_completed"
   [(const_int 0)]
   "ix86_split_ashl (operands, NULL_RTX, <MODE>mode); DONE;")
 
@@ -9478,7 +9478,7 @@
    (clobber (reg:CC FLAGS_REG))]
   ""
   "#"
-  "(optimize && flag_peephole2) ? epilogue_completed : reload_completed"
+  "(GCC_OPTION (optimize) && GCC_OPTION (flag_peephole2)) ? epilogue_completed : reload_completed"
   [(const_int 0)]
   "ix86_split_<shift_insn> (operands, NULL_RTX, <MODE>mode); DONE;"
   [(set_attr "type" "multi")])
@@ -11060,7 +11060,7 @@
 {
   /* In PIC mode, the table entries are stored GOT (32-bit) or PC (64-bit)
      relative.  Convert the relative address to an absolute address.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       rtx op0, op1;
       enum rtx_code code;
@@ -11391,7 +11391,7 @@
 		     ? gen_rtx_REG (XCmode, FIRST_FLOAT_REG) : NULL),
 		    operands[0], const0_rtx,
 		    GEN_INT ((TARGET_64BIT
-			      ? (ix86_abi == SYSV_ABI
+			      ? (GCC_OPTION (ix86_abi) == SYSV_ABI
 				 ? X86_64_SSE_REGPARM_MAX
 				 : X86_64_MS_SSE_REGPARM_MAX)
 			      : X86_32_SSE_REGPARM_MAX)
@@ -12466,7 +12466,7 @@
 	 (match_operand 4)))
    (unspec:DI [(match_operand 1 "tls_symbolic_operand")]
 	     UNSPEC_TLS_GD)]
-  "TARGET_64BIT && ix86_cmodel == CM_LARGE_PIC && !TARGET_PECOFF
+  "TARGET_64BIT && GCC_OPTION (ix86_cmodel) == CM_LARGE_PIC && !TARGET_PECOFF
    && GET_CODE (operands[3]) == CONST
    && GET_CODE (XEXP (operands[3], 0)) == UNSPEC
    && XINT (XEXP (operands[3], 0), 1) == UNSPEC_PLTOFF"
@@ -12550,7 +12550,7 @@
 			  (match_operand:DI 2 "immediate_operand" "i")))
 	 (match_operand 3)))
    (unspec:DI [(const_int 0)] UNSPEC_TLS_LD_BASE)]
-  "TARGET_64BIT && ix86_cmodel == CM_LARGE_PIC && !TARGET_PECOFF
+  "TARGET_64BIT && GCC_OPTION (ix86_cmodel) == CM_LARGE_PIC && !TARGET_PECOFF
    && GET_CODE (operands[2]) == CONST
    && GET_CODE (XEXP (operands[2], 0)) == UNSPEC
    && XINT (XEXP (operands[2], 0), 1) == UNSPEC_PLTOFF"
@@ -13269,8 +13269,8 @@
       && TARGET_SSE_MATH
       && TARGET_RECIP_SQRT
       && !optimize_function_for_size_p (cfun)
-      && flag_finite_math_only && !flag_trapping_math
-      && flag_unsafe_math_optimizations)
+      && GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math)
+      && GCC_OPTION (flag_unsafe_math_optimizations))
     {
       ix86_emit_swsqrtsf (operands[0], operands[1], SFmode, 0);
       DONE;
@@ -13443,7 +13443,7 @@
 	(unspec:XF [(match_operand:XF 1 "register_operand" "0")]
 		   SINCOS))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "f<sincos>"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "XF")])
@@ -13456,7 +13456,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "f<sincos>"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "XF")])
@@ -13474,7 +13474,7 @@
    (set (match_operand:XF 1 "register_operand" "=u")
         (unspec:XF [(match_dup 2)] UNSPEC_SINCOS_SIN))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "fsincos"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "XF")])
@@ -13509,7 +13509,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "fsincos"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "XF")])
@@ -13545,7 +13545,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0 = gen_reg_rtx (XFmode);
   rtx op1 = gen_reg_rtx (XFmode);
@@ -13563,7 +13563,7 @@
         (unspec:XF [(match_operand:XF 2 "register_operand" "0")]
 		   UNSPEC_TAN))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations
+   && GCC_OPTION (flag_unsafe_math_optimizations)
    && standard_80387_constant_p (operands[3]) == 2"
   "fptan"
   [(set_attr "type" "fpspc")
@@ -13579,7 +13579,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations
+   && GCC_OPTION (flag_unsafe_math_optimizations)
    && standard_80387_constant_p (operands[3]) == 2"
   "fptan"
   [(set_attr "type" "fpspc")
@@ -13589,7 +13589,7 @@
   [(use (match_operand:XF 0 "register_operand"))
    (use (match_operand:XF 1 "register_operand"))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx one = gen_reg_rtx (XFmode);
   rtx op2 = CONST1_RTX (XFmode); /* fld1 */
@@ -13604,7 +13604,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0 = gen_reg_rtx (XFmode);
 
@@ -13624,7 +13624,7 @@
 	           UNSPEC_FPATAN))
    (clobber (match_scratch:XF 3 "=2"))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "fpatan"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "XF")])
@@ -13640,7 +13640,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "fpatan"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "XF")])
@@ -13652,7 +13652,7 @@
 			      UNSPEC_FPATAN))
 	      (clobber (match_scratch:XF 3))])]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations")
+   && GCC_OPTION (flag_unsafe_math_optimizations)")
 
 (define_expand "atan2<mode>3"
   [(use (match_operand:MODEF 0 "register_operand"))
@@ -13661,7 +13661,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0 = gen_reg_rtx (XFmode);
 
@@ -13677,7 +13677,7 @@
 			      UNSPEC_FPATAN))
 	      (clobber (match_scratch:XF 3))])]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   operands[2] = gen_reg_rtx (XFmode);
   emit_move_insn (operands[2], CONST1_RTX (XFmode));  /* fld1 */
@@ -13689,7 +13689,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0 = gen_reg_rtx (XFmode);
 
@@ -13712,7 +13712,7 @@
 			      UNSPEC_FPATAN))
    	      (clobber (match_scratch:XF 6))])]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   int i;
 
@@ -13731,7 +13731,7 @@
  "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0 = gen_reg_rtx (XFmode);
   rtx op1 = gen_reg_rtx (XFmode);
@@ -13756,7 +13756,7 @@
 			      UNSPEC_FPATAN))
    	      (clobber (match_scratch:XF 6))])]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   int i;
 
@@ -13775,7 +13775,7 @@
  "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0 = gen_reg_rtx (XFmode);
   rtx op1 = gen_reg_rtx (XFmode);
@@ -13796,7 +13796,7 @@
 	           UNSPEC_FYL2X))
    (clobber (match_scratch:XF 3 "=2"))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "fyl2x"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "XF")])
@@ -13811,7 +13811,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "fyl2x"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "XF")])
@@ -13822,7 +13822,7 @@
 			       (match_dup 2)] UNSPEC_FYL2X))
 	      (clobber (match_scratch:XF 3))])]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   operands[2] = gen_reg_rtx (XFmode);
   emit_move_insn (operands[2], standard_80387_constant_rtx (4)); /* fldln2 */
@@ -13834,7 +13834,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0 = gen_reg_rtx (XFmode);
 
@@ -13852,7 +13852,7 @@
 			       (match_dup 2)] UNSPEC_FYL2X))
 	      (clobber (match_scratch:XF 3))])]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   operands[2] = gen_reg_rtx (XFmode);
   emit_move_insn (operands[2], standard_80387_constant_rtx (3)); /* fldlg2 */
@@ -13864,7 +13864,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0 = gen_reg_rtx (XFmode);
 
@@ -13882,7 +13882,7 @@
 			       (match_dup 2)] UNSPEC_FYL2X))
 	      (clobber (match_scratch:XF 3))])]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   operands[2] = gen_reg_rtx (XFmode);
   emit_move_insn (operands[2], CONST1_RTX (XFmode)); /* fld1 */
@@ -13894,7 +13894,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0 = gen_reg_rtx (XFmode);
 
@@ -13913,7 +13913,7 @@
 	           UNSPEC_FYL2XP1))
    (clobber (match_scratch:XF 3 "=2"))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "fyl2xp1"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "XF")])
@@ -13928,7 +13928,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "fyl2xp1"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "XF")])
@@ -13937,7 +13937,7 @@
   [(use (match_operand:XF 0 "register_operand"))
    (use (match_operand:XF 1 "register_operand"))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   if (optimize_insn_for_size_p ())
     FAIL;
@@ -13952,7 +13952,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0;
 
@@ -13975,7 +13975,7 @@
    (set (match_operand:XF 1 "register_operand" "=u")
         (unspec:XF [(match_dup 2)] UNSPEC_XTRACT_EXP))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "fxtract"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "XF")])
@@ -13990,7 +13990,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "fxtract"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "XF")])
@@ -14002,7 +14002,7 @@
 	      (set (match_operand:XF 0 "register_operand")
 		   (unspec:XF [(match_dup 1)] UNSPEC_XTRACT_EXP))])]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "operands[2] = gen_reg_rtx (XFmode);")
 
 (define_expand "logb<mode>2"
@@ -14011,7 +14011,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0 = gen_reg_rtx (XFmode);
   rtx op1 = gen_reg_rtx (XFmode);
@@ -14025,7 +14025,7 @@
   [(use (match_operand:SI 0 "register_operand"))
    (use (match_operand:XF 1 "register_operand"))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0, op1;
 
@@ -14046,7 +14046,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0, op1;
 
@@ -14066,7 +14066,7 @@
 	(unspec:XF [(match_operand:XF 1 "register_operand" "0")]
 		   UNSPEC_F2XM1))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "f2xm1"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "XF")])
@@ -14080,7 +14080,7 @@
 	(unspec:XF [(match_dup 2) (match_dup 3)]
 		   UNSPEC_FSCALE_EXP))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "fscale"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "XF")])
@@ -14099,7 +14099,7 @@
 		   (unspec:XF [(match_dup 8) (match_dup 4)]
 			      UNSPEC_FSCALE_EXP))])]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   int i;
 
@@ -14116,7 +14116,7 @@
   [(use (match_operand:XF 0 "register_operand"))
    (use (match_operand:XF 1 "register_operand"))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op2;
 
@@ -14136,7 +14136,7 @@
  "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0, op1;
 
@@ -14156,7 +14156,7 @@
   [(use (match_operand:XF 0 "register_operand"))
    (use (match_operand:XF 1 "register_operand"))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op2;
 
@@ -14176,7 +14176,7 @@
  "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0, op1;
 
@@ -14196,7 +14196,7 @@
   [(use (match_operand:XF 0 "register_operand"))
    (use (match_operand:XF 1 "register_operand"))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op2;
 
@@ -14216,7 +14216,7 @@
  "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0, op1;
 
@@ -14256,7 +14256,7 @@
    (set (match_operand:XF 0 "register_operand")
 	(plus:XF (match_dup 12) (match_dup 7)))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   int i;
 
@@ -14278,7 +14278,7 @@
  "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0, op1;
 
@@ -14299,7 +14299,7 @@
    (match_operand:XF 1 "register_operand")
    (match_operand:SI 2 "register_operand")]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   if (optimize_insn_for_size_p ())
     FAIL;
@@ -14320,7 +14320,7 @@
  "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0, op1;
 
@@ -14345,7 +14345,7 @@
 		   (unspec:XF [(match_dup 1) (match_dup 2)]
 			      UNSPEC_FSCALE_EXP))])]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   if (optimize_insn_for_size_p ())
     FAIL;
@@ -14360,7 +14360,7 @@
  "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0, op1, op2;
 
@@ -14385,7 +14385,7 @@
 	      (set (match_dup 2)
 		   (unspec:XF [(match_dup 1)] UNSPEC_XTRACT_EXP))])]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "operands[2] = gen_reg_rtx (XFmode);")
 
 (define_expand "significand<mode>2"
@@ -14394,7 +14394,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0 = gen_reg_rtx (XFmode);
   rtx op1 = gen_reg_rtx (XFmode);
@@ -14422,7 +14422,7 @@
 	(unspec:XF [(match_operand:XF 1 "register_operand" "0")]
 		   UNSPEC_FRNDINT))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "frndint"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "XF")])
@@ -14433,12 +14433,12 @@
   "(TARGET_USE_FANCY_MATH_387
     && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
 	|| TARGET_MIX_SSE_I387)
-    && flag_unsafe_math_optimizations)
+    && GCC_OPTION (flag_unsafe_math_optimizations))
    || (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH
-       && !flag_trapping_math)"
+       && !GCC_OPTION (flag_trapping_math))"
 {
   if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH
-      && !flag_trapping_math)
+      && !GCC_OPTION (flag_trapping_math))
     {
       if (TARGET_ROUND)
 	emit_insn (gen_sse4_1_round<mode>2
@@ -14467,15 +14467,15 @@
   "(TARGET_USE_FANCY_MATH_387
     && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
 	|| TARGET_MIX_SSE_I387)
-    && flag_unsafe_math_optimizations)
+    && GCC_OPTION (flag_unsafe_math_optimizations))
    || (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH
-       && !flag_trapping_math && !flag_rounding_math)"
+       && !GCC_OPTION (flag_trapping_math) && !GCC_OPTION (flag_rounding_math))"
 {
   if (optimize_insn_for_size_p ())
     FAIL;
 
   if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH
-      && !flag_trapping_math && !flag_rounding_math)
+      && !GCC_OPTION (flag_trapping_math) && !GCC_OPTION (flag_rounding_math))
     {
       if (TARGET_ROUND)
         {
@@ -14632,11 +14632,11 @@
   "(TARGET_USE_FANCY_MATH_387
     && (!(SSE_FLOAT_MODE_P (<X87MODEF:MODE>mode) && TARGET_SSE_MATH)
 	|| TARGET_MIX_SSE_I387)
-    && flag_unsafe_math_optimizations)
+    && GCC_OPTION (flag_unsafe_math_optimizations))
    || (SSE_FLOAT_MODE_P (<X87MODEF:MODE>mode) && TARGET_SSE_MATH
        && <SWI248x:MODE>mode != HImode 
        && ((<SWI248x:MODE>mode != DImode) || TARGET_64BIT)
-       && !flag_trapping_math && !flag_rounding_math)"
+       && !GCC_OPTION (flag_trapping_math) && !GCC_OPTION (flag_rounding_math))"
 {
   if (optimize_insn_for_size_p ())
     FAIL;
@@ -14644,7 +14644,7 @@
   if (SSE_FLOAT_MODE_P (<X87MODEF:MODE>mode) && TARGET_SSE_MATH
       && <SWI248x:MODE>mode != HImode
       && ((<SWI248x:MODE>mode != DImode) || TARGET_64BIT)
-      && !flag_trapping_math && !flag_rounding_math)
+      && !GCC_OPTION (flag_trapping_math) && !GCC_OPTION (flag_rounding_math))
     ix86_expand_lround (operands[0], operands[1]);
   else
     ix86_emit_i387_round (operands[0], operands[1]);
@@ -14689,7 +14689,7 @@
 		   FRNDINT_ROUNDING))
    (clobber (reg:CC FLAGS_REG))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations
+   && GCC_OPTION (flag_unsafe_math_optimizations)
    && can_create_pseudo_p ()"
   "#"
   "&& 1"
@@ -14715,7 +14715,7 @@
    (use (match_operand:HI 2 "memory_operand" "m"))
    (use (match_operand:HI 3 "memory_operand" "m"))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "fldcw\t%3\n\tfrndint\n\tfldcw\t%2"
   [(set_attr "type" "frndint")
    (set_attr "i387_cw" "<rounding>")
@@ -14727,7 +14727,7 @@
 			      FRNDINT_ROUNDING))
 	      (clobber (reg:CC FLAGS_REG))])]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations
+   && GCC_OPTION (flag_unsafe_math_optimizations)
    && !optimize_insn_for_size_p ()")
 
 (define_expand "<rounding_insn><mode>2"
@@ -14738,12 +14738,12 @@
   "(TARGET_USE_FANCY_MATH_387
     && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
 	|| TARGET_MIX_SSE_I387)
-    && flag_unsafe_math_optimizations)
+    && GCC_OPTION (flag_unsafe_math_optimizations))
    || (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH
-       && !flag_trapping_math)"
+       && !GCC_OPTION (flag_trapping_math))"
 {
   if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH
-      && !flag_trapping_math)
+      && !GCC_OPTION (flag_trapping_math))
     {
       if (TARGET_ROUND)
 	emit_insn (gen_sse4_1_round<mode>2
@@ -14797,7 +14797,7 @@
 		   UNSPEC_FRNDINT_MASK_PM))
    (clobber (reg:CC FLAGS_REG))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations
+   && GCC_OPTION (flag_unsafe_math_optimizations)
    && can_create_pseudo_p ()"
   "#"
   "&& 1"
@@ -14823,7 +14823,7 @@
    (use (match_operand:HI 2 "memory_operand" "m"))
    (use (match_operand:HI 3 "memory_operand" "m"))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "fldcw\t%3\n\tfrndint\n\tfclex\n\tfldcw\t%2"
   [(set_attr "type" "frndint")
    (set_attr "i387_cw" "mask_pm")
@@ -14835,7 +14835,7 @@
 			      UNSPEC_FRNDINT_MASK_PM))
 	      (clobber (reg:CC FLAGS_REG))])]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations")
+   && GCC_OPTION (flag_unsafe_math_optimizations)")
 
 (define_expand "nearbyint<mode>2"
   [(use (match_operand:MODEF 0 "register_operand"))
@@ -14843,7 +14843,7 @@
   "TARGET_USE_FANCY_MATH_387
    && (!(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
        || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx op0 = gen_reg_rtx (XFmode);
   rtx op1 = gen_reg_rtx (XFmode);
@@ -14862,7 +14862,7 @@
 			FIST_ROUNDING))
    (clobber (reg:CC FLAGS_REG))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations
+   && GCC_OPTION (flag_unsafe_math_optimizations)
    && can_create_pseudo_p ()"
   "#"
   "&& 1"
@@ -14896,7 +14896,7 @@
    (use (match_operand:HI 3 "memory_operand" "m"))
    (clobber (match_scratch:XF 4 "=&1f"))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "* return output_fix_trunc (insn, operands, false);"
   [(set_attr "type" "fistp")
    (set_attr "i387_cw" "<rounding>")
@@ -14911,7 +14911,7 @@
    (clobber (match_operand:DI 4 "memory_operand" "=X,m"))
    (clobber (match_scratch:XF 5 "=&1f,&1f"))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "#"
   [(set_attr "type" "fistp")
    (set_attr "i387_cw" "<rounding>")
@@ -14955,7 +14955,7 @@
    (use (match_operand:HI 2 "memory_operand" "m"))
    (use (match_operand:HI 3 "memory_operand" "m"))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "* return output_fix_trunc (insn, operands, false);"
   [(set_attr "type" "fistp")
    (set_attr "i387_cw" "<rounding>")
@@ -14969,7 +14969,7 @@
    (use (match_operand:HI 3 "memory_operand" "m,m"))
    (clobber (match_operand:SWI24 4 "memory_operand" "=X,m"))]
   "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
+   && GCC_OPTION (flag_unsafe_math_optimizations)"
   "#"
   [(set_attr "type" "fistp")
    (set_attr "i387_cw" "<rounding>")
@@ -15009,7 +15009,7 @@
 	      (clobber (reg:CC FLAGS_REG))])]
   "TARGET_USE_FANCY_MATH_387
    && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
-   && flag_unsafe_math_optimizations")
+   && GCC_OPTION (flag_unsafe_math_optimizations)")
 
 (define_expand "l<rounding_insn><MODEF:mode><SWI48:mode>2"
   [(parallel [(set (match_operand:SWI48 0 "nonimmediate_operand")
@@ -15017,7 +15017,7 @@
 				 FIST_ROUNDING))
 	      (clobber (reg:CC FLAGS_REG))])]
   "SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH
-   && !flag_trapping_math"
+   && !GCC_OPTION (flag_trapping_math)"
 {
   if (TARGET_64BIT && optimize_insn_for_size_p ())
     FAIL;
@@ -16407,7 +16407,7 @@
 
 (define_expand "builtin_setjmp_receiver"
   [(label_ref (match_operand 0))]
-  "!TARGET_64BIT && flag_pic"
+  "!TARGET_64BIT && GCC_OPTION (flag_pic)"
 {
 #if TARGET_MACHO
   if (TARGET_MACHO)
@@ -16428,7 +16428,7 @@
 
 (define_insn_and_split "nonlocal_goto_receiver"
   [(unspec_volatile [(const_int 0)] UNSPECV_NLGR)]
-  "TARGET_MACHO && !TARGET_64BIT && flag_pic"
+  "TARGET_MACHO && !TARGET_64BIT && GCC_OPTION (flag_pic)"
   "#"
   "&& reload_completed"
   [(const_int 0)]
diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
index f563820..3b77832 100644
--- a/gcc/config/i386/mingw32.h
+++ b/gcc/config/i386/mingw32.h
@@ -44,7 +44,7 @@ along with GCC; see the file COPYING3.  If not see
       builtin_define_std ("WINNT");				\
       builtin_define_with_int_value ("_INTEGRAL_MAX_BITS",	\
 				     TYPE_PRECISION (intmax_type_node));\
-      if (TARGET_64BIT && ix86_abi == MS_ABI)			\
+      if (TARGET_64BIT && GCC_OPTION (ix86_abi) == MS_ABI)			\
 	{							\
 	  builtin_define ("__MINGW64__");			\
 	  builtin_define_std ("WIN64");				\
@@ -233,7 +233,7 @@ do {						         \
 
 #define HAVE_ENABLE_EXECUTE_STACK
 #undef  CHECK_EXECUTE_STACK_ENABLED
-#define CHECK_EXECUTE_STACK_ENABLED flag_setstackexecutable
+#define CHECK_EXECUTE_STACK_ENABLED GCC_OPTION (flag_setstackexecutable)
 
 /* This matches SHLIB_SONAME and SHLIB_SOVERSION in t-cygming. */
 /* This matches SHLIB_SONAME and SHLIB_SOVERSION in t-cygwin. */
diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md
index 214acde..376d6a1 100644
--- a/gcc/config/i386/mmx.md
+++ b/gcc/config/i386/mmx.md
@@ -307,7 +307,7 @@
 	  (match_operand:V2SF 2 "nonimmediate_operand")))]
   "TARGET_3DNOW"
 {
-  if (!flag_finite_math_only)
+  if (!GCC_OPTION (flag_finite_math_only))
     operands[1] = force_reg (V2SFmode, operands[1]);
   ix86_fixup_binary_operands_no_copy (<CODE>, V2SFmode, operands);
 })
@@ -317,7 +317,7 @@
         (smaxmin:V2SF
 	  (match_operand:V2SF 1 "nonimmediate_operand" "%0")
 	  (match_operand:V2SF 2 "nonimmediate_operand" "ym")))]
-  "TARGET_3DNOW && flag_finite_math_only
+  "TARGET_3DNOW && GCC_OPTION (flag_finite_math_only)
    && ix86_binary_operator_ok (<CODE>, V2SFmode, operands)"
   "pf<maxmin_float>\t{%2, %0|%0, %2}"
   [(set_attr "type" "mmxadd")
diff --git a/gcc/config/i386/msformat-c.c b/gcc/config/i386/msformat-c.c
index 304d48f..09a478b 100644
--- a/gcc/config/i386/msformat-c.c
+++ b/gcc/config/i386/msformat-c.c
@@ -180,7 +180,7 @@ EXPORTED_CONST target_ovr_attr mingw_format_attribute_overrides[4] =
 extern void TARGET_OVERRIDES_FORMAT_INIT (void);
 
 /* Helper.  */
-#define C89_OR_EXT (warn_pedantic_ms_format ? STD_EXT : STD_C89)
+#define C89_OR_EXT (GCC_OPTION (warn_pedantic_ms_format) ? STD_EXT : STD_C89)
 
 void
 TARGET_OVERRIDES_FORMAT_INIT (void)
diff --git a/gcc/config/i386/netbsd-elf.h b/gcc/config/i386/netbsd-elf.h
index e575b39..f9eff92 100644
--- a/gcc/config/i386/netbsd-elf.h
+++ b/gcc/config/i386/netbsd-elf.h
@@ -78,7 +78,7 @@ along with GCC; see the file COPYING3.  If not see
 #undef FUNCTION_PROFILER
 #define FUNCTION_PROFILER(FILE, LABELNO)				\
 {									\
-  if (flag_pic)								\
+  if (GCC_OPTION (flag_pic))								\
     fprintf (FILE, "\tcall __mcount@PLT\n");				\
   else									\
     fprintf (FILE, "\tcall __mcount\n");				\
diff --git a/gcc/config/i386/netbsd64.h b/gcc/config/i386/netbsd64.h
index f990835..0601ea8 100644
--- a/gcc/config/i386/netbsd64.h
+++ b/gcc/config/i386/netbsd64.h
@@ -58,9 +58,9 @@ along with GCC; see the file COPYING3.  If not see
 #undef FUNCTION_PROFILER
 #define FUNCTION_PROFILER(FILE, LABELNO)				\
 {									\
-  if (TARGET_64BIT && flag_pic)						\
+  if (TARGET_64BIT && GCC_OPTION (flag_pic))						\
     fprintf (FILE, "\tcall *__mcount@PLT\n");				\
-  else if (flag_pic)							\
+  else if (GCC_OPTION (flag_pic))							\
     fprintf (FILE, "\tcall *__mcount@PLT\n");				\
   else									\
     fprintf (FILE, "\tcall __mcount\n");				\
diff --git a/gcc/config/i386/openbsd.h b/gcc/config/i386/openbsd.h
index f313d5c..495e562 100644
--- a/gcc/config/i386/openbsd.h
+++ b/gcc/config/i386/openbsd.h
@@ -82,7 +82,7 @@ along with GCC; see the file COPYING3.  If not see
    The icky part is not here, but in machine/profile.h.  */
 #undef FUNCTION_PROFILER
 #define FUNCTION_PROFILER(FILE, LABELNO)  \
-  fputs (flag_pic ? "\tcall mcount@PLT\n": "\tcall mcount\n", FILE);
+  fputs (GCC_OPTION (flag_pic) ? "\tcall mcount@PLT\n": "\tcall mcount\n", FILE);
 
 /* Assembler format: exception region output.  */
 
diff --git a/gcc/config/i386/openbsdelf.h b/gcc/config/i386/openbsdelf.h
index 46ae0b6..a123ed3 100644
--- a/gcc/config/i386/openbsdelf.h
+++ b/gcc/config/i386/openbsdelf.h
@@ -89,7 +89,7 @@ along with GCC; see the file COPYING3.  If not see
    The icky part is not here, but in <machine/profile.h>.  */
 #undef FUNCTION_PROFILER
 #define FUNCTION_PROFILER(FILE, LABELNO)  \
-  fputs (flag_pic ? "\tcall __mcount@PLT\n": "\tcall __mcount\n", FILE);
+  fputs (GCC_OPTION (flag_pic) ? "\tcall __mcount@PLT\n": "\tcall __mcount\n", FILE);
 
 #undef LINK_SPEC
 #define LINK_SPEC \
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index 0492241..fda4910 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -149,13 +149,13 @@
       /* TLS symbols are not constant.  */
       if (SYMBOL_REF_TLS_MODEL (op))
 	return false;
-      return (ix86_cmodel == CM_SMALL || ix86_cmodel == CM_KERNEL
-	      || (ix86_cmodel == CM_MEDIUM && !SYMBOL_REF_FAR_ADDR_P (op)));
+      return (GCC_OPTION (ix86_cmodel) == CM_SMALL || GCC_OPTION (ix86_cmodel) == CM_KERNEL
+	      || (GCC_OPTION (ix86_cmodel) == CM_MEDIUM && !SYMBOL_REF_FAR_ADDR_P (op)));
 
     case LABEL_REF:
       /* For certain code models, the code is near as well.  */
-      return (ix86_cmodel == CM_SMALL || ix86_cmodel == CM_MEDIUM
-	      || ix86_cmodel == CM_KERNEL);
+      return (GCC_OPTION (ix86_cmodel) == CM_SMALL || GCC_OPTION (ix86_cmodel) == CM_MEDIUM
+	      || GCC_OPTION (ix86_cmodel) == CM_KERNEL);
 
     case CONST:
       /* We also may accept the offsetted memory references in certain
@@ -178,7 +178,7 @@
 	  rtx op2 = XEXP (XEXP (op, 0), 1);
 	  HOST_WIDE_INT offset;
 
-	  if (ix86_cmodel == CM_LARGE)
+	  if (GCC_OPTION (ix86_cmodel) == CM_LARGE)
 	    return false;
 	  if (!CONST_INT_P (op2))
 	    return false;
@@ -193,8 +193,8 @@
 		 end of 31bits boundary.  We may also accept pretty
 		 large negative constants knowing that all objects are
 		 in the positive half of address space.  */
-	      if ((ix86_cmodel == CM_SMALL
-		   || (ix86_cmodel == CM_MEDIUM
+	      if ((GCC_OPTION (ix86_cmodel) == CM_SMALL
+		   || (GCC_OPTION (ix86_cmodel) == CM_MEDIUM
 		       && !SYMBOL_REF_FAR_ADDR_P (op1)))
 		  && offset < 16*1024*1024
 		  && trunc_int_for_mode (offset, SImode) == offset)
@@ -203,7 +203,7 @@
 		 negative half of 32bits address space.  We may not
 		 accept negative offsets, since they may be just off
 		 and we may accept pretty large positive ones.  */
-	      if (ix86_cmodel == CM_KERNEL
+	      if (GCC_OPTION (ix86_cmodel) == CM_KERNEL
 		  && offset > 0
 		  && trunc_int_for_mode (offset, SImode) == offset)
 		return true;
@@ -212,11 +212,11 @@
 	    case LABEL_REF:
 	      /* These conditions are similar to SYMBOL_REF ones, just the
 		 constraints for code models differ.  */
-	      if ((ix86_cmodel == CM_SMALL || ix86_cmodel == CM_MEDIUM)
+	      if ((GCC_OPTION (ix86_cmodel) == CM_SMALL || GCC_OPTION (ix86_cmodel) == CM_MEDIUM)
 		  && offset < 16*1024*1024
 		  && trunc_int_for_mode (offset, SImode) == offset)
 		return true;
-	      if (ix86_cmodel == CM_KERNEL
+	      if (GCC_OPTION (ix86_cmodel) == CM_KERNEL
 		  && offset > 0
 		  && trunc_int_for_mode (offset, SImode) == offset)
 		return true;
@@ -268,13 +268,13 @@
       /* TLS symbols are not constant.  */
       if (SYMBOL_REF_TLS_MODEL (op))
 	return false;
-      return (ix86_cmodel == CM_SMALL
-	      || (ix86_cmodel == CM_MEDIUM
+      return (GCC_OPTION (ix86_cmodel) == CM_SMALL
+	      || (GCC_OPTION (ix86_cmodel) == CM_MEDIUM
 		  && !SYMBOL_REF_FAR_ADDR_P (op)));
 
     case LABEL_REF:
       /* For certain code models, the code is near as well.  */
-      return ix86_cmodel == CM_SMALL || ix86_cmodel == CM_MEDIUM;
+      return GCC_OPTION (ix86_cmodel) == CM_SMALL || GCC_OPTION (ix86_cmodel) == CM_MEDIUM;
 
     case CONST:
       /* We also may accept the offsetted memory references in certain
@@ -284,7 +284,7 @@
 	  rtx op1 = XEXP (XEXP (op, 0), 0);
 	  rtx op2 = XEXP (XEXP (op, 0), 1);
 
-	  if (ix86_cmodel == CM_LARGE)
+	  if (GCC_OPTION (ix86_cmodel) == CM_LARGE)
 	    return false;
 	  switch (GET_CODE (op1))
 	    {
@@ -296,8 +296,8 @@
 		 offsets, since one bit is available for free.  Negative
 		 offsets are limited by the size of NULL pointer area
 		 specified by the ABI.  */
-	      if ((ix86_cmodel == CM_SMALL
-		   || (ix86_cmodel == CM_MEDIUM
+	      if ((GCC_OPTION (ix86_cmodel) == CM_SMALL
+		   || (GCC_OPTION (ix86_cmodel) == CM_MEDIUM
 		       && !SYMBOL_REF_FAR_ADDR_P (op1)))
 		  && CONST_INT_P (op2)
 		  && trunc_int_for_mode (INTVAL (op2), DImode) > -0x10000
@@ -312,7 +312,7 @@
 	    case LABEL_REF:
 	      /* These conditions are similar to SYMBOL_REF ones, just the
 		 constraints for code models differ.  */
-	      if ((ix86_cmodel == CM_SMALL || ix86_cmodel == CM_MEDIUM)
+	      if ((GCC_OPTION (ix86_cmodel) == CM_SMALL || GCC_OPTION (ix86_cmodel) == CM_MEDIUM)
 		  && CONST_INT_P (op2)
 		  && trunc_int_for_mode (INTVAL (op2), DImode) > -0x10000
 		  && trunc_int_for_mode (INTVAL (op2), SImode) == INTVAL (op2))
@@ -377,7 +377,7 @@
 (define_predicate "pic_32bit_operand"
   (match_code "const,symbol_ref,label_ref")
 {
-  if (!flag_pic)
+  if (!GCC_OPTION (flag_pic))
     return false;
 
   /* Rule out relocations that translate into 64bit constants.  */
@@ -506,7 +506,7 @@
 (define_predicate "constant_call_address_operand"
   (match_code "symbol_ref")
 {
-  if (ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
+  if (GCC_OPTION (ix86_cmodel) == CM_LARGE || GCC_OPTION (ix86_cmodel) == CM_LARGE_PIC)
     return false;
   if (TARGET_DLLIMPORT_DECL_ATTRIBUTES && SYMBOL_REF_DLLIMPORT_P (op))
     return false;
@@ -997,7 +997,7 @@
 	      }
 	}
       if (TARGET_64BIT
-	  && flag_pic
+	  && GCC_OPTION (flag_pic)
 	  && (GET_CODE (disp) == SYMBOL_REF
 	      || GET_CODE (disp) == LABEL_REF))
 	return false;
@@ -1109,7 +1109,7 @@
   struct ix86_address parts;
   int ok;
 
-  if (TARGET_64BIT || !flag_pic)
+  if (TARGET_64BIT || !GCC_OPTION (flag_pic))
     return true;
 
   ok = ix86_decompose_address (XEXP (op, 0), &parts);
diff --git a/gcc/config/i386/sol2.h b/gcc/config/i386/sol2.h
index 8a21a59..1d11b265 100644
--- a/gcc/config/i386/sol2.h
+++ b/gcc/config/i386/sol2.h
@@ -29,7 +29,7 @@ along with GCC; see the file COPYING3.  If not see
    labels in different sections, so force DW_EH_PE_datarel.  */
 #undef ASM_PREFERRED_EH_DATA_FORMAT
 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)			\
-  (flag_pic ? ((GLOBAL ? DW_EH_PE_indirect : 0)				\
+  (GCC_OPTION (flag_pic) ? ((GLOBAL ? DW_EH_PE_indirect : 0)				\
 	       | (TARGET_64BIT ? DW_EH_PE_pcrel | DW_EH_PE_sdata4	\
 		  : DW_EH_PE_datarel))					\
    : DW_EH_PE_absptr)
@@ -133,7 +133,7 @@ along with GCC; see the file COPYING3.  If not see
 	ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");	\
 								\
       size_directive_output = 0;				\
-      if (!flag_inhibit_size_directive				\
+      if (!GCC_OPTION (flag_inhibit_size_directive)				\
 	  && (DECL) && DECL_SIZE (DECL))			\
 	{							\
 	  size_directive_output = 1;				\
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index f30b27e..7a2fac5 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -1388,8 +1388,8 @@
   if (TARGET_SSE_MATH
       && TARGET_RECIP_VEC_DIV
       && !optimize_insn_for_size_p ()
-      && flag_finite_math_only && !flag_trapping_math
-      && flag_unsafe_math_optimizations)
+      && GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math)
+      && GCC_OPTION (flag_unsafe_math_optimizations))
     {
       ix86_emit_swdivsf (operands[0], operands[1], operands[2], <MODE>mode);
       DONE;
@@ -1479,8 +1479,8 @@
   if (TARGET_SSE_MATH
       && TARGET_RECIP_VEC_SQRT
       && !optimize_insn_for_size_p ()
-      && flag_finite_math_only && !flag_trapping_math
-      && flag_unsafe_math_optimizations)
+      && GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math)
+      && GCC_OPTION (flag_unsafe_math_optimizations))
     {
       ix86_emit_swsqrtsf (operands[0], operands[1], <MODE>mode, false);
       DONE;
@@ -1589,7 +1589,7 @@
 	  (match_operand:VF 2 "<round_saeonly_nimm_predicate>")))]
   "TARGET_SSE && <mask_mode512bit_condition> && <round_saeonly_mode512bit_condition>"
 {
-  if (!flag_finite_math_only)
+  if (!GCC_OPTION (flag_finite_math_only))
     operands[1] = force_reg (<MODE>mode, operands[1]);
   ix86_fixup_binary_operands_no_copy (<CODE>, <MODE>mode, operands);
 })
@@ -1599,7 +1599,7 @@
 	(smaxmin:VF
 	  (match_operand:VF 1 "<round_saeonly_nimm_predicate>" "%0,v")
 	  (match_operand:VF 2 "<round_saeonly_nimm_predicate>" "xm,<round_saeonly_constraint>")))]
-  "TARGET_SSE && flag_finite_math_only
+  "TARGET_SSE && GCC_OPTION (flag_finite_math_only)
    && ix86_binary_operator_ok (<CODE>, <MODE>mode, operands)
    && <mask_mode512bit_condition> && <round_saeonly_mode512bit_condition>"
   "@
@@ -1616,7 +1616,7 @@
 	(smaxmin:VF
 	  (match_operand:VF 1 "register_operand" "0,v")
 	  (match_operand:VF 2 "<round_saeonly_nimm_predicate>" "xm,<round_saeonly_constraint>")))]
-  "TARGET_SSE && !flag_finite_math_only
+  "TARGET_SSE && !GCC_OPTION (flag_finite_math_only)
    && <mask_mode512bit_condition> && <round_saeonly_mode512bit_condition>"
   "@
    <maxmin_float><ssemodesuffix>\t{%2, %0|%0, %2}
@@ -12027,7 +12027,7 @@
 	(unspec:VF
 	  [(match_dup 4) (match_dup 5)]
 	  UNSPEC_ROUND))]
-  "TARGET_ROUND && !flag_trapping_math"
+  "TARGET_ROUND && !GCC_OPTION (flag_trapping_math)"
 {
   enum machine_mode scalar_mode;
   const struct real_format *fmt;
@@ -12055,7 +12055,7 @@
 (define_expand "round<mode>2_sfix"
   [(match_operand:<sseintvecmode> 0 "register_operand")
    (match_operand:VF1_128_256 1 "register_operand")]
-  "TARGET_ROUND && !flag_trapping_math"
+  "TARGET_ROUND && !GCC_OPTION (flag_trapping_math)"
 {
   rtx tmp = gen_reg_rtx (<MODE>mode);
 
@@ -12070,7 +12070,7 @@
   [(match_operand:<ssepackfltmode> 0 "register_operand")
    (match_operand:VF2 1 "register_operand")
    (match_operand:VF2 2 "register_operand")]
-  "TARGET_ROUND && !flag_trapping_math"
+  "TARGET_ROUND && !GCC_OPTION (flag_trapping_math)"
 {
   rtx tmp0, tmp1;
 
diff --git a/gcc/config/i386/winnt-cxx.c b/gcc/config/i386/winnt-cxx.c
index aa75f91..bb7287e 100644
--- a/gcc/config/i386/winnt-cxx.c
+++ b/gcc/config/i386/winnt-cxx.c
@@ -37,7 +37,7 @@ i386_pe_type_dllimport_p (tree decl)
   gcc_assert (TREE_CODE (decl) == VAR_DECL 
 	      || TREE_CODE (decl) == FUNCTION_DECL);
 
-  if (TARGET_NOP_FUN_DLLIMPORT && TREE_CODE (decl) == FUNCTION_DECL)
+  if (GCC_OPTION (TARGET_NOP_FUN_DLLIMPORT) && TREE_CODE (decl) == FUNCTION_DECL)
     return false;
 
   /* We ignore the dllimport attribute for inline member functions.
@@ -71,7 +71,7 @@ i386_pe_type_dllexport_p (tree decl)
       && DECL_DECLARED_INLINE_P (decl))
     {
       if (DECL_REALLY_EXTERN (decl)
-	  || !flag_keep_inline_dllexport)
+	  || !GCC_OPTION (flag_keep_inline_dllexport))
 	return false;
     }
   return true;
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index bcfd48a..0836073 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -125,7 +125,7 @@ i386_pe_determine_dllexport_p (tree decl)
 
   if (TREE_CODE (decl) == FUNCTION_DECL
       && DECL_DECLARED_INLINE_P (decl)
-      && !flag_keep_inline_dllexport)
+      && !GCC_OPTION (flag_keep_inline_dllexport))
     return false; 
 
   if (lookup_attribute ("dllexport", DECL_ATTRIBUTES (decl)))
@@ -170,7 +170,7 @@ i386_pe_determine_dllimport_p (tree decl)
 bool
 i386_pe_valid_dllimport_attribute_p (const_tree decl)
 {
-   if (TARGET_NOP_FUN_DLLIMPORT && TREE_CODE (decl) == FUNCTION_DECL)
+   if (GCC_OPTION (TARGET_NOP_FUN_DLLIMPORT) && TREE_CODE (decl) == FUNCTION_DECL)
      return false;
    return true;
 }
@@ -415,7 +415,7 @@ i386_pe_unique_section (tree decl, int reloc)
 
   /* Ignore RELOC, if we are allowed to put relocated
      const data into read-only section.  */
-  if (!flag_writable_rel_rdata)
+  if (!GCC_OPTION (flag_writable_rel_rdata))
     reloc = 0;
   name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
   name = i386_pe_strip_name_encoding_full (name);
@@ -473,7 +473,7 @@ i386_pe_section_type_flags (tree decl, const char *name, int reloc)
 
   /* Ignore RELOC, if we are allowed to put relocated
      const data into read-only section.  */
-  if (!flag_writable_rel_rdata)
+  if (!GCC_OPTION (flag_writable_rel_rdata))
     reloc = 0;
   /* The names we put in the hashtable will always be the unique
      versions given to us by the stringtable, so we can just use
@@ -596,7 +596,7 @@ i386_pe_asm_output_aligned_decl_common (FILE *stream, tree decl,
 
   fprintf (stream, "\t.comm\t");
   assemble_name (stream, name);
-  if (use_pe_aligned_common)
+  if (GCC_OPTION (use_pe_aligned_common))
     fprintf (stream, ", " HOST_WIDE_INT_PRINT_DEC ", %d\n",
 	   size ? size : (HOST_WIDE_INT) 1,
 	   exact_log2 (align) - exact_log2 (CHAR_BIT));
@@ -1285,7 +1285,7 @@ void
 i386_pe_start_function (FILE *f, const char *name, tree decl)
 {
   i386_pe_maybe_record_exported_symbol (decl, name, 0);
-  if (write_symbols != SDB_DEBUG)
+  if (GCC_OPTION (write_symbols) != SDB_DEBUG)
     i386_pe_declare_function_type (f, name, TREE_PUBLIC (decl));
   /* In case section was altered by debugging output.  */
   if (decl != NULL_TREE)
diff --git a/gcc/config/ia64/constraints.md b/gcc/config/ia64/constraints.md
index 3bf56bd..1f13867 100644
--- a/gcc/config/ia64/constraints.md
+++ b/gcc/config/ia64/constraints.md
@@ -96,11 +96,11 @@
        (match_test "op == CONST0_RTX (mode) || op == CONST1_RTX (mode)")))
 
 (define_constraint "Z"
-  "1.0 or (0.0 and !flag_signed_zeros)"
+  "1.0 or (0.0 and !GCC_OPTION (flag_signed_zeros))"
   (and (match_code "const_double")
        (ior (match_test "op == CONST1_RTX (mode)")
 	    (and (match_test "op == CONST0_RTX (mode)")
-		 (match_test "!flag_signed_zeros")))))
+		 (match_test "!GCC_OPTION (flag_signed_zeros)")))))
 
 (define_constraint "H"
   "0.0"
diff --git a/gcc/config/ia64/div.md b/gcc/config/ia64/div.md
index 8924214..9a4a100 100644
--- a/gcc/config/ia64/div.md
+++ b/gcc/config/ia64/div.md
@@ -269,10 +269,10 @@
   [(set (match_operand:SF 0 "fr_register_operand" "")
 	(div:SF (match_operand:SF 1 "fr_reg_or_fp01_operand" "")
 		(match_operand:SF 2 "fr_reg_or_fp01_operand" "")))]
-  "TARGET_INLINE_FLOAT_DIV"
+  "GCC_OPTION (TARGET_INLINE_FLOAT_DIV)"
 {
   rtx insn;
-  if (TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT)
+  if (GCC_OPTION (TARGET_INLINE_FLOAT_DIV) == INL_MIN_LAT)
     insn = gen_divsf3_internal_lat (operands[0], operands[1], operands[2]);
   else
     insn = gen_divsf3_internal_thr (operands[0], operands[1], operands[2]);
@@ -286,7 +286,7 @@
   [(set (match_operand:SF 0 "fr_register_operand" "")
         (div:SF (match_operand:SF 1 "fr_reg_or_fp01_operand" "")
                 (match_operand:SF 2 "fr_reg_or_fp01_operand" "")))]
-  "TARGET_INLINE_FLOAT_DIV"
+  "GCC_OPTION (TARGET_INLINE_FLOAT_DIV)"
 {
   rtx y     = gen_reg_rtx (RFmode);
   rtx a     = gen_reg_rtx (RFmode);
@@ -333,7 +333,7 @@
   [(set (match_operand:SF 0 "fr_register_operand" "")
         (div:SF (match_operand:SF 1 "fr_reg_or_fp01_operand" "")
                 (match_operand:SF 2 "fr_reg_or_fp01_operand" "")))]
-  "TARGET_INLINE_FLOAT_DIV"
+  "GCC_OPTION (TARGET_INLINE_FLOAT_DIV)"
 {
   rtx y         = gen_reg_rtx (RFmode);
   rtx a         = gen_reg_rtx (RFmode);
@@ -383,10 +383,10 @@
   [(set (match_operand:DF 0 "fr_register_operand" "")
 	(div:DF (match_operand:DF 1 "fr_reg_or_fp01_operand" "")
 		(match_operand:DF 2 "fr_reg_or_fp01_operand" "")))]
-  "TARGET_INLINE_FLOAT_DIV"
+  "GCC_OPTION (TARGET_INLINE_FLOAT_DIV)"
 {
   rtx insn;
-  if (TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT)
+  if (GCC_OPTION (TARGET_INLINE_FLOAT_DIV) == INL_MIN_LAT)
     insn = gen_divdf3_internal_lat (operands[0], operands[1], operands[2]);
   else
     insn = gen_divdf3_internal_thr (operands[0], operands[1], operands[2]);
@@ -400,7 +400,7 @@
   [(set (match_operand:DF 0 "fr_register_operand" "")
         (div:DF (match_operand:DF 1 "fr_reg_or_fp01_operand" "")
                 (match_operand:DF 2 "fr_reg_or_fp01_operand" "")))]
-  "TARGET_INLINE_FLOAT_DIV"
+  "GCC_OPTION (TARGET_INLINE_FLOAT_DIV)"
 {
   rtx q_res = gen_reg_rtx (RFmode);
   rtx a     = gen_reg_rtx (RFmode);
@@ -455,7 +455,7 @@
   [(set (match_operand:DF 0 "fr_register_operand" "")
         (div:DF (match_operand:DF 1 "fr_reg_or_fp01_operand" "")
                 (match_operand:DF 2 "fr_reg_or_fp01_operand" "")))]
-  "TARGET_INLINE_FLOAT_DIV"
+  "GCC_OPTION (TARGET_INLINE_FLOAT_DIV)"
 {
   rtx q_res     = gen_reg_rtx (RFmode);
   rtx a         = gen_reg_rtx (RFmode);
@@ -517,7 +517,7 @@
   [(set (match_operand:XF 0 "fr_register_operand" "")
         (div:XF (match_operand:XF 1 "fr_reg_or_fp01_operand" "")
                 (match_operand:XF 2 "fr_reg_or_fp01_operand" "")))]
-  "TARGET_INLINE_FLOAT_DIV"
+  "GCC_OPTION (TARGET_INLINE_FLOAT_DIV)"
 {
   rtx q_res     = gen_reg_rtx (RFmode);
   rtx a         = gen_reg_rtx (RFmode);
@@ -585,7 +585,7 @@
   [(set (match_operand:SI 0 "register_operand" "")
 	(div:SI (match_operand:SI 1 "general_operand" "")
 		(match_operand:SI 2 "general_operand" "")))]
-  "TARGET_INLINE_INT_DIV"
+  "GCC_OPTION (TARGET_INLINE_INT_DIV)"
 {
   rtx op1_rf, op2_rf, op0_rf, op0_di;
 
@@ -616,7 +616,7 @@
   [(set (match_operand:SI 0 "register_operand" "")
 	(mod:SI (match_operand:SI 1 "general_operand" "")
 		(match_operand:SI 2 "general_operand" "")))]
-  "TARGET_INLINE_INT_DIV"
+  "GCC_OPTION (TARGET_INLINE_INT_DIV)"
 {
   rtx op2_neg, op1_di, div;
 
@@ -639,7 +639,7 @@
   [(set (match_operand:SI 0 "register_operand" "")
 	(udiv:SI (match_operand:SI 1 "general_operand" "")
 		 (match_operand:SI 2 "general_operand" "")))]
-  "TARGET_INLINE_INT_DIV"
+  "GCC_OPTION (TARGET_INLINE_INT_DIV)"
 {
   rtx op1_rf, op2_rf, op0_rf, op0_di;
 
@@ -670,7 +670,7 @@
   [(set (match_operand:SI 0 "register_operand" "")
 	(umod:SI (match_operand:SI 1 "general_operand" "")
 		 (match_operand:SI 2 "general_operand" "")))]
-  "TARGET_INLINE_INT_DIV"
+  "GCC_OPTION (TARGET_INLINE_INT_DIV)"
 {
   rtx op2_neg, op1_di, div;
 
@@ -693,7 +693,7 @@
   [(set (match_operand:RF 0 "fr_register_operand" "")
         (float:RF (div:SI (match_operand:RF 1 "fr_register_operand" "")
                           (match_operand:RF 2 "fr_register_operand" ""))))]
-  "TARGET_INLINE_INT_DIV"
+  "GCC_OPTION (TARGET_INLINE_INT_DIV)"
 {
   rtx a         = operands[1];
   rtx b         = operands[2];
@@ -733,7 +733,7 @@
   [(set (match_operand:DI 0 "register_operand" "")
 	(div:DI (match_operand:DI 1 "general_operand" "")
 		(match_operand:DI 2 "general_operand" "")))]
-  "TARGET_INLINE_INT_DIV"
+  "GCC_OPTION (TARGET_INLINE_INT_DIV)"
 {
   rtx op1_rf, op2_rf, op0_rf;
 
@@ -752,7 +752,7 @@
   emit_insn (gen_cond_trap (EQ, operands[2], CONST0_RTX (DImode),
                             CONST1_RTX (DImode)));
 
-  if (TARGET_INLINE_INT_DIV == INL_MIN_LAT)
+  if (GCC_OPTION (TARGET_INLINE_INT_DIV) == INL_MIN_LAT)
     emit_insn (gen_divdi3_internal_lat (op0_rf, op1_rf, op2_rf));
   else
     emit_insn (gen_divdi3_internal_thr (op0_rf, op1_rf, op2_rf));
@@ -765,7 +765,7 @@
   [(set (match_operand:DI 0 "register_operand" "")
 	(mod:SI (match_operand:DI 1 "general_operand" "")
 		(match_operand:DI 2 "general_operand" "")))]
-  "TARGET_INLINE_INT_DIV"
+  "GCC_OPTION (TARGET_INLINE_INT_DIV)"
 {
   rtx op2_neg, div;
 
@@ -782,7 +782,7 @@
   [(set (match_operand:DI 0 "register_operand" "")
 	(udiv:DI (match_operand:DI 1 "general_operand" "")
 		 (match_operand:DI 2 "general_operand" "")))]
-  "TARGET_INLINE_INT_DIV"
+  "GCC_OPTION (TARGET_INLINE_INT_DIV)"
 {
   rtx op1_rf, op2_rf, op0_rf;
 
@@ -801,7 +801,7 @@
   emit_insn (gen_cond_trap (EQ, operands[2], CONST0_RTX (DImode),
                             CONST1_RTX (DImode)));
 
-  if (TARGET_INLINE_INT_DIV == INL_MIN_LAT)
+  if (GCC_OPTION (TARGET_INLINE_INT_DIV) == INL_MIN_LAT)
     emit_insn (gen_divdi3_internal_lat (op0_rf, op1_rf, op2_rf));
   else
     emit_insn (gen_divdi3_internal_thr (op0_rf, op1_rf, op2_rf));
@@ -814,7 +814,7 @@
   [(set (match_operand:DI 0 "register_operand" "")
 	(umod:DI (match_operand:DI 1 "general_operand" "")
 		 (match_operand:DI 2 "general_operand" "")))]
-  "TARGET_INLINE_INT_DIV"
+  "GCC_OPTION (TARGET_INLINE_INT_DIV)"
 {
   rtx op2_neg, div;
 
@@ -831,7 +831,7 @@
   [(set (match_operand:RF 0 "fr_register_operand" "")
         (float:RF (div:DI (match_operand:RF 1 "fr_register_operand" "")
                           (match_operand:RF 2 "fr_register_operand" ""))))]
-  "TARGET_INLINE_INT_DIV"
+  "GCC_OPTION (TARGET_INLINE_INT_DIV)"
 {
   rtx a         = operands[1];
   rtx b         = operands[2];
@@ -877,7 +877,7 @@
   [(set (match_operand:RF 0 "fr_register_operand" "")
         (float:RF (div:DI (match_operand:RF 1 "fr_register_operand" "")
                           (match_operand:RF 2 "fr_register_operand" ""))))]
-  "TARGET_INLINE_INT_DIV"
+  "GCC_OPTION (TARGET_INLINE_INT_DIV)"
 {
   rtx a         = operands[1];
   rtx b         = operands[2];
@@ -931,10 +931,10 @@
 (define_expand "sqrtsf2"
   [(set (match_operand:SF 0 "fr_register_operand" "=&f")
 	(sqrt:SF (match_operand:SF 1 "fr_reg_or_fp01_operand" "fG")))]
-  "TARGET_INLINE_SQRT"
+  "GCC_OPTION (TARGET_INLINE_SQRT)"
 {
   rtx insn;
-  if (TARGET_INLINE_SQRT == INL_MIN_LAT)
+  if (GCC_OPTION (TARGET_INLINE_SQRT) == INL_MIN_LAT)
     insn = gen_sqrtsf2_internal_lat (operands[0], operands[1]);
   else
     insn = gen_sqrtsf2_internal_thr (operands[0], operands[1]);
@@ -945,7 +945,7 @@
 (define_expand "sqrtsf2_internal_thr"
   [(set (match_operand:SF 0 "fr_register_operand" "")
         (sqrt:SF (match_operand:SF 1 "fr_register_operand" "")))]
-  "TARGET_INLINE_SQRT"
+  "GCC_OPTION (TARGET_INLINE_SQRT)"
 {
   rtx y         = gen_reg_rtx (RFmode);
   rtx b         = gen_reg_rtx (RFmode);
@@ -1007,7 +1007,7 @@
 (define_expand "sqrtsf2_internal_lat"
   [(set (match_operand:SF 0 "fr_register_operand" "")
         (sqrt:SF (match_operand:SF 1 "fr_register_operand" "")))]
-  "TARGET_INLINE_SQRT"
+  "GCC_OPTION (TARGET_INLINE_SQRT)"
 {
   rtx y         = gen_reg_rtx (RFmode);
   rtx b         = gen_reg_rtx (RFmode);
@@ -1072,11 +1072,11 @@
 (define_expand "sqrtdf2"
   [(set (match_operand:DF 0 "fr_register_operand" "=&f")
 	(sqrt:DF (match_operand:DF 1 "fr_reg_or_fp01_operand" "fG")))]
-  "TARGET_INLINE_SQRT"
+  "GCC_OPTION (TARGET_INLINE_SQRT)"
 {
   rtx insn;
 #if 0
-  if (TARGET_INLINE_SQRT == INL_MIN_LAT)
+  if (GCC_OPTION (TARGET_INLINE_SQRT) == INL_MIN_LAT)
     insn = gen_sqrtdf2_internal_lat (operands[0], operands[1]);
   else
 #endif
@@ -1088,7 +1088,7 @@
 (define_expand "sqrtdf2_internal_thr"
   [(set (match_operand:DF 0 "fr_register_operand" "")
         (sqrt:DF (match_operand:DF 1 "fr_register_operand" "")))]
-  "TARGET_INLINE_SQRT"
+  "GCC_OPTION (TARGET_INLINE_SQRT)"
 {
   rtx y         = gen_reg_rtx (RFmode);
   rtx b         = gen_reg_rtx (RFmode);
@@ -1153,7 +1153,7 @@
 (define_expand "sqrtxf2"
   [(set (match_operand:XF 0 "fr_register_operand" "")
         (sqrt:XF (match_operand:XF 1 "fr_register_operand" "")))]
-  "TARGET_INLINE_SQRT"
+  "GCC_OPTION (TARGET_INLINE_SQRT)"
 {
   rtx y         = gen_reg_rtx (RFmode);
   rtx b         = gen_reg_rtx (RFmode);
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 41adc4a..45906d3 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -2662,7 +2662,7 @@ ia64_compute_frame_size (HOST_WIDE_INT size)
     mark_reg_gr_used_mask (cfun->machine->ia64_eh_epilogue_bsp, NULL);
 
   /* Static stack checking uses r2 and r3.  */
-  if (flag_stack_check == STATIC_BUILTIN_STACK_CHECK)
+  if (GCC_OPTION (flag_stack_check) == STATIC_BUILTIN_STACK_CHECK)
     current_frame_info.gr_used_mask |= 0xc;
 
   /* Find the size of the register stack frame.  We have only 80 local
@@ -3455,10 +3455,10 @@ ia64_expand_prologue (void)
   ia64_compute_frame_size (get_frame_size ());
   last_scratch_gr_reg = 15;
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = current_frame_info.total_size;
 
-  if (flag_stack_check == STATIC_BUILTIN_STACK_CHECK)
+  if (GCC_OPTION (flag_stack_check) == STATIC_BUILTIN_STACK_CHECK)
     {
       HOST_WIDE_INT size = current_frame_info.total_size;
       int bs_size = BACKING_STORE_SIZE (current_frame_info.n_input_regs
@@ -3496,7 +3496,7 @@ ia64_expand_prologue (void)
   /* If there is no epilogue, then we don't need some prologue insns.
      We need to avoid emitting the dead prologue insns, because flow
      will complain about them.  */
-  if (optimize)
+  if (GCC_OPTION (optimize))
     {
       edge e;
       edge_iterator ei;
@@ -5967,7 +5967,7 @@ ia64_option_override (void)
   unsigned int i;
   cl_deferred_option *opt;
   vec<cl_deferred_option> *v
-    = (vec<cl_deferred_option> *) ia64_deferred_options;
+    = (vec<cl_deferred_option> *) GCC_OPTION (ia64_deferred_options);
 
   if (v)
     FOR_EACH_VEC_ELT (*v, i, opt)
@@ -5984,28 +5984,28 @@ ia64_option_override (void)
       }
 
   if (TARGET_AUTO_PIC)
-    target_flags |= MASK_CONST_GP;
+    GCC_OPTION (target_flags) |= MASK_CONST_GP;
 
   /* Numerous experiment shows that IRA based loop pressure
      calculation works better for RTL loop invariant motion on targets
      with enough (>= 32) registers.  It is an expensive optimization.
      So it is on only for peak performance.  */
-  if (optimize >= 3)
-    flag_ira_loop_pressure = 1;
+  if (GCC_OPTION (optimize) >= 3)
+    GCC_OPTION (flag_ira_loop_pressure) = 1;
 
 
   ia64_section_threshold = (global_options_set.x_g_switch_value
-			    ? g_switch_value
+			    ? GCC_OPTION (g_switch_value)
 			    : IA64_DEFAULT_GVALUE);
 
   init_machine_status = ia64_init_machine_status;
 
-  if (align_functions <= 0)
-    align_functions = 64;
-  if (align_loops <= 0)
-    align_loops = 32;
+  if (GCC_OPTION (align_functions) <= 0)
+    GCC_OPTION (align_functions) = 64;
+  if (GCC_OPTION (align_loops) <= 0)
+    GCC_OPTION (align_loops) = 32;
   if (TARGET_ABI_OPEN_VMS)
-    flag_no_common = 1;
+    GCC_OPTION (flag_no_common) = 1;
 
   ia64_override_options_after_change();
 }
@@ -6015,24 +6015,24 @@ ia64_option_override (void)
 static void
 ia64_override_options_after_change (void)
 {
-  if (optimize >= 3
+  if (GCC_OPTION (optimize) >= 3
       && !global_options_set.x_flag_selective_scheduling
       && !global_options_set.x_flag_selective_scheduling2)
     {
-      flag_selective_scheduling2 = 1;
-      flag_sel_sched_pipelining = 1;
+      GCC_OPTION (flag_selective_scheduling2) = 1;
+      GCC_OPTION (flag_sel_sched_pipelining) = 1;
     }
-  if (mflag_sched_control_spec == 2)
+  if (GCC_OPTION (mflag_sched_control_spec) == 2)
     {
       /* Control speculation is on by default for the selective scheduler,
          but not for the Haifa scheduler.  */
-      mflag_sched_control_spec = flag_selective_scheduling2 ? 1 : 0;
+      GCC_OPTION (mflag_sched_control_spec) = GCC_OPTION (flag_selective_scheduling2) ? 1 : 0;
     }
-  if (flag_sel_sched_pipelining && flag_auto_inc_dec)
+  if (GCC_OPTION (flag_sel_sched_pipelining) && GCC_OPTION (flag_auto_inc_dec))
     {
       /* FIXME: remove this when we'd implement breaking autoinsns as
          a transformation.  */
-      flag_auto_inc_dec = 0;
+      GCC_OPTION (flag_auto_inc_dec) = 0;
     }
 }
 
@@ -7199,7 +7199,7 @@ ia64_adjust_cost_2 (rtx insn, int dep_type1, rtx dep_insn, int cost, dw_t dw)
   else if (dw > MIN_DEP_WEAK)
     {
       /* Store and load are less likely to alias.  */
-      if (mflag_sched_fp_mem_deps_zero_cost && dep_class == ITANIUM_CLASS_STF)
+      if (GCC_OPTION (mflag_sched_fp_mem_deps_zero_cost) && dep_class == ITANIUM_CLASS_STF)
 	/* Assume there will be no cache conflict for floating-point data.
 	   For integer data, L1 conflict penalty is huge (17 cycles), so we
 	   never assume it will not cause a conflict.  */
@@ -7446,7 +7446,7 @@ ia64_dfa_sched_reorder (FILE *dump, int sched_verbose, rtx *ready,
     }
 
   current_cycle = clock_var;
-  if (reload_completed && mem_ops_in_group[clock_var % 4] >= ia64_max_memory_insns)
+  if (reload_completed && mem_ops_in_group[clock_var % 4] >= GCC_OPTION (ia64_max_memory_insns))
     {
       int moved = 0;
 
@@ -7541,9 +7541,9 @@ ia64_first_cycle_multipass_dfa_lookahead_guard (rtx insn)
   return ((!reload_completed
 	   || !safe_group_barrier_needed (insn))
 	  && ia64_first_cycle_multipass_dfa_lookahead_guard_spec (insn)
-	  && (!mflag_sched_mem_insns_hard_limit
+	  && (!GCC_OPTION (mflag_sched_mem_insns_hard_limit)
 	      || !is_load_p (insn)
-	      || mem_ops_in_group[current_cycle % 4] < ia64_max_memory_insns));
+	      || mem_ops_in_group[current_cycle % 4] < GCC_OPTION (ia64_max_memory_insns)));
 }
 
 /* We are choosing insn from the ready queue.  Return nonzero if INSN
@@ -7605,7 +7605,7 @@ ia64_dfa_new_cycle (FILE *dump, int verbose, rtx insn, int last_clock,
 
   if ((reload_completed
        && (safe_group_barrier_needed (insn)
-	   || (mflag_sched_stop_bits_after_every_cycle
+	   || (GCC_OPTION (mflag_sched_stop_bits_after_every_cycle)
 	       && last_clock != clock
 	       && last_scheduled_insn
 	       && scheduled_good_insn (last_scheduled_insn))))
@@ -7911,24 +7911,24 @@ ia64_set_sched_flags (spec_info_t spec_info)
     {
       int mask = 0;
 
-      if ((mflag_sched_br_data_spec && !reload_completed && optimize > 0)
-          || (mflag_sched_ar_data_spec && reload_completed))
+      if ((GCC_OPTION (mflag_sched_br_data_spec) && !reload_completed && GCC_OPTION (optimize) > 0)
+          || (GCC_OPTION (mflag_sched_ar_data_spec) && reload_completed))
 	{
 	  mask |= BEGIN_DATA;
 
 	  if (!sel_sched_p ()
-	      && ((mflag_sched_br_in_data_spec && !reload_completed)
-		  || (mflag_sched_ar_in_data_spec && reload_completed)))
+	      && ((GCC_OPTION (mflag_sched_br_in_data_spec) && !reload_completed)
+		  || (GCC_OPTION (mflag_sched_ar_in_data_spec) && reload_completed)))
 	    mask |= BE_IN_DATA;
 	}
       
-      if (mflag_sched_control_spec
+      if (GCC_OPTION (mflag_sched_control_spec)
           && (!sel_sched_p ()
 	      || reload_completed))
 	{
 	  mask |= BEGIN_CONTROL;
 	  
-	  if (!sel_sched_p () && mflag_sched_in_control_spec)
+	  if (!sel_sched_p () && GCC_OPTION (mflag_sched_in_control_spec))
 	    mask |= BE_IN_CONTROL;
 	}
 
@@ -7943,15 +7943,15 @@ ia64_set_sched_flags (spec_info_t spec_info)
 	  
 	  spec_info->flags = 0;
       
-	  if ((mask & DATA_SPEC) && mflag_sched_prefer_non_data_spec_insns)
+	  if ((mask & DATA_SPEC) && GCC_OPTION (mflag_sched_prefer_non_data_spec_insns))
 	    spec_info->flags |= PREFER_NON_DATA_SPEC;
 
 	  if (mask & CONTROL_SPEC)
 	    {
-	      if (mflag_sched_prefer_non_control_spec_insns)
+	      if (GCC_OPTION (mflag_sched_prefer_non_control_spec_insns))
 		spec_info->flags |= PREFER_NON_CONTROL_SPEC;
 
-	      if (sel_sched_p () && mflag_sel_sched_dont_check_control_spec)
+	      if (sel_sched_p () && GCC_OPTION (mflag_sel_sched_dont_check_control_spec))
 		spec_info->flags |= SEL_SCHED_SPEC_DONT_CHECK_CONTROL;
 	    }
 
@@ -7960,7 +7960,7 @@ ia64_set_sched_flags (spec_info_t spec_info)
 	  else
 	    spec_info->dump = 0;
 	  
-	  if (mflag_sched_count_spec_in_critical_path)
+	  if (GCC_OPTION (mflag_sched_count_spec_in_critical_path))
 	    spec_info->flags |= COUNT_SPEC_IN_CRITICAL_PATH;
 	}
     }
@@ -8326,7 +8326,7 @@ get_spec_check_gen_function (ds_t ts, int mode_no,
 
       if (simple_check_p)
 	{
-	  gcc_assert (mflag_sched_spec_ldc);
+	  gcc_assert (GCC_OPTION (mflag_sched_spec_ldc));
 
 	  if (clearing_check_p)
 	    gen_check = gen_ld_c_clr;
@@ -8371,11 +8371,11 @@ static bool
 ia64_needs_block_p (ds_t ts)
 {
   if (ts & BEGIN_DATA)
-    return !mflag_sched_spec_ldc;
+    return !GCC_OPTION (mflag_sched_spec_ldc);
 
   gcc_assert ((ts & BEGIN_CONTROL) != 0);
 
-  return !(mflag_sched_spec_control_ldc && mflag_sched_spec_ldc);
+  return !(GCC_OPTION (mflag_sched_spec_control_ldc) && GCC_OPTION (mflag_sched_spec_ldc));
 }
 
 /* Generate (or regenerate) a recovery check for INSN.  */
@@ -9427,7 +9427,7 @@ final_emit_insn_group_barriers (FILE *dump ATTRIBUTE_UNUSED)
 	      need_barrier_p = 0;
 	    }
 	  else if (need_barrier_p || group_barrier_needed (insn)
-		   || (mflag_sched_stop_bits_after_every_cycle
+		   || (GCC_OPTION (mflag_sched_stop_bits_after_every_cycle)
 		       && GET_MODE (insn) == TImode
 		       && seen_good_insn))
 	    {
@@ -9676,10 +9676,10 @@ ia64_reorg (void)
   compute_bb_for_insn ();
 
   /* If optimizing, we'll have split before scheduling.  */
-  if (optimize == 0)
+  if (GCC_OPTION (optimize) == 0)
     split_all_insns ();
 
-  if (optimize && flag_schedule_insns_after_reload
+  if (GCC_OPTION (optimize) && GCC_OPTION (flag_schedule_insns_after_reload)
       && dbg_cnt (ia64_sched2))
     {
       basic_block bb;
@@ -9698,7 +9698,7 @@ ia64_reorg (void)
       clocks_length = get_max_uid () + 1;
       stops_p = XCNEWVEC (char, clocks_length);
 
-      if (ia64_tune == PROCESSOR_ITANIUM2)
+      if (GCC_OPTION (ia64_tune) == PROCESSOR_ITANIUM2)
 	{
 	  pos_1 = get_cpu_unit_code ("2_1");
 	  pos_2 = get_cpu_unit_code ("2_2");
@@ -9757,7 +9757,7 @@ ia64_reorg (void)
 	  _1mlx_ = get_cpu_unit_code ("1b_1mlx.");
 	}
 
-      if (flag_selective_scheduling2
+      if (GCC_OPTION (flag_selective_scheduling2)
 	  && !maybe_skip_selective_scheduling ())
         run_selective_scheduling ();
       else
@@ -9815,7 +9815,7 @@ ia64_reorg (void)
 
   emit_predicate_relation_info ();
 
-  if (flag_var_tracking)
+  if (GCC_OPTION (flag_var_tracking))
     {
       timevar_push (TV_VAR_TRACKING);
       variable_tracking_main ();
@@ -10686,7 +10686,7 @@ ia64_hpux_reloc_rw_mask (void)
 static int
 ia64_reloc_rw_mask (void)
 {
-  return flag_pic ? 3 : 2;
+  return GCC_OPTION (flag_pic) ? 3 : 2;
 }
 
 /* Return the section to use for X.  The only special thing we do here
diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index dd14b8a..1b6ed50 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -65,9 +65,9 @@ extern unsigned int ia64_section_threshold;
 #define TARGET_HAVE_TLS true
 #endif
 
-#define TARGET_TLS14		(ia64_tls_size == 14)
-#define TARGET_TLS22		(ia64_tls_size == 22)
-#define TARGET_TLS64		(ia64_tls_size == 64)
+#define TARGET_TLS14		(GCC_OPTION (ia64_tls_size) == 14)
+#define TARGET_TLS22		(GCC_OPTION (ia64_tls_size) == 22)
+#define TARGET_TLS64		(GCC_OPTION (ia64_tls_size) == 64)
 
 #define TARGET_HPUX		0
 #define TARGET_HPUX_LD		0
diff --git a/gcc/config/ia64/ia64.md b/gcc/config/ia64/ia64.md
index 5fedc92..f51dc01 100644
--- a/gcc/config/ia64/ia64.md
+++ b/gcc/config/ia64/ia64.md
@@ -120,7 +120,7 @@
 ;; Processor type.  This attribute must exactly match the processor_type
 ;; enumeration in ia64.h.
 (define_attr "cpu" "itanium,itanium2"
-  (const (symbol_ref "((enum attr_cpu) ia64_tune)")))
+  (const (symbol_ref "((enum attr_cpu) GCC_OPTION (ia64_tune))")))
 
 ;; Instruction type.  This primarily determines how instructions can be
 ;; packed in bundles, and secondarily affects scheduling to function units.
diff --git a/gcc/config/ia64/predicates.md b/gcc/config/ia64/predicates.md
index 989c550..0c6c2e0 100644
--- a/gcc/config/ia64/predicates.md
+++ b/gcc/config/ia64/predicates.md
@@ -572,7 +572,7 @@
 ;; then we can use the FP unordered-signaling instructions to implement the
 ;; FP unordered-quiet comparison predicates.
 (define_predicate "ia64_cbranch_operator"
-  (if_then_else (match_test "flag_trapping_math")
+  (if_then_else (match_test "GCC_OPTION (flag_trapping_math)")
 		(ior (match_operand 0 "ordered_comparison_operator")
 		      (match_code "ordered,unordered"))
 		(and (match_operand 0 "comparison_operator")
diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c
index ed7aecb..a726dbb 100644
--- a/gcc/config/iq2000/iq2000.c
+++ b/gcc/config/iq2000/iq2000.c
@@ -1094,7 +1094,7 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype,
   tree param;
   tree next_param;
 
-  if (TARGET_DEBUG_D_MODE)
+  if (GCC_OPTION (TARGET_DEBUG_D_MODE))
     {
       fprintf (stderr,
 	       "\ninit_cumulative_args, fntype = 0x%.8lx", (long) fntype);
@@ -1137,7 +1137,7 @@ iq2000_function_arg_advance (cumulative_args_t cum_v, enum machine_mode mode,
 {
   CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
 
-  if (TARGET_DEBUG_D_MODE)
+  if (GCC_OPTION (TARGET_DEBUG_D_MODE))
     {
       fprintf (stderr,
 	       "function_adv({gp reg found = %d, arg # = %2d, words = %2d}, %4s, ",
@@ -1216,7 +1216,7 @@ iq2000_function_arg (cumulative_args_t cum_v, enum machine_mode mode,
 		      || TREE_CODE (type) == UNION_TYPE
 		      || TREE_CODE (type) == QUAL_UNION_TYPE));
 
-  if (TARGET_DEBUG_D_MODE)
+  if (GCC_OPTION (TARGET_DEBUG_D_MODE))
     {
       fprintf (stderr,
 	       "function_arg( {gp reg found = %d, arg # = %2d, words = %2d}, %4s, ",
@@ -1271,7 +1271,7 @@ iq2000_function_arg (cumulative_args_t cum_v, enum machine_mode mode,
 
   if (*arg_words >= (unsigned) MAX_ARGS_IN_REGISTERS)
     {
-      if (TARGET_DEBUG_D_MODE)
+      if (GCC_OPTION (TARGET_DEBUG_D_MODE))
 	fprintf (stderr, "<stack>%s\n", struct_p ? ", [struct]" : "");
 
       ret = 0;
@@ -1348,7 +1348,7 @@ iq2000_function_arg (cumulative_args_t cum_v, enum machine_mode mode,
 	    }
 	}
 
-      if (TARGET_DEBUG_D_MODE)
+      if (GCC_OPTION (TARGET_DEBUG_D_MODE))
 	fprintf (stderr, "%s%s\n", reg_names[regbase + *arg_words + bias],
 		 struct_p ? ", [struct]" : "");
     }
@@ -1388,7 +1388,7 @@ iq2000_arg_partial_bytes (cumulative_args_t cum_v, enum machine_mode mode,
 
   if (mode == DImode && cum->arg_words == MAX_ARGS_IN_REGISTERS - 1)
     {
-      if (TARGET_DEBUG_D_MODE)
+      if (GCC_OPTION (TARGET_DEBUG_D_MODE))
 	fprintf (stderr, "iq2000_arg_partial_bytes=%d\n", UNITS_PER_WORD);
       return UNITS_PER_WORD;
     }
@@ -1432,7 +1432,7 @@ iq2000_init_machine_status (void)
 static void
 iq2000_option_override (void)
 {
-  target_flags &= ~MASK_GPOPT;
+  GCC_OPTION (target_flags) &= ~MASK_GPOPT;
 
   iq2000_isa = IQ2000_ISA_DEFAULT;
 
@@ -1659,7 +1659,7 @@ compute_frame_size (HOST_WIDE_INT size)
   /* The gp reg is caller saved, so there is no need for leaf routines 
      (total_size == extra_size) to save the gp reg.  */
   if (total_size == extra_size
-      && ! profile_flag)
+      && ! GCC_OPTION (profile_flag))
     total_size = extra_size = 0;
 
   total_size += IQ2000_STACK_ALIGN (crtl->args.pretend_args_size);
@@ -2138,7 +2138,7 @@ iq2000_can_use_return_insn (void)
   if (! reload_completed)
     return 0;
 
-  if (df_regs_ever_live_p (31) || profile_flag)
+  if (df_regs_ever_live_p (31) || GCC_OPTION (profile_flag))
     return 0;
 
   if (cfun->machine->initialized)
@@ -2170,7 +2170,7 @@ static section *
 iq2000_select_section (tree decl, int reloc ATTRIBUTE_UNUSED,
 		       unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED)
 {
-  if (TARGET_EMBEDDED_DATA)
+  if (GCC_OPTION (TARGET_EMBEDDED_DATA))
     {
       /* For embedded applications, always put an object in read-only data
 	 if possible, in order to reduce RAM usage.  */
diff --git a/gcc/config/iq2000/iq2000.h b/gcc/config/iq2000/iq2000.h
index 602898a..7495981 100644
--- a/gcc/config/iq2000/iq2000.h
+++ b/gcc/config/iq2000/iq2000.h
@@ -580,7 +580,7 @@ enum delay_type
 };
 
 /* Recast the cpu class to be the cpu attribute.  */
-#define iq2000_cpu_attr ((enum attr_cpu) iq2000_tune)
+#define iq2000_cpu_attr ((enum attr_cpu) GCC_OPTION (iq2000_tune))
 
 #define BITMASK_UPPER16	((unsigned long) 0xffff << 16)	/* 0xffff0000 */
 #define BITMASK_LOWER16	((unsigned long) 0xffff)	/* 0x0000ffff */
diff --git a/gcc/config/iq2000/iq2000.md b/gcc/config/iq2000/iq2000.md
index f7c7b34..a8cf28a 100644
--- a/gcc/config/iq2000/iq2000.md
+++ b/gcc/config/iq2000/iq2000.md
@@ -510,7 +510,7 @@
   ""
   "
 {
-  if (optimize && GET_CODE (operands[1]) == MEM)
+  if (GCC_OPTION (optimize) && GET_CODE (operands[1]) == MEM)
     operands[1] = force_not_mem (operands[1]);
 
   if (GET_CODE (operands[1]) != MEM)
@@ -540,7 +540,7 @@
   ""
   "
 {
-  if (optimize && GET_CODE (operands[1]) == MEM)
+  if (GCC_OPTION (optimize) && GET_CODE (operands[1]) == MEM)
     operands[1] = force_not_mem (operands[1]);
 
   if (GET_CODE (operands[1]) != MEM)
@@ -572,7 +572,7 @@
   ""
   "
 {
-  if (optimize && GET_CODE (operands[1]) == MEM)
+  if (GCC_OPTION (optimize) && GET_CODE (operands[1]) == MEM)
     operands[1] = force_not_mem (operands[1]);
 
   if (GET_CODE (operands[1]) != MEM)
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
index d38ef81..a551067 100644
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
@@ -33,9 +33,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
 #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
 #else
-#define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
-#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
-#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
+#define OPTION_GLIBC  (GCC_OPTION (linux_libc) == LIBC_GLIBC)
+#define OPTION_UCLIBC (GCC_OPTION (linux_libc) == LIBC_UCLIBC)
+#define OPTION_BIONIC (GCC_OPTION (linux_libc) == LIBC_BIONIC)
 #endif
 
 #define GNU_USER_TARGET_OS_CPP_BUILTINS()			\
diff --git a/gcc/config/lm32/lm32.c b/gcc/config/lm32/lm32.c
index 4f6aba1..2dee6c9 100644
--- a/gcc/config/lm32/lm32.c
+++ b/gcc/config/lm32/lm32.c
@@ -456,7 +456,7 @@ lm32_compute_frame_size (int size)
 	}
     }
   if (df_regs_ever_live_p (RA_REGNUM) || ! crtl->is_leaf
-      || !optimize)
+      || !GCC_OPTION (optimize))
     {
       reg_save_mask |= 1 << RA_REGNUM;
       callee_size += UNITS_PER_WORD;
@@ -724,7 +724,7 @@ lm32_option_override (void)
 {
   /* We must have sign-extend enabled if barrel-shift isn't.  */
   if (!TARGET_BARREL_SHIFT_ENABLED && !TARGET_SIGN_EXTEND_ENABLED)
-    target_flags |= MASK_SIGN_EXTEND_ENABLED;
+    GCC_OPTION (target_flags) |= MASK_SIGN_EXTEND_ENABLED;
 }
 
 /* Return nonzero if this function is known to have a null epilogue.
@@ -763,7 +763,7 @@ lm32_return_addr_rtx (int count, rtx frame)
 	  set_mem_alias_set (r, get_frame_alias_set ());
 	}
     }
-  else if (flag_omit_frame_pointer)
+  else if (GCC_OPTION (flag_omit_frame_pointer))
     r = NULL_RTX;
   else
     {
@@ -800,7 +800,7 @@ lm32_in_small_data_p (const_tree exp)
 
       /* If this is an incomplete type with size 0, then we can't put it
          in sdata because it might be too big when completed.  */
-      if (size > 0 && size <= g_switch_value)
+      if (size > 0 && size <= GCC_OPTION (g_switch_value))
 	return true;
     }
 
@@ -1152,7 +1152,7 @@ lm32_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED,
 
 	case MEM:
 	case SET:
-	  if (g_switch_value)
+	  if (GCC_OPTION (g_switch_value))
 	    {
 	      *total = COSTS_N_INSNS (0);
 	      return true;
diff --git a/gcc/config/lm32/lm32.h b/gcc/config/lm32/lm32.h
index e4db519..b253884 100644
--- a/gcc/config/lm32/lm32.h
+++ b/gcc/config/lm32/lm32.h
@@ -374,9 +374,9 @@ enum reg_class
 /* PIC.  */
 /*-------*/
 
-#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? GP_REGNUM : INVALID_REGNUM)
+#define PIC_OFFSET_TABLE_REGNUM (GCC_OPTION (flag_pic) ? GP_REGNUM : INVALID_REGNUM)
 
-#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
+#define JUMP_TABLES_IN_TEXT_SECTION (GCC_OPTION (flag_pic))
 
 #define LEGITIMATE_PIC_OPERAND_P(X)                                    \
 	(!(nonpic_symbol_mentioned_p (X)))
@@ -404,12 +404,12 @@ enum reg_class
 #undef  ASM_OUTPUT_ALIGNED_LOCAL
 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)		\
 do {									\
-  if ((SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value)		\
+  if ((SIZE) <= (unsigned HOST_WIDE_INT) GCC_OPTION (g_switch_value))		\
     switch_to_section (sbss_section);					\
   else									\
     switch_to_section (bss_section);					\
   ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");			\
-  if (!flag_inhibit_size_directive)					\
+  if (!GCC_OPTION (flag_inhibit_size_directive))					\
     ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE);			\
   ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT));	\
   ASM_OUTPUT_LABEL(FILE, NAME);						\
@@ -421,12 +421,12 @@ do {									\
 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)		\
 do 									\
 {									\
-  if ((SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value)		\
+  if ((SIZE) <= (unsigned HOST_WIDE_INT) GCC_OPTION (g_switch_value))		\
     {									\
       switch_to_section (sbss_section);					\
       (*targetm.asm_out.globalize_label) (FILE, NAME);			\
       ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");			\
-      if (!flag_inhibit_size_directive)					\
+      if (!GCC_OPTION (flag_inhibit_size_directive))					\
 	ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE);			\
       ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT));	\
       ASM_OUTPUT_LABEL(FILE, NAME);					\
diff --git a/gcc/config/lm32/lm32.md b/gcc/config/lm32/lm32.md
index 26d1682..254b308 100644
--- a/gcc/config/lm32/lm32.md
+++ b/gcc/config/lm32/lm32.md
@@ -146,7 +146,7 @@
         }
     }
 
-  if (flag_pic && symbolic_operand (operands[1], SImode)) 
+  if (GCC_OPTION (flag_pic) && symbolic_operand (operands[1], SImode)) 
     {
       if (GET_CODE (operands[1]) == LABEL_REF
           || (GET_CODE (operands[1]) == SYMBOL_REF 
@@ -166,7 +166,7 @@
       crtl->uses_pic_offset_table = 1;
       DONE;
     }         
-  else if (flag_pic && GET_CODE (operands[1]) == CONST) 
+  else if (GCC_OPTION (flag_pic) && GET_CODE (operands[1]) == CONST) 
     {
       rtx op = XEXP (operands[1], 0);
       if (GET_CODE (op) == PLUS)
@@ -193,7 +193,7 @@
           DONE;
         }     
     }
-  else if (!flag_pic && reloc_operand (operands[1], GET_MODE (operands[1]))) 
+  else if (!GCC_OPTION (flag_pic) && reloc_operand (operands[1], GET_MODE (operands[1]))) 
     {
       emit_insn (gen_rtx_SET (SImode, operands[0], gen_rtx_HIGH (SImode, operands[1])));
       emit_insn (gen_rtx_SET (SImode, operands[0], gen_rtx_LO_SUM (SImode, operands[0], operands[1])));
@@ -234,7 +234,7 @@
 (define_insn "movsi_got"
   [(set (match_operand:SI 0 "register_operand" "=r")
         (unspec:SI [(match_operand 1 "" "")] UNSPEC_GOT))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "lw       %0, (gp+got(%1))"
   [(set_attr "type" "load")]
 )
@@ -242,7 +242,7 @@
 (define_insn "movsi_gotoff_hi16"
   [(set (match_operand:SI 0 "register_operand" "=r")
         (unspec:SI [(match_operand 1 "" "")] UNSPEC_GOTOFF_HI16))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "orhi     %0, r0, gotoffhi16(%1)"
   [(set_attr "type" "load")]
 )
@@ -251,7 +251,7 @@
   [(set (match_operand:SI 0 "register_operand" "=r")
         (unspec:SI [(plus:SI (match_operand:SI 1 "register_operand" "0")
                              (match_operand 2 "" ""))] UNSPEC_GOTOFF_LO16))]        
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "addi     %0, %1, gotofflo16(%2)"
   [(set_attr "type" "arith")]
 )
@@ -260,7 +260,7 @@
   [(set (match_operand:SI 0 "register_operand" "=r")
         (lo_sum:SI (match_operand:SI 1 "register_operand" "0")
                    (match_operand:SI 2 "reloc_operand" "i")))]
-  "!flag_pic"
+  "!GCC_OPTION (flag_pic)"
   "ori      %0, %0, lo(%2)"
   [(set_attr "type" "arith")]
 )
@@ -674,7 +674,7 @@
   "
 {
   rtx target = operands[0];
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       /* For PIC, the table entry is relative to the start of the table.  */
       rtx label = gen_reg_rtx (SImode);
@@ -838,7 +838,7 @@
 {
   if (!TARGET_BARREL_SHIFT_ENABLED)
     {
-      if (!optimize_size 
+      if (!GCC_OPTION (optimize_size) 
           && satisfies_constraint_L (operands[2])
           && INTVAL (operands[2]) <= 8)
         {
@@ -877,7 +877,7 @@
 {
   if (!TARGET_BARREL_SHIFT_ENABLED)
     {
-      if (!optimize_size 
+      if (!GCC_OPTION (optimize_size) 
           && satisfies_constraint_L (operands[2])
           && INTVAL (operands[2]) <= 8)
         {
@@ -926,7 +926,7 @@
 {
   if (!TARGET_BARREL_SHIFT_ENABLED)
     {
-      if (!optimize_size 
+      if (!GCC_OPTION (optimize_size) 
           && satisfies_constraint_L (operands[2])
           && INTVAL (operands[2]) <= 8)
         {
diff --git a/gcc/config/lm32/predicates.md b/gcc/config/lm32/predicates.md
index ad2e462..4d127f2 100644
--- a/gcc/config/lm32/predicates.md
+++ b/gcc/config/lm32/predicates.md
@@ -63,7 +63,7 @@
 (define_predicate "no_pic_small_symbol"
   (match_code "symbol_ref")
 {
-  return !flag_pic && SYMBOL_REF_SMALL_P (op);
+  return !GCC_OPTION (flag_pic) && SYMBOL_REF_SMALL_P (op);
 })
 
 (define_predicate "call_operand"
diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c
index 57cfb20..9e7ebb6 100644
--- a/gcc/config/m32c/m32c.c
+++ b/gcc/config/m32c/m32c.c
@@ -427,21 +427,21 @@ m32c_option_override (void)
     target_memregs = 16;
 
   if (TARGET_A24)
-    flag_ivopts = 0;
+    GCC_OPTION (flag_ivopts) = 0;
 
   /* This target defaults to strict volatile bitfields.  */
-  if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
-    flag_strict_volatile_bitfields = 1;
+  if (GCC_OPTION (flag_strict_volatile_bitfields) < 0 && abi_version_at_least(2))
+    GCC_OPTION (flag_strict_volatile_bitfields) = 1;
 
   /* r8c/m16c have no 16-bit indirect call, so thunks are involved.
      This is always worse than an absolute call.  */
   if (TARGET_A16)
-    flag_no_function_cse = 1;
+    GCC_OPTION (flag_no_function_cse) = 1;
 
   /* This wants to put insns between compares and their jumps.  */
   /* FIXME: The right solution is to properly trace the flags register
      values, but that is too much work for stage 4.  */
-  flag_combine_stack_adjustments = 0;
+  GCC_OPTION (flag_combine_stack_adjustments) = 0;
 }
 
 #undef TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE
@@ -451,7 +451,7 @@ static void
 m32c_override_options_after_change (void)
 {
   if (TARGET_A16)
-    flag_no_function_cse = 1;
+    GCC_OPTION (flag_no_function_cse) = 1;
 }
 
 /* Defining data structures for per-function information */
diff --git a/gcc/config/m32c/m32c.h b/gcc/config/m32c/m32c.h
index 94865ce..29b8125 100644
--- a/gcc/config/m32c/m32c.h
+++ b/gcc/config/m32c/m32c.h
@@ -89,10 +89,10 @@ extern int ok_to_change_target_memregs;
 /* TARGET_CPU is a multi-way option set in m32c.opt.  While we could
    use enums or defines for this, this and m32c.opt are the only
    places that know (or care) what values are being used.  */
-#define TARGET_R8C	(target_cpu == 'r')
-#define TARGET_M16C	(target_cpu == '6')
-#define TARGET_M32CM	(target_cpu == 'm')
-#define TARGET_M32C	(target_cpu == '3')
+#define TARGET_R8C	(GCC_OPTION (target_cpu) == 'r')
+#define TARGET_M16C	(GCC_OPTION (target_cpu) == '6')
+#define TARGET_M32CM	(GCC_OPTION (target_cpu) == 'm')
+#define TARGET_M32C	(GCC_OPTION (target_cpu) == '3')
 
 /* Address register sizes.  Warning: these are used all over the place
    to select between the two CPU families in general.  */
diff --git a/gcc/config/m32r/m32r-opts.h b/gcc/config/m32r/m32r-opts.h
index db9886f..90be480 100644
--- a/gcc/config/m32r/m32r-opts.h
+++ b/gcc/config/m32r/m32r-opts.h
@@ -43,13 +43,13 @@
 
 enum m32r_model { M32R_MODEL_SMALL, M32R_MODEL_MEDIUM, M32R_MODEL_LARGE };
 
-#define TARGET_MODEL_SMALL  (m32r_model_selected == M32R_MODEL_SMALL)
-#define TARGET_MODEL_MEDIUM (m32r_model_selected == M32R_MODEL_MEDIUM)
-#define TARGET_MODEL_LARGE  (m32r_model_selected == M32R_MODEL_LARGE)
-#define TARGET_ADDR24       (m32r_model_selected == M32R_MODEL_SMALL)
+#define TARGET_MODEL_SMALL  (GCC_OPTION (m32r_model_selected) == M32R_MODEL_SMALL)
+#define TARGET_MODEL_MEDIUM (GCC_OPTION (m32r_model_selected) == M32R_MODEL_MEDIUM)
+#define TARGET_MODEL_LARGE  (GCC_OPTION (m32r_model_selected) == M32R_MODEL_LARGE)
+#define TARGET_ADDR24       (GCC_OPTION (m32r_model_selected) == M32R_MODEL_SMALL)
 #define TARGET_ADDR32       (! TARGET_ADDR24)
 #define TARGET_CALL26       (! TARGET_CALL32)
-#define TARGET_CALL32       (m32r_model_selected == M32R_MODEL_LARGE)
+#define TARGET_CALL32       (GCC_OPTION (m32r_model_selected) == M32R_MODEL_LARGE)
 
 /* The default is the small model.  */
 #ifndef M32R_MODEL_DEFAULT
@@ -95,9 +95,9 @@ enum m32r_model { M32R_MODEL_SMALL, M32R_MODEL_MEDIUM, M32R_MODEL_LARGE };
 
 enum m32r_sdata { M32R_SDATA_NONE, M32R_SDATA_SDATA, M32R_SDATA_USE };
 
-#define TARGET_SDATA_NONE  (m32r_sdata_selected == M32R_SDATA_NONE)
-#define TARGET_SDATA_SDATA (m32r_sdata_selected == M32R_SDATA_SDATA)
-#define TARGET_SDATA_USE   (m32r_sdata_selected == M32R_SDATA_USE)
+#define TARGET_SDATA_NONE  (GCC_OPTION (m32r_sdata_selected) == M32R_SDATA_NONE)
+#define TARGET_SDATA_SDATA (GCC_OPTION (m32r_sdata_selected) == M32R_SDATA_SDATA)
+#define TARGET_SDATA_USE   (GCC_OPTION (m32r_sdata_selected) == M32R_SDATA_USE)
 
 /* Default is to disable the SDA
    [for upward compatibility with previous toolchains].  */
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index 83bc3a7..da35899 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -219,7 +219,7 @@ m32r_init (void)
 
   /* Provide default value if not specified.  */
   if (!global_options_set.x_g_switch_value)
-    g_switch_value = SDATA_DEFAULT_SIZE;
+    GCC_OPTION (g_switch_value) = SDATA_DEFAULT_SIZE;
 }
 
 static void
@@ -481,7 +481,7 @@ m32r_in_small_data_p (const_tree decl)
 	{
 	  int size = int_size_in_bytes (TREE_TYPE (decl));
 
-	  if (size > 0 && size <= g_switch_value)
+	  if (size > 0 && size <= GCC_OPTION (g_switch_value))
 	    return true;
 	}
     }
@@ -534,7 +534,7 @@ addr24_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
 {
   rtx sym;
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     return 0;
 
   if (GET_CODE (op) == LABEL_REF)
@@ -577,7 +577,7 @@ addr32_operand (rtx op, enum machine_mode mode)
 	   && GET_CODE (XEXP (op, 0)) == PLUS
 	   && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF
 	   && CONST_INT_P (XEXP (XEXP (op, 0), 1))
-	   && ! flag_pic)
+	   && ! GCC_OPTION (flag_pic))
     sym = XEXP (XEXP (op, 0), 0);
   else
     return 0;
@@ -591,7 +591,7 @@ addr32_operand (rtx op, enum machine_mode mode)
 int
 call26_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     return 1;
 
   if (GET_CODE (op) == SYMBOL_REF)
@@ -1540,7 +1540,7 @@ m32r_compute_frame_size (int size)	/* # of var. bytes allocated.  */
   unsigned int gmask;
   enum m32r_function_type fn_type;
   int interrupt_p;
-  int pic_reg_used = flag_pic && (crtl->uses_pic_offset_table
+  int pic_reg_used = GCC_OPTION (flag_pic) && (crtl->uses_pic_offset_table
                                   | crtl->profile);
 
   var_size	= M32R_STACK_ALIGN (size);
@@ -1651,7 +1651,7 @@ m32r_expand_prologue (void)
   int regno;
   int frame_size;
   unsigned int gmask;
-  int pic_reg_used = flag_pic && (crtl->uses_pic_offset_table
+  int pic_reg_used = GCC_OPTION (flag_pic) && (crtl->uses_pic_offset_table
                                   | crtl->profile);
 
   if (! current_frame_info.initialized)
@@ -1799,7 +1799,7 @@ m32r_expand_epilogue (void)
       unsigned int gmask = current_frame_info.gmask;
       int can_trust_sp_p = !cfun->calls_alloca;
 
-      if (flag_exceptions)
+      if (GCC_OPTION (flag_exceptions))
         emit_insn (gen_blockage ());
 
       /* The first thing to do is point the sp at the bottom of the register
@@ -2004,7 +2004,7 @@ static rtx
 m32r_legitimize_address (rtx x, rtx orig_x ATTRIBUTE_UNUSED,
 			 enum machine_mode mode ATTRIBUTE_UNUSED)
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     return m32r_legitimize_pic_address (x, NULL_RTX);
   else
     return x;
@@ -2039,10 +2039,10 @@ m32r_file_start (void)
 {
   default_file_start ();
 
-  if (flag_verbose_asm)
+  if (GCC_OPTION (flag_verbose_asm))
     fprintf (asm_out_file,
 	     "%s M32R/D special options: -G %d\n",
-	     ASM_COMMENT_START, g_switch_value);
+	     ASM_COMMENT_START, GCC_OPTION (g_switch_value));
 
   if (TARGET_LITTLE_ENDIAN)
     fprintf (asm_out_file, "\t.little\n");
@@ -2525,7 +2525,7 @@ m32r_expand_block_move (rtx operands[])
   /* If we prefer size over speed, always use a function call.
      If we do not know the size, use a function call.
      If the blocks are not word aligned, use a function call.  */
-  if (optimize_size || ! constp || align != UNITS_PER_WORD)
+  if (GCC_OPTION (optimize_size) || ! constp || align != UNITS_PER_WORD)
     {
       block_move_call (dst_reg, src_reg, bytes_rtx);
       return 0;
@@ -2780,12 +2780,12 @@ m32r_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
   emit_move_insn (adjust_address (m_tramp, SImode, 20),
 		  XEXP (DECL_RTL (fndecl), 0));
 
-  if (m32r_cache_flush_trap >= 0)
+  if (GCC_OPTION (m32r_cache_flush_trap) >= 0)
     emit_insn (gen_flush_icache
 	       (validize_mem (adjust_address (m_tramp, SImode, 0)),
-		gen_int_mode (m32r_cache_flush_trap, SImode)));
-  else if (m32r_cache_flush_func && m32r_cache_flush_func[0])
-    emit_library_call (m32r_function_symbol (m32r_cache_flush_func),
+		gen_int_mode (GCC_OPTION (m32r_cache_flush_trap), SImode)));
+  else if (GCC_OPTION (m32r_cache_flush_func) && GCC_OPTION (m32r_cache_flush_func)[0])
+    emit_library_call (m32r_function_symbol (GCC_OPTION (m32r_cache_flush_func)),
 		       LCT_NORMAL, VOIDmode, 3, XEXP (m_tramp, 0), Pmode,
 		       gen_int_mode (TRAMPOLINE_SIZE, SImode), SImode,
 		       GEN_INT (3), SImode);
@@ -2895,7 +2895,7 @@ m32r_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
 static void
 m32r_conditional_register_usage (void)
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;
       call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;
diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h
index 4851379..61e8f19 100644
--- a/gcc/config/m32r/m32r.h
+++ b/gcc/config/m32r/m32r.h
@@ -678,7 +678,7 @@ extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER];
 #define FUNCTION_PROFILER(FILE, LABELNO)			\
   do								\
     {								\
-      if (flag_pic)						\
+      if (GCC_OPTION (flag_pic))						\
 	{							\
 	  fprintf (FILE, "\tld24 r14,#mcount\n");		\
 	  fprintf (FILE, "\tadd r14,r12\n");			\
@@ -743,7 +743,7 @@ L2:     .word STATIC
    ||  GET_CODE (X) == SYMBOL_REF \
    ||  CONST_INT_P (X)  \
    || (GET_CODE (X) == CONST      \
-       && ! (flag_pic && ! m32r_legitimate_pic_operand_p (X))))
+       && ! (GCC_OPTION (flag_pic) && ! m32r_legitimate_pic_operand_p (X))))
 
 /* Condition code usage.  */
 
@@ -779,7 +779,7 @@ L2:     .word STATIC
    output in the text section, along with the assembler instructions.
    Otherwise, the readonly data section is used.
    This macro is irrelevant if there is no separate readonly data section.  */
-#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
+#define JUMP_TABLES_IN_TEXT_SECTION (GCC_OPTION (flag_pic))
 
 /* Position Independent Code.  */
 
@@ -928,9 +928,9 @@ L2:     .word STATIC
 
    Loop unrolling currently doesn't like this optimization, so
    disable doing if we are unrolling loops and saving space.  */
-#define LOOP_TEST_THRESHOLD (optimize_size				\
-			     && !flag_unroll_loops			\
-			     && !flag_unroll_all_loops ? 2 : 30)
+#define LOOP_TEST_THRESHOLD (GCC_OPTION (optimize_size)				\
+			     && !GCC_OPTION (flag_unroll_loops)			\
+			     && !GCC_OPTION (flag_unroll_all_loops) ? 2 : 30)
 
 /* This is how to output an assembler line
    that says to advance the location counter
@@ -958,7 +958,7 @@ L2:     .word STATIC
     {									\
       if (! TARGET_SDATA_NONE						\
 	  && (SIZE) > 0							\
-	  && (SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value)		\
+	  && (SIZE) <= (unsigned HOST_WIDE_INT) GCC_OPTION (g_switch_value))		\
 	fprintf ((FILE), "%s", SCOMMON_ASM_OP);				\
       else								\
 	fprintf ((FILE), "%s", COMMON_ASM_OP);				\
@@ -972,7 +972,7 @@ L2:     .word STATIC
     {									\
       if (! TARGET_SDATA_NONE						\
           && (SIZE) > 0							\
-	  && (SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value)		\
+	  && (SIZE) <= (unsigned HOST_WIDE_INT) GCC_OPTION (g_switch_value))		\
         switch_to_section (get_named_section (NULL, ".sbss", 0));	\
       else								\
         switch_to_section (bss_section);				\
@@ -1000,7 +1000,7 @@ L2:     .word STATIC
 
 /* Specify the machine mode that this machine uses
    for the index in the tablejump instruction.  */
-#define CASE_VECTOR_MODE (flag_pic ? SImode : Pmode)
+#define CASE_VECTOR_MODE (GCC_OPTION (flag_pic) ? SImode : Pmode)
 
 /* Define if operations between registers always perform the operation
    on the full register even if a narrower mode is specified.  */
diff --git a/gcc/config/m32r/m32r.md b/gcc/config/m32r/m32r.md
index 47efb91..cfed5df 100644
--- a/gcc/config/m32r/m32r.md
+++ b/gcc/config/m32r/m32r.md
@@ -235,7 +235,7 @@
   "
 {
   /* Fixup PIC cases.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       if (symbolic_operand (operands[1], QImode))
         {
@@ -275,7 +275,7 @@
   "
 {
   /* Fixup PIC cases.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       if (symbolic_operand (operands[1], HImode))
         {
@@ -327,7 +327,7 @@
   "
 {
   /* Fixup PIC cases.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       if (symbolic_operand (operands[1], SImode))
         {
@@ -569,7 +569,7 @@
   "
 {
   /* Fixup PIC cases.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       if (symbolic_operand (operands[1], DImode))
         {
@@ -610,7 +610,7 @@
   "
 {
   /* Fixup PIC cases.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       if (symbolic_operand (operands[1], SFmode))
         {
@@ -662,7 +662,7 @@
   "
 {
   /* Fixup PIC cases.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       if (symbolic_operand (operands[1], DFmode))
         {
@@ -1028,7 +1028,7 @@
 {
   /* If we are worried about space, see if we can break this up into two
      short instructions, which might eliminate a NOP being inserted.  */
-  if (optimize_size
+  if (GCC_OPTION (optimize_size)
       && m32r_not_same_reg (operands[0], operands[1])
       && satisfies_constraint_I (operands[2]))
     return \"#\";
@@ -1045,7 +1045,7 @@
   [(set (match_operand:SI 0 "register_operand" "")
 	(and:SI (match_operand:SI 1 "register_operand" "")
 		(match_operand:SI 2 "int8_operand" "")))]
-  "optimize_size && m32r_not_same_reg (operands[0], operands[1])"
+  "GCC_OPTION (optimize_size) && m32r_not_same_reg (operands[0], operands[1])"
   [(set (match_dup 0) (match_dup 2))
    (set (match_dup 0) (and:SI (match_dup 0) (match_dup 1)))]
   "")
@@ -1059,7 +1059,7 @@
 {
   /* If we are worried about space, see if we can break this up into two
      short instructions, which might eliminate a NOP being inserted.  */
-  if (optimize_size
+  if (GCC_OPTION (optimize_size)
       && m32r_not_same_reg (operands[0], operands[1])
       && satisfies_constraint_I (operands[2]))
     return \"#\";
@@ -1076,7 +1076,7 @@
   [(set (match_operand:SI 0 "register_operand" "")
 	(ior:SI (match_operand:SI 1 "register_operand" "")
 		(match_operand:SI 2 "int8_operand" "")))]
-  "optimize_size && m32r_not_same_reg (operands[0], operands[1])"
+  "GCC_OPTION (optimize_size) && m32r_not_same_reg (operands[0], operands[1])"
   [(set (match_dup 0) (match_dup 2))
    (set (match_dup 0) (ior:SI (match_dup 0) (match_dup 1)))]
   "")
@@ -1090,7 +1090,7 @@
 {
   /* If we are worried about space, see if we can break this up into two
      short instructions, which might eliminate a NOP being inserted.  */
-  if (optimize_size
+  if (GCC_OPTION (optimize_size)
       && m32r_not_same_reg (operands[0], operands[1])
       && satisfies_constraint_I (operands[2]))
     return \"#\";
@@ -1107,7 +1107,7 @@
   [(set (match_operand:SI 0 "register_operand" "")
 	(xor:SI (match_operand:SI 1 "register_operand" "")
 		(match_operand:SI 2 "int8_operand" "")))]
-  "optimize_size && m32r_not_same_reg (operands[0], operands[1])"
+  "GCC_OPTION (optimize_size) && m32r_not_same_reg (operands[0], operands[1])"
   [(set (match_dup 0) (match_dup 2))
    (set (match_dup 0) (xor:SI (match_dup 0) (match_dup 1)))]
   "")
@@ -1676,7 +1676,7 @@
 	(le:SI (match_operand:SI 1 "register_operand" "")
 	       (match_operand:SI 2 "register_operand" "")))
    (clobber (reg:CC 17))]
-  "!optimize_size"
+  "!GCC_OPTION (optimize_size)"
   [(set (reg:CC 17)
 	(lt:CC (match_dup 2)
 	       (match_dup 1)))
@@ -1694,7 +1694,7 @@
 	(le:SI (match_operand:SI 1 "register_operand" "")
 	       (match_operand:SI 2 "register_operand" "")))
    (clobber (reg:CC 17))]
-  "optimize_size"
+  "GCC_OPTION (optimize_size)"
   [(set (reg:CC 17)
 	(lt:CC (match_dup 2)
 	       (match_dup 1)))
@@ -1722,7 +1722,7 @@
 	(ge:SI (match_operand:SI 1 "register_operand" "")
 	       (match_operand:SI 2 "reg_or_int16_operand" "")))
    (clobber (reg:CC 17))]
-  "!optimize_size"
+  "!GCC_OPTION (optimize_size)"
   [(set (reg:CC 17)
 	(lt:CC (match_dup 1)
 	       (match_dup 2)))
@@ -1740,7 +1740,7 @@
 	(ge:SI (match_operand:SI 1 "register_operand" "")
 	       (match_operand:SI 2 "reg_or_int16_operand" "")))
    (clobber (reg:CC 17))]
-  "optimize_size"
+  "GCC_OPTION (optimize_size)"
   [(set (reg:CC 17)
 	(lt:CC (match_dup 1)
 	       (match_dup 2)))
@@ -1791,7 +1791,7 @@
 	(leu:SI (match_operand:SI 1 "register_operand" "")
 		(match_operand:SI 2 "register_operand" "")))
    (clobber (reg:CC 17))]
-  "!optimize_size"
+  "!GCC_OPTION (optimize_size)"
   [(set (reg:CC 17)
 	(ltu:CC (match_dup 2)
 		(match_dup 1)))
@@ -1809,7 +1809,7 @@
 	(leu:SI (match_operand:SI 1 "register_operand" "")
 		(match_operand:SI 2 "register_operand" "")))
    (clobber (reg:CC 17))]
-  "optimize_size"
+  "GCC_OPTION (optimize_size)"
   [(set (reg:CC 17)
 	(ltu:CC (match_dup 2)
 		(match_dup 1)))
@@ -1837,7 +1837,7 @@
 	(geu:SI (match_operand:SI 1 "register_operand" "")
 		(match_operand:SI 2 "reg_or_int16_operand" "")))
    (clobber (reg:CC 17))]
-  "!optimize_size"
+  "!GCC_OPTION (optimize_size)"
   [(set (reg:CC 17)
 	(ltu:CC (match_dup 1)
 		(match_dup 2)))
@@ -1855,7 +1855,7 @@
 	(geu:SI (match_operand:SI 1 "register_operand" "")
 		(match_operand:SI 2 "reg_or_int16_operand" "")))
    (clobber (reg:CC 17))]
-  "optimize_size"
+  "GCC_OPTION (optimize_size)"
   [(set (reg:CC 17)
 	(ltu:CC (match_dup 1)
 		(match_dup 2)))
@@ -1947,7 +1947,7 @@
   /* In pic mode, our address differences are against the base of the
      table.  Add that base value back in; CSE ought to be able to combine
      the two address loads.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       rtx tmp, tmp2;
 
@@ -1975,7 +1975,7 @@
   ""
   "
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     crtl->uses_pic_offset_table = 1;
 }")
 
@@ -2029,7 +2029,7 @@
   ""
   "
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     crtl->uses_pic_offset_table = 1;
 }")
 
@@ -2053,7 +2053,7 @@
 {
   int call26_p = call26_operand (operands[1], FUNCTION_MODE);
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     crtl->uses_pic_offset_table = 1;
 
   if (! call26_p)
@@ -2241,14 +2241,14 @@
 (define_insn "pic_load_addr"
   [(set (match_operand:SI 0 "register_operand" "=r")
         (unspec:SI [(match_operand 1 "" "")] UNSPEC_PIC_LOAD_ADDR))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "ld24 %0,%#%1"
   [(set_attr "type" "int4")])
 
 (define_insn "gotoff_load_addr"
   [(set (match_operand:SI 0 "register_operand" "=r")
         (unspec:SI [(match_operand 1 "" "")] UNSPEC_GOTOFF))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "seth %0, %#shigh(%1@GOTOFF)\;add3 %0, %0, low(%1@GOTOFF)"
   [(set_attr "type" 	"int4")
    (set_attr "length"	"8")])
@@ -2260,7 +2260,7 @@
    (set (match_operand 0 "register_operand" "=r,r")
         (unspec [(match_operand 1 "" "")] UNSPEC_GET_PC))
    (use (match_operand:SI 2 "immediate_operand" "W,i"))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "@
    bl.s .+4\;seth %0,%#shigh(%1)\;add3 %0,%0,%#low(%1+4)\;add %0,lr
    bl.s .+4\;ld24 %0,%#%1\;add %0,lr"
@@ -2268,7 +2268,7 @@
 
 (define_expand "builtin_setjmp_receiver"
   [(label_ref (match_operand 0 "" ""))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "
 {
   m32r_load_pic_register ();
diff --git a/gcc/config/m32r/predicates.md b/gcc/config/m32r/predicates.md
index dbe11e8..2bfb50f 100644
--- a/gcc/config/m32r/predicates.md
+++ b/gcc/config/m32r/predicates.md
@@ -423,7 +423,7 @@
 (define_predicate "seth_add3_operand"
   (match_code "symbol_ref,label_ref,const")
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     return 0;
 
   if (GET_CODE (op) == SYMBOL_REF
diff --git a/gcc/config/m68k/constraints.md b/gcc/config/m68k/constraints.md
index 8c2acb0..4ac6bed 100644
--- a/gcc/config/m68k/constraints.md
+++ b/gcc/config/m68k/constraints.md
@@ -95,7 +95,7 @@
   "Used for operands that satisfy 's' when -mpcrel is not in effect."
   (and (match_code "symbol_ref,label_ref,const")
        (match_test "!TARGET_PCREL")
-       (match_test "!flag_pic || LEGITIMATE_PIC_OPERAND_P (op)")))
+       (match_test "!GCC_OPTION (flag_pic) || LEGITIMATE_PIC_OPERAND_P (op)")))
 
 (define_memory_constraint "Q"
   "Means address register indirect addressing mode."
diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h
index 5a586f5..5062d56 100644
--- a/gcc/config/m68k/linux.h
+++ b/gcc/config/m68k/linux.h
@@ -133,7 +133,7 @@ along with GCC; see the file COPYING3.  If not see
 #undef FUNCTION_PROFILER
 #define FUNCTION_PROFILER(FILE, LABELNO) \
 {									\
-  if (flag_pic)								\
+  if (GCC_OPTION (flag_pic))								\
     fprintf (FILE, "\tbsr.l _mcount@PLTPC\n");				\
   else									\
     fprintf (FILE, "\tjbsr _mcount\n");					\
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 7f7d668..720b05a 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -449,13 +449,13 @@ m68k_option_override (void)
   unsigned long target_mask;
 
   if (global_options_set.x_m68k_arch_option)
-    m68k_arch_entry = &all_isas[m68k_arch_option];
+    m68k_arch_entry = &all_isas[GCC_OPTION (m68k_arch_option)];
 
   if (global_options_set.x_m68k_cpu_option)
-    m68k_cpu_entry = &all_devices[(int) m68k_cpu_option];
+    m68k_cpu_entry = &all_devices[(int) GCC_OPTION (m68k_cpu_option)];
 
   if (global_options_set.x_m68k_tune_option)
-    m68k_tune_entry = &all_microarchs[(int) m68k_tune_option];
+    m68k_tune_entry = &all_microarchs[(int) GCC_OPTION (m68k_tune_option)];
 
   /* User can choose:
 
@@ -503,7 +503,7 @@ m68k_option_override (void)
     target_mask |= MASK_CF_HWDIV;
   if ((m68k_cpu_flags & (FL_68881 | FL_CF_FPU)) != 0)
     target_mask |= MASK_HARD_FLOAT;
-  target_flags |= target_mask & ~target_flags_explicit;
+  GCC_OPTION (target_flags) |= target_mask & ~target_flags_explicit;
 
   /* Set the directly-usable versions of the -mcpu and -mtune settings.  */
   m68k_cpu = entry->device;
@@ -542,20 +542,20 @@ m68k_option_override (void)
    * -fpic but it hasn't been tested properly.
    */
   if (TARGET_SEP_DATA || TARGET_ID_SHARED_LIBRARY)
-    flag_pic = 2;
+    GCC_OPTION (flag_pic) = 2;
 
   /* -mpcrel -fPIC uses 32-bit pc-relative displacements.  Raise an
      error if the target does not support them.  */
-  if (TARGET_PCREL && !TARGET_68020 && flag_pic == 2)
+  if (TARGET_PCREL && !TARGET_68020 && GCC_OPTION (flag_pic) == 2)
     error ("-mpcrel -fPIC is not currently supported on selected cpu");
 
   /* ??? A historic way of turning on pic, or is this intended to
      be an embedded thing that doesn't have the same name binding
      significance that it does on hosted ELF systems?  */
-  if (TARGET_PCREL && flag_pic == 0)
-    flag_pic = 1;
+  if (TARGET_PCREL && GCC_OPTION (flag_pic) == 0)
+    GCC_OPTION (flag_pic) = 1;
 
-  if (!flag_pic)
+  if (!GCC_OPTION (flag_pic))
     {
       m68k_symbolic_call_var = M68K_SYMBOLIC_CALL_JSR;
 
@@ -581,7 +581,7 @@ m68k_option_override (void)
 	 function call to be done as `bsr foo@PLTPC'.  */
       /* ??? It's traditional to do this for -mpcrel too, but it isn't
 	 clear how intentional that is.  */
-      flag_no_function_cse = 1;
+      GCC_OPTION (flag_no_function_cse) = 1;
     }
 
   switch (m68k_symbolic_call_var)
@@ -607,15 +607,15 @@ m68k_option_override (void)
     }
 
 #ifndef ASM_OUTPUT_ALIGN_WITH_NOP
-  if (align_labels > 2)
+  if (GCC_OPTION (align_labels) > 2)
     {
-      warning (0, "-falign-labels=%d is not supported", align_labels);
-      align_labels = 0;
+      warning (0, "-falign-labels=%d is not supported", GCC_OPTION (align_labels));
+      GCC_OPTION (align_labels) = 0;
     }
-  if (align_loops > 2)
+  if (GCC_OPTION (align_loops) > 2)
     {
-      warning (0, "-falign-loops=%d is not supported", align_loops);
-      align_loops = 0;
+      warning (0, "-falign-loops=%d is not supported", GCC_OPTION (align_loops));
+      GCC_OPTION (align_loops) = 0;
     }
 #endif
 
@@ -639,10 +639,10 @@ m68k_option_override (void)
   else
     {
       m68k_sched_cpu = CPU_UNKNOWN;
-      flag_schedule_insns = 0;
-      flag_schedule_insns_after_reload = 0;
-      flag_modulo_sched = 0;
-      flag_live_range_shrinkage = 0;
+      GCC_OPTION (flag_schedule_insns) = 0;
+      GCC_OPTION (flag_schedule_insns_after_reload) = 0;
+      GCC_OPTION (flag_modulo_sched) = 0;
+      GCC_OPTION (flag_live_range_shrinkage) = 0;
     }
 
   if (m68k_sched_cpu != CPU_UNKNOWN)
@@ -663,10 +663,10 @@ m68k_override_options_after_change (void)
 {
   if (m68k_sched_cpu == CPU_UNKNOWN)
     {
-      flag_schedule_insns = 0;
-      flag_schedule_insns_after_reload = 0;
-      flag_modulo_sched = 0;
-      flag_live_range_shrinkage = 0;
+      GCC_OPTION (flag_schedule_insns) = 0;
+      GCC_OPTION (flag_schedule_insns_after_reload) = 0;
+      GCC_OPTION (flag_modulo_sched) = 0;
+      GCC_OPTION (flag_live_range_shrinkage) = 0;
     }
 }
 
@@ -848,7 +848,7 @@ m68k_initial_elimination_offset (int from, int to)
 static bool
 m68k_save_reg (unsigned int regno, bool interrupt_handler)
 {
-  if (flag_pic && regno == PIC_REG)
+  if (GCC_OPTION (flag_pic) && regno == PIC_REG)
     {
       if (crtl->saves_all_registers)
 	return true;
@@ -972,7 +972,7 @@ m68k_expand_prologue (void)
 
   m68k_compute_frame_layout ();
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size
       = current_frame.size + current_frame.offset;
 
@@ -1776,7 +1776,7 @@ output_btst (rtx *operands, rtx countop, rtx dataop, rtx insn, int signpos)
       /* Try to use `movew to ccr' followed by the appropriate branch insn.
          On some m68k variants unfortunately that's slower than btst.
          On 68000 and higher, that should also work for all HImode operands. */
-      if (TUNE_CPU32 || TARGET_COLDFIRE || optimize_size)
+      if (TUNE_CPU32 || TARGET_COLDFIRE || GCC_OPTION (optimize_size))
 	{
 	  if (count == 3 && DATA_REG_P (operands[1])
 	      && next_insn_tests_no_inequality (insn))
@@ -1907,7 +1907,7 @@ m68k_legitimate_constant_address_p (rtx x, unsigned int reach, bool strict_p)
   if (!CONSTANT_ADDRESS_P (x))
     return false;
 
-  if (flag_pic
+  if (GCC_OPTION (flag_pic)
       && !(strict_p && TARGET_PCREL)
       && symbolic_operand (x, VOIDmode))
     return false;
@@ -2179,7 +2179,7 @@ m68k_wrap_symbol (rtx x, enum m68k_reloc reloc, rtx base_reg, rtx temp_reg)
 {
   bool use_x_p;
 
-  use_x_p = (base_reg == pic_offset_table_rtx) ? TARGET_XGOT : TARGET_XTLS;
+  use_x_p = (base_reg == pic_offset_table_rtx) ? GCC_OPTION (TARGET_XGOT) : TARGET_XTLS;
 
   if (TARGET_COLDFIRE && use_x_p)
     /* When compiling with -mx{got, tls} switch the code will look like this:
@@ -4449,7 +4449,7 @@ print_operand (FILE *file, rtx op, int letter)
   else if (letter == '/')
     asm_fprintf (file, "%R");
   else if (letter == '?')
-    asm_fprintf (file, m68k_library_id_string);
+    asm_fprintf (file, GCC_OPTION (m68k_library_id_string));
   else if (letter == 'p')
     {
       output_addr_const (file, op);
@@ -4526,7 +4526,7 @@ m68k_get_reloc_decoration (enum m68k_reloc reloc)
     case RELOC_GOT:
       if (MOTOROLA)
 	{
-	  if (flag_pic == 1 && TARGET_68020)
+	  if (GCC_OPTION (flag_pic) == 1 && TARGET_68020)
 	    return "@GOT.w";
 	  else
 	    return "@GOT";
@@ -4535,7 +4535,7 @@ m68k_get_reloc_decoration (enum m68k_reloc reloc)
 	{
 	  if (TARGET_68020)
 	    {
-	      switch (flag_pic)
+	      switch (GCC_OPTION (flag_pic))
 		{
 		case 1:
 		  return ":w";
@@ -4700,7 +4700,7 @@ print_operand_address (FILE *file, rtx addr)
 	  /* (d16,PC) or (bd,PC,Xn) (with suppressed index register).  */
 	  fputc ('(', file);
 	  output_addr_const (file, addr);
-	  asm_fprintf (file, flag_pic == 1 ? ":w,%Rpc)" : ":l,%Rpc)");
+	  asm_fprintf (file, GCC_OPTION (flag_pic) == 1 ? ":w,%Rpc)" : ":l,%Rpc)");
 	}
       else
 	{
@@ -5097,7 +5097,7 @@ m68k_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
   mem = DECL_RTL (function);
   if (!sibcall_operand (XEXP (mem, 0), VOIDmode))
     {
-      gcc_assert (flag_pic);
+      gcc_assert (GCC_OPTION (flag_pic));
 
       if (!TARGET_SEP_DATA)
 	{
@@ -5124,7 +5124,7 @@ m68k_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
   reload_completed = 0;
 
   /* Restore the original PIC register.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     SET_REGNO (pic_offset_table_rtx, PIC_REG);
 }
 
@@ -6507,7 +6507,7 @@ m68k_conditional_register_usage (void)
         if (TEST_HARD_REG_BIT (x, i))
 	  fixed_regs[i] = call_used_regs[i] = 1;
     }
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     fixed_regs[PIC_REG] = call_used_regs[PIC_REG] = 1;
 }
 
diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h
index 3a6d1b7..deecb13 100644
--- a/gcc/config/m68k/m68k.h
+++ b/gcc/config/m68k/m68k.h
@@ -339,7 +339,7 @@ along with GCC; see the file COPYING3.  If not see
 
 /* All m68k targets (except AmigaOS) use %a5 as the PIC register  */
 #define PIC_OFFSET_TABLE_REGNUM				\
-  (!flag_pic ? INVALID_REGNUM				\
+  (!GCC_OPTION (flag_pic) ? INVALID_REGNUM				\
    : reload_completed ? REGNO (pic_offset_table_rtx)	\
    : PIC_REG)
 
@@ -839,7 +839,7 @@ do { if (cc_prev_status.flags & CC_IN_68881)			\
    pointer for code and global references.  We still use pc-relative
    references to data, as this avoids a relocation.  */
 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL)			   \
-  (flag_pic								   \
+  (GCC_OPTION (flag_pic)								   \
    && !((TARGET_ID_SHARED_LIBRARY || TARGET_SEP_DATA)			   \
 	&& ((GLOBAL) || (CODE)))					   \
    ? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4 \
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md
index e61048b..04f941f 100644
--- a/gcc/config/m68k/m68k.md
+++ b/gcc/config/m68k/m68k.md
@@ -910,7 +910,7 @@
 
       operands[1] = tmp;
     }
-  else if (flag_pic && !TARGET_PCREL && symbolic_operand (operands[1], SImode))
+  else if (GCC_OPTION (flag_pic) && !TARGET_PCREL && symbolic_operand (operands[1], SImode))
     {
       /* The source is an address which requires PIC relocation.
          Call legitimize_pic_address with the source, mode, and a relocation
@@ -919,7 +919,7 @@
       rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
       operands[1] = legitimize_pic_address (operands[1], SImode, temp);
     }
-  else if (flag_pic && TARGET_PCREL && ! reload_in_progress)
+  else if (GCC_OPTION (flag_pic) && TARGET_PCREL && ! reload_in_progress)
     {
       /* Don't allow writes to memory except via a register;
 	 the m68k doesn't consider PC-relative addresses to be writable.  */
@@ -1405,7 +1405,7 @@
 	  if (! memory_address_p (XFmode, XEXP (operands[1], 0)))
 	    operands[1] = adjust_address (operands[1], XFmode, 0);
 	}
-      if (flag_pic && TARGET_PCREL)
+      if (GCC_OPTION (flag_pic) && TARGET_PCREL)
 	{
 	  /* Don't allow writes to memory except via a register; the
 	     m68k doesn't consider PC-relative addresses to be writable.  */
@@ -7468,7 +7468,7 @@
   [(set (match_operand:FP 0 "nonimmediate_operand" "=f")
 	(unspec:FP
 	  [(match_operand:FP 1 "general_operand" "f<FP:dreg>m")] UNSPEC_SIN))]
-  "TARGET_68881 && flag_unsafe_math_optimizations"
+  "TARGET_68881 && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   if (FP_REG_P (operands[1]))
     return "fsin%.x %1,%0";
@@ -7480,7 +7480,7 @@
   [(set (match_operand:FP 0 "nonimmediate_operand" "=f")
 	(unspec:FP
 	  [(match_operand:FP 1 "general_operand" "f<FP:dreg>m")] UNSPEC_COS))]
-  "TARGET_68881 && flag_unsafe_math_optimizations"
+  "TARGET_68881 && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   if (FP_REG_P (operands[1]))
     return "fcos%.x %1,%0";
diff --git a/gcc/config/m68k/netbsd-elf.h b/gcc/config/m68k/netbsd-elf.h
index be89193..4f18b28 100644
--- a/gcc/config/m68k/netbsd-elf.h
+++ b/gcc/config/m68k/netbsd-elf.h
@@ -80,7 +80,7 @@ along with GCC; see the file COPYING3.  If not see
 do									\
   {									\
     asm_fprintf (FILE, "\tlea (%LLP%d,%Rpc),%Ra1\n", (LABELNO));	\
-    if (flag_pic)							\
+    if (GCC_OPTION (flag_pic))							\
       fprintf (FILE, "\tbsr.l __mcount@PLTPC\n");			\
     else								\
       fprintf (FILE, "\tjbsr __mcount\n");				\
diff --git a/gcc/config/mcore/mcore-elf.h b/gcc/config/mcore/mcore-elf.h
index bf48d64..58aa063 100644
--- a/gcc/config/mcore/mcore-elf.h
+++ b/gcc/config/mcore/mcore-elf.h
@@ -69,7 +69,7 @@ along with GCC; see the file COPYING3.  If not see
         }							\
       ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");		\
       size_directive_output = 0;				\
-      if (!flag_inhibit_size_directive && DECL_SIZE (DECL))	\
+      if (!GCC_OPTION (flag_inhibit_size_directive) && DECL_SIZE (DECL))	\
         {							\
           size_directive_output = 1;				\
 	  size = int_size_in_bytes (TREE_TYPE (DECL));		\
@@ -90,7 +90,7 @@ along with GCC; see the file COPYING3.  If not see
     {                                                                    \
       const char * name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);           \
       HOST_WIDE_INT size;						 \
-      if (!flag_inhibit_size_directive && DECL_SIZE (DECL)               \
+      if (!GCC_OPTION (flag_inhibit_size_directive) && DECL_SIZE (DECL)               \
           && ! AT_END && TOP_LEVEL                                       \
           && DECL_INITIAL (DECL) == error_mark_node                      \
           && !size_directive_output)                                     \
diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c
index b2ac47e..df6738e 100644
--- a/gcc/config/mcore/mcore.c
+++ b/gcc/config/mcore/mcore.c
@@ -242,21 +242,21 @@ static void
 output_stack_adjust (int direction, int size)
 {
   /* If extending stack a lot, we do it incrementally.  */
-  if (direction < 0 && size > mcore_stack_increment && mcore_stack_increment > 0)
+  if (direction < 0 && size > GCC_OPTION (mcore_stack_increment) && GCC_OPTION (mcore_stack_increment) > 0)
     {
       rtx tmp = gen_rtx_REG (SImode, 1);
       rtx memref;
 
-      emit_insn (gen_movsi (tmp, GEN_INT (mcore_stack_increment)));
+      emit_insn (gen_movsi (tmp, GEN_INT (GCC_OPTION (mcore_stack_increment))));
       do
 	{
 	  emit_insn (gen_subsi3 (stack_pointer_rtx, stack_pointer_rtx, tmp));
 	  memref = gen_rtx_MEM (SImode, stack_pointer_rtx);
 	  MEM_VOLATILE_P (memref) = 1;
 	  emit_insn (gen_movsi (memref, stack_pointer_rtx));
-	  size -= mcore_stack_increment;
+	  size -= GCC_OPTION (mcore_stack_increment);
 	}
-      while (size > mcore_stack_increment);
+      while (size > GCC_OPTION (mcore_stack_increment));
 
       /* SIZE is now the residual for the last adjustment,
 	 which doesn't require a probe.  */
@@ -2521,7 +2521,7 @@ conditionalize_block (rtx first)
      blocks larger than size 2 (unlikely for the mcore) when speed is important.
      the best threshold depends on the latencies of the instructions (i.e., 
      the branch penalty).  */
-  if (optimize > 1 && blk_size > 2)
+  if (GCC_OPTION (optimize) > 1 && blk_size > 2)
     return insn;
 
   /* At this point, we've found the start of block 3 and we know that
@@ -2595,7 +2595,7 @@ mcore_reorg (void)
   /* Reset this variable.  */
   current_function_anonymous_args = 0;
   
-  if (optimize == 0)
+  if (GCC_OPTION (optimize) == 0)
     return;
   
   /* Conditionalize blocks where we can.  */
@@ -2678,7 +2678,7 @@ mcore_option_override (void)
 {
   /* Only the m340 supports little endian code.  */
   if (TARGET_LITTLE_END && ! TARGET_M340)
-    target_flags |= MASK_M340;
+    GCC_OPTION (target_flags) |= MASK_M340;
 }
 
 
diff --git a/gcc/config/mcore/mcore.md b/gcc/config/mcore/mcore.md
index a65747d..9406490 100644
--- a/gcc/config/mcore/mcore.md
+++ b/gcc/config/mcore/mcore.md
@@ -673,7 +673,7 @@
   /* If this is an add to the frame pointer, then accept it as is so
      that we can later fold in the fp/sp offset from frame pointer
      elimination.  */
-  if (flag_omit_frame_pointer
+  if (GCC_OPTION (flag_omit_frame_pointer)
       && GET_CODE (operands[1]) == REG
       && (REGNO (operands[1]) == VIRTUAL_STACK_VARS_REGNUM
 	  || REGNO (operands[1]) == FRAME_POINTER_REGNUM))
@@ -755,7 +755,7 @@
   [(set (match_operand:SI 0 "mcore_arith_reg_operand" "=r,r,r")
 	(plus:SI (match_operand:SI 1 "mcore_arith_reg_operand" "%0,0,0")
 		 (match_operand:SI 2 "immediate_operand" "r,J,L")))]
-  "flag_omit_frame_pointer
+  "GCC_OPTION (flag_omit_frame_pointer)
    && (reload_in_progress || reload_completed || REGNO (operands[1]) == FRAME_POINTER_REGNUM)"
   "@
 	addu	%0,%2
@@ -2971,7 +2971,7 @@
   "
 {
   /* If he wants no probing, just do it for him.  */
-  if (mcore_stack_increment == 0)
+  if (GCC_OPTION (mcore_stack_increment) == 0)
     {
       emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,operands[1]));
 ;;      emit_move_insn (operands[0], virtual_stack_dynamic_rtx);
diff --git a/gcc/config/mep/mep-pragma.c b/gcc/config/mep/mep-pragma.c
index 632e92d..82f8b0f 100644
--- a/gcc/config/mep/mep-pragma.c
+++ b/gcc/config/mep/mep-pragma.c
@@ -72,12 +72,12 @@ mep_pragma_io_volatile (cpp_reader *reader ATTRIBUTE_UNUSED)
 
       if (strcmp (str, "on") == 0)
 	{
-	  target_flags |= MASK_IO_VOLATILE;
+	  GCC_OPTION (target_flags) |= MASK_IO_VOLATILE;
 	  return;
 	}
       if (strcmp (str, "off") == 0)
 	{
-	  target_flags &= ~ MASK_IO_VOLATILE;
+	  GCC_OPTION (target_flags) &= ~ MASK_IO_VOLATILE;
 	  return;
 	}
     }
@@ -238,9 +238,9 @@ mep_pragma_coprocessor_width (void)
       /* This pragma no longer has any effect.  */
 #if 0
       if (i == 32)
-	target_flags &= ~MASK_64BIT_CR_REGS;
+	GCC_OPTION (target_flags) &= ~MASK_64BIT_CR_REGS;
       else if (i == 64)
-	target_flags |= MASK_64BIT_CR_REGS;
+	GCC_OPTION (target_flags) |= MASK_64BIT_CR_REGS;
       else
 	break;
       targetm.init_builtins ();
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c
index 858136b..d9ac620 100644
--- a/gcc/config/mep/mep.c
+++ b/gcc/config/mep/mep.c
@@ -313,7 +313,7 @@ mep_option_override (void)
   unsigned int i;
   int j;
   cl_deferred_option *opt;
-  vec<cl_deferred_option> *v = (vec<cl_deferred_option> *) mep_deferred_options;
+  vec<cl_deferred_option> *v = (vec<cl_deferred_option> *) GCC_OPTION (mep_deferred_options);
 
   if (v)
     FOR_EACH_VEC_ELT (*v, i, opt)
@@ -362,9 +362,9 @@ mep_option_override (void)
 	  }
       }
 
-  if (flag_pic == 1)
+  if (GCC_OPTION (flag_pic) == 1)
     warning (OPT_fpic, "-fpic is not supported");
-  if (flag_pic == 2)
+  if (GCC_OPTION (flag_pic) == 2)
     warning (OPT_fPIC, "-fPIC is not supported");
   if (TARGET_S && TARGET_M)
     error ("only one of -ms and -mm may be given");
@@ -379,23 +379,23 @@ mep_option_override (void)
   if (TARGET_OPT_CLIP && ! TARGET_OPT_MINMAX)
     warning (0, "-mclip currently has no effect without -mminmax");
 
-  if (mep_const_section)
+  if (GCC_OPTION (mep_const_section))
     {
-      if (strcmp (mep_const_section, "tiny") != 0
-	  && strcmp (mep_const_section, "near") != 0
-	  && strcmp (mep_const_section, "far") != 0)
+      if (strcmp (GCC_OPTION (mep_const_section), "tiny") != 0
+	  && strcmp (GCC_OPTION (mep_const_section), "near") != 0
+	  && strcmp (GCC_OPTION (mep_const_section), "far") != 0)
 	error ("-mc= must be -mc=tiny, -mc=near, or -mc=far");
     }
 
   if (TARGET_S)
-    mep_tiny_cutoff = 65536;
+    GCC_OPTION (mep_tiny_cutoff) = 65536;
   if (TARGET_M)
-    mep_tiny_cutoff = 0;
+    GCC_OPTION (mep_tiny_cutoff) = 0;
   if (TARGET_L && ! global_options_set.x_mep_tiny_cutoff)
-    mep_tiny_cutoff = 0;
+    GCC_OPTION (mep_tiny_cutoff) = 0;
 
   if (TARGET_64BIT_CR_REGS)
-    flag_split_wide_types = 0;
+    GCC_OPTION (flag_split_wide_types) = 0;
 
   init_machine_status = mep_init_machine_status;
   mep_init_intrinsics ();
@@ -1679,7 +1679,7 @@ mep_expand_setcc_1 (enum rtx_code code, rtx dest, rtx op1, rtx op2)
 		sltu3 tmp, tmp, 1	16-bit
 		xor3 dest, tmp, 1	32-bit
 	*/
-      if (optimize_size && op2 != const0_rtx)
+      if (GCC_OPTION (optimize_size) && op2 != const0_rtx)
 	return false;
 
       if (op2 != const0_rtx)
@@ -2342,7 +2342,7 @@ mep_reg_set_in_function (int regno)
   if (mep_interrupt_p () && df_regs_ever_live_p(regno))
     return true;
 
-  if (regno == LP_REGNO && (profile_arc_flag > 0 || profile_flag > 0))
+  if (regno == LP_REGNO && (GCC_OPTION (profile_arc_flag) > 0 || GCC_OPTION (profile_flag) > 0))
     return true;
 
   push_topmost_sequence ();
@@ -2440,7 +2440,7 @@ mep_call_saves_register (int r)
 
       if (cfun->machine->reg_save_slot[r])
   	rv = MEP_SAVES_YES;
-      else if (r == LP_REGNO && (profile_arc_flag > 0 || profile_flag > 0))
+      else if (r == LP_REGNO && (GCC_OPTION (profile_arc_flag) > 0 || GCC_OPTION (profile_flag) > 0))
 	rv = MEP_SAVES_YES;
       else if (r == FRAME_POINTER_REGNUM && frame_pointer_needed)
 	rv = MEP_SAVES_YES;
@@ -2467,7 +2467,7 @@ mep_epilogue_uses (int regno)
      However, when profiling is enabled, the profiling code will implicitly
      clobber $11.  This case has to be handled specially both here and in
      mep_call_saves_register.  */
-  if (regno == LP_REGNO && (profile_arc_flag > 0 || profile_flag > 0))
+  if (regno == LP_REGNO && (GCC_OPTION (profile_arc_flag) > 0 || GCC_OPTION (profile_flag) > 0))
     return true;
   /* Interrupt functions save/restore pretty much everything.  */
   return (reload_completed && mep_interrupt_saved_reg (regno));
@@ -2831,7 +2831,7 @@ mep_start_function (FILE *file, HOST_WIDE_INT hwi_local)
   if (sp_offset == 0)
     return;
 
-  if (debug_info_level == DINFO_LEVEL_NONE)
+  if (GCC_OPTION (debug_info_level) == DINFO_LEVEL_NONE)
     {
       fprintf (file, "\t# frame: %d", sp_offset);
       if (reg_save_size)
@@ -2918,7 +2918,7 @@ mep_expand_epilogue (void)
   int really_need_stack_frame = get_frame_size() + crtl->outgoing_args_size;
   int interrupt_handler = mep_interrupt_p ();
 
-  if (profile_arc_flag == 2)
+  if (GCC_OPTION (profile_arc_flag) == 2)
     emit_insn (gen_mep_bb_trace_ret ());
 
   reg_save_size = mep_elimination_offset (ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM);
@@ -4374,21 +4374,21 @@ mep_insert_attributes (tree decl, tree *attributes)
     }
   else
     {
-      if (size <= mep_based_cutoff && size > 0)
+      if (size <= GCC_OPTION (mep_based_cutoff) && size > 0)
 	secname = "based";
-      else if (size <= mep_tiny_cutoff && size > 0)
+      else if (size <= GCC_OPTION (mep_tiny_cutoff) && size > 0)
 	secname = "tiny";
       else if (TARGET_L)
 	secname = "far";
     }
 
-  if (mep_const_section && TREE_READONLY (decl))
+  if (GCC_OPTION (mep_const_section) && TREE_READONLY (decl))
     {
-      if (strcmp (mep_const_section, "tiny") == 0)
+      if (strcmp (GCC_OPTION (mep_const_section), "tiny") == 0)
 	secname = "tiny";
-      else if (strcmp (mep_const_section, "near") == 0)
+      else if (strcmp (GCC_OPTION (mep_const_section), "near") == 0)
 	return;
-      else if (strcmp (mep_const_section, "far") == 0)
+      else if (strcmp (GCC_OPTION (mep_const_section), "far") == 0)
 	secname = "far";
     }
 
@@ -4532,7 +4532,7 @@ mep_select_section (tree decl, int reloc ATTRIBUTE_UNUSED,
       else
 	encoding = 0;
 
-      if (flag_function_sections || DECL_ONE_ONLY (decl))
+      if (GCC_OPTION (flag_function_sections) || DECL_ONE_ONLY (decl))
 	mep_unique_section (decl, 0);
       else if (lookup_attribute ("vliw", TYPE_ATTRIBUTES (TREE_TYPE (decl))))
 	{
@@ -5802,9 +5802,9 @@ mep_reorg (void)
   mep_jmp_return_reorg (insns);
   mep_bundle_insns (insns);
   mep_reorg_repeat (insns);
-  if (optimize
-      && !profile_flag
-      && !profile_arc_flag
+  if (GCC_OPTION (optimize)
+      && !GCC_OPTION (profile_flag)
+      && !GCC_OPTION (profile_arc_flag)
       && TARGET_OPT_REPEAT
       && (!mep_interrupt_p () || mep_interrupt_saved_reg (RPB_REGNO)))
     mep_reorg_erepeat (insns);
@@ -5858,9 +5858,9 @@ mep_init_intrinsics (void)
 
   /* Set MEP_SELECTED_ISA to the ISA flag for this configuration.  */
   mep_selected_isa = mep_configs[0].isa;
-  if (mep_config_string != 0)
+  if (GCC_OPTION (mep_config_string) != 0)
     for (i = 0; mep_configs[i].config_name; i++)
-      if (strcmp (mep_config_string, mep_configs[i].config_name) == 0)
+      if (strcmp (GCC_OPTION (mep_config_string), mep_configs[i].config_name) == 0)
 	{
 	  mep_selected_isa = mep_configs[i].isa;
 	  break;
@@ -7149,7 +7149,7 @@ mep_rtx_cost (rtx x, int code, int outer_code ATTRIBUTE_UNUSED,
       return true;
 
     case SYMBOL_REF:
-      *total = optimize_size ? COSTS_N_INSNS (0) : COSTS_N_INSNS (1);
+      *total = GCC_OPTION (optimize_size) ? COSTS_N_INSNS (0) : COSTS_N_INSNS (1);
       return true;
 
     case MULT:							
diff --git a/gcc/config/mep/mep.h b/gcc/config/mep/mep.h
index d1360b6..cb3d731 100644
--- a/gcc/config/mep/mep.h
+++ b/gcc/config/mep/mep.h
@@ -122,10 +122,10 @@ crtbegin.o%s"
 
 #define TARGET_DEFAULT		(MASK_IO_VOLATILE | MASK_OPT_REPEAT | MEP_ALL_OPTS | MASK_LITTLE_ENDIAN)
 
-#define TARGET_IO_NO_VOLATILE	(! (target_flags & MASK_IO_VOLATILE))
-#define TARGET_OPT_NOREPEAT	(! (target_flags & MASK_OPT_REPEAT))
-#define TARGET_32BIT_CR_REGS	(! (target_flags & MASK_64BIT_CR_REGS))
-#define TARGET_BIG_ENDIAN	(! (target_flags & MASK_LITTLE_ENDIAN))
+#define TARGET_IO_NO_VOLATILE	(! (GCC_OPTION (target_flags) & MASK_IO_VOLATILE))
+#define TARGET_OPT_NOREPEAT	(! (GCC_OPTION (target_flags) & MASK_OPT_REPEAT))
+#define TARGET_32BIT_CR_REGS	(! (GCC_OPTION (target_flags) & MASK_64BIT_CR_REGS))
+#define TARGET_BIG_ENDIAN	(! (GCC_OPTION (target_flags) & MASK_LITTLE_ENDIAN))
 
 #define TARGET_COPRO_MULT	0
 
diff --git a/gcc/config/mep/mep.md b/gcc/config/mep/mep.md
index b6d80ac..6033698 100644
--- a/gcc/config/mep/mep.md
+++ b/gcc/config/mep/mep.md
@@ -2077,7 +2077,7 @@
 (define_expand "doloop_begin"
   [(use (match_operand 0 "register_operand" ""))
    (use (match_operand 1 "" ""))]
-  "!profile_arc_flag && TARGET_OPT_REPEAT"
+  "!GCC_OPTION (profile_arc_flag) && TARGET_OPT_REPEAT"
   "mep_emit_doloop (operands, 0);
    DONE;
   ")
@@ -2108,7 +2108,7 @@
 (define_expand "doloop_end"
   [(use (match_operand 0 "nonimmediate_operand" ""))
    (use (label_ref (match_operand 1 "" "")))]
-  "!profile_arc_flag && TARGET_OPT_REPEAT"
+  "!GCC_OPTION (profile_arc_flag) && TARGET_OPT_REPEAT"
   "if (GET_CODE (operands[0]) == REG && GET_MODE (operands[0]) != SImode)
      FAIL;
    mep_emit_doloop (operands, 1);
diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
index ba8109b..6c896d0 100644
--- a/gcc/config/microblaze/microblaze.c
+++ b/gcc/config/microblaze/microblaze.c
@@ -679,9 +679,9 @@ get_base_reg (rtx x)
   tree decl;
   int base_reg;
 
-  if (!flag_pic || microblaze_tls_symbol_p(x))
+  if (!GCC_OPTION (flag_pic) || microblaze_tls_symbol_p(x))
     base_reg = MB_ABI_BASE_REGNUM;
-  else if (flag_pic)
+  else if (GCC_OPTION (flag_pic))
     base_reg = MB_ABI_PIC_ADDR_REGNUM;
 
   if (TARGET_XLGPOPT
@@ -769,7 +769,7 @@ microblaze_classify_address (struct microblaze_address_info *info, rtx x,
 	    else if ((GET_CODE (xplus1) == SYMBOL_REF ||
 		      GET_CODE (xplus1) == LABEL_REF))
 	      {
-		if (flag_pic == 2 || microblaze_tls_symbol_p(xplus1))
+		if (GCC_OPTION (flag_pic) == 2 || microblaze_tls_symbol_p(xplus1))
 		  return false;
 		info->type = ADDRESS_SYMBOLIC;
 		info->symbol = xplus1;
@@ -802,7 +802,7 @@ microblaze_classify_address (struct microblaze_address_info *info, rtx x,
 		if (GET_CODE (xconst0) == SYMBOL_REF
 		    || GET_CODE (xconst0) == LABEL_REF)
 		  {
-		    if (flag_pic == 2 || microblaze_tls_symbol_p(xconst0))
+		    if (GCC_OPTION (flag_pic) == 2 || microblaze_tls_symbol_p(xconst0))
 		      return false;
 
 		    info->type = ADDRESS_SYMBOLIC;
@@ -852,10 +852,10 @@ microblaze_classify_address (struct microblaze_address_info *info, rtx x,
 				  get_base_reg (XVECEXP (XEXP (x,0), 0, 0)));
 		return microblaze_classify_unspec (info, XEXP (x, 0));
 	     }
-	     return !(flag_pic && pic_address_needs_scratch (x));
+	     return !(GCC_OPTION (flag_pic) && pic_address_needs_scratch (x));
 	  }
 
-	if (flag_pic == 2)
+	if (GCC_OPTION (flag_pic) == 2)
 	  return false;
 	else if (microblaze_tls_symbol_p(x))
 	  return false;
@@ -907,7 +907,7 @@ microblaze_valid_pic_const (rtx x)
 int
 microblaze_legitimate_pic_operand (rtx x)
 {
-  if (flag_pic == 2 && (symbol_mentioned_p(x) || label_mentioned_p(x)))
+  if (GCC_OPTION (flag_pic) == 2 && (symbol_mentioned_p(x) || label_mentioned_p(x)))
     return 0;
 
   if (microblaze_tls_referenced_p(x))
@@ -949,7 +949,7 @@ microblaze_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
   register rtx xinsn = x, result;
 
   if (GET_CODE (xinsn) == CONST
-      && flag_pic && pic_address_needs_scratch (xinsn))
+      && GCC_OPTION (flag_pic) && pic_address_needs_scratch (xinsn))
     {
       rtx ptr_reg = gen_reg_rtx (Pmode);
       rtx constant = XEXP (XEXP (xinsn, 0), 1);
@@ -1020,7 +1020,7 @@ microblaze_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
 
 		  return result;
 		}
-	      else if (flag_pic == 2)
+	      else if (GCC_OPTION (flag_pic) == 2)
 		{
 		  rtx pic_ref, reg;
 		  reg = gen_reg_rtx (Pmode);
@@ -1206,7 +1206,7 @@ microblaze_expand_block_move (rtx dest, rtx src, rtx length, rtx align_rtx)
 	  microblaze_block_move_straight (dest, src, INTVAL (length));
 	  return true;
 	}
-      else if (optimize)
+      else if (GCC_OPTION (optimize))
 	{
 	  microblaze_block_move_loop (dest, src, INTVAL (length));
 	  return true;
@@ -1263,7 +1263,7 @@ microblaze_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED,
       {
 	if (TARGET_BARREL_SHIFT)
 	  {
-	    if (MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu, "v5.00.a")
+	    if (MICROBLAZE_VERSION_COMPARE (GCC_OPTION (microblaze_select_cpu), "v5.00.a")
 		>= 0)
 	      *total = COSTS_N_INSNS (1);
 	    else
@@ -1276,9 +1276,9 @@ microblaze_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED,
 	    /* Add 1 to make shift slightly more expensive than add.  */
 	    *total = COSTS_N_INSNS (INTVAL (XEXP (x, 1))) + 1;
 	    /* Reduce shift costs for special circumstances.  */
-	    if (optimize_size && INTVAL (XEXP (x, 1)) > 5)
+	    if (GCC_OPTION (optimize_size) && INTVAL (XEXP (x, 1)) > 5)
 	      *total -= 2;
-	    if (!optimize_size && INTVAL (XEXP (x, 1)) > 17)
+	    if (!GCC_OPTION (optimize_size) && INTVAL (XEXP (x, 1)) > 17)
 	      *total -= 2;
 	  }
 	else
@@ -1325,7 +1325,7 @@ microblaze_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED,
 	  }
 	else if (!TARGET_SOFT_MUL)
 	  {
-	    if (MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu, "v5.00.a")
+	    if (MICROBLAZE_VERSION_COMPARE (GCC_OPTION (microblaze_select_cpu), "v5.00.a")
 		>= 0)
 	      *total = COSTS_N_INSNS (1);
 	    else
@@ -1431,7 +1431,7 @@ pic_address_needs_scratch (rtx x)
 
       if ((GET_CODE (p0) == SYMBOL_REF || GET_CODE (p0) == LABEL_REF)
           && (GET_CODE (p1) == CONST_INT)
-          && (flag_pic == 2 || microblaze_tls_symbol_p (p0) || !SMALL_INT (p1)))
+          && (GCC_OPTION (flag_pic) == 2 || microblaze_tls_symbol_p (p0) || !SMALL_INT (p1)))
         return 1;
     }
   return 0;
@@ -1674,31 +1674,31 @@ microblaze_option_override (void)
   int ver;
 
   microblaze_section_threshold = (global_options_set.x_g_switch_value
-				  ? g_switch_value
+				  ? GCC_OPTION (g_switch_value)
 				  : MICROBLAZE_DEFAULT_GVALUE);
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       /* Make sure it's 2, we only support one kind of PIC.  */
-      flag_pic = 2;
+      GCC_OPTION (flag_pic) = 2;
       if (!TARGET_SUPPORTS_PIC)
         {
           error ("-fPIC/-fpic not supported for this target");
           /* Clear it to avoid further errors.  */
-          flag_pic = 0;
+          GCC_OPTION (flag_pic) = 0;
         }
     }
 
   /* Check the MicroBlaze CPU version for any special action to be done.  */
-  if (microblaze_select_cpu == NULL)
-    microblaze_select_cpu = MICROBLAZE_DEFAULT_CPU;
-  ver = microblaze_version_to_int (microblaze_select_cpu);
+  if (GCC_OPTION (microblaze_select_cpu) == NULL)
+    GCC_OPTION (microblaze_select_cpu) = MICROBLAZE_DEFAULT_CPU;
+  ver = microblaze_version_to_int (GCC_OPTION (microblaze_select_cpu));
   if (ver == -1)
     {
-      error ("%qs is an invalid argument to -mcpu=", microblaze_select_cpu);
+      error ("%qs is an invalid argument to -mcpu=", GCC_OPTION (microblaze_select_cpu));
     }
 
-  ver = MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu, "v3.00.a");
+  ver = MICROBLAZE_VERSION_COMPARE (GCC_OPTION (microblaze_select_cpu), "v3.00.a");
   if (ver < 0)
     {
       /* No hardware exceptions in earlier versions. So no worries.  */
@@ -1709,7 +1709,7 @@ microblaze_option_override (void)
       microblaze_pipe = MICROBLAZE_PIPE_3;
     }
   else if (ver == 0
-	   || (MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu, "v4.00.b")
+	   || (MICROBLAZE_VERSION_COMPARE (GCC_OPTION (microblaze_select_cpu), "v4.00.b")
 	       == 0))
     {
 #if 0
@@ -1727,19 +1727,19 @@ microblaze_option_override (void)
 #endif
       microblaze_no_unsafe_delay = 0;
       microblaze_pipe = MICROBLAZE_PIPE_5;
-      if (MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu, "v5.00.a") == 0
-	  || MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu,
+      if (MICROBLAZE_VERSION_COMPARE (GCC_OPTION (microblaze_select_cpu), "v5.00.a") == 0
+	  || MICROBLAZE_VERSION_COMPARE (GCC_OPTION (microblaze_select_cpu),
 					 "v5.00.b") == 0
-	  || MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu,
+	  || MICROBLAZE_VERSION_COMPARE (GCC_OPTION (microblaze_select_cpu),
 					 "v5.00.c") == 0)
 	{
 	  /* Pattern compares are to be turned on by default only when 
  	     compiling for MB v5.00.'z'.  */
-	  target_flags |= MASK_PATTERN_COMPARE;
+	  GCC_OPTION (target_flags) |= MASK_PATTERN_COMPARE;
 	}
     }
 
-  ver = MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu, "v6.00.a");
+  ver = MICROBLAZE_VERSION_COMPARE (GCC_OPTION (microblaze_select_cpu), "v6.00.a");
   if (ver < 0)
     {
       if (TARGET_MULTIPLY_HIGH)
@@ -1747,7 +1747,7 @@ microblaze_option_override (void)
 		 "-mxl-multiply-high can be used only with -mcpu=v6.00.a or greater");
     }
 
-  ver = MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu, "v8.10.a");
+  ver = MICROBLAZE_VERSION_COMPARE (GCC_OPTION (microblaze_select_cpu), "v8.10.a");
   microblaze_has_clz = 1;
   if (ver < 0)
     {
@@ -1756,18 +1756,18 @@ microblaze_option_override (void)
     }
 
   /* TARGET_REORDER defaults to 2 if -mxl-reorder not specified.  */
-  ver = MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu, "v8.30.a");
+  ver = MICROBLAZE_VERSION_COMPARE (GCC_OPTION (microblaze_select_cpu), "v8.30.a");
   if (ver < 0)
     {
-        if (TARGET_REORDER == 1)
+        if (GCC_OPTION (TARGET_REORDER) == 1)
           warning (0, "-mxl-reorder can be used only with -mcpu=v8.30.a or greater");
-        TARGET_REORDER = 0;
+        GCC_OPTION (TARGET_REORDER) = 0;
     }
   else if ((ver == 0) && !TARGET_PATTERN_COMPARE)
     {
-        if (TARGET_REORDER == 1)
+        if (GCC_OPTION (TARGET_REORDER) == 1)
           warning (0, "-mxl-reorder requires -mxl-pattern-compare for -mcpu=v8.30.a");
-        TARGET_REORDER = 0;
+        GCC_OPTION (TARGET_REORDER) = 0;
     }
 
   if (TARGET_MULTIPLY_HIGH && TARGET_SOFT_MUL)
@@ -2008,7 +2008,7 @@ compute_frame_size (HOST_WIDE_INT size)
 
   total_size = var_size + args_size;
 
-  if (flag_pic == 2)
+  if (GCC_OPTION (flag_pic) == 2)
     /* force setting GOT.  */
     df_set_regs_ever_live (MB_ABI_PIC_ADDR_REGNUM, true);
 
@@ -2637,7 +2637,7 @@ microblaze_function_prologue (FILE * file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
      assemble_start_function.  This is needed so that the name used here
      exactly matches the name used in ASM_DECLARE_FUNCTION_NAME.  */
   fnname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
-  if (!flag_inhibit_size_directive)
+  if (!GCC_OPTION (flag_inhibit_size_directive))
     {
       fputs ("\t.ent\t", file);
       if (interrupt_handler && strcmp (INTERRUPT_HANDLER_NAME, fnname))
@@ -2657,7 +2657,7 @@ microblaze_function_prologue (FILE * file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
   if (interrupt_handler && strcmp (INTERRUPT_HANDLER_NAME, fnname))
     fputs ("_interrupt_handler:\n", file);
 
-  if (!flag_inhibit_size_directive)
+  if (!GCC_OPTION (flag_inhibit_size_directive))
     {
       /* .frame FRAMEREG, FRAMESIZE, RETREG.  */
       fprintf (file,
@@ -2788,7 +2788,7 @@ microblaze_expand_prologue (void)
 
   fsiz = compute_frame_size (get_frame_size ());
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = fsiz;
 
   /* If this function is a varargs function, store any registers that
@@ -2859,7 +2859,7 @@ microblaze_expand_prologue (void)
 	}
     }
 
-  if ((flag_pic == 2 || TLS_NEEDS_GOT )
+  if ((GCC_OPTION (flag_pic) == 2 || TLS_NEEDS_GOT )
       && df_regs_ever_live_p (MB_ABI_PIC_ADDR_REGNUM))
     {
       SET_REGNO (pic_offset_table_rtx, MB_ABI_PIC_ADDR_REGNUM);
@@ -2869,7 +2869,7 @@ microblaze_expand_prologue (void)
   /* If we are profiling, make sure no instructions are scheduled before
      the call to mcount.  */
 
-  if (profile_flag)
+  if (GCC_OPTION (profile_flag))
     emit_insn (gen_blockage ());
 }
 
@@ -2889,7 +2889,7 @@ microblaze_function_epilogue (FILE * file ATTRIBUTE_UNUSED,
      exactly matches the name used in ASM_DECLARE_FUNCTION_NAME.  */
   fnname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
 
-  if (!flag_inhibit_size_directive)
+  if (!GCC_OPTION (flag_inhibit_size_directive))
     {
       fputs ("\t.end\t", file);
       if (interrupt_handler)
@@ -2977,7 +2977,7 @@ microblaze_can_use_return_insn (void)
   if (!reload_completed)
     return 0;
 
-  if (df_regs_ever_live_p (MB_ABI_SUB_RETURN_ADDR_REGNUM) || profile_flag)
+  if (df_regs_ever_live_p (MB_ABI_SUB_RETURN_ADDR_REGNUM) || GCC_OPTION (profile_flag))
     return 0;
 
   if (current_frame_info.initialized)
@@ -3135,7 +3135,7 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
   funexp = XEXP (DECL_RTL (function), 0);
   rtx temp2 = gen_rtx_REG (Pmode, MB_ABI_TEMP2_REGNUM);
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     emit_move_insn (temp2, expand_pic_symbol_ref (Pmode, funexp));
   else
     emit_move_insn (temp2, funexp);
@@ -3181,7 +3181,7 @@ microblaze_expand_move (enum machine_mode mode, rtx operands[])
 	  emit_move_insn (op0, result);
 	  return true;
 	}
-      else if (flag_pic)
+      else if (GCC_OPTION (flag_pic))
 	{
 	  if (reload_in_progress)
 	    df_set_regs_ever_live (PIC_OFFSET_TABLE_REGNUM, true);
@@ -3201,13 +3201,13 @@ microblaze_expand_move (enum machine_mode mode, rtx operands[])
       if ((GET_CODE (p1) == CONST_INT)
 	  && ((GET_CODE (p0) == UNSPEC)
 	      || ((GET_CODE (p0) == SYMBOL_REF || GET_CODE (p0) == LABEL_REF)
-	          && (flag_pic == 2 || microblaze_tls_symbol_p (p0)
+	          && (GCC_OPTION (flag_pic) == 2 || microblaze_tls_symbol_p (p0)
 		      || !SMALL_INT (p1)))))
 	{
 	  rtx temp = force_reg (SImode, p0);
 	  rtx temp2 = p1;
 
-	  if (flag_pic && reload_in_progress)
+	  if (GCC_OPTION (flag_pic) && reload_in_progress)
 	    df_set_regs_ever_live (PIC_OFFSET_TABLE_REGNUM, true);
 	  emit_move_insn (op0, gen_rtx_PLUS (SImode, temp, temp2));
 	  return true;
diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
index 58d8895..8bf1100 100644
--- a/gcc/config/microblaze/microblaze.h
+++ b/gcc/config/microblaze/microblaze.h
@@ -540,7 +540,7 @@ typedef struct microblaze_args
   (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF		\
     || GET_CODE (X) == CONST_INT 		                        \
     || (GET_CODE (X) == CONST						\
-	&& ! (flag_pic && pic_address_needs_scratch (X))))
+	&& ! (GCC_OPTION (flag_pic) && pic_address_needs_scratch (X))))
 
 /* Define this, so that when PIC, reload won't try to reload invalid
    addresses which require two reload registers.  */
@@ -702,7 +702,7 @@ do {									\
 
 #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL)		\
 do {									\
-  if (flag_pic == 2)                                               \
+  if (GCC_OPTION (flag_pic) == 2)                                               \
     fprintf (STREAM, "\t%s\t%sL%d@GOTOFF\n",                            \
 	     ".gpword",                                                 \
 	     LOCAL_LABEL_PREFIX, VALUE);				\
@@ -771,7 +771,7 @@ extern int save_volatiles;
 #undef ASM_DECLARE_FUNCTION_SIZE
 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL)			\
   do {									\
-    if (!flag_inhibit_size_directive)					\
+    if (!GCC_OPTION (flag_inhibit_size_directive))					\
       {									\
         char label[256];						\
 	static int labelno;						\
@@ -808,7 +808,7 @@ extern int save_volatiles;
     fprintf (FILE, TYPE_OPERAND_FMT, "object");				\
     putc ('\n', FILE);							\
     size_directive_output = 0;						\
-    if (!flag_inhibit_size_directive && DECL_SIZE (DECL))		\
+    if (!GCC_OPTION (flag_inhibit_size_directive) && DECL_SIZE (DECL))		\
       {									\
 	size_directive_output = 1;					\
 	fprintf (FILE, "%s", SIZE_ASM_OP);				\
@@ -823,7 +823,7 @@ extern int save_volatiles;
 #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END)	 \
 do {									 \
      const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);		 \
-     if (!flag_inhibit_size_directive && DECL_SIZE (DECL)		 \
+     if (!GCC_OPTION (flag_inhibit_size_directive) && DECL_SIZE (DECL)		 \
          && ! AT_END && TOP_LEVEL					 \
 	 && DECL_INITIAL (DECL) == error_mark_node			 \
 	 && !size_directive_output)					 \
diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
index 815d6b5..11f3a78 100644
--- a/gcc/config/microblaze/microblaze.md
+++ b/gcc/config/microblaze/microblaze.md
@@ -357,14 +357,14 @@
 (define_insn "bswapsi2"
   [(set (match_operand:SI 0 "register_operand" "=r")
         (bswap:SI (match_operand:SI 1 "register_operand" "r")))]
-  "TARGET_REORDER"
+  "GCC_OPTION (TARGET_REORDER)"
   "swapb %0, %1"
 )
 
 (define_insn "bswaphi2"
   [(set (match_operand:HI 0 "register_operand" "=r")
         (bswap:HI (match_operand:HI 1 "register_operand" "r")))]
-  "TARGET_REORDER"
+  "GCC_OPTION (TARGET_REORDER)"
   "swapb %0, %1
    swaph %0, %0"
 )
@@ -868,7 +868,7 @@
   {
     /* If operands[1] is a constant address illegal for pic, then we need to
        handle it just like microblaze_legitimize_address does.  */
-    if (flag_pic && pic_address_needs_scratch (operands[1]))
+    if (GCC_OPTION (flag_pic) && pic_address_needs_scratch (operands[1]))
     {
         rtx temp = force_reg (DImode, XEXP (XEXP (operands[1], 0), 0));
         rtx temp2 = XEXP (XEXP (operands[1], 0), 1);
@@ -1123,7 +1123,7 @@
 (define_insn "movsi4_rev"
   [(set (match_operand:SI 0 "reg_or_mem_operand" "=r,Q")
         (bswap:SI (match_operand:SF 1 "reg_or_mem_operand" "Q,r")))]
-  "TARGET_REORDER"
+  "GCC_OPTION (TARGET_REORDER)"
   "@
    lwr\t%0,%y1,r0
    swr\t%1,%y0,r0"
@@ -1177,7 +1177,7 @@
         (match_operand:DF 1 "general_operand" ""))]
   ""
   {
-    if (flag_pic == 2) {
+    if (GCC_OPTION (flag_pic) == 2) {
       if (GET_CODE (operands[1]) == MEM 
           && !microblaze_legitimate_address_p (DFmode, XEXP (operands[1],0), 0))
       {
@@ -1335,7 +1335,7 @@
   [(set (match_operand:SI 0 "register_operand" "=&d")
        (ashift:SI (match_operand:SI 1 "register_operand"  "d")
                    (match_operand:SI 2 "immediate_operand" "I")))]
-  "(INTVAL (operands[2]) > 5 && optimize_size)"
+  "(INTVAL (operands[2]) > 5 && GCC_OPTION (optimize_size))"
   {
     operands[3] = gen_rtx_REG (SImode, MB_ABI_ASM_TEMP_REGNUM);
 
@@ -1356,7 +1356,7 @@
   [(set (match_operand:SI 0 "register_operand" "=&d")
        (ashift:SI (match_operand:SI 1 "register_operand"  "d")
                    (match_operand:SI 2 "immediate_operand" "I")))]
-  "(INTVAL (operands[2]) > 17 && !optimize_size)"
+  "(INTVAL (operands[2]) > 17 && !GCC_OPTION (optimize_size))"
   {
     int i, nshift;
     
@@ -1797,7 +1797,7 @@
   {
     gcc_assert (GET_MODE (operands[0]) == Pmode);
 
-    if (!flag_pic)
+    if (!GCC_OPTION (flag_pic))
       emit_jump_insn (gen_tablejump_internal1 (operands[0], operands[1]));
     else
       emit_jump_insn (gen_tablejump_internal3 (operands[0], operands[1]));
@@ -1832,7 +1832,7 @@
   (use (label_ref:SI (match_dup 1)))]
  "NEXT_INSN (operands[1]) != 0
   && GET_CODE (PATTERN (NEXT_INSN (operands[1]))) == ADDR_DIFF_VEC
-  && flag_pic"
+  && GCC_OPTION (flag_pic)"
   {
     output_asm_insn ("addk\t%0,%0,r20",operands);
     return "bra%?\t%0";
@@ -1998,7 +1998,7 @@
   {
     rtx addr = XEXP (operands[0], 0);
 
-    if (flag_pic == 2 && GET_CODE (addr) == SYMBOL_REF 
+    if (GCC_OPTION (flag_pic) == 2 && GET_CODE (addr) == SYMBOL_REF 
 	&& !SYMBOL_REF_LOCAL_P (addr)) 
       {
         rtx temp = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_PLT);
@@ -2047,7 +2047,7 @@
 	 (match_operand:SI 1 "" "i"))
   (clobber (reg:SI R_SR))
   (use (reg:SI R_GOT))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   {
     register rtx target2 = gen_rtx_REG (Pmode, 
 			      GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM);
@@ -2095,7 +2095,7 @@
   {
     rtx addr = XEXP (operands[1], 0);
 
-    if (flag_pic == 2 && GET_CODE (addr) == SYMBOL_REF
+    if (GCC_OPTION (flag_pic) == 2 && GET_CODE (addr) == SYMBOL_REF
 	&& !SYMBOL_REF_LOCAL_P (addr)) 
       {
         rtx temp = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_PLT);
@@ -2139,7 +2139,7 @@
                         (match_operand 2 "" "")))
              (clobber (match_operand:SI 3 "" ""))
              (use (match_operand:SI 4 "" ""))])]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   {}
 )
 
@@ -2149,7 +2149,7 @@
               (match_operand:SI 2 "" "i")))
    (clobber (match_operand:SI 3 "register_operand" "=d"))
    (use (match_operand:SI 4 "register_operand"))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   { 
     register rtx target2=gen_rtx_REG (Pmode,GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM);
 
diff --git a/gcc/config/microblaze/predicates.md b/gcc/config/microblaze/predicates.md
index bfdf4ea..81ff7de 100644
--- a/gcc/config/microblaze/predicates.md
+++ b/gcc/config/microblaze/predicates.md
@@ -42,7 +42,7 @@
         return 1;
       case SYMBOL_REF:
       case LABEL_REF:
-        if (flag_pic || microblaze_tls_referenced_p(op))
+        if (GCC_OPTION (flag_pic) || microblaze_tls_referenced_p(op))
           return 0;
         return 1;
       case CONST:
@@ -114,7 +114,7 @@
        (match_operand 0 "general_operand"))
 {
   if (microblaze_tls_referenced_p(op)
-      || (flag_pic && (symbol_mentioned_p(op) || label_mentioned_p(op))))
+      || (GCC_OPTION (flag_pic) && (symbol_mentioned_p(op) || label_mentioned_p(op))))
     return false;
 
   return true;
diff --git a/gcc/config/mips/mips-ps-3d.md b/gcc/config/mips/mips-ps-3d.md
index 549080b..6113b31 100644
--- a/gcc/config/mips/mips-ps-3d.md
+++ b/gcc/config/mips/mips-ps-3d.md
@@ -366,7 +366,7 @@
 	(unspec:V2SF [(match_operand:V2SF 1 "register_operand" "f")
 		      (match_operand:V2SF 2 "register_operand" "f")]
 		     UNSPEC_ADDR_PS))]
-  "TARGET_HARD_FLOAT && TARGET_MIPS3D"
+  "TARGET_HARD_FLOAT && GCC_OPTION (TARGET_MIPS3D)"
   "addr.ps\t%0,%1,%2"
   [(set_attr "type" "fadd")
    (set_attr "mode" "SF")])
@@ -376,7 +376,7 @@
 	(unspec:V2SF [(match_operand:V2SF 1 "register_operand" "f")
 		      (match_dup 1)]
 		     UNSPEC_ADDR_PS))]
-  "TARGET_HARD_FLOAT && TARGET_MIPS3D"
+  "TARGET_HARD_FLOAT && GCC_OPTION (TARGET_MIPS3D)"
   "")
 
 ; cvt.pw.ps - Floating Point Convert Paired Single to Paired Word
@@ -384,7 +384,7 @@
   [(set (match_operand:V2SF 0 "register_operand" "=f")
 	(unspec:V2SF [(match_operand:V2SF 1 "register_operand" "f")]
 		     UNSPEC_CVT_PW_PS))]
-  "TARGET_HARD_FLOAT && TARGET_MIPS3D"
+  "TARGET_HARD_FLOAT && GCC_OPTION (TARGET_MIPS3D)"
   "cvt.pw.ps\t%0,%1"
   [(set_attr "type" "fcvt")
    (set_attr "mode" "SF")])
@@ -394,7 +394,7 @@
   [(set (match_operand:V2SF 0 "register_operand" "=f")
 	(unspec:V2SF [(match_operand:V2SF 1 "register_operand" "f")]
 		     UNSPEC_CVT_PS_PW))]
-  "TARGET_HARD_FLOAT && TARGET_MIPS3D"
+  "TARGET_HARD_FLOAT && GCC_OPTION (TARGET_MIPS3D)"
   "cvt.ps.pw\t%0,%1"
   [(set_attr "type" "fcvt")
    (set_attr "mode" "SF")])
@@ -405,7 +405,7 @@
 	(unspec:V2SF [(match_operand:V2SF 1 "register_operand" "f")
 		      (match_operand:V2SF 2 "register_operand" "f")]
 		     UNSPEC_MULR_PS))]
-  "TARGET_HARD_FLOAT && TARGET_MIPS3D"
+  "TARGET_HARD_FLOAT && GCC_OPTION (TARGET_MIPS3D)"
   "mulr.ps\t%0,%1,%2"
   [(set_attr "type" "fmul")
    (set_attr "mode" "SF")])
@@ -445,7 +445,7 @@
 		    (match_operand:SCALARF 2 "register_operand" "f")
 		    (match_operand 3 "const_int_operand" "")]
 		   UNSPEC_CABS))]
-  "TARGET_HARD_FLOAT && TARGET_MIPS3D"
+  "TARGET_HARD_FLOAT && GCC_OPTION (TARGET_MIPS3D)"
   "cabs.%Y3.<fmt>\t%0,%1,%2"
   [(set_attr "type" "fcmp")
    (set_attr "mode" "FPSW")])
@@ -492,7 +492,7 @@
 		      (match_operand:V2SF 4 "register_operand" "f")
 		      (match_operand 5 "const_int_operand" "")]
 		     UNSPEC_CABS))]
-  "TARGET_HARD_FLOAT && TARGET_MIPS3D"
+  "TARGET_HARD_FLOAT && GCC_OPTION (TARGET_MIPS3D)"
   "#"
   "&& reload_completed"
   [(set (match_dup 6)
@@ -535,7 +535,7 @@
 		      (match_operand:V2SF 2 "register_operand" "f")
 		      (match_operand 3 "const_int_operand" "")]
 		     UNSPEC_CABS))]
-  "TARGET_HARD_FLOAT && TARGET_MIPS3D"
+  "TARGET_HARD_FLOAT && GCC_OPTION (TARGET_MIPS3D)"
   "cabs.%Y3.ps\t%0,%1,%2"
   [(set_attr "type" "fcmp")
    (set_attr "mode" "FPSW")])
@@ -578,7 +578,7 @@
 			  (const_int 0))
 		      (label_ref (match_operand 0 "" ""))
 		      (pc)))]
-  "TARGET_HARD_FLOAT && TARGET_MIPS3D"
+  "TARGET_HARD_FLOAT && GCC_OPTION (TARGET_MIPS3D)"
   "%*bc1any4t\t%1,%0%/"
   [(set_attr "type" "branch")])
 
@@ -589,7 +589,7 @@
 			  (const_int -1))
 		      (label_ref (match_operand 0 "" ""))
 		      (pc)))]
-  "TARGET_HARD_FLOAT && TARGET_MIPS3D"
+  "TARGET_HARD_FLOAT && GCC_OPTION (TARGET_MIPS3D)"
   "%*bc1any4f\t%1,%0%/"
   [(set_attr "type" "branch")])
 
@@ -600,7 +600,7 @@
 			  (const_int 0))
 		      (label_ref (match_operand 0 "" ""))
 		      (pc)))]
-  "TARGET_HARD_FLOAT && TARGET_MIPS3D"
+  "TARGET_HARD_FLOAT && GCC_OPTION (TARGET_MIPS3D)"
   "%*bc1any2t\t%1,%0%/"
   [(set_attr "type" "branch")])
 
@@ -611,7 +611,7 @@
 			  (const_int -1))
 		      (label_ref (match_operand 0 "" ""))
 		      (pc)))]
-  "TARGET_HARD_FLOAT && TARGET_MIPS3D"
+  "TARGET_HARD_FLOAT && GCC_OPTION (TARGET_MIPS3D)"
   "%*bc1any2f\t%1,%0%/"
   [(set_attr "type" "branch")])
 
@@ -674,7 +674,7 @@
   [(set (match_operand:ANYF 0 "register_operand" "=f")
 	(unspec:ANYF [(match_operand:ANYF 1 "register_operand" "f")]
 		     UNSPEC_RSQRT1))]
-  "TARGET_HARD_FLOAT && TARGET_MIPS3D"
+  "TARGET_HARD_FLOAT && GCC_OPTION (TARGET_MIPS3D)"
   "rsqrt1.<fmt>\t%0,%1"
   [(set_attr "type" "frsqrt1")
    (set_attr "mode" "<UNITMODE>")])
@@ -684,7 +684,7 @@
 	(unspec:ANYF [(match_operand:ANYF 1 "register_operand" "f")
 		      (match_operand:ANYF 2 "register_operand" "f")]
 		     UNSPEC_RSQRT2))]
-  "TARGET_HARD_FLOAT && TARGET_MIPS3D"
+  "TARGET_HARD_FLOAT && GCC_OPTION (TARGET_MIPS3D)"
   "rsqrt2.<fmt>\t%0,%1,%2"
   [(set_attr "type" "frsqrt2")
    (set_attr "mode" "<UNITMODE>")])
@@ -693,7 +693,7 @@
   [(set (match_operand:ANYF 0 "register_operand" "=f")
 	(unspec:ANYF [(match_operand:ANYF 1 "register_operand" "f")]
 		     UNSPEC_RECIP1))]
-  "TARGET_HARD_FLOAT && TARGET_MIPS3D"
+  "TARGET_HARD_FLOAT && GCC_OPTION (TARGET_MIPS3D)"
   "recip1.<fmt>\t%0,%1"
   [(set_attr "type" "frdiv1")
    (set_attr "mode" "<UNITMODE>")])
@@ -703,7 +703,7 @@
 	(unspec:ANYF [(match_operand:ANYF 1 "register_operand" "f")
 		      (match_operand:ANYF 2 "register_operand" "f")]
 		     UNSPEC_RECIP2))]
-  "TARGET_HARD_FLOAT && TARGET_MIPS3D"
+  "TARGET_HARD_FLOAT && GCC_OPTION (TARGET_MIPS3D)"
   "recip2.<fmt>\t%0,%1,%2"
   [(set_attr "type" "frdiv2")
    (set_attr "mode" "<UNITMODE>")])
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 143169b..d50fc16 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -1433,7 +1433,7 @@ mips_insert_attributes (tree decl, tree *attributes)
 	error ("%qE cannot have both %qs and %qs attributes",
 	       DECL_NAME (decl), "mips16", "micromips");
 
-      if (TARGET_FLIP_MIPS16
+      if (GCC_OPTION (TARGET_FLIP_MIPS16)
 	  && !DECL_ARTIFICIAL (decl)
 	  && compression_flags == 0
 	  && nocompression_flags == 0)
@@ -1783,8 +1783,8 @@ mips_symbol_binds_local_p (const_rtx x)
 static bool
 mips_rtx_constant_in_small_data_p (enum machine_mode mode)
 {
-  return (!TARGET_EMBEDDED_DATA
-	  && TARGET_LOCAL_SDATA
+  return (!GCC_OPTION (TARGET_EMBEDDED_DATA)
+	  && GCC_OPTION (TARGET_LOCAL_SDATA)
 	  && GET_MODE_SIZE (mode) <= mips_small_data_threshold);
 }
 
@@ -1876,7 +1876,7 @@ mips_classify_symbol (const_rtx x, enum mips_symbol_context context)
 
   /* Do not use small-data accesses for weak symbols; they may end up
      being zero.  */
-  if (TARGET_GPOPT && SYMBOL_REF_SMALL_P (x) && !SYMBOL_REF_WEAK (x))
+  if (GCC_OPTION (TARGET_GPOPT) && SYMBOL_REF_SMALL_P (x) && !SYMBOL_REF_WEAK (x))
     return SYMBOL_GP_RELATIVE;
 
   /* Don't use GOT accesses for locally-binding symbols when -mno-shared
@@ -3995,7 +3995,7 @@ mips_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED,
     case MINUS:
       if (float_mode_p
 	  && (ISA_HAS_NMADD4_NMSUB4 || ISA_HAS_NMADD3_NMSUB3)
-	  && TARGET_FUSED_MADD
+	  && GCC_OPTION (TARGET_FUSED_MADD)
 	  && !HONOR_NANS (mode)
 	  && !HONOR_SIGNED_ZEROS (mode))
 	{
@@ -4028,7 +4028,7 @@ mips_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED,
 	  /* If this is part of a MADD or MSUB, treat the PLUS as
 	     being free.  */
 	  if ((ISA_HAS_FP_MADD4_MSUB4 || ISA_HAS_FP_MADD3_MSUB3)
-	      && TARGET_FUSED_MADD
+	      && GCC_OPTION (TARGET_FUSED_MADD)
 	      && GET_CODE (XEXP (x, 0)) == MULT)
 	    *total = 0;
 	  else
@@ -4047,7 +4047,7 @@ mips_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED,
     case NEG:
       if (float_mode_p
 	  && (ISA_HAS_NMADD4_NMSUB4 || ISA_HAS_NMADD3_NMSUB3)
-	  && TARGET_FUSED_MADD
+	  && GCC_OPTION (TARGET_FUSED_MADD)
 	  && !HONOR_NANS (mode)
 	  && HONOR_SIGNED_ZEROS (mode))
 	{
@@ -4092,7 +4092,7 @@ mips_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED,
       /* Check for a reciprocal.  */
       if (float_mode_p
 	  && ISA_HAS_FP_RECIP_RSQRT (mode)
-	  && flag_unsafe_math_optimizations
+	  && GCC_OPTION (flag_unsafe_math_optimizations)
 	  && XEXP (x, 0) == CONST1_RTX (mode))
 	{
 	  if (outer_code == SQRT || GET_CODE (XEXP (x, 1)) == SQRT)
@@ -5115,7 +5115,7 @@ mips_get_arg_info (struct mips_arg_info *info, const CUMULATIVE_ARGS *cum,
 
      The checks against UNITS_PER_FPVALUE handle the soft-float and
      single-float cases.  */
-  switch (mips_abi)
+  switch (GCC_OPTION (mips_abi))
     {
     case ABI_EABI:
       /* The EABI conventions have traditionally been defined in terms
@@ -5189,7 +5189,7 @@ mips_get_arg_info (struct mips_arg_info *info, const CUMULATIVE_ARGS *cum,
   /* Set REG_OFFSET to the register count we're interested in.
      The EABI allocates the floating-point registers separately,
      but the other ABIs allocate them like integer registers.  */
-  info->reg_offset = (mips_abi == ABI_EABI && info->fpr_p
+  info->reg_offset = (GCC_OPTION (mips_abi) == ABI_EABI && info->fpr_p
 		      ? cum->num_fprs
 		      : cum->num_gprs);
 
@@ -5218,7 +5218,7 @@ mips_arg_regno (const struct mips_arg_info *info, bool hard_float_p)
 {
   if (!info->fpr_p || !hard_float_p)
     return GP_ARG_FIRST + info->reg_offset;
-  else if (mips_abi == ABI_32 && TARGET_DOUBLE_FLOAT && info->reg_offset > 0)
+  else if (GCC_OPTION (mips_abi) == ABI_32 && TARGET_DOUBLE_FLOAT && info->reg_offset > 0)
     /* In o32, the second argument is always passed in $f14
        for TARGET_DOUBLE_FLOAT, regardless of whether the
        first argument was a word or doubleword.  */
@@ -5387,7 +5387,7 @@ mips_function_arg_advance (cumulative_args_t cum_v, enum machine_mode mode,
      num_gprs to MAX_ARGS_IN_REGISTERS if a doubleword-aligned
      argument required us to skip the final GPR and pass the whole
      argument on the stack.  */
-  if (mips_abi != ABI_EABI || !info.fpr_p)
+  if (GCC_OPTION (mips_abi) != ABI_EABI || !info.fpr_p)
     cum->num_gprs = info.reg_offset + info.reg_words;
   else if (info.reg_words > 0)
     cum->num_fprs += MAX_FPRS_PER_FMT;
@@ -5452,12 +5452,12 @@ mips_pad_arg_upward (enum machine_mode mode, const_tree type)
     return false;
 
   /* Big-endian o64 pads floating-point arguments downward.  */
-  if (mips_abi == ABI_O64)
+  if (GCC_OPTION (mips_abi) == ABI_O64)
     if (type != 0 ? FLOAT_TYPE_P (type) : GET_MODE_CLASS (mode) == MODE_FLOAT)
       return false;
 
   /* Other types are padded upward for o32, o64, n32 and n64.  */
-  if (mips_abi != ABI_EABI)
+  if (GCC_OPTION (mips_abi) != ABI_EABI)
     return true;
 
   /* Arguments smaller than a stack slot are padded downward.  */
@@ -5490,7 +5490,7 @@ mips_pass_by_reference (cumulative_args_t cum ATTRIBUTE_UNUSED,
 			enum machine_mode mode, const_tree type,
 			bool named ATTRIBUTE_UNUSED)
 {
-  if (mips_abi == ABI_EABI)
+  if (GCC_OPTION (mips_abi) == ABI_EABI)
     {
       int size;
 
@@ -5517,7 +5517,7 @@ mips_callee_copies (cumulative_args_t cum ATTRIBUTE_UNUSED,
 		    enum machine_mode mode ATTRIBUTE_UNUSED,
 		    const_tree type ATTRIBUTE_UNUSED, bool named)
 {
-  return mips_abi == ABI_EABI && named;
+  return GCC_OPTION (mips_abi) == ABI_EABI && named;
 }
 
 /* See whether VALTYPE is a record whose fields should be returned in
@@ -5701,7 +5701,7 @@ mips_function_value_1 (const_tree valtype, const_tree fn_decl_or_type,
 	 For example, "struct { some_type x; }" and "union { some_type x; }"
 	 are returned in the same way as a bare "some_type" would be.
 	 Other ABIs only use FPRs for scalar, complex or vector types.  */
-      if (mips_abi != ABI_EABI && !FLOAT_TYPE_P (valtype))
+      if (GCC_OPTION (mips_abi) != ABI_EABI && !FLOAT_TYPE_P (valtype))
 	return gen_rtx_REG (mode, GP_RETURN);
     }
 
@@ -6299,7 +6299,7 @@ mips_start_function_definition (const char *name, bool mips16_p)
     fprintf (asm_out_file, "\t.set\tnomicromips\n");
 #endif
 
-  if (!flag_inhibit_size_directive)
+  if (!GCC_OPTION (flag_inhibit_size_directive))
     {
       fputs ("\t.ent\t", asm_out_file);
       assemble_name (asm_out_file, name);
@@ -6318,7 +6318,7 @@ mips_start_function_definition (const char *name, bool mips16_p)
 static void
 mips_end_function_definition (const char *name)
 {
-  if (!flag_inhibit_size_directive)
+  if (!GCC_OPTION (flag_inhibit_size_directive))
     {
       fputs ("\t.end\t", asm_out_file);
       assemble_name (asm_out_file, name);
@@ -7122,7 +7122,7 @@ mips_call_may_need_jalx_p (tree decl)
   /* When -minterlink-compressed is in effect, assume that functions
      could use a different encoding mode unless an attribute explicitly
      tells us otherwise.  */
-  if (TARGET_INTERLINK_COMPRESSED)
+  if (GCC_OPTION (TARGET_INTERLINK_COMPRESSED))
     {
       if (!TARGET_COMPRESSION
 	  && mips_get_compress_off_flags (DECL_ATTRIBUTES (decl)) ==0)
@@ -7429,7 +7429,7 @@ mips_expand_block_move (rtx dest, rtx src, rtx length)
 	  mips_block_move_straight (dest, src, INTVAL (length));
 	  return true;
 	}
-      else if (optimize)
+      else if (GCC_OPTION (optimize))
 	{
 	  mips_block_move_loop (dest, src, INTVAL (length),
 				MIPS_MAX_MOVE_BYTES_PER_LOOP_ITER);
@@ -7811,9 +7811,9 @@ static bool
 mips_split_addresses_p (void)
 {
   return (TARGET_SPLIT_ADDRESSES
-	  && optimize
+	  && GCC_OPTION (optimize)
 	  && !TARGET_MIPS16
-	  && !flag_pic
+	  && !GCC_OPTION (flag_pic)
 	  && !ABI_HAS_64BIT_SYMBOLS);
 }
 
@@ -7893,7 +7893,7 @@ mips_init_relocs (void)
 	/* Expose the use of $28 as soon as possible.  */
 	mips_split_hi_p[SYMBOL_GOT_PAGE_OFST] = true;
 
-      if (TARGET_XGOT)
+      if (GCC_OPTION (TARGET_XGOT))
 	{
 	  /* The HIGH and LO_SUM are matched by special .md patterns.  */
 	  mips_split_p[SYMBOL_GOT_DISP] = true;
@@ -8427,7 +8427,7 @@ mips_encode_section_info (tree decl, rtx rtl, int first)
       tree type = TREE_TYPE (decl);
 
       /* Encode whether the symbol is short or long.  */
-      if ((TARGET_LONG_CALLS && !mips_near_type_p (type))
+      if ((GCC_OPTION (TARGET_LONG_CALLS) && !mips_near_type_p (type))
 	  || mips_far_type_p (type))
 	SYMBOL_REF_FLAGS (symbol) |= SYMBOL_FLAG_LONG_CALL;
     }
@@ -8470,8 +8470,8 @@ mips_function_rodata_section (tree decl)
 	  rname[14] = 'd';
 	  return get_section (rname, SECTION_LINKONCE | SECTION_WRITE, decl);
 	}
-      else if (flag_function_sections
-	       && flag_data_sections
+      else if (GCC_OPTION (flag_function_sections)
+	       && GCC_OPTION (flag_data_sections)
 	       && strncmp (name, ".text.", 6) == 0)
 	{
 	  char *rname = ASTRDUP (name);
@@ -8512,7 +8512,7 @@ mips_in_small_data_p (const_tree decl)
       if (mips_lo_relocs[SYMBOL_GP_RELATIVE] || !DECL_EXTERNAL (decl))
 	return true;
     }
-  else if (TARGET_EMBEDDED_DATA)
+  else if (GCC_OPTION (TARGET_EMBEDDED_DATA))
     {
       /* Don't put constants into the small data section: we want them
 	 to be in ROM rather than RAM.  */
@@ -8526,11 +8526,11 @@ mips_in_small_data_p (const_tree decl)
     }
 
   /* Enforce -mlocal-sdata.  */
-  if (!TARGET_LOCAL_SDATA && !TREE_PUBLIC (decl))
+  if (!GCC_OPTION (TARGET_LOCAL_SDATA) && !TREE_PUBLIC (decl))
     return false;
 
   /* Enforce -mextern-sdata.  */
-  if (!TARGET_EXTERN_SDATA && DECL_P (decl))
+  if (!GCC_OPTION (TARGET_EXTERN_SDATA) && DECL_P (decl))
     {
       if (DECL_EXTERNAL (decl))
 	return false;
@@ -8630,7 +8630,7 @@ mips_output_filename (FILE *stream, const char *name)
 {
   /* If we are emitting DWARF-2, let dwarf2out handle the ".file"
      directives.  */
-  if (write_symbols == DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == DWARF2_DEBUG)
     return;
   else if (mips_output_filename_first_time)
     {
@@ -8643,7 +8643,7 @@ mips_output_filename (FILE *stream, const char *name)
     }
   /* If we are emitting stabs, let dbxout.c handle this (except for
      the mips_output_filename_first_time case).  */
-  else if (write_symbols == DBX_DEBUG)
+  else if (GCC_OPTION (write_symbols) == DBX_DEBUG)
     return;
   else if (name != current_function_file
 	   && strcmp (name, current_function_file) != 0)
@@ -8858,8 +8858,8 @@ mips_output_aligned_decl_common (FILE *stream, tree decl, const char *name,
 {
   /* If the target wants uninitialized const declarations in
      .rdata then don't put them in .comm.  */
-  if (TARGET_EMBEDDED_DATA
-      && TARGET_UNINIT_CONST_IN_RODATA
+  if (GCC_OPTION (TARGET_EMBEDDED_DATA)
+      && GCC_OPTION (TARGET_UNINIT_CONST_IN_RODATA)
       && TREE_CODE (decl) == VAR_DECL
       && TREE_READONLY (decl)
       && (DECL_INITIAL (decl) == 0 || DECL_INITIAL (decl) == error_mark_node))
@@ -8893,7 +8893,7 @@ mips_declare_object_name (FILE *stream, const char *name,
 #endif
 
   size_directive_output = 0;
-  if (!flag_inhibit_size_directive && DECL_SIZE (decl))
+  if (!GCC_OPTION (flag_inhibit_size_directive) && DECL_SIZE (decl))
     {
       HOST_WIDE_INT size;
 
@@ -8913,7 +8913,7 @@ mips_finish_declare_object (FILE *stream, tree decl, int top_level, int at_end)
   const char *name;
 
   name = XSTR (XEXP (DECL_RTL (decl), 0), 0);
-  if (!flag_inhibit_size_directive
+  if (!GCC_OPTION (flag_inhibit_size_directive)
       && DECL_SIZE (decl) != 0
       && !at_end
       && top_level
@@ -8935,7 +8935,7 @@ mips_finish_declare_object (FILE *stream, tree decl, int top_level, int at_end)
 static const char *
 mips_mdebug_abi_name (void)
 {
-  switch (mips_abi)
+  switch (GCC_OPTION (mips_abi))
     {
     case ABI_32:
       return "abi32";
@@ -8974,21 +8974,21 @@ mips_file_start (void)
      EABI from long64 forms.  Emit a special section to help tools
      such as GDB.  Do the same for o64, which is sometimes used with
      -mlong64.  */
-  if (mips_abi == ABI_EABI || mips_abi == ABI_O64)
+  if (GCC_OPTION (mips_abi) == ABI_EABI || GCC_OPTION (mips_abi) == ABI_O64)
     fprintf (asm_out_file, "\t.section .gcc_compiled_long%d\n"
 	     "\t.previous\n", TARGET_LONG64 ? 64 : 32);
 
   /* Record the NaN encoding.  */
-  if (HAVE_AS_NAN || mips_nan != MIPS_IEEE_754_DEFAULT)
+  if (HAVE_AS_NAN || GCC_OPTION (mips_nan) != MIPS_IEEE_754_DEFAULT)
     fprintf (asm_out_file, "\t.nan\t%s\n",
-	     mips_nan == MIPS_IEEE_754_2008 ? "2008" : "legacy");
+	     GCC_OPTION (mips_nan) == MIPS_IEEE_754_2008 ? "2008" : "legacy");
 
 #ifdef HAVE_AS_GNU_ATTRIBUTE
   {
     int attr;
 
     /* No floating-point operations, -mno-float.  */
-    if (TARGET_NO_FLOAT)
+    if (GCC_OPTION (TARGET_NO_FLOAT))
       attr = 0;
     /* Soft-float code, -msoft-float.  */
     else if (!TARGET_HARD_FLOAT_ABI)
@@ -9015,7 +9015,7 @@ mips_file_start (void)
 	fprintf (asm_out_file, "\t.option\tpic0\n");
     }
 
-  if (flag_verbose_asm)
+  if (GCC_OPTION (flag_verbose_asm))
     fprintf (asm_out_file, "\n%s -G value = %d, Arch = %s, ISA = %d\n",
 	     ASM_COMMENT_START,
 	     mips_small_data_threshold, mips_arch_info->name, mips_isa);
@@ -9808,7 +9808,7 @@ mips_interrupt_extra_call_saved_reg_p (unsigned int regno)
   if (MD_REG_P (regno))
     return true;
 
-  if (TARGET_DSP && DSP_ACC_REG_P (regno))
+  if (GCC_OPTION (TARGET_DSP) && DSP_ACC_REG_P (regno))
     return true;
 
   if (GP_REG_P (regno) && !cfun->machine->use_shadow_register_set_p)
@@ -10774,7 +10774,7 @@ mips_output_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
   mips_start_function_definition (fnname, TARGET_MIPS16);
 
   /* Output MIPS-specific frame information.  */
-  if (!flag_inhibit_size_directive)
+  if (!GCC_OPTION (flag_inhibit_size_directive))
     {
       const struct mips_frame_info *frame;
 
@@ -11114,10 +11114,10 @@ mips_expand_prologue (void)
   frame = &cfun->machine->frame;
   size = frame->total_size;
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = size;
 
-  if (flag_stack_check == STATIC_BUILTIN_STACK_CHECK)
+  if (GCC_OPTION (flag_stack_check) == STATIC_BUILTIN_STACK_CHECK)
     {
       if (crtl->is_leaf && !cfun->calls_alloca)
 	{
@@ -12243,7 +12243,7 @@ mips_vector_mode_supported_p (enum machine_mode mode)
     case V2UHAmode:
     case V4QQmode:
     case V4UQQmode:
-      return TARGET_DSP;
+      return GCC_OPTION (TARGET_DSP);
 
     case V2SImode:
     case V4HImode:
@@ -12283,7 +12283,7 @@ mips_preferred_simd_mode (enum machine_mode mode ATTRIBUTE_UNUSED)
 static void
 mips_init_libfuncs (void)
 {
-  if (TARGET_FIX_VR4120)
+  if (GCC_OPTION (TARGET_FIX_VR4120))
     {
       /* Register the special divsi3 and modsi3 functions needed to work
 	 around VR4120 division errata.  */
@@ -12358,7 +12358,7 @@ mips_process_load_label (rtx target)
   HOST_WIDE_INT offset;
 
   mips_multi_start ();
-  switch (mips_abi)
+  switch (GCC_OPTION (mips_abi))
     {
     case ABI_N32:
       mips_multi_add_insn ("lw\t%@,%%got_page(%0)(%+)", target, 0);
@@ -12529,7 +12529,7 @@ mips_output_conditional_branch (rtx insn, rtx *operands,
       if (!INSN_ANNULLED_BRANCH_P (insn))
 	{
 	  final_scan_insn (XVECEXP (final_sequence, 0, 1),
-			   asm_out_file, optimize, 1, NULL);
+			   asm_out_file, GCC_OPTION (optimize), 1, NULL);
 	  INSN_DELETED_P (XVECEXP (final_sequence, 0, 1)) = 1;
 	}
       else
@@ -12554,7 +12554,7 @@ mips_output_conditional_branch (rtx insn, rtx *operands,
       if (INSN_ANNULLED_BRANCH_P (insn))
 	{
 	  final_scan_insn (XVECEXP (final_sequence, 0, 1),
-			   asm_out_file, optimize, 1, NULL);
+			   asm_out_file, GCC_OPTION (optimize), 1, NULL);
 	  INSN_DELETED_P (XVECEXP (final_sequence, 0, 1)) = 1;
 	}
       else
@@ -13772,12 +13772,12 @@ struct mips_builtin_description {
 AVAIL_ALL (hard_float, TARGET_HARD_FLOAT_ABI)
 AVAIL_NON_MIPS16 (paired_single, TARGET_PAIRED_SINGLE_FLOAT)
 AVAIL_NON_MIPS16 (sb1_paired_single, TARGET_SB1 && TARGET_PAIRED_SINGLE_FLOAT)
-AVAIL_NON_MIPS16 (mips3d, TARGET_MIPS3D)
-AVAIL_NON_MIPS16 (dsp, TARGET_DSP)
-AVAIL_NON_MIPS16 (dspr2, TARGET_DSPR2)
-AVAIL_NON_MIPS16 (dsp_32, !TARGET_64BIT && TARGET_DSP)
-AVAIL_NON_MIPS16 (dsp_64, TARGET_64BIT && TARGET_DSP)
-AVAIL_NON_MIPS16 (dspr2_32, !TARGET_64BIT && TARGET_DSPR2)
+AVAIL_NON_MIPS16 (mips3d, GCC_OPTION (TARGET_MIPS3D))
+AVAIL_NON_MIPS16 (dsp, GCC_OPTION (TARGET_DSP))
+AVAIL_NON_MIPS16 (dspr2, GCC_OPTION (TARGET_DSPR2))
+AVAIL_NON_MIPS16 (dsp_32, !TARGET_64BIT && GCC_OPTION (TARGET_DSP))
+AVAIL_NON_MIPS16 (dsp_64, TARGET_64BIT && GCC_OPTION (TARGET_DSP))
+AVAIL_NON_MIPS16 (dspr2_32, !TARGET_64BIT && GCC_OPTION (TARGET_DSPR2))
 AVAIL_NON_MIPS16 (loongson, TARGET_LOONGSON_VECTORS)
 AVAIL_NON_MIPS16 (cache, TARGET_CACHE_BUILTIN)
 
@@ -14838,7 +14838,7 @@ mips16_rewrite_pool_refs (rtx *x, void *data)
 static bool
 mips_cfg_in_reorg (void)
 {
-  return (mips_r10k_cache_barrier != R10K_CACHE_BARRIER_NONE
+  return (GCC_OPTION (mips_r10k_cache_barrier) != R10K_CACHE_BARRIER_NONE
 	  || TARGET_RELAX_PIC_CALLS);
 }
 
@@ -15153,7 +15153,7 @@ r10k_needs_protection_p (rtx insn)
   if (CALL_P (insn))
     return for_each_rtx (&PATTERN (insn), r10k_needs_protection_p_call, NULL);
 
-  if (mips_r10k_cache_barrier == R10K_CACHE_BARRIER_STORE)
+  if (GCC_OPTION (mips_r10k_cache_barrier) == R10K_CACHE_BARRIER_STORE)
     {
       note_stores (PATTERN (insn), r10k_needs_protection_p_store, &insn);
       return insn == NULL_RTX;
@@ -16218,9 +16218,9 @@ mips_reorg_process_insns (void)
   /* Code compiled with -mfix-vr4120, -mfix-rm7000 or -mfix-24k can't be
      all noreorder because we rely on the assembler to work around some
      errata.  The R5900 too has several bugs.  */
-  if (TARGET_FIX_VR4120
-      || TARGET_FIX_RM7000
-      || TARGET_FIX_24K
+  if (GCC_OPTION (TARGET_FIX_VR4120)
+      || GCC_OPTION (TARGET_FIX_RM7000)
+      || GCC_OPTION (TARGET_FIX_24K)
       || TARGET_MIPS5900)
     cfun->machine->all_noreorder_p = false;
 
@@ -16228,7 +16228,7 @@ mips_reorg_process_insns (void)
      MFHI instructions.  Note that we avoid using MFLO and MFHI if
      the VR4130 MACC and DMACC instructions are available instead;
      see the *mfhilo_{si,di}_macc patterns.  */
-  if (TARGET_FIX_VR4130 && !ISA_HAS_MACCHI)
+  if (GCC_OPTION (TARGET_FIX_VR4130) && !ISA_HAS_MACCHI)
     cfun->machine->all_noreorder_p = false;
 
   htab.create (37);
@@ -16377,7 +16377,7 @@ mips_df_reorg (void)
   if (TARGET_RELAX_PIC_CALLS)
     mips_annotate_pic_calls ();
 
-  if (mips_r10k_cache_barrier != R10K_CACHE_BARRIER_NONE)
+  if (GCC_OPTION (mips_r10k_cache_barrier) != R10K_CACHE_BARRIER_NONE)
     r10k_insert_cache_barriers ();
 
   df_finish_pass (false);
@@ -16707,40 +16707,40 @@ mips_set_compression_mode (unsigned int compression_mode)
     return;
 
   /* Restore base settings of various flags.  */
-  target_flags = mips_base_target_flags;
-  flag_schedule_insns = mips_base_schedule_insns;
-  flag_reorder_blocks_and_partition = mips_base_reorder_blocks_and_partition;
-  flag_move_loop_invariants = mips_base_move_loop_invariants;
-  align_loops = mips_base_align_loops;
-  align_jumps = mips_base_align_jumps;
-  align_functions = mips_base_align_functions;
-  target_flags &= ~(MASK_MIPS16 | MASK_MICROMIPS);
-  target_flags |= compression_mode;
+  GCC_OPTION (target_flags) = mips_base_target_flags;
+  GCC_OPTION (flag_schedule_insns) = mips_base_schedule_insns;
+  GCC_OPTION (flag_reorder_blocks_and_partition) = mips_base_reorder_blocks_and_partition;
+  GCC_OPTION (flag_move_loop_invariants) = mips_base_move_loop_invariants;
+  GCC_OPTION (align_loops) = mips_base_align_loops;
+  GCC_OPTION (align_jumps) = mips_base_align_jumps;
+  GCC_OPTION (align_functions) = mips_base_align_functions;
+  GCC_OPTION (target_flags) &= ~(MASK_MIPS16 | MASK_MICROMIPS);
+  GCC_OPTION (target_flags) |= compression_mode;
 
   if (compression_mode & MASK_MIPS16)
     {
       /* Switch to MIPS16 mode.  */
-      target_flags |= MASK_MIPS16;
+      GCC_OPTION (target_flags) |= MASK_MIPS16;
 
       /* Turn off SYNCI if it was on, MIPS16 doesn't support it.  */
-      target_flags &= ~MASK_SYNCI;
+      GCC_OPTION (target_flags) &= ~MASK_SYNCI;
 
       /* Don't run the scheduler before reload, since it tends to
          increase register pressure.  */
-      flag_schedule_insns = 0;
+      GCC_OPTION (flag_schedule_insns) = 0;
 
       /* Don't do hot/cold partitioning.  mips16_lay_out_constants expects
 	 the whole function to be in a single section.  */
-      flag_reorder_blocks_and_partition = 0;
+      GCC_OPTION (flag_reorder_blocks_and_partition) = 0;
 
       /* Don't move loop invariants, because it tends to increase
 	 register pressure.  It also introduces an extra move in cases
 	 where the constant is the first operand in a two-operand binary
 	 instruction, or when it forms a register argument to a functon
 	 call.  */
-      flag_move_loop_invariants = 0;
+      GCC_OPTION (flag_move_loop_invariants) = 0;
 
-      target_flags |= MASK_EXPLICIT_RELOCS;
+      GCC_OPTION (target_flags) |= MASK_EXPLICIT_RELOCS;
 
       /* Experiments suggest we get the best overall section-anchor
 	 results from using the range of an unextended LW or SW.  Code
@@ -16753,17 +16753,17 @@ mips_set_compression_mode (unsigned int compression_mode)
       targetm.const_anchor = 0;
 
       /* MIPS16 has no BAL instruction.  */
-      target_flags &= ~MASK_RELAX_PIC_CALLS;
+      GCC_OPTION (target_flags) &= ~MASK_RELAX_PIC_CALLS;
 
       /* The R4000 errata don't apply to any known MIPS16 cores.
 	 It's simpler to make the R4000 fixes and MIPS16 mode
 	 mutually exclusive.  */
-      target_flags &= ~MASK_FIX_R4000;
+      GCC_OPTION (target_flags) &= ~MASK_FIX_R4000;
 
-      if (flag_pic && !TARGET_OLDABI)
+      if (GCC_OPTION (flag_pic) && !TARGET_OLDABI)
 	sorry ("MIPS16 PIC for ABIs other than o32 and o64");
 
-      if (TARGET_XGOT)
+      if (GCC_OPTION (TARGET_XGOT))
 	sorry ("MIPS16 -mxgot code");
 
       if (TARGET_HARD_FLOAT_ABI && !TARGET_OLDABI)
@@ -16775,17 +16775,17 @@ mips_set_compression_mode (unsigned int compression_mode)
 
       if (TARGET_MICROMIPS)
 	/* Avoid branch likely.  */
-	target_flags &= ~MASK_BRANCHLIKELY;
+	GCC_OPTION (target_flags) &= ~MASK_BRANCHLIKELY;
 
       /* Provide default values for align_* for 64-bit targets.  */
       if (TARGET_64BIT)
 	{
-	  if (align_loops == 0)
-	    align_loops = 8;
-	  if (align_jumps == 0)
-	    align_jumps = 8;
-	  if (align_functions == 0)
-	    align_functions = 8;
+	  if (GCC_OPTION (align_loops) == 0)
+	    GCC_OPTION (align_loops) = 8;
+	  if (GCC_OPTION (align_jumps) == 0)
+	    GCC_OPTION (align_jumps) = 8;
+	  if (GCC_OPTION (align_functions) == 0)
+	    GCC_OPTION (align_functions) = 8;
 	}
 
       targetm.min_anchor_offset = -32768;
@@ -16923,7 +16923,7 @@ mips_option_override (void)
   int i, start, regno, mode;
 
   if (global_options_set.x_mips_isa_option)
-    mips_isa_option_info = &mips_cpu_info_table[mips_isa_option];
+    mips_isa_option_info = &mips_cpu_info_table[GCC_OPTION (mips_isa_option)];
 
 #ifdef SUBTARGET_OVERRIDE_OPTIONS
   SUBTARGET_OVERRIDE_OPTIONS;
@@ -16936,21 +16936,21 @@ mips_option_override (void)
   /* Save the base compression state and process flags as though we
      were generating uncompressed code.  */
   mips_base_compression_flags = TARGET_COMPRESSION;
-  target_flags &= ~TARGET_COMPRESSION;
+  GCC_OPTION (target_flags) &= ~TARGET_COMPRESSION;
 
   /* -mno-float overrides -mhard-float and -msoft-float.  */
-  if (TARGET_NO_FLOAT)
+  if (GCC_OPTION (TARGET_NO_FLOAT))
     {
-      target_flags |= MASK_SOFT_FLOAT_ABI;
+      GCC_OPTION (target_flags) |= MASK_SOFT_FLOAT_ABI;
       target_flags_explicit |= MASK_SOFT_FLOAT_ABI;
     }
 
-  if (TARGET_FLIP_MIPS16)
-    TARGET_INTERLINK_COMPRESSED = 1;
+  if (GCC_OPTION (TARGET_FLIP_MIPS16))
+    GCC_OPTION (TARGET_INTERLINK_COMPRESSED) = 1;
 
   /* Set the small data limit.  */
   mips_small_data_threshold = (global_options_set.x_g_switch_value
-			       ? g_switch_value
+			       ? GCC_OPTION (g_switch_value)
 			       : MIPS_DEFAULT_GVALUE);
 
   /* The following code determines the architecture and register size.
@@ -16958,7 +16958,7 @@ mips_option_override (void)
      The GAS and GCC code should be kept in sync as much as possible.  */
 
   if (global_options_set.x_mips_arch_option)
-    mips_set_architecture (mips_cpu_info_from_opt (mips_arch_option));
+    mips_set_architecture (mips_cpu_info_from_opt (GCC_OPTION (mips_arch_option)));
 
   if (mips_isa_option_info != 0)
     {
@@ -16980,7 +16980,7 @@ mips_option_override (void)
 
   /* Optimize for mips_arch, unless -mtune selects a different processor.  */
   if (global_options_set.x_mips_tune_option)
-    mips_set_tune (mips_cpu_info_from_opt (mips_tune_option));
+    mips_set_tune (mips_cpu_info_from_opt (GCC_OPTION (mips_tune_option)));
 
   if (mips_tune_info == 0)
     mips_set_tune (mips_arch_info);
@@ -17002,9 +17002,9 @@ mips_option_override (void)
 	 Restrict ourselves to 32-bit registers if that's all the
 	 processor has, or if the ABI cannot handle 64-bit registers.  */
       if (ABI_NEEDS_32BIT_REGS || !ISA_HAS_64BIT_REGS)
-	target_flags &= ~MASK_64BIT;
+	GCC_OPTION (target_flags) &= ~MASK_64BIT;
       else
-	target_flags |= MASK_64BIT;
+	GCC_OPTION (target_flags) |= MASK_64BIT;
     }
 
   if ((target_flags_explicit & MASK_FLOAT64) != 0)
@@ -17018,7 +17018,7 @@ mips_option_override (void)
 	  if (!ISA_HAS_MXHC1)
 	    error ("%<-mgp32%> and %<-mfp64%> can only be combined if"
 		   " the target supports the mfhc1 and mthc1 instructions");
-	  else if (mips_abi != ABI_32)
+	  else if (GCC_OPTION (mips_abi) != ABI_32)
 	    error ("%<-mgp32%> and %<-mfp64%> can only be combined when using"
 		   " the o32 ABI");
 	}
@@ -17028,9 +17028,9 @@ mips_option_override (void)
       /* -msingle-float selects 32-bit float registers.  Otherwise the
 	 float registers should be the same size as the integer ones.  */
       if (TARGET_64BIT && TARGET_DOUBLE_FLOAT)
-	target_flags |= MASK_FLOAT64;
+	GCC_OPTION (target_flags) |= MASK_FLOAT64;
       else
-	target_flags &= ~MASK_FLOAT64;
+	GCC_OPTION (target_flags) &= ~MASK_FLOAT64;
     }
 
   /* End of code shared with GAS.  */
@@ -17046,11 +17046,11 @@ mips_option_override (void)
     {
       if (TARGET_LONG64)
 	{
-	  if (mips_abi == ABI_N32)
+	  if (GCC_OPTION (mips_abi) == ABI_N32)
 	    error ("%qs is incompatible with %qs", "-mabi=n32", "-mlong64");
-	  else if (mips_abi == ABI_32)
+	  else if (GCC_OPTION (mips_abi) == ABI_32)
 	    error ("%qs is incompatible with %qs", "-mabi=32", "-mlong64");
-	  else if (mips_abi == ABI_O64 && TARGET_ABICALLS)
+	  else if (GCC_OPTION (mips_abi) == ABI_O64 && TARGET_ABICALLS)
 	    /* We have traditionally allowed non-abicalls code to use
 	       an LP64 form of o64.  However, it would take a bit more
 	       effort to support the combination of 32-bit GOT entries
@@ -17061,31 +17061,31 @@ mips_option_override (void)
 	}
       else
 	{
-	  if (mips_abi == ABI_64)
+	  if (GCC_OPTION (mips_abi) == ABI_64)
 	    error ("%qs is incompatible with %qs", "-mabi=64", "-mlong32");
 	}
     }
   else
     {
-      if ((mips_abi == ABI_EABI && TARGET_64BIT) || mips_abi == ABI_64)
-	target_flags |= MASK_LONG64;
+      if ((GCC_OPTION (mips_abi) == ABI_EABI && TARGET_64BIT) || GCC_OPTION (mips_abi) == ABI_64)
+	GCC_OPTION (target_flags) |= MASK_LONG64;
       else
-	target_flags &= ~MASK_LONG64;
+	GCC_OPTION (target_flags) &= ~MASK_LONG64;
     }
 
   if (!TARGET_OLDABI)
-    flag_pcc_struct_return = 0;
+    GCC_OPTION (flag_pcc_struct_return) = 0;
 
   /* Decide which rtx_costs structure to use.  */
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     mips_cost = &mips_rtx_cost_optimize_size;
   else
     mips_cost = &mips_rtx_cost_data[mips_tune];
 
   /* If the user hasn't specified a branch cost, use the processor's
      default.  */
-  if (mips_branch_cost == 0)
-    mips_branch_cost = mips_cost->branch_cost;
+  if (GCC_OPTION (mips_branch_cost) == 0)
+    GCC_OPTION (mips_branch_cost) = mips_cost->branch_cost;
 
   /* If neither -mbranch-likely nor -mno-branch-likely was given
      on the command line, set MASK_BRANCHLIKELY based on the target
@@ -17095,11 +17095,11 @@ mips_option_override (void)
   if ((target_flags_explicit & MASK_BRANCHLIKELY) == 0)
     {
       if (ISA_HAS_BRANCHLIKELY
-	  && (optimize_size
+	  && (GCC_OPTION (optimize_size)
 	      || (mips_tune_info->tune_flags & PTF_AVOID_BRANCHLIKELY) == 0))
-	target_flags |= MASK_BRANCHLIKELY;
+	GCC_OPTION (target_flags) |= MASK_BRANCHLIKELY;
       else
-	target_flags &= ~MASK_BRANCHLIKELY;
+	GCC_OPTION (target_flags) &= ~MASK_BRANCHLIKELY;
     }
   else if (TARGET_BRANCHLIKELY && !ISA_HAS_BRANCHLIKELY)
     warning (0, "the %qs architecture does not support branch-likely"
@@ -17112,25 +17112,25 @@ mips_option_override (void)
     {
       if (ISA_HAS_MADD_MSUB &&
           (mips_tune_info->tune_flags & PTF_AVOID_IMADD) == 0)
-	target_flags |= MASK_IMADD;
+	GCC_OPTION (target_flags) |= MASK_IMADD;
       else
-	target_flags &= ~MASK_IMADD;
+	GCC_OPTION (target_flags) &= ~MASK_IMADD;
     }
   else if (TARGET_IMADD && !ISA_HAS_MADD_MSUB)
     warning (0, "the %qs architecture does not support madd or msub"
 	     " instructions", mips_arch_info->name);
 
   /* The effect of -mabicalls isn't defined for the EABI.  */
-  if (mips_abi == ABI_EABI && TARGET_ABICALLS)
+  if (GCC_OPTION (mips_abi) == ABI_EABI && TARGET_ABICALLS)
     {
       error ("unsupported combination: %s", "-mabicalls -mabi=eabi");
-      target_flags &= ~MASK_ABICALLS;
+      GCC_OPTION (target_flags) &= ~MASK_ABICALLS;
     }
 
   /* PIC requires -mabicalls.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
-      if (mips_abi == ABI_EABI)
+      if (GCC_OPTION (mips_abi) == ABI_EABI)
 	error ("cannot generate position-independent code for %qs",
 	       "-mabi=eabi");
       else if (!TARGET_ABICALLS)
@@ -17147,30 +17147,30 @@ mips_option_override (void)
        between -mabicalls and -mno-abicalls code.  The non-__PIC__
        variant is usually appropriate for TARGET_ABICALLS_PIC0, as
        long as any indirect jumps use $25.  */
-    flag_pic = 1;
+    GCC_OPTION (flag_pic) = 1;
 
   /* -mvr4130-align is a "speed over size" optimization: it usually produces
      faster code, but at the expense of more nops.  Enable it at -O3 and
      above.  */
-  if (optimize > 2 && (target_flags_explicit & MASK_VR4130_ALIGN) == 0)
-    target_flags |= MASK_VR4130_ALIGN;
+  if (GCC_OPTION (optimize) > 2 && (target_flags_explicit & MASK_VR4130_ALIGN) == 0)
+    GCC_OPTION (target_flags) |= MASK_VR4130_ALIGN;
 
   /* Prefer a call to memcpy over inline code when optimizing for size,
      though see MOVE_RATIO in mips.h.  */
-  if (optimize_size && (target_flags_explicit & MASK_MEMCPY) == 0)
-    target_flags |= MASK_MEMCPY;
+  if (GCC_OPTION (optimize_size) && (target_flags_explicit & MASK_MEMCPY) == 0)
+    GCC_OPTION (target_flags) |= MASK_MEMCPY;
 
   /* If we have a nonzero small-data limit, check that the -mgpopt
      setting is consistent with the other target flags.  */
   if (mips_small_data_threshold > 0)
     {
-      if (!TARGET_GPOPT)
+      if (!GCC_OPTION (TARGET_GPOPT))
 	{
 	  if (!TARGET_EXPLICIT_RELOCS)
 	    error ("%<-mno-gpopt%> needs %<-mexplicit-relocs%>");
 
-	  TARGET_LOCAL_SDATA = false;
-	  TARGET_EXTERN_SDATA = false;
+	  GCC_OPTION (TARGET_LOCAL_SDATA) = false;
+	  GCC_OPTION (TARGET_EXTERN_SDATA) = false;
 	}
       else
 	{
@@ -17185,7 +17185,7 @@ mips_option_override (void)
 
   /* Pre-IEEE 754-2008 MIPS hardware has a quirky almost-IEEE format
      for all its floating point.  */
-  if (mips_nan != MIPS_IEEE_754_2008)
+  if (GCC_OPTION (mips_nan) != MIPS_IEEE_754_2008)
     {
       REAL_MODE_FORMAT (SFmode) = &mips_single_format;
       REAL_MODE_FORMAT (DFmode) = &mips_double_format;
@@ -17194,24 +17194,24 @@ mips_option_override (void)
 
   /* Make sure that the user didn't turn off paired single support when
      MIPS-3D support is requested.  */
-  if (TARGET_MIPS3D
+  if (GCC_OPTION (TARGET_MIPS3D)
       && (target_flags_explicit & MASK_PAIRED_SINGLE_FLOAT)
       && !TARGET_PAIRED_SINGLE_FLOAT)
     error ("%<-mips3d%> requires %<-mpaired-single%>");
 
   /* If TARGET_MIPS3D, enable MASK_PAIRED_SINGLE_FLOAT.  */
-  if (TARGET_MIPS3D)
-    target_flags |= MASK_PAIRED_SINGLE_FLOAT;
+  if (GCC_OPTION (TARGET_MIPS3D))
+    GCC_OPTION (target_flags) |= MASK_PAIRED_SINGLE_FLOAT;
 
   /* Make sure that when TARGET_PAIRED_SINGLE_FLOAT is true, TARGET_FLOAT64
      and TARGET_HARD_FLOAT_ABI are both true.  */
   if (TARGET_PAIRED_SINGLE_FLOAT && !(TARGET_FLOAT64 && TARGET_HARD_FLOAT_ABI))
     {
       error ("%qs must be used with %qs",
-	     TARGET_MIPS3D ? "-mips3d" : "-mpaired-single",
+	     GCC_OPTION (TARGET_MIPS3D) ? "-mips3d" : "-mpaired-single",
 	     TARGET_HARD_FLOAT_ABI ? "-mfp64" : "-mhard-float");
-      target_flags &= ~MASK_PAIRED_SINGLE_FLOAT;
-      TARGET_MIPS3D = 0;
+      GCC_OPTION (target_flags) &= ~MASK_PAIRED_SINGLE_FLOAT;
+      GCC_OPTION (TARGET_MIPS3D) = 0;
     }
 
   /* Make sure that -mpaired-single is only used on ISAs that support it.
@@ -17221,21 +17221,21 @@ mips_option_override (void)
     {
       error ("the %qs architecture does not support paired-single"
 	     " instructions", mips_arch_info->name);
-      target_flags &= ~MASK_PAIRED_SINGLE_FLOAT;
-      TARGET_MIPS3D = 0;
+      GCC_OPTION (target_flags) &= ~MASK_PAIRED_SINGLE_FLOAT;
+      GCC_OPTION (TARGET_MIPS3D) = 0;
     }
 
-  if (mips_r10k_cache_barrier != R10K_CACHE_BARRIER_NONE
+  if (GCC_OPTION (mips_r10k_cache_barrier) != R10K_CACHE_BARRIER_NONE
       && !TARGET_CACHE_BUILTIN)
     {
       error ("%qs requires a target that provides the %qs instruction",
 	     "-mr10k-cache-barrier", "cache");
-      mips_r10k_cache_barrier = R10K_CACHE_BARRIER_NONE;
+      GCC_OPTION (mips_r10k_cache_barrier) = R10K_CACHE_BARRIER_NONE;
     }
 
   /* If TARGET_DSPR2, enable TARGET_DSP.  */
-  if (TARGET_DSPR2)
-    TARGET_DSP = true;
+  if (GCC_OPTION (TARGET_DSPR2))
+    GCC_OPTION (TARGET_DSP) = true;
 
   /* .eh_frame addresses should be the same width as a C pointer.
      Most MIPS ABIs support only one pointer size, so the assembler
@@ -17255,13 +17255,13 @@ mips_option_override (void)
      default behavior, it seems unwise to rely on future versions
      of gas behaving the same way.  We therefore avoid using .cfi
      directives for -mlong32 as well.  */
-  if (mips_abi == ABI_EABI && TARGET_64BIT)
-    flag_dwarf2_cfi_asm = 0;
+  if (GCC_OPTION (mips_abi) == ABI_EABI && TARGET_64BIT)
+    GCC_OPTION (flag_dwarf2_cfi_asm) = 0;
 
   /* .cfi_* directives generate a read-only section, so fall back on
      manual .eh_frame creation if we need the section to be writable.  */
   if (TARGET_WRITABLE_EH_FRAME)
-    flag_dwarf2_cfi_asm = 0;
+    GCC_OPTION (flag_dwarf2_cfi_asm) = 0;
 
   mips_init_print_operand_punct ();
 
@@ -17309,19 +17309,19 @@ mips_option_override (void)
      was selected explicitly.  */
   if ((target_flags_explicit & MASK_FIX_R4000) == 0
       && strcmp (mips_arch_info->name, "r4000") == 0)
-    target_flags |= MASK_FIX_R4000;
+    GCC_OPTION (target_flags) |= MASK_FIX_R4000;
 
   /* Default to working around R4400 errata only if the processor
      was selected explicitly.  */
   if ((target_flags_explicit & MASK_FIX_R4400) == 0
       && strcmp (mips_arch_info->name, "r4400") == 0)
-    target_flags |= MASK_FIX_R4400;
+    GCC_OPTION (target_flags) |= MASK_FIX_R4400;
 
   /* Default to working around R10000 errata only if the processor
      was selected explicitly.  */
   if ((target_flags_explicit & MASK_FIX_R10000) == 0
       && strcmp (mips_arch_info->name, "r10000") == 0)
-    target_flags |= MASK_FIX_R10000;
+    GCC_OPTION (target_flags) |= MASK_FIX_R10000;
 
   /* Make sure that branch-likely instructions available when using
      -mfix-r10000.  The instructions are not available if either:
@@ -17339,21 +17339,21 @@ mips_option_override (void)
     {
       warning (0, "the %qs architecture does not support the synci "
 	       "instruction", mips_arch_info->name);
-      target_flags &= ~MASK_SYNCI;
+      GCC_OPTION (target_flags) &= ~MASK_SYNCI;
     }
 
   /* Only optimize PIC indirect calls if they are actually required.  */
   if (!TARGET_USE_GOT || !TARGET_EXPLICIT_RELOCS)
-    target_flags &= ~MASK_RELAX_PIC_CALLS;
+    GCC_OPTION (target_flags) &= ~MASK_RELAX_PIC_CALLS;
 
   /* Save base state of options.  */
-  mips_base_target_flags = target_flags;
-  mips_base_schedule_insns = flag_schedule_insns;
-  mips_base_reorder_blocks_and_partition = flag_reorder_blocks_and_partition;
-  mips_base_move_loop_invariants = flag_move_loop_invariants;
-  mips_base_align_loops = align_loops;
-  mips_base_align_jumps = align_jumps;
-  mips_base_align_functions = align_functions;
+  mips_base_target_flags = GCC_OPTION (target_flags);
+  mips_base_schedule_insns = GCC_OPTION (flag_schedule_insns);
+  mips_base_reorder_blocks_and_partition = GCC_OPTION (flag_reorder_blocks_and_partition);
+  mips_base_move_loop_invariants = GCC_OPTION (flag_move_loop_invariants);
+  mips_base_align_loops = GCC_OPTION (align_loops);
+  mips_base_align_jumps = GCC_OPTION (align_jumps);
+  mips_base_align_functions = GCC_OPTION (align_functions);
 
   /* Now select the ISA mode.
 
@@ -17456,7 +17456,7 @@ mips_conditional_register_usage (void)
       fixed_regs[26] = call_used_regs[26] = 1;
       fixed_regs[27] = call_used_regs[27] = 1;
       fixed_regs[30] = call_used_regs[30] = 1;
-      if (optimize_size)
+      if (GCC_OPTION (optimize_size))
 	{
 	  fixed_regs[8] = call_used_regs[8] = 1;
 	  fixed_regs[9] = call_used_regs[9] = 1;
@@ -17475,7 +17475,7 @@ mips_conditional_register_usage (void)
 			      reg_class_contents[(int) MD_REGS]);
     }
   /* $f20-$f23 are call-clobbered for n64.  */
-  if (mips_abi == ABI_64)
+  if (GCC_OPTION (mips_abi) == ABI_64)
     {
       int regno;
       for (regno = FP_REG_FIRST + 20; regno < FP_REG_FIRST + 24; regno++)
@@ -17483,7 +17483,7 @@ mips_conditional_register_usage (void)
     }
   /* Odd registers in the range $f21-$f31 (inclusive) are call-clobbered
      for n32.  */
-  if (mips_abi == ABI_N32)
+  if (GCC_OPTION (mips_abi) == ABI_N32)
     {
       int regno;
       for (regno = FP_REG_FIRST + 21; regno <= FP_REG_FIRST + 31; regno+=2)
@@ -18093,7 +18093,7 @@ void mips_function_profiler (FILE *file)
 {
   if (TARGET_MIPS16)
     sorry ("mips16 function profiling");
-  if (TARGET_LONG_CALLS)
+  if (GCC_OPTION (TARGET_LONG_CALLS))
     {
       /* For TARGET_LONG_CALLS use $3 for the address of _mcount.  */
       if (Pmode == DImode)
@@ -18108,7 +18108,7 @@ void mips_function_profiler (FILE *file)
   if (cfun->static_chain_decl != NULL)
     fprintf (file, "\tmove\t%s,%s\n", reg_names[2],
 	     reg_names[STATIC_CHAIN_REGNUM]);
-  if (TARGET_MCOUNT_RA_ADDRESS)
+  if (GCC_OPTION (TARGET_MCOUNT_RA_ADDRESS))
     {
       /* If TARGET_MCOUNT_RA_ADDRESS load $12 with the address of the
 	 ra save location.  */
@@ -18129,7 +18129,7 @@ void mips_function_profiler (FILE *file)
 	     reg_names[STACK_POINTER_REGNUM],
 	     Pmode == DImode ? 16 : 8);
 
-  if (TARGET_LONG_CALLS)
+  if (GCC_OPTION (TARGET_LONG_CALLS))
     fprintf (file, "\tjalr\t%s\n", reg_names[3]);
   else
     fprintf (file, "\tjal\t_mcount\n");
@@ -18849,7 +18849,7 @@ unsigned int
 mips_case_values_threshold (void)
 {
   /* In MIPS16 mode using a larger case threshold generates smaller code.  */
-  if (TARGET_MIPS16 && optimize_size)
+  if (TARGET_MIPS16 && GCC_OPTION (optimize_size))
     return 10;
   else
     return default_case_values_threshold ();
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index a786d4c..76d9ddd 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -90,12 +90,12 @@ struct mips_cpu_info {
 /* Run-time compilation parameters selecting different hardware subsets.  */
 
 /* True if we are generating position-independent VxWorks RTP code.  */
-#define TARGET_RTP_PIC (TARGET_VXWORKS_RTP && flag_pic)
+#define TARGET_RTP_PIC (TARGET_VXWORKS_RTP && GCC_OPTION (flag_pic))
 
 /* True if the output file is marked as ".abicalls; .option pic0"
    (-call_nonpic).  */
 #define TARGET_ABICALLS_PIC0 \
-  (TARGET_ABSOLUTE_ABICALLS && TARGET_PLT)
+  (TARGET_ABSOLUTE_ABICALLS && GCC_OPTION (TARGET_PLT))
 
 /* True if the output file is marked as ".abicalls; .option pic2" (-KPIC).  */
 #define TARGET_ABICALLS_PIC2 \
@@ -120,7 +120,7 @@ struct mips_cpu_info {
 
 #define TARGET_ABSOLUTE_ABICALLS	\
   (TARGET_ABICALLS			\
-   && !TARGET_SHARED			\
+   && !GCC_OPTION (TARGET_SHARED)			\
    && TARGET_EXPLICIT_RELOCS		\
    && !ABI_HAS_64BIT_SYMBOLS)
 
@@ -156,7 +156,7 @@ struct mips_cpu_info {
 
 /* True if we can use the J and JAL instructions.  */
 #define TARGET_ABSOLUTE_JUMPS \
-  (!flag_pic || TARGET_ABSOLUTE_ABICALLS)
+  (!GCC_OPTION (flag_pic) || TARGET_ABSOLUTE_ABICALLS)
 
 /* True if indirect calls must use register class PIC_FN_ADDR_REG.
    This is true for both the PIC and non-PIC VxWorks RTP modes.  */
@@ -171,7 +171,7 @@ struct mips_cpu_info {
 #ifdef HAVE_LD_PERSONALITY_RELAXATION
 #define TARGET_WRITABLE_EH_FRAME 0
 #else
-#define TARGET_WRITABLE_EH_FRAME (flag_pic && TARGET_SHARED)
+#define TARGET_WRITABLE_EH_FRAME (GCC_OPTION (flag_pic) && GCC_OPTION (TARGET_SHARED))
 #endif
 
 /* Test the assembler to set ISA_HAS_DSP_MULT to DSP Rev 1 or 2.  */
@@ -182,24 +182,24 @@ struct mips_cpu_info {
 #endif
 
 /* The ISA compression flags that are currently in effect.  */
-#define TARGET_COMPRESSION (target_flags & (MASK_MIPS16 | MASK_MICROMIPS))
+#define TARGET_COMPRESSION (GCC_OPTION (target_flags) & (MASK_MIPS16 | MASK_MICROMIPS))
 
 /* Generate mips16 code */
-#define TARGET_MIPS16		((target_flags & MASK_MIPS16) != 0)
+#define TARGET_MIPS16		((GCC_OPTION (target_flags) & MASK_MIPS16) != 0)
 /* Generate mips16e code. Default 16bit ASE for mips32* and mips64* */
 #define GENERATE_MIPS16E	(TARGET_MIPS16 && mips_isa >= 32)
 /* Generate mips16e register save/restore sequences.  */
-#define GENERATE_MIPS16E_SAVE_RESTORE (GENERATE_MIPS16E && mips_abi == ABI_32)
+#define GENERATE_MIPS16E_SAVE_RESTORE (GENERATE_MIPS16E && GCC_OPTION (mips_abi) == ABI_32)
 
 /* True if we're generating a form of MIPS16 code in which general
    text loads are allowed.  */
 #define TARGET_MIPS16_TEXT_LOADS \
-  (TARGET_MIPS16 && mips_code_readable == CODE_READABLE_YES)
+  (TARGET_MIPS16 && GCC_OPTION (mips_code_readable) == CODE_READABLE_YES)
 
 /* True if we're generating a form of MIPS16 code in which PC-relative
    loads are allowed.  */
 #define TARGET_MIPS16_PCREL_LOADS \
-  (TARGET_MIPS16 && mips_code_readable >= CODE_READABLE_PCREL)
+  (TARGET_MIPS16 && GCC_OPTION (mips_code_readable) >= CODE_READABLE_PCREL)
 
 /* Generic ISA defines.  */
 #define ISA_MIPS1		    (mips_isa == 1)
@@ -304,8 +304,8 @@ struct mips_cpu_info {
 				     || TUNE_MIPS4130		\
 				     || TUNE_24K)
 
-#define TARGET_OLDABI		    (mips_abi == ABI_32 || mips_abi == ABI_O64)
-#define TARGET_NEWABI		    (mips_abi == ABI_N32 || mips_abi == ABI_64)
+#define TARGET_OLDABI		    (GCC_OPTION (mips_abi) == ABI_32 || GCC_OPTION (mips_abi) == ABI_O64)
+#define TARGET_NEWABI		    (GCC_OPTION (mips_abi) == ABI_N32 || GCC_OPTION (mips_abi) == ABI_64)
 
 /* TARGET_HARD_FLOAT and TARGET_SOFT_FLOAT reflect whether the FPU is
    directly accessible, while the command-line options select
@@ -388,7 +388,7 @@ struct mips_cpu_info {
       if (mips_base_compression_flags & MASK_MIPS16)			\
 	builtin_define ("__mips16");					\
 									\
-      if (TARGET_MIPS3D)						\
+      if (GCC_OPTION (TARGET_MIPS3D))						\
 	builtin_define ("__mips3d");					\
 									\
       if (TARGET_SMARTMIPS)						\
@@ -397,16 +397,16 @@ struct mips_cpu_info {
       if (mips_base_compression_flags & MASK_MICROMIPS)			\
 	builtin_define ("__mips_micromips");				\
 									\
-      if (TARGET_MCU)							\
+      if (GCC_OPTION (TARGET_MCU))							\
 	builtin_define ("__mips_mcu");					\
 									\
-      if (TARGET_EVA)							\
+      if (GCC_OPTION (TARGET_EVA))							\
 	builtin_define ("__mips_eva");					\
 									\
-      if (TARGET_DSP)							\
+      if (GCC_OPTION (TARGET_DSP))							\
 	{								\
 	  builtin_define ("__mips_dsp");				\
-	  if (TARGET_DSPR2)						\
+	  if (GCC_OPTION (TARGET_DSPR2))						\
 	    {								\
 	      builtin_define ("__mips_dspr2");				\
 	      builtin_define ("__mips_dsp_rev=2");			\
@@ -463,7 +463,7 @@ struct mips_cpu_info {
 	  builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS64");		\
 	}								\
 									\
-      switch (mips_abi)							\
+      switch (GCC_OPTION (mips_abi))							\
 	{								\
 	case ABI_32:							\
 	  builtin_define ("_ABIO32=1");					\
@@ -494,7 +494,7 @@ struct mips_cpu_info {
 									\
       /* These defines reflect the ABI in use, not whether the  	\
 	 FPU is directly accessible.  */				\
-      if (TARGET_NO_FLOAT)						\
+      if (GCC_OPTION (TARGET_NO_FLOAT))						\
 	builtin_define ("__mips_no_float");				\
       else if (TARGET_HARD_FLOAT_ABI)					\
 	builtin_define ("__mips_hard_float");				\
@@ -507,10 +507,10 @@ struct mips_cpu_info {
       if (TARGET_PAIRED_SINGLE_FLOAT)					\
 	builtin_define ("__mips_paired_single_float");			\
 									\
-      if (mips_abs == MIPS_IEEE_754_2008)				\
+      if (GCC_OPTION (mips_abs) == MIPS_IEEE_754_2008)				\
 	builtin_define ("__mips_abs2008");				\
 									\
-      if (mips_nan == MIPS_IEEE_754_2008)				\
+      if (GCC_OPTION (mips_nan) == MIPS_IEEE_754_2008)				\
 	builtin_define ("__mips_nan2008");				\
 									\
       if (TARGET_BIG_ENDIAN)						\
@@ -566,7 +566,7 @@ struct mips_cpu_info {
 	  builtin_define ("_LANGUAGE_C");				\
 	}								\
 									\
-      if (mips_abi == ABI_EABI)						\
+      if (GCC_OPTION (mips_abi) == ABI_EABI)						\
 	builtin_define ("__mips_eabi");					\
 									\
       if (TARGET_CACHE_BUILTIN)						\
@@ -780,14 +780,14 @@ struct mips_cpu_info {
 /* True if the ABI can only work with 64-bit integer registers.  We
    generally allow ad-hoc variations for TARGET_SINGLE_FLOAT, but
    otherwise floating-point registers must also be 64-bit.  */
-#define ABI_NEEDS_64BIT_REGS	(TARGET_NEWABI || mips_abi == ABI_O64)
+#define ABI_NEEDS_64BIT_REGS	(TARGET_NEWABI || GCC_OPTION (mips_abi) == ABI_O64)
 
 /* Likewise for 32-bit regs.  */
-#define ABI_NEEDS_32BIT_REGS	(mips_abi == ABI_32)
+#define ABI_NEEDS_32BIT_REGS	(GCC_OPTION (mips_abi) == ABI_32)
 
 /* True if the file format uses 64-bit symbols.  At present, this is
    only true for n64, which uses 64-bit ELF.  */
-#define FILE_HAS_64BIT_SYMBOLS	(mips_abi == ABI_64)
+#define FILE_HAS_64BIT_SYMBOLS	(GCC_OPTION (mips_abi) == ABI_64)
 
 /* True if symbols are 64 bits wide.  This is usually determined by
    the ABI's file format, but it can be overridden by -msym32.  Note that
@@ -795,7 +795,7 @@ struct mips_cpu_info {
    although it doesn't change the ABI of a fully-linked object.  */
 #define ABI_HAS_64BIT_SYMBOLS	(FILE_HAS_64BIT_SYMBOLS \
 				 && Pmode == DImode	\
-				 && !TARGET_SYM32)
+				 && !GCC_OPTION (TARGET_SYM32))
 
 /* ISA has instructions for managing 64-bit fp and gp regs (e.g. mips3).  */
 #define ISA_HAS_64BIT_REGS	(ISA_MIPS3				\
@@ -815,7 +815,7 @@ struct mips_cpu_info {
 				  || TARGET_MIPS5900			\
 				  || TARGET_MIPS7000			\
 				  || TARGET_MIPS9000			\
-				  || TARGET_MAD				\
+				  || GCC_OPTION (TARGET_MAD)				\
 				  || ISA_MIPS32				\
 				  || ISA_MIPS32R2			\
 				  || ISA_MIPS64				\
@@ -1042,10 +1042,10 @@ struct mips_cpu_info {
 				 && TARGET_64BIT)
 
 /* The DSP ASE is available.  */
-#define ISA_HAS_DSP		(TARGET_DSP && !TARGET_MIPS16)
+#define ISA_HAS_DSP		(GCC_OPTION (TARGET_DSP) && !TARGET_MIPS16)
 
 /* Revision 2 of the DSP ASE is available.  */
-#define ISA_HAS_DSPR2		(TARGET_DSPR2 && !TARGET_MIPS16)
+#define ISA_HAS_DSPR2		(GCC_OPTION (TARGET_DSPR2) && !TARGET_MIPS16)
 
 /* True if the result of a load is not available to the next instruction.
    A nop will then be needed between instructions like "lw $4,..."
@@ -1653,7 +1653,7 @@ struct mips_cpu_info {
 #define FP_REG_FIRST 32
 #define FP_REG_LAST  63
 #define FP_REG_NUM   (FP_REG_LAST - FP_REG_FIRST + 1)
-#define FP_DBX_FIRST ((write_symbols == DBX_DEBUG) ? 38 : 32)
+#define FP_DBX_FIRST ((GCC_OPTION (write_symbols) == DBX_DEBUG) ? 38 : 32)
 
 #define MD_REG_FIRST 64
 #define MD_REG_LAST  65
@@ -2108,7 +2108,7 @@ enum reg_class
 
 #define STACK_GROWS_DOWNWARD
 
-#define FRAME_GROWS_DOWNWARD flag_stack_protect
+#define FRAME_GROWS_DOWNWARD GCC_OPTION (flag_stack_protect)
 
 /* Size of the area allocated in the frame to save the GP.  */
 
@@ -2296,7 +2296,7 @@ typedef struct mips_args {
    registers.  Under these conditions, we need a more complex form
    of va_list, which tracks GPR, FPR and stack arguments separately.  */
 #define EABI_FLOAT_VARARGS_P \
-	(mips_abi == ABI_EABI && UNITS_PER_FPVALUE >= UNITS_PER_DOUBLE)
+	(GCC_OPTION (mips_abi) == ABI_EABI && UNITS_PER_FPVALUE >= UNITS_PER_DOUBLE)
 
 
 #define EPILOGUE_USES(REGNO)	mips_epilogue_uses (REGNO)
@@ -2354,7 +2354,7 @@ typedef struct mips_args {
 #define MIPS_ICACHE_SYNC(ADDR, SIZE)					\
   /* Flush both caches.  We need to flush the data cache in case	\
      the system has a write-back cache.  */				\
-  emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mips_cache_flush_func),	\
+  emit_library_call (gen_rtx_SYMBOL_REF (Pmode, GCC_OPTION (mips_cache_flush_func)),	\
 		     LCT_NORMAL, VOIDmode, 3, ADDR, Pmode, SIZE, Pmode,	\
 		     GEN_INT (3), TYPE_MODE (integer_type_node))
 
@@ -2470,7 +2470,7 @@ typedef struct mips_args {
 /* A C expression for the cost of a branch instruction.  A value of
    1 is the default; other values are interpreted relative to that.  */
 
-#define BRANCH_COST(speed_p, predictable_p) mips_branch_cost
+#define BRANCH_COST(speed_p, predictable_p) GCC_OPTION (mips_branch_cost)
 #define LOGICAL_OP_NON_SHORT_CIRCUIT 0
 
 /* The MIPS port has several functions that return an instruction count.
@@ -2523,10 +2523,10 @@ typedef struct mips_args {
    ? (mips_get_pic_call_symbol (OPERANDS, SIZE_OPNO)		\
       ? ("%*.reloc\t1f,R_MIPS_JALR,%" #SIZE_OPNO "\n"		\
 	 "1:\t" INSN "r\t%" #TARGET_OPNO "%/")			\
-      : TARGET_MICROMIPS && !TARGET_INTERLINK_COMPRESSED	\
+      : TARGET_MICROMIPS && !GCC_OPTION (TARGET_INTERLINK_COMPRESSED)	\
       ? "%*" INSN "r%!\t%" #TARGET_OPNO "%/"			\
       : "%*" INSN "r\t%" #TARGET_OPNO "%/")			\
-   : TARGET_MICROMIPS && !TARGET_INTERLINK_COMPRESSED		\
+   : TARGET_MICROMIPS && !GCC_OPTION (TARGET_INTERLINK_COMPRESSED)		\
      ? MIPS_ABSOLUTE_JUMP ("%*" INSN "%!\t%" #TARGET_OPNO "%/")	\
      : MIPS_ABSOLUTE_JUMP ("%*" INSN "\t%" #TARGET_OPNO "%/"))	\
 
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 1e3e9e6..f271ba6 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -419,7 +419,7 @@
 ;; Is this an extended instruction in mips16 mode?
 (define_attr "extended_mips16" "no,yes"
   (if_then_else (ior ;; In general, constant-pool loads are extended
-  		     ;; instructions.  We don't yet optimize for 16-bit
+  		     ;; instructions.  We don't yet GCC_OPTION (optimize) for 16-bit
 		     ;; PC-relative references.
   		     (eq_attr "move_type" "sll0,loadpool")
 		     (eq_attr "jal" "direct")
@@ -477,7 +477,7 @@
 	 (symbol_ref "mips_load_store_insns (operands[1], insn)")
 	 (eq_attr "move_type" "store,fpstore")
 	 (symbol_ref "mips_load_store_insns (operands[0], insn)
-		      + (TARGET_FIX_24K ? 1 : 0)")
+		      + (GCC_OPTION (TARGET_FIX_24K) ? 1 : 0)")
 
 	 ;; In the worst case, a call macro will take 8 instructions:
 	 ;;
@@ -496,7 +496,7 @@
 	 ;; instruction.  The assembler does this for us, so account for
 	 ;; the worst-case length here.
 	 (and (eq_attr "type" "imadd")
-	      (match_test "TARGET_FIX_VR4120"))
+	      (match_test "GCC_OPTION (TARGET_FIX_VR4120)"))
 	 (const_int 2)
 
 	 ;; VR4120 errata MD(4): if there are consecutive dmult instructions,
@@ -504,7 +504,7 @@
 	 ;; around this by inserting a nop after the first dmult.
 	 (and (eq_attr "type" "imul,imul3")
 	      (eq_attr "mode" "DI")
-	      (match_test "TARGET_FIX_VR4120"))
+	      (match_test "GCC_OPTION (TARGET_FIX_VR4120)"))
 	 (const_int 2)
 
 	 (eq_attr "type" "idiv,idiv3")
@@ -761,14 +761,14 @@
 ;; 32-bit integer moves for which we provide move patterns.
 (define_mode_iterator IMOVE32
   [SI
-   (V2HI "TARGET_DSP")
-   (V4QI "TARGET_DSP")
-   (V2HQ "TARGET_DSP")
-   (V2UHQ "TARGET_DSP")
-   (V2HA "TARGET_DSP")
-   (V2UHA "TARGET_DSP")
-   (V4QQ "TARGET_DSP")
-   (V4UQQ "TARGET_DSP")])
+   (V2HI "GCC_OPTION (TARGET_DSP)")
+   (V4QI "GCC_OPTION (TARGET_DSP)")
+   (V2HQ "GCC_OPTION (TARGET_DSP)")
+   (V2UHQ "GCC_OPTION (TARGET_DSP)")
+   (V2HA "GCC_OPTION (TARGET_DSP)")
+   (V2UHA "GCC_OPTION (TARGET_DSP)")
+   (V4QQ "GCC_OPTION (TARGET_DSP)")
+   (V4UQQ "GCC_OPTION (TARGET_DSP)")])
 
 ;; 64-bit modes for which we provide move patterns.
 (define_mode_iterator MOVE64
@@ -879,8 +879,8 @@
 ;; Therefore, we only allow div.s if not working around SB-1 rev2
 ;; errata or if a slight loss of precision is OK.
 (define_mode_attr divide_condition
-  [DF (SF "!TARGET_FIX_SB1 || flag_unsafe_math_optimizations")
-   (V2SF "TARGET_SB1 && (!TARGET_FIX_SB1 || flag_unsafe_math_optimizations)")])
+  [DF (SF "!GCC_OPTION (TARGET_FIX_SB1) || GCC_OPTION (flag_unsafe_math_optimizations)")
+   (V2SF "TARGET_SB1 && (!GCC_OPTION (TARGET_FIX_SB1) || GCC_OPTION (flag_unsafe_math_optimizations))")])
 
 ;; This attribute gives the conditions under which SQRT.fmt instructions
 ;; can be used.
@@ -1186,7 +1186,7 @@
   [(set (match_operand:SI 0 "d_operand")
 	(plus:SI (match_dup 0)
 		 (match_operand:SI 1 "const_int_operand")))]
-  "TARGET_MIPS16 && reload_completed && !TARGET_DEBUG_D_MODE
+  "TARGET_MIPS16 && reload_completed && !GCC_OPTION (TARGET_DEBUG_D_MODE)
    && ((INTVAL (operands[1]) > 0x7f
 	&& INTVAL (operands[1]) <= 0x7f + 0x7f)
        || (INTVAL (operands[1]) < - 0x80
@@ -1212,7 +1212,7 @@
   [(set (match_operand:SI 0 "d_operand")
 	(plus:SI (match_operand:SI 1 "d_operand")
 		 (match_operand:SI 2 "const_int_operand")))]
-  "TARGET_MIPS16 && reload_completed && !TARGET_DEBUG_D_MODE
+  "TARGET_MIPS16 && reload_completed && !GCC_OPTION (TARGET_DEBUG_D_MODE)
    && REGNO (operands[0]) != REGNO (operands[1])
    && ((INTVAL (operands[2]) > 0x7
 	&& INTVAL (operands[2]) <= 0x7 + 0x7f)
@@ -1239,7 +1239,7 @@
   [(set (match_operand:DI 0 "d_operand")
 	(plus:DI (match_dup 0)
 		 (match_operand:DI 1 "const_int_operand")))]
-  "TARGET_MIPS16 && TARGET_64BIT && reload_completed && !TARGET_DEBUG_D_MODE
+  "TARGET_MIPS16 && TARGET_64BIT && reload_completed && !GCC_OPTION (TARGET_DEBUG_D_MODE)
    && ((INTVAL (operands[1]) > 0xf
 	&& INTVAL (operands[1]) <= 0xf + 0xf)
        || (INTVAL (operands[1]) < - 0x10
@@ -1265,7 +1265,7 @@
   [(set (match_operand:DI 0 "d_operand")
 	(plus:DI (match_operand:DI 1 "d_operand")
 		 (match_operand:DI 2 "const_int_operand")))]
-  "TARGET_MIPS16 && TARGET_64BIT && reload_completed && !TARGET_DEBUG_D_MODE
+  "TARGET_MIPS16 && TARGET_64BIT && reload_completed && !GCC_OPTION (TARGET_DEBUG_D_MODE)
    && REGNO (operands[0]) != REGNO (operands[1])
    && ((INTVAL (operands[2]) > 0x7
 	&& INTVAL (operands[2]) <= 0x7 + 0xf)
@@ -1404,7 +1404,7 @@
   [(set (match_operand:SCALARF 0 "register_operand" "=f")
 	(mult:SCALARF (match_operand:SCALARF 1 "register_operand" "f")
 		      (match_operand:SCALARF 2 "register_operand" "f")))]
-  "!TARGET_4300_MUL_FIX"
+  "!GCC_OPTION (TARGET_4300_MUL_FIX)"
   "mul.<fmt>\t%0,%1,%2"
   [(set_attr "type" "fmul")
    (set_attr "mode" "<MODE>")])
@@ -1417,7 +1417,7 @@
   [(set (match_operand:SCALARF 0 "register_operand" "=f")
 	(mult:SCALARF (match_operand:SCALARF 1 "register_operand" "f")
 		      (match_operand:SCALARF 2 "register_operand" "f")))]
-  "TARGET_4300_MUL_FIX"
+  "GCC_OPTION (TARGET_4300_MUL_FIX)"
   "mul.<fmt>\t%0,%1,%2\;nop"
   [(set_attr "type" "fmul")
    (set_attr "mode" "<MODE>")
@@ -2193,7 +2193,7 @@
 	  (mult:TI (any_extend:TI (match_operand:DI 1 "register_operand"))
 		   (any_extend:TI (match_operand:DI 2 "register_operand")))
 	  (const_int 64))))]
-  "ISA_HAS_DMULT && !(<CODE> == ZERO_EXTEND && TARGET_FIX_VR4120)"
+  "ISA_HAS_DMULT && !(<CODE> == ZERO_EXTEND && GCC_OPTION (TARGET_FIX_VR4120))"
 {
   if (TARGET_MIPS16)
     emit_insn (gen_<su>muldi3_highpart_split (operands[0], operands[1],
@@ -2214,7 +2214,7 @@
    (clobber (match_scratch:DI 3 "=l"))]
   "ISA_HAS_DMULT
    && !TARGET_MIPS16
-   && !(<CODE> == ZERO_EXTEND && TARGET_FIX_VR4120)"
+   && !(<CODE> == ZERO_EXTEND && GCC_OPTION (TARGET_FIX_VR4120))"
   { return TARGET_FIX_R4000 ? "dmult<u>\t%1,%2\n\tmfhi\t%0" : "#"; }
   "&& reload_completed && !TARGET_FIX_R4000"
   [(const_int 0)]
@@ -2248,7 +2248,7 @@
   [(set (match_operand:TI 0 "register_operand")
 	(mult:TI (any_extend:TI (match_operand:DI 1 "register_operand"))
 		 (any_extend:TI (match_operand:DI 2 "register_operand"))))]
-  "ISA_HAS_DMULT && !(<CODE> == ZERO_EXTEND && TARGET_FIX_VR4120)"
+  "ISA_HAS_DMULT && !(<CODE> == ZERO_EXTEND && GCC_OPTION (TARGET_FIX_VR4120))"
 {
   rtx hilo;
 
@@ -2272,7 +2272,7 @@
 		 (any_extend:TI (match_operand:DI 2 "register_operand" "d"))))]
   "ISA_HAS_DMULT
    && !TARGET_FIX_R4000
-   && !(<CODE> == ZERO_EXTEND && TARGET_FIX_VR4120)"
+   && !(<CODE> == ZERO_EXTEND && GCC_OPTION (TARGET_FIX_VR4120))"
   "dmult<u>\t%1,%2"
   [(set_attr "type" "imul")
    (set_attr "mode" "DI")])
@@ -2284,7 +2284,7 @@
    (clobber (match_scratch:TI 3 "=x"))]
   "ISA_HAS_DMULT
    && TARGET_FIX_R4000
-   && !(<CODE> == ZERO_EXTEND && TARGET_FIX_VR4120)"
+   && !(<CODE> == ZERO_EXTEND && GCC_OPTION (TARGET_FIX_VR4120))"
   "dmult<u>\t%1,%2\;mflo\t%L0\;mfhi\t%M0"
   [(set_attr "type" "imul")
    (set_attr "mode" "DI")
@@ -2298,7 +2298,7 @@
 	(plus:SI (mult:SI (match_operand:SI 1 "register_operand" "d")
 			  (match_operand:SI 2 "register_operand" "d"))
 		 (match_dup 0)))]
-  "TARGET_MAD"
+  "GCC_OPTION (TARGET_MAD)"
   "mad\t%1,%2"
   [(set_attr "type"	"imadd")
    (set_attr "accum_in"	"0")
@@ -2312,10 +2312,10 @@
 	 (mult:DI (any_extend:DI (match_operand:SI 1 "register_operand" "d"))
 		  (any_extend:DI (match_operand:SI 2 "register_operand" "d")))
 	 (match_operand:DI 3 "muldiv_target_operand" "0")))]
-  "(TARGET_MAD || ISA_HAS_MACC || GENERATE_MADD_MSUB || ISA_HAS_DSP)
+  "(GCC_OPTION (TARGET_MAD) || ISA_HAS_MACC || GENERATE_MADD_MSUB || ISA_HAS_DSP)
    && !TARGET_64BIT"
 {
-  if (TARGET_MAD)
+  if (GCC_OPTION (TARGET_MAD))
     return "mad<u>\t%1,%2";
   else if (ISA_HAS_DSP_MULT)
     return "madd<u>\t%q0,%1,%2";
@@ -2336,7 +2336,7 @@
 	(plus:ANYF (mult:ANYF (match_operand:ANYF 1 "register_operand" "f")
 			      (match_operand:ANYF 2 "register_operand" "f"))
 		   (match_operand:ANYF 3 "register_operand" "f")))]
-  "ISA_HAS_FP_MADD4_MSUB4 && TARGET_FUSED_MADD"
+  "ISA_HAS_FP_MADD4_MSUB4 && GCC_OPTION (TARGET_FUSED_MADD)"
   "madd.<fmt>\t%0,%3,%1,%2"
   [(set_attr "type" "fmadd")
    (set_attr "accum_in"	"3")
@@ -2347,7 +2347,7 @@
 	(plus:ANYF (mult:ANYF (match_operand:ANYF 1 "register_operand" "f")
 			      (match_operand:ANYF 2 "register_operand" "f"))
 		   (match_operand:ANYF 3 "register_operand" "0")))]
-  "ISA_HAS_FP_MADD3_MSUB3 && TARGET_FUSED_MADD"
+  "ISA_HAS_FP_MADD3_MSUB3 && GCC_OPTION (TARGET_FUSED_MADD)"
   "madd.<fmt>\t%0,%1,%2"
   [(set_attr "type" "fmadd")
    (set_attr "accum_in"	"3")
@@ -2358,7 +2358,7 @@
 	(minus:ANYF (mult:ANYF (match_operand:ANYF 1 "register_operand" "f")
 			       (match_operand:ANYF 2 "register_operand" "f"))
 		    (match_operand:ANYF 3 "register_operand" "f")))]
-  "ISA_HAS_FP_MADD4_MSUB4 && TARGET_FUSED_MADD"
+  "ISA_HAS_FP_MADD4_MSUB4 && GCC_OPTION (TARGET_FUSED_MADD)"
   "msub.<fmt>\t%0,%3,%1,%2"
   [(set_attr "type" "fmadd")
    (set_attr "accum_in"	"3")
@@ -2369,7 +2369,7 @@
 	(minus:ANYF (mult:ANYF (match_operand:ANYF 1 "register_operand" "f")
 			       (match_operand:ANYF 2 "register_operand" "f"))
 		    (match_operand:ANYF 3 "register_operand" "0")))]
-  "ISA_HAS_FP_MADD3_MSUB3 && TARGET_FUSED_MADD"
+  "ISA_HAS_FP_MADD3_MSUB3 && GCC_OPTION (TARGET_FUSED_MADD)"
   "msub.<fmt>\t%0,%1,%2"
   [(set_attr "type" "fmadd")
    (set_attr "accum_in"	"3")
@@ -2382,7 +2382,7 @@
 			      (match_operand:ANYF 2 "register_operand" "f"))
 		   (match_operand:ANYF 3 "register_operand" "f"))))]
   "ISA_HAS_NMADD4_NMSUB4
-   && TARGET_FUSED_MADD
+   && GCC_OPTION (TARGET_FUSED_MADD)
    && HONOR_SIGNED_ZEROS (<MODE>mode)
    && !HONOR_NANS (<MODE>mode)"
   "nmadd.<fmt>\t%0,%3,%1,%2"
@@ -2397,7 +2397,7 @@
 			      (match_operand:ANYF 2 "register_operand" "f"))
 		   (match_operand:ANYF 3 "register_operand" "0"))))]
   "ISA_HAS_NMADD3_NMSUB3
-   && TARGET_FUSED_MADD
+   && GCC_OPTION (TARGET_FUSED_MADD)
    && HONOR_SIGNED_ZEROS (<MODE>mode)
    && !HONOR_NANS (<MODE>mode)"
   "nmadd.<fmt>\t%0,%1,%2"
@@ -2412,7 +2412,7 @@
 		    (match_operand:ANYF 2 "register_operand" "f"))
 	 (match_operand:ANYF 3 "register_operand" "f")))]
   "ISA_HAS_NMADD4_NMSUB4
-   && TARGET_FUSED_MADD
+   && GCC_OPTION (TARGET_FUSED_MADD)
    && !HONOR_SIGNED_ZEROS (<MODE>mode)
    && !HONOR_NANS (<MODE>mode)"
   "nmadd.<fmt>\t%0,%3,%1,%2"
@@ -2427,7 +2427,7 @@
 		    (match_operand:ANYF 2 "register_operand" "f"))
 	 (match_operand:ANYF 3 "register_operand" "0")))]
   "ISA_HAS_NMADD3_NMSUB3
-   && TARGET_FUSED_MADD
+   && GCC_OPTION (TARGET_FUSED_MADD)
    && !HONOR_SIGNED_ZEROS (<MODE>mode)
    && !HONOR_NANS (<MODE>mode)"
   "nmadd.<fmt>\t%0,%1,%2"
@@ -2442,7 +2442,7 @@
 			      (match_operand:ANYF 3 "register_operand" "f"))
 		   (match_operand:ANYF 1 "register_operand" "f"))))]
   "ISA_HAS_NMADD4_NMSUB4
-   && TARGET_FUSED_MADD
+   && GCC_OPTION (TARGET_FUSED_MADD)
    && HONOR_SIGNED_ZEROS (<MODE>mode)
    && !HONOR_NANS (<MODE>mode)"
   "nmsub.<fmt>\t%0,%1,%2,%3"
@@ -2457,7 +2457,7 @@
 			      (match_operand:ANYF 3 "register_operand" "f"))
 		   (match_operand:ANYF 1 "register_operand" "0"))))]
   "ISA_HAS_NMADD3_NMSUB3
-   && TARGET_FUSED_MADD
+   && GCC_OPTION (TARGET_FUSED_MADD)
    && HONOR_SIGNED_ZEROS (<MODE>mode)
    && !HONOR_NANS (<MODE>mode)"
   "nmsub.<fmt>\t%0,%1,%2"
@@ -2472,7 +2472,7 @@
 	 (mult:ANYF (match_operand:ANYF 2 "register_operand" "f")
 		    (match_operand:ANYF 3 "register_operand" "f"))))]
   "ISA_HAS_NMADD4_NMSUB4
-   && TARGET_FUSED_MADD
+   && GCC_OPTION (TARGET_FUSED_MADD)
    && !HONOR_SIGNED_ZEROS (<MODE>mode)
    && !HONOR_NANS (<MODE>mode)"
   "nmsub.<fmt>\t%0,%1,%2,%3"
@@ -2487,7 +2487,7 @@
 	 (mult:ANYF (match_operand:ANYF 2 "register_operand" "f")
 		    (match_operand:ANYF 3 "register_operand" "0"))))]
   "ISA_HAS_NMADD3_NMSUB3
-   && TARGET_FUSED_MADD
+   && GCC_OPTION (TARGET_FUSED_MADD)
    && !HONOR_SIGNED_ZEROS (<MODE>mode)
    && !HONOR_NANS (<MODE>mode)"
   "nmsub.<fmt>\t%0,%1,%2"
@@ -2511,7 +2511,7 @@
 {
   if (const_1_operand (operands[1], <MODE>mode))
     if (!(ISA_HAS_FP_RECIP_RSQRT (<MODE>mode)
-	  && flag_unsafe_math_optimizations))
+	  && GCC_OPTION (flag_unsafe_math_optimizations)))
       operands[1] = force_reg (<MODE>mode, operands[1]);
 })
 
@@ -2533,7 +2533,7 @@
 		  (match_operand:ANYF 2 "register_operand" "f")))]
   "<divide_condition>"
 {
-  if (TARGET_FIX_SB1)
+  if (GCC_OPTION (TARGET_FIX_SB1))
     return "div.<fmt>\t%0,%1,%2\;mov.<fmt>\t%0,%0";
   else
     return "div.<fmt>\t%0,%1,%2";
@@ -2541,7 +2541,7 @@
   [(set_attr "type" "fdiv")
    (set_attr "mode" "<UNITMODE>")
    (set (attr "insn_count")
-        (if_then_else (match_test "TARGET_FIX_SB1")
+        (if_then_else (match_test "GCC_OPTION (TARGET_FIX_SB1)")
                       (const_int 2)
                       (const_int 1)))])
 
@@ -2549,9 +2549,9 @@
   [(set (match_operand:ANYF 0 "register_operand" "=f")
 	(div:ANYF (match_operand:ANYF 1 "const_1_operand" "")
 		  (match_operand:ANYF 2 "register_operand" "f")))]
-  "ISA_HAS_FP_RECIP_RSQRT (<MODE>mode) && flag_unsafe_math_optimizations"
+  "ISA_HAS_FP_RECIP_RSQRT (<MODE>mode) && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
-  if (TARGET_FIX_SB1)
+  if (GCC_OPTION (TARGET_FIX_SB1))
     return "recip.<fmt>\t%0,%2\;mov.<fmt>\t%0,%0";
   else
     return "recip.<fmt>\t%0,%2";
@@ -2559,7 +2559,7 @@
   [(set_attr "type" "frdiv")
    (set_attr "mode" "<UNITMODE>")
    (set (attr "insn_count")
-        (if_then_else (match_test "TARGET_FIX_SB1")
+        (if_then_else (match_test "GCC_OPTION (TARGET_FIX_SB1)")
                       (const_int 2)
                       (const_int 1)))])
 
@@ -2573,7 +2573,7 @@
       (set (match_operand:GPR 3 "register_operand")
 	   (mod:GPR (match_dup 1)
 		    (match_dup 2)))])]
-  "ISA_HAS_<D>DIV && !TARGET_FIX_VR4120"
+  "ISA_HAS_<D>DIV && !GCC_OPTION (TARGET_FIX_VR4120)"
 {
   if (TARGET_MIPS16)
     {
@@ -2591,7 +2591,7 @@
    (set (match_operand:GPR 3 "register_operand" "=d")
 	(mod:GPR (match_dup 1)
 		 (match_dup 2)))]
-  "ISA_HAS_<D>DIV && !TARGET_FIX_VR4120 && !TARGET_MIPS16"
+  "ISA_HAS_<D>DIV && !GCC_OPTION (TARGET_FIX_VR4120) && !TARGET_MIPS16"
   "#"
   "&& reload_completed"
   [(const_int 0)]
@@ -2617,7 +2617,7 @@
 	(mod:GPR (match_dup 1)
 		 (match_dup 2)))
    (clobber (match_operand:GPR 4 "lo_operand" "=l"))]
-  "ISA_HAS_<D>DIV && !TARGET_FIX_VR4120 && TARGET_MIPS16"
+  "ISA_HAS_<D>DIV && !GCC_OPTION (TARGET_FIX_VR4120) && TARGET_MIPS16"
   "#"
   "&& cse_not_expected"
   [(const_int 0)]
@@ -2638,7 +2638,7 @@
       (set (match_operand:GPR 3 "register_operand")
 	   (umod:GPR (match_dup 1)
 		     (match_dup 2)))])]
-  "ISA_HAS_<D>DIV && !TARGET_FIX_VR4120"
+  "ISA_HAS_<D>DIV && !GCC_OPTION (TARGET_FIX_VR4120)"
 {
   if (TARGET_MIPS16)
     {
@@ -2741,7 +2741,7 @@
 	(sqrt:ANYF (match_operand:ANYF 1 "register_operand" "f")))]
   "<sqrt_condition>"
 {
-  if (TARGET_FIX_SB1)
+  if (GCC_OPTION (TARGET_FIX_SB1))
     return "sqrt.<fmt>\t%0,%1\;mov.<fmt>\t%0,%0";
   else
     return "sqrt.<fmt>\t%0,%1";
@@ -2749,7 +2749,7 @@
   [(set_attr "type" "fsqrt")
    (set_attr "mode" "<UNITMODE>")
    (set (attr "insn_count")
-        (if_then_else (match_test "TARGET_FIX_SB1")
+        (if_then_else (match_test "GCC_OPTION (TARGET_FIX_SB1)")
                       (const_int 2)
                       (const_int 1)))])
 
@@ -2757,9 +2757,9 @@
   [(set (match_operand:ANYF 0 "register_operand" "=f")
 	(div:ANYF (match_operand:ANYF 1 "const_1_operand" "")
 		  (sqrt:ANYF (match_operand:ANYF 2 "register_operand" "f"))))]
-  "ISA_HAS_FP_RECIP_RSQRT (<MODE>mode) && flag_unsafe_math_optimizations"
+  "ISA_HAS_FP_RECIP_RSQRT (<MODE>mode) && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
-  if (TARGET_FIX_SB1)
+  if (GCC_OPTION (TARGET_FIX_SB1))
     return "rsqrt.<fmt>\t%0,%2\;mov.<fmt>\t%0,%0";
   else
     return "rsqrt.<fmt>\t%0,%2";
@@ -2767,7 +2767,7 @@
   [(set_attr "type" "frsqrt")
    (set_attr "mode" "<UNITMODE>")
    (set (attr "insn_count")
-        (if_then_else (match_test "TARGET_FIX_SB1")
+        (if_then_else (match_test "GCC_OPTION (TARGET_FIX_SB1)")
                       (const_int 2)
                       (const_int 1)))])
 
@@ -2775,9 +2775,9 @@
   [(set (match_operand:ANYF 0 "register_operand" "=f")
 	(sqrt:ANYF (div:ANYF (match_operand:ANYF 1 "const_1_operand" "")
 			     (match_operand:ANYF 2 "register_operand" "f"))))]
-  "ISA_HAS_FP_RECIP_RSQRT (<MODE>mode) && flag_unsafe_math_optimizations"
+  "ISA_HAS_FP_RECIP_RSQRT (<MODE>mode) && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
-  if (TARGET_FIX_SB1)
+  if (GCC_OPTION (TARGET_FIX_SB1))
     return "rsqrt.<fmt>\t%0,%2\;mov.<fmt>\t%0,%0";
   else
     return "rsqrt.<fmt>\t%0,%2";
@@ -2785,7 +2785,7 @@
   [(set_attr "type" "frsqrt")
    (set_attr "mode" "<UNITMODE>")
    (set (attr "insn_count")
-        (if_then_else (match_test "TARGET_FIX_SB1")
+        (if_then_else (match_test "GCC_OPTION (TARGET_FIX_SB1)")
                       (const_int 2)
                       (const_int 1)))])
 
@@ -2807,7 +2807,7 @@
 (define_insn "abs<mode>2"
   [(set (match_operand:ANYF 0 "register_operand" "=f")
 	(abs:ANYF (match_operand:ANYF 1 "register_operand" "f")))]
-  "mips_abs == MIPS_IEEE_754_2008 || !HONOR_NANS (<MODE>mode)"
+  "GCC_OPTION (mips_abs) == MIPS_IEEE_754_2008 || !HONOR_NANS (<MODE>mode)"
   "abs.<fmt>\t%0,%1"
   [(set_attr "type" "fabs")
    (set_attr "mode" "<UNITMODE>")])
@@ -2890,7 +2890,7 @@
 (define_insn "neg<mode>2"
   [(set (match_operand:ANYF 0 "register_operand" "=f")
 	(neg:ANYF (match_operand:ANYF 1 "register_operand" "f")))]
-  "mips_abs == MIPS_IEEE_754_2008 || !HONOR_NANS (<MODE>mode)"
+  "GCC_OPTION (mips_abs) == MIPS_IEEE_754_2008 || !HONOR_NANS (<MODE>mode)"
   "neg.<fmt>\t%0,%1"
   [(set_attr "type" "fneg")
    (set_attr "mode" "<UNITMODE>")])
@@ -4180,7 +4180,7 @@
 (define_insn_and_split "*xgot_hi<mode>"
   [(set (match_operand:P 0 "register_operand" "=d")
 	(high:P (match_operand:P 1 "got_disp_operand" "")))]
-  "TARGET_EXPLICIT_RELOCS && TARGET_XGOT"
+  "TARGET_EXPLICIT_RELOCS && GCC_OPTION (TARGET_XGOT)"
   "#"
   "&& reload_completed"
   [(set (match_dup 0) (high:P (match_dup 2)))
@@ -4196,7 +4196,7 @@
   [(set (match_operand:P 0 "register_operand" "=d")
 	(lo_sum:P (match_operand:P 1 "register_operand" "d")
 		  (match_operand:P 2 "got_disp_operand" "")))]
-  "TARGET_EXPLICIT_RELOCS && TARGET_XGOT"
+  "TARGET_EXPLICIT_RELOCS && GCC_OPTION (TARGET_XGOT)"
   "#"
   "&& reload_completed"
   [(set (match_dup 0)
@@ -4386,7 +4386,7 @@
 	(mem:DI (plus:DI (match_dup 0)
 			 (match_operand:DI 1 "const_int_operand"))))]
   "TARGET_64BIT && TARGET_MIPS16 && reload_completed
-   && !TARGET_DEBUG_D_MODE
+   && !GCC_OPTION (TARGET_DEBUG_D_MODE)
    && ((INTVAL (operands[1]) < 0
 	&& INTVAL (operands[1]) >= -0x10)
        || (INTVAL (operands[1]) >= 32 * 8
@@ -4464,7 +4464,7 @@
   [(set (match_operand:SI 0 "d_operand")
 	(mem:SI (plus:SI (match_dup 0)
 			 (match_operand:SI 1 "const_int_operand"))))]
-  "TARGET_MIPS16 && reload_completed && !TARGET_DEBUG_D_MODE
+  "TARGET_MIPS16 && reload_completed && !GCC_OPTION (TARGET_DEBUG_D_MODE)
    && ((INTVAL (operands[1]) < 0
 	&& INTVAL (operands[1]) >= -0x80)
        || (INTVAL (operands[1]) >= 32 * 4
@@ -4502,7 +4502,7 @@
 (define_split
   [(set (match_operand:SI 0 "d_operand")
 	(match_operand:SI 1 "const_int_operand"))]
-  "TARGET_MIPS16 && reload_completed && !TARGET_DEBUG_D_MODE
+  "TARGET_MIPS16 && reload_completed && !GCC_OPTION (TARGET_DEBUG_D_MODE)
    && INTVAL (operands[1]) >= 0x100
    && INTVAL (operands[1]) <= 0xff + 0x7f"
   [(set (match_dup 0) (match_dup 1))
@@ -4605,7 +4605,7 @@
   [(set (match_operand:HI 0 "d_operand")
 	(mem:HI (plus:SI (match_dup 0)
 			 (match_operand:SI 1 "const_int_operand"))))]
-  "TARGET_MIPS16 && reload_completed && !TARGET_DEBUG_D_MODE
+  "TARGET_MIPS16 && reload_completed && !GCC_OPTION (TARGET_DEBUG_D_MODE)
    && ((INTVAL (operands[1]) < 0
 	&& INTVAL (operands[1]) >= -0x80)
        || (INTVAL (operands[1]) >= 32 * 2
@@ -4681,7 +4681,7 @@
   [(set (match_operand:QI 0 "d_operand")
 	(mem:QI (plus:SI (match_dup 0)
 			 (match_operand:SI 1 "const_int_operand"))))]
-  "TARGET_MIPS16 && reload_completed && !TARGET_DEBUG_D_MODE
+  "TARGET_MIPS16 && reload_completed && !GCC_OPTION (TARGET_DEBUG_D_MODE)
    && ((INTVAL (operands[1]) < 0
 	&& INTVAL (operands[1]) >= -0x80)
        || (INTVAL (operands[1]) >= 32
@@ -5185,7 +5185,7 @@
       emit_insn (gen_sync ());
       emit_insn (PMODE_INSN (gen_clear_hazard, ()));
     }
-  else if (mips_cache_flush_func && mips_cache_flush_func[0])
+  else if (GCC_OPTION (mips_cache_flush_func) && GCC_OPTION (mips_cache_flush_func)[0])
     {
       rtx len = gen_reg_rtx (Pmode);
       emit_insn (gen_sub3_insn (len, operands[1], operands[0]));
@@ -5285,7 +5285,7 @@
      be careful not to allocate a new register if we've reached the
      reload pass.  */
   if (TARGET_MIPS16
-      && optimize
+      && GCC_OPTION (optimize)
       && CONST_INT_P (operands[2])
       && INTVAL (operands[2]) > 8
       && INTVAL (operands[2]) <= 16
@@ -5402,7 +5402,7 @@
   [(set (match_operand:GPR 0 "d_operand")
 	(any_shift:GPR (match_operand:GPR 1 "d_operand")
 		       (match_operand:GPR 2 "const_int_operand")))]
-  "TARGET_MIPS16 && reload_completed && !TARGET_DEBUG_D_MODE
+  "TARGET_MIPS16 && reload_completed && !GCC_OPTION (TARGET_DEBUG_D_MODE)
    && INTVAL (operands[2]) > 8
    && INTVAL (operands[2]) <= 16"
   [(set (match_dup 0) (any_shift:GPR (match_dup 1) (const_int 8)))
diff --git a/gcc/config/mips/netbsd.h b/gcc/config/mips/netbsd.h
index 0313345..f2f8651 100644
--- a/gcc/config/mips/netbsd.h
+++ b/gcc/config/mips/netbsd.h
@@ -32,13 +32,13 @@ along with GCC; see the file COPYING3.  If not see
       if (TARGET_ABICALLS)				\
 	builtin_define ("__ABICALLS__");		\
 							\
-      if (mips_abi == ABI_EABI)				\
+      if (GCC_OPTION (mips_abi) == ABI_EABI)				\
 	builtin_define ("__mips_eabi");			\
-      else if (mips_abi == ABI_N32)			\
+      else if (GCC_OPTION (mips_abi) == ABI_N32)			\
 	builtin_define ("__mips_n32");			\
-      else if (mips_abi == ABI_64)			\
+      else if (GCC_OPTION (mips_abi) == ABI_64)			\
 	builtin_define ("__mips_n64");			\
-      else if (mips_abi == ABI_O64)			\
+      else if (GCC_OPTION (mips_abi) == ABI_O64)			\
 	builtin_define ("__mips_o64");			\
     }							\
   while (0)
diff --git a/gcc/config/mips/sb1.md b/gcc/config/mips/sb1.md
index 311300e..215e2f8 100644
--- a/gcc/config/mips/sb1.md
+++ b/gcc/config/mips/sb1.md
@@ -77,7 +77,7 @@
 
 (define_attr "sb1_fp_pipes" "one,two"
   (cond [(and (match_test "TARGET_FLOAT64")
-	      (not (match_test "TARGET_FP_EXCEPTIONS")))
+	      (not (match_test "GCC_OPTION (TARGET_FP_EXCEPTIONS)")))
 	 (const_string "two")]
 	(const_string "one")))
 
diff --git a/gcc/config/mips/sdemtk.h b/gcc/config/mips/sdemtk.h
index 15dbf16..8d9f5d1 100644
--- a/gcc/config/mips/sdemtk.h
+++ b/gcc/config/mips/sdemtk.h
@@ -33,7 +33,7 @@ along with GCC; see the file COPYING3.  If not see
       if (TARGET_FLOAT64)				\
 	builtin_define ("__mipsfp64");			\
 							\
-      if (TARGET_NO_FLOAT) 				\
+      if (GCC_OPTION (TARGET_NO_FLOAT)) 				\
 	builtin_define ("__NO_FLOAT");			\
       else if (TARGET_SOFT_FLOAT_ABI)			\
 	builtin_define ("__SOFT_FLOAT");		\
@@ -69,7 +69,7 @@ extern void mips_sync_icache (void *beg, unsigned long len);
    noting that the SDE library takes arguments (address, size).  */
 #undef MIPS_ICACHE_SYNC
 #define MIPS_ICACHE_SYNC(ADDR, SIZE)					\
-  emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mips_cache_flush_func),	\
+  emit_library_call (gen_rtx_SYMBOL_REF (Pmode, GCC_OPTION (mips_cache_flush_func)),	\
 		     LCT_NORMAL, VOIDmode, 2, ADDR, Pmode,		\
 		     SIZE, TYPE_MODE (sizetype))
 
diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c
index 2616dd5..9d33003 100644
--- a/gcc/config/mmix/mmix.c
+++ b/gcc/config/mmix/mmix.c
@@ -67,7 +67,7 @@ along with GCC; see the file COPYING3.  If not see
    information.  FIXME: Some tweak to leaf_function_p might be
    preferable.  */
 #define MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS			\
- (flag_exceptions						\
+ (GCC_OPTION (flag_exceptions)						\
   && ((reload_completed && df_regs_ever_live_p (MMIX_rJ_REGNUM))	\
       || !leaf_function_p ()))
 
@@ -293,10 +293,10 @@ mmix_option_override (void)
      PIC; we use absolute address items for mmixal compatibility.  FIXME:
      They could be relative if we just elide them to after all pertinent
      labels.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
-      warning (0, "-f%s not supported: ignored", (flag_pic > 1) ? "PIC" : "pic");
-      flag_pic = 0;
+      warning (0, "-f%s not supported: ignored", (GCC_OPTION (flag_pic) > 1) ? "PIC" : "pic");
+      GCC_OPTION (flag_pic) = 0;
     }
 }
 
diff --git a/gcc/config/mn10300/constraints.md b/gcc/config/mn10300/constraints.md
index cb2997a..d242b29 100644
--- a/gcc/config/mn10300/constraints.md
+++ b/gcc/config/mn10300/constraints.md
@@ -54,7 +54,7 @@
 
 (define_constraint "S"
   "@internal"
-  (if_then_else (match_test "flag_pic")
+  (if_then_else (match_test "GCC_OPTION (flag_pic)")
 	(and (match_test "GET_CODE (op) == UNSPEC")
 	     (ior (match_test "XINT (op, 1) == UNSPEC_PLT")
 		  (match_test "XINT (op, 1) == UNSPEC_PIC")
diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c
index eb00077..ed787ce 100644
--- a/gcc/config/mn10300/mn10300.c
+++ b/gcc/config/mn10300/mn10300.c
@@ -72,30 +72,30 @@ static void
 mn10300_option_override (void)
 {
   if (TARGET_AM33)
-    target_flags &= ~MASK_MULT_BUG;
+    GCC_OPTION (target_flags) &= ~MASK_MULT_BUG;
   else
     {
       /* Disable scheduling for the MN10300 as we do
 	 not have timing information available for it.  */
-      flag_schedule_insns = 0;
-      flag_schedule_insns_after_reload = 0;
+      GCC_OPTION (flag_schedule_insns) = 0;
+      GCC_OPTION (flag_schedule_insns_after_reload) = 0;
 
       /* Force enable splitting of wide types, as otherwise it is trivial
 	 to run out of registers.  Indeed, this works so well that register
 	 allocation problems are now more common *without* optimization,
 	 when this flag is not enabled by default.  */
-      flag_split_wide_types = 1;
+      GCC_OPTION (flag_split_wide_types) = 1;
     }
 
-  if (mn10300_tune_string)
+  if (GCC_OPTION (mn10300_tune_string))
     {
-      if (strcasecmp (mn10300_tune_string, "mn10300") == 0)
+      if (strcasecmp (GCC_OPTION (mn10300_tune_string), "mn10300") == 0)
 	mn10300_tune_cpu = PROCESSOR_MN10300;
-      else if (strcasecmp (mn10300_tune_string, "am33") == 0)
+      else if (strcasecmp (GCC_OPTION (mn10300_tune_string), "am33") == 0)
 	mn10300_tune_cpu = PROCESSOR_AM33;
-      else if (strcasecmp (mn10300_tune_string, "am33-2") == 0)
+      else if (strcasecmp (GCC_OPTION (mn10300_tune_string), "am33-2") == 0)
 	mn10300_tune_cpu = PROCESSOR_AM33_2;
-      else if (strcasecmp (mn10300_tune_string, "am34") == 0)
+      else if (strcasecmp (GCC_OPTION (mn10300_tune_string), "am34") == 0)
 	mn10300_tune_cpu = PROCESSOR_AM34;
       else
 	error ("-mtune= expects mn10300, am33, am33-2, or am34");
@@ -600,7 +600,7 @@ mn10300_can_use_retf_insn (void)
 {
   /* Don't bother if we're not optimizing.  In this case we won't
      have proper access to df_regs_ever_live_p.  */
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     return false;
 
   /* EH returns alter the saved return address; MDR is not current.  */
@@ -764,7 +764,7 @@ mn10300_expand_prologue (void)
   /* If we use any of the callee-saved registers, save them now.  */
   mn10300_gen_multiple_store (mask);
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = size + popcount (mask) * 4;
 
   if (TARGET_AM33_2 && fp_regs_to_save ())
@@ -782,7 +782,7 @@ mn10300_expand_prologue (void)
       unsigned int strategy_size = (unsigned)-1, this_strategy_size;
       rtx reg;
 
-      if (flag_stack_usage_info)
+      if (GCC_OPTION (flag_stack_usage_info))
 	current_function_static_stack_size += num_regs_to_save * 4;
 
       /* We have several different strategies to save FP registers.
@@ -1017,7 +1017,7 @@ mn10300_expand_prologue (void)
 			      stack_pointer_rtx,
 			      GEN_INT (-size))));
 
-  if (flag_pic && df_regs_ever_live_p (PIC_OFFSET_TABLE_REGNUM))
+  if (GCC_OPTION (flag_pic) && df_regs_ever_live_p (PIC_OFFSET_TABLE_REGNUM))
     emit_insn (gen_load_pic ());
 }
 
@@ -1820,7 +1820,7 @@ static rtx
 mn10300_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
 			    enum machine_mode mode ATTRIBUTE_UNUSED)
 {
-  if (flag_pic && ! mn10300_legitimate_pic_operand_p (x))
+  if (GCC_OPTION (flag_pic) && ! mn10300_legitimate_pic_operand_p (x))
     x = mn10300_legitimize_pic_address (oldx, NULL_RTX);
 
   /* Uh-oh.  We might have an address for x[n-100000].  This needs
@@ -1954,7 +1954,7 @@ mn10300_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
   rtx base, index;
 
   if (CONSTANT_ADDRESS_P (x))
-    return !flag_pic || mn10300_legitimate_pic_operand_p (x);
+    return !GCC_OPTION (flag_pic) || mn10300_legitimate_pic_operand_p (x);
 
   if (RTX_OK_FOR_BASE_P (x, strict))
     return true;
@@ -1994,7 +1994,7 @@ mn10300_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
     return IN_RANGE (INTVAL (index), -1 - 0x7fffffff, 0x7fffffff);
 
   if (CONSTANT_ADDRESS_P (index))
-    return !flag_pic || mn10300_legitimate_pic_operand_p (index);
+    return !GCC_OPTION (flag_pic) || mn10300_legitimate_pic_operand_p (index);
 
   return false;
 }
@@ -2264,7 +2264,7 @@ mn10300_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
 
   /* From here on, all we need consider are legal combinations.  */
 
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     {
       /* The scale here is bytes * 2.  */
 
@@ -2513,7 +2513,7 @@ mn10300_encode_section_info (tree decl, rtx rtl, int first)
   if (GET_CODE (symbol) != SYMBOL_REF)
     return;
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     SYMBOL_REF_FLAG (symbol) = (*targetm.binds_local_p) (decl);
 }
 
@@ -2852,7 +2852,7 @@ mn10300_conditional_register_usage (void)
 	   i <= LAST_FP_REGNUM; i++)
 	fixed_regs[i] = call_used_regs[i] = 1;
     }
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     fixed_regs[PIC_OFFSET_TABLE_REGNUM] =
     call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;
 }
@@ -3316,7 +3316,7 @@ static void
 mn10300_reorg (void)
 {
   /* These are optimizations, so only run them if optimizing.  */
-  if (TARGET_AM33 && (optimize > 0 || optimize_size))
+  if (TARGET_AM33 && (GCC_OPTION (optimize) > 0 || GCC_OPTION (optimize_size)))
     {
       if (TARGET_ALLOW_SETLB)
 	mn10300_scan_for_setlb_lcc ();
diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h
index 1d91104..e98f89b 100644
--- a/gcc/config/mn10300/mn10300.h
+++ b/gcc/config/mn10300/mn10300.h
@@ -64,9 +64,9 @@
 
 extern enum processor_type mn10300_tune_cpu;
 
-#define TARGET_AM33	(mn10300_processor >= PROCESSOR_AM33)
-#define TARGET_AM33_2	(mn10300_processor >= PROCESSOR_AM33_2)
-#define TARGET_AM34	(mn10300_processor >= PROCESSOR_AM34)
+#define TARGET_AM33	(GCC_OPTION (mn10300_processor) >= PROCESSOR_AM33)
+#define TARGET_AM33_2	(GCC_OPTION (mn10300_processor) >= PROCESSOR_AM33_2)
+#define TARGET_AM34	(GCC_OPTION (mn10300_processor) >= PROCESSOR_AM34)
 
 #ifndef PROCESSOR_DEFAULT
 #define PROCESSOR_DEFAULT PROCESSOR_MN10300
diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md
index 6b6381c..fdb706e 100644
--- a/gcc/config/mn10300/mn10300.md
+++ b/gcc/config/mn10300/mn10300.md
@@ -395,7 +395,7 @@
   if (!register_operand (operand1, SImode)
       && !register_operand (operand0, SImode))
     operands[1] = force_reg (SImode, operand1);
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       rtx temp;
       if (SYMBOLIC_CONST_P (operands[1]))
@@ -1524,7 +1524,7 @@
 
 (define_expand "builtin_setjmp_receiver"
   [(match_operand 0 "" "")]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
 {
   emit_insn (gen_load_pic ());
   DONE;
@@ -1550,7 +1550,7 @@
   emit_insn (gen_ashlsi3 (index, index, const2_rtx));
   emit_move_insn (addr, gen_rtx_MEM (SImode,
 				     gen_rtx_PLUS (SImode, table, index)));
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     emit_insn (gen_addsi3 (addr, addr, table));
 
   emit_jump_insn (gen_tablejump (addr, operands[3]));
@@ -1575,7 +1575,7 @@
 {
   rtx fn = XEXP (operands[0], 0);
 
-  if (flag_pic && GET_CODE (fn) == SYMBOL_REF)
+  if (GCC_OPTION (flag_pic) && GET_CODE (fn) == SYMBOL_REF)
     {
       if (MN10300_GLOBAL_P (fn))
 	{
@@ -1622,7 +1622,7 @@
 {
   rtx fn = XEXP (operands[1], 0);
 
-  if (flag_pic && GET_CODE (fn) == SYMBOL_REF)
+  if (GCC_OPTION (flag_pic) && GET_CODE (fn) == SYMBOL_REF)
     {
       if (MN10300_GLOBAL_P (fn))
 	{
@@ -1870,7 +1870,7 @@
 (define_expand "sqrtsf2"
   [(set (match_operand:SF 0 "register_operand" "")
 	(sqrt:SF (match_operand:SF 1 "register_operand" "")))]
-  "TARGET_AM33_2 && flag_unsafe_math_optimizations"
+  "TARGET_AM33_2 && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   rtx scratch = gen_reg_rtx (SFmode);
   emit_insn (gen_rsqrtsf2 (scratch, operands[1], CONST1_RTX (SFmode)));
@@ -2070,7 +2070,7 @@
 
 (define_expand "load_pic"
   [(const_int 0)]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
 {
   if (TARGET_AM33)
     emit_insn (gen_am33_load_pic (pic_offset_table_rtx));
diff --git a/gcc/config/mn10300/predicates.md b/gcc/config/mn10300/predicates.md
index e56df5c..e6c11d5 100644
--- a/gcc/config/mn10300/predicates.md
+++ b/gcc/config/mn10300/predicates.md
@@ -30,7 +30,7 @@
 (define_predicate "call_address_operand"
   (match_code "symbol_ref,reg,unspec")
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     return (satisfies_constraint_S (op) || GET_CODE (op) == REG);
 
   return (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == REG);
diff --git a/gcc/config/moxie/moxie.c b/gcc/config/moxie/moxie.c
index b646a43..f7eb9dc 100644
--- a/gcc/config/moxie/moxie.c
+++ b/gcc/config/moxie/moxie.c
@@ -284,7 +284,7 @@ moxie_expand_prologue (void)
 
   moxie_compute_frame ();
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = cfun->machine->size_for_adjusting_sp;
 
   /* Save callee-saved registers.  */
diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c
index 80a17a6..8a1b2fc 100644
--- a/gcc/config/msp430/msp430.c
+++ b/gcc/config/msp430/msp430.c
@@ -175,12 +175,12 @@ static const char * msp430_mcu_names [] =
 const char *
 msp430_mcu_name (void)
 {
-  if (target_mcu)
+  if (GCC_OPTION (target_mcu))
     {
       unsigned int i;
       static char mcu_name [64];
 
-      snprintf (mcu_name, sizeof (mcu_name) - 1, "__%s__", target_mcu);
+      snprintf (mcu_name, sizeof (mcu_name) - 1, "__%s__", GCC_OPTION (target_mcu));
       for (i = strlen (mcu_name); i--;)
 	mcu_name[i] = TOUPPER (mcu_name[i]);
       return mcu_name;
@@ -194,21 +194,21 @@ msp430_option_override (void)
 {
   init_machine_status = msp430_init_machine_status;
 
-  if (target_cpu)
+  if (GCC_OPTION (target_cpu))
     {
-      if (strcasecmp (target_cpu, "msp430x") == 0
-	  || strcasecmp (target_cpu, "msp430xv2") == 0
-	  || strcasecmp (target_cpu, "430x") == 0
-	  || strcasecmp (target_cpu, "430xv2") == 0)
+      if (strcasecmp (GCC_OPTION (target_cpu), "msp430x") == 0
+	  || strcasecmp (GCC_OPTION (target_cpu), "msp430xv2") == 0
+	  || strcasecmp (GCC_OPTION (target_cpu), "430x") == 0
+	  || strcasecmp (GCC_OPTION (target_cpu), "430xv2") == 0)
 	msp430x = true;
-      else if (strcasecmp (target_cpu, "msp430") == 0
-	       || strcasecmp (target_cpu, "430") == 0)
+      else if (strcasecmp (GCC_OPTION (target_cpu), "msp430") == 0
+	       || strcasecmp (GCC_OPTION (target_cpu), "430") == 0)
 	msp430x = false;
       else
-	error ("unrecognised argument of -mcpu: %s", target_cpu);
+	error ("unrecognised argument of -mcpu: %s", GCC_OPTION (target_cpu));
     }
 
-  if (target_mcu)
+  if (GCC_OPTION (target_mcu))
     {
       int i;
 
@@ -221,17 +221,17 @@ msp430_option_override (void)
 	 430X names.  However we want to be able to generate special C
 	 preprocessor defines for them, which is why we set target_mcu
 	 to NULL.  */
-      if (strcasecmp (target_mcu, "msp430") == 0)
+      if (strcasecmp (GCC_OPTION (target_mcu), "msp430") == 0)
 	{
 	  msp430x = false;
-	  target_mcu = NULL;
+	  GCC_OPTION (target_mcu) = NULL;
 	}
-      else if (strcasecmp (target_mcu, "msp430x") == 0
-	       || strcasecmp (target_mcu, "msp430xv2") == 0)
-	target_mcu = NULL;
+      else if (strcasecmp (GCC_OPTION (target_mcu), "msp430x") == 0
+	       || strcasecmp (GCC_OPTION (target_mcu), "msp430xv2") == 0)
+	GCC_OPTION (target_mcu) = NULL;
       else
 	for (i = ARRAY_SIZE (msp430_mcu_names); i--;)
-	  if (strcasecmp (msp430_mcu_names[i], target_mcu) == 0)
+	  if (strcasecmp (msp430_mcu_names[i], GCC_OPTION (target_mcu)) == 0)
 	    {
 	      msp430x = false;
 	      break;
@@ -243,18 +243,18 @@ msp430_option_override (void)
   if (TARGET_LARGE && !msp430x)
     error ("-mlarge requires a 430X-compatible -mmcu=");
 
-  if (flag_exceptions || flag_non_call_exceptions
-      || flag_unwind_tables || flag_asynchronous_unwind_tables)
-    flag_omit_frame_pointer = false;
+  if (GCC_OPTION (flag_exceptions) || GCC_OPTION (flag_non_call_exceptions)
+      || GCC_OPTION (flag_unwind_tables) || GCC_OPTION (flag_asynchronous_unwind_tables))
+    GCC_OPTION (flag_omit_frame_pointer) = false;
   else
-    flag_omit_frame_pointer = true;
+    GCC_OPTION (flag_omit_frame_pointer) = true;
 
   /* This is a hack to work around a problem with the newlib build
      mechanism.  Newlib always appends CFLAGS to the end of the GCC
      command line and always sets -O2 in CFLAGS.  Thus it is not
      possible to build newlib with -Os enabled.  Until now...  */
-  if (TARGET_OPT_SPACE && optimize < 3)
-    optimize_size = 1;
+  if (TARGET_OPT_SPACE && GCC_OPTION (optimize) < 3)
+    GCC_OPTION (optimize_size) = 1;
 }
 
 
@@ -1324,7 +1324,7 @@ msp430_expand_prologue (void)
   if (!cfun->machine->computed)
     msp430_compute_frame_info ();
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = cfun->machine->framesize;
 
   if (crtl->args.pretend_args_size)
@@ -1849,9 +1849,9 @@ static const struct
 bool
 msp430_is_f5_mcu (void)
 {
-  if (target_mcu == NULL)
+  if (GCC_OPTION (target_mcu) == NULL)
     return false;
-  return strncasecmp (target_mcu, "msp430f5", 8) == 0;
+  return strncasecmp (GCC_OPTION (target_mcu), "msp430f5", 8) == 0;
 }
 
 /* Returns true id the current MCU has a second generation 32-bit hardware multiplier.  */
@@ -1868,11 +1868,11 @@ has_32bit_hw_mult (void)
       "msp430f47177",     "msp430f47187",     "msp430f47197"
     };
   int i;
-  if (target_mcu == NULL)
+  if (GCC_OPTION (target_mcu) == NULL)
     return false;
 
   for (i = ARRAY_SIZE (known_32bit_mult_mcus); i--;)
-    if (strcasecmp (target_mcu, known_32bit_mult_mcus[i]) == 0)
+    if (strcasecmp (GCC_OPTION (target_mcu), known_32bit_mult_mcus[i]) == 0)
       return true;
 
   return false;
@@ -1882,7 +1882,7 @@ has_32bit_hw_mult (void)
 bool
 msp430_hwmult_enabled (void)
 {
-  if (target_mcu == NULL)
+  if (GCC_OPTION (target_mcu) == NULL)
     return false;
 
   if (!ENABLE_HWMULT)
diff --git a/gcc/config/msp430/msp430.md b/gcc/config/msp430/msp430.md
index c0c97da..3c1bd8d 100644
--- a/gcc/config/msp430/msp430.md
+++ b/gcc/config/msp430/msp430.md
@@ -1321,7 +1321,7 @@
   [(set (match_operand:SI                          0 "register_operand" "=r")
 	(mult:SI (sign_extend:SI (match_operand:HI 1 "register_operand" "%0"))
 		 (sign_extend:SI (match_operand:HI 2 "register_operand" "r"))))]
-  "optimize > 2 && msp430_hwmult_enabled ()"
+  "GCC_OPTION (optimize) > 2 && msp430_hwmult_enabled ()"
   "*
     if (msp430_is_f5_mcu ())
       return \"MOV.W %1, &0x04C2 { MOV.W %2, &0x04C8 { MOV.W &0x04CA, %L0 { MOV.W &0x04CC, %H0\";
@@ -1334,7 +1334,7 @@
   [(set (match_operand:SI                          0 "register_operand" "=r")
 	(mult:SI (zero_extend:SI (match_operand:HI 1 "register_operand" "%0"))
 		 (zero_extend:SI (match_operand:HI 2 "register_operand" "r"))))]
-  "optimize > 2 && msp430_hwmult_enabled ()"
+  "GCC_OPTION (optimize) > 2 && msp430_hwmult_enabled ()"
   "*
     if (msp430_is_f5_mcu ())
       return \"MOV.W %1, &0x04C0 { MOV.W %2, &0x04C8 { MOV.W &0x04CA, %L0 { MOV.W &0x04CC, %H0\";
@@ -1347,7 +1347,7 @@
   [(set (match_operand:DI                          0 "register_operand" "=r")
 	(mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "%0"))
 		 (sign_extend:DI (match_operand:SI 2 "register_operand" "r"))))]
-  "optimize > 2 && msp430_hwmult_enabled ()"
+  "GCC_OPTION (optimize) > 2 && msp430_hwmult_enabled ()"
   "*
     if (msp430_is_f5_mcu ())
       return \"MOV.W %L1, &0x04D4 { MOV.W %H1, &0x04D6 { MOV.W %L2, &0x04E0 { MOV.W %H2, &0x04E2 { MOV.W &0x04E4, %A0 { MOV.W &0x04E6, %B0 { MOV.W &0x04E8, %C0 { MOV.W &0x04EA, %D0\";
@@ -1360,7 +1360,7 @@
   [(set (match_operand:DI                          0 "register_operand" "=r")
 	(mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "%0"))
 		 (zero_extend:DI (match_operand:SI 2 "register_operand" "r"))))]
-  "optimize > 2 && msp430_hwmult_enabled ()"
+  "GCC_OPTION (optimize) > 2 && msp430_hwmult_enabled ()"
   "*
     if (msp430_is_f5_mcu ())
       return \"MOV.W %L1, &0x04D0 { MOV.W %H1, &0x04D2 { MOV.W %L2, &0x04E0 { MOV.W %H2, &0x04E2 { MOV.W &0x04E4, %A0 { MOV.W &0x04E6, %B0 { MOV.W &0x04E8, %C0 { MOV.W &0x04EA, %D0\";
diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c
index 645d8dd..833889d 100644
--- a/gcc/config/nds32/nds32.c
+++ b/gcc/config/nds32/nds32.c
@@ -181,7 +181,7 @@ nds32_compute_stack_frame (void)
 
   /* If $gp value is required to be saved on stack, it needs 4 bytes space.
      Check whether we are using PIC code genration.  */
-  cfun->machine->gp_size = (flag_pic) ? 4 : 0;
+  cfun->machine->gp_size = (GCC_OPTION (flag_pic)) ? 4 : 0;
 
   /* If $lp value is required to be saved on stack, it needs 4 bytes space.
      Check whether $lp is ever live.  */
@@ -244,7 +244,7 @@ nds32_compute_stack_frame (void)
 
       /* If stack usage computation is required,
          we need to provide the static stack size.  */
-      if (flag_stack_usage_info)
+      if (GCC_OPTION (flag_stack_usage_info))
 	current_function_static_stack_size = 0;
 
       /* No need to do following adjustment, return immediately.  */
@@ -339,7 +339,7 @@ nds32_compute_stack_frame (void)
 
   /* If stack usage computation is required,
      we need to provide the static stack size.  */
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     {
       current_function_static_stack_size
 	= NDS32_ROUND_UP_DOUBLE_WORD (block_size)
@@ -1012,7 +1012,7 @@ nds32_emit_isr_vector_section (int vector_id)
 
   /* Currently we have 4-byte or 16-byte size for each vector.
      If it is 4-byte, the first level handler name has suffix string "_4b".  */
-  vs_str = (nds32_isr_vector_size == 4) ? "_4b" : "";
+  vs_str = (GCC_OPTION (nds32_isr_vector_size) == 4) ? "_4b" : "";
 
   /* Now we can create first level handler name.  */
   snprintf (first_level_handler_name, sizeof (first_level_handler_name),
@@ -1027,11 +1027,11 @@ nds32_emit_isr_vector_section (int vector_id)
 
   /* Everything is ready.  We can start emit vector section content.  */
   nds32_emit_section_head_template (section_name, symbol_name,
-				    floor_log2 (nds32_isr_vector_size), false);
+				    floor_log2 (GCC_OPTION (nds32_isr_vector_size)), false);
 
   /* According to the vector size, the instructions in the
      vector section may be different.  */
-  if (nds32_isr_vector_size == 4)
+  if (GCC_OPTION (nds32_isr_vector_size) == 4)
     {
       /* This block is for 4-byte vector size.
          Hardware $VID support is necessary and only one instruction
@@ -1106,7 +1106,7 @@ nds32_emit_isr_reset_content (void)
   char symbol_name[100];
 
   total_n_vectors = nds32_isr_vectors[0].total_n_vectors;
-  vs_str = (nds32_isr_vector_size == 4) ? "_4b" : "";
+  vs_str = (GCC_OPTION (nds32_isr_vector_size) == 4) ? "_4b" : "";
 
   fprintf (asm_out_file, "\t! RESET HANDLER CONTENT - BEGIN !\n");
 
@@ -1142,7 +1142,7 @@ nds32_emit_isr_reset_content (void)
 
   fprintf (asm_out_file, "\t! ....................................\n");
   nds32_emit_section_head_template (section_name, symbol_name,
-				    floor_log2 (nds32_isr_vector_size), false);
+				    floor_log2 (GCC_OPTION (nds32_isr_vector_size)), false);
   fprintf (asm_out_file, "\tj\t%s ! jump to reset handler\n",
 			 reset_handler_name);
   nds32_emit_section_tail_template (symbol_name);
@@ -1722,7 +1722,7 @@ nds32_have_prologue_p (void)
     if (NDS32_REQUIRED_CALLEE_SAVED_P (i))
       return 1;
 
-  return (flag_pic
+  return (GCC_OPTION (flag_pic)
 	  || NDS32_REQUIRED_CALLEE_SAVED_P (FP_REGNUM)
 	  || NDS32_REQUIRED_CALLEE_SAVED_P (LP_REGNUM));
 }
@@ -1746,7 +1746,7 @@ static int
 nds32_register_priority (int hard_regno)
 {
   /* Encourage to use r0-r7 for LRA when optimize for size.  */
-  if (optimize_size && hard_regno < 8)
+  if (GCC_OPTION (optimize_size) && hard_regno < 8)
     return 4;
   return 3;
 }
@@ -2215,24 +2215,24 @@ nds32_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
      we get trampoline alignment in bytes for convenient comparison.  */
   tramp_align_in_bytes = TRAMPOLINE_ALIGNMENT / BITS_PER_UNIT;
 
-  if (tramp_align_in_bytes >= nds32_cache_block_size
-      && (tramp_align_in_bytes % nds32_cache_block_size) == 0)
+  if (tramp_align_in_bytes >= GCC_OPTION (nds32_cache_block_size)
+      && (tramp_align_in_bytes % GCC_OPTION (nds32_cache_block_size)) == 0)
     {
       /* Under this condition, the starting address of trampoline
          must be aligned to the starting address of each cache block
          and we do not have to worry about cross-boundary issue.  */
       for (i = 0;
-	   i < (TRAMPOLINE_SIZE + nds32_cache_block_size - 1)
-	       / nds32_cache_block_size;
+	   i < (TRAMPOLINE_SIZE + GCC_OPTION (nds32_cache_block_size) - 1)
+	       / GCC_OPTION (nds32_cache_block_size);
 	   i++)
 	{
 	  emit_move_insn (tmp_reg,
 			  plus_constant (Pmode, sync_cache_addr,
-					 nds32_cache_block_size * i));
+					 GCC_OPTION (nds32_cache_block_size) * i));
 	  emit_insn (isync_insn);
 	}
     }
-  else if (TRAMPOLINE_SIZE > nds32_cache_block_size)
+  else if (TRAMPOLINE_SIZE > GCC_OPTION (nds32_cache_block_size))
     {
       /* The starting address of trampoline code
          may not be aligned to the cache block,
@@ -2240,13 +2240,13 @@ nds32_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
          We need to sync the last element, which is 4-byte size,
          of trampoline template.  */
       for (i = 0;
-	   i < (TRAMPOLINE_SIZE + nds32_cache_block_size - 1)
-	       / nds32_cache_block_size;
+	   i < (TRAMPOLINE_SIZE + GCC_OPTION (nds32_cache_block_size) - 1)
+	       / GCC_OPTION (nds32_cache_block_size);
 	   i++)
 	{
 	  emit_move_insn (tmp_reg,
 			  plus_constant (Pmode, sync_cache_addr,
-					 nds32_cache_block_size * i));
+					 GCC_OPTION (nds32_cache_block_size) * i));
 	  emit_insn (isync_insn);
 	}
 
@@ -2668,14 +2668,14 @@ nds32_asm_file_start (void)
   /* Give assembler the size of each vector for interrupt handler.  */
   fprintf (asm_out_file, "\t! This vector size directive is required "
 			 "for checking inconsistency on interrupt handler\n");
-  fprintf (asm_out_file, "\t.vec_size\t%d\n", nds32_isr_vector_size);
+  fprintf (asm_out_file, "\t.vec_size\t%d\n", GCC_OPTION (nds32_isr_vector_size));
 
   /* If user enables '-mforce-fp-as-gp' or compiles programs with -Os,
      the compiler may produce 'la $fp,_FP_BASE_' instruction
      at prologue for fp-as-gp optimization.
      We should emit weak reference of _FP_BASE_ to avoid undefined reference
      in case user does not pass '--relax' option to linker.  */
-  if (TARGET_FORCE_FP_AS_GP || optimize_size)
+  if (TARGET_FORCE_FP_AS_GP || GCC_OPTION (optimize_size))
     {
       fprintf (asm_out_file, "\t! This weak reference is required to do "
 			     "fp-as-gp link time optimization\n");
@@ -2729,15 +2729,15 @@ nds32_asm_file_start (void)
 
   fprintf (asm_out_file, "\t! ------------------------------------\n");
 
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     fprintf (asm_out_file, "\t! Optimization level\t: -Os\n");
   else
-    fprintf (asm_out_file, "\t! Optimization level\t: -O%d\n", optimize);
+    fprintf (asm_out_file, "\t! Optimization level\t: -O%d\n", GCC_OPTION (optimize));
 
   fprintf (asm_out_file, "\t! ------------------------------------\n");
 
   fprintf (asm_out_file, "\t! Cache block size\t: %d\n",
-			 nds32_cache_block_size);
+			 GCC_OPTION (nds32_cache_block_size));
 
   fprintf (asm_out_file, "\t! ------------------------------------\n");
 
@@ -3238,7 +3238,7 @@ nds32_option_override (void)
   if (TARGET_ISA_V2)
     {
       /* Under V2 ISA, we need to strictly disable TARGET_V3PUSH.  */
-      target_flags &= ~MASK_V3PUSH;
+      GCC_OPTION (target_flags) &= ~MASK_V3PUSH;
     }
   if (TARGET_ISA_V3)
     {
@@ -3247,9 +3247,9 @@ nds32_option_override (void)
   if (TARGET_ISA_V3M)
     {
       /* Under V3M ISA, we need to strictly enable TARGET_REDUCED_REGS.  */
-      target_flags |= MASK_REDUCED_REGS;
+      GCC_OPTION (target_flags) |= MASK_REDUCED_REGS;
       /* Under V3M ISA, we need to strictly disable TARGET_PERF_EXT.  */
-      target_flags &= ~MASK_PERF_EXT;
+      GCC_OPTION (target_flags) &= ~MASK_PERF_EXT;
     }
 
   /* See if we are using reduced-set registers:
@@ -3276,11 +3276,11 @@ nds32_option_override (void)
   if (!TARGET_16_BIT)
     {
       /* Under no 16 bit ISA, we need to strictly disable TARGET_V3PUSH.  */
-      target_flags &= ~MASK_V3PUSH;
+      GCC_OPTION (target_flags) &= ~MASK_V3PUSH;
     }
 
   /* Currently, we don't support PIC code generation yet.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     sorry ("not support -fpic");
 }
 
@@ -4562,7 +4562,7 @@ nds32_fp_as_gp_check_available (void)
           so that we have no chance to output .omit_fp_end directive.  */
   if (TARGET_FORBID_FP_AS_GP
       || lookup_attribute ("naked", DECL_ATTRIBUTES (current_function_decl))
-      || !optimize_size
+      || !GCC_OPTION (optimize_size)
       || frame_pointer_needed
       || NDS32_REQUIRED_CALLEE_SAVED_P (FP_REGNUM)
       || (cfun->stdarg == 1)
@@ -4591,7 +4591,7 @@ nds32_fp_as_gp_check_available (void)
          After that, we can set threshold by the existence of prologue.
          Each fp-implied instruction will gain 2-byte code size
          from gp-aware instruction, so we have following heuristics.  */
-      if (flag_pic
+      if (GCC_OPTION (flag_pic)
 	  || nds32_have_prologue_p ())
 	{
 	  /* Have-prologue:
@@ -5413,7 +5413,7 @@ nds32_target_alignment (rtx label)
 {
   rtx insn;
 
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     return 0;
 
   insn = next_active_insn (label);
diff --git a/gcc/config/nds32/nds32.h b/gcc/config/nds32/nds32.h
index 38847e5..8f75639 100644
--- a/gcc/config/nds32/nds32.h
+++ b/gcc/config/nds32/nds32.h
@@ -327,9 +327,9 @@ enum nds32_builtins
 
 /* ------------------------------------------------------------------------ */
 
-#define TARGET_ISA_V2   (nds32_arch_option == ARCH_V2)
-#define TARGET_ISA_V3   (nds32_arch_option == ARCH_V3)
-#define TARGET_ISA_V3M  (nds32_arch_option == ARCH_V3M)
+#define TARGET_ISA_V2   (GCC_OPTION (nds32_arch_option) == ARCH_V2)
+#define TARGET_ISA_V3   (GCC_OPTION (nds32_arch_option) == ARCH_V3)
+#define TARGET_ISA_V3M  (GCC_OPTION (nds32_arch_option) == ARCH_V3M)
 
 /* ------------------------------------------------------------------------ */
 
@@ -953,7 +953,7 @@ enum reg_class
    : QImode)
 
 /* Generate pc relative jump table when -fpic or -Os.  */
-#define CASE_VECTOR_PC_RELATIVE (flag_pic || optimize_size)
+#define CASE_VECTOR_PC_RELATIVE (GCC_OPTION (flag_pic) || GCC_OPTION (optimize_size))
 
 /* Define this macro if operations between registers with integral mode
    smaller than a word are always performed on the entire register.  */
diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c
index edf9a61..75befbe 100644
--- a/gcc/config/nios2/nios2.c
+++ b/gcc/config/nios2/nios2.c
@@ -469,7 +469,7 @@ nios2_expand_prologue (void)
 
   total_frame_size = nios2_compute_frame_layout ();
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = total_frame_size;
 
   /* Decrement the stack pointer.  */
@@ -679,7 +679,7 @@ void
 nios2_function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED)
 {
   fprintf (file, "\tmov\tr8, ra\n");
-  if (flag_pic == 1)
+  if (GCC_OPTION (flag_pic) == 1)
     {
       fprintf (file, "\tnextpc\tr2\n");
       fprintf (file, "\t1: movhi\tr3, %%hiadj(_gp_got - 1b)\n");
@@ -688,7 +688,7 @@ nios2_function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED)
       fprintf (file, "\tldw\tr2, %%call(_mcount)(r2)\n");
       fprintf (file, "\tcallr\tr2\n");
     }
-  else if (flag_pic == 2)
+  else if (GCC_OPTION (flag_pic) == 2)
     {
       fprintf (file, "\tnextpc\tr2\n");
       fprintf (file, "\t1: movhi\tr3, %%hiadj(_gp_got - 1b)\n");
@@ -829,7 +829,7 @@ nios2_custom_check_insns (void)
   /* Warn if the user has certain exotic operations that won't get used
      without -funsafe-math-optimizations.  See expand_builtin () in
      builtins.c.  */
-  if (!flag_unsafe_math_optimizations)
+  if (!GCC_OPTION (flag_unsafe_math_optimizations))
     for (i = 0; i < ARRAY_SIZE (nios2_fpu_insn); i++)
       if (N2FPU_ENABLED_P (i) && N2FPU_UNSAFE_P (i))
 	warning (0, "switch %<-mcustom-%s%> has no effect unless "
@@ -838,7 +838,7 @@ nios2_custom_check_insns (void)
   /* Warn if the user is trying to use -mcustom-fmins et. al, that won't
      get used without -ffinite-math-only.  See fold_builtin_fmin_fmax ()
      in builtins.c.  */
-  if (!flag_finite_math_only)
+  if (!GCC_OPTION (flag_finite_math_only))
     for (i = 0; i < ARRAY_SIZE (nios2_fpu_insn); i++)
       if (N2FPU_ENABLED_P (i) && N2FPU_FINITE_P (i))
 	warning (0, "switch %<-mcustom-%s%> has no effect unless "
@@ -944,7 +944,7 @@ nios2_handle_custom_fpu_cfg (const char *cfgname, const char *endp,
 	  nios2_set_fpu_custom_code ((enum n2fpu_code) i, cfg->code[i],
 				     override);
       if (cfg->set_sp_constants)
-	flag_single_precision_constant = 1;
+	GCC_OPTION (flag_single_precision_constant) = 1;
     }
   else
     warning (0, "ignoring unrecognized switch %<-mcustom-fpu-cfg%> "
@@ -988,7 +988,7 @@ nios2_option_override (void)
 #endif
 
   /* Check for unsupported options.  */
-  if (flag_pic && !TARGET_LINUX_ABI)
+  if (GCC_OPTION (flag_pic) && !TARGET_LINUX_ABI)
     sorry ("position-independent code requires the Linux ABI");
 
   /* Function to allocate machine-dependent function status.  */
@@ -996,15 +996,15 @@ nios2_option_override (void)
 
   nios2_section_threshold
     = (global_options_set.x_g_switch_value
-       ? g_switch_value : NIOS2_DEFAULT_GVALUE);
+       ? GCC_OPTION (g_switch_value) : NIOS2_DEFAULT_GVALUE);
 
   /* Default to -mgpopt unless -fpic or -fPIC.  */
-  if (TARGET_GPOPT == -1 && flag_pic)
-    TARGET_GPOPT = 0;
+  if (GCC_OPTION (TARGET_GPOPT) == -1 && GCC_OPTION (flag_pic))
+    GCC_OPTION (TARGET_GPOPT) = 0;
 
   /* If we don't have mul, we don't have mulx either!  */
   if (!TARGET_HAS_MUL && TARGET_HAS_MULX)
-    target_flags &= ~MASK_HAS_MULX;
+    GCC_OPTION (target_flags) &= ~MASK_HAS_MULX;
 
   /* Initialize default FPU configurations.  */
   nios2_init_fpu_configs ();
@@ -1019,8 +1019,8 @@ nios2_option_override (void)
      This behavior of prioritization of individual -mcustom-<insn>=
      options before the -mcustom-fpu-cfg= switch is maintained for
      compatibility.  */
-  if (nios2_custom_fpu_cfg_string && *nios2_custom_fpu_cfg_string)
-    nios2_handle_custom_fpu_cfg (nios2_custom_fpu_cfg_string, NULL, false);
+  if (GCC_OPTION (nios2_custom_fpu_cfg_string) && *GCC_OPTION (nios2_custom_fpu_cfg_string))
+    nios2_handle_custom_fpu_cfg (GCC_OPTION (nios2_custom_fpu_cfg_string), NULL, false);
 
   /* Handle options for individual FPU insns.  */
   for (i = 0; i < ARRAY_SIZE (nios2_fpu_insn); i++)
@@ -1150,7 +1150,7 @@ nios2_large_offset_p (int unspec)
 {
   gcc_assert (nios2_unspec_reloc_name (unspec) != NULL);
 
-  if (flag_pic == 2
+  if (GCC_OPTION (flag_pic) == 2
       /* FIXME: TLS GOT offset relocations will eventually also get this
 	 treatment, after binutils support for those are also completed.  */
       && (unspec == UNSPEC_PIC_SYM || unspec == UNSPEC_PIC_CALL_SYM))
@@ -1643,7 +1643,7 @@ nios2_symbol_ref_in_small_data_p (rtx sym)
 {
   gcc_assert (GET_CODE (sym) == SYMBOL_REF);
   return
-    (TARGET_GPOPT
+    (GCC_OPTION (TARGET_GPOPT)
      /* GP-relative access cannot be used for externally defined symbols,
 	because the compilation unit that defines the symbol may place it
 	in a section that cannot be reached from GP.  */
@@ -1697,7 +1697,7 @@ nios2_load_pic_register (void)
 static rtx
 nios2_load_pic_address (rtx sym, int unspec)
 {
-  if (flag_pic == 2
+  if (GCC_OPTION (flag_pic) == 2
       && GET_CODE (sym) == SYMBOL_REF
       && nios2_symbol_binds_local_p (sym))
     /* Under -fPIC, generate a GOTOFF address for local symbols.  */
@@ -1738,7 +1738,7 @@ nios2_legitimize_constant_address (rtx addr)
 
   if (nios2_tls_symbol_p (base))
     base = nios2_legitimize_tls_address (base);
-  else if (flag_pic)
+  else if (GCC_OPTION (flag_pic))
     base = nios2_load_pic_address (base, UNSPEC_PIC_SYM);
   else
     return addr;
@@ -1837,7 +1837,7 @@ nios2_adjust_call_address (rtx *call_op)
   rtx addr;
   gcc_assert (MEM_P (*call_op));
   addr = XEXP (*call_op, 0);
-  if (flag_pic && CONSTANT_P (addr))
+  if (GCC_OPTION (flag_pic) && CONSTANT_P (addr))
     {
       rtx reg = gen_reg_rtx (Pmode);
       emit_move_insn (reg, nios2_load_pic_address (addr, UNSPEC_PIC_CALL_SYM));
@@ -2115,7 +2115,7 @@ nios2_output_dwarf_dtprel (FILE *file, int size, rtx x)
 static void
 nios2_asm_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
 {
-  if (flag_verbose_asm || flag_debug_asm)
+  if (GCC_OPTION (flag_verbose_asm) || GCC_OPTION (flag_debug_asm))
     {
       nios2_compute_frame_layout ();
       nios2_dump_frame_layout (file);
diff --git a/gcc/config/nios2/nios2.h b/gcc/config/nios2/nios2.h
index 17148d3..000d12f 100644
--- a/gcc/config/nios2/nios2.h
+++ b/gcc/config/nios2/nios2.h
@@ -454,7 +454,7 @@ do {                                                                    \
   else                                                                  \
     switch_to_section (bss_section);					\
   ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");                     \
-  if (!flag_inhibit_size_directive)                                     \
+  if (!GCC_OPTION (flag_inhibit_size_directive))                                     \
     ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE);                       \
   ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT));       \
   ASM_OUTPUT_LABEL(FILE, NAME);                                         \
@@ -480,7 +480,7 @@ do {                                                                    \
    with -shared or -fpie, but the warning is harmless and there seems to
    be no good way to suppress it.  */
 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL)		\
-  (flag_pic ? DW_EH_PE_aligned : DW_EH_PE_sdata4)
+  (GCC_OPTION (flag_pic) ? DW_EH_PE_aligned : DW_EH_PE_sdata4)
 
 /* Misc. parameters.  */
 
diff --git a/gcc/config/nios2/nios2.md b/gcc/config/nios2/nios2.md
index b5b599e..0e35301 100644
--- a/gcc/config/nios2/nios2.md
+++ b/gcc/config/nios2/nios2.md
@@ -701,7 +701,7 @@
         (label_ref (match_operand 0 "" "")))]
   ""
   {
-    if (flag_pic || get_attr_length (insn) == 4)
+    if (GCC_OPTION (flag_pic) || get_attr_length (insn) == 4)
       return "br\\t%0";
     else
       return "jmpi\\t%0";
@@ -792,7 +792,7 @@
               (use (label_ref (match_operand 1 "" "")))])]
   ""
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       /* Hopefully, CSE will eliminate this copy.  */
       rtx reg1 = copy_addr_to_reg (gen_rtx_LABEL_REF (Pmode, operands[1]));
@@ -863,7 +863,7 @@
        (pc)))]
   ""
   {
-    if (flag_pic || get_attr_length (insn) == 4)
+    if (GCC_OPTION (flag_pic) || get_attr_length (insn) == 4)
       return "b%0\t%z1, %z2, %l3";
     else
       return "b%R0\t%z1, %z2, .+8;jmpi\t%l3";
diff --git a/gcc/config/openbsd.h b/gcc/config/openbsd.h
index 7150d49..8fe94c1 100644
--- a/gcc/config/openbsd.h
+++ b/gcc/config/openbsd.h
@@ -223,7 +223,7 @@ while (0)
 #undef ASM_DECLARE_FUNCTION_SIZE
 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL)		\
   do {								\
-    if (!flag_inhibit_size_directive)				\
+    if (!GCC_OPTION (flag_inhibit_size_directive))				\
       ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME);			\
   } while (0)
 #endif
@@ -236,7 +236,7 @@ while (0)
       HOST_WIDE_INT size;					\
       ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");		\
       size_directive_output = 0;				\
-      if (!flag_inhibit_size_directive				\
+      if (!GCC_OPTION (flag_inhibit_size_directive)				\
 	  && (DECL) && DECL_SIZE (DECL))			\
 	{							\
 	  size_directive_output = 1;				\
@@ -256,7 +256,7 @@ while (0)
 do {									 \
      const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);		 \
      HOST_WIDE_INT size;						 \
-     if (!flag_inhibit_size_directive && DECL_SIZE (DECL)		 \
+     if (!GCC_OPTION (flag_inhibit_size_directive) && DECL_SIZE (DECL)		 \
          && ! AT_END && TOP_LEVEL					 \
 	 && DECL_INITIAL (DECL) == error_mark_node			 \
 	 && !size_directive_output)					 \
diff --git a/gcc/config/pa/pa-hpux10.h b/gcc/config/pa/pa-hpux10.h
index 1b4d21f..bee74a9 100644
--- a/gcc/config/pa/pa-hpux10.h
+++ b/gcc/config/pa/pa-hpux10.h
@@ -60,7 +60,7 @@ along with GCC; see the file COPYING3.  If not see
 		builtin_define ("PWB");					\
 	      }								\
 	  }								\
-	if (flag_pa_unix >= 1995)					\
+	if (GCC_OPTION (flag_pa_unix) >= 1995)					\
 	  {								\
 	    builtin_define ("_XOPEN_UNIX");				\
 	    builtin_define ("_XOPEN_SOURCE_EXTENDED");			\
diff --git a/gcc/config/pa/pa-hpux11.h b/gcc/config/pa/pa-hpux11.h
index 07f0dec..9e209c0 100644
--- a/gcc/config/pa/pa-hpux11.h
+++ b/gcc/config/pa/pa-hpux11.h
@@ -62,14 +62,14 @@ along with GCC; see the file COPYING3.  If not see
 	  }								\
 	if (!TARGET_64BIT)						\
 	  builtin_define ("_ILP32");					\
-	if (flag_pa_unix >= 1995 && !flag_iso)				\
+	if (GCC_OPTION (flag_pa_unix) >= 1995 && !flag_iso)				\
 	  {								\
 	    builtin_define ("_XOPEN_UNIX");				\
 	    builtin_define ("_XOPEN_SOURCE_EXTENDED");			\
 	  }								\
 	if (TARGET_HPUX_11_11)						\
 	  {								\
-	    if (flag_pa_unix >= 1998)					\
+	    if (GCC_OPTION (flag_pa_unix) >= 1998)					\
 	      {								\
 		if (flag_isoc94 || flag_isoc99 || c_dialect_cxx()	\
 		    || !flag_iso)					\
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index fb698d2..e180dd2 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -464,7 +464,7 @@ fix_range (const char *const_str)
       break;
 
   if (i > FP_REG_LAST)
-    target_flags |= MASK_DISABLE_FPREGS;
+    GCC_OPTION (target_flags) |= MASK_DISABLE_FPREGS;
 }
 
 /* Implement the TARGET_OPTION_OVERRIDE hook.  */
@@ -475,7 +475,7 @@ pa_option_override (void)
   unsigned int i;
   cl_deferred_option *opt;
   vec<cl_deferred_option> *v
-    = (vec<cl_deferred_option> *) pa_deferred_options;
+    = (vec<cl_deferred_option> *) GCC_OPTION (pa_deferred_options);
 
   if (v)
     FOR_EACH_VEC_ELT (*v, i, opt)
@@ -494,43 +494,43 @@ pa_option_override (void)
   /* Unconditional branches in the delay slot are not compatible with dwarf2
      call frame information.  There is no benefit in using this optimization
      on PA8000 and later processors.  */
-  if (pa_cpu >= PROCESSOR_8000
+  if (GCC_OPTION (pa_cpu) >= PROCESSOR_8000
       || (targetm_common.except_unwind_info (&global_options) == UI_DWARF2
-	  && flag_exceptions)
-      || flag_unwind_tables)
-    target_flags &= ~MASK_JUMP_IN_DELAY;
+	  && GCC_OPTION (flag_exceptions))
+      || GCC_OPTION (flag_unwind_tables))
+    GCC_OPTION (target_flags) &= ~MASK_JUMP_IN_DELAY;
 
-  if (flag_pic && TARGET_PORTABLE_RUNTIME)
+  if (GCC_OPTION (flag_pic) && TARGET_PORTABLE_RUNTIME)
     {
       warning (0, "PIC code generation is not supported in the portable runtime model");
     }
 
-  if (flag_pic && TARGET_FAST_INDIRECT_CALLS)
+  if (GCC_OPTION (flag_pic) && TARGET_FAST_INDIRECT_CALLS)
    {
       warning (0, "PIC code generation is not compatible with fast indirect calls");
    }
 
-  if (! TARGET_GAS && write_symbols != NO_DEBUG)
+  if (! TARGET_GAS && GCC_OPTION (write_symbols) != NO_DEBUG)
     {
       warning (0, "-g is only supported when using GAS on this processor,");
       warning (0, "-g option disabled");
-      write_symbols = NO_DEBUG;
+      GCC_OPTION (write_symbols) = NO_DEBUG;
     }
 
   /* We only support the "big PIC" model now.  And we always generate PIC
      code when in 64bit mode.  */
-  if (flag_pic == 1 || TARGET_64BIT)
-    flag_pic = 2;
+  if (GCC_OPTION (flag_pic) == 1 || TARGET_64BIT)
+    GCC_OPTION (flag_pic) = 2;
 
   /* Disable -freorder-blocks-and-partition as we don't support hot and
      cold partitioning.  */
-  if (flag_reorder_blocks_and_partition)
+  if (GCC_OPTION (flag_reorder_blocks_and_partition))
     {
       inform (input_location,
               "-freorder-blocks-and-partition does not work "
               "on this architecture");
-      flag_reorder_blocks_and_partition = 0;
-      flag_reorder_blocks = 1;
+      GCC_OPTION (flag_reorder_blocks_and_partition) = 0;
+      GCC_OPTION (flag_reorder_blocks) = 1;
     }
 
   /* We can't guarantee that .dword is available for 32-bit targets.  */
@@ -919,7 +919,7 @@ legitimize_tls_address (rtx addr)
     {
       case TLS_MODEL_GLOBAL_DYNAMIC:
 	tmp = gen_reg_rtx (Pmode);
-	if (flag_pic)
+	if (GCC_OPTION (flag_pic))
 	  emit_insn (gen_tgd_load_pic (tmp, addr));
 	else
 	  emit_insn (gen_tgd_load (tmp, addr));
@@ -930,7 +930,7 @@ legitimize_tls_address (rtx addr)
 	ret = gen_reg_rtx (Pmode);
 	tmp = gen_reg_rtx (Pmode);
 	start_sequence ();
-	if (flag_pic)
+	if (GCC_OPTION (flag_pic))
 	  emit_insn (gen_tld_load_pic (tmp, addr));
 	else
 	  emit_insn (gen_tld_load (tmp, addr));
@@ -949,7 +949,7 @@ legitimize_tls_address (rtx addr)
 	tmp = gen_reg_rtx (Pmode);
 	ret = gen_reg_rtx (Pmode);
 	emit_insn (gen_tp_load (tp));
-	if (flag_pic)
+	if (GCC_OPTION (flag_pic))
 	  emit_insn (gen_tie_load_pic (tmp, addr));
 	else
 	  emit_insn (gen_tie_load (tmp, addr));
@@ -1038,7 +1038,7 @@ hppa_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
 
   if (pa_tls_referenced_p (x))
     return legitimize_tls_address (x);
-  else if (flag_pic)
+  else if (GCC_OPTION (flag_pic))
     return legitimize_pic_address (x, mode, gen_reg_rtx (Pmode));
 
   /* Strip off CONST.  */
@@ -1953,7 +1953,7 @@ pa_emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg)
 		     was originally given to us.  */
 		  scratch_reg = force_mode (word_mode, scratch_reg);
 		}
-	      else if (flag_pic)
+	      else if (GCC_OPTION (flag_pic))
 		scratch_reg = gen_reg_rtx (Pmode);
 
 	      if (GET_CODE (operand1) == CONST)
@@ -1978,7 +1978,7 @@ pa_emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg)
 	      /* Get the address of the memory location.  PIC-ify it if
 		 necessary.  */
 	      temp = XEXP (temp, 0);
-	      if (flag_pic)
+	      if (GCC_OPTION (flag_pic))
 		temp = legitimize_pic_address (temp, mode, scratch_reg);
 
 	      /* Put the address of the memory location into our destination
@@ -1998,7 +1998,7 @@ pa_emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg)
 	      return 1;
 	    }
 
-	  if (flag_pic)
+	  if (GCC_OPTION (flag_pic))
 	    {
 	      rtx temp;
 
@@ -2021,7 +2021,7 @@ pa_emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg)
 		       && GET_CODE (XEXP (XEXP (operand1, 0), 1)) == CONST_INT
 		       && !INT_14_BITS (XEXP (XEXP (operand1, 0), 1))
 		       && (reload_completed || reload_in_progress)
-		       && flag_pic)
+		       && GCC_OPTION (flag_pic))
 		{
 		  rtx const_mem = force_const_mem (mode, operand1);
 		  operands[1] = legitimize_pic_address (XEXP (const_mem, 0),
@@ -3318,7 +3318,7 @@ remove_useless_addtr_insns (int check_notes)
   static int pass = 0;
 
   /* This is fairly cheap, so always run it when optimizing.  */
-  if (optimize > 0)
+  if (GCC_OPTION (optimize) > 0)
     {
       int fcmp_count = 0;
       int fbranch_count = 0;
@@ -3811,7 +3811,7 @@ pa_expand_prologue (void)
     local_fsize += STARTING_FRAME_OFFSET;
 
   actual_fsize = pa_compute_frame_size (size, &save_fregs);
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = actual_fsize;
 
   /* Compute a few things we will use often.  */
@@ -4007,7 +4007,7 @@ pa_expand_prologue (void)
      
      We don't want a note on this insn as the frame marker can
      move if there is a dynamic stack allocation.  */
-  if (flag_pic && actual_fsize != 0 && !TARGET_64BIT)
+  if (GCC_OPTION (flag_pic) && actual_fsize != 0 && !TARGET_64BIT)
     {
       rtx addr = gen_rtx_PLUS (word_mode, stack_pointer_rtx, GEN_INT (-32));
 
@@ -4665,7 +4665,7 @@ pa_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
 
   /* Don't adjust costs for a pa8000 chip, also do not adjust any
      true dependencies as they are described with bypasses now.  */
-  if (pa_cpu >= PROCESSOR_8000 || REG_NOTE_KIND (link) == 0)
+  if (GCC_OPTION (pa_cpu) >= PROCESSOR_8000 || REG_NOTE_KIND (link) == 0)
     return cost;
 
   if (! recog_memoized (insn))
@@ -4882,7 +4882,7 @@ pa_adjust_priority (rtx insn, int priority)
 static int
 pa_issue_rate (void)
 {
-  switch (pa_cpu)
+  switch (GCC_OPTION (pa_cpu))
     {
     case PROCESSOR_700:		return 1;
     case PROCESSOR_7100:	return 2;
@@ -5378,7 +5378,7 @@ pa_output_global_address (FILE *file, rtx x, int round_constant)
 
   if (GET_CODE (x) == SYMBOL_REF && read_only_operand (x, VOIDmode))
     output_addr_const (file, x);
-  else if (GET_CODE (x) == SYMBOL_REF && !flag_pic)
+  else if (GET_CODE (x) == SYMBOL_REF && !GCC_OPTION (flag_pic))
     {
       output_addr_const (file, x);
       fputs ("-$global$", file);
@@ -5448,7 +5448,7 @@ pa_output_global_address (FILE *file, rtx x, int round_constant)
 	  gcc_unreachable ();
 	}
       
-      if (!read_only_operand (base, VOIDmode) && !flag_pic)
+      if (!read_only_operand (base, VOIDmode) && !GCC_OPTION (flag_pic))
 	fputs ("-$global$", file);
       if (offset)
 	fprintf (file, "%s%d", sep, offset);
@@ -5480,7 +5480,7 @@ pa_file_start_space (int sortspace)
   if (sortspace)
     aputs (",SORT=16");
   aputs ("\n\t.SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31");
-  if (flag_tm)
+  if (GCC_OPTION (flag_tm))
     aputs ("\n\t.SUBSPA $TM_CLONE_TABLE$,QUAD=1,ALIGN=8,ACCESS=31");
   aputs ("\n\t.SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82"
 	 "\n\t.SPACE $TEXT$");
@@ -5493,9 +5493,9 @@ pa_file_start_space (int sortspace)
 static inline void
 pa_file_start_file (int want_version)
 {
-  if (write_symbols != NO_DEBUG)
+  if (GCC_OPTION (write_symbols) != NO_DEBUG)
     {
-      output_file_directive (asm_out_file, main_input_filename);
+      output_file_directive (asm_out_file, GCC_OPTION (main_input_filename));
       if (want_version)
 	aputs ("\t.version\t\"01.01\"\n");
     }
@@ -5504,7 +5504,7 @@ pa_file_start_file (int want_version)
 static inline void
 pa_file_start_mcount (const char *aswhat)
 {
-  if (profile_flag)
+  if (GCC_OPTION (profile_flag))
     fprintf (asm_out_file, "\t.IMPORT _mcount,%s\n", aswhat);
 }
   
@@ -5540,7 +5540,7 @@ pa_hpux64_gas_file_start (void)
 {
   pa_file_start_level ();
 #ifdef ASM_OUTPUT_TYPE_DIRECTIVE
-  if (profile_flag)
+  if (GCC_OPTION (profile_flag))
     ASM_OUTPUT_TYPE_DIRECTIVE (asm_out_file, "_mcount", "function");
 #endif
   pa_file_start_file (1);
@@ -5609,7 +5609,7 @@ output_deferred_plabels (void)
      before outputting the deferred plabels.  */
   if (n_deferred_plabels)
     {
-      switch_to_section (flag_pic ? data_section : readonly_data_section);
+      switch_to_section (GCC_OPTION (flag_pic) ? data_section : readonly_data_section);
       ASM_OUTPUT_ALIGN (asm_out_file, TARGET_64BIT ? 3 : 2);
     }
 
@@ -5931,7 +5931,7 @@ pa_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
      generation requires %r1 as a scratch register.  For float modes,
      the only legitimate constant is CONST0_RTX.  However, there are
      a few patterns that accept constant double operands.  */
-  if (flag_pic
+  if (GCC_OPTION (flag_pic)
       && FP_REG_CLASS_P (rclass)
       && (GET_CODE (x) == CONST_INT || GET_CODE (x) == CONST_DOUBLE))
     {
@@ -5967,7 +5967,7 @@ pa_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
       if (GET_CODE (x) == HIGH)
 	x = XEXP (x, 0);
 
-      if (flag_pic || !read_only_operand (x, VOIDmode))
+      if (GCC_OPTION (flag_pic) || !read_only_operand (x, VOIDmode))
 	{
 	  switch (mode)
 	    {
@@ -6647,7 +6647,7 @@ pa_output_lbranch (rtx dest, rtx insn, int xdelay)
       gcc_assert (! JUMP_P (NEXT_INSN (insn)));
 
       final_scan_insn (NEXT_INSN (insn), asm_out_file,
-		       optimize, 0, NULL);
+		       GCC_OPTION (optimize), 0, NULL);
 
       /* Now delete the delay insn.  */
       SET_INSN_DELETED (NEXT_INSN (insn));
@@ -6704,7 +6704,7 @@ pa_output_lbranch (rtx dest, rtx insn, int xdelay)
       output_asm_insn ("ldo R'%0(%%r1),%%r1", xoperands);
       output_asm_insn ("bv %%r0(%%r1)", xoperands);
     }
-  else if (flag_pic)
+  else if (GCC_OPTION (flag_pic))
     {
       output_asm_insn ("{bl|b,l} .+8,%%r1", xoperands);
       if (TARGET_SOM || !TARGET_GAS)
@@ -7520,7 +7520,7 @@ pa_attr_length_millicode_call (rtx insn)
 
   if (TARGET_64BIT)
     {
-      if (!TARGET_LONG_CALLS && distance < 7600000)
+      if (!GCC_OPTION (TARGET_LONG_CALLS) && distance < 7600000)
 	return 8;
 
       return 20;
@@ -7529,10 +7529,10 @@ pa_attr_length_millicode_call (rtx insn)
     return 24;
   else
     {
-      if (!TARGET_LONG_CALLS && distance < MAX_PCREL17F_OFFSET)
+      if (!GCC_OPTION (TARGET_LONG_CALLS) && distance < MAX_PCREL17F_OFFSET)
 	return 8;
 
-      if (!flag_pic)
+      if (!GCC_OPTION (flag_pic))
 	return 12;
 
       return 24;
@@ -7561,7 +7561,7 @@ pa_output_millicode_call (rtx insn, rtx call_dest)
      form of the $$sh_func_adrs call has a length of 28.  Because it
      has an attribute type of sh_func_adrs, it never has a nonzero
      sequence length (i.e., the delay slot is never filled).  */
-  if (!TARGET_LONG_CALLS
+  if (!GCC_OPTION (TARGET_LONG_CALLS)
       && (attr_length == 8
 	  || (attr_length == 28
 	      && get_attr_type (insn) == TYPE_SH_FUNC_ADRS)))
@@ -7612,7 +7612,7 @@ pa_output_millicode_call (rtx insn, rtx call_dest)
 	  /* Jump to our target address in %r1.  */
 	  output_asm_insn ("bv %%r0(%%r1)", xoperands);
 	}
-      else if (!flag_pic)
+      else if (!GCC_OPTION (flag_pic))
 	{
 	  output_asm_insn ("ldil L'%0,%%r1", xoperands);
 	  if (TARGET_PA_20)
@@ -7738,7 +7738,7 @@ pa_attr_length_call (rtx insn, int sibcall)
   local_call = call_decl && targetm.binds_local_p (call_decl);
 
   /* pc-relative branch.  */
-  if (!TARGET_LONG_CALLS
+  if (!GCC_OPTION (TARGET_LONG_CALLS)
       && ((TARGET_PA_20 && !sibcall && distance < 7600000)
 	  || distance < MAX_PCREL17F_OFFSET))
     length += 8;
@@ -7748,7 +7748,7 @@ pa_attr_length_call (rtx insn, int sibcall)
     length += sibcall ? 28 : 24;
 
   /* non-pic long absolute branch sequence.  */
-  else if ((TARGET_LONG_ABS_CALL || local_call) && !flag_pic)
+  else if ((TARGET_LONG_ABS_CALL || local_call) && !GCC_OPTION (flag_pic))
     length += 12;
 
   /* long pc-relative branch sequence.  */
@@ -7758,7 +7758,7 @@ pa_attr_length_call (rtx insn, int sibcall)
     {
       length += 20;
 
-      if (!TARGET_PA_20 && !TARGET_NO_SPACE_REGS && (!local_call || flag_pic))
+      if (!TARGET_PA_20 && !TARGET_NO_SPACE_REGS && (!local_call || GCC_OPTION (flag_pic)))
 	length += 8;
     }
 
@@ -7770,7 +7770,7 @@ pa_attr_length_call (rtx insn, int sibcall)
       if (TARGET_SOM)
 	length += length_fp_args (insn);
 
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	length += 4;
 
       if (!TARGET_PA_20)
@@ -7778,7 +7778,7 @@ pa_attr_length_call (rtx insn, int sibcall)
 	  if (!sibcall)
 	    length += 8;
 
-	  if (!TARGET_NO_SPACE_REGS && (!local_call || flag_pic))
+	  if (!TARGET_NO_SPACE_REGS && (!local_call || GCC_OPTION (flag_pic)))
 	    length += 8;
 	}
     }
@@ -7806,7 +7806,7 @@ pa_output_call (rtx insn, rtx call_dest, int sibcall)
   /* Handle the common case where we're sure that the branch will reach
      the beginning of the "$CODE$" subspace.  This is the beginning of
      the current function if we are in a named section.  */
-  if (!TARGET_LONG_CALLS && pa_attr_length_call (insn, sibcall) == 8)
+  if (!GCC_OPTION (TARGET_LONG_CALLS) && pa_attr_length_call (insn, sibcall) == 8)
     {
       xoperands[1] = gen_rtx_REG (word_mode, sibcall ? 0 : 2);
       output_asm_insn ("{bl|b,l} %0,%1", xoperands);
@@ -7829,7 +7829,7 @@ pa_output_call (rtx insn, rtx call_dest, int sibcall)
 	      && !sibcall)
 	    {
 	      final_scan_insn (NEXT_INSN (insn), asm_out_file,
-			       optimize, 0, NULL);
+			       GCC_OPTION (optimize), 0, NULL);
 
 	      /* Now delete the delay insn.  */
 	      SET_INSN_DELETED (NEXT_INSN (insn));
@@ -7861,7 +7861,7 @@ pa_output_call (rtx insn, rtx call_dest, int sibcall)
 	  /* Emit a long call.  There are several different sequences
 	     of increasing length and complexity.  In most cases,
              they don't allow an instruction in the delay slot.  */
-	  if (!((TARGET_LONG_ABS_CALL || local_call) && !flag_pic)
+	  if (!((TARGET_LONG_ABS_CALL || local_call) && !GCC_OPTION (flag_pic))
 	      && !TARGET_LONG_PIC_SDIFF_CALL
 	      && !(TARGET_GAS && !TARGET_SOM
 		   && (TARGET_LONG_PIC_PCREL_CALL || local_call))
@@ -7873,12 +7873,12 @@ pa_output_call (rtx insn, rtx call_dest, int sibcall)
 	      && !sibcall
 	      && (!TARGET_PA_20
 		  || indirect_call
-		  || ((TARGET_LONG_ABS_CALL || local_call) && !flag_pic)))
+		  || ((TARGET_LONG_ABS_CALL || local_call) && !GCC_OPTION (flag_pic))))
 	    {
 	      /* A non-jump insn in the delay slot.  By definition we can
 		 emit this insn before the call (and in fact before argument
 		 relocating.  */
-	      final_scan_insn (NEXT_INSN (insn), asm_out_file, optimize, 0,
+	      final_scan_insn (NEXT_INSN (insn), asm_out_file, GCC_OPTION (optimize), 0,
 			       NULL);
 
 	      /* Now delete the delay insn.  */
@@ -7886,7 +7886,7 @@ pa_output_call (rtx insn, rtx call_dest, int sibcall)
 	      delay_insn_deleted = 1;
 	    }
 
-	  if ((TARGET_LONG_ABS_CALL || local_call) && !flag_pic)
+	  if ((TARGET_LONG_ABS_CALL || local_call) && !GCC_OPTION (flag_pic))
 	    {
 	      /* This is the best sequence for making long calls in
 		 non-pic code.  Unfortunately, GNU ld doesn't provide
@@ -7953,7 +7953,7 @@ pa_output_call (rtx insn, rtx call_dest, int sibcall)
 		  if (TARGET_SOM)
 		    copy_fp_args (insn);
 
-		  if (flag_pic)
+		  if (GCC_OPTION (flag_pic))
 		    {
 		      output_asm_insn ("addil LT'%0,%%r19", xoperands);
 		      output_asm_insn ("ldw RT'%0(%%r1),%%r1", xoperands);
@@ -7975,7 +7975,7 @@ pa_output_call (rtx insn, rtx call_dest, int sibcall)
 		  if (!sibcall && !TARGET_PA_20)
 		    {
 		      output_asm_insn ("{bl|b,l} .+8,%%r2", xoperands);
-		      if (TARGET_NO_SPACE_REGS || (local_call && !flag_pic))
+		      if (TARGET_NO_SPACE_REGS || (local_call && !GCC_OPTION (flag_pic)))
 			output_asm_insn ("addi 8,%%r2,%%r2", xoperands);
 		      else
 			output_asm_insn ("addi 16,%%r2,%%r2", xoperands);
@@ -8000,20 +8000,20 @@ pa_output_call (rtx insn, rtx call_dest, int sibcall)
 		}
 	      else
 		{
-		  if (!TARGET_NO_SPACE_REGS && (!local_call || flag_pic))
+		  if (!TARGET_NO_SPACE_REGS && (!local_call || GCC_OPTION (flag_pic)))
 		    output_asm_insn ("ldsid (%%r1),%%r31\n\tmtsp %%r31,%%sr0",
 				     xoperands);
 
 		  if (sibcall)
 		    {
-		      if (TARGET_NO_SPACE_REGS || (local_call && !flag_pic))
+		      if (TARGET_NO_SPACE_REGS || (local_call && !GCC_OPTION (flag_pic)))
 			output_asm_insn ("be 0(%%sr4,%%r1)", xoperands);
 		      else
 			output_asm_insn ("be 0(%%sr0,%%r1)", xoperands);
 		    }
 		  else
 		    {
-		      if (TARGET_NO_SPACE_REGS || (local_call && !flag_pic))
+		      if (TARGET_NO_SPACE_REGS || (local_call && !GCC_OPTION (flag_pic)))
 			output_asm_insn ("ble 0(%%sr4,%%r1)", xoperands);
 		      else
 			output_asm_insn ("ble 0(%%sr0,%%r1)", xoperands);
@@ -8097,13 +8097,13 @@ pa_attr_length_indirect_call (rtx insn)
     return 12;
 
   if (TARGET_FAST_INDIRECT_CALLS
-      || (!TARGET_LONG_CALLS
+      || (!GCC_OPTION (TARGET_LONG_CALLS)
 	  && !TARGET_PORTABLE_RUNTIME
 	  && ((TARGET_PA_20 && !TARGET_SOM && distance < 7600000)
 	      || distance < MAX_PCREL17F_OFFSET)))
     return 8;
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     return 20;
 
   if (TARGET_PORTABLE_RUNTIME)
@@ -8275,10 +8275,10 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta,
      import stub for the target function as this could clobber the
      return value saved at SP-24.  This would also apply to the
      32-bit linux port if the multi-space model is implemented.  */
-  if ((!TARGET_LONG_CALLS && TARGET_SOM && !TARGET_PORTABLE_RUNTIME
-       && !(flag_pic && TREE_PUBLIC (function))
+  if ((!GCC_OPTION (TARGET_LONG_CALLS) && TARGET_SOM && !TARGET_PORTABLE_RUNTIME
+       && !(GCC_OPTION (flag_pic) && TREE_PUBLIC (function))
        && (TARGET_GAS || last_address < 262132))
-      || (!TARGET_LONG_CALLS && !TARGET_SOM && !TARGET_PORTABLE_RUNTIME
+      || (!GCC_OPTION (TARGET_LONG_CALLS) && !TARGET_SOM && !TARGET_PORTABLE_RUNTIME
 	  && ((targetm_common.have_named_sections
 	       && DECL_SECTION_NAME (thunk_fndecl) != NULL
 	       /* The GNU 64-bit linker has rather poor stub management.
@@ -8369,7 +8369,7 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta,
 	  nbytes += 20;
 	}
     }
-  else if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
+  else if (TARGET_SOM && GCC_OPTION (flag_pic) && TREE_PUBLIC (function))
     {
       /* The function is accessible from outside this module.  The only
 	 way to avoid an import stub between the thunk and function is to
@@ -8415,7 +8415,7 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta,
       else
 	output_asm_insn ("ldo R'%2(%%r1),%%r26", xoperands);
     }
-  else if (flag_pic)
+  else if (GCC_OPTION (flag_pic))
     {
       output_asm_insn ("{bl|b,l} .+8,%%r1", xoperands);
 
@@ -8477,7 +8477,7 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta,
       cfun->machine->in_nsubspa = 2;
     }
 
-  if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
+  if (TARGET_SOM && GCC_OPTION (flag_pic) && TREE_PUBLIC (function))
     {
       switch_to_section (data_section);
       output_asm_insn (".align 4", xoperands);
@@ -8964,7 +8964,7 @@ pa_reorg (void)
 
   remove_useless_addtr_insns (1);
 
-  if (pa_cpu < PROCESSOR_8000)
+  if (GCC_OPTION (pa_cpu) < PROCESSOR_8000)
     pa_combine_instructions ();
 
     /* Still need brtab marker insns.  FIXME: the presence of these
@@ -9037,7 +9037,7 @@ pa_combine_instructions (void)
   /* This can get expensive since the basic algorithm is on the
      order of O(n^2) (or worse).  Only do it for -O2 or higher
      levels of optimization.  */
-  if (optimize < 2)
+  if (GCC_OPTION (optimize) < 2)
     return;
 
   /* Walk down the list of insns looking for "anchor" insns which
@@ -9761,7 +9761,7 @@ pa_som_asm_init_sections (void)
 			   "\t.NSUBSPA $DATA$,QUAD=1,ALIGN=8,"
 			   "ACCESS=31,SORT=24,COMDAT");
 
-  if (flag_tm)
+  if (GCC_OPTION (flag_tm))
     som_tm_clone_table_section
       = get_unnamed_section (0, output_section_asm_op,
 			     "\t.SPACE $PRIVATE$\n\t.SUBSPA $TM_CLONE_TABLE$");
@@ -9778,7 +9778,7 @@ pa_som_asm_init_sections (void)
      $TEXT$ space during PIC generation.  Instead place all constant
      data into the $PRIVATE$ subspace (this reduces sharing, but it
      works correctly).  */
-  readonly_data_section = flag_pic ? data_section : som_readonly_data_section;
+  readonly_data_section = GCC_OPTION (flag_pic) ? data_section : som_readonly_data_section;
 
   /* We must not have a reference to an external symbol defined in a
      shared library in a readonly section, else the SOM linker will
@@ -10236,7 +10236,7 @@ pa_conditional_register_usage (void)
       for (i = FP_REG_FIRST; i <= FP_REG_LAST; i++)
 	fixed_regs[i] = call_used_regs[i] = 1;
     }
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;
 }
 
@@ -10538,13 +10538,13 @@ pa_legitimize_reload_address (rtx ad, enum machine_mode mode,
   mask = (GET_MODE_CLASS (mode) == MODE_FLOAT
 	  && !INT14_OK_STRICT ? 0x1f : 0x3fff);
 
-  if (optimize && GET_CODE (ad) == PLUS)
+  if (GCC_OPTION (optimize) && GET_CODE (ad) == PLUS)
     temp = simplify_binary_operation (PLUS, Pmode,
 				      XEXP (ad, 0), XEXP (ad, 1));
 
   new_rtx = temp ? temp : ad;
 
-  if (optimize
+  if (GCC_OPTION (optimize)
       && GET_CODE (new_rtx) == PLUS
       && GET_CODE (XEXP (new_rtx, 0)) == REG
       && GET_CODE (XEXP (new_rtx, 1)) == CONST_INT)
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index ac3f0eb..c97b207 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -353,7 +353,7 @@ typedef struct GTY(()) machine_function
 /* Register used to address the offset table for position-independent
    data references.  */
 #define PIC_OFFSET_TABLE_REGNUM \
-  (flag_pic ? (TARGET_64BIT ? 27 : 19) : INVALID_REGNUM)
+  (GCC_OPTION (flag_pic) ? (TARGET_64BIT ? 27 : 19) : INVALID_REGNUM)
 
 #define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED 1
 
@@ -736,11 +736,11 @@ extern int may_call_alloca;
    Using autoincrement addressing modes on PA8000 class machines is
    not profitable.  */
 
-#define HAVE_POST_INCREMENT (pa_cpu < PROCESSOR_8000)
-#define HAVE_POST_DECREMENT (pa_cpu < PROCESSOR_8000)
+#define HAVE_POST_INCREMENT (GCC_OPTION (pa_cpu) < PROCESSOR_8000)
+#define HAVE_POST_DECREMENT (GCC_OPTION (pa_cpu) < PROCESSOR_8000)
 
-#define HAVE_PRE_DECREMENT (pa_cpu < PROCESSOR_8000)
-#define HAVE_PRE_INCREMENT (pa_cpu < PROCESSOR_8000)
+#define HAVE_PRE_DECREMENT (GCC_OPTION (pa_cpu) < PROCESSOR_8000)
+#define HAVE_PRE_INCREMENT (GCC_OPTION (pa_cpu) < PROCESSOR_8000)
 
 /* Macros to check register numbers against specific register classes.  */
 
@@ -979,7 +979,7 @@ do {									     \
    || (TREE_CODE (DECL) == VAR_DECL					\
        && TREE_READONLY (DECL) && ! TREE_SIDE_EFFECTS (DECL)		\
        && (! DECL_INITIAL (DECL) || ! pa_reloc_needed (DECL_INITIAL (DECL))) \
-       && !flag_pic)							\
+       && !GCC_OPTION (flag_pic))							\
    || CONSTANT_CLASS_P (DECL))
 
 #define FUNCTION_NAME_P(NAME)  (*(NAME) == '@')
@@ -1055,7 +1055,7 @@ do {									     \
 #define SHIFT_COUNT_TRUNCATED 1
 
 /* Adjust the cost of branches.  */
-#define BRANCH_COST(speed_p, predictable_p) (pa_cpu == PROCESSOR_8000 ? 2 : 1)
+#define BRANCH_COST(speed_p, predictable_p) (GCC_OPTION (pa_cpu) == PROCESSOR_8000 ? 2 : 1)
 
 /* Handling the special cases is going to get too complicated for a macro,
    just call `pa_adjust_insn_length' to do the real work.  */
@@ -1262,7 +1262,7 @@ do {									     \
     case LO_SUM:							\
       if (!symbolic_operand (XEXP (addr, 1), VOIDmode))			\
 	fputs ("R'", FILE);						\
-      else if (flag_pic == 0)						\
+      else if (GCC_OPTION (flag_pic) == 0)						\
 	fputs ("RR'", FILE);						\
       else								\
 	fputs ("RT'", FILE);						\
@@ -1307,4 +1307,4 @@ do {									     \
    not generating PIC code.  For HP-UX and ELF targets, PIC stubs are
    seven and four instructions, respectively.  */  
 #define MAX_PCREL17F_OFFSET \
-  (flag_pic ? (TARGET_HPUX ? 198164 : 221312) : 240000)
+  (GCC_OPTION (flag_pic) ? (TARGET_HPUX ? 198164 : 221312) : 240000)
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md
index e55d0b8..b8931b3 100644
--- a/gcc/config/pa/pa.md
+++ b/gcc/config/pa/pa.md
@@ -1459,7 +1459,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1488,7 +1488,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1515,7 +1515,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1544,7 +1544,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 (define_insn ""
@@ -1570,7 +1570,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1599,7 +1599,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1628,7 +1628,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1656,7 +1656,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1684,7 +1684,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1712,7 +1712,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1740,7 +1740,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1768,7 +1768,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1796,7 +1796,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1824,7 +1824,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1853,7 +1853,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1881,7 +1881,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1909,7 +1909,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1937,7 +1937,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1965,7 +1965,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -1993,7 +1993,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -2021,7 +2021,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -2049,7 +2049,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -2098,7 +2098,7 @@
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 32)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 28)]
 	  (const_int 36)))])
 
@@ -2142,7 +2142,7 @@
 	   (const_int 12)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 28)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 24)]
 	  (const_int 32)))])
 
@@ -2663,7 +2663,7 @@
 		 (high:SI (match_operand 2 "" ""))))]
   "symbolic_operand (operands[2], Pmode)
    && ! function_label_operand (operands[2], Pmode)
-   && flag_pic"
+   && GCC_OPTION (flag_pic)"
   "addil LT'%G2,%1"
   [(set_attr "type" "binary")
    (set_attr "length" "4")])
@@ -2675,7 +2675,7 @@
   "symbolic_operand (operands[2], Pmode)
    && ! function_label_operand (operands[2], Pmode)
    && TARGET_64BIT
-   && flag_pic"
+   && GCC_OPTION (flag_pic)"
   "addil LT'%G2,%1"
   [(set_attr "type" "binary")
    (set_attr "length" "4")])
@@ -2689,7 +2689,7 @@
   "symbolic_operand (operands[1], Pmode)
    && ! function_label_operand (operands[1], Pmode)
    && ! read_only_operand (operands[1], Pmode)
-   && ! flag_pic"
+   && ! GCC_OPTION (flag_pic)"
   "*
 {
   if (TARGET_LONG_LOAD_STORE)
@@ -2734,7 +2734,7 @@
 (define_insn ""
   [(set (match_operand:SI 0 "register_operand" "=r")
 	(high:SI (match_operand 1 "" "")))]
-  "(!flag_pic || !symbolic_operand (operands[1], Pmode))
+  "(!GCC_OPTION (flag_pic) || !symbolic_operand (operands[1], Pmode))
     && !pa_is_function_label_plus_const (operands[1])"
   "*
 {
@@ -2770,7 +2770,7 @@
   "!pa_is_function_label_plus_const (operands[2])"
   "*
 {
-  gcc_assert (!flag_pic || !symbolic_operand (operands[2], Pmode));
+  gcc_assert (!GCC_OPTION (flag_pic) || !symbolic_operand (operands[2], Pmode));
   
   if (symbolic_operand (operands[2], Pmode))
     return \"ldo RR'%G2(%1),%0\";
@@ -2789,7 +2789,7 @@
   [(set (match_operand:SI 0 "register_operand" "")
 	(match_operand:SI 1 "symbolic_operand" ""))
    (clobber (match_operand:SI 2 "register_operand" ""))]
-  "! (flag_pic && pic_label_operand (operands[1], SImode))"
+  "! (GCC_OPTION (flag_pic) && pic_label_operand (operands[1], SImode))"
   [(set (match_dup 2) (high:SI (match_dup 1)))
    (set (match_dup 0) (lo_sum:SI (match_dup 2) (match_dup 1)))]
   "")
@@ -3176,7 +3176,7 @@
 	      (clobber (match_dup 8))
 	      (use (match_operand:SI 2 "arith14_operand" ""))
 	      (use (match_operand:SI 3 "const_int_operand" ""))])]
-  "!TARGET_64BIT && optimize > 0"
+  "!TARGET_64BIT && GCC_OPTION (optimize) > 0"
   "
 {
   int size, align;
@@ -3270,7 +3270,7 @@
 	      (clobber (match_operand:SI 8 "register_operand" ""))
 	      (use (match_operand:SI 4 "arith14_operand" ""))
 	      (use (match_operand:SI 5 "const_int_operand" ""))])]
-  "!TARGET_64BIT && reload_completed && !flag_peephole2
+  "!TARGET_64BIT && reload_completed && !GCC_OPTION (flag_peephole2)
    && GET_CODE (operands[0]) == MEM
    && register_operand (XEXP (operands[0], 0), SImode)
    && GET_CODE (operands[1]) == MEM
@@ -3364,7 +3364,7 @@
 	      (clobber (match_dup 8))
 	      (use (match_operand:DI 2 "arith14_operand" ""))
 	      (use (match_operand:DI 3 "const_int_operand" ""))])]
-  "TARGET_64BIT && optimize > 0"
+  "TARGET_64BIT && GCC_OPTION (optimize) > 0"
   "
 {
   int size, align;
@@ -3458,7 +3458,7 @@
 	      (clobber (match_operand:DI 8 "register_operand" ""))
 	      (use (match_operand:DI 4 "arith14_operand" ""))
 	      (use (match_operand:DI 5 "const_int_operand" ""))])]
-  "TARGET_64BIT && reload_completed && !flag_peephole2
+  "TARGET_64BIT && reload_completed && !GCC_OPTION (flag_peephole2)
    && GET_CODE (operands[0]) == MEM
    && register_operand (XEXP (operands[0], 0), DImode)
    && GET_CODE (operands[1]) == MEM
@@ -3549,7 +3549,7 @@
 	      (clobber (match_dup 5))
 	      (use (match_operand:SI 1 "arith14_operand" ""))
 	      (use (match_operand:SI 3 "const_int_operand" ""))])]
-  "!TARGET_64BIT && optimize > 0"
+  "!TARGET_64BIT && GCC_OPTION (optimize) > 0"
   "
 {
   int size, align;
@@ -3600,7 +3600,7 @@
 	      (clobber (match_operand:SI 4 "register_operand" ""))
 	      (use (match_operand:SI 2 "arith14_operand" ""))
 	      (use (match_operand:SI 3 "const_int_operand" ""))])]
-  "!TARGET_64BIT && reload_completed && !flag_peephole2
+  "!TARGET_64BIT && reload_completed && !GCC_OPTION (flag_peephole2)
    && GET_CODE (operands[0]) == MEM
    && register_operand (XEXP (operands[0], 0), SImode)"
   [(set (match_dup 4) (match_dup 5))
@@ -3663,7 +3663,7 @@
 	      (clobber (match_dup 5))
 	      (use (match_operand:DI 1 "arith14_operand" ""))
 	      (use (match_operand:DI 3 "const_int_operand" ""))])]
-  "TARGET_64BIT && optimize > 0"
+  "TARGET_64BIT && GCC_OPTION (optimize) > 0"
   "
 {
   int size, align;
@@ -3714,7 +3714,7 @@
 	      (clobber (match_operand:DI 4 "register_operand" ""))
 	      (use (match_operand:DI 2 "arith14_operand" ""))
 	      (use (match_operand:DI 3 "const_int_operand" ""))])]
-  "TARGET_64BIT && reload_completed && !flag_peephole2
+  "TARGET_64BIT && reload_completed && !GCC_OPTION (flag_peephole2)
    && GET_CODE (operands[0]) == MEM
    && register_operand (XEXP (operands[0], 0), DImode)"
   [(set (match_dup 4) (match_dup 5))
@@ -6016,7 +6016,7 @@
 	(neg:DF (match_operand:DF 1 "register_operand" "")))]
   "!TARGET_SOFT_FLOAT"
 {
-  if (TARGET_PA_20 || !flag_signed_zeros)
+  if (TARGET_PA_20 || !GCC_OPTION (flag_signed_zeros))
     emit_insn (gen_negdf2_fast (operands[0], operands[1]));
   else
     emit_insn (gen_negdf2_slow (operands[0], operands[1]));
@@ -6059,7 +6059,7 @@
 	(neg:SF (match_operand:SF 1 "register_operand" "")))]
   "!TARGET_SOFT_FLOAT"
 {
-  if (TARGET_PA_20 || !flag_signed_zeros)
+  if (TARGET_PA_20 || !GCC_OPTION (flag_signed_zeros))
     emit_insn (gen_negsf2_fast (operands[0], operands[1]));
   else
     emit_insn (gen_negsf2_slow (operands[0], operands[1]));
@@ -6225,7 +6225,7 @@
   [(set (match_operand:DF 0 "register_operand" "=f")
 	(neg:DF (mult:DF (match_operand:DF 1 "register_operand" "f")
 			 (match_operand:DF 2 "register_operand" "f"))))]
-  "!TARGET_SOFT_FLOAT && TARGET_PA_20 && !flag_signed_zeros"
+  "!TARGET_SOFT_FLOAT && TARGET_PA_20 && !GCC_OPTION (flag_signed_zeros)"
   "fmpynfadd,dbl %1,%2,%%fr0,%0"
   [(set_attr "type" "fpmuldbl")
    (set_attr "length" "4")])
@@ -6234,7 +6234,7 @@
   [(set (match_operand:SF 0 "register_operand" "=f")
 	(neg:SF (mult:SF (match_operand:SF 1 "register_operand" "f")
 			 (match_operand:SF 2 "register_operand" "f"))))]
-  "!TARGET_SOFT_FLOAT && TARGET_PA_20 && !flag_signed_zeros"
+  "!TARGET_SOFT_FLOAT && TARGET_PA_20 && !GCC_OPTION (flag_signed_zeros)"
   "fmpynfadd,sgl %1,%2,%%fr0,%0"
   [(set_attr "type" "fpmuldbl")
    (set_attr "length" "4")])
@@ -6245,7 +6245,7 @@
 			 (match_operand:DF 2 "register_operand" "f"))))
    (set (match_operand:DF 3 "register_operand" "=&f")
 	(mult:DF (match_dup 1) (match_dup 2)))]
-  "(!TARGET_SOFT_FLOAT && TARGET_PA_20 && !flag_signed_zeros
+  "(!TARGET_SOFT_FLOAT && TARGET_PA_20 && !GCC_OPTION (flag_signed_zeros)
     && ! (reg_overlap_mentioned_p (operands[3], operands[1])
           || reg_overlap_mentioned_p (operands[3], operands[2])))"
   "#"
@@ -6258,7 +6258,7 @@
 			 (match_operand:DF 2 "register_operand" ""))))
    (set (match_operand:DF 3 "register_operand" "")
 	(mult:DF (match_dup 1) (match_dup 2)))]
-  "!TARGET_SOFT_FLOAT && TARGET_PA_20 && !flag_signed_zeros"
+  "!TARGET_SOFT_FLOAT && TARGET_PA_20 && !GCC_OPTION (flag_signed_zeros)"
   [(set (match_dup 3) (mult:DF (match_dup 1) (match_dup 2)))
    (set (match_dup 0) (neg:DF (mult:DF (match_dup 1) (match_dup 2))))]
   "")
@@ -6269,7 +6269,7 @@
 			 (match_operand:SF 2 "register_operand" "f"))))
    (set (match_operand:SF 3 "register_operand" "=&f")
 	(mult:SF (match_dup 1) (match_dup 2)))]
-  "(!TARGET_SOFT_FLOAT && TARGET_PA_20 && !flag_signed_zeros
+  "(!TARGET_SOFT_FLOAT && TARGET_PA_20 && !GCC_OPTION (flag_signed_zeros)
     && ! (reg_overlap_mentioned_p (operands[3], operands[1])
           || reg_overlap_mentioned_p (operands[3], operands[2])))"
   "#"
@@ -6282,7 +6282,7 @@
 			 (match_operand:SF 2 "register_operand" ""))))
    (set (match_operand:SF 3 "register_operand" "")
 	(mult:SF (match_dup 1) (match_dup 2)))]
-  "!TARGET_SOFT_FLOAT && TARGET_PA_20&& !flag_signed_zeros"
+  "!TARGET_SOFT_FLOAT && TARGET_PA_20&& !GCC_OPTION (flag_signed_zeros)"
   [(set (match_dup 3) (mult:SF (match_dup 1) (match_dup 2)))
    (set (match_dup 0) (neg:SF (mult:SF (match_dup 1) (match_dup 2))))]
   "")
@@ -6774,7 +6774,7 @@
    (use (reg:SI 2))]
   "!TARGET_NO_SPACE_REGS
    && !TARGET_PA_20
-   && flag_pic && crtl->calls_eh_return"
+   && GCC_OPTION (flag_pic) && crtl->calls_eh_return"
   "ldsid (%%sr0,%%r2),%%r1\;mtsp %%r1,%%sr0\;be%* 0(%%sr0,%%r2)"
   [(set_attr "type" "branch")
    (set_attr "length" "12")])
@@ -6813,7 +6813,7 @@
 	 using space registers.  */
       if (!TARGET_NO_SPACE_REGS
 	  && !TARGET_PA_20
-	  && flag_pic && crtl->calls_eh_return)
+	  && GCC_OPTION (flag_pic) && crtl->calls_eh_return)
 	x = gen_return_external_pic ();
       else
 	x = gen_return_internal ();
@@ -6895,7 +6895,7 @@
 	   (const_int 4)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 20)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 16)]
 	  (const_int 24)))])
 
@@ -7020,7 +7020,7 @@
 
   if (TARGET_64BIT)
     emit_jump_insn (gen_casesi64p (operands[0], operands[3]));
-  else if (flag_pic)
+  else if (GCC_OPTION (flag_pic))
     emit_jump_insn (gen_casesi32p (operands[0], operands[3]));
   else
     emit_jump_insn (gen_casesi32 (operands[0], operands[3]));
@@ -7034,7 +7034,7 @@
 				(const_int 4))
 		       (label_ref (match_operand 1 "" "")))))
    (clobber (match_scratch:SI 2 "=&r"))]
-  "!flag_pic"
+  "!GCC_OPTION (flag_pic)"
   "ldil L'%l1,%2\;ldo R'%l1(%2),%2\;{ldwx|ldw},s %0(%2),%2\;bv,n %%r0(%2)"
   [(set_attr "type" "multi")
    (set_attr "length" "16")])
@@ -7047,7 +7047,7 @@
 		       (label_ref (match_operand 1 "" "")))))
    (clobber (match_scratch:SI 2 "=&r"))
    (clobber (match_scratch:SI 3 "=&r"))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "{bl .+8,%2\;depi 0,31,2,%2|mfia %2}\;ldo {%l1-.|%l1+4-.}(%2),%2\;\
 {ldwx|ldw},s %0(%2),%3\;{addl|add,l} %2,%3,%3\;bv,n %%r0(%3)"
   [(set_attr "type" "multi")
@@ -7091,7 +7091,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
       op = XEXP (operands[0], 0);
 
       /* Generate indirect long calls to non-local functions. */
-      if (!TARGET_64BIT && TARGET_LONG_CALLS && GET_CODE (op) == SYMBOL_REF)
+      if (!TARGET_64BIT && GCC_OPTION (TARGET_LONG_CALLS) && GET_CODE (op) == SYMBOL_REF)
 	{
 	  tree call_decl = SYMBOL_REF_DECL (op);
 	  if (!(call_decl && targetm.binds_local_p (call_decl)))
@@ -7167,7 +7167,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
     {
       if (GET_CODE (op) == SYMBOL_REF)
 	{
-	  if (flag_pic)
+	  if (GCC_OPTION (flag_pic))
 	    {
 	      rtx r4 = gen_rtx_REG (word_mode, 4);
 	      emit_call_insn (gen_call_symref_pic (op, nb, r4));
@@ -7179,7 +7179,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 	{
 	  rtx tmpreg = gen_rtx_REG (word_mode, 22);
 	  emit_move_insn (tmpreg, force_reg (word_mode, op));
-	  if (flag_pic)
+	  if (GCC_OPTION (flag_pic))
 	    {
 	      rtx r4 = gen_rtx_REG (word_mode, 4);
 	      emit_call_insn (gen_call_reg_pic (nb, r4));
@@ -7600,7 +7600,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 	    call_powf = true;
 
 	  /* Generate indirect long calls to non-local functions. */
-	  else if (!TARGET_64BIT && TARGET_LONG_CALLS)
+	  else if (!TARGET_64BIT && GCC_OPTION (TARGET_LONG_CALLS))
 	    {
 	      tree call_decl = SYMBOL_REF_DECL (op);
 	      if (!(call_decl && targetm.binds_local_p (call_decl)))
@@ -7682,7 +7682,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
     {
       if (GET_CODE (op) == SYMBOL_REF)
 	{
-	  if (flag_pic)
+	  if (GCC_OPTION (flag_pic))
 	    {
 	      rtx r4 = gen_rtx_REG (word_mode, 4);
 
@@ -7703,7 +7703,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 	{
 	  rtx tmpreg = gen_rtx_REG (word_mode, 22);
 	  emit_move_insn (tmpreg, force_reg (word_mode, op));
-	  if (flag_pic)
+	  if (GCC_OPTION (flag_pic))
 	    {
 	      rtx r4 = gen_rtx_REG (word_mode, 4);
 	      emit_call_insn (gen_call_val_reg_pic (dst, nb, r4));
@@ -8372,7 +8372,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
     use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), arg_pointer_rtx);
 
   /* We don't have to restore the PIC register.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), pic_offset_table_rtx);
 
   DONE;
@@ -8459,7 +8459,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
     use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), arg_pointer_rtx);
 
   /* We don't have to restore the PIC register.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), pic_offset_table_rtx);
 
   DONE;
@@ -8988,7 +8988,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28))
 
@@ -9004,7 +9004,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 		    (const_int 28)
 		    (match_test "TARGET_PORTABLE_RUNTIME")
 		    (const_int 44)
-		    (not (match_test "flag_pic"))
+		    (not (match_test "GCC_OPTION (flag_pic)"))
 		    (const_int 40)]
 		  (const_int 48))
 	     (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
@@ -9015,7 +9015,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 		    (const_int 28)
 		    (match_test "TARGET_PORTABLE_RUNTIME")
 		    (const_int 44)
-		    (not (match_test "flag_pic"))
+		    (not (match_test "GCC_OPTION (flag_pic)"))
 		    (const_int 40)]
 		  (const_int 48)))
 
@@ -9030,7 +9030,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 		    (const_int 16)
 		    (match_test "TARGET_PORTABLE_RUNTIME")
 		    (const_int 32)
-		    (not (match_test "flag_pic"))
+		    (not (match_test "GCC_OPTION (flag_pic)"))
 		    (const_int 28)]
 		  (const_int 36))
 	     (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
@@ -9041,7 +9041,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 		    (const_int 16)
 		    (match_test "TARGET_PORTABLE_RUNTIME")
 		    (const_int 32)
-		    (not (match_test "flag_pic"))
+		    (not (match_test "GCC_OPTION (flag_pic)"))
 		    (const_int 28)]
 		  (const_int 36))))))])
 
@@ -9071,7 +9071,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28))
 
@@ -9087,7 +9087,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 		    (const_int 16)
 		    (match_test "TARGET_PORTABLE_RUNTIME")
 		    (const_int 32)
-		    (not (match_test "flag_pic"))
+		    (not (match_test "GCC_OPTION (flag_pic)"))
 		    (const_int 28)]
 		  (const_int 36))
 	     (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
@@ -9098,7 +9098,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 		    (const_int 16)
 		    (match_test "TARGET_PORTABLE_RUNTIME")
 		    (const_int 32)
-		    (not (match_test "flag_pic"))
+		    (not (match_test "GCC_OPTION (flag_pic)"))
 		    (const_int 28)]
 		  (const_int 36)))
 
@@ -9112,7 +9112,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 		(const_int 12)
 		(match_test "TARGET_PORTABLE_RUNTIME")
 		(const_int 28)
-		(not (match_test "flag_pic"))
+		(not (match_test "GCC_OPTION (flag_pic)"))
 		(const_int 24)]
 	      (const_int 32)))))])
 
@@ -9143,7 +9143,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28))
 
@@ -9159,7 +9159,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 		    (const_int 16)
 		    (match_test "TARGET_PORTABLE_RUNTIME")
 		    (const_int 32)
-		    (not (match_test "flag_pic"))
+		    (not (match_test "GCC_OPTION (flag_pic)"))
 		    (const_int 28)]
 		  (const_int 36))
 	     (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
@@ -9170,7 +9170,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 		    (const_int 16)
 		    (match_test "TARGET_PORTABLE_RUNTIME")
 		    (const_int 32)
-		    (not (match_test "flag_pic"))
+		    (not (match_test "GCC_OPTION (flag_pic)"))
 		    (const_int 28)]
 		  (const_int 36)))
 
@@ -9184,7 +9184,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 		(const_int 12)
 		(match_test "TARGET_PORTABLE_RUNTIME")
 		(const_int 28)
-		(not (match_test "flag_pic"))
+		(not (match_test "GCC_OPTION (flag_pic)"))
 		(const_int 24)]
 	      (const_int 32)))))])
 
@@ -9208,7 +9208,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -9231,7 +9231,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -9254,7 +9254,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -9277,7 +9277,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -9300,7 +9300,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 	   (const_int 8)
 	   (match_test "TARGET_PORTABLE_RUNTIME")
 	   (const_int 24)
-	   (not (match_test "flag_pic"))
+	   (not (match_test "GCC_OPTION (flag_pic)"))
 	   (const_int 20)]
 	  (const_int 28)))])
 
@@ -9632,7 +9632,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 ;; restore the PIC register.
 (define_expand "exception_receiver"
   [(const_int 4)]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "
 {
   /* On the 64-bit port, we need a blockage because there is
@@ -9650,7 +9650,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 
 (define_expand "builtin_setjmp_receiver"
   [(label_ref (match_operand 0 "" ""))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "
 {
   if (TARGET_64BIT)
@@ -9695,7 +9695,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 			   GEN_INT (TARGET_64BIT ? -8 : -4));
       emit_move_insn (gen_rtx_MEM (word_mode, addr), hard_frame_pointer_rtx);
     }
-  if (!TARGET_64BIT && flag_pic)
+  if (!TARGET_64BIT && GCC_OPTION (flag_pic))
     {
       rtx addr = gen_rtx_PLUS (word_mode, stack_pointer_rtx, GEN_INT (-32));
       emit_move_insn (gen_rtx_MEM (word_mode, addr), pic_offset_table_rtx);
diff --git a/gcc/config/pa/predicates.md b/gcc/config/pa/predicates.md
index 8dcfce0..e0d2011 100644
--- a/gcc/config/pa/predicates.md
+++ b/gcc/config/pa/predicates.md
@@ -170,7 +170,7 @@
   /* While it's always safe to index off the frame pointer, it's not
      profitable to do so when the frame pointer is being eliminated.  */
   if (!reload_completed
-      && flag_omit_frame_pointer
+      && GCC_OPTION (flag_omit_frame_pointer)
       && !cfun->calls_alloca
       && op == frame_pointer_rtx)
     return false;
@@ -486,7 +486,7 @@
 (define_predicate "pic_label_operand"
   (match_code "label_ref,const")
 {
-  if (!flag_pic)
+  if (!GCC_OPTION (flag_pic))
     return false;
 
   switch (GET_CODE (op))
@@ -513,7 +513,7 @@
     op = XEXP (XEXP (op, 0), 0);
   if (GET_CODE (op) == SYMBOL_REF)
     {
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
         return SYMBOL_REF_FLAG (op) && !CONSTANT_POOL_ADDRESS_P (op);
       else
         return SYMBOL_REF_FLAG (op) || CONSTANT_POOL_ADDRESS_P (op);
diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c
index 677160a..6b4d2d5 100644
--- a/gcc/config/pdp11/pdp11.c
+++ b/gcc/config/pdp11/pdp11.c
@@ -922,21 +922,21 @@ pdp11_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED,
          as cheap as total = 2 even if we can shift!  */
       /* If optimizing for size make mult etc cheap, but not 1, so when 
          in doubt the faster insn is chosen.  */
-      if (optimize_size)
+      if (GCC_OPTION (optimize_size))
         *total = COSTS_N_INSNS (2);
       else
         *total = COSTS_N_INSNS (11);
       return false;
 
     case DIV:
-      if (optimize_size)
+      if (GCC_OPTION (optimize_size))
         *total = COSTS_N_INSNS (2);
       else
         *total = COSTS_N_INSNS (25);
       return false;
 
     case MOD:
-      if (optimize_size)
+      if (GCC_OPTION (optimize_size))
         *total = COSTS_N_INSNS (2);
       else
         *total = COSTS_N_INSNS (26);
@@ -964,7 +964,7 @@ pdp11_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED,
     case ASHIFT:
     case LSHIFTRT:
     case ASHIFTRT:
-      if (optimize_size)
+      if (GCC_OPTION (optimize_size))
         *total = COSTS_N_INSNS (1);
       else if (GET_MODE (x) ==  QImode)
         {
@@ -1196,7 +1196,7 @@ output_block_move(rtx *operands)
     if (CONSTANT_P (operands[2]))
     {
 	if (INTVAL (operands[2]) < 16
-	    && (!optimize_size || INTVAL (operands[2]) < 5)
+	    && (!GCC_OPTION (optimize_size) || INTVAL (operands[2]) < 5)
 	    && INTVAL (operands[3]) == 1)
 	{
 	    register int i;
@@ -1207,7 +1207,7 @@ output_block_move(rtx *operands)
 	    return "";
 	}
 	else if (INTVAL(operands[2]) < 32
-		 && (!optimize_size || INTVAL (operands[2]) < 9)
+		 && (!GCC_OPTION (optimize_size) || INTVAL (operands[2]) < 9)
 		 && INTVAL (operands[3]) >= 2)
 	{
 	    register int i;
@@ -1237,7 +1237,7 @@ output_block_move(rtx *operands)
 	{
 	  lastbyte = INTVAL (operands[2]) & 1;
 
-	  if (optimize_size || INTVAL (operands[2]) & 2)
+	  if (GCC_OPTION (optimize_size) || INTVAL (operands[2]) & 2)
 	    unroll = 1;
 	  else if (INTVAL (operands[2]) & 4)
 	    unroll = 2;
@@ -1645,7 +1645,7 @@ output_addr_const_pdp11 (FILE *file, rtx x)
   switch (GET_CODE (x))
     {
     case PC:
-      gcc_assert (flag_pic);
+      gcc_assert (GCC_OPTION (flag_pic));
       putc ('.', file);
       break;
 
diff --git a/gcc/config/pdp11/pdp11.md b/gcc/config/pdp11/pdp11.md
index 46beb4f..f2bfdc2 100644
--- a/gcc/config/pdp11/pdp11.md
+++ b/gcc/config/pdp11/pdp11.md
@@ -1027,7 +1027,7 @@
   [(set (match_operand:HI 0 "nonimmediate_operand" "=r")
 	(ashift:HI (match_operand:HI 1 "general_operand" "0")
 		   (match_operand:HI 2 "expand_shift_operand" "O")))]
-  "! optimize_size"
+  "! GCC_OPTION (optimize_size)"
   "*
 {
   register int i;
diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c
index 2476f73..b9247b2 100644
--- a/gcc/config/picochip/picochip.c
+++ b/gcc/config/picochip/picochip.c
@@ -354,7 +354,7 @@ picochip_option_override (void)
 {
   /* If we are optimizing for stack, dont let inliner to inline functions
      that could potentially increase stack size.*/
-   if (flag_conserve_stack)
+   if (GCC_OPTION (flag_conserve_stack))
      {
        maybe_set_param_value (PARAM_LARGE_STACK_FRAME, 0,
 			      global_options.x_param_values,
@@ -369,20 +369,20 @@ picochip_option_override (void)
      generics, and so on, and it is useful to retain this information
      in the debug output. The increased size of the debug information
      is not really an issue for us. */
-  flag_eliminate_unused_debug_types = 0;
+  GCC_OPTION (flag_eliminate_unused_debug_types) = 0;
 
   /* Even if the user specifies a -fno-omit-frame-pointer on the
      command line, we still want to go ahead and omit frame pointer
      usages, since we dont really have a frame pointer register.
      So, all accesses to FP need to be converted to accesses off
      stack pointer.*/
-  flag_omit_frame_pointer = 1;
+  GCC_OPTION (flag_omit_frame_pointer) = 1;
 
   /* Turning on anchored addresses by default. This is an optimization
      that could decrease the code size by placing anchors in data and
      accessing offsets from the anchor for file local data variables.*/
-  if (optimize >= 1)
-    flag_section_anchors = 1;
+  if (GCC_OPTION (optimize) >= 1)
+    GCC_OPTION (flag_section_anchors) = 1;
 
   /* The second scheduling pass runs within picochip_reorg, to avoid
      having the second jump optimisation trash the instruction modes
@@ -393,14 +393,14 @@ picochip_option_override (void)
      also enable VLIW instruction packing.  VLIW instructions use more
      code space, so VLIW scheduling is disabled when scheduling for
      size.  */
-  if (flag_schedule_insns_after_reload)
+  if (GCC_OPTION (flag_schedule_insns_after_reload))
     {
-      if (optimize_size)
+      if (GCC_OPTION (optimize_size))
 	picochip_schedule_type = DFA_TYPE_SPACE;
       else
 	{
 	  picochip_schedule_type = DFA_TYPE_SPEED;
-	  flag_delayed_branch = 0;
+	  GCC_OPTION (flag_delayed_branch) = 0;
 	}
     }
   else
@@ -410,23 +410,23 @@ picochip_option_override (void)
      analyser works at its best if it always has debug
      information. DWARF is non-intrusive, so it makes no difference to
      code quality if debug is always enabled. */
-  if (debug_info_level < DINFO_LEVEL_NORMAL)
+  if (GCC_OPTION (debug_info_level) < DINFO_LEVEL_NORMAL)
   {
-    debug_info_level = DINFO_LEVEL_NORMAL;
-    write_symbols = DWARF2_DEBUG;
+    GCC_OPTION (debug_info_level) = DINFO_LEVEL_NORMAL;
+    GCC_OPTION (write_symbols) = DWARF2_DEBUG;
   }
 
   /* Options of the form -mae=mac, and so on will be substituted by
      the compiler driver for the appropriate byte access and multiply
      unit ISA options. Any unrecognised AE types will end up being
      passed to the compiler, which should reject them as invalid. */
-  if (picochip_ae_type_string != NULL)
-    error ("invalid AE type specified (%s)", picochip_ae_type_string);
+  if (GCC_OPTION (picochip_ae_type_string) != NULL)
+    error ("invalid AE type specified (%s)", GCC_OPTION (picochip_ae_type_string));
 
   /* Override any specific capabilities of the instruction set. These
      take precedence over any capabilities inferred from the AE type,
      regardless of where the options appear on the command line. */
-  if (picochip_mul_type_string == NULL)
+  if (GCC_OPTION (picochip_mul_type_string) == NULL)
     {
       /* Default to MEM-type multiply, for historical compatibility. */
       picochip_has_mac_unit = false;
@@ -437,15 +437,15 @@ picochip_option_override (void)
       picochip_has_mac_unit = false;
       picochip_has_mul_unit = false;
 
-      if (strcmp (picochip_mul_type_string, "mul") == 0)
+      if (strcmp (GCC_OPTION (picochip_mul_type_string), "mul") == 0)
 	picochip_has_mul_unit = true;
-      else if (strcmp (picochip_mul_type_string, "mac") == 0)
+      else if (strcmp (GCC_OPTION (picochip_mul_type_string), "mac") == 0)
 	picochip_has_mac_unit = true;
-      else if (strcmp (picochip_mul_type_string, "none") == 0)
+      else if (strcmp (GCC_OPTION (picochip_mul_type_string), "none") == 0)
 	{ /* Do nothing. Unit types already set to false. */ }
       else
 	error ("invalid mul type specified (%s) - expected mac, mul or none",
-	       picochip_mul_type_string);
+	       GCC_OPTION (picochip_mul_type_string));
     }
 }
 
@@ -852,7 +852,7 @@ picochip_function_arg (cumulative_args_t cum_v, enum machine_mode mode,
   else
     new_offset = (*cum - offset_overflow) + type_align_in_units;
 
-  if (TARGET_DEBUG)
+  if (GCC_OPTION (TARGET_DEBUG))
     {
       printf ("Function arg:\n");
       printf ("  Type valid: %s\n", (type ? "yes" : "no"));
@@ -985,7 +985,7 @@ picochip_arg_partial_bytes (cumulative_args_t p_cum, enum machine_mode mode,
   else
     new_offset = (cum - offset_overflow) + type_align_in_units;
 
-  if (TARGET_DEBUG)
+  if (GCC_OPTION (TARGET_DEBUG))
     {
       printf ("Partial function arg nregs:\n");
       printf ("  Type valid: %s\n", (type ? "yes" : "no"));
@@ -1440,7 +1440,7 @@ picochip_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
 {
   unsigned mask_val;
 
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     return x;
 
   /* Depending on mode, the offsets allowed are either 16/32/64.*/
@@ -1506,7 +1506,7 @@ picochip_legitimize_reload_address (rtx *x,
       *x = gen_rtx_CONST(mode, *x);
       return 0;
     }
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     return 0;
 
   /* We should recognise addresses that we created.*/
@@ -3255,7 +3255,7 @@ picochip_reorg (void)
      with old MDEP_REORGS that are not CFG based.  Recompute it now.  */
   compute_bb_for_insn ();
 
-  if (optimize == 0)
+  if (GCC_OPTION (optimize) == 0)
     split_all_insns ();
 
   if (picochip_schedule_type != DFA_TYPE_NONE)
@@ -3357,7 +3357,7 @@ picochip_reorg (void)
 	}
     }
 
-  if (flag_var_tracking)
+  if (GCC_OPTION (flag_var_tracking))
     {
       timevar_push (TV_VAR_TRACKING);
       variable_tracking_main ();
@@ -3442,7 +3442,7 @@ picochip_reset_vliw (rtx insn)
   if (picochip_schedule_type != DFA_TYPE_SPEED)
     return;
 
-  if (TARGET_DEBUG)
+  if (GCC_OPTION (TARGET_DEBUG))
     printf ("%s on insn %d\n", __FUNCTION__, INSN_UID (insn));
 
   /* Reset. */
@@ -3537,7 +3537,7 @@ int
 picochip_sched_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
 {
 
-  if (TARGET_DEBUG)
+  if (GCC_OPTION (TARGET_DEBUG))
     {
       printf ("Sched Adjust Cost: %d->%d is %d\n",
 	      INSN_UID (insn), INSN_UID (dep_insn), cost);
@@ -3582,7 +3582,7 @@ picochip_sched_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
   if ((JUMP_P (dep_insn) || CALL_P(dep_insn)) && REG_NOTE_KIND (link) == REG_DEP_ANTI)
     {
 
-      if (TARGET_DEBUG)
+      if (GCC_OPTION (TARGET_DEBUG))
 	printf ("Promoting anti-dependency %d->%d to a true-dependency\n",
 		INSN_UID (insn), INSN_UID (dep_insn));
 
@@ -3879,7 +3879,7 @@ picochip_final_prescan_insn (rtx insn, rtx * opvec ATTRIBUTE_UNUSED,
 
   picochip_current_prescan_insn = insn;
 
-  if (TARGET_DEBUG)
+  if (GCC_OPTION (TARGET_DEBUG))
     printf ("Final prescan on INSN %d with mode %s\n",
 	    INSN_UID (insn), GET_MODE_NAME (GET_MODE (insn)));
 
@@ -4604,7 +4604,7 @@ picochip_get_hi_aligned_mem (rtx ref, rtx * paligned_mem, rtx * pbitnum)
 
   if (offset > 0)
     {
-      if (TARGET_DEBUG)
+      if (GCC_OPTION (TARGET_DEBUG))
 	{
 	  printf
 	    ("Found non-zero offset in get_hi_aligned_mem - check that the correct value is being used (as this functionality hasn't been exploited yet).\n");
diff --git a/gcc/config/picochip/picochip.h b/gcc/config/picochip/picochip.h
index 1daf93c..6d558b1 100644
--- a/gcc/config/picochip/picochip.h
+++ b/gcc/config/picochip/picochip.h
@@ -79,7 +79,7 @@ extern enum picochip_dfa_type picochip_schedule_type;
 #define MULTILIB_DEFAULTS \
   { "mmul-type=mul", "mbyte-access"}
 
-#define TARGET_HAS_BYTE_ACCESS (picochip_has_byte_access)
+#define TARGET_HAS_BYTE_ACCESS (GCC_OPTION (picochip_has_byte_access))
 #define TARGET_HAS_MUL_UNIT (picochip_has_mul_unit)
 #define TARGET_HAS_MAC_UNIT (picochip_has_mac_unit)
 #define TARGET_HAS_MULTIPLY (picochip_has_mac_unit || picochip_has_mul_unit)
diff --git a/gcc/config/picochip/picochip.md b/gcc/config/picochip/picochip.md
index f565c66..b47c8bb 100644
--- a/gcc/config/picochip/picochip.md
+++ b/gcc/config/picochip/picochip.md
@@ -560,7 +560,7 @@
   ""
   "* return picochip_output_cbranch(operands);"
   "reload_completed
-   && (picochip_schedule_type != DFA_TYPE_NONE || flag_delayed_branch)"
+   && (picochip_schedule_type != DFA_TYPE_NONE || GCC_OPTION (flag_delayed_branch))"
   [(const_int 0)]
   "{
      rtx const_int_opnd;
diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c
index b5cd2ad..ed17cef 100644
--- a/gcc/config/rl78/rl78.c
+++ b/gcc/config/rl78/rl78.c
@@ -311,9 +311,9 @@ rl78_asm_file_start (void)
 static void
 rl78_option_override (void)
 {
-  flag_omit_frame_pointer = 1;
-  flag_no_function_cse = 1;
-  flag_split_wide_types = 0;
+  GCC_OPTION (flag_omit_frame_pointer) = 1;
+  GCC_OPTION (flag_no_function_cse) = 1;
+  GCC_OPTION (flag_split_wide_types) = 0;
 
   init_machine_status = rl78_init_machine_status;
 
@@ -1064,7 +1064,7 @@ rl78_expand_prologue (void)
   /* Always re-compute the frame info - the register usage may have changed.  */
   rl78_compute_frame_info ();
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = cfun->machine->framesize;
 
   if (is_interrupt_func (cfun->decl) && !TARGET_G10)
@@ -2092,7 +2092,7 @@ record_content (rtx loc, rtx value)
 
   if (val == index)
     {
-      if (! optimize)
+      if (! GCC_OPTION (optimize))
 	return;
 
       /* This should not happen when optimizing.  */
@@ -2349,7 +2349,7 @@ gen_and_emit_move (rtx to, rtx from, rtx where, bool before)
 {
   enum machine_mode mode = GET_MODE (to);
 
-  if (optimize && before && already_contains (to, from))
+  if (GCC_OPTION (optimize) && before && already_contains (to, from))
     {
 #if DEBUG_ALLOC
       display_content_memory (stderr);
@@ -2759,7 +2759,7 @@ rl78_alloc_physical_registers_op2 (rtx insn)
   /* If HL is not currently being used and dest == op1 then there are
      some possible optimizations available by reloading one of the
      operands into HL, before trying to use the accumulator.  */
-  if (optimize
+  if (GCC_OPTION (optimize)
       && ! hl_used
       && rtx_equal_p (OP (0), OP (1)))
     {
@@ -3627,7 +3627,7 @@ rl78_reorg (void)
 {
   /* split2 only happens when optimizing, but we need all movSIs to be
      split now.  */
-  if (optimize <= 0)
+  if (GCC_OPTION (optimize) <= 0)
     split_all_insns ();
 
   rl78_alloc_physical_registers ();
@@ -3655,12 +3655,12 @@ rl78_reorg (void)
      df_rescan_all_insns is not going to help here because it does not
      touch the artificial uses and defs.  */
   df_finish_pass (true);
-  if (optimize > 1)
+  if (GCC_OPTION (optimize) > 1)
     df_live_add_problem ();
   df_scan_alloc (NULL);
   df_scan_blocks ();
 
-  if (optimize)
+  if (GCC_OPTION (optimize))
     df_analyze ();
 }
 
diff --git a/gcc/config/rl78/rl78.h b/gcc/config/rl78/rl78.h
index 8dee92b..dca4d6e 100644
--- a/gcc/config/rl78/rl78.h
+++ b/gcc/config/rl78/rl78.h
@@ -19,9 +19,9 @@
    <http://www.gnu.org/licenses/>.  */
 
 
-#define RL78_MUL_NONE	(rl78_mul_type == MUL_NONE)
-#define RL78_MUL_RL78	(rl78_mul_type == MUL_RL78)
-#define RL78_MUL_G13	(rl78_mul_type == MUL_G13)
+#define RL78_MUL_NONE	(GCC_OPTION (rl78_mul_type) == MUL_NONE)
+#define RL78_MUL_RL78	(GCC_OPTION (rl78_mul_type) == MUL_RL78)
+#define RL78_MUL_G13	(GCC_OPTION (rl78_mul_type) == MUL_G13)
 
 #define TARGET_CPU_CPP_BUILTINS()               \
   do                                            \
@@ -439,7 +439,7 @@ typedef unsigned int CUMULATIVE_ARGS;
 
 /* For PIC put jump tables into the text section so that the offsets that
    they contain are always computed between two same-section symbols.  */
-#define JUMP_TABLES_IN_TEXT_SECTION	(flag_pic)
+#define JUMP_TABLES_IN_TEXT_SECTION	(GCC_OPTION (flag_pic))
 
 /* This is a version of REG_P that also returns TRUE for SUBREGs.  */
 #define RL78_REG_P(rtl) (REG_P (rtl) || GET_CODE (rtl) == SUBREG)
diff --git a/gcc/config/rs6000/750cl.h b/gcc/config/rs6000/750cl.h
index 218226b..de23e68 100644
--- a/gcc/config/rs6000/750cl.h
+++ b/gcc/config/rs6000/750cl.h
@@ -23,7 +23,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #undef TARGET_PAIRED_FLOAT
-#define TARGET_PAIRED_FLOAT rs6000_paired_float
+#define TARGET_PAIRED_FLOAT GCC_OPTION (rs6000_paired_float)
 
 #undef ASM_CPU_SPEC 
 #define ASM_CPU_SPEC "-m750cl"
diff --git a/gcc/config/rs6000/aix43.h b/gcc/config/rs6000/aix43.h
index 1274d44..bca0df3 100644
--- a/gcc/config/rs6000/aix43.h
+++ b/gcc/config/rs6000/aix43.h
@@ -26,12 +26,12 @@
 do {									\
   if (TARGET_64BIT && ! TARGET_POWERPC64)				\
     {									\
-      rs6000_isa_flags |= OPTION_MASK_POWERPC64;			\
+      GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_POWERPC64;			\
       warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \
     }									\
   if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128)			\
     {									\
-      rs6000_long_double_type_size = 64;				\
+      GCC_OPTION (rs6000_long_double_type_size) = 64;				\
       if (global_options_set.x_rs6000_long_double_type_size)		\
 	warning (0, "soft-float and long-double-128 are incompatible");	\
     }									\
diff --git a/gcc/config/rs6000/aix51.h b/gcc/config/rs6000/aix51.h
index caca74b..33e7454 100644
--- a/gcc/config/rs6000/aix51.h
+++ b/gcc/config/rs6000/aix51.h
@@ -26,7 +26,7 @@
 do {									\
   if (TARGET_64BIT && ! TARGET_POWERPC64)				\
     {									\
-      rs6000_isa_flags |= OPTION_MASK_POWERPC64;			\
+      GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_POWERPC64;			\
       warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \
     }									\
   if (TARGET_POWERPC64 && ! TARGET_64BIT)				\
diff --git a/gcc/config/rs6000/aix52.h b/gcc/config/rs6000/aix52.h
index a90c926..9cfb01e 100644
--- a/gcc/config/rs6000/aix52.h
+++ b/gcc/config/rs6000/aix52.h
@@ -26,12 +26,12 @@
 do {									\
   if (TARGET_64BIT && ! TARGET_POWERPC64)				\
     {									\
-      rs6000_isa_flags |= OPTION_MASK_POWERPC64;			\
+      GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_POWERPC64;			\
       warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \
     }									\
   if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128)			\
     {									\
-      rs6000_long_double_type_size = 64;				\
+      GCC_OPTION (rs6000_long_double_type_size) = 64;				\
       if (global_options_set.x_rs6000_long_double_type_size)		\
 	warning (0, "soft-float and long-double-128 are incompatible");	\
     }									\
diff --git a/gcc/config/rs6000/aix53.h b/gcc/config/rs6000/aix53.h
index 65887c9..36ec092 100644
--- a/gcc/config/rs6000/aix53.h
+++ b/gcc/config/rs6000/aix53.h
@@ -26,12 +26,12 @@
 do {									\
   if (TARGET_64BIT && ! TARGET_POWERPC64)				\
     {									\
-      rs6000_isa_flags |= OPTION_MASK_POWERPC64;			\
+      GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_POWERPC64;			\
       warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \
     }									\
   if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128)			\
     {									\
-      rs6000_long_double_type_size = 64;				\
+      GCC_OPTION (rs6000_long_double_type_size) = 64;				\
       if (global_options_set.x_rs6000_long_double_type_size)		\
 	warning (0, "soft-float and long-double-128 are incompatible");	\
     }									\
diff --git a/gcc/config/rs6000/aix61.h b/gcc/config/rs6000/aix61.h
index e21a230..adbc8d2 100644
--- a/gcc/config/rs6000/aix61.h
+++ b/gcc/config/rs6000/aix61.h
@@ -26,12 +26,12 @@
 do {									\
   if (TARGET_64BIT && ! TARGET_POWERPC64)				\
     {									\
-      rs6000_isa_flags |= OPTION_MASK_POWERPC64;			\
+      GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_POWERPC64;			\
       warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \
     }									\
   if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128)			\
     {									\
-      rs6000_long_double_type_size = 64;				\
+      GCC_OPTION (rs6000_long_double_type_size) = 64;				\
       if (global_options_set.x_rs6000_long_double_type_size)		\
 	warning (0, "soft-float and long-double-128 are incompatible");	\
     }									\
@@ -39,22 +39,22 @@ do {									\
     {									\
       error ("-maix64 required: 64-bit computation with 32-bit addressing not yet supported"); \
     }									\
-  if ((rs6000_isa_flags_explicit					\
+  if ((GCC_OPTION (rs6000_isa_flags_explicit)					\
        & OPTION_MASK_MINIMAL_TOC) != 0)					\
     {									\
       if (global_options_set.x_rs6000_current_cmodel			\
-	  && rs6000_current_cmodel != CMODEL_SMALL)			\
+	  && GCC_OPTION (rs6000_current_cmodel) != CMODEL_SMALL)			\
 	error ("-mcmodel incompatible with other toc options"); 	\
       SET_CMODEL (CMODEL_SMALL);					\
     }									\
-  if (rs6000_current_cmodel != CMODEL_SMALL)				\
+  if (GCC_OPTION (rs6000_current_cmodel) != CMODEL_SMALL)				\
     {									\
-      TARGET_NO_FP_IN_TOC = 0;						\
-      TARGET_NO_SUM_IN_TOC = 0;						\
+      GCC_OPTION (TARGET_NO_FP_IN_TOC) = 0;						\
+      GCC_OPTION (TARGET_NO_SUM_IN_TOC) = 0;						\
     }									\
-  if (rs6000_current_cmodel == CMODEL_MEDIUM)				\
+  if (GCC_OPTION (rs6000_current_cmodel) == CMODEL_MEDIUM)				\
     {									\
-      rs6000_current_cmodel = CMODEL_LARGE;				\
+      GCC_OPTION (rs6000_current_cmodel) = CMODEL_LARGE;				\
     }									\
 } while (0);
 
@@ -200,8 +200,8 @@ extern long long int    atoll(const char *);
 /* Large TOC Support */
 #ifdef HAVE_LD_LARGE_TOC
 #undef TARGET_CMODEL
-#define TARGET_CMODEL rs6000_current_cmodel
-#define SET_CMODEL(opt) rs6000_current_cmodel = opt
+#define TARGET_CMODEL GCC_OPTION (rs6000_current_cmodel)
+#define SET_CMODEL(opt) GCC_OPTION (rs6000_current_cmodel) = opt
 #else
 #define SET_CMODEL(opt) do {} while (0)
 #endif
diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md
index faa88d0..b971fdf 100644
--- a/gcc/config/rs6000/altivec.md
+++ b/gcc/config/rs6000/altivec.md
@@ -3083,7 +3083,7 @@
   [(set (match_operand:V16QI 0 "register_operand" "=v")
         (unspec:V16QI [(match_operand:BLK 1 "memory_operand" "Z")]
 		      UNSPEC_LVLX))]
-  "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
+  "TARGET_ALTIVEC && GCC_OPTION (rs6000_cpu) == PROCESSOR_CELL"
   "lvlx %0,%y1"
   [(set_attr "type" "vecload")])
 
@@ -3091,7 +3091,7 @@
   [(set (match_operand:V16QI 0 "register_operand" "=v")
         (unspec:V16QI [(match_operand:BLK 1 "memory_operand" "Z")]
 		      UNSPEC_LVLXL))]
-  "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
+  "TARGET_ALTIVEC && GCC_OPTION (rs6000_cpu) == PROCESSOR_CELL"
   "lvlxl %0,%y1"
   [(set_attr "type" "vecload")])
 
@@ -3099,7 +3099,7 @@
   [(set (match_operand:V16QI 0 "register_operand" "=v")
         (unspec:V16QI [(match_operand:BLK 1 "memory_operand" "Z")]
 		      UNSPEC_LVRX))]
-  "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
+  "TARGET_ALTIVEC && GCC_OPTION (rs6000_cpu) == PROCESSOR_CELL"
   "lvrx %0,%y1"
   [(set_attr "type" "vecload")])
 
@@ -3107,7 +3107,7 @@
   [(set (match_operand:V16QI 0 "register_operand" "=v")
         (unspec:V16QI [(match_operand:BLK 1 "memory_operand" "Z")]
 		      UNSPEC_LVRXL))]
-  "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
+  "TARGET_ALTIVEC && GCC_OPTION (rs6000_cpu) == PROCESSOR_CELL"
   "lvrxl %0,%y1"
   [(set_attr "type" "vecload")])
 
@@ -3116,7 +3116,7 @@
     [(set (match_operand:V16QI 0 "memory_operand" "=Z")
 	  (match_operand:V16QI 1 "register_operand" "v"))
      (unspec [(const_int 0)] UNSPEC_STVLX)])]
-  "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
+  "TARGET_ALTIVEC && GCC_OPTION (rs6000_cpu) == PROCESSOR_CELL"
   "stvlx %1,%y0"
   [(set_attr "type" "vecstore")])
 
@@ -3125,7 +3125,7 @@
     [(set (match_operand:V16QI 0 "memory_operand" "=Z")
 	  (match_operand:V16QI 1 "register_operand" "v"))
      (unspec [(const_int 0)] UNSPEC_STVLXL)])]
-  "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
+  "TARGET_ALTIVEC && GCC_OPTION (rs6000_cpu) == PROCESSOR_CELL"
   "stvlxl %1,%y0"
   [(set_attr "type" "vecstore")])
 
@@ -3134,7 +3134,7 @@
     [(set (match_operand:V16QI 0 "memory_operand" "=Z")
 	  (match_operand:V16QI 1 "register_operand" "v"))
      (unspec [(const_int 0)] UNSPEC_STVRX)])]
-  "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
+  "TARGET_ALTIVEC && GCC_OPTION (rs6000_cpu) == PROCESSOR_CELL"
   "stvrx %1,%y0"
   [(set_attr "type" "vecstore")])
 
@@ -3143,7 +3143,7 @@
     [(set (match_operand:V16QI 0 "memory_operand" "=Z")
 	  (match_operand:V16QI 1 "register_operand" "v"))
      (unspec [(const_int 0)] UNSPEC_STVRXL)])]
-  "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
+  "TARGET_ALTIVEC && GCC_OPTION (rs6000_cpu) == PROCESSOR_CELL"
   "stvrxl %1,%y0"
   [(set_attr "type" "vecstore")])
 
diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h
index 0329f3f..c8afc70 100644
--- a/gcc/config/rs6000/darwin.h
+++ b/gcc/config/rs6000/darwin.h
@@ -69,11 +69,11 @@ extern int darwin_emit_branch_islands;
 #define C_COMMON_OVERRIDE_OPTIONS do {					\
   /* On powerpc, __cxa_get_exception_ptr is available starting in the	\
      10.4.6 libstdc++.dylib.  */					\
-  if (strverscmp (darwin_macosx_version_min, "10.4.6") < 0		\
-      && flag_use_cxa_get_exception_ptr == 2)				\
-    flag_use_cxa_get_exception_ptr = 0;					\
-  if (flag_mkernel)							\
-    flag_no_builtin = 1;						\
+  if (strverscmp (GCC_OPTION (darwin_macosx_version_min), "10.4.6") < 0		\
+      && GCC_OPTION (flag_use_cxa_get_exception_ptr) == 2)				\
+    GCC_OPTION (flag_use_cxa_get_exception_ptr) = 0;					\
+  if (GCC_OPTION (flag_mkernel))							\
+    GCC_OPTION (flag_no_builtin) = 1;						\
   SUBTARGET_C_COMMON_OVERRIDE_OPTIONS;					\
 } while (0)
 
@@ -359,7 +359,7 @@ extern int darwin_emit_branch_islands;
 /* For binary compatibility with 2.95; Darwin C APIs use bool from
    stdbool.h, which was an int-sized enum in 2.95.  Users can explicitly
    choose to have sizeof(bool)==1 with the -mone-byte-bool switch. */
-#define BOOL_TYPE_SIZE (darwin_one_byte_bool ? CHAR_TYPE_SIZE : INT_TYPE_SIZE)
+#define BOOL_TYPE_SIZE (GCC_OPTION (darwin_one_byte_bool) ? CHAR_TYPE_SIZE : INT_TYPE_SIZE)
 
 #undef REGISTER_TARGET_PRAGMAS
 #define REGISTER_TARGET_PRAGMAS() \
@@ -380,7 +380,7 @@ extern int darwin_emit_branch_islands;
    accessed indirectly.  The runtime uses this indirection to forward
    references for data to the original instance of that data.  */
 
-#define TARGET_FIX_AND_CONTINUE (darwin_fix_and_continue)
+#define TARGET_FIX_AND_CONTINUE (GCC_OPTION (darwin_fix_and_continue))
 
 /* This is the reserved direct dispatch address for Objective-C.  */
 #define OFFS_MSGSEND_FAST		0xFFFEFF00
@@ -394,7 +394,7 @@ extern int darwin_emit_branch_islands;
 
 /* When generating kernel code or kexts, we don't use Altivec by
    default, as kernel code doesn't save/restore those registers.  */
-#define OS_MISSING_ALTIVEC (flag_mkernel || flag_apple_kext)
+#define OS_MISSING_ALTIVEC (GCC_OPTION (flag_mkernel) || GCC_OPTION (flag_apple_kext))
 
 /* Darwin has support for section anchors on powerpc*.  
    It is disabled for any section containing a "zero-sized item" (because these
diff --git a/gcc/config/rs6000/darwin.md b/gcc/config/rs6000/darwin.md
index 8b816b7..1b3577f 100644
--- a/gcc/config/rs6000/darwin.md
+++ b/gcc/config/rs6000/darwin.md
@@ -245,7 +245,7 @@ You should have received a copy of the GNU General Public License
   [(set (reg:SI 65)
         (unspec [(match_operand 0 "" "")]
                    UNSPEC_LD_MPIC))]
-  "(DEFAULT_ABI == ABI_DARWIN) && flag_pic"
+  "(DEFAULT_ABI == ABI_DARWIN) && GCC_OPTION (flag_pic)"
 {
   if (TARGET_32BIT)
     emit_insn (gen_load_macho_picbase_si (operands[0]));
@@ -259,7 +259,7 @@ You should have received a copy of the GNU General Public License
   [(set (reg:SI 65)
 	(unspec:SI [(match_operand:SI 0 "immediate_operand" "s")
 		    (pc)] UNSPEC_LD_MPIC))]
-  "(DEFAULT_ABI == ABI_DARWIN) && flag_pic"
+  "(DEFAULT_ABI == ABI_DARWIN) && GCC_OPTION (flag_pic)"
 {
 #if TARGET_MACHO
   machopic_should_output_picbase_label (); /* Update for new func.  */
@@ -275,7 +275,7 @@ You should have received a copy of the GNU General Public License
   [(set (reg:DI 65)
 	(unspec:DI [(match_operand:DI 0 "immediate_operand" "s")
 		    (pc)] UNSPEC_LD_MPIC))]
-  "(DEFAULT_ABI == ABI_DARWIN) && flag_pic && TARGET_64BIT"
+  "(DEFAULT_ABI == ABI_DARWIN) && GCC_OPTION (flag_pic) && TARGET_64BIT"
 {
 #if TARGET_MACHO
   machopic_should_output_picbase_label (); /* Update for new func.  */
@@ -389,7 +389,7 @@ You should have received a copy of the GNU General Public License
   [(set (reg:SI 65)
         (unspec [(match_operand 0 "" "")]
                    UNSPEC_RELD_MPIC))]
-  "(DEFAULT_ABI == ABI_DARWIN) && flag_pic"
+  "(DEFAULT_ABI == ABI_DARWIN) && GCC_OPTION (flag_pic)"
 {
   if (TARGET_32BIT)
     emit_insn (gen_reload_macho_picbase_si (operands[0]));
@@ -403,7 +403,7 @@ You should have received a copy of the GNU General Public License
   [(set (reg:SI 65)
         (unspec:SI [(match_operand:SI 0 "immediate_operand" "s")
 		    (pc)] UNSPEC_RELD_MPIC))]
-  "(DEFAULT_ABI == ABI_DARWIN) && flag_pic"
+  "(DEFAULT_ABI == ABI_DARWIN) && GCC_OPTION (flag_pic)"
 {
 #if TARGET_MACHO
   if (machopic_should_output_picbase_label ())
@@ -426,7 +426,7 @@ You should have received a copy of the GNU General Public License
   [(set (reg:DI 65)
 	(unspec:DI [(match_operand:DI 0 "immediate_operand" "s")
 		    (pc)] UNSPEC_RELD_MPIC))]
-  "(DEFAULT_ABI == ABI_DARWIN) && flag_pic && TARGET_64BIT"
+  "(DEFAULT_ABI == ABI_DARWIN) && GCC_OPTION (flag_pic) && TARGET_64BIT"
 {
 #if TARGET_MACHO
   if (machopic_should_output_picbase_label ())
@@ -449,7 +449,7 @@ You should have received a copy of the GNU General Public License
 
 (define_insn_and_split "nonlocal_goto_receiver"
   [(unspec_volatile [(const_int 0)] UNSPECV_NLGR)]
-  "TARGET_MACHO && flag_pic"
+  "TARGET_MACHO && GCC_OPTION (flag_pic)"
   "#"
   "&& reload_completed"
   [(const_int 0)]
diff --git a/gcc/config/rs6000/e500.h b/gcc/config/rs6000/e500.h
index 2fd1d12..70b5d08 100644
--- a/gcc/config/rs6000/e500.h
+++ b/gcc/config/rs6000/e500.h
@@ -23,11 +23,11 @@
 #undef TARGET_E500_DOUBLE
 #undef CHECK_E500_OPTIONS
 
-#define TARGET_SPE_ABI rs6000_spe_abi
-#define TARGET_SPE rs6000_spe
-#define TARGET_FPRS (rs6000_float_gprs == 0)
-#define TARGET_E500_SINGLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 1)
-#define TARGET_E500_DOUBLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 2)
+#define TARGET_SPE_ABI GCC_OPTION (rs6000_spe_abi)
+#define TARGET_SPE GCC_OPTION (rs6000_spe)
+#define TARGET_FPRS (GCC_OPTION (rs6000_float_gprs) == 0)
+#define TARGET_E500_SINGLE (TARGET_HARD_FLOAT && GCC_OPTION (rs6000_float_gprs) == 1)
+#define TARGET_E500_DOUBLE (TARGET_HARD_FLOAT && GCC_OPTION (rs6000_float_gprs) == 2)
 #define CHECK_E500_OPTIONS						\
   do {									\
     if (TARGET_SPE || TARGET_SPE_ABI					\
diff --git a/gcc/config/rs6000/eabialtivec.h b/gcc/config/rs6000/eabialtivec.h
index d65f0d5..30e7a4f 100644
--- a/gcc/config/rs6000/eabialtivec.h
+++ b/gcc/config/rs6000/eabialtivec.h
@@ -24,4 +24,4 @@
 #define TARGET_DEFAULT (MASK_EABI | MASK_ALTIVEC)
 
 #undef  SUBSUBTARGET_OVERRIDE_OPTIONS
-#define SUBSUBTARGET_OVERRIDE_OPTIONS	rs6000_altivec_abi = 1
+#define SUBSUBTARGET_OVERRIDE_OPTIONS	GCC_OPTION (rs6000_altivec_abi) = 1
diff --git a/gcc/config/rs6000/freebsd.h b/gcc/config/rs6000/freebsd.h
index 9293dca..0c9ce85 100644
--- a/gcc/config/rs6000/freebsd.h
+++ b/gcc/config/rs6000/freebsd.h
@@ -71,7 +71,7 @@
    -mrelocatable or -mrelocatable-lib is given.  */
 #undef RELOCATABLE_NEEDS_FIXUP
 #define RELOCATABLE_NEEDS_FIXUP \
-  (rs6000_isa_flags & rs6000_isa_flags_explicit & OPTION_MASK_RELOCATABLE)
+  (GCC_OPTION (rs6000_isa_flags) & GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_RELOCATABLE)
 
 #define DBX_REGISTER_NUMBER(REGNO) rs6000_dbx_register_number (REGNO)
 
diff --git a/gcc/config/rs6000/freebsd64.h b/gcc/config/rs6000/freebsd64.h
index 4f678f6..29335aa 100644
--- a/gcc/config/rs6000/freebsd64.h
+++ b/gcc/config/rs6000/freebsd64.h
@@ -41,8 +41,8 @@ extern int dot_symbols;
 #define TARGET_USES_LINUX64_OPT 1
 #ifdef HAVE_LD_LARGE_TOC
 #undef TARGET_CMODEL
-#define TARGET_CMODEL rs6000_current_cmodel
-#define SET_CMODEL(opt) rs6000_current_cmodel = opt
+#define TARGET_CMODEL GCC_OPTION (rs6000_current_cmodel)
+#define SET_CMODEL(opt) GCC_OPTION (rs6000_current_cmodel) = opt
 #else
 #define SET_CMODEL(opt) do {} while (0)
 #endif
@@ -57,7 +57,7 @@ extern int dot_symbols;
    -mrelocatable or -mrelocatable-lib is given.  */
 #undef RELOCATABLE_NEEDS_FIXUP
 #define RELOCATABLE_NEEDS_FIXUP \
-  (rs6000_isa_flags & rs6000_isa_flags_explicit & OPTION_MASK_RELOCATABLE)
+  (GCC_OPTION (rs6000_isa_flags) & GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_RELOCATABLE)
 
 #undef  RS6000_ABI_NAME
 #define RS6000_ABI_NAME "freebsd"
@@ -70,40 +70,40 @@ extern int dot_symbols;
   do								\
     {								\
       if (!global_options_set.x_rs6000_alignment_flags)		\
-	rs6000_alignment_flags = MASK_ALIGN_NATURAL;		\
+	GCC_OPTION (rs6000_alignment_flags) = MASK_ALIGN_NATURAL;		\
       if (TARGET_64BIT)						\
 	{							\
 	  if (DEFAULT_ABI != ABI_AIX)				\
 	    {							\
-	      rs6000_current_abi = ABI_AIX;			\
+	      GCC_OPTION (rs6000_current_abi) = ABI_AIX;			\
 	      error (INVALID_64BIT, "call");			\
 	    }							\
-	  dot_symbols = !strcmp (rs6000_abi_name, "aixdesc");	\
-	  if (rs6000_isa_flags & OPTION_MASK_RELOCATABLE)	\
+	  dot_symbols = !strcmp (GCC_OPTION (rs6000_abi_name), "aixdesc");	\
+	  if (GCC_OPTION (rs6000_isa_flags) & OPTION_MASK_RELOCATABLE)	\
 	    {							\
-	      rs6000_isa_flags &= ~OPTION_MASK_RELOCATABLE;	\
+	      GCC_OPTION (rs6000_isa_flags) &= ~OPTION_MASK_RELOCATABLE;	\
 	      error (INVALID_64BIT, "relocatable");		\
 	    }							\
-	  if (rs6000_isa_flags & OPTION_MASK_EABI)		\
+	  if (GCC_OPTION (rs6000_isa_flags) & OPTION_MASK_EABI)		\
 	    {							\
-	      rs6000_isa_flags &= ~OPTION_MASK_EABI;		\
+	      GCC_OPTION (rs6000_isa_flags) &= ~OPTION_MASK_EABI;		\
 	      error (INVALID_64BIT, "eabi");			\
 	    }							\
 	  if (TARGET_PROTOTYPE)					\
 	    {							\
-	      target_prototype = 0;				\
+	      GCC_OPTION (target_prototype) = 0;				\
 	      error (INVALID_64BIT, "prototype");		\
 	    }							\
-	  if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0)	\
+	  if ((GCC_OPTION (rs6000_isa_flags) & OPTION_MASK_POWERPC64) == 0)	\
 	    {							\
-	      rs6000_isa_flags |= OPTION_MASK_POWERPC64;	\
+	      GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_POWERPC64;	\
 	      error ("-m64 requires a PowerPC64 cpu");		\
 	    }							\
-	   if ((rs6000_isa_flags_explicit			\
+	   if ((GCC_OPTION (rs6000_isa_flags_explicit)			\
 		& OPTION_MASK_MINIMAL_TOC) != 0)		\
 	    {							\
 	      if (global_options_set.x_rs6000_current_cmodel	\
-		  && rs6000_current_cmodel != CMODEL_SMALL)	\
+		  && GCC_OPTION (rs6000_current_cmodel) != CMODEL_SMALL)	\
 		error ("-mcmodel incompatible with other toc options"); \
 	      SET_CMODEL (CMODEL_SMALL);			\
 	    }							\
@@ -111,10 +111,10 @@ extern int dot_symbols;
 	    {							\
 	      if (!global_options_set.x_rs6000_current_cmodel)	\
 		SET_CMODEL (CMODEL_MEDIUM);			\
-	      if (rs6000_current_cmodel != CMODEL_SMALL)	\
+	      if (GCC_OPTION (rs6000_current_cmodel) != CMODEL_SMALL)	\
 		{						\
-		  TARGET_NO_FP_IN_TOC = 0;			\
-		  TARGET_NO_SUM_IN_TOC = 0;			\
+		  GCC_OPTION (TARGET_NO_FP_IN_TOC) = 0;			\
+		  GCC_OPTION (TARGET_NO_SUM_IN_TOC) = 0;			\
 		}						\
 	    }							\
 	}							\
@@ -351,7 +351,7 @@ extern int dot_symbols;
    true if the symbol may be affected by dynamic relocations.  */
 #undef	ASM_PREFERRED_EH_DATA_FORMAT
 #define	ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
-  ((TARGET_64BIT || flag_pic || TARGET_RELOCATABLE)			\
+  ((TARGET_64BIT || GCC_OPTION (flag_pic) || TARGET_RELOCATABLE)			\
    ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel		\
       | (TARGET_64BIT ? DW_EH_PE_udata8 : DW_EH_PE_sdata4))		\
    : DW_EH_PE_absptr)
@@ -385,7 +385,7 @@ extern int dot_symbols;
 #define MINIMAL_TOC_SECTION_ASM_OP \
   (TARGET_64BIT                                         \
    ? "\t.section\t\".toc1\",\"aw\""                     \
-   : ((TARGET_RELOCATABLE || flag_pic)                  \
+   : ((TARGET_RELOCATABLE || GCC_OPTION (flag_pic))                  \
       ? "\t.section\t\".got2\",\"aw\""                  \
       : "\t.section\t\".got1\",\"aw\""))
 
@@ -394,7 +394,7 @@ extern int dot_symbols;
 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL)                    \
   do                                                                    \
     {                                                                   \
-      if (!flag_inhibit_size_directive)                                 \
+      if (!GCC_OPTION (flag_inhibit_size_directive))                                 \
         {                                                               \
           fputs ("\t.size\t", (FILE));                                  \
           if (TARGET_64BIT && DOT_SYMBOLS)                              \
@@ -420,9 +420,9 @@ extern int dot_symbols;
            && ((TARGET_64BIT                                            \
                 && (TARGET_MINIMAL_TOC                                  \
                     || (SCALAR_FLOAT_MODE_P (GET_MODE (X))              \
-                        && ! TARGET_NO_FP_IN_TOC)))                     \
+                        && ! GCC_OPTION (TARGET_NO_FP_IN_TOC))))                     \
                || (!TARGET_64BIT                                        \
-                   && !TARGET_NO_FP_IN_TOC                              \
+                   && !GCC_OPTION (TARGET_NO_FP_IN_TOC)                              \
                    && !TARGET_RELOCATABLE                               \
                    && SCALAR_FLOAT_MODE_P (GET_MODE (X))                \
                    && BITS_PER_WORD == HOST_BITS_PER_INT)))))
diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
index 1f4579f..049cd6a 100644
--- a/gcc/config/rs6000/linux.h
+++ b/gcc/config/rs6000/linux.h
@@ -31,9 +31,9 @@
 #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
 #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
 #else
-#define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
-#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
-#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
+#define OPTION_GLIBC  (GCC_OPTION (linux_libc) == LIBC_GLIBC)
+#define OPTION_UCLIBC (GCC_OPTION (linux_libc) == LIBC_UCLIBC)
+#define OPTION_BIONIC (GCC_OPTION (linux_libc) == LIBC_BIONIC)
 #endif
 
 /* Determine what functions are present at the runtime;
@@ -127,7 +127,7 @@
    -mrelocatable or -mrelocatable-lib is given.  */
 #undef RELOCATABLE_NEEDS_FIXUP
 #define RELOCATABLE_NEEDS_FIXUP \
-  (rs6000_isa_flags & rs6000_isa_flags_explicit & OPTION_MASK_RELOCATABLE)
+  (GCC_OPTION (rs6000_isa_flags) & GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_RELOCATABLE)
 
 #define TARGET_POSIX_IO
 
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index dbc9a52..1b6a368 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -57,13 +57,13 @@ extern int dot_symbols;
 #define DOT_SYMBOLS dot_symbols
 #endif
 
-#define TARGET_PROFILE_KERNEL profile_kernel
+#define TARGET_PROFILE_KERNEL GCC_OPTION (profile_kernel)
 
 #define TARGET_USES_LINUX64_OPT 1
 #ifdef HAVE_LD_LARGE_TOC
 #undef TARGET_CMODEL
-#define TARGET_CMODEL rs6000_current_cmodel
-#define SET_CMODEL(opt) rs6000_current_cmodel = opt
+#define TARGET_CMODEL GCC_OPTION (rs6000_current_cmodel)
+#define SET_CMODEL(opt) GCC_OPTION (rs6000_current_cmodel) = opt
 #else
 #define SET_CMODEL(opt) do {} while (0)
 #endif
@@ -81,7 +81,7 @@ extern int dot_symbols;
    -mrelocatable or -mrelocatable-lib is given.  */
 #undef RELOCATABLE_NEEDS_FIXUP
 #define RELOCATABLE_NEEDS_FIXUP \
-  (rs6000_isa_flags & rs6000_isa_flags_explicit & OPTION_MASK_RELOCATABLE)
+  (GCC_OPTION (rs6000_isa_flags) & GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_RELOCATABLE)
 
 #undef	RS6000_ABI_NAME
 #define	RS6000_ABI_NAME "linux"
@@ -90,9 +90,9 @@ extern int dot_symbols;
 #define INVALID_32BIT INVALID_64BIT
 
 #ifdef LINUX64_DEFAULT_ABI_ELFv2
-#define ELFv2_ABI_CHECK (rs6000_elf_abi != 1)
+#define ELFv2_ABI_CHECK (GCC_OPTION (rs6000_elf_abi) != 1)
 #else
-#define ELFv2_ABI_CHECK (rs6000_elf_abi == 2)
+#define ELFv2_ABI_CHECK (GCC_OPTION (rs6000_elf_abi) == 2)
 #endif
 
 #undef	SUBSUBTARGET_OVERRIDE_OPTIONS
@@ -100,46 +100,46 @@ extern int dot_symbols;
   do								\
     {								\
       if (!global_options_set.x_rs6000_alignment_flags)		\
-	rs6000_alignment_flags = MASK_ALIGN_NATURAL;		\
+	GCC_OPTION (rs6000_alignment_flags) = MASK_ALIGN_NATURAL;		\
       if (TARGET_64BIT)						\
 	{							\
 	  if (DEFAULT_ABI != ABI_AIX)				\
 	    {							\
-	      rs6000_current_abi = ABI_AIX;			\
+	      GCC_OPTION (rs6000_current_abi) = ABI_AIX;			\
 	      error (INVALID_64BIT, "call");			\
 	    }							\
-	  dot_symbols = !strcmp (rs6000_abi_name, "aixdesc");	\
+	  dot_symbols = !strcmp (GCC_OPTION (rs6000_abi_name), "aixdesc");	\
 	  if (ELFv2_ABI_CHECK)					\
 	    {							\
-	      rs6000_current_abi = ABI_ELFv2;			\
+	      GCC_OPTION (rs6000_current_abi) = ABI_ELFv2;			\
 	      if (dot_symbols)					\
 		error ("-mcall-aixdesc incompatible with -mabi=elfv2"); \
 	    }							\
-	  if (rs6000_isa_flags & OPTION_MASK_RELOCATABLE)	\
+	  if (GCC_OPTION (rs6000_isa_flags) & OPTION_MASK_RELOCATABLE)	\
 	    {							\
-	      rs6000_isa_flags &= ~OPTION_MASK_RELOCATABLE;	\
+	      GCC_OPTION (rs6000_isa_flags) &= ~OPTION_MASK_RELOCATABLE;	\
 	      error (INVALID_64BIT, "relocatable");		\
 	    }							\
-	  if (rs6000_isa_flags & OPTION_MASK_EABI)		\
+	  if (GCC_OPTION (rs6000_isa_flags) & OPTION_MASK_EABI)		\
 	    {							\
-	      rs6000_isa_flags &= ~OPTION_MASK_EABI;		\
+	      GCC_OPTION (rs6000_isa_flags) &= ~OPTION_MASK_EABI;		\
 	      error (INVALID_64BIT, "eabi");			\
 	    }							\
 	  if (TARGET_PROTOTYPE)					\
 	    {							\
-	      target_prototype = 0;				\
+	      GCC_OPTION (target_prototype) = 0;				\
 	      error (INVALID_64BIT, "prototype");		\
 	    }							\
-	  if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0)	\
+	  if ((GCC_OPTION (rs6000_isa_flags) & OPTION_MASK_POWERPC64) == 0)	\
 	    {							\
-	      rs6000_isa_flags |= OPTION_MASK_POWERPC64;	\
+	      GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_POWERPC64;	\
 	      error ("-m64 requires a PowerPC64 cpu");		\
 	    }							\
-	  if ((rs6000_isa_flags_explicit			\
+	  if ((GCC_OPTION (rs6000_isa_flags_explicit)			\
 	       & OPTION_MASK_MINIMAL_TOC) != 0)			\
 	    {							\
 	      if (global_options_set.x_rs6000_current_cmodel	\
-		  && rs6000_current_cmodel != CMODEL_SMALL)	\
+		  && GCC_OPTION (rs6000_current_cmodel) != CMODEL_SMALL)	\
 		error ("-mcmodel incompatible with other toc options"); \
 	      SET_CMODEL (CMODEL_SMALL);			\
 	    }							\
@@ -147,13 +147,13 @@ extern int dot_symbols;
 	    {							\
 	      if (!global_options_set.x_rs6000_current_cmodel)	\
 		SET_CMODEL (CMODEL_MEDIUM);			\
-	      if (rs6000_current_cmodel != CMODEL_SMALL)	\
+	      if (GCC_OPTION (rs6000_current_cmodel) != CMODEL_SMALL)	\
 		{						\
 		  if (!global_options_set.x_TARGET_NO_FP_IN_TOC) \
-		    TARGET_NO_FP_IN_TOC				\
-		      = rs6000_current_cmodel == CMODEL_MEDIUM;	\
+		    GCC_OPTION (TARGET_NO_FP_IN_TOC)				\
+		      = GCC_OPTION (rs6000_current_cmodel) == CMODEL_MEDIUM;	\
 		  if (!global_options_set.x_TARGET_NO_SUM_IN_TOC) \
-		    TARGET_NO_SUM_IN_TOC = 0;			\
+		    GCC_OPTION (TARGET_NO_SUM_IN_TOC) = 0;			\
 		}						\
 	    }							\
 	}							\
@@ -304,9 +304,9 @@ extern int dot_symbols;
 #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
 #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
 #else
-#define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
-#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
-#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
+#define OPTION_GLIBC  (GCC_OPTION (linux_libc) == LIBC_GLIBC)
+#define OPTION_UCLIBC (GCC_OPTION (linux_libc) == LIBC_UCLIBC)
+#define OPTION_BIONIC (GCC_OPTION (linux_libc) == LIBC_BIONIC)
 #endif
 
 /* Determine what functions are present at the runtime;
@@ -424,7 +424,7 @@ extern int dot_symbols;
 #define MINIMAL_TOC_SECTION_ASM_OP \
   (TARGET_64BIT						\
    ? "\t.section\t\".toc1\",\"aw\""			\
-   : ((TARGET_RELOCATABLE || flag_pic)			\
+   : ((TARGET_RELOCATABLE || GCC_OPTION (flag_pic))			\
       ? "\t.section\t\".got2\",\"aw\""			\
       : "\t.section\t\".got1\",\"aw\""))
 
@@ -490,7 +490,7 @@ extern int dot_symbols;
 #define	ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL)			\
   do									\
     {									\
-      if (!flag_inhibit_size_directive)					\
+      if (!GCC_OPTION (flag_inhibit_size_directive))					\
 	{								\
 	  fputs ("\t.size\t", (FILE));					\
 	  if (TARGET_64BIT && DOT_SYMBOLS)				\
@@ -525,9 +525,9 @@ extern int dot_symbols;
 	   && ((TARGET_64BIT						\
 		&& (TARGET_MINIMAL_TOC					\
 		    || (SCALAR_FLOAT_MODE_P (GET_MODE (X))		\
-			&& ! TARGET_NO_FP_IN_TOC)))			\
+			&& ! GCC_OPTION (TARGET_NO_FP_IN_TOC))))			\
 	       || (!TARGET_64BIT					\
-		   && !TARGET_NO_FP_IN_TOC				\
+		   && !GCC_OPTION (TARGET_NO_FP_IN_TOC)				\
 		   && !TARGET_RELOCATABLE				\
 		   && SCALAR_FLOAT_MODE_P (GET_MODE (X))		\
 		   && BITS_PER_WORD == HOST_BITS_PER_INT)))))
@@ -537,7 +537,7 @@ extern int dot_symbols;
    true if the symbol may be affected by dynamic relocations.  */
 #undef	ASM_PREFERRED_EH_DATA_FORMAT
 #define	ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
-  ((TARGET_64BIT || flag_pic || TARGET_RELOCATABLE)			\
+  ((TARGET_64BIT || GCC_OPTION (flag_pic) || TARGET_RELOCATABLE)			\
    ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel		\
       | (TARGET_64BIT ? DW_EH_PE_udata8 : DW_EH_PE_sdata4))		\
    : DW_EH_PE_absptr)
diff --git a/gcc/config/rs6000/linuxaltivec.h b/gcc/config/rs6000/linuxaltivec.h
index ebd03c9..eef7264 100644
--- a/gcc/config/rs6000/linuxaltivec.h
+++ b/gcc/config/rs6000/linuxaltivec.h
@@ -29,4 +29,4 @@
 #endif
 
 #undef  SUBSUBTARGET_OVERRIDE_OPTIONS
-#define SUBSUBTARGET_OVERRIDE_OPTIONS rs6000_altivec_abi = 1
+#define SUBSUBTARGET_OVERRIDE_OPTIONS GCC_OPTION (rs6000_altivec_abi) = 1
diff --git a/gcc/config/rs6000/paired.md b/gcc/config/rs6000/paired.md
index 7a0ed22..5a54455 100644
--- a/gcc/config/rs6000/paired.md
+++ b/gcc/config/rs6000/paired.md
@@ -81,7 +81,7 @@
 (define_insn "resv2sf2"
   [(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
 	(unspec:V2SF [(match_operand:V2SF 1 "gpc_reg_operand" "f")] UNSPEC_FRES))]
-  "TARGET_PAIRED_FLOAT && flag_finite_math_only"
+  "TARGET_PAIRED_FLOAT && GCC_OPTION (flag_finite_math_only)"
   "ps_res %0,%1"
   [(set_attr "type" "fp")])
 
@@ -478,7 +478,7 @@
                           (match_operand:V2SF 5 "gpc_reg_operand" "f")])
          (match_operand:V2SF 1 "gpc_reg_operand" "f")
          (match_operand:V2SF 2 "gpc_reg_operand" "f")))]
-  "TARGET_PAIRED_FLOAT && flag_unsafe_math_optimizations"
+  "TARGET_PAIRED_FLOAT && GCC_OPTION (flag_unsafe_math_optimizations)"
 {
   if (paired_emit_vector_cond_expr (operands[0], operands[1], operands[2],
                                     operands[3], operands[4], operands[5]))
diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md
index 7b1121d..b8a6a3f 100644
--- a/gcc/config/rs6000/predicates.md
+++ b/gcc/config/rs6000/predicates.md
@@ -331,7 +331,7 @@
   if (REGNO (op) > LAST_VIRTUAL_REGISTER)
     return 1;
 
-  if (rs6000_gen_cell_microcode)
+  if (GCC_OPTION (rs6000_gen_cell_microcode))
     return CR_REGNO_NOT_CR0_P (REGNO (op));
   else
     return CR_REGNO_P (REGNO (op));
@@ -441,7 +441,7 @@
     return 0;
 
   /* If we are using V.4 style PIC, consider all constants to be hard.  */
-  if (flag_pic && DEFAULT_ABI == ABI_V4)
+  if (GCC_OPTION (flag_pic) && DEFAULT_ABI == ABI_V4)
     return 0;
 
 #ifdef TARGET_RELOCATABLE
@@ -477,7 +477,7 @@
 	 to regenerate the division.  */
       if (TARGET_E500_DOUBLE
           || (!reload_in_progress && !reload_completed
-	      && !flag_unsafe_math_optimizations))
+	      && !GCC_OPTION (flag_unsafe_math_optimizations)))
         return 0;
 
       REAL_VALUE_FROM_CONST_DOUBLE (rv, op);
@@ -497,7 +497,7 @@
 	 because RDIV division to reciprocal optimization is not able
 	 to regenerate the division.  */
       if (!reload_in_progress && !reload_completed
-          && !flag_unsafe_math_optimizations)
+          && !GCC_OPTION (flag_unsafe_math_optimizations))
 	return 0;
 
       REAL_VALUE_FROM_CONST_DOUBLE (rv, op);
@@ -663,7 +663,7 @@
 	}
     }
 
-  if (TARGET_DEBUG_ADDR)
+  if (GCC_OPTION (TARGET_DEBUG_ADDR))
     {
       fprintf (stderr, "\nquad_memory_operand, ret = %s\n", ret ? "true" : "false");
       debug_rtx (op);
@@ -1176,7 +1176,7 @@
 ;; the unordered-quiet FP comparison predicates modulo a reversal.
 (define_predicate "rs6000_cbranch_operator"
   (if_then_else (match_test "TARGET_HARD_FLOAT && !TARGET_FPRS")
-		(if_then_else (match_test "flag_trapping_math")
+		(if_then_else (match_test "GCC_OPTION (flag_trapping_math)")
 			      (match_operand 0 "ordered_comparison_operator")
 			      (ior (match_operand 0 "ordered_comparison_operator")
 				   (match_code ("unlt,unle,ungt,unge"))))
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c
index 0f1dafc..0d2a722 100644
--- a/gcc/config/rs6000/rs6000-c.c
+++ b/gcc/config/rs6000/rs6000-c.c
@@ -74,7 +74,7 @@ rs6000_pragma_longcall (cpp_reader *pfile ATTRIBUTE_UNUSED)
   if (pragma_lex (&x) != CPP_EOF)
     warning (OPT_Wpragmas, "junk at end of #pragma longcall");
 
-  rs6000_default_long_calls = (n == integer_one_node);
+  GCC_OPTION (rs6000_default_long_calls) = (n == integer_one_node);
 }
 
 /* Handle defining many CPP flags based on TARGET_xxx.  As a general
@@ -376,7 +376,7 @@ void
 rs6000_cpu_cpp_builtins (cpp_reader *pfile)
 {
   /* Define all of the common macros.  */
-  rs6000_target_modify_macros (true, rs6000_isa_flags,
+  rs6000_target_modify_macros (true, GCC_OPTION (rs6000_isa_flags),
 			       rs6000_builtin_mask_calculate ());
 
   if (TARGET_FRE)
@@ -411,7 +411,7 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfile)
       ||(TARGET_HARD_FLOAT && TARGET_FPRS && !TARGET_DOUBLE_FLOAT))
     builtin_define ("_SOFT_DOUBLE");
   /* Used by lwarx/stwcx. errata work-around.  */
-  if (rs6000_cpu == PROCESSOR_PPC405)
+  if (GCC_OPTION (rs6000_cpu) == PROCESSOR_PPC405)
     builtin_define ("__PPC405__");
   /* Used by libstdc++.  */
   if (TARGET_NO_LWSYNC)
@@ -476,7 +476,7 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfile)
       break;
     }
 
-  switch (rs6000_current_abi)
+  switch (GCC_OPTION (rs6000_current_abi))
     {
     case ABI_V4:
       builtin_define ("_CALL_SYSV");
@@ -502,25 +502,25 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfile)
 
   /* Whether aggregates passed by value are aligned to a 16 byte boundary
      if their alignment is 16 bytes or larger.  */
-  if ((TARGET_MACHO && rs6000_darwin64_abi)
+  if ((TARGET_MACHO && GCC_OPTION (rs6000_darwin64_abi))
       || DEFAULT_ABI == ABI_ELFv2
-      || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
+      || (DEFAULT_ABI == ABI_AIX && !GCC_OPTION (rs6000_compat_align_parm)))
     builtin_define ("__STRUCT_PARM_ALIGN__=16");
 
   /* Generate defines for Xilinx FPU. */
-  if (rs6000_xilinx_fpu) 
+  if (GCC_OPTION (rs6000_xilinx_fpu)) 
     {
       builtin_define ("_XFPU");
-      if (rs6000_single_float && ! rs6000_double_float)
+      if (GCC_OPTION (rs6000_single_float) && ! GCC_OPTION (rs6000_double_float))
 	{
-	  if (rs6000_simple_fpu) 
+	  if (GCC_OPTION (rs6000_simple_fpu)) 
 	    builtin_define ("_XFPU_SP_LITE"); 
 	  else 
 	    builtin_define ("_XFPU_SP_FULL");
 	}
-      if (rs6000_double_float)
+      if (GCC_OPTION (rs6000_double_float))
 	{
-	  if (rs6000_simple_fpu) 
+	  if (GCC_OPTION (rs6000_simple_fpu)) 
 	    builtin_define ("_XFPU_DP_LITE");
 	  else
 	    builtin_define ("_XFPU_DP_FULL");
@@ -4286,7 +4286,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
       /* If we are targeting little-endian, but -maltivec=be has been
 	 specified to override the element order, adjust the element
 	 number accordingly.  */
-      if (!BYTES_BIG_ENDIAN && rs6000_altivec_element_order == 2)
+      if (!BYTES_BIG_ENDIAN && GCC_OPTION (rs6000_altivec_element_order) == 2)
 	{
 	  unsigned int last_elem = TYPE_VECTOR_SUBPARTS (arg1_type) - 1;
 	  arg2 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (arg2),
@@ -4391,7 +4391,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
       /* If we are targeting little-endian, but -maltivec=be has been
 	 specified to override the element order, adjust the element
 	 number accordingly.  */
-      if (!BYTES_BIG_ENDIAN && rs6000_altivec_element_order == 2)
+      if (!BYTES_BIG_ENDIAN && GCC_OPTION (rs6000_altivec_element_order) == 2)
 	{
 	  unsigned int last_elem = TYPE_VECTOR_SUBPARTS (arg1_type) - 1;
 	  arg2 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (arg2),
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 036a2af..14f8c18 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1723,8 +1723,8 @@ rs6000_hard_regno_mode_ok (int regno, enum machine_mode mode)
      asked for it.  */
   if (TARGET_VSX && VSX_REGNO_P (regno)
       && (VECTOR_MEM_VSX_P (mode)
-	  || (TARGET_VSX_SCALAR_FLOAT && mode == SFmode)
-	  || (TARGET_VSX_SCALAR_DOUBLE && (mode == DFmode || mode == DImode))
+	  || (GCC_OPTION (TARGET_VSX_SCALAR_FLOAT) && mode == SFmode)
+	  || (GCC_OPTION (TARGET_VSX_SCALAR_DOUBLE) && (mode == DFmode || mode == DImode))
 	  || (TARGET_VSX_TIMODE && mode == TImode)
 	  || (TARGET_VADDUQM && mode == V1TImode)))
     {
@@ -2106,9 +2106,9 @@ rs6000_debug_reg_global (void)
   if (nl)
     fputs (nl, stderr);
 
-  if (rs6000_recip_control)
+  if (GCC_OPTION (rs6000_recip_control))
     {
-      fprintf (stderr, "\nReciprocal mask = 0x%x\n", rs6000_recip_control);
+      fprintf (stderr, "\nReciprocal mask = 0x%x\n", GCC_OPTION (rs6000_recip_control));
 
       for (m = 0; m < NUM_MACHINE_MODES; ++m)
 	if (rs6000_recip_bits[m])
@@ -2127,11 +2127,11 @@ rs6000_debug_reg_global (void)
       fputs ("\n", stderr);
     }
 
-  if (rs6000_cpu_index >= 0)
+  if (GCC_OPTION (rs6000_cpu_index) >= 0)
     {
-      const char *name = processor_target_table[rs6000_cpu_index].name;
+      const char *name = processor_target_table[GCC_OPTION (rs6000_cpu_index)].name;
       HOST_WIDE_INT flags
-	= processor_target_table[rs6000_cpu_index].target_enable;
+	= processor_target_table[GCC_OPTION (rs6000_cpu_index)].target_enable;
 
       sprintf (flags_buffer, "-mcpu=%s flags", name);
       rs6000_print_isa_options (stderr, 0, flags_buffer, flags);
@@ -2139,11 +2139,11 @@ rs6000_debug_reg_global (void)
   else
     fprintf (stderr, DEBUG_FMT_S, "cpu", "<none>");
 
-  if (rs6000_tune_index >= 0)
+  if (GCC_OPTION (rs6000_tune_index) >= 0)
     {
-      const char *name = processor_target_table[rs6000_tune_index].name;
+      const char *name = processor_target_table[GCC_OPTION (rs6000_tune_index)].name;
       HOST_WIDE_INT flags
-	= processor_target_table[rs6000_tune_index].target_enable;
+	= processor_target_table[GCC_OPTION (rs6000_tune_index)].target_enable;
 
       sprintf (flags_buffer, "-mtune=%s flags", name);
       rs6000_print_isa_options (stderr, 0, flags_buffer, flags);
@@ -2153,20 +2153,20 @@ rs6000_debug_reg_global (void)
 
   cl_target_option_save (&cl_opts, &global_options);
   rs6000_print_isa_options (stderr, 0, "rs6000_isa_flags",
-			    rs6000_isa_flags);
+			    GCC_OPTION (rs6000_isa_flags));
 
   rs6000_print_isa_options (stderr, 0, "rs6000_isa_flags_explicit",
-			    rs6000_isa_flags_explicit);
+			    GCC_OPTION (rs6000_isa_flags_explicit));
 
   rs6000_print_builtin_options (stderr, 0, "rs6000_builtin_mask",
-				rs6000_builtin_mask);
+				GCC_OPTION (rs6000_builtin_mask));
 
   rs6000_print_isa_options (stderr, 0, "TARGET_DEFAULT", TARGET_DEFAULT);
 
   fprintf (stderr, DEBUG_FMT_S, "--with-cpu default",
 	   OPTION_TARGET_CPU_DEFAULT ? OPTION_TARGET_CPU_DEFAULT : "<none>");
 
-  switch (rs6000_sched_costly_dep)
+  switch (GCC_OPTION (rs6000_sched_costly_dep))
     {
     case max_dep_latency:
       costly_str = "max_dep_latency";
@@ -2190,13 +2190,13 @@ rs6000_debug_reg_global (void)
 
     default:
       costly_str = costly_num;
-      sprintf (costly_num, "%d", (int)rs6000_sched_costly_dep);
+      sprintf (costly_num, "%d", (int)GCC_OPTION (rs6000_sched_costly_dep));
       break;
     }
 
   fprintf (stderr, DEBUG_FMT_S, "sched_costly_dep", costly_str);
 
-  switch (rs6000_sched_insert_nops)
+  switch (GCC_OPTION (rs6000_sched_insert_nops))
     {
     case sched_finish_regroup_exact:
       nop_str = "sched_finish_regroup_exact";
@@ -2212,13 +2212,13 @@ rs6000_debug_reg_global (void)
 
     default:
       nop_str = nop_num;
-      sprintf (nop_num, "%d", (int)rs6000_sched_insert_nops);
+      sprintf (nop_num, "%d", (int)GCC_OPTION (rs6000_sched_insert_nops));
       break;
     }
 
   fprintf (stderr, DEBUG_FMT_S, "sched_insert_nops", nop_str);
 
-  switch (rs6000_sdata)
+  switch (GCC_OPTION (rs6000_sdata))
     {
     default:
     case SDATA_NONE:
@@ -2238,7 +2238,7 @@ rs6000_debug_reg_global (void)
 
     }
 
-  switch (rs6000_traceback)
+  switch (GCC_OPTION (rs6000_traceback))
     {
     case traceback_default:	trace_str = "default";	break;
     case traceback_none:	trace_str = "none";	break;
@@ -2249,7 +2249,7 @@ rs6000_debug_reg_global (void)
 
   fprintf (stderr, DEBUG_FMT_S, "traceback", trace_str);
 
-  switch (rs6000_current_cmodel)
+  switch (GCC_OPTION (rs6000_current_cmodel))
     {
     case CMODEL_SMALL:	cmodel_str = "small";	break;
     case CMODEL_MEDIUM:	cmodel_str = "medium";	break;
@@ -2259,7 +2259,7 @@ rs6000_debug_reg_global (void)
 
   fprintf (stderr, DEBUG_FMT_S, "cmodel", cmodel_str);
 
-  switch (rs6000_current_abi)
+  switch (GCC_OPTION (rs6000_current_abi))
     {
     case ABI_NONE:	abi_str = "none";	break;
     case ABI_AIX:	abi_str = "aix";	break;
@@ -2271,16 +2271,16 @@ rs6000_debug_reg_global (void)
 
   fprintf (stderr, DEBUG_FMT_S, "abi", abi_str);
 
-  if (rs6000_altivec_abi)
+  if (GCC_OPTION (rs6000_altivec_abi))
     fprintf (stderr, DEBUG_FMT_S, "altivec_abi", "true");
 
-  if (rs6000_spe_abi)
+  if (GCC_OPTION (rs6000_spe_abi))
     fprintf (stderr, DEBUG_FMT_S, "spe_abi", "true");
 
-  if (rs6000_darwin64_abi)
+  if (GCC_OPTION (rs6000_darwin64_abi))
     fprintf (stderr, DEBUG_FMT_S, "darwin64_abi", "true");
 
-  if (rs6000_float_gprs)
+  if (GCC_OPTION (rs6000_float_gprs))
     fprintf (stderr, DEBUG_FMT_S, "float_gprs", "true");
 
   if (TARGET_LINK_STACK)
@@ -2296,16 +2296,16 @@ rs6000_debug_reg_global (void)
   fprintf (stderr, DEBUG_FMT_S, "plt-format",
 	   TARGET_SECURE_PLT ? "secure" : "bss");
   fprintf (stderr, DEBUG_FMT_S, "struct-return",
-	   aix_struct_return ? "aix" : "sysv");
-  fprintf (stderr, DEBUG_FMT_S, "always_hint", tf[!!rs6000_always_hint]);
-  fprintf (stderr, DEBUG_FMT_S, "sched_groups", tf[!!rs6000_sched_groups]);
+	   GCC_OPTION (aix_struct_return) ? "aix" : "sysv");
+  fprintf (stderr, DEBUG_FMT_S, "always_hint", tf[!!GCC_OPTION (rs6000_always_hint)]);
+  fprintf (stderr, DEBUG_FMT_S, "sched_groups", tf[!!GCC_OPTION (rs6000_sched_groups)]);
   fprintf (stderr, DEBUG_FMT_S, "align_branch",
-	   tf[!!rs6000_align_branch_targets]);
-  fprintf (stderr, DEBUG_FMT_D, "tls_size", rs6000_tls_size);
+	   tf[!!GCC_OPTION (rs6000_align_branch_targets)]);
+  fprintf (stderr, DEBUG_FMT_D, "tls_size", GCC_OPTION (rs6000_tls_size));
   fprintf (stderr, DEBUG_FMT_D, "long_double_size",
-	   rs6000_long_double_type_size);
+	   GCC_OPTION (rs6000_long_double_type_size));
   fprintf (stderr, DEBUG_FMT_D, "sched_restricted_insns_priority",
-	   (int)rs6000_sched_restricted_insns_priority);
+	   (int)GCC_OPTION (rs6000_sched_restricted_insns_priority));
   fprintf (stderr, DEBUG_FMT_D, "Number of standard builtins",
 	   (int)END_BUILTINS);
   fprintf (stderr, DEBUG_FMT_D, "Number of rs6000 builtins",
@@ -2491,7 +2491,7 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p)
 
   /* The VSX hardware allows native alignment for vectors, but control whether the compiler
      believes it can use native alignment or still uses 128-bit alignment.  */
-  if (TARGET_VSX && !TARGET_VSX_ALIGN_128)
+  if (TARGET_VSX && !GCC_OPTION (TARGET_VSX_ALIGN_128))
     {
       align64 = 64;
       align32 = 32;
@@ -2565,7 +2565,7 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p)
     }
 
   /* DFmode, see if we want to use the VSX unit.  */
-  if (TARGET_VSX && TARGET_VSX_SCALAR_DOUBLE)
+  if (TARGET_VSX && GCC_OPTION (TARGET_VSX_SCALAR_DOUBLE))
     {
       rs6000_vector_unit[DFmode] = VECTOR_VSX;
       rs6000_vector_mem[DFmode]
@@ -2850,46 +2850,46 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p)
   if (VECTOR_UNIT_VSX_P (V2DFmode))
     rs6000_recip_bits[V2DFmode] |= RS6000_RECIP_MASK_HAVE_RSQRTE;
 
-  if (rs6000_recip_control)
+  if (GCC_OPTION (rs6000_recip_control))
     {
-      if (!flag_finite_math_only)
+      if (!GCC_OPTION (flag_finite_math_only))
 	warning (0, "-mrecip requires -ffinite-math or -ffast-math");
-      if (flag_trapping_math)
+      if (GCC_OPTION (flag_trapping_math))
 	warning (0, "-mrecip requires -fno-trapping-math or -ffast-math");
-      if (!flag_reciprocal_math)
+      if (!GCC_OPTION (flag_reciprocal_math))
 	warning (0, "-mrecip requires -freciprocal-math or -ffast-math");
-      if (flag_finite_math_only && !flag_trapping_math && flag_reciprocal_math)
+      if (GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math) && GCC_OPTION (flag_reciprocal_math))
 	{
 	  if (RS6000_RECIP_HAVE_RE_P (SFmode)
-	      && (rs6000_recip_control & RECIP_SF_DIV) != 0)
+	      && (GCC_OPTION (rs6000_recip_control) & RECIP_SF_DIV) != 0)
 	    rs6000_recip_bits[SFmode] |= RS6000_RECIP_MASK_AUTO_RE;
 
 	  if (RS6000_RECIP_HAVE_RE_P (DFmode)
-	      && (rs6000_recip_control & RECIP_DF_DIV) != 0)
+	      && (GCC_OPTION (rs6000_recip_control) & RECIP_DF_DIV) != 0)
 	    rs6000_recip_bits[DFmode] |= RS6000_RECIP_MASK_AUTO_RE;
 
 	  if (RS6000_RECIP_HAVE_RE_P (V4SFmode)
-	      && (rs6000_recip_control & RECIP_V4SF_DIV) != 0)
+	      && (GCC_OPTION (rs6000_recip_control) & RECIP_V4SF_DIV) != 0)
 	    rs6000_recip_bits[V4SFmode] |= RS6000_RECIP_MASK_AUTO_RE;
 
 	  if (RS6000_RECIP_HAVE_RE_P (V2DFmode)
-	      && (rs6000_recip_control & RECIP_V2DF_DIV) != 0)
+	      && (GCC_OPTION (rs6000_recip_control) & RECIP_V2DF_DIV) != 0)
 	    rs6000_recip_bits[V2DFmode] |= RS6000_RECIP_MASK_AUTO_RE;
 
 	  if (RS6000_RECIP_HAVE_RSQRTE_P (SFmode)
-	      && (rs6000_recip_control & RECIP_SF_RSQRT) != 0)
+	      && (GCC_OPTION (rs6000_recip_control) & RECIP_SF_RSQRT) != 0)
 	    rs6000_recip_bits[SFmode] |= RS6000_RECIP_MASK_AUTO_RSQRTE;
 
 	  if (RS6000_RECIP_HAVE_RSQRTE_P (DFmode)
-	      && (rs6000_recip_control & RECIP_DF_RSQRT) != 0)
+	      && (GCC_OPTION (rs6000_recip_control) & RECIP_DF_RSQRT) != 0)
 	    rs6000_recip_bits[DFmode] |= RS6000_RECIP_MASK_AUTO_RSQRTE;
 
 	  if (RS6000_RECIP_HAVE_RSQRTE_P (V4SFmode)
-	      && (rs6000_recip_control & RECIP_V4SF_RSQRT) != 0)
+	      && (GCC_OPTION (rs6000_recip_control) & RECIP_V4SF_RSQRT) != 0)
 	    rs6000_recip_bits[V4SFmode] |= RS6000_RECIP_MASK_AUTO_RSQRTE;
 
 	  if (RS6000_RECIP_HAVE_RSQRTE_P (V2DFmode)
-	      && (rs6000_recip_control & RECIP_V2DF_RSQRT) != 0)
+	      && (GCC_OPTION (rs6000_recip_control) & RECIP_V2DF_RSQRT) != 0)
 	    rs6000_recip_bits[V2DFmode] |= RS6000_RECIP_MASK_AUTO_RSQRTE;
 	}
     }
@@ -2946,42 +2946,42 @@ darwin_rs6000_override_options (void)
 {
   /* The Darwin ABI always includes AltiVec, can't be (validly) turned
      off.  */
-  rs6000_altivec_abi = 1;
-  TARGET_ALTIVEC_VRSAVE = 1;
-  rs6000_current_abi = ABI_DARWIN;
+  GCC_OPTION (rs6000_altivec_abi) = 1;
+  GCC_OPTION (TARGET_ALTIVEC_VRSAVE) = 1;
+  GCC_OPTION (rs6000_current_abi) = ABI_DARWIN;
 
   if (DEFAULT_ABI == ABI_DARWIN
       && TARGET_64BIT)
-      darwin_one_byte_bool = 1;
+      GCC_OPTION (darwin_one_byte_bool) = 1;
 
   if (TARGET_64BIT && ! TARGET_POWERPC64)
     {
-      rs6000_isa_flags |= OPTION_MASK_POWERPC64;
+      GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_POWERPC64;
       warning (0, "-m64 requires PowerPC64 architecture, enabling");
     }
-  if (flag_mkernel)
+  if (GCC_OPTION (flag_mkernel))
     {
-      rs6000_default_long_calls = 1;
-      rs6000_isa_flags |= OPTION_MASK_SOFT_FLOAT;
+      GCC_OPTION (rs6000_default_long_calls) = 1;
+      GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_SOFT_FLOAT;
     }
 
   /* Make -m64 imply -maltivec.  Darwin's 64-bit ABI includes
      Altivec.  */
-  if (!flag_mkernel && !flag_apple_kext
+  if (!GCC_OPTION (flag_mkernel) && !GCC_OPTION (flag_apple_kext)
       && TARGET_64BIT
-      && ! (rs6000_isa_flags_explicit & OPTION_MASK_ALTIVEC))
-    rs6000_isa_flags |= OPTION_MASK_ALTIVEC;
+      && ! (GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_ALTIVEC))
+    GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_ALTIVEC;
 
   /* Unless the user (not the configurer) has explicitly overridden
      it with -mcpu=G3 or -mno-altivec, then 10.5+ targets default to
      G4 unless targeting the kernel.  */
-  if (!flag_mkernel
-      && !flag_apple_kext
-      && strverscmp (darwin_macosx_version_min, "10.5") >= 0
-      && ! (rs6000_isa_flags_explicit & OPTION_MASK_ALTIVEC)
+  if (!GCC_OPTION (flag_mkernel)
+      && !GCC_OPTION (flag_apple_kext)
+      && strverscmp (GCC_OPTION (darwin_macosx_version_min), "10.5") >= 0
+      && ! (GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_ALTIVEC)
       && ! global_options_set.x_rs6000_cpu_index)
     {
-      rs6000_isa_flags |= OPTION_MASK_ALTIVEC;
+      GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_ALTIVEC;
     }
 }
 #endif
@@ -3010,7 +3010,7 @@ rs6000_builtin_mask_calculate (void)
 	  | ((TARGET_FRSQRTE)		    ? RS6000_BTM_FRSQRTE   : 0)
 	  | ((TARGET_FRSQRTES)		    ? RS6000_BTM_FRSQRTES  : 0)
 	  | ((TARGET_POPCNTD)		    ? RS6000_BTM_POPCNTD   : 0)
-	  | ((rs6000_cpu == PROCESSOR_CELL) ? RS6000_BTM_CELL      : 0)
+	  | ((GCC_OPTION (rs6000_cpu) == PROCESSOR_CELL) ? RS6000_BTM_CELL      : 0)
 	  | ((TARGET_P8_VECTOR)		    ? RS6000_BTM_P8_VECTOR : 0)
 	  | ((TARGET_CRYPTO)		    ? RS6000_BTM_CRYPTO	   : 0)
 	  | ((TARGET_HTM)		    ? RS6000_BTM_HTM	   : 0));
@@ -3037,14 +3037,14 @@ rs6000_option_override_internal (bool global_init_p)
 
   /* Remember the explicit arguments.  */
   if (global_init_p)
-    rs6000_isa_flags_explicit = global_options_set.x_rs6000_isa_flags;
+    GCC_OPTION (rs6000_isa_flags_explicit) = global_options_set.x_rs6000_isa_flags;
 
   /* On 64-bit Darwin, power alignment is ABI-incompatible with some C
      library functions, so warn about it. The flag may be useful for
      performance studies from time to time though, so don't disable it
      entirely.  */
   if (global_options_set.x_rs6000_alignment_flags
-      && rs6000_alignment_flags == MASK_ALIGN_POWER
+      && GCC_OPTION (rs6000_alignment_flags) == MASK_ALIGN_POWER
       && DEFAULT_ABI == ABI_DARWIN
       && TARGET_64BIT)
     warning (0, "-malign-power is not supported for 64-bit Darwin;"
@@ -3054,9 +3054,9 @@ rs6000_option_override_internal (bool global_init_p)
      calculation works better for RTL loop invariant motion on targets
      with enough (>= 32) registers.  It is an expensive optimization.
      So it is on only for peak performance.  */
-  if (optimize >= 3 && global_init_p
+  if (GCC_OPTION (optimize) >= 3 && global_init_p
       && !global_options_set.x_flag_ira_loop_pressure)
-    flag_ira_loop_pressure = 1;
+    GCC_OPTION (flag_ira_loop_pressure) = 1;
 
   /* Set the pointer size.  */
   if (TARGET_64BIT)
@@ -3087,32 +3087,32 @@ rs6000_option_override_internal (bool global_init_p)
 #endif
 
   /* Don't override by the processor default if given explicitly.  */
-  set_masks &= ~rs6000_isa_flags_explicit;
+  set_masks &= ~GCC_OPTION (rs6000_isa_flags_explicit);
 
   /* Process the -mcpu=<xxx> and -mtune=<xxx> argument.  If the user changed
      the cpu in a target attribute or pragma, but did not specify a tuning
      option, use the cpu for the tuning option rather than the option specified
      with -mtune on the command line.  Process a '--with-cpu' configuration
      request as an implicit --cpu.  */
-  if (rs6000_cpu_index >= 0)
+  if (GCC_OPTION (rs6000_cpu_index) >= 0)
     {
-      cpu_index = rs6000_cpu_index;
+      cpu_index = GCC_OPTION (rs6000_cpu_index);
       have_cpu = true;
     }
   else if (main_target_opt != NULL && main_target_opt->x_rs6000_cpu_index >= 0)
     {
-      rs6000_cpu_index = cpu_index = main_target_opt->x_rs6000_cpu_index;
+      GCC_OPTION (rs6000_cpu_index) = cpu_index = main_target_opt->x_rs6000_cpu_index;
       have_cpu = true;
     }
   else if (implicit_cpu)
     {
-      rs6000_cpu_index = cpu_index = rs6000_cpu_name_lookup (implicit_cpu);
+      GCC_OPTION (rs6000_cpu_index) = cpu_index = rs6000_cpu_name_lookup (implicit_cpu);
       have_cpu = true;
     }
   else
     {
       const char *default_cpu = (TARGET_POWERPC64 ? "powerpc64" : "powerpc");
-      rs6000_cpu_index = cpu_index = rs6000_cpu_name_lookup (default_cpu);
+      GCC_OPTION (rs6000_cpu_index) = cpu_index = rs6000_cpu_name_lookup (default_cpu);
       have_cpu = false;
     }
 
@@ -3125,25 +3125,25 @@ rs6000_option_override_internal (bool global_init_p)
      TARGET_DEFAULT.  */
   if (have_cpu)
     {
-      rs6000_isa_flags &= ~set_masks;
-      rs6000_isa_flags |= (processor_target_table[cpu_index].target_enable
+      GCC_OPTION (rs6000_isa_flags) &= ~set_masks;
+      GCC_OPTION (rs6000_isa_flags) |= (processor_target_table[cpu_index].target_enable
 			   & set_masks);
     }
   else
-    rs6000_isa_flags |= (processor_target_table[cpu_index].target_enable
-			 & ~rs6000_isa_flags_explicit);
+    GCC_OPTION (rs6000_isa_flags) |= (processor_target_table[cpu_index].target_enable
+			 & ~GCC_OPTION (rs6000_isa_flags_explicit));
 
   /* If no -mcpu=<xxx>, inherit any default options that were cleared via
      POWERPC_MASKS.  Originally, TARGET_DEFAULT was used to initialize
      target_flags via the TARGET_DEFAULT_TARGET_FLAGS hook.  When we switched
      to using rs6000_isa_flags, we need to do the initialization here.  */
   if (!have_cpu)
-    rs6000_isa_flags |= (TARGET_DEFAULT & ~rs6000_isa_flags_explicit);
+    GCC_OPTION (rs6000_isa_flags) |= (TARGET_DEFAULT & ~GCC_OPTION (rs6000_isa_flags_explicit));
 
-  if (rs6000_tune_index >= 0)
-    tune_index = rs6000_tune_index;
+  if (GCC_OPTION (rs6000_tune_index) >= 0)
+    tune_index = GCC_OPTION (rs6000_tune_index);
   else if (have_cpu)
-    rs6000_tune_index = tune_index = cpu_index;
+    GCC_OPTION (rs6000_tune_index) = tune_index = cpu_index;
   else
     {
       size_t i;
@@ -3154,60 +3154,60 @@ rs6000_option_override_internal (bool global_init_p)
       for (i = 0; i < ARRAY_SIZE (processor_target_table); i++)
 	if (processor_target_table[i].processor == tune_proc)
 	  {
-	    rs6000_tune_index = tune_index = i;
+	    GCC_OPTION (rs6000_tune_index) = tune_index = i;
 	    break;
 	  }
     }
 
   gcc_assert (tune_index >= 0);
-  rs6000_cpu = processor_target_table[tune_index].processor;
+  GCC_OPTION (rs6000_cpu) = processor_target_table[tune_index].processor;
 
   /* Pick defaults for SPE related control flags.  Do this early to make sure
      that the TARGET_ macros are representative ASAP.  */
   {
     int spe_capable_cpu =
-      (rs6000_cpu == PROCESSOR_PPC8540
-       || rs6000_cpu == PROCESSOR_PPC8548);
+      (GCC_OPTION (rs6000_cpu) == PROCESSOR_PPC8540
+       || GCC_OPTION (rs6000_cpu) == PROCESSOR_PPC8548);
 
     if (!global_options_set.x_rs6000_spe_abi)
-      rs6000_spe_abi = spe_capable_cpu;
+      GCC_OPTION (rs6000_spe_abi) = spe_capable_cpu;
 
     if (!global_options_set.x_rs6000_spe)
-      rs6000_spe = spe_capable_cpu;
+      GCC_OPTION (rs6000_spe) = spe_capable_cpu;
 
     if (!global_options_set.x_rs6000_float_gprs)
-      rs6000_float_gprs =
-        (rs6000_cpu == PROCESSOR_PPC8540 ? 1
-         : rs6000_cpu == PROCESSOR_PPC8548 ? 2
+      GCC_OPTION (rs6000_float_gprs) =
+        (GCC_OPTION (rs6000_cpu) == PROCESSOR_PPC8540 ? 1
+         : GCC_OPTION (rs6000_cpu) == PROCESSOR_PPC8548 ? 2
          : 0);
   }
 
   if (global_options_set.x_rs6000_spe_abi
-      && rs6000_spe_abi
+      && GCC_OPTION (rs6000_spe_abi)
       && !TARGET_SPE_ABI)
     error ("not configured for SPE ABI");
 
   if (global_options_set.x_rs6000_spe
-      && rs6000_spe
+      && GCC_OPTION (rs6000_spe)
       && !TARGET_SPE)
     error ("not configured for SPE instruction set");
 
   if (main_target_opt != NULL
-      && ((main_target_opt->x_rs6000_spe_abi != rs6000_spe_abi)
-          || (main_target_opt->x_rs6000_spe != rs6000_spe)
-          || (main_target_opt->x_rs6000_float_gprs != rs6000_float_gprs)))
+      && ((main_target_opt->x_rs6000_spe_abi != GCC_OPTION (rs6000_spe_abi))
+          || (main_target_opt->x_rs6000_spe != GCC_OPTION (rs6000_spe))
+          || (main_target_opt->x_rs6000_float_gprs != GCC_OPTION (rs6000_float_gprs))))
     error ("target attribute or pragma changes SPE ABI");
 
-  if (rs6000_cpu == PROCESSOR_PPCE300C2 || rs6000_cpu == PROCESSOR_PPCE300C3
-      || rs6000_cpu == PROCESSOR_PPCE500MC || rs6000_cpu == PROCESSOR_PPCE500MC64
-      || rs6000_cpu == PROCESSOR_PPCE5500)
+  if (GCC_OPTION (rs6000_cpu) == PROCESSOR_PPCE300C2 || GCC_OPTION (rs6000_cpu) == PROCESSOR_PPCE300C3
+      || GCC_OPTION (rs6000_cpu) == PROCESSOR_PPCE500MC || GCC_OPTION (rs6000_cpu) == PROCESSOR_PPCE500MC64
+      || GCC_OPTION (rs6000_cpu) == PROCESSOR_PPCE5500)
     {
       if (TARGET_ALTIVEC)
 	error ("AltiVec not supported in this target");
       if (TARGET_SPE)
 	error ("SPE not supported in this target");
     }
-  if (rs6000_cpu == PROCESSOR_PPCE6500)
+  if (GCC_OPTION (rs6000_cpu) == PROCESSOR_PPCE6500)
     {
       if (TARGET_SPE)
 	error ("SPE not supported in this target");
@@ -3215,15 +3215,15 @@ rs6000_option_override_internal (bool global_init_p)
 
   /* Disable Cell microcode if we are optimizing for the Cell
      and not optimizing for size.  */
-  if (rs6000_gen_cell_microcode == -1)
-    rs6000_gen_cell_microcode = !(rs6000_cpu == PROCESSOR_CELL
-                                  && !optimize_size);
+  if (GCC_OPTION (rs6000_gen_cell_microcode) == -1)
+    GCC_OPTION (rs6000_gen_cell_microcode) = !(GCC_OPTION (rs6000_cpu) == PROCESSOR_CELL
+                                  && !GCC_OPTION (optimize_size));
 
   /* If we are optimizing big endian systems for space and it's OK to
      use instructions that would be microcoded on the Cell, use the
      load/store multiple and string instructions.  */
-  if (BYTES_BIG_ENDIAN && optimize_size && rs6000_gen_cell_microcode)
-    rs6000_isa_flags |= ~rs6000_isa_flags_explicit & (OPTION_MASK_MULTIPLE
+  if (BYTES_BIG_ENDIAN && GCC_OPTION (optimize_size) && GCC_OPTION (rs6000_gen_cell_microcode))
+    GCC_OPTION (rs6000_isa_flags) |= ~GCC_OPTION (rs6000_isa_flags_explicit) & (OPTION_MASK_MULTIPLE
 						      | OPTION_MASK_STRING);
 
   /* Don't allow -mmultiple or -mstring on little endian systems
@@ -3232,19 +3232,19 @@ rs6000_option_override_internal (bool global_init_p)
      trap.  The 750 does not cause an alignment trap (except when the
      target is unaligned).  */
 
-  if (!BYTES_BIG_ENDIAN && rs6000_cpu != PROCESSOR_PPC750)
+  if (!BYTES_BIG_ENDIAN && GCC_OPTION (rs6000_cpu) != PROCESSOR_PPC750)
     {
       if (TARGET_MULTIPLE)
 	{
-	  rs6000_isa_flags &= ~OPTION_MASK_MULTIPLE;
-	  if ((rs6000_isa_flags_explicit & OPTION_MASK_MULTIPLE) != 0)
+	  GCC_OPTION (rs6000_isa_flags) &= ~OPTION_MASK_MULTIPLE;
+	  if ((GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_MULTIPLE) != 0)
 	    warning (0, "-mmultiple is not supported on little endian systems");
 	}
 
       if (TARGET_STRING)
 	{
-	  rs6000_isa_flags &= ~OPTION_MASK_STRING;
-	  if ((rs6000_isa_flags_explicit & OPTION_MASK_STRING) != 0)
+	  GCC_OPTION (rs6000_isa_flags) &= ~OPTION_MASK_STRING;
+	  if ((GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_STRING) != 0)
 	    warning (0, "-mstring is not supported on little endian systems");
 	}
     }
@@ -3253,18 +3253,18 @@ rs6000_option_override_internal (bool global_init_p)
      Testing for htm matches power8 and later.  */
   if (!BYTES_BIG_ENDIAN
       && !(processor_target_table[tune_index].target_enable & OPTION_MASK_HTM))
-    rs6000_isa_flags |= ~rs6000_isa_flags_explicit & OPTION_MASK_STRICT_ALIGN;
+    GCC_OPTION (rs6000_isa_flags) |= ~GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_STRICT_ALIGN;
 
   /* -maltivec={le,be} implies -maltivec.  */
-  if (rs6000_altivec_element_order != 0)
-    rs6000_isa_flags |= OPTION_MASK_ALTIVEC;
+  if (GCC_OPTION (rs6000_altivec_element_order) != 0)
+    GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_ALTIVEC;
 
   /* Disallow -maltivec=le in big endian mode for now.  This is not
      known to be useful for anyone.  */
-  if (BYTES_BIG_ENDIAN && rs6000_altivec_element_order == 1)
+  if (BYTES_BIG_ENDIAN && GCC_OPTION (rs6000_altivec_element_order) == 1)
     {
       warning (0, N_("-maltivec=le not allowed for big-endian targets"));
-      rs6000_altivec_element_order = 0;
+      GCC_OPTION (rs6000_altivec_element_order) = 0;
     }
 
   /* Add some warnings for VSX.  */
@@ -3274,22 +3274,22 @@ rs6000_option_override_internal (bool global_init_p)
       if (!TARGET_HARD_FLOAT || !TARGET_FPRS
 	  || !TARGET_SINGLE_FLOAT || !TARGET_DOUBLE_FLOAT)
 	{
-	  if (rs6000_isa_flags_explicit & OPTION_MASK_VSX)
+	  if (GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_VSX)
 	    msg = N_("-mvsx requires hardware floating point");
 	  else
 	    {
-	      rs6000_isa_flags &= ~ OPTION_MASK_VSX;
-	      rs6000_isa_flags_explicit |= OPTION_MASK_VSX;
+	      GCC_OPTION (rs6000_isa_flags) &= ~ OPTION_MASK_VSX;
+	      GCC_OPTION (rs6000_isa_flags_explicit) |= OPTION_MASK_VSX;
 	    }
 	}
       else if (TARGET_PAIRED_FLOAT)
 	msg = N_("-mvsx and -mpaired are incompatible");
-      else if (TARGET_AVOID_XFORM > 0)
+      else if (GCC_OPTION (TARGET_AVOID_XFORM) > 0)
 	msg = N_("-mvsx needs indexed addressing");
-      else if (!TARGET_ALTIVEC && (rs6000_isa_flags_explicit
+      else if (!TARGET_ALTIVEC && (GCC_OPTION (rs6000_isa_flags_explicit)
 				   & OPTION_MASK_ALTIVEC))
         {
-	  if (rs6000_isa_flags_explicit & OPTION_MASK_VSX)
+	  if (GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_VSX)
 	    msg = N_("-mvsx and -mno-altivec are incompatible");
 	  else
 	    msg = N_("-mno-altivec disables vsx");
@@ -3298,89 +3298,89 @@ rs6000_option_override_internal (bool global_init_p)
       if (msg)
 	{
 	  warning (0, msg);
-	  rs6000_isa_flags &= ~ OPTION_MASK_VSX;
-	  rs6000_isa_flags_explicit |= OPTION_MASK_VSX;
+	  GCC_OPTION (rs6000_isa_flags) &= ~ OPTION_MASK_VSX;
+	  GCC_OPTION (rs6000_isa_flags_explicit) |= OPTION_MASK_VSX;
 	}
     }
 
   /* If hard-float/altivec/vsx were explicitly turned off then don't allow
      the -mcpu setting to enable options that conflict. */
   if ((!TARGET_HARD_FLOAT || !TARGET_ALTIVEC || !TARGET_VSX)
-      && (rs6000_isa_flags_explicit & (OPTION_MASK_SOFT_FLOAT
+      && (GCC_OPTION (rs6000_isa_flags_explicit) & (OPTION_MASK_SOFT_FLOAT
 				       | OPTION_MASK_ALTIVEC
 				       | OPTION_MASK_VSX)) != 0)
-    rs6000_isa_flags &= ~((OPTION_MASK_P8_VECTOR | OPTION_MASK_CRYPTO
+    GCC_OPTION (rs6000_isa_flags) &= ~((OPTION_MASK_P8_VECTOR | OPTION_MASK_CRYPTO
 			   | OPTION_MASK_DIRECT_MOVE)
-		         & ~rs6000_isa_flags_explicit);
+		         & ~GCC_OPTION (rs6000_isa_flags_explicit));
 
   if (TARGET_DEBUG_REG || TARGET_DEBUG_TARGET)
-    rs6000_print_isa_options (stderr, 0, "before defaults", rs6000_isa_flags);
+    rs6000_print_isa_options (stderr, 0, "before defaults", GCC_OPTION (rs6000_isa_flags));
 
   /* For the newer switches (vsx, dfp, etc.) set some of the older options,
      unless the user explicitly used the -mno-<option> to disable the code.  */
   if (TARGET_P8_VECTOR || TARGET_DIRECT_MOVE || TARGET_CRYPTO)
-    rs6000_isa_flags |= (ISA_2_7_MASKS_SERVER & ~rs6000_isa_flags_explicit);
+    GCC_OPTION (rs6000_isa_flags) |= (ISA_2_7_MASKS_SERVER & ~GCC_OPTION (rs6000_isa_flags_explicit));
   else if (TARGET_VSX)
-    rs6000_isa_flags |= (ISA_2_6_MASKS_SERVER & ~rs6000_isa_flags_explicit);
+    GCC_OPTION (rs6000_isa_flags) |= (ISA_2_6_MASKS_SERVER & ~GCC_OPTION (rs6000_isa_flags_explicit));
   else if (TARGET_POPCNTD)
-    rs6000_isa_flags |= (ISA_2_6_MASKS_EMBEDDED & ~rs6000_isa_flags_explicit);
+    GCC_OPTION (rs6000_isa_flags) |= (ISA_2_6_MASKS_EMBEDDED & ~GCC_OPTION (rs6000_isa_flags_explicit));
   else if (TARGET_DFP)
-    rs6000_isa_flags |= (ISA_2_5_MASKS_SERVER & ~rs6000_isa_flags_explicit);
+    GCC_OPTION (rs6000_isa_flags) |= (ISA_2_5_MASKS_SERVER & ~GCC_OPTION (rs6000_isa_flags_explicit));
   else if (TARGET_CMPB)
-    rs6000_isa_flags |= (ISA_2_5_MASKS_EMBEDDED & ~rs6000_isa_flags_explicit);
+    GCC_OPTION (rs6000_isa_flags) |= (ISA_2_5_MASKS_EMBEDDED & ~GCC_OPTION (rs6000_isa_flags_explicit));
   else if (TARGET_FPRND)
-    rs6000_isa_flags |= (ISA_2_4_MASKS & ~rs6000_isa_flags_explicit);
+    GCC_OPTION (rs6000_isa_flags) |= (ISA_2_4_MASKS & ~GCC_OPTION (rs6000_isa_flags_explicit));
   else if (TARGET_POPCNTB)
-    rs6000_isa_flags |= (ISA_2_2_MASKS & ~rs6000_isa_flags_explicit);
+    GCC_OPTION (rs6000_isa_flags) |= (ISA_2_2_MASKS & ~GCC_OPTION (rs6000_isa_flags_explicit));
   else if (TARGET_ALTIVEC)
-    rs6000_isa_flags |= (OPTION_MASK_PPC_GFXOPT & ~rs6000_isa_flags_explicit);
+    GCC_OPTION (rs6000_isa_flags) |= (OPTION_MASK_PPC_GFXOPT & ~GCC_OPTION (rs6000_isa_flags_explicit));
 
   if (TARGET_CRYPTO && !TARGET_ALTIVEC)
     {
-      if (rs6000_isa_flags_explicit & OPTION_MASK_CRYPTO)
+      if (GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_CRYPTO)
 	error ("-mcrypto requires -maltivec");
-      rs6000_isa_flags &= ~OPTION_MASK_CRYPTO;
+      GCC_OPTION (rs6000_isa_flags) &= ~OPTION_MASK_CRYPTO;
     }
 
   if (TARGET_DIRECT_MOVE && !TARGET_VSX)
     {
-      if (rs6000_isa_flags_explicit & OPTION_MASK_DIRECT_MOVE)
+      if (GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_DIRECT_MOVE)
 	error ("-mdirect-move requires -mvsx");
-      rs6000_isa_flags &= ~OPTION_MASK_DIRECT_MOVE;
+      GCC_OPTION (rs6000_isa_flags) &= ~OPTION_MASK_DIRECT_MOVE;
     }
 
   if (TARGET_P8_VECTOR && !TARGET_ALTIVEC)
     {
-      if (rs6000_isa_flags_explicit & OPTION_MASK_P8_VECTOR)
+      if (GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_P8_VECTOR)
 	error ("-mpower8-vector requires -maltivec");
-      rs6000_isa_flags &= ~OPTION_MASK_P8_VECTOR;
+      GCC_OPTION (rs6000_isa_flags) &= ~OPTION_MASK_P8_VECTOR;
     }
 
   if (TARGET_P8_VECTOR && !TARGET_VSX)
     {
-      if (rs6000_isa_flags_explicit & OPTION_MASK_P8_VECTOR)
+      if (GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_P8_VECTOR)
 	error ("-mpower8-vector requires -mvsx");
-      rs6000_isa_flags &= ~OPTION_MASK_P8_VECTOR;
+      GCC_OPTION (rs6000_isa_flags) &= ~OPTION_MASK_P8_VECTOR;
     }
 
   if (TARGET_VSX_TIMODE && !TARGET_VSX)
     {
-      if (rs6000_isa_flags_explicit & OPTION_MASK_VSX_TIMODE)
+      if (GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_VSX_TIMODE)
 	error ("-mvsx-timode requires -mvsx");
-      rs6000_isa_flags &= ~OPTION_MASK_VSX_TIMODE;
+      GCC_OPTION (rs6000_isa_flags) &= ~OPTION_MASK_VSX_TIMODE;
     }
 
   /* The quad memory instructions only works in 64-bit mode. In 32-bit mode,
      silently turn off quad memory mode.  */
   if ((TARGET_QUAD_MEMORY || TARGET_QUAD_MEMORY_ATOMIC) && !TARGET_POWERPC64)
     {
-      if ((rs6000_isa_flags_explicit & OPTION_MASK_QUAD_MEMORY) != 0)
+      if ((GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_QUAD_MEMORY) != 0)
 	warning (0, N_("-mquad-memory requires 64-bit mode"));
 
-      if ((rs6000_isa_flags_explicit & OPTION_MASK_QUAD_MEMORY_ATOMIC) != 0)
+      if ((GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_QUAD_MEMORY_ATOMIC) != 0)
 	warning (0, N_("-mquad-memory-atomic requires 64-bit mode"));
 
-      rs6000_isa_flags &= ~(OPTION_MASK_QUAD_MEMORY
+      GCC_OPTION (rs6000_isa_flags) &= ~(OPTION_MASK_QUAD_MEMORY
 			    | OPTION_MASK_QUAD_MEMORY_ATOMIC);
     }
 
@@ -3389,10 +3389,10 @@ rs6000_option_override_internal (bool global_init_p)
      swapping the words.  */
   if (TARGET_QUAD_MEMORY && !WORDS_BIG_ENDIAN)
     {
-      if ((rs6000_isa_flags_explicit & OPTION_MASK_QUAD_MEMORY) != 0)
+      if ((GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_QUAD_MEMORY) != 0)
 	warning (0, N_("-mquad-memory is not available in little endian mode"));
 
-      rs6000_isa_flags &= ~OPTION_MASK_QUAD_MEMORY;
+      GCC_OPTION (rs6000_isa_flags) &= ~OPTION_MASK_QUAD_MEMORY;
     }
 
   /* Assume if the user asked for normal quad memory instructions, they want
@@ -3400,40 +3400,40 @@ rs6000_option_override_internal (bool global_init_p)
      word atomic instructions.  */
   if (TARGET_QUAD_MEMORY
       && !TARGET_QUAD_MEMORY_ATOMIC
-      && ((rs6000_isa_flags_explicit & OPTION_MASK_QUAD_MEMORY_ATOMIC) == 0))
-    rs6000_isa_flags |= OPTION_MASK_QUAD_MEMORY_ATOMIC;
+      && ((GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_QUAD_MEMORY_ATOMIC) == 0))
+    GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_QUAD_MEMORY_ATOMIC;
 
   /* Enable power8 fusion if we are tuning for power8, even if we aren't
      generating power8 instructions.  */
-  if (!(rs6000_isa_flags_explicit & OPTION_MASK_P8_FUSION))
-    rs6000_isa_flags |= (processor_target_table[tune_index].target_enable
+  if (!(GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_P8_FUSION))
+    GCC_OPTION (rs6000_isa_flags) |= (processor_target_table[tune_index].target_enable
 			 & OPTION_MASK_P8_FUSION);
 
   /* Power8 does not fuse sign extended loads with the addis.  If we are
      optimizing at high levels for speed, convert a sign extended load into a
      zero extending load, and an explicit sign extension.  */
   if (TARGET_P8_FUSION
-      && !(rs6000_isa_flags_explicit & OPTION_MASK_P8_FUSION_SIGN)
+      && !(GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_P8_FUSION_SIGN)
       && optimize_function_for_speed_p (cfun)
-      && optimize >= 3)
-    rs6000_isa_flags |= OPTION_MASK_P8_FUSION_SIGN;
+      && GCC_OPTION (optimize) >= 3)
+    GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_P8_FUSION_SIGN;
 
   if (TARGET_DEBUG_REG || TARGET_DEBUG_TARGET)
-    rs6000_print_isa_options (stderr, 0, "after defaults", rs6000_isa_flags);
+    rs6000_print_isa_options (stderr, 0, "after defaults", GCC_OPTION (rs6000_isa_flags));
 
   /* E500mc does "better" if we inline more aggressively.  Respect the
      user's opinion, though.  */
-  if (rs6000_block_move_inline_limit == 0
-      && (rs6000_cpu == PROCESSOR_PPCE500MC
-	  || rs6000_cpu == PROCESSOR_PPCE500MC64
-	  || rs6000_cpu == PROCESSOR_PPCE5500
-	  || rs6000_cpu == PROCESSOR_PPCE6500))
-    rs6000_block_move_inline_limit = 128;
+  if (GCC_OPTION (rs6000_block_move_inline_limit) == 0
+      && (GCC_OPTION (rs6000_cpu) == PROCESSOR_PPCE500MC
+	  || GCC_OPTION (rs6000_cpu) == PROCESSOR_PPCE500MC64
+	  || GCC_OPTION (rs6000_cpu) == PROCESSOR_PPCE5500
+	  || GCC_OPTION (rs6000_cpu) == PROCESSOR_PPCE6500))
+    GCC_OPTION (rs6000_block_move_inline_limit) = 128;
 
   /* store_one_arg depends on expand_block_move to handle at least the
      size of reg_parm_stack_space.  */
-  if (rs6000_block_move_inline_limit < (TARGET_POWERPC64 ? 64 : 32))
-    rs6000_block_move_inline_limit = (TARGET_POWERPC64 ? 64 : 32);
+  if (GCC_OPTION (rs6000_block_move_inline_limit) < (TARGET_POWERPC64 ? 64 : 32))
+    GCC_OPTION (rs6000_block_move_inline_limit) = (TARGET_POWERPC64 ? 64 : 32);
 
   if (global_init_p)
     {
@@ -3447,7 +3447,7 @@ rs6000_option_override_internal (bool global_init_p)
 	  targetm.sched.adjust_cost = rs6000_debug_adjust_cost;
 	}
 
-      if (TARGET_DEBUG_ADDR)
+      if (GCC_OPTION (TARGET_DEBUG_ADDR))
 	{
 	  targetm.legitimate_address_p = rs6000_debug_legitimate_address_p;
 	  targetm.legitimize_address = rs6000_debug_legitimize_address;
@@ -3465,14 +3465,14 @@ rs6000_option_override_internal (bool global_init_p)
 	    = rs6000_debug_mode_dependent_address;
 	}
 
-      if (rs6000_veclibabi_name)
+      if (GCC_OPTION (rs6000_veclibabi_name))
 	{
-	  if (strcmp (rs6000_veclibabi_name, "mass") == 0)
+	  if (strcmp (GCC_OPTION (rs6000_veclibabi_name), "mass") == 0)
 	    rs6000_veclib_handler = rs6000_builtin_vectorized_libmass;
 	  else
 	    {
 	      error ("unknown vectorization library ABI type (%s) for "
-		     "-mveclibabi= switch", rs6000_veclibabi_name);
+		     "-mveclibabi= switch", GCC_OPTION (rs6000_veclibabi_name));
 	      ret = false;
 	    }
 	}
@@ -3485,12 +3485,12 @@ rs6000_option_override_internal (bool global_init_p)
 	      != RS6000_DEFAULT_LONG_DOUBLE_SIZE))
 	error ("target attribute or pragma changes long double size");
       else
-	rs6000_long_double_type_size = RS6000_DEFAULT_LONG_DOUBLE_SIZE;
+	GCC_OPTION (rs6000_long_double_type_size) = RS6000_DEFAULT_LONG_DOUBLE_SIZE;
     }
 
 #if !defined (POWERPC_LINUX) && !defined (POWERPC_FREEBSD)
   if (!global_options_set.x_rs6000_ieeequad)
-    rs6000_ieeequad = 1;
+    GCC_OPTION (rs6000_ieeequad) = 1;
 #endif
 
   /* Disable VSX and Altivec silently if the user switched cpus to power7 in a
@@ -3498,8 +3498,8 @@ rs6000_option_override_internal (bool global_init_p)
      unless the altivec ABI was set.  This is set by default for 64-bit, but
      not for 32-bit.  */
   if (main_target_opt != NULL && !main_target_opt->x_rs6000_altivec_abi)
-    rs6000_isa_flags &= ~((OPTION_MASK_VSX | OPTION_MASK_ALTIVEC)
-			  & ~rs6000_isa_flags_explicit);
+    GCC_OPTION (rs6000_isa_flags) &= ~((OPTION_MASK_VSX | OPTION_MASK_ALTIVEC)
+			  & ~GCC_OPTION (rs6000_isa_flags_explicit));
 
   /* Enable Altivec ABI for AIX -maltivec.  */
   if (TARGET_XCOFF && (TARGET_ALTIVEC || TARGET_VSX))
@@ -3507,7 +3507,7 @@ rs6000_option_override_internal (bool global_init_p)
       if (main_target_opt != NULL && !main_target_opt->x_rs6000_altivec_abi)
 	error ("target attribute or pragma changes AltiVec ABI");
       else
-	rs6000_altivec_abi = 1;
+	GCC_OPTION (rs6000_altivec_abi) = 1;
     }
 
   /* The AltiVec ABI is the default for PowerPC-64 GNU/Linux.  For
@@ -3522,7 +3522,7 @@ rs6000_option_override_internal (bool global_init_p)
 	      !main_target_opt->x_rs6000_altivec_abi)
 	    error ("target attribute or pragma changes AltiVec ABI");
 	  else
-	    rs6000_altivec_abi = 1;
+	    GCC_OPTION (rs6000_altivec_abi) = 1;
 	}
     }
 
@@ -3536,20 +3536,20 @@ rs6000_option_override_internal (bool global_init_p)
 	error ("target attribute or pragma changes darwin64 ABI");
       else
 	{
-	  rs6000_darwin64_abi = 1;
+	  GCC_OPTION (rs6000_darwin64_abi) = 1;
 	  /* Default to natural alignment, for better performance.  */
-	  rs6000_alignment_flags = MASK_ALIGN_NATURAL;
+	  GCC_OPTION (rs6000_alignment_flags) = MASK_ALIGN_NATURAL;
 	}
     }
 
   /* Place FP constants in the constant pool instead of TOC
      if section anchors enabled.  */
-  if (flag_section_anchors
+  if (GCC_OPTION (flag_section_anchors)
       && !global_options_set.x_TARGET_NO_FP_IN_TOC)
-    TARGET_NO_FP_IN_TOC = 1;
+    GCC_OPTION (TARGET_NO_FP_IN_TOC) = 1;
 
   if (TARGET_DEBUG_REG || TARGET_DEBUG_TARGET)
-    rs6000_print_isa_options (stderr, 0, "before subtarget", rs6000_isa_flags);
+    rs6000_print_isa_options (stderr, 0, "before subtarget", GCC_OPTION (rs6000_isa_flags));
 
 #ifdef SUBTARGET_OVERRIDE_OPTIONS
   SUBTARGET_OVERRIDE_OPTIONS;
@@ -3562,7 +3562,7 @@ rs6000_option_override_internal (bool global_init_p)
 #endif
 
   if (TARGET_DEBUG_REG || TARGET_DEBUG_TARGET)
-    rs6000_print_isa_options (stderr, 0, "after subtarget", rs6000_isa_flags);
+    rs6000_print_isa_options (stderr, 0, "after subtarget", GCC_OPTION (rs6000_isa_flags));
 
   /* For the E500 family of cores, reset the single/double FP flags to let us
      check that they remain constant across attributes or pragmas.  Also,
@@ -3572,7 +3572,7 @@ rs6000_option_override_internal (bool global_init_p)
      For other families, clear ISEL in case it was set implicitly.
   */
 
-  switch (rs6000_cpu)
+  switch (GCC_OPTION (rs6000_cpu))
     {
     case PROCESSOR_PPC8540:
     case PROCESSOR_PPC8548:
@@ -3581,27 +3581,27 @@ rs6000_option_override_internal (bool global_init_p)
     case PROCESSOR_PPCE5500:
     case PROCESSOR_PPCE6500:
 
-      rs6000_single_float = TARGET_E500_SINGLE || TARGET_E500_DOUBLE;
-      rs6000_double_float = TARGET_E500_DOUBLE;
+      GCC_OPTION (rs6000_single_float) = TARGET_E500_SINGLE || TARGET_E500_DOUBLE;
+      GCC_OPTION (rs6000_double_float) = TARGET_E500_DOUBLE;
 
-      rs6000_isa_flags &= ~OPTION_MASK_STRING;
+      GCC_OPTION (rs6000_isa_flags) &= ~OPTION_MASK_STRING;
 
       break;
 
     default:
 
-      if (have_cpu && !(rs6000_isa_flags_explicit & OPTION_MASK_ISEL))
-	rs6000_isa_flags &= ~OPTION_MASK_ISEL;
+      if (have_cpu && !(GCC_OPTION (rs6000_isa_flags_explicit) & OPTION_MASK_ISEL))
+	GCC_OPTION (rs6000_isa_flags) &= ~OPTION_MASK_ISEL;
 
       break;
     }
 
   if (main_target_opt)
     {
-      if (main_target_opt->x_rs6000_single_float != rs6000_single_float)
+      if (main_target_opt->x_rs6000_single_float != GCC_OPTION (rs6000_single_float))
 	error ("target attribute or pragma changes single precision floating "
 	       "point");
-      if (main_target_opt->x_rs6000_double_float != rs6000_double_float)
+      if (main_target_opt->x_rs6000_double_float != GCC_OPTION (rs6000_double_float))
 	error ("target attribute or pragma changes double precision floating "
 	       "point");
     }
@@ -3609,76 +3609,76 @@ rs6000_option_override_internal (bool global_init_p)
   /* Detect invalid option combinations with E500.  */
   CHECK_E500_OPTIONS;
 
-  rs6000_always_hint = (rs6000_cpu != PROCESSOR_POWER4
-			&& rs6000_cpu != PROCESSOR_POWER5
-			&& rs6000_cpu != PROCESSOR_POWER6
-			&& rs6000_cpu != PROCESSOR_POWER7
-			&& rs6000_cpu != PROCESSOR_POWER8
-			&& rs6000_cpu != PROCESSOR_PPCA2
-			&& rs6000_cpu != PROCESSOR_CELL
-			&& rs6000_cpu != PROCESSOR_PPC476);
-  rs6000_sched_groups = (rs6000_cpu == PROCESSOR_POWER4
-			 || rs6000_cpu == PROCESSOR_POWER5
-			 || rs6000_cpu == PROCESSOR_POWER7
-			 || rs6000_cpu == PROCESSOR_POWER8);
-  rs6000_align_branch_targets = (rs6000_cpu == PROCESSOR_POWER4
-				 || rs6000_cpu == PROCESSOR_POWER5
-				 || rs6000_cpu == PROCESSOR_POWER6
-				 || rs6000_cpu == PROCESSOR_POWER7
-				 || rs6000_cpu == PROCESSOR_POWER8
-				 || rs6000_cpu == PROCESSOR_PPCE500MC
-				 || rs6000_cpu == PROCESSOR_PPCE500MC64
-				 || rs6000_cpu == PROCESSOR_PPCE5500
-				 || rs6000_cpu == PROCESSOR_PPCE6500);
+  GCC_OPTION (rs6000_always_hint) = (GCC_OPTION (rs6000_cpu) != PROCESSOR_POWER4
+			&& GCC_OPTION (rs6000_cpu) != PROCESSOR_POWER5
+			&& GCC_OPTION (rs6000_cpu) != PROCESSOR_POWER6
+			&& GCC_OPTION (rs6000_cpu) != PROCESSOR_POWER7
+			&& GCC_OPTION (rs6000_cpu) != PROCESSOR_POWER8
+			&& GCC_OPTION (rs6000_cpu) != PROCESSOR_PPCA2
+			&& GCC_OPTION (rs6000_cpu) != PROCESSOR_CELL
+			&& GCC_OPTION (rs6000_cpu) != PROCESSOR_PPC476);
+  GCC_OPTION (rs6000_sched_groups) = (GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER4
+			 || GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER5
+			 || GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER7
+			 || GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER8);
+  GCC_OPTION (rs6000_align_branch_targets) = (GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER4
+				 || GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER5
+				 || GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER6
+				 || GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER7
+				 || GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER8
+				 || GCC_OPTION (rs6000_cpu) == PROCESSOR_PPCE500MC
+				 || GCC_OPTION (rs6000_cpu) == PROCESSOR_PPCE500MC64
+				 || GCC_OPTION (rs6000_cpu) == PROCESSOR_PPCE5500
+				 || GCC_OPTION (rs6000_cpu) == PROCESSOR_PPCE6500);
 
   /* Allow debug switches to override the above settings.  These are set to -1
      in rs6000.opt to indicate the user hasn't directly set the switch.  */
-  if (TARGET_ALWAYS_HINT >= 0)
-    rs6000_always_hint = TARGET_ALWAYS_HINT;
+  if (GCC_OPTION (TARGET_ALWAYS_HINT) >= 0)
+    GCC_OPTION (rs6000_always_hint) = GCC_OPTION (TARGET_ALWAYS_HINT);
 
-  if (TARGET_SCHED_GROUPS >= 0)
-    rs6000_sched_groups = TARGET_SCHED_GROUPS;
+  if (GCC_OPTION (TARGET_SCHED_GROUPS) >= 0)
+    GCC_OPTION (rs6000_sched_groups) = GCC_OPTION (TARGET_SCHED_GROUPS);
 
-  if (TARGET_ALIGN_BRANCH_TARGETS >= 0)
-    rs6000_align_branch_targets = TARGET_ALIGN_BRANCH_TARGETS;
+  if (GCC_OPTION (TARGET_ALIGN_BRANCH_TARGETS) >= 0)
+    GCC_OPTION (rs6000_align_branch_targets) = GCC_OPTION (TARGET_ALIGN_BRANCH_TARGETS);
 
-  rs6000_sched_restricted_insns_priority
-    = (rs6000_sched_groups ? 1 : 0);
+  GCC_OPTION (rs6000_sched_restricted_insns_priority)
+    = (GCC_OPTION (rs6000_sched_groups) ? 1 : 0);
 
   /* Handle -msched-costly-dep option.  */
-  rs6000_sched_costly_dep
-    = (rs6000_sched_groups ? true_store_to_load_dep_costly : no_dep_costly);
-
-  if (rs6000_sched_costly_dep_str)
-    {
-      if (! strcmp (rs6000_sched_costly_dep_str, "no"))
-	rs6000_sched_costly_dep = no_dep_costly;
-      else if (! strcmp (rs6000_sched_costly_dep_str, "all"))
-	rs6000_sched_costly_dep = all_deps_costly;
-      else if (! strcmp (rs6000_sched_costly_dep_str, "true_store_to_load"))
-	rs6000_sched_costly_dep = true_store_to_load_dep_costly;
-      else if (! strcmp (rs6000_sched_costly_dep_str, "store_to_load"))
-	rs6000_sched_costly_dep = store_to_load_dep_costly;
+  GCC_OPTION (rs6000_sched_costly_dep)
+    = (GCC_OPTION (rs6000_sched_groups) ? true_store_to_load_dep_costly : no_dep_costly);
+
+  if (GCC_OPTION (rs6000_sched_costly_dep_str))
+    {
+      if (! strcmp (GCC_OPTION (rs6000_sched_costly_dep_str), "no"))
+	GCC_OPTION (rs6000_sched_costly_dep) = no_dep_costly;
+      else if (! strcmp (GCC_OPTION (rs6000_sched_costly_dep_str), "all"))
+	GCC_OPTION (rs6000_sched_costly_dep) = all_deps_costly;
+      else if (! strcmp (GCC_OPTION (rs6000_sched_costly_dep_str), "true_store_to_load"))
+	GCC_OPTION (rs6000_sched_costly_dep) = true_store_to_load_dep_costly;
+      else if (! strcmp (GCC_OPTION (rs6000_sched_costly_dep_str), "store_to_load"))
+	GCC_OPTION (rs6000_sched_costly_dep) = store_to_load_dep_costly;
       else
-	rs6000_sched_costly_dep = ((enum rs6000_dependence_cost)
-				   atoi (rs6000_sched_costly_dep_str));
+	GCC_OPTION (rs6000_sched_costly_dep) = ((enum rs6000_dependence_cost)
+				   atoi (GCC_OPTION (rs6000_sched_costly_dep_str)));
     }
 
   /* Handle -minsert-sched-nops option.  */
-  rs6000_sched_insert_nops
-    = (rs6000_sched_groups ? sched_finish_regroup_exact : sched_finish_none);
+  GCC_OPTION (rs6000_sched_insert_nops)
+    = (GCC_OPTION (rs6000_sched_groups) ? sched_finish_regroup_exact : sched_finish_none);
 
-  if (rs6000_sched_insert_nops_str)
+  if (GCC_OPTION (rs6000_sched_insert_nops_str))
     {
-      if (! strcmp (rs6000_sched_insert_nops_str, "no"))
-	rs6000_sched_insert_nops = sched_finish_none;
-      else if (! strcmp (rs6000_sched_insert_nops_str, "pad"))
-	rs6000_sched_insert_nops = sched_finish_pad_groups;
-      else if (! strcmp (rs6000_sched_insert_nops_str, "regroup_exact"))
-	rs6000_sched_insert_nops = sched_finish_regroup_exact;
+      if (! strcmp (GCC_OPTION (rs6000_sched_insert_nops_str), "no"))
+	GCC_OPTION (rs6000_sched_insert_nops) = sched_finish_none;
+      else if (! strcmp (GCC_OPTION (rs6000_sched_insert_nops_str), "pad"))
+	GCC_OPTION (rs6000_sched_insert_nops) = sched_finish_pad_groups;
+      else if (! strcmp (GCC_OPTION (rs6000_sched_insert_nops_str), "regroup_exact"))
+	GCC_OPTION (rs6000_sched_insert_nops) = sched_finish_regroup_exact;
       else
-	rs6000_sched_insert_nops = ((enum rs6000_nop_insertion)
-				    atoi (rs6000_sched_insert_nops_str));
+	GCC_OPTION (rs6000_sched_insert_nops) = ((enum rs6000_nop_insertion)
+				    atoi (GCC_OPTION (rs6000_sched_insert_nops_str)));
     }
 
   if (global_init_p)
@@ -3694,12 +3694,12 @@ rs6000_option_override_internal (bool global_init_p)
 	 If -maix-struct-return or -msvr4-struct-return was explicitly
 	 used, don't override with the ABI default.  */
       if (!global_options_set.x_aix_struct_return)
-	aix_struct_return = (DEFAULT_ABI != ABI_V4 || DRAFT_V4_STRUCT_RET);
+	GCC_OPTION (aix_struct_return) = (DEFAULT_ABI != ABI_V4 || DRAFT_V4_STRUCT_RET);
 
 #if 0
       /* IBM XL compiler defaults to unsigned bitfields.  */
-      if (TARGET_XL_COMPAT)
-	flag_signed_bitfields = 0;
+      if (GCC_OPTION (TARGET_XL_COMPAT))
+	GCC_OPTION (flag_signed_bitfields) = 0;
 #endif
 
       if (TARGET_LONG_DOUBLE_128 && !TARGET_IEEEQUAD)
@@ -3718,30 +3718,30 @@ rs6000_option_override_internal (bool global_init_p)
 
 
       /* Set branch target alignment, if not optimizing for size.  */
-      if (!optimize_size)
+      if (!GCC_OPTION (optimize_size))
 	{
 	  /* Cell wants to be aligned 8byte for dual issue.  Titan wants to be
 	     aligned 8byte to avoid misprediction by the branch predictor.  */
-	  if (rs6000_cpu == PROCESSOR_TITAN
-	      || rs6000_cpu == PROCESSOR_CELL)
+	  if (GCC_OPTION (rs6000_cpu) == PROCESSOR_TITAN
+	      || GCC_OPTION (rs6000_cpu) == PROCESSOR_CELL)
 	    {
-	      if (align_functions <= 0)
-		align_functions = 8;
-	      if (align_jumps <= 0)
-		align_jumps = 8;
-	      if (align_loops <= 0)
-		align_loops = 8;
+	      if (GCC_OPTION (align_functions) <= 0)
+		GCC_OPTION (align_functions) = 8;
+	      if (GCC_OPTION (align_jumps) <= 0)
+		GCC_OPTION (align_jumps) = 8;
+	      if (GCC_OPTION (align_loops) <= 0)
+		GCC_OPTION (align_loops) = 8;
 	    }
-	  if (rs6000_align_branch_targets)
+	  if (GCC_OPTION (rs6000_align_branch_targets))
 	    {
-	      if (align_functions <= 0)
-		align_functions = 16;
-	      if (align_jumps <= 0)
-		align_jumps = 16;
-	      if (align_loops <= 0)
+	      if (GCC_OPTION (align_functions) <= 0)
+		GCC_OPTION (align_functions) = 16;
+	      if (GCC_OPTION (align_jumps) <= 0)
+		GCC_OPTION (align_jumps) = 16;
+	      if (GCC_OPTION (align_loops) <= 0)
 		{
-		  can_override_loop_align = 1;
-		  align_loops = 16;
+		  GCC_OPTION (can_override_loop_align) = 1;
+		  GCC_OPTION (align_loops) = 16;
 		}
 	    }
 	  if (align_jumps_max_skip <= 0)
@@ -3760,10 +3760,10 @@ rs6000_option_override_internal (bool global_init_p)
     }
 
   /* Initialize rs6000_cost with the appropriate target costs.  */
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     rs6000_cost = TARGET_POWERPC64 ? &size64_cost : &size32_cost;
   else
-    switch (rs6000_cpu)
+    switch (GCC_OPTION (rs6000_cpu))
       {
       case PROCESSOR_RS64A:
 	rs6000_cost = &rs64a_cost;
@@ -3917,23 +3917,23 @@ rs6000_option_override_internal (bool global_init_p)
      If TARGET_HARD_FLOAT is set, but neither single or double is set, 
      then set both flags. */
   if (TARGET_HARD_FLOAT && TARGET_FPRS 
-      && rs6000_single_float == 0 && rs6000_double_float == 0)
-    rs6000_single_float = rs6000_double_float = 1;
+      && GCC_OPTION (rs6000_single_float) == 0 && GCC_OPTION (rs6000_double_float) == 0)
+    GCC_OPTION (rs6000_single_float) = GCC_OPTION (rs6000_double_float) = 1;
 
   /* If not explicitly specified via option, decide whether to generate indexed
      load/store instructions.  */
-  if (TARGET_AVOID_XFORM == -1)
+  if (GCC_OPTION (TARGET_AVOID_XFORM) == -1)
     /* Avoid indexed addressing when targeting Power6 in order to avoid the
      DERAT mispredict penalty.  However the LVE and STVE altivec instructions
      need indexed accesses and the type used is the scalar type of the element
      being loaded or stored.  */
-    TARGET_AVOID_XFORM = (rs6000_cpu == PROCESSOR_POWER6 && TARGET_CMPB
+    GCC_OPTION (TARGET_AVOID_XFORM) = (GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER6 && TARGET_CMPB
 			  && !TARGET_ALTIVEC);
 
   /* Set the -mrecip options.  */
-  if (rs6000_recip_name)
+  if (GCC_OPTION (rs6000_recip_name))
     {
-      char *p = ASTRDUP (rs6000_recip_name);
+      char *p = ASTRDUP (GCC_OPTION (rs6000_recip_name));
       char *q;
       unsigned int mask, i;
       bool invert;
@@ -3971,9 +3971,9 @@ rs6000_option_override_internal (bool global_init_p)
 	    }
 
 	  if (invert)
-	    rs6000_recip_control &= ~mask;
+	    GCC_OPTION (rs6000_recip_control) &= ~mask;
 	  else
-	    rs6000_recip_control |= mask;
+	    GCC_OPTION (rs6000_recip_control) |= mask;
 	}
     }
 
@@ -3981,13 +3981,13 @@ rs6000_option_override_internal (bool global_init_p)
      builtins were used.  In the past we used target_flags, but we've run out
      of bits, and some options like SPE and PAIRED are no longer in
      target_flags.  */
-  rs6000_builtin_mask = rs6000_builtin_mask_calculate ();
+  GCC_OPTION (rs6000_builtin_mask) = rs6000_builtin_mask_calculate ();
   if (TARGET_DEBUG_BUILTIN || TARGET_DEBUG_TARGET)
     {
       fprintf (stderr,
 	       "new builtin mask = " HOST_WIDE_INT_PRINT_HEX ", ",
-	       rs6000_builtin_mask);
-      rs6000_print_builtin_options (stderr, 0, NULL, rs6000_builtin_mask);
+	       GCC_OPTION (rs6000_builtin_mask));
+      rs6000_print_builtin_options (stderr, 0, NULL, GCC_OPTION (rs6000_builtin_mask));
     }
 
   /* Initialize all of the registers.  */
@@ -4001,7 +4001,7 @@ rs6000_option_override_internal (bool global_init_p)
   /* If not explicitly specified via option, decide whether to generate the
      extra blr's required to preserve the link stack on some cpus (eg, 476).  */
   if (TARGET_LINK_STACK == -1)
-    SET_TARGET_LINK_STACK (rs6000_cpu == PROCESSOR_PPC476 && flag_pic);
+    SET_TARGET_LINK_STACK (GCC_OPTION (rs6000_cpu) == PROCESSOR_PPC476 && GCC_OPTION (flag_pic));
 
   return ret;
 }
@@ -4034,7 +4034,7 @@ rs6000_loop_align (rtx label)
   int ninsns;
 
   /* Don't override loop alignment if -falign-loops was specified. */
-  if (!can_override_loop_align)
+  if (!GCC_OPTION (can_override_loop_align))
     return align_loops_log;
 
   bb = BLOCK_FOR_INSN (label);
@@ -4042,11 +4042,11 @@ rs6000_loop_align (rtx label)
 
   /* Align small loops to 32 bytes to fit in an icache sector, otherwise return default. */
   if (ninsns > 4 && ninsns <= 8
-      && (rs6000_cpu == PROCESSOR_POWER4
-	  || rs6000_cpu == PROCESSOR_POWER5
-	  || rs6000_cpu == PROCESSOR_POWER6
-	  || rs6000_cpu == PROCESSOR_POWER7
-	  || rs6000_cpu == PROCESSOR_POWER8))
+      && (GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER4
+	  || GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER5
+	  || GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER6
+	  || GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER7
+	  || GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER8))
     return 5;
   else
     return align_loops_log;
@@ -4071,10 +4071,10 @@ rs6000_vector_alignment_reachable (const_tree type ATTRIBUTE_UNUSED, bool is_pac
 
   if (TARGET_32BIT)
     {
-      if (rs6000_alignment_flags == MASK_ALIGN_NATURAL)
+      if (GCC_OPTION (rs6000_alignment_flags) == MASK_ALIGN_NATURAL)
         return true;
 
-      if (rs6000_alignment_flags ==  MASK_ALIGN_POWER)
+      if (GCC_OPTION (rs6000_alignment_flags) ==  MASK_ALIGN_POWER)
         return true;
 
       return false;
@@ -4162,7 +4162,7 @@ rs6000_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost,
         return 3;
 
       case unaligned_load:
-        if (TARGET_VSX && TARGET_ALLOW_MOVMISALIGN)
+        if (TARGET_VSX && GCC_OPTION (TARGET_ALLOW_MOVMISALIGN))
           {
             elements = TYPE_VECTOR_SUBPARTS (vectype);
             if (elements == 2)
@@ -4197,7 +4197,7 @@ rs6000_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost,
         return 2;
 
       case unaligned_store:
-        if (TARGET_VSX && TARGET_ALLOW_MOVMISALIGN)
+        if (TARGET_VSX && GCC_OPTION (TARGET_ALLOW_MOVMISALIGN))
           {
             elements = TYPE_VECTOR_SUBPARTS (vectype);
             if (elements == 2)
@@ -4370,7 +4370,7 @@ rs6000_add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind,
   rs6000_cost_data *cost_data = (rs6000_cost_data*) data;
   unsigned retval = 0;
 
-  if (flag_vect_cost_model)
+  if (GCC_OPTION (flag_vect_cost_model))
     {
       tree vectype = stmt_info ? stmt_vectype (stmt_info) : NULL_TREE;
       int stmt_cost = rs6000_builtin_vectorization_cost (kind, vectype,
@@ -4430,7 +4430,7 @@ rs6000_builtin_vectorized_libmass (tree fndecl, tree type_out, tree type_in)
      parts of IEEE with the required precision such as denormals.  Only support
      it if we have VSX to use the simd d2 or f4 functions.
      XXX: Add variable length support.  */
-  if (!flag_unsafe_math_optimizations || !TARGET_VSX)
+  if (!GCC_OPTION (flag_unsafe_math_optimizations) || !TARGET_VSX)
     return NULL_TREE;
 
   el_mode = TYPE_MODE (TREE_TYPE (type_out));
@@ -4574,7 +4574,7 @@ rs6000_builtin_vectorized_function (tree fndecl, tree type_out,
 
   if (TREE_CODE (type_out) != VECTOR_TYPE
       || TREE_CODE (type_in) != VECTOR_TYPE
-      || !TARGET_VECTORIZE_BUILTINS)
+      || !GCC_OPTION (TARGET_VECTORIZE_BUILTINS))
     return NULL_TREE;
 
   out_mode = TYPE_MODE (TREE_TYPE (type_out));
@@ -4709,28 +4709,28 @@ rs6000_builtin_vectorized_function (tree fndecl, tree type_out,
 	  break;
 	case BUILT_IN_NEARBYINT:
 	  if (VECTOR_UNIT_VSX_P (V2DFmode)
-	      && flag_unsafe_math_optimizations
+	      && GCC_OPTION (flag_unsafe_math_optimizations)
 	      && out_mode == DFmode && out_n == 2
 	      && in_mode == DFmode && in_n == 2)
 	    return rs6000_builtin_decls[VSX_BUILTIN_XVRDPI];
 	  break;
 	case BUILT_IN_NEARBYINTF:
 	  if (VECTOR_UNIT_VSX_P (V4SFmode)
-	      && flag_unsafe_math_optimizations
+	      && GCC_OPTION (flag_unsafe_math_optimizations)
 	      && out_mode == SFmode && out_n == 4
 	      && in_mode == SFmode && in_n == 4)
 	    return rs6000_builtin_decls[VSX_BUILTIN_XVRSPI];
 	  break;
 	case BUILT_IN_RINT:
 	  if (VECTOR_UNIT_VSX_P (V2DFmode)
-	      && !flag_trapping_math
+	      && !GCC_OPTION (flag_trapping_math)
 	      && out_mode == DFmode && out_n == 2
 	      && in_mode == DFmode && in_n == 2)
 	    return rs6000_builtin_decls[VSX_BUILTIN_XVRDPIC];
 	  break;
 	case BUILT_IN_RINTF:
 	  if (VECTOR_UNIT_VSX_P (V4SFmode)
-	      && !flag_trapping_math
+	      && !GCC_OPTION (flag_trapping_math)
 	      && out_mode == SFmode && out_n == 4
 	      && in_mode == SFmode && in_n == 4)
 	    return rs6000_builtin_decls[VSX_BUILTIN_XVRSPIC];
@@ -4798,7 +4798,7 @@ rs6000_file_start (void)
 
   default_file_start ();
 
-  if (flag_verbose_asm)
+  if (GCC_OPTION (flag_verbose_asm))
     {
       sprintf (buffer, "\n%s rs6000/powerpc options:", ASM_COMMENT_START);
 
@@ -4811,14 +4811,14 @@ rs6000_file_start (void)
       if (global_options_set.x_rs6000_cpu_index)
 	{
 	  fprintf (file, "%s -mcpu=%s", start,
-		   processor_target_table[rs6000_cpu_index].name);
+		   processor_target_table[GCC_OPTION (rs6000_cpu_index)].name);
 	  start = "";
 	}
 
       if (global_options_set.x_rs6000_tune_index)
 	{
 	  fprintf (file, "%s -mtune=%s", start,
-		   processor_target_table[rs6000_tune_index].name);
+		   processor_target_table[GCC_OPTION (rs6000_tune_index)].name);
 	  start = "";
 	}
 
@@ -4829,7 +4829,7 @@ rs6000_file_start (void)
 	}
 
 #ifdef USING_ELFOS_H
-      switch (rs6000_sdata)
+      switch (GCC_OPTION (rs6000_sdata))
 	{
 	case SDATA_NONE: fprintf (file, "%s -msdata=none", start); start = ""; break;
 	case SDATA_DATA: fprintf (file, "%s -msdata=data", start); start = ""; break;
@@ -4837,10 +4837,10 @@ rs6000_file_start (void)
 	case SDATA_EABI: fprintf (file, "%s -msdata=eabi", start); start = ""; break;
 	}
 
-      if (rs6000_sdata && g_switch_value)
+      if (GCC_OPTION (rs6000_sdata) && GCC_OPTION (g_switch_value))
 	{
 	  fprintf (file, "%s -G %d", start,
-		   g_switch_value);
+		   GCC_OPTION (g_switch_value));
 	  start = "";
 	}
 #endif
@@ -4853,7 +4853,7 @@ rs6000_file_start (void)
     fprintf (file, "\t.abiversion 2\n");
 
   if (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2
-      || (TARGET_ELF && flag_pic == 2))
+      || (TARGET_ELF && GCC_OPTION (flag_pic) == 2))
     {
       switch_to_section (toc_section);
       switch_to_section (text_section);
@@ -5907,7 +5907,7 @@ small_data_operand (rtx op ATTRIBUTE_UNUSED,
 #if TARGET_ELF
   rtx sym_ref;
 
-  if (rs6000_sdata == SDATA_NONE || rs6000_sdata == SDATA_DATA)
+  if (GCC_OPTION (rs6000_sdata) == SDATA_NONE || GCC_OPTION (rs6000_sdata) == SDATA_DATA)
     return 0;
 
   if (DEFAULT_ABI != ABI_V4)
@@ -5937,7 +5937,7 @@ small_data_operand (rtx op ATTRIBUTE_UNUSED,
       /* We have to be careful here, because it is the referenced address
 	 that must be 32k from _SDA_BASE_, not just the symbol.  */
       summand = INTVAL (XEXP (sum, 1));
-      if (summand < 0 || summand > g_switch_value)
+      if (summand < 0 || summand > GCC_OPTION (g_switch_value))
 	return 0;
 
       sym_ref = XEXP (sum, 0);
@@ -6015,7 +6015,7 @@ quad_load_store_p (rtx op0, rtx op1)
   else
     ret = false;
 
-  if (TARGET_DEBUG_ADDR)
+  if (GCC_OPTION (TARGET_DEBUG_ADDR))
     {
       fprintf (stderr, "\n========== quad_load_store, return %s\n",
 	       ret ? "true" : "false");
@@ -6325,7 +6325,7 @@ static bool
 legitimate_small_data_p (enum machine_mode mode, rtx x)
 {
   return (DEFAULT_ABI == ABI_V4
-	  && !flag_pic && !TARGET_TOC
+	  && !GCC_OPTION (flag_pic) && !TARGET_TOC
 	  && (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == CONST)
 	  && small_data_operand (x, mode));
 }
@@ -6445,7 +6445,7 @@ avoiding_indexed_address_p (enum machine_mode mode)
 {
   /* Avoid indexed addressing for modes that have non-indexed
      load/store instruction forms.  */
-  return (TARGET_AVOID_XFORM && VECTOR_MEM_NONE_P (mode));
+  return (GCC_OPTION (TARGET_AVOID_XFORM) && VECTOR_MEM_NONE_P (mode));
 }
 
 bool
@@ -6457,7 +6457,7 @@ legitimate_indirect_address_p (rtx x, int strict)
 bool
 macho_lo_sum_memory_operand (rtx x, enum machine_mode mode)
 {
-  if (!TARGET_MACHO || !flag_pic
+  if (!TARGET_MACHO || !GCC_OPTION (flag_pic)
       || mode != SImode || GET_CODE (x) != MEM)
     return false;
   x = XEXP (x, 0);
@@ -6491,7 +6491,7 @@ legitimate_lo_sum_address_p (enum machine_mode mode, rtx x, int strict)
     {
       bool large_toc_ok;
 
-      if (DEFAULT_ABI == ABI_V4 && flag_pic)
+      if (DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic))
 	return false;
       /* LRA don't use LEGITIMIZE_RELOAD_ADDRESS as it usually calls
 	 push_reload from reload pass code.  LEGITIMIZE_RELOAD_ADDRESS
@@ -6665,7 +6665,7 @@ rs6000_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
 	    )
 	   && TARGET_32BIT
 	   && TARGET_NO_TOC
-	   && ! flag_pic
+	   && ! GCC_OPTION (flag_pic)
 	   && GET_CODE (x) != CONST_INT
 	   && GET_CODE (x) != CONST_DOUBLE
 	   && CONSTANT_P (x)
@@ -6993,7 +6993,7 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model model)
     return rs6000_legitimize_tls_address_aix (addr, model);
 
   dest = gen_reg_rtx (Pmode);
-  if (model == TLS_MODEL_LOCAL_EXEC && rs6000_tls_size == 16)
+  if (model == TLS_MODEL_LOCAL_EXEC && GCC_OPTION (rs6000_tls_size) == 16)
     {
       rtx tlsreg;
 
@@ -7009,7 +7009,7 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model model)
 	}
       emit_insn (insn);
     }
-  else if (model == TLS_MODEL_LOCAL_EXEC && rs6000_tls_size == 32)
+  else if (model == TLS_MODEL_LOCAL_EXEC && GCC_OPTION (rs6000_tls_size) == 32)
     {
       rtx tlsreg, tmp;
 
@@ -7044,13 +7044,13 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model model)
 	got = gen_rtx_REG (Pmode, 2);
       else
 	{
-	  if (flag_pic == 1)
+	  if (GCC_OPTION (flag_pic) == 1)
 	    got = gen_rtx_REG (Pmode, RS6000_PIC_OFFSET_TABLE_REGNUM);
 	  else
 	    {
 	      rtx gsym = rs6000_got_sym ();
 	      got = gen_reg_rtx (Pmode);
-	      if (flag_pic == 0)
+	      if (GCC_OPTION (flag_pic) == 0)
 		rs6000_emit_move (got, gsym, Pmode);
 	      else
 		{
@@ -7091,7 +7091,7 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model model)
 	    gcc_unreachable ();
 	  call_insn = last_call_insn ();
 	  PATTERN (call_insn) = insn;
-	  if (DEFAULT_ABI == ABI_V4 && TARGET_SECURE_PLT && flag_pic)
+	  if (DEFAULT_ABI == ABI_V4 && TARGET_SECURE_PLT && GCC_OPTION (flag_pic))
 	    use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn),
 		     pic_offset_table_rtx);
 	}
@@ -7116,18 +7116,18 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model model)
 	    gcc_unreachable ();
 	  call_insn = last_call_insn ();
 	  PATTERN (call_insn) = insn;
-	  if (DEFAULT_ABI == ABI_V4 && TARGET_SECURE_PLT && flag_pic)
+	  if (DEFAULT_ABI == ABI_V4 && TARGET_SECURE_PLT && GCC_OPTION (flag_pic))
 	    use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn),
 		     pic_offset_table_rtx);
 
-	  if (rs6000_tls_size == 16)
+	  if (GCC_OPTION (rs6000_tls_size) == 16)
 	    {
 	      if (TARGET_64BIT)
 		insn = gen_tls_dtprel_64 (dest, tmp1, addr);
 	      else
 		insn = gen_tls_dtprel_32 (dest, tmp1, addr);
 	    }
-	  else if (rs6000_tls_size == 32)
+	  else if (GCC_OPTION (rs6000_tls_size) == 32)
 	    {
 	      tmp2 = gen_reg_rtx (Pmode);
 	      if (TARGET_64BIT)
@@ -7281,7 +7281,7 @@ rs6000_legitimize_reload_address (rtx x, enum machine_mode mode,
     }
 
 #if TARGET_MACHO
-  if (DEFAULT_ABI == ABI_DARWIN && flag_pic
+  if (DEFAULT_ABI == ABI_DARWIN && GCC_OPTION (flag_pic)
       && GET_CODE (x) == LO_SUM
       && GET_CODE (XEXP (x, 0)) == PLUS
       && XEXP (XEXP (x, 0), 0) == pic_offset_table_rtx
@@ -7355,11 +7355,11 @@ rs6000_legitimize_reload_address (rtx x, enum machine_mode mode,
       && !SPE_VECTOR_MODE (mode)
 #if TARGET_MACHO
       && DEFAULT_ABI == ABI_DARWIN
-      && (flag_pic || MACHO_DYNAMIC_NO_PIC_P)
+      && (GCC_OPTION (flag_pic) || MACHO_DYNAMIC_NO_PIC_P)
       && machopic_symbol_defined_p (x)
 #else
       && DEFAULT_ABI == ABI_V4
-      && !flag_pic
+      && !GCC_OPTION (flag_pic)
 #endif
       /* Don't do this for TFmode or TDmode, since the result isn't offsettable.
 	 The same goes for DImode without 64-bit gprs and DFmode and DDmode
@@ -7384,7 +7384,7 @@ rs6000_legitimize_reload_address (rtx x, enum machine_mode mode,
 	  || (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)))
     {
 #if TARGET_MACHO
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	{
 	  rtx offset = machopic_gen_offset (x);
 	  x = gen_rtx_LO_SUM (GET_MODE (x),
@@ -7741,12 +7741,12 @@ rs6000_conditional_register_usage (void)
 
   if (DEFAULT_ABI == ABI_V4
       && PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM
-      && flag_pic == 2)
+      && GCC_OPTION (flag_pic) == 2)
     fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = 1;
 
   if (DEFAULT_ABI == ABI_V4
       && PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM
-      && flag_pic == 1)
+      && GCC_OPTION (flag_pic) == 1)
     fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM]
       = call_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM]
       = call_really_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = 1;
@@ -8116,7 +8116,7 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode)
   operands[0] = dest;
   operands[1] = source;
 
-  if (TARGET_DEBUG_ADDR)
+  if (GCC_OPTION (TARGET_DEBUG_ADDR))
     {
       fprintf (stderr,
 	       "\nrs6000_emit_move: mode = %s, reload_in_progress = %d, "
@@ -8397,7 +8397,7 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode)
 
       if (DEFAULT_ABI == ABI_V4
 	  && mode == Pmode && mode == SImode
-	  && flag_pic == 1 && got_operand (operands[1], mode))
+	  && GCC_OPTION (flag_pic) == 1 && got_operand (operands[1], mode))
 	{
 	  emit_insn (gen_movsi_got (operands[0], operands[1]));
 	  return;
@@ -8405,7 +8405,7 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode)
 
       if ((TARGET_ELF || DEFAULT_ABI == ABI_DARWIN)
 	  && TARGET_NO_TOC
-	  && ! flag_pic
+	  && ! GCC_OPTION (flag_pic)
 	  && mode == Pmode
 	  && CONSTANT_P (operands[1])
 	  && GET_CODE (operands[1]) != HIGH
@@ -8500,7 +8500,7 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode)
 	     just put the symbol in the TOC and add the constant.  Don't do
 	     this if reload is in progress.  */
 	  if (GET_CODE (operands[1]) == CONST
-	      && TARGET_NO_SUM_IN_TOC && ! reload_in_progress
+	      && GCC_OPTION (TARGET_NO_SUM_IN_TOC) && ! reload_in_progress
 	      && GET_CODE (XEXP (operands[1], 0)) == PLUS
 	      && add_operand (XEXP (XEXP (operands[1], 0), 1), mode)
 	      && (GET_CODE (XEXP (XEXP (operands[1], 0), 0)) == LABEL_REF
@@ -8836,7 +8836,7 @@ rs6000_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
   /* For the Darwin64 ABI, test if we can fit the return value in regs.  */
   if (TARGET_MACHO
-      && rs6000_darwin64_abi
+      && GCC_OPTION (rs6000_darwin64_abi)
       && TREE_CODE (type) == RECORD_TYPE
       && int_size_in_bytes (type) > 0)
     {
@@ -8865,7 +8865,7 @@ rs6000_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
     return false;
 
   if (AGGREGATE_TYPE_P (type)
-      && (aix_struct_return
+      && (GCC_OPTION (aix_struct_return)
 	  || (unsigned HOST_WIDE_INT) int_size_in_bytes (type) > 8))
     return true;
 
@@ -8967,13 +8967,13 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype,
     cum->nargs_prototype = n_named_args;
 
   /* Check for a longcall attribute.  */
-  if ((!fntype && rs6000_default_long_calls)
+  if ((!fntype && GCC_OPTION (rs6000_default_long_calls))
       || (fntype
 	  && lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype))
 	  && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype))))
     cum->call_cookie |= CALL_LONG;
 
-  if (TARGET_DEBUG_ARG)
+  if (GCC_OPTION (TARGET_DEBUG_ARG))
     {
       fprintf (stderr, "\ninit_cumulative_args:");
       if (fntype)
@@ -9145,9 +9145,9 @@ rs6000_function_arg_boundary (enum machine_mode mode, const_tree type)
 	   || (type && TREE_CODE (type) == VECTOR_TYPE
 	       && int_size_in_bytes (type) >= 16))
     return 128;
-  else if (((TARGET_MACHO && rs6000_darwin64_abi)
+  else if (((TARGET_MACHO && GCC_OPTION (rs6000_darwin64_abi))
 	    || DEFAULT_ABI == ABI_ELFv2
-            || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
+            || (DEFAULT_ABI == ABI_AIX && !GCC_OPTION (rs6000_compat_align_parm)))
  	   && mode == BLKmode
 	   && type && TYPE_ALIGN (type) > 64)
     return 128;
@@ -9340,7 +9340,7 @@ rs6000_darwin64_record_arg_advance_recurse (CUMULATIVE_ARGS *cum,
 static int
 rs6000_darwin64_struct_check_p (enum machine_mode mode, const_tree type)
 {
-  return rs6000_darwin64_abi
+  return GCC_OPTION (rs6000_darwin64_abi)
 	 && ((mode == BLKmode 
 	      && TREE_CODE (type) == RECORD_TYPE 
 	      && int_size_in_bytes (type) > 0)
@@ -9426,7 +9426,7 @@ rs6000_function_arg_advance_1 (CUMULATIVE_ARGS *cum, enum machine_mode mode,
 	    align = cum->words & 1;
 	  cum->words += align + rs6000_arg_size (mode, type);
 
-	  if (TARGET_DEBUG_ARG)
+	  if (GCC_OPTION (TARGET_DEBUG_ARG))
 	    {
 	      fprintf (stderr, "function_adv: words = %2d, align=%d, ",
 		       cum->words, align);
@@ -9465,7 +9465,7 @@ rs6000_function_arg_advance_1 (CUMULATIVE_ARGS *cum, enum machine_mode mode,
 	  rs6000_darwin64_record_arg_advance_flush (cum,
 						    size * BITS_PER_UNIT, 1);
 	}
-	  if (TARGET_DEBUG_ARG)
+	  if (GCC_OPTION (TARGET_DEBUG_ARG))
 	    {
 	      fprintf (stderr, "function_adv: words = %2d, align=%d, size=%d",
 		       cum->words, TYPE_ALIGN (type), size);
@@ -9528,7 +9528,7 @@ rs6000_function_arg_advance_1 (CUMULATIVE_ARGS *cum, enum machine_mode mode,
 	  cum->sysv_gregno = gregno + n_words;
 	}
 
-      if (TARGET_DEBUG_ARG)
+      if (GCC_OPTION (TARGET_DEBUG_ARG))
 	{
 	  fprintf (stderr, "function_adv: words = %2d, fregno = %2d, ",
 		   cum->words, cum->fregno);
@@ -9557,7 +9557,7 @@ rs6000_function_arg_advance_1 (CUMULATIVE_ARGS *cum, enum machine_mode mode,
 	  cum->fregno += n_elts * ((GET_MODE_SIZE (elt_mode) + 7) >> 3);
 	}
 
-      if (TARGET_DEBUG_ARG)
+      if (GCC_OPTION (TARGET_DEBUG_ARG))
 	{
 	  fprintf (stderr, "function_adv: words = %2d, fregno = %2d, ",
 		   cum->words, cum->fregno);
@@ -10195,7 +10195,7 @@ rs6000_function_arg (cumulative_args_t cum_v, enum machine_mode mode,
 	     save area?  */
 	  if (type && (cum->nargs_prototype <= 0
 		       || ((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2)
-			   && TARGET_XL_COMPAT
+			   && GCC_OPTION (TARGET_XL_COMPAT)
 			   && align_words >= GP_ARG_NUM_REG)))
 	    k = rs6000_psave_function_arg (mode, type, align_words, rvec);
 
@@ -10286,7 +10286,7 @@ rs6000_arg_partial_bytes (cumulative_args_t cum_v, enum machine_mode mode,
       if (type
 	  && (cum->nargs_prototype <= 0
 	      || ((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2)
-		  && TARGET_XL_COMPAT
+		  && GCC_OPTION (TARGET_XL_COMPAT)
 		  && align_words >= GP_ARG_NUM_REG)))
 	return 0;
 
@@ -10302,7 +10302,7 @@ rs6000_arg_partial_bytes (cumulative_args_t cum_v, enum machine_mode mode,
       && GP_ARG_NUM_REG < align_words + rs6000_arg_size (mode, type))
     ret = (GP_ARG_NUM_REG - align_words) * (TARGET_32BIT ? 4 : 8);
 
-  if (ret != 0 && TARGET_DEBUG_ARG)
+  if (ret != 0 && GCC_OPTION (TARGET_DEBUG_ARG))
     fprintf (stderr, "rs6000_arg_partial_bytes: %d\n", ret);
 
   return ret;
@@ -10329,7 +10329,7 @@ rs6000_pass_by_reference (cumulative_args_t cum ATTRIBUTE_UNUSED,
 {
   if (DEFAULT_ABI == ABI_V4 && TARGET_IEEEQUAD && mode == TFmode)
     {
-      if (TARGET_DEBUG_ARG)
+      if (GCC_OPTION (TARGET_DEBUG_ARG))
 	fprintf (stderr, "function_arg_pass_by_reference: V4 long double\n");
       return 1;
     }
@@ -10339,14 +10339,14 @@ rs6000_pass_by_reference (cumulative_args_t cum ATTRIBUTE_UNUSED,
 
   if (DEFAULT_ABI == ABI_V4 && AGGREGATE_TYPE_P (type))
     {
-      if (TARGET_DEBUG_ARG)
+      if (GCC_OPTION (TARGET_DEBUG_ARG))
 	fprintf (stderr, "function_arg_pass_by_reference: V4 aggregate\n");
       return 1;
     }
 
   if (int_size_in_bytes (type) < 0)
     {
-      if (TARGET_DEBUG_ARG)
+      if (GCC_OPTION (TARGET_DEBUG_ARG))
 	fprintf (stderr, "function_arg_pass_by_reference: variable size\n");
       return 1;
     }
@@ -10355,7 +10355,7 @@ rs6000_pass_by_reference (cumulative_args_t cum ATTRIBUTE_UNUSED,
      modes only exist for GCC vector types if -maltivec.  */
   if (TARGET_32BIT && !TARGET_ALTIVEC_ABI && ALTIVEC_VECTOR_MODE (mode))
     {
-      if (TARGET_DEBUG_ARG)
+      if (GCC_OPTION (TARGET_DEBUG_ARG))
 	fprintf (stderr, "function_arg_pass_by_reference: AltiVec\n");
       return 1;
     }
@@ -10365,7 +10365,7 @@ rs6000_pass_by_reference (cumulative_args_t cum ATTRIBUTE_UNUSED,
       && int_size_in_bytes (type) > (TARGET_ALTIVEC_ABI ? 16 : 8))
     {
       static bool warned_for_pass_big_vectors = false;
-      if (TARGET_DEBUG_ARG)
+      if (GCC_OPTION (TARGET_DEBUG_ARG))
 	fprintf (stderr, "function_arg_pass_by_reference: synthetic vector\n");
       if (!warned_for_pass_big_vectors)
 	{
@@ -10808,7 +10808,7 @@ rs6000_va_start (tree valist, rtx nextarg)
   n_fpr = MIN (crtl->args.info.fregno - FP_ARG_MIN_REG,
 	       FP_ARG_NUM_REG);
 
-  if (TARGET_DEBUG_ARG)
+  if (GCC_OPTION (TARGET_DEBUG_ARG))
     fprintf (stderr, "va_start: words = "HOST_WIDE_INT_PRINT_DEC", n_gpr = "
 	     HOST_WIDE_INT_PRINT_DEC", n_fpr = "HOST_WIDE_INT_PRINT_DEC"\n",
 	     words, n_gpr, n_fpr);
@@ -10890,9 +10890,9 @@ rs6000_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
      We can return a simplifed answer, since we know there's no offset to add.  */
 
   if (((TARGET_MACHO
-        && rs6000_darwin64_abi)
+        && GCC_OPTION (rs6000_darwin64_abi))
        || DEFAULT_ABI == ABI_ELFv2
-       || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
+       || (DEFAULT_ABI == ABI_AIX && !GCC_OPTION (rs6000_compat_align_parm)))
       && integer_zerop (TYPE_SIZE (type)))
     {
       unsigned HOST_WIDE_INT align, boundary;
@@ -11159,7 +11159,7 @@ def_builtin (const char *name, tree type, enum rs6000_builtins code)
 	 This mimics the ATTR_MATHFN_FPROUNDING attribute in
 	 builtin-attribute.def that is used for the math functions. */
       TREE_NOTHROW (t) = 1;
-      if (flag_rounding_math)
+      if (GCC_OPTION (flag_rounding_math))
 	{
 	  DECL_PURE_P (t) = 1;
 	  DECL_IS_NOVOPS (t) = 1;
@@ -12717,7 +12717,7 @@ altivec_expand_vec_ext_builtin (tree exp, rtx target)
 
   op0 = force_reg (mode0, op0);
 
-  if (optimize || !target || !register_operand (target, tmode))
+  if (GCC_OPTION (optimize) || !target || !register_operand (target, tmode))
     target = gen_reg_rtx (tmode);
 
   rs6000_expand_vector_extract (target, op0, elt);
@@ -13502,7 +13502,7 @@ rs6000_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
   rtx ret;
   bool success;
   HOST_WIDE_INT mask = rs6000_builtin_info[uns_fcode].mask;
-  bool func_valid_p = ((rs6000_builtin_mask & mask) == mask);
+  bool func_valid_p = ((GCC_OPTION (rs6000_builtin_mask) & mask) == mask);
 
   if (TARGET_DEBUG_BUILTIN)
     {
@@ -13956,7 +13956,7 @@ rs6000_builtin_decl (unsigned code, bool initialize_p ATTRIBUTE_UNUSED)
     return error_mark_node;
 
   fnmask = rs6000_builtin_info[code].mask;
-  if ((fnmask & rs6000_builtin_mask) != fnmask)
+  if ((fnmask & GCC_OPTION (rs6000_builtin_mask)) != fnmask)
     {
       rs6000_invalid_builtin ((enum rs6000_builtins)code);
       return error_mark_node;
@@ -14716,7 +14716,7 @@ altivec_init_builtins (void)
 static void
 htm_init_builtins (void)
 {
-  HOST_WIDE_INT builtin_mask = rs6000_builtin_mask;
+  HOST_WIDE_INT builtin_mask = GCC_OPTION (rs6000_builtin_mask);
   const struct builtin_description *d;
   size_t i;
 
@@ -15007,7 +15007,7 @@ rs6000_common_init_builtins (void)
   tree v2si_ftype_qi = NULL_TREE;
   tree v2si_ftype_v2si_qi = NULL_TREE;
   tree v2si_ftype_int_qi = NULL_TREE;
-  HOST_WIDE_INT builtin_mask = rs6000_builtin_mask;
+  HOST_WIDE_INT builtin_mask = GCC_OPTION (rs6000_builtin_mask);
 
   if (!TARGET_PAIRED_FLOAT)
     {
@@ -15227,7 +15227,7 @@ rs6000_init_libfuncs (void)
 {
   if (!TARGET_IEEEQUAD)
       /* AIX/Darwin/64-bit Linux quad floating point routines.  */
-    if (!TARGET_XL_COMPAT)
+    if (!GCC_OPTION (TARGET_XL_COMPAT))
       {
 	set_optab_libfunc (add_optab, TFmode, "__gcc_qadd");
 	set_optab_libfunc (sub_optab, TFmode, "__gcc_qsub");
@@ -15341,9 +15341,9 @@ expand_block_clear (rtx operands[])
   else
     clear_step = 4;
 
-  if (optimize_size && bytes > 3 * clear_step)
+  if (GCC_OPTION (optimize_size) && bytes > 3 * clear_step)
     return 0;
-  if (! optimize_size && bytes > 8 * clear_step)
+  if (! GCC_OPTION (optimize_size) && bytes > 8 * clear_step)
     return 0;
 
   for (offset = 0; bytes > 0; offset += clear_bytes, bytes -= clear_bytes)
@@ -15432,7 +15432,7 @@ expand_block_move (rtx operands[])
   if (bytes <= 0)
     return 1;
 
-  if (bytes > rs6000_block_move_inline_limit)
+  if (bytes > GCC_OPTION (rs6000_block_move_inline_limit))
     return 0;
 
   for (offset = 0; bytes > 0; offset += move_bytes, bytes -= move_bytes)
@@ -15664,7 +15664,7 @@ validate_condition_mode (enum rtx_code code, enum machine_mode mode)
   /* These should never be generated except for
      flag_finite_math_only.  */
   gcc_assert (mode != CCFPmode
-	      || flag_finite_math_only
+	      || GCC_OPTION (flag_finite_math_only)
 	      || (code != LE && code != GE
 		  && code != UNEQ && code != LTGT
 		  && code != UNGT && code != UNLT));
@@ -15909,7 +15909,7 @@ rs6000_secondary_memory_needed_rtx (enum machine_mode mode)
       ret = mem;
     }
 
-  if (TARGET_DEBUG_ADDR)
+  if (GCC_OPTION (TARGET_DEBUG_ADDR))
     {
       fprintf (stderr, "\nrs6000_secondary_memory_needed_rtx, mode %s, rtx:\n",
 	       GET_MODE_NAME (mode));
@@ -16435,7 +16435,7 @@ rs6000_secondary_reload (bool in_p,
 
   gcc_assert (ret != ALL_REGS);
 
-  if (TARGET_DEBUG_ADDR)
+  if (GCC_OPTION (TARGET_DEBUG_ADDR))
     {
       fprintf (stderr,
 	       "\nrs6000_secondary_reload, return %s, in_p = %s, rclass = %s, "
@@ -16507,7 +16507,7 @@ rs6000_secondary_reload_inner (rtx reg, rtx mem, rtx scratch, bool store_p)
   rtx and_rtx;
   rtx cc_clobber;
 
-  if (TARGET_DEBUG_ADDR)
+  if (GCC_OPTION (TARGET_DEBUG_ADDR))
     rs6000_secondary_reload_trace (__LINE__, reg, mem, scratch, store_p);
 
   if (regno < 0 || regno >= FIRST_PSEUDO_REGISTER)
@@ -16558,7 +16558,7 @@ rs6000_secondary_reload_inner (rtx reg, rtx mem, rtx scratch, bool store_p)
 	      && (GET_CODE (addr_op2) != CONST_INT
 		  || !satisfies_constraint_I (addr_op2)))
 	    {
-	      if (TARGET_DEBUG_ADDR)
+	      if (GCC_OPTION (TARGET_DEBUG_ADDR))
 		{
 		  fprintf (stderr,
 			   "\nMove plus addr to register %s, mode = %s: ",
@@ -16583,7 +16583,7 @@ rs6000_secondary_reload_inner (rtx reg, rtx mem, rtx scratch, bool store_p)
 	       && !rs6000_legitimate_offset_address_p (PTImode, addr,
 						       false, true))
 	{
-	  if (TARGET_DEBUG_ADDR)
+	  if (GCC_OPTION (TARGET_DEBUG_ADDR))
 	    {
 	      fprintf (stderr, "\nMove addr to register %s, mode = %s: ",
 		       rs6000_reg_names[REGNO (scratch_or_premodify)],
@@ -16662,7 +16662,7 @@ rs6000_secondary_reload_inner (rtx reg, rtx mem, rtx scratch, bool store_p)
 	  if (!REG_P (addr_op1))
 	    rs6000_secondary_reload_fail (__LINE__, reg, mem, scratch, store_p);
 
-	  if (TARGET_DEBUG_ADDR)
+	  if (GCC_OPTION (TARGET_DEBUG_ADDR))
 	    {
 	      fprintf (stderr, "\nMove plus addr to register %s, mode = %s: ",
 		       rs6000_reg_names[REGNO (scratch)], GET_MODE_NAME (mode));
@@ -16682,7 +16682,7 @@ rs6000_secondary_reload_inner (rtx reg, rtx mem, rtx scratch, bool store_p)
 	       || GET_CODE (addr) == CONST_INT || GET_CODE (addr) == LO_SUM
 	       || REG_P (addr))
 	{
-	  if (TARGET_DEBUG_ADDR)
+	  if (GCC_OPTION (TARGET_DEBUG_ADDR))
 	    {
 	      fprintf (stderr, "\nMove addr to register %s, mode = %s: ",
 		       rs6000_reg_names[REGNO (scratch_or_premodify)],
@@ -16726,7 +16726,7 @@ rs6000_secondary_reload_inner (rtx reg, rtx mem, rtx scratch, bool store_p)
 	  addr = scratch;
 	}
 
-      if (TARGET_DEBUG_ADDR)
+      if (GCC_OPTION (TARGET_DEBUG_ADDR))
 	{
 	  fprintf (stderr, "\nAnd addr to register %s, mode = %s: ",
 		   rs6000_reg_names[REGNO (scratch)], GET_MODE_NAME (mode));
@@ -16749,7 +16749,7 @@ rs6000_secondary_reload_inner (rtx reg, rtx mem, rtx scratch, bool store_p)
   if (addr != XEXP (mem, 0))
     {
       mem = replace_equiv_address_nv (mem, addr);
-      if (TARGET_DEBUG_ADDR)
+      if (GCC_OPTION (TARGET_DEBUG_ADDR))
 	fprintf (stderr, "\nrs6000_secondary_reload_inner, mem adjusted.\n");
     }
 
@@ -16774,7 +16774,7 @@ rs6000_secondary_reload_gpr (rtx reg, rtx mem, rtx scratch, bool store_p)
   rtx addr;
   rtx scratch_or_premodify = scratch;
 
-  if (TARGET_DEBUG_ADDR)
+  if (GCC_OPTION (TARGET_DEBUG_ADDR))
     {
       fprintf (stderr, "\nrs6000_secondary_reload_gpr, type = %s\n",
 	       store_p ? "store" : "load");
@@ -17352,7 +17352,7 @@ rs6000_output_move_128bit (rtx operands[])
 	return output_vec_const_move (operands);
     }
 
-  if (TARGET_DEBUG_ADDR)
+  if (GCC_OPTION (TARGET_DEBUG_ADDR))
     {
       fprintf (stderr, "\n===== Bad 128 bit move:\n");
       debug_rtx (gen_rtx_SET (VOIDmode, dest, src));
@@ -17619,8 +17619,8 @@ rs6000_output_function_entry (FILE *file, const char *fname)
 /* Print an operand.  Recognize special options, documented below.  */
 
 #if TARGET_ELF
-#define SMALL_DATA_RELOC ((rs6000_sdata == SDATA_EABI) ? "sda21" : "sdarel")
-#define SMALL_DATA_REG ((rs6000_sdata == SDATA_EABI) ? 0 : 13)
+#define SMALL_DATA_RELOC ((GCC_OPTION (rs6000_sdata) == SDATA_EABI) ? "sda21" : "sdarel")
+#define SMALL_DATA_REG ((GCC_OPTION (rs6000_sdata) == SDATA_EABI) ? 0 : 13)
 #else
 #define SMALL_DATA_RELOC "sda21"
 #define SMALL_DATA_REG 0
@@ -18458,7 +18458,7 @@ rs6000_reverse_condition (enum machine_mode mode, enum rtx_code code)
   /* Reversal of FP compares takes care -- an ordered compare
      becomes an unordered compare and vice versa.  */
   if (mode == CCFPmode
-      && (!flag_finite_math_only
+      && (!GCC_OPTION (flag_finite_math_only)
 	  || code == UNLT || code == UNLE || code == UNGT || code == UNGE
 	  || code == UNEQ || code == LTGT))
     return reverse_condition_maybe_unordered (code);
@@ -18550,19 +18550,19 @@ rs6000_generate_compare (rtx cmp, enum machine_mode mode)
 	  switch (op_mode)
 	    {
 	    case SFmode:
-	      cmp = (flag_finite_math_only && !flag_trapping_math)
+	      cmp = (GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))
 		? gen_tstsfeq_gpr (compare_result, op0, op1)
 		: gen_cmpsfeq_gpr (compare_result, op0, op1);
 	      break;
 
 	    case DFmode:
-	      cmp = (flag_finite_math_only && !flag_trapping_math)
+	      cmp = (GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))
 		? gen_tstdfeq_gpr (compare_result, op0, op1)
 		: gen_cmpdfeq_gpr (compare_result, op0, op1);
 	      break;
 
 	    case TFmode:
-	      cmp = (flag_finite_math_only && !flag_trapping_math)
+	      cmp = (GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))
 		? gen_tsttfeq_gpr (compare_result, op0, op1)
 		: gen_cmptfeq_gpr (compare_result, op0, op1);
 	      break;
@@ -18577,19 +18577,19 @@ rs6000_generate_compare (rtx cmp, enum machine_mode mode)
 	  switch (op_mode)
 	    {
 	    case SFmode:
-	      cmp = (flag_finite_math_only && !flag_trapping_math)
+	      cmp = (GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))
 		? gen_tstsfgt_gpr (compare_result, op0, op1)
 		: gen_cmpsfgt_gpr (compare_result, op0, op1);
 	      break;
 
 	    case DFmode:
-	      cmp = (flag_finite_math_only && !flag_trapping_math)
+	      cmp = (GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))
 		? gen_tstdfgt_gpr (compare_result, op0, op1)
 		: gen_cmpdfgt_gpr (compare_result, op0, op1);
 	      break;
 
 	    case TFmode:
-	      cmp = (flag_finite_math_only && !flag_trapping_math)
+	      cmp = (GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))
 		? gen_tsttfgt_gpr (compare_result, op0, op1)
 		: gen_cmptfgt_gpr (compare_result, op0, op1);
 	      break;
@@ -18604,19 +18604,19 @@ rs6000_generate_compare (rtx cmp, enum machine_mode mode)
 	  switch (op_mode)
 	    {
 	    case SFmode:
-	      cmp = (flag_finite_math_only && !flag_trapping_math)
+	      cmp = (GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))
 		? gen_tstsflt_gpr (compare_result, op0, op1)
 		: gen_cmpsflt_gpr (compare_result, op0, op1);
 	      break;
 
 	    case DFmode:
-	      cmp = (flag_finite_math_only && !flag_trapping_math)
+	      cmp = (GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))
 		? gen_tstdflt_gpr (compare_result, op0, op1)
 		: gen_cmpdflt_gpr (compare_result, op0, op1);
 	      break;
 
 	    case TFmode:
-	      cmp = (flag_finite_math_only && !flag_trapping_math)
+	      cmp = (GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))
 		? gen_tsttflt_gpr (compare_result, op0, op1)
 		: gen_cmptflt_gpr (compare_result, op0, op1);
 	      break;
@@ -18641,19 +18641,19 @@ rs6000_generate_compare (rtx cmp, enum machine_mode mode)
 	  switch (op_mode)
 	    {
 	    case SFmode:
-	      cmp = (flag_finite_math_only && !flag_trapping_math)
+	      cmp = (GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))
 		? gen_tstsfeq_gpr (compare_result2, op0, op1)
 		: gen_cmpsfeq_gpr (compare_result2, op0, op1);
 	      break;
 
 	    case DFmode:
-	      cmp = (flag_finite_math_only && !flag_trapping_math)
+	      cmp = (GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))
 		? gen_tstdfeq_gpr (compare_result2, op0, op1)
 		: gen_cmpdfeq_gpr (compare_result2, op0, op1);
 	      break;
 
 	    case TFmode:
-	      cmp = (flag_finite_math_only && !flag_trapping_math)
+	      cmp = (GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))
 		? gen_tsttfeq_gpr (compare_result2, op0, op1)
 		: gen_cmptfeq_gpr (compare_result2, op0, op1);
 	      break;
@@ -18679,7 +18679,7 @@ rs6000_generate_compare (rtx cmp, enum machine_mode mode)
     {
       /* Generate XLC-compatible TFmode compare as PARALLEL with extra
 	 CLOBBERs to match cmptf_internal2 pattern.  */
-      if (comp_mode == CCFPmode && TARGET_XL_COMPAT
+      if (comp_mode == CCFPmode && GCC_OPTION (TARGET_XL_COMPAT)
 	  && GET_MODE (op0) == TFmode
 	  && !TARGET_IEEEQUAD
 	  && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128)
@@ -18716,7 +18716,7 @@ rs6000_generate_compare (rtx cmp, enum machine_mode mode)
   /* Some kinds of FP comparisons need an OR operation;
      under flag_finite_math_only we don't bother.  */
   if (FLOAT_MODE_P (mode)
-      && !flag_finite_math_only
+      && !GCC_OPTION (flag_finite_math_only)
       && !(TARGET_HARD_FLOAT && !TARGET_FPRS)
       && (code == LE || code == GE
 	  || code == UNEQ || code == LTGT
@@ -18945,7 +18945,7 @@ output_cbranch (rtx op, const char *label, int reversed, rtx insn)
 	 assume not taken for branches that are very close to 50% as a
 	 mispredicted taken branch is more expensive than a
 	 mispredicted not-taken branch.  */
-      if (rs6000_always_hint
+      if (GCC_OPTION (rs6000_always_hint)
 	  || (abs (prob) > REG_BR_PROB_BASE / 100 * 48
 	      && br_prob_note_reliable_p (note)))
 	{
@@ -19294,7 +19294,7 @@ rs6000_emit_cmove (rtx dest, rtx op, rtx true_cond, rtx false_cond)
      of the construct is zero, since then no subtract will be
      generated.  */
   if (SCALAR_FLOAT_MODE_P (compare_mode)
-      && flag_trapping_math && ! is_against_zero)
+      && GCC_OPTION (flag_trapping_math) && ! is_against_zero)
     return 0;
 
   /* Eliminate half of the comparisons by switching operands, this
@@ -20327,14 +20327,14 @@ first_reg_to_save (void)
       break;
 
   if (first_reg > RS6000_PIC_OFFSET_TABLE_REGNUM
-      && ((DEFAULT_ABI == ABI_V4 && flag_pic != 0)
-	  || (DEFAULT_ABI == ABI_DARWIN && flag_pic)
+      && ((DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic) != 0)
+	  || (DEFAULT_ABI == ABI_DARWIN && GCC_OPTION (flag_pic))
 	  || (TARGET_TOC && TARGET_MINIMAL_TOC))
       && df_regs_ever_live_p (RS6000_PIC_OFFSET_TABLE_REGNUM))
     first_reg = RS6000_PIC_OFFSET_TABLE_REGNUM;
 
 #if TARGET_MACHO
-  if (flag_pic
+  if (GCC_OPTION (flag_pic)
       && crtl->uses_pic_offset_table
       && first_reg > RS6000_PIC_OFFSET_TABLE_REGNUM)
     return RS6000_PIC_OFFSET_TABLE_REGNUM;
@@ -20560,7 +20560,7 @@ rs6000_savres_strategy (rs6000_stack_t *info,
   /* Define cutoff for using out-of-line functions to save registers.  */
   if (DEFAULT_ABI == ABI_V4 || TARGET_ELF)
     {
-      if (!optimize_size)
+      if (!GCC_OPTION (optimize_size))
 	{
 	  strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS;
 	  strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS;
@@ -20856,8 +20856,8 @@ rs6000_stack_info (void)
      get at a constant; if so, it will have already created a constant
      pool entry for it.  */
   if (((TARGET_TOC && TARGET_MINIMAL_TOC)
-       || (flag_pic == 1 && DEFAULT_ABI == ABI_V4)
-       || (flag_pic && DEFAULT_ABI == ABI_DARWIN))
+       || (GCC_OPTION (flag_pic) == 1 && DEFAULT_ABI == ABI_V4)
+       || (GCC_OPTION (flag_pic) && DEFAULT_ABI == ABI_DARWIN))
       && crtl->uses_const_pool
       && info_ptr->first_gp_reg_save > RS6000_PIC_OFFSET_TABLE_REGNUM)
     first_gp = RS6000_PIC_OFFSET_TABLE_REGNUM;
@@ -20955,7 +20955,7 @@ rs6000_stack_info (void)
   else
     info_ptr->vrsave_mask = 0;
 
-  if (TARGET_ALTIVEC_VRSAVE && info_ptr->vrsave_mask)
+  if (GCC_OPTION (TARGET_ALTIVEC_VRSAVE) && info_ptr->vrsave_mask)
     info_ptr->vrsave_size  = 4;
   else
     info_ptr->vrsave_size  = 0;
@@ -21126,7 +21126,7 @@ rs6000_stack_info (void)
   else if (frame_pointer_needed)
     info_ptr->push_p = 1;
 
-  else if (TARGET_XCOFF && write_symbols != NO_DEBUG)
+  else if (TARGET_XCOFF && GCC_OPTION (write_symbols) != NO_DEBUG)
     info_ptr->push_p = 1;
 
   else
@@ -21143,7 +21143,7 @@ rs6000_stack_info (void)
     info_ptr->altivec_save_offset = 0;
 
   /* Zero VRSAVE offset if not saved and restored.  */
-  if (! TARGET_ALTIVEC_VRSAVE || info_ptr->vrsave_mask == 0)
+  if (! GCC_OPTION (TARGET_ALTIVEC_VRSAVE) || info_ptr->vrsave_mask == 0)
     info_ptr->vrsave_save_offset = 0;
 
   if (! TARGET_SPE_ABI
@@ -21347,7 +21347,7 @@ rs6000_return_addr (int count, rtx frame)
      code and for PIC code the code can be actually quite bad, so
      don't try to be too clever here.  */
   if (count != 0
-      || ((DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_DARWIN) && flag_pic))
+      || ((DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_DARWIN) && GCC_OPTION (flag_pic)))
     {
       cfun->machine->ra_needs_full_frame = 1;
 
@@ -21382,7 +21382,7 @@ rs6000_function_ok_for_sibcall (tree decl, tree exp)
   /* We can't do it if the called function has more vector parameters
      than the current function; there's nowhere to put the VRsave code.  */
   if (TARGET_ALTIVEC_ABI
-      && TARGET_ALTIVEC_VRSAVE
+      && GCC_OPTION (TARGET_ALTIVEC_VRSAVE)
       && !(decl && decl == current_function_decl))
     {
       function_args_iterator args_iter;
@@ -21418,7 +21418,7 @@ rs6000_function_ok_for_sibcall (tree decl, tree exp)
 	  && (*targetm.binds_local_p) (decl))
       || (DEFAULT_ABI == ABI_V4
 	  && (!TARGET_SECURE_PLT
-	      || !flag_pic
+	      || !GCC_OPTION (flag_pic)
 	      || (decl
 		  && (*targetm.binds_local_p) (decl)))))
     {
@@ -21495,7 +21495,7 @@ rs6000_emit_load_toc_table (int fromprolog)
   rtx dest;
   dest = gen_rtx_REG (Pmode, RS6000_PIC_OFFSET_TABLE_REGNUM);
 
-  if (TARGET_ELF && TARGET_SECURE_PLT && DEFAULT_ABI == ABI_V4 && flag_pic)
+  if (TARGET_ELF && TARGET_SECURE_PLT && DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic))
     {
       char buf[30];
       rtx lab, tmp1, tmp2, got;
@@ -21503,7 +21503,7 @@ rs6000_emit_load_toc_table (int fromprolog)
       lab = gen_label_rtx ();
       ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (lab));
       lab = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf));
-      if (flag_pic == 2)
+      if (GCC_OPTION (flag_pic) == 2)
 	got = gen_rtx_SYMBOL_REF (Pmode, toc_label_name);
       else
 	got = rs6000_got_sym ();
@@ -21518,12 +21518,12 @@ rs6000_emit_load_toc_table (int fromprolog)
       emit_insn (gen_load_toc_v4_PIC_3b (tmp2, tmp1, got, lab));
       emit_insn (gen_load_toc_v4_PIC_3c (dest, tmp2, got, lab));
     }
-  else if (TARGET_ELF && DEFAULT_ABI == ABI_V4 && flag_pic == 1)
+  else if (TARGET_ELF && DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic) == 1)
     {
       emit_insn (gen_load_toc_v4_pic_si ());
       emit_move_insn (dest, gen_rtx_REG (Pmode, LR_REGNO));
     }
-  else if (TARGET_ELF && DEFAULT_ABI == ABI_V4 && flag_pic == 2)
+  else if (TARGET_ELF && DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic) == 2)
     {
       char buf[30];
       rtx temp0 = (fromprolog
@@ -21558,7 +21558,7 @@ rs6000_emit_load_toc_table (int fromprolog)
 	}
       emit_insn (gen_addsi3 (dest, temp0, dest));
     }
-  else if (TARGET_ELF && !TARGET_AIX && flag_pic == 0 && TARGET_MINIMAL_TOC)
+  else if (TARGET_ELF && !TARGET_AIX && GCC_OPTION (flag_pic) == 0 && TARGET_MINIMAL_TOC)
     {
       /* This is for AIX code running in non-PIC ELF32.  */
       char buf[30];
@@ -21671,7 +21671,7 @@ create_TOC_reference (rtx symbol, rtx largetoc_reg)
 {
   rtx tocrel, tocreg, hi;
 
-  if (TARGET_DEBUG_ADDR)
+  if (GCC_OPTION (TARGET_DEBUG_ADDR))
     {
       if (GET_CODE (symbol) == SYMBOL_REF)
 	fprintf (stderr, "\ncreate_TOC_reference, (symbol_ref %s)\n",
@@ -22571,12 +22571,12 @@ rs6000_reg_live_or_pic_offset_p (int reg)
   return (((crtl->calls_eh_return || df_regs_ever_live_p (reg))
            && (!call_used_regs[reg]
                || (reg == RS6000_PIC_OFFSET_TABLE_REGNUM
-		   && !TARGET_SINGLE_PIC_BASE
+		   && !GCC_OPTION (TARGET_SINGLE_PIC_BASE)
                    && TARGET_TOC && TARGET_MINIMAL_TOC)))
           || (reg == RS6000_PIC_OFFSET_TABLE_REGNUM
-	      && !TARGET_SINGLE_PIC_BASE
-              && ((DEFAULT_ABI == ABI_V4 && flag_pic != 0)
-                  || (DEFAULT_ABI == ABI_DARWIN && flag_pic))));
+	      && !GCC_OPTION (TARGET_SINGLE_PIC_BASE)
+              && ((DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic) != 0)
+                  || (DEFAULT_ABI == ABI_DARWIN && GCC_OPTION (flag_pic)))));
 }
 
 /* Emit function prologue as insns.  */
@@ -22628,16 +22628,16 @@ rs6000_emit_prologue (void)
       cfun->machine->r2_setup_needed = df_regs_ever_live_p (TOC_REGNUM);
 
       /* With -mminimal-toc we may generate an extra use of r2 below.  */
-      if (!TARGET_SINGLE_PIC_BASE
+      if (!GCC_OPTION (TARGET_SINGLE_PIC_BASE)
 	  && TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0)
 	cfun->machine->r2_setup_needed = true;
     }
 
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = info->total_size;
 
-  if (flag_stack_check == STATIC_BUILTIN_STACK_CHECK)
+  if (GCC_OPTION (flag_stack_check) == STATIC_BUILTIN_STACK_CHECK)
     {
       HOST_WIDE_INT size = info->total_size;
 
@@ -23426,7 +23426,7 @@ rs6000_emit_prologue (void)
 
   if (!WORLD_SAVE_P (info)
       && TARGET_ALTIVEC
-      && TARGET_ALTIVEC_VRSAVE
+      && GCC_OPTION (TARGET_ALTIVEC_VRSAVE)
       && info->vrsave_mask != 0)
     {
       rtx reg, vrsave;
@@ -23466,10 +23466,10 @@ rs6000_emit_prologue (void)
     }
 
   /* If we are using RS6000_PIC_OFFSET_TABLE_REGNUM, we need to set it up.  */
-  if (!TARGET_SINGLE_PIC_BASE
+  if (!GCC_OPTION (TARGET_SINGLE_PIC_BASE)
       && ((TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0)
 	  || (DEFAULT_ABI == ABI_V4
-	      && (flag_pic == 1 || (flag_pic && TARGET_SECURE_PLT))
+	      && (GCC_OPTION (flag_pic) == 1 || (GCC_OPTION (flag_pic) && TARGET_SECURE_PLT))
 	      && df_regs_ever_live_p (RS6000_PIC_OFFSET_TABLE_REGNUM))))
     {
       /* If emit_load_toc_table will use the link register, we need to save
@@ -23478,7 +23478,7 @@ rs6000_emit_prologue (void)
 	 from the procedure more often.  */
       int save_LR_around_toc_setup = (TARGET_ELF
 				      && DEFAULT_ABI == ABI_V4
-				      && flag_pic
+				      && GCC_OPTION (flag_pic)
 				      && ! info->lr_save_p
 				      && EDGE_COUNT (EXIT_BLOCK_PTR_FOR_FN (cfun)->preds) > 0);
       if (save_LR_around_toc_setup)
@@ -23500,9 +23500,9 @@ rs6000_emit_prologue (void)
     }
 
 #if TARGET_MACHO
-  if (!TARGET_SINGLE_PIC_BASE
+  if (!GCC_OPTION (TARGET_SINGLE_PIC_BASE)
       && DEFAULT_ABI == ABI_DARWIN
-      && flag_pic && crtl->uses_pic_offset_table)
+      && GCC_OPTION (flag_pic) && crtl->uses_pic_offset_table)
     {
       rtx lr = gen_rtx_REG (Pmode, LR_REGNO);
       rtx src = gen_rtx_SYMBOL_REF (Pmode, MACHOPIC_FUNCTION_BASE_NAME);
@@ -23551,7 +23551,7 @@ rs6000_output_function_prologue (FILE *file,
 {
   rs6000_stack_t *info = rs6000_stack_info ();
 
-  if (TARGET_DEBUG_STACK)
+  if (GCC_OPTION (TARGET_DEBUG_STACK))
     debug_stack_info (info);
 
   /* Write .extern for any function we will call to save and restore
@@ -23698,7 +23698,7 @@ restore_saved_cr (rtx reg, int using_mfcr_multiple, bool exit_func)
 
       /* For the ELFv2 ABI we generate a CFA_RESTORE for each
 	 CR field separately.  */
-      if (!exit_func && DEFAULT_ABI == ABI_ELFv2 && flag_shrink_wrap)
+      if (!exit_func && DEFAULT_ABI == ABI_ELFv2 && GCC_OPTION (flag_shrink_wrap))
 	{
 	  for (i = 0; i < 8; i++)
 	    if (save_reg_p (CR0_REGNO + i))
@@ -23718,7 +23718,7 @@ restore_saved_cr (rtx reg, int using_mfcr_multiple, bool exit_func)
 	  /* For the ELFv2 ABI we generate a CFA_RESTORE for each
 	     CR field separately, attached to the insn that in fact
 	     restores this particular CR field.  */
-	  if (!exit_func && DEFAULT_ABI == ABI_ELFv2 && flag_shrink_wrap)
+	  if (!exit_func && DEFAULT_ABI == ABI_ELFv2 && GCC_OPTION (flag_shrink_wrap))
 	    {
 	      add_reg_note (insn, REG_CFA_RESTORE,
 			    gen_rtx_REG (SImode, CR0_REGNO + i));
@@ -23729,7 +23729,7 @@ restore_saved_cr (rtx reg, int using_mfcr_multiple, bool exit_func)
 
   /* For other ABIs, we just generate a single CFA_RESTORE for CR2.  */
   if (!exit_func && DEFAULT_ABI != ABI_ELFv2
-      && (DEFAULT_ABI == ABI_V4 || flag_shrink_wrap))
+      && (DEFAULT_ABI == ABI_V4 || GCC_OPTION (flag_shrink_wrap)))
     {
       rtx insn = get_last_insn ();
       rtx cr = gen_rtx_REG (SImode, CR2_REGNO);
@@ -23760,7 +23760,7 @@ restore_saved_lr (int regno, bool exit_func)
   rtx lr = gen_rtx_REG (Pmode, LR_REGNO);
   rtx insn = emit_move_insn (lr, reg);
 
-  if (!exit_func && flag_shrink_wrap)
+  if (!exit_func && GCC_OPTION (flag_shrink_wrap))
     {
       add_reg_note (insn, REG_CFA_RESTORE, lr);
       RTX_FRAME_RELATED_P (insn) = 1;
@@ -23856,10 +23856,10 @@ rs6000_emit_epilogue (int sibcall)
   using_load_multiple = strategy & SAVRES_MULTIPLE;
   restoring_FPRs_inline = sibcall || (strategy & REST_INLINE_FPRS);
   restoring_GPRs_inline = sibcall || (strategy & REST_INLINE_GPRS);
-  using_mtcr_multiple = (rs6000_cpu == PROCESSOR_PPC601
-			 || rs6000_cpu == PROCESSOR_PPC603
-			 || rs6000_cpu == PROCESSOR_PPC750
-			 || optimize_size);
+  using_mtcr_multiple = (GCC_OPTION (rs6000_cpu) == PROCESSOR_PPC601
+			 || GCC_OPTION (rs6000_cpu) == PROCESSOR_PPC603
+			 || GCC_OPTION (rs6000_cpu) == PROCESSOR_PPC750
+			 || GCC_OPTION (optimize_size));
   /* Restore via the backchain when we have a large frame, since this
      is more efficient than an addis, addi pair.  The second condition
      here will not trigger at the moment;  We don't actually need a
@@ -23915,7 +23915,7 @@ rs6000_emit_epilogue (int sibcall)
 	rtx reg = gen_rtx_REG (SImode, CR2_REGNO);
 	RTVEC_ELT (p, j++)
 	  = gen_frame_load (reg, frame_reg_rtx, info->cr_save_offset);
-	if (flag_shrink_wrap)
+	if (GCC_OPTION (flag_shrink_wrap))
 	  {
 	    cfa_restores = alloc_reg_note (REG_CFA_RESTORE,
 					   gen_rtx_REG (Pmode, LR_REGNO),
@@ -23930,7 +23930,7 @@ rs6000_emit_epilogue (int sibcall)
 	  RTVEC_ELT (p, j++)
 	    = gen_frame_load (reg,
 			      frame_reg_rtx, info->gp_save_offset + reg_size * i);
-	  if (flag_shrink_wrap)
+	  if (GCC_OPTION (flag_shrink_wrap))
 	    cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, cfa_restores);
 	}
       for (i = 0; info->first_altivec_reg_save + i <= LAST_ALTIVEC_REGNO; i++)
@@ -23939,7 +23939,7 @@ rs6000_emit_epilogue (int sibcall)
 	  RTVEC_ELT (p, j++)
 	    = gen_frame_load (reg,
 			      frame_reg_rtx, info->altivec_save_offset + 16 * i);
-	  if (flag_shrink_wrap)
+	  if (GCC_OPTION (flag_shrink_wrap))
 	    cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, cfa_restores);
 	}
       for (i = 0; info->first_fp_reg_save + i <= 63; i++)
@@ -23949,7 +23949,7 @@ rs6000_emit_epilogue (int sibcall)
 				 info->first_fp_reg_save + i);
 	  RTVEC_ELT (p, j++)
 	    = gen_frame_load (reg, frame_reg_rtx, info->fp_save_offset + 8 * i);
-	  if (flag_shrink_wrap)
+	  if (GCC_OPTION (flag_shrink_wrap))
 	    cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, cfa_restores);
 	}
       RTVEC_ELT (p, j++)
@@ -23964,7 +23964,7 @@ rs6000_emit_epilogue (int sibcall)
 	= gen_rtx_USE (VOIDmode, gen_rtx_REG (SImode, 10));
       insn = emit_jump_insn (gen_rtx_PARALLEL (VOIDmode, p));
 
-      if (flag_shrink_wrap)
+      if (GCC_OPTION (flag_shrink_wrap))
 	{
 	  REG_NOTES (insn) = cfa_restores;
 	  add_reg_note (insn, REG_CFA_DEF_CFA, sp_reg_rtx);
@@ -24053,7 +24053,7 @@ rs6000_emit_epilogue (int sibcall)
       for (i = info->first_altivec_reg_save; i <= LAST_ALTIVEC_REGNO; ++i)
 	if (((strategy & REST_INLINE_VRS) == 0
 	     || (info->vrsave_mask & ALTIVEC_REG_BIT (i)) != 0)
-	    && (flag_shrink_wrap
+	    && (GCC_OPTION (flag_shrink_wrap)
 		|| (offset_below_red_zone_p
 		    (info->altivec_save_offset
 		     + 16 * (i - info->first_altivec_reg_save)))))
@@ -24065,7 +24065,7 @@ rs6000_emit_epilogue (int sibcall)
 
   /* Restore VRSAVE if we must do so before adjusting the stack.  */
   if (TARGET_ALTIVEC
-      && TARGET_ALTIVEC_VRSAVE
+      && GCC_OPTION (TARGET_ALTIVEC_VRSAVE)
       && info->vrsave_mask != 0
       && (ALWAYS_RESTORE_ALTIVEC_BEFORE_POP
 	  || (DEFAULT_ABI != ABI_V4
@@ -24251,7 +24251,7 @@ rs6000_emit_epilogue (int sibcall)
       for (i = info->first_altivec_reg_save; i <= LAST_ALTIVEC_REGNO; ++i)
 	if (((strategy & REST_INLINE_VRS) == 0
 	     || (info->vrsave_mask & ALTIVEC_REG_BIT (i)) != 0)
-	    && (DEFAULT_ABI == ABI_V4 || flag_shrink_wrap))
+	    && (DEFAULT_ABI == ABI_V4 || GCC_OPTION (flag_shrink_wrap)))
 	  {
 	    rtx reg = gen_rtx_REG (V4SImode, i);
 	    cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, cfa_restores);
@@ -24261,7 +24261,7 @@ rs6000_emit_epilogue (int sibcall)
   /* Restore VRSAVE if we have not done so already.  */
   if (!ALWAYS_RESTORE_ALTIVEC_BEFORE_POP
       && TARGET_ALTIVEC
-      && TARGET_ALTIVEC_VRSAVE
+      && GCC_OPTION (TARGET_ALTIVEC_VRSAVE)
       && info->vrsave_mask != 0
       && (DEFAULT_ABI == ABI_V4
 	  || !offset_below_red_zone_p (info->vrsave_save_offset)))
@@ -24300,7 +24300,7 @@ rs6000_emit_epilogue (int sibcall)
 	    insn = emit_insn (gen_movsi_to_cr_one
 				(gen_rtx_REG (CCmode, CR0_REGNO + i), reg));
 
-	    if (!exit_func && flag_shrink_wrap)
+	    if (!exit_func && GCC_OPTION (flag_shrink_wrap))
 	      {
 		add_reg_note (insn, REG_CFA_RESTORE,
 			      gen_rtx_REG (SImode, CR0_REGNO + i));
@@ -24490,7 +24490,7 @@ rs6000_emit_epilogue (int sibcall)
 		      info->gp_save_offset + frame_off + reg_size * i));
     }
 
-  if (DEFAULT_ABI == ABI_V4 || flag_shrink_wrap)
+  if (DEFAULT_ABI == ABI_V4 || GCC_OPTION (flag_shrink_wrap))
     {
       /* If the frame pointer was used then we can't delay emitting
 	 a REG_CFA_DEF_CFA note.  This must happen on the insn that
@@ -24516,7 +24516,7 @@ rs6000_emit_epilogue (int sibcall)
 	 on the last instruction here that actually does a restore:
 	 That insn may be reordered with respect to others doing
 	 restores.  */
-      if (flag_shrink_wrap
+      if (GCC_OPTION (flag_shrink_wrap)
 	  && !restoring_GPRs_inline
 	  && info->first_fp_reg_save == 64)
 	cfa_restores = add_crlr_cfa_restore (info, cfa_restores);
@@ -24557,7 +24557,7 @@ rs6000_emit_epilogue (int sibcall)
 				 info->first_fp_reg_save + i);
 	  emit_insn (gen_frame_load (reg, frame_reg_rtx,
 				     info->fp_save_offset + frame_off + 8 * i));
-	  if (DEFAULT_ABI == ABI_V4 || flag_shrink_wrap)
+	  if (DEFAULT_ABI == ABI_V4 || GCC_OPTION (flag_shrink_wrap))
 	    cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, cfa_restores);
 	}
 
@@ -24644,7 +24644,7 @@ rs6000_emit_epilogue (int sibcall)
 	  int reg;
 	  rtx sym;
 
-	  if (flag_shrink_wrap)
+	  if (GCC_OPTION (flag_shrink_wrap))
 	    cfa_restores = add_crlr_cfa_restore (info, cfa_restores);
 
 	  sym = rs6000_savres_routine_sym (info,
@@ -24659,7 +24659,7 @@ rs6000_emit_epilogue (int sibcall)
 
 	      RTVEC_ELT (p, i + 4)
 		= gen_frame_load (reg, sp_reg_rtx, info->fp_save_offset + 8 * i);
-	      if (flag_shrink_wrap)
+	      if (GCC_OPTION (flag_shrink_wrap))
 		cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg,
 					       cfa_restores);
 	    }
@@ -24731,8 +24731,8 @@ rs6000_output_function_epilogue (FILE *file,
      System V.4 Powerpc's (and the embedded ABI derived from it) use a
      different traceback table.  */
   if ((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2)
-      && ! flag_inhibit_size_directive
-      && rs6000_traceback != traceback_none && !cfun->is_thunk)
+      && ! GCC_OPTION (flag_inhibit_size_directive)
+      && GCC_OPTION (rs6000_traceback) != traceback_none && !cfun->is_thunk)
     {
       const char *fname = NULL;
       const char *language_string = lang_hooks.name;
@@ -24741,12 +24741,12 @@ rs6000_output_function_epilogue (FILE *file,
       int optional_tbtab;
       rs6000_stack_t *info = rs6000_stack_info ();
 
-      if (rs6000_traceback == traceback_full)
+      if (GCC_OPTION (rs6000_traceback) == traceback_full)
 	optional_tbtab = 1;
-      else if (rs6000_traceback == traceback_part)
+      else if (GCC_OPTION (rs6000_traceback) == traceback_part)
 	optional_tbtab = 0;
       else
-	optional_tbtab = !optimize_size && !TARGET_ELF;
+	optional_tbtab = !GCC_OPTION (optimize_size) && !TARGET_ELF;
 
       if (optional_tbtab)
 	{
@@ -24901,7 +24901,7 @@ rs6000_output_function_epilogue (FILE *file,
       /* Set parameters on stack bit if parameters are not in their original
 	 registers, regardless of whether they are on the stack?  Xlc
 	 seems to set the bit when not optimizing.  */
-      fprintf (file, "%d\n", ((float_parms << 1) | (! optimize)));
+      fprintf (file, "%d\n", ((float_parms << 1) | (! GCC_OPTION (optimize))));
 
       if (! optional_tbtab)
 	return;
@@ -25333,7 +25333,7 @@ output_toc (FILE *file, rtx x, int labelno, enum machine_mode mode)
   if (GET_CODE (x) == CONST_DOUBLE
       && STRICT_ALIGNMENT
       && GET_MODE_BITSIZE (mode) >= 64
-      && ! (TARGET_NO_FP_IN_TOC && ! TARGET_MINIMAL_TOC)) {
+      && ! (GCC_OPTION (TARGET_NO_FP_IN_TOC) && ! TARGET_MINIMAL_TOC)) {
     ASM_OUTPUT_ALIGN (file, 3);
   }
 
@@ -25808,7 +25808,7 @@ output_function_profiler (FILE *file, int labelno)
 	  asm_fprintf (file, "\tstw %s,4(%s)\n",
 		       reg_names[0], reg_names[1]);
 	}
-      else if (TARGET_SECURE_PLT && flag_pic)
+      else if (TARGET_SECURE_PLT && GCC_OPTION (flag_pic))
 	{
 	  if (TARGET_LINK_STACK)
 	    {
@@ -25828,7 +25828,7 @@ output_function_profiler (FILE *file, int labelno)
 	  assemble_name (file, buf);
 	  asm_fprintf (file, "-1b@l(%s)\n", reg_names[12]);
 	}
-      else if (flag_pic == 1)
+      else if (GCC_OPTION (flag_pic) == 1)
 	{
 	  fputs ("\tbl _GLOBAL_OFFSET_TABLE_@local-4\n", file);
 	  asm_fprintf (file, "\tstw %s,4(%s)\n",
@@ -25838,7 +25838,7 @@ output_function_profiler (FILE *file, int labelno)
 	  assemble_name (file, buf);
 	  asm_fprintf (file, "@got(%s)\n", reg_names[12]);
 	}
-      else if (flag_pic > 1)
+      else if (GCC_OPTION (flag_pic) > 1)
 	{
 	  asm_fprintf (file, "\tstw %s,4(%s)\n",
 		       reg_names[0], reg_names[1]);
@@ -25880,7 +25880,7 @@ output_function_profiler (FILE *file, int labelno)
 
       /* ABI_V4 saves the static chain reg with ASM_OUTPUT_REG_PUSH.  */
       fprintf (file, "\tbl %s%s\n",
-	       RS6000_MCOUNT, flag_pic ? "@plt" : "");
+	       RS6000_MCOUNT, GCC_OPTION (flag_pic) ? "@plt" : "");
       break;
 
     case ABI_AIX:
@@ -25929,7 +25929,7 @@ rs6000_variable_issue_1 (rtx insn, int more)
   if (recog_memoized (insn) < 0)
     return more;
 
-  if (rs6000_sched_groups)
+  if (GCC_OPTION (rs6000_sched_groups))
     {
       if (is_microcoded_insn (insn))
         cached_can_issue_more = 0;
@@ -25976,7 +25976,7 @@ rs6000_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
 	   some cycles later.  */
 
 	/* Separate a load from a narrower, dependent store.  */
-	if (rs6000_sched_groups
+	if (GCC_OPTION (rs6000_sched_groups)
 	    && GET_CODE (PATTERN (insn)) == SET
 	    && GET_CODE (PATTERN (dep_insn)) == SET
 	    && GET_CODE (XEXP (PATTERN (insn), 1)) == MEM
@@ -26039,7 +26039,7 @@ rs6000_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
           case TYPE_FPSTORE:
           case TYPE_FPSTORE_U:
           case TYPE_FPSTORE_UX:
-            if ((rs6000_cpu == PROCESSOR_POWER6)
+            if ((GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER6)
                 && recog_memoized (dep_insn)
                 && (INSN_CODE (dep_insn) >= 0))
               {
@@ -26126,7 +26126,7 @@ rs6000_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
           case TYPE_LOAD_EXT:
           case TYPE_LOAD_EXT_U:
           case TYPE_LOAD_EXT_UX:
-            if ((rs6000_cpu == PROCESSOR_POWER6)
+            if ((GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER6)
                 && recog_memoized (dep_insn)
                 && (INSN_CODE (dep_insn) >= 0))
               {
@@ -26203,7 +26203,7 @@ rs6000_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
             break;
 
           case TYPE_FPLOAD:
-            if ((rs6000_cpu == PROCESSOR_POWER6)
+            if ((GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER6)
                 && recog_memoized (dep_insn)
                 && (INSN_CODE (dep_insn) >= 0)
                 && (get_attr_type (dep_insn) == TYPE_MFFGPR))
@@ -26220,7 +26220,7 @@ rs6000_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
     case REG_DEP_OUTPUT:
       /* Output dependency; DEP_INSN writes a register that INSN writes some
 	 cycles later.  */
-      if ((rs6000_cpu == PROCESSOR_POWER6)
+      if ((GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER6)
           && recog_memoized (dep_insn)
           && (INSN_CODE (dep_insn) >= 0))
         {
@@ -26295,8 +26295,8 @@ is_microcoded_insn (rtx insn)
   if (rs6000_cpu_attr == CPU_CELL)
     return get_attr_cell_micro (insn) == CELL_MICRO_ALWAYS;
 
-  if (rs6000_sched_groups
-      && (rs6000_cpu == PROCESSOR_POWER4 || rs6000_cpu == PROCESSOR_POWER5))
+  if (GCC_OPTION (rs6000_sched_groups)
+      && (GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER4 || GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER5))
     {
       enum attr_type type = get_attr_type (insn);
       if (type == TYPE_LOAD_EXT_U
@@ -26321,8 +26321,8 @@ is_cracked_insn (rtx insn)
       || GET_CODE (PATTERN (insn)) == CLOBBER)
     return false;
 
-  if (rs6000_sched_groups
-      && (rs6000_cpu == PROCESSOR_POWER4 || rs6000_cpu == PROCESSOR_POWER5))
+  if (GCC_OPTION (rs6000_sched_groups)
+      && (GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER4 || GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER5))
     {
       enum attr_type type = get_attr_type (insn);
       if (type == TYPE_LOAD_U || type == TYPE_STORE_U
@@ -26350,7 +26350,7 @@ is_branch_slot_insn (rtx insn)
       || GET_CODE (PATTERN (insn)) == CLOBBER)
     return false;
 
-  if (rs6000_sched_groups)
+  if (GCC_OPTION (rs6000_sched_groups))
     {
       enum attr_type type = get_attr_type (insn);
       if (type == TYPE_BRANCH || type == TYPE_JMPREG)
@@ -26500,24 +26500,24 @@ rs6000_adjust_priority (rtx insn ATTRIBUTE_UNUSED, int priority)
   if (insn_must_be_first_in_group (insn)
       && reload_completed
       && current_sched_info->sched_max_insns_priority
-      && rs6000_sched_restricted_insns_priority)
+      && GCC_OPTION (rs6000_sched_restricted_insns_priority))
     {
 
       /* Prioritize insns that can be dispatched only in the first
 	 dispatch slot.  */
-      if (rs6000_sched_restricted_insns_priority == 1)
+      if (GCC_OPTION (rs6000_sched_restricted_insns_priority) == 1)
 	/* Attach highest priority to insn. This means that in
 	   haifa-sched.c:ready_sort(), dispatch-slot restriction considerations
 	   precede 'priority' (critical path) considerations.  */
 	return current_sched_info->sched_max_insns_priority;
-      else if (rs6000_sched_restricted_insns_priority == 2)
+      else if (GCC_OPTION (rs6000_sched_restricted_insns_priority) == 2)
 	/* Increase priority of insn by a minimal amount. This means that in
 	   haifa-sched.c:ready_sort(), only 'priority' (critical path)
 	   considerations precede dispatch-slot restriction considerations.  */
 	return (priority + 1);
     }
 
-  if (rs6000_cpu == PROCESSOR_POWER6
+  if (GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER6
       && ((load_store_pendulum == -2 && is_load_insn (insn, &load_mem))
           || (load_store_pendulum == 2 && is_store_insn (insn, &str_mem))))
     /* Attach highest priority to insn if the scheduler has just issued two
@@ -26567,7 +26567,7 @@ rs6000_issue_rate (void)
 {
   /* Unless scheduling for register pressure, use issue rate of 1 for
      first scheduling pass to decrease degradation.  */
-  if (!reload_completed && !flag_sched_pressure)
+  if (!reload_completed && !GCC_OPTION (flag_sched_pressure))
     return 1;
 
   switch (rs6000_cpu_attr) {
@@ -26770,25 +26770,25 @@ rs6000_is_costly_dependence (dep_t dep, int cost, int distance)
   /* If the flag is not enabled - no dependence is considered costly;
      allow all dependent insns in the same group.
      This is the most aggressive option.  */
-  if (rs6000_sched_costly_dep == no_dep_costly)
+  if (GCC_OPTION (rs6000_sched_costly_dep) == no_dep_costly)
     return false;
 
   /* If the flag is set to 1 - a dependence is always considered costly;
      do not allow dependent instructions in the same group.
      This is the most conservative option.  */
-  if (rs6000_sched_costly_dep == all_deps_costly)
+  if (GCC_OPTION (rs6000_sched_costly_dep) == all_deps_costly)
     return true;
 
   insn = DEP_PRO (dep);
   next = DEP_CON (dep);
 
-  if (rs6000_sched_costly_dep == store_to_load_dep_costly
+  if (GCC_OPTION (rs6000_sched_costly_dep) == store_to_load_dep_costly
       && is_load_insn (next, &load_mem)
       && is_store_insn (insn, &str_mem))
     /* Prevent load after store in the same group.  */
     return true;
 
-  if (rs6000_sched_costly_dep == true_store_to_load_dep_costly
+  if (GCC_OPTION (rs6000_sched_costly_dep) == true_store_to_load_dep_costly
       && is_load_insn (next, &load_mem)
       && is_store_insn (insn, &str_mem)
       && DEP_TYPE (dep) == REG_DEP_TRUE
@@ -26799,8 +26799,8 @@ rs6000_is_costly_dependence (dep_t dep, int cost, int distance)
 
   /* The flag is set to X; dependences with latency >= X are considered costly,
      and will not be scheduled in the same group.  */
-  if (rs6000_sched_costly_dep <= max_dep_latency
-      && ((cost - distance) >= (int)rs6000_sched_costly_dep))
+  if (GCC_OPTION (rs6000_sched_costly_dep) <= max_dep_latency
+      && ((cost - distance) >= (int)GCC_OPTION (rs6000_sched_costly_dep)))
     return true;
 
   return false;
@@ -26860,7 +26860,7 @@ rs6000_sched_reorder (FILE *dump ATTRIBUTE_UNUSED, int sched_verbose,
       }
   }
 
-  if (rs6000_cpu == PROCESSOR_POWER6)
+  if (GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER6)
     load_store_pendulum = 0;
 
   return rs6000_issue_rate ();
@@ -26915,7 +26915,7 @@ rs6000_sched_reorder2 (FILE *dump, int sched_verbose, rtx *ready,
              of the machine.  Those instructions are currently unaccounted
              for to help minimize compile time overhead of this code.
    */
-  if (rs6000_cpu == PROCESSOR_POWER6 && last_scheduled_insn)
+  if (GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER6 && last_scheduled_insn)
     {
       int pos;
       int i;
@@ -27118,7 +27118,7 @@ insn_must_be_first_in_group (rtx insn)
       || GET_CODE (PATTERN (insn)) == CLOBBER)
     return false;
 
-  switch (rs6000_cpu)
+  switch (GCC_OPTION (rs6000_cpu))
     {
     case PROCESSOR_POWER5:
       if (is_cracked_insn (insn))
@@ -27127,7 +27127,7 @@ insn_must_be_first_in_group (rtx insn)
       if (is_microcoded_insn (insn))
         return true;
 
-      if (!rs6000_sched_groups)
+      if (!GCC_OPTION (rs6000_sched_groups))
         return false;
 
       type = get_attr_type (insn);
@@ -27282,7 +27282,7 @@ insn_must_be_last_in_group (rtx insn)
       || GET_CODE (PATTERN (insn)) == CLOBBER)
     return false;
 
-  switch (rs6000_cpu) {
+  switch (GCC_OPTION (rs6000_cpu)) {
   case PROCESSOR_POWER4:
   case PROCESSOR_POWER5:
     if (is_microcoded_insn (insn))
@@ -27425,7 +27425,7 @@ force_new_group (int sched_verbose, FILE *dump, rtx *group_insns,
   if (next_insn == NULL_RTX || DEBUG_INSN_P (next_insn))
     return can_issue_more;
 
-  if (rs6000_sched_insert_nops > sched_finish_regroup_exact)
+  if (GCC_OPTION (rs6000_sched_insert_nops) > sched_finish_regroup_exact)
     return can_issue_more;
 
   force = is_costly_group (group_insns, next_insn);
@@ -27436,7 +27436,7 @@ force_new_group (int sched_verbose, FILE *dump, rtx *group_insns,
     fprintf (dump,"force: group count = %d, can_issue_more = %d\n",
 	     *group_count ,can_issue_more);
 
-  if (rs6000_sched_insert_nops == sched_finish_regroup_exact)
+  if (GCC_OPTION (rs6000_sched_insert_nops) == sched_finish_regroup_exact)
     {
       if (*group_end)
 	can_issue_more = 0;
@@ -27469,9 +27469,9 @@ force_new_group (int sched_verbose, FILE *dump, rtx *group_insns,
       return 0;
     }
 
-  if (rs6000_sched_insert_nops < sched_finish_regroup_exact)
+  if (GCC_OPTION (rs6000_sched_insert_nops) < sched_finish_regroup_exact)
     {
-      int n_nops = rs6000_sched_insert_nops;
+      int n_nops = GCC_OPTION (rs6000_sched_insert_nops);
 
       /* Nops can't be issued from the branch slot, so the effective
 	 issue_rate for nops is 'issue_rate - 1'.  */
@@ -27670,7 +27670,7 @@ pad_groups (FILE *dump, int sched_verbose, rtx prev_head_insn, rtx tail)
 	     force group termination, pad the group with nops to force group
 	     termination.  */
 	  if (can_issue_more
-	      && (rs6000_sched_insert_nops == sched_finish_pad_groups)
+	      && (GCC_OPTION (rs6000_sched_insert_nops) == sched_finish_pad_groups)
 	      && !insn_terminates_group_p (insn, current_group)
 	      && !insn_terminates_group_p (next_insn, previous_group))
 	    {
@@ -27718,16 +27718,16 @@ rs6000_sched_finish (FILE *dump, int sched_verbose)
   if (sched_verbose)
     fprintf (dump, "=== Finishing schedule.\n");
 
-  if (reload_completed && rs6000_sched_groups)
+  if (reload_completed && GCC_OPTION (rs6000_sched_groups))
     {
       /* Do not run sched_finish hook when selective scheduling enabled.  */
       if (sel_sched_p ())
 	return;
 
-      if (rs6000_sched_insert_nops == sched_finish_none)
+      if (GCC_OPTION (rs6000_sched_insert_nops) == sched_finish_none)
 	return;
 
-      if (rs6000_sched_insert_nops == sched_finish_pad_groups)
+      if (GCC_OPTION (rs6000_sched_insert_nops) == sched_finish_pad_groups)
 	n_groups = pad_groups (dump, sched_verbose,
 			       current_sched_info->prev_head,
 			       current_sched_info->next_tail);
@@ -27858,7 +27858,7 @@ rs6000_trampoline_init (rtx m_tramp, tree fndecl, rtx cxt)
       {
 	rtx fnmem, fn_reg, toc_reg;
 
-	if (!TARGET_POINTERS_TO_NESTED_FUNCTIONS)
+	if (!GCC_OPTION (TARGET_POINTERS_TO_NESTED_FUNCTIONS))
 	  error ("You cannot take the address of a nested function if you use "
 		 "the -mno-pointers-to-nested-functions option.");
 
@@ -27955,7 +27955,7 @@ rs6000_handle_altivec_attribute (tree *node,
 	  if (TARGET_64BIT)
 	    error ("use of %<long%> in AltiVec types is invalid for "
 		   "64-bit code without -mvsx");
-	  else if (rs6000_warn_altivec_long)
+	  else if (GCC_OPTION (rs6000_warn_altivec_long))
 	    warning (0, "use of %<long%> in AltiVec types is deprecated; "
 		     "use %<int%>");
 	}
@@ -28087,7 +28087,7 @@ rs6000_handle_longcall_attribute (tree *node, tree name,
 static void
 rs6000_set_default_type_attributes (tree type)
 {
-  if (rs6000_default_long_calls
+  if (GCC_OPTION (rs6000_default_long_calls)
       && (TREE_CODE (type) == FUNCTION_TYPE
 	  || TREE_CODE (type) == METHOD_TYPE))
     TYPE_ATTRIBUTES (type) = tree_cons (get_identifier ("longcall"),
@@ -28282,7 +28282,7 @@ compare_section_name (const char *section, const char *templ)
 bool
 rs6000_elf_in_small_data_p (const_tree decl)
 {
-  if (rs6000_sdata == SDATA_NONE)
+  if (GCC_OPTION (rs6000_sdata) == SDATA_NONE)
     return false;
 
   /* We want to merge strings, so we never consider them small data.  */
@@ -28311,10 +28311,10 @@ rs6000_elf_in_small_data_p (const_tree decl)
       HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (decl));
 
       if (size > 0
-	  && size <= g_switch_value
+	  && size <= GCC_OPTION (g_switch_value)
 	  /* If it's not public, and we're not going to reference it there,
 	     there's no need to put it in the small data section.  */
-	  && (rs6000_sdata != SDATA_DATA || TREE_PUBLIC (decl)))
+	  && (GCC_OPTION (rs6000_sdata) != SDATA_DATA || TREE_PUBLIC (decl)))
 	return true;
     }
 
@@ -28424,10 +28424,10 @@ macho_branch_islands (void)
       strcpy (tmp_buf, "\n");
       strcat (tmp_buf, label);
 #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
-      if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
+      if (GCC_OPTION (write_symbols) == DBX_DEBUG || GCC_OPTION (write_symbols) == XCOFF_DEBUG)
 	dbxout_stabd (N_SLINE, bi->line_number);
 #endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	{
 	  if (TARGET_LINK_STACK)
 	    {
@@ -28474,7 +28474,7 @@ macho_branch_islands (void)
 	}
       output_asm_insn (tmp_buf, 0);
 #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
-      if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
+      if (GCC_OPTION (write_symbols) == DBX_DEBUG || GCC_OPTION (write_symbols) == XCOFF_DEBUG)
 	dbxout_stabd (N_SLINE, bi->line_number);
 #endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
       branch_islands->pop ();
@@ -28575,12 +28575,12 @@ machopic_output_stub (FILE *file, const char *symb, const char *stub)
   lazy_ptr_name = XALLOCAVEC (char, length + 32);
   GEN_LAZY_PTR_NAME_FOR_SYMBOL (lazy_ptr_name, symb, length);
 
-  if (flag_pic == 2)
+  if (GCC_OPTION (flag_pic) == 2)
     switch_to_section (darwin_sections[machopic_picsymbol_stub1_section]);
   else
     switch_to_section (darwin_sections[machopic_symbol_stub1_section]);
 
-  if (flag_pic == 2)
+  if (GCC_OPTION (flag_pic) == 2)
     {
       fprintf (file, "\t.align 5\n");
 
@@ -28729,7 +28729,7 @@ rs6000_darwin_file_start (void)
     cpu_id = rs6000_default_cpu;
 
   if (global_options_set.x_rs6000_cpu_index)
-    cpu_id = processor_target_table[rs6000_cpu_index].name;
+    cpu_id = processor_target_table[GCC_OPTION (rs6000_cpu_index)].name;
 
   /* Look through the mapping array.  Pick the first name that either
      matches the argument, has a bit set in IF_SET that is also set
@@ -28738,7 +28738,7 @@ rs6000_darwin_file_start (void)
   i = 0;
   while (mapping[i].arg != NULL
 	 && strcmp (mapping[i].arg, cpu_id) != 0
-	 && (mapping[i].if_set & rs6000_isa_flags) == 0)
+	 && (mapping[i].if_set & GCC_OPTION (rs6000_isa_flags)) == 0)
     i++;
 
   fprintf (asm_out_file, "\t.machine %s\n", mapping[i].name);
@@ -28750,7 +28750,7 @@ rs6000_darwin_file_start (void)
 static int
 rs6000_elf_reloc_rw_mask (void)
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     return 3;
   else if (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2)
     return 2;
@@ -28919,7 +28919,7 @@ rs6000_elf_file_end (void)
 		  : 1));
       if (rs6000_returns_struct)
 	fprintf (asm_out_file, "\t.gnu_attribute 12, %d\n",
-		 aix_struct_return ? 2 : 1);
+		 GCC_OPTION (aix_struct_return) ? 2 : 1);
     }
 #endif
 #if defined (POWERPC_LINUX) || defined (POWERPC_FREEBSD)
@@ -29123,7 +29123,7 @@ rs6000_xcoff_unique_section (tree decl, int reloc ATTRIBUTE_UNUSED)
       || (DECL_INITIAL (decl) == NULL_TREE
 	  && DECL_ALIGN (decl) <= BIGGEST_ALIGNMENT)
       || DECL_INITIAL (decl) == error_mark_node
-      || (flag_zero_initialized_in_bss
+      || (GCC_OPTION (flag_zero_initialized_in_bss)
 	  && initializer_zerop (DECL_INITIAL (decl))))
     return;
 
@@ -29199,23 +29199,23 @@ static void
 rs6000_xcoff_file_start (void)
 {
   rs6000_gen_section_name (&xcoff_bss_section_name,
-			   main_input_filename, ".bss_");
+			   GCC_OPTION (main_input_filename), ".bss_");
   rs6000_gen_section_name (&xcoff_private_data_section_name,
-			   main_input_filename, ".rw_");
+			   GCC_OPTION (main_input_filename), ".rw_");
   rs6000_gen_section_name (&xcoff_read_only_section_name,
-			   main_input_filename, ".ro_");
+			   GCC_OPTION (main_input_filename), ".ro_");
   rs6000_gen_section_name (&xcoff_tls_data_section_name,
-			   main_input_filename, ".tls_");
+			   GCC_OPTION (main_input_filename), ".tls_");
   rs6000_gen_section_name (&xcoff_tbss_section_name,
-			   main_input_filename, ".tbss_[UL]");
+			   GCC_OPTION (main_input_filename), ".tbss_[UL]");
 
   fputs ("\t.file\t", asm_out_file);
-  output_quoted_string (asm_out_file, main_input_filename);
+  output_quoted_string (asm_out_file, GCC_OPTION (main_input_filename));
   fputc ('\n', asm_out_file);
-  if (write_symbols != NO_DEBUG)
+  if (GCC_OPTION (write_symbols) != NO_DEBUG)
     switch_to_section (private_data_section);
   switch_to_section (text_section);
-  if (profile_flag)
+  if (GCC_OPTION (profile_flag))
     fprintf (asm_out_file, "\t.extern %s\n", RS6000_MCOUNT);
   rs6000_file_start ();
 }
@@ -29655,9 +29655,9 @@ rs6000_register_move_cost (enum machine_mode mode,
 
       /* For those processors that have slow LR/CTR moves, make them more
          expensive than memory in order to bias spills to memory .*/
-      else if ((rs6000_cpu == PROCESSOR_POWER6
-		|| rs6000_cpu == PROCESSOR_POWER7
-		|| rs6000_cpu == PROCESSOR_POWER8)
+      else if ((GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER6
+		|| GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER7
+		|| GCC_OPTION (rs6000_cpu) == PROCESSOR_POWER8)
 	       && reg_classes_intersect_p (rclass, LINK_OR_CTR_REGS))
         ret = 6 * hard_regno_nregs[0][mode];
 
@@ -30405,7 +30405,7 @@ altivec_expand_vec_perm_const (rtx operands[4])
     {
       bool swapped;
 
-      if ((patterns[j].mask & rs6000_isa_flags) == 0)
+      if ((patterns[j].mask & GCC_OPTION (rs6000_isa_flags)) == 0)
 	continue;
 
       elt = patterns[j].perm[0];
@@ -30843,7 +30843,7 @@ rs6000_libcall_value (enum machine_mode mode)
 static bool
 rs6000_lra_p (void)
 {
-  return rs6000_lra_flag;
+  return GCC_OPTION (rs6000_lra_flag);
 }
 
 /* Given FROM and TO register numbers, say whether this elimination is allowed.
@@ -30988,7 +30988,7 @@ rs6000_init_dwarf_reg_sizes_extra (tree address)
 unsigned int
 rs6000_dbx_register_number (unsigned int regno)
 {
-  if (regno <= 63 || write_symbols != DWARF2_DEBUG)
+  if (regno <= 63 || GCC_OPTION (write_symbols) != DWARF2_DEBUG)
     return regno;
   if (regno == LR_REGNO)
     return 108;
@@ -31053,7 +31053,7 @@ rs6000_vector_mode_supported_p (enum machine_mode mode)
 static const char *
 invalid_arg_for_unprototyped_fn (const_tree typelist, const_tree funcdecl, const_tree val)
 {
-  return (!rs6000_darwin64_abi
+  return (!GCC_OPTION (rs6000_darwin64_abi)
 	  && typelist == 0
           && TREE_CODE (TREE_TYPE (val)) == VECTOR_TYPE
           && (funcdecl == NULL_TREE
@@ -31071,7 +31071,7 @@ invalid_arg_for_unprototyped_fn (const_tree typelist, const_tree funcdecl, const
 static tree ATTRIBUTE_UNUSED
 rs6000_stack_protect_fail (void)
 {
-  return (DEFAULT_ABI == ABI_V4 && TARGET_SECURE_PLT && flag_pic)
+  return (DEFAULT_ABI == ABI_V4 && TARGET_SECURE_PLT && GCC_OPTION (flag_pic))
 	 ? default_hidden_stack_protect_fail ()
 	 : default_external_stack_protect_fail ();
 }
@@ -31080,7 +31080,7 @@ void
 rs6000_final_prescan_insn (rtx insn, rtx *operand ATTRIBUTE_UNUSED,
 			   int num_operands ATTRIBUTE_UNUSED)
 {
-  if (rs6000_warn_cell_microcode)
+  if (GCC_OPTION (rs6000_warn_cell_microcode))
     {
       const char *temp;
       int insn_code_number = recog_memoized (insn);
@@ -31252,7 +31252,7 @@ rs6000_inner_target_options (tree args, bool attr_p)
 	    {
 	      int cpu_index = rs6000_cpu_name_lookup (q+4);
 	      if (cpu_index >= 0)
-		rs6000_cpu_index = cpu_index;
+		GCC_OPTION (rs6000_cpu_index) = cpu_index;
 	      else
 		{
 		  error_p = true;
@@ -31263,7 +31263,7 @@ rs6000_inner_target_options (tree args, bool attr_p)
 	    {
 	      int tune_index = rs6000_cpu_name_lookup (q+5);
 	      if (tune_index >= 0)
-		rs6000_tune_index = tune_index;
+		GCC_OPTION (rs6000_tune_index) = tune_index;
 	      else
 		{
 		  error_p = true;
@@ -31293,7 +31293,7 @@ rs6000_inner_target_options (tree args, bool attr_p)
 		    else
 		      {
 			error_p = false;
-			rs6000_isa_flags_explicit |= mask;
+			GCC_OPTION (rs6000_isa_flags_explicit) |= mask;
 
 			/* VSX needs altivec, so -mvsx automagically sets
 			   altivec.  */
@@ -31304,9 +31304,9 @@ rs6000_inner_target_options (tree args, bool attr_p)
 			  invert = !invert;
 
 			if (invert)
-			  rs6000_isa_flags &= ~mask;
+			  GCC_OPTION (rs6000_isa_flags) &= ~mask;
 			else
-			  rs6000_isa_flags |= mask;
+			  GCC_OPTION (rs6000_isa_flags) |= mask;
 		      }
 		    break;
 		  }
@@ -31465,7 +31465,7 @@ rs6000_valid_attribute_p (tree fndecl,
   /* The target attributes may also change some optimization flags, so update
      the optimization options if necessary.  */
   cl_target_option_save (&cur_target, &global_options);
-  rs6000_cpu_index = rs6000_tune_index = -1;
+  GCC_OPTION (rs6000_cpu_index) = GCC_OPTION (rs6000_tune_index) = -1;
   ret = rs6000_inner_target_options (args, true);
 
   /* Set up any additional state.  */
@@ -31541,7 +31541,7 @@ rs6000_pragma_target_parse (tree args, tree pop_target)
     }
   else
     {
-      rs6000_cpu_index = rs6000_tune_index = -1;
+      GCC_OPTION (rs6000_cpu_index) = GCC_OPTION (rs6000_tune_index) = -1;
       if (!rs6000_inner_target_options (args, false)
 	  || !rs6000_option_override_internal (false)
 	  || (cur_tree = build_target_option_node (&global_options))
@@ -31976,7 +31976,7 @@ rs6000_call_aix (rtx value, rtx func_desc, rtx flag, rtx cookie)
 
       /* Can we optimize saving the TOC in the prologue or
 	 do we need to do it at every call?  */
-      if (TARGET_SAVE_TOC_INDIRECT && !cfun->calls_alloca)
+      if (GCC_OPTION (TARGET_SAVE_TOC_INDIRECT) && !cfun->calls_alloca)
 	cfun->machine->save_toc_in_prologue = true;
       else
 	{
@@ -32017,7 +32017,7 @@ rs6000_call_aix (rtx value, rtx func_desc, rtx flag, rtx cookie)
 	  toc_load = gen_rtx_USE (VOIDmode, func_toc_mem);
 
 	  /* If we have a static chain, load it up.  */
-	  if (TARGET_POINTERS_TO_NESTED_FUNCTIONS)
+	  if (GCC_OPTION (TARGET_POINTERS_TO_NESTED_FUNCTIONS))
 	    {
 	      rtx sc_reg = gen_rtx_REG (Pmode, STATIC_CHAIN_REGNUM);
 	      rtx func_sc_offset = GEN_INT (2 * GET_MODE_SIZE (Pmode));
@@ -32178,7 +32178,7 @@ rs6000_code_end (void)
 static void
 rs6000_set_up_by_prologue (struct hard_reg_set_container *set)
 {
-  if (!TARGET_SINGLE_PIC_BASE
+  if (!GCC_OPTION (TARGET_SINGLE_PIC_BASE)
       && TARGET_TOC
       && TARGET_MINIMAL_TOC
       && get_pool_size () != 0)
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index a6afb6c..d03cdfb 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -62,7 +62,7 @@
 
 /* If configured for PPC405, support PPC405CR Erratum77.  */
 #ifdef CONFIG_PPC405CR
-#define PPC405_ERRATUM77 (rs6000_cpu == PROCESSOR_PPC405)
+#define PPC405_ERRATUM77 (GCC_OPTION (rs6000_cpu) == PROCESSOR_PPC405)
 #else
 #define PPC405_ERRATUM77 0
 #endif
@@ -307,7 +307,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
 #undef  TARGET_TLS_MARKERS
 #define TARGET_TLS_MARKERS 0
 #else
-#define TARGET_TLS_MARKERS tls_markers
+#define TARGET_TLS_MARKERS GCC_OPTION (tls_markers)
 #endif
 
 #ifndef TARGET_SECURE_PLT
@@ -394,13 +394,13 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
 				 | MASK_DEBUG_TARGET \
 				 | MASK_DEBUG_BUILTIN)
 
-#define	TARGET_DEBUG_STACK	(rs6000_debug & MASK_DEBUG_STACK)
-#define	TARGET_DEBUG_ARG	(rs6000_debug & MASK_DEBUG_ARG)
-#define TARGET_DEBUG_REG	(rs6000_debug & MASK_DEBUG_REG)
-#define TARGET_DEBUG_ADDR	(rs6000_debug & MASK_DEBUG_ADDR)
-#define TARGET_DEBUG_COST	(rs6000_debug & MASK_DEBUG_COST)
-#define TARGET_DEBUG_TARGET	(rs6000_debug & MASK_DEBUG_TARGET)
-#define TARGET_DEBUG_BUILTIN	(rs6000_debug & MASK_DEBUG_BUILTIN)
+#define	GCC_OPTION (TARGET_DEBUG_STACK)	(GCC_OPTION (rs6000_debug) & MASK_DEBUG_STACK)
+#define	GCC_OPTION (TARGET_DEBUG_ARG)	(GCC_OPTION (rs6000_debug) & MASK_DEBUG_ARG)
+#define TARGET_DEBUG_REG	(GCC_OPTION (rs6000_debug) & MASK_DEBUG_REG)
+#define TARGET_DEBUG_ADDR	(GCC_OPTION (rs6000_debug) & MASK_DEBUG_ADDR)
+#define TARGET_DEBUG_COST	(GCC_OPTION (rs6000_debug) & MASK_DEBUG_COST)
+#define TARGET_DEBUG_TARGET	(GCC_OPTION (rs6000_debug) & MASK_DEBUG_TARGET)
+#define TARGET_DEBUG_BUILTIN	(GCC_OPTION (rs6000_debug) & MASK_DEBUG_BUILTIN)
 
 /* Describe the vector unit used for arithmetic operations.  */
 extern enum rs6000_vector rs6000_vector_unit[];
@@ -475,7 +475,7 @@ extern int rs6000_vector_align[];
    be useful to use big-endian element order when targeting little-endian.
    This is set via -maltivec=be, for example.  */
 #define VECTOR_ELT_ORDER_BIG                                  \
-  (BYTES_BIG_ENDIAN || (rs6000_altivec_element_order == 2))
+  (BYTES_BIG_ENDIAN || (GCC_OPTION (rs6000_altivec_element_order) == 2))
 
 /* Alignment options for fields in structures for sub-targets following
    AIX-like ABI.
@@ -489,15 +489,15 @@ extern int rs6000_vector_align[];
 #ifndef IN_TARGET_LIBS
 #define MASK_ALIGN_POWER   0x00000000
 #define MASK_ALIGN_NATURAL 0x00000001
-#define TARGET_ALIGN_NATURAL (rs6000_alignment_flags & MASK_ALIGN_NATURAL)
+#define TARGET_ALIGN_NATURAL (GCC_OPTION (rs6000_alignment_flags) & MASK_ALIGN_NATURAL)
 #else
 #define TARGET_ALIGN_NATURAL 0
 #endif
 
-#define TARGET_LONG_DOUBLE_128 (rs6000_long_double_type_size == 128)
-#define TARGET_IEEEQUAD rs6000_ieeequad
-#define TARGET_ALTIVEC_ABI rs6000_altivec_abi
-#define TARGET_LDBRX (TARGET_POPCNTD || rs6000_cpu == PROCESSOR_CELL)
+#define TARGET_LONG_DOUBLE_128 (GCC_OPTION (rs6000_long_double_type_size) == 128)
+#define TARGET_IEEEQUAD GCC_OPTION (rs6000_ieeequad)
+#define TARGET_ALTIVEC_ABI GCC_OPTION (rs6000_altivec_abi)
+#define TARGET_LDBRX (TARGET_POPCNTD || GCC_OPTION (rs6000_cpu) == PROCESSOR_CELL)
 
 #define TARGET_SPE_ABI 0
 #define TARGET_SPE 0
@@ -623,8 +623,8 @@ extern int rs6000_vector_align[];
 				      || TARGET_VSX)))
 
 /* E500 cores only support plain "sync", not lwsync.  */
-#define TARGET_NO_LWSYNC (rs6000_cpu == PROCESSOR_PPC8540 \
-			  || rs6000_cpu == PROCESSOR_PPC8548)
+#define TARGET_NO_LWSYNC (GCC_OPTION (rs6000_cpu) == PROCESSOR_PPC8540 \
+			  || GCC_OPTION (rs6000_cpu) == PROCESSOR_PPC8548)
 
 
 /* Whether SF/DF operations are supported on the E500.  */
@@ -813,7 +813,7 @@ extern unsigned char rs6000_recip_bits[];
 /* A C expression for the size in bits of the type `long double' on
    the target machine.  If you don't define this, the default is two
    words.  */
-#define LONG_DOUBLE_TYPE_SIZE rs6000_long_double_type_size
+#define LONG_DOUBLE_TYPE_SIZE GCC_OPTION (rs6000_long_double_type_size)
 
 /* Define this to set long double type size to use in libgcc2.c, which can
    not depend on target_flags.  */
@@ -865,7 +865,7 @@ enum data_align { align_abi, align_opt, align_both };
 /* Make strings word-aligned so strcpy from constants will be faster.  */
 #define CONSTANT_ALIGNMENT(EXP, ALIGN)                           \
   (TREE_CODE (EXP) == STRING_CST	                         \
-   && (STRICT_ALIGNMENT || !optimize_size)                       \
+   && (STRICT_ALIGNMENT || !GCC_OPTION (optimize_size))                       \
    && (ALIGN) < BITS_PER_WORD                                    \
    ? BITS_PER_WORD                                               \
    : (ALIGN))
@@ -1537,8 +1537,8 @@ extern enum reg_class rs6000_constraints[RS6000_CONSTRAINT_MAX];
 
    On the RS/6000, we grow upwards, from the area after the outgoing
    arguments.  */
-#define FRAME_GROWS_DOWNWARD (flag_stack_protect != 0			\
-			      || (flag_sanitize & SANITIZE_ADDRESS) != 0)
+#define FRAME_GROWS_DOWNWARD (GCC_OPTION (flag_stack_protect) != 0			\
+			      || (GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS) != 0)
 
 /* Size of the fixed area on the stack */
 #define RS6000_SAVE_AREA \
@@ -1939,7 +1939,7 @@ do {									     \
    to allocate such a register (if necessary).  */
 
 #define RS6000_PIC_OFFSET_TABLE_REGNUM 30
-#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? RS6000_PIC_OFFSET_TABLE_REGNUM : INVALID_REGNUM)
+#define PIC_OFFSET_TABLE_REGNUM (GCC_OPTION (flag_pic) ? RS6000_PIC_OFFSET_TABLE_REGNUM : INVALID_REGNUM)
 
 #define TOC_REGISTER (TARGET_MINIMAL_TOC ? RS6000_PIC_OFFSET_TABLE_REGNUM : 2)
 
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 4bab959..5027357 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -651,7 +651,7 @@
 (define_insn ""
   [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
 	(sign_extend:DI (match_operand:HI 1 "reg_or_mem_operand" "m,r")))]
-  "TARGET_POWERPC64 && rs6000_gen_cell_microcode"
+  "TARGET_POWERPC64 && GCC_OPTION (rs6000_gen_cell_microcode)"
   "@
    lha%U1%X1 %0,%1
    extsh %0,%1"
@@ -668,7 +668,7 @@
 (define_insn ""
   [(set (match_operand:DI 0 "gpc_reg_operand" "=r")
 	(sign_extend:DI (match_operand:HI 1 "gpc_reg_operand" "r")))]
-  "TARGET_POWERPC64 && !rs6000_gen_cell_microcode"
+  "TARGET_POWERPC64 && !GCC_OPTION (rs6000_gen_cell_microcode)"
   "extsh %0,%1"
   [(set_attr "type" "exts")])
 
@@ -756,7 +756,7 @@
 (define_insn "*extendsidi2_nocell"
   [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
 	(sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))]
-  "TARGET_POWERPC64 && rs6000_gen_cell_microcode && !TARGET_LFIWAX"
+  "TARGET_POWERPC64 && GCC_OPTION (rs6000_gen_cell_microcode) && !TARGET_LFIWAX"
   "@
    lwa%U1%X1 %0,%1
    extsw %0,%1"
@@ -773,7 +773,7 @@
 (define_insn "*extendsidi2_nocell"
   [(set (match_operand:DI 0 "gpc_reg_operand" "=r")
 	(sign_extend:DI (match_operand:SI 1 "gpc_reg_operand" "r")))]
-  "TARGET_POWERPC64 && !rs6000_gen_cell_microcode"
+  "TARGET_POWERPC64 && !GCC_OPTION (rs6000_gen_cell_microcode)"
   "extsw %0,%1"
   [(set_attr "type" "exts")])
 
@@ -1175,7 +1175,7 @@
 (define_insn ""
   [(set (match_operand:SI 0 "gpc_reg_operand" "=r,r")
 	(sign_extend:SI (match_operand:HI 1 "reg_or_mem_operand" "m,r")))]
-  "rs6000_gen_cell_microcode"
+  "GCC_OPTION (rs6000_gen_cell_microcode)"
   "@
    lha%U1%X1 %0,%1
    extsh %0,%1"
@@ -1192,7 +1192,7 @@
 (define_insn ""
   [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
         (sign_extend:SI (match_operand:HI 1 "gpc_reg_operand" "r")))]
-  "!rs6000_gen_cell_microcode"
+  "!GCC_OPTION (rs6000_gen_cell_microcode)"
   "extsh %0,%1"
   [(set_attr "type" "exts")])
 
@@ -1732,7 +1732,7 @@
                     (match_operand 3 "const_int_operand" "")]
                    UNSPEC_DLMZB_STRLEN))
    (clobber (match_scratch:CC 4 "=x"))]
-  "TARGET_DLMZB && WORDS_BIG_ENDIAN && !optimize_size"
+  "TARGET_DLMZB && WORDS_BIG_ENDIAN && !GCC_OPTION (optimize_size)"
 {
   rtx result = operands[0];
   rtx src = operands[1];
@@ -2430,7 +2430,7 @@
   if (GET_CODE (addr1) == PLUS)
     {
       emit_insn (gen_add3_insn (op2, XEXP (addr1, 0), GEN_INT (4)));
-      if (TARGET_AVOID_XFORM)
+      if (GCC_OPTION (TARGET_AVOID_XFORM))
 	{
 	  emit_insn (gen_add3_insn (op2, XEXP (addr1, 1), op2));
 	  addr2 = op2;
@@ -2438,7 +2438,7 @@
       else
 	addr2 = gen_rtx_PLUS (Pmode, op2, XEXP (addr1, 1));
     }
-  else if (TARGET_AVOID_XFORM)
+  else if (GCC_OPTION (TARGET_AVOID_XFORM))
     {
       emit_insn (gen_add3_insn (op2, addr1, GEN_INT (4)));
       addr2 = op2;
@@ -2493,7 +2493,7 @@
   if (GET_CODE (addr1) == PLUS)
     {
       emit_insn (gen_add3_insn (op2, XEXP (addr1, 0), GEN_INT (4)));
-      if (TARGET_AVOID_XFORM)
+      if (GCC_OPTION (TARGET_AVOID_XFORM))
 	{
 	  emit_insn (gen_add3_insn (op2, XEXP (addr1, 1), op2));
 	  addr2 = op2;
@@ -2501,7 +2501,7 @@
       else
 	addr2 = gen_rtx_PLUS (Pmode, op2, XEXP (addr1, 1));
     }
-  else if (TARGET_AVOID_XFORM)
+  else if (GCC_OPTION (TARGET_AVOID_XFORM))
     {
       emit_insn (gen_add3_insn (op2, addr1, GEN_INT (4)));
       addr2 = op2;
@@ -2584,7 +2584,7 @@
   if (GET_CODE (addr1) == PLUS)
     {
       emit_insn (gen_add3_insn (op2, XEXP (addr1, 0), GEN_INT (4)));
-      if (TARGET_AVOID_XFORM)
+      if (GCC_OPTION (TARGET_AVOID_XFORM))
 	{
 	  emit_insn (gen_add3_insn (op2, XEXP (addr1, 1), op2));
 	  addr2 = op2;
@@ -2592,7 +2592,7 @@
       else
 	addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
     }
-  else if (TARGET_AVOID_XFORM)
+  else if (GCC_OPTION (TARGET_AVOID_XFORM))
     {
       emit_insn (gen_add3_insn (op2, addr1, GEN_INT (4)));
       addr2 = op2;
@@ -2632,7 +2632,7 @@
   if (GET_CODE (addr1) == PLUS)
     {
       emit_insn (gen_add3_insn (op2, XEXP (addr1, 0), GEN_INT (4)));
-      if (TARGET_AVOID_XFORM)
+      if (GCC_OPTION (TARGET_AVOID_XFORM))
 	{
 	  emit_insn (gen_add3_insn (op2, XEXP (addr1, 1), op2));
 	  addr2 = op2;
@@ -2640,7 +2640,7 @@
       else
 	addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
     }
-  else if (TARGET_AVOID_XFORM)
+  else if (GCC_OPTION (TARGET_AVOID_XFORM))
     {
       emit_insn (gen_add3_insn (op2, addr1, GEN_INT (4)));
       addr2 = op2;
@@ -2901,7 +2901,7 @@
 	(and:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r,r,r")
 		(match_operand:SI 2 "and_operand" "?r,T,K,L")))
    (clobber (match_scratch:CC 3 "=X,X,x,x"))]
-  "rs6000_gen_cell_microcode"
+  "GCC_OPTION (rs6000_gen_cell_microcode)"
   "@
    and %0,%1,%2
    rlwinm %0,%1,0,%m2,%M2
@@ -2914,7 +2914,7 @@
 	(and:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r")
 		(match_operand:SI 2 "and_operand" "?r,T")))
    (clobber (match_scratch:CC 3 "=X,X"))]
-  "!rs6000_gen_cell_microcode"
+  "!GCC_OPTION (rs6000_gen_cell_microcode)"
   "@
    and %0,%1,%2
    rlwinm %0,%1,0,%m2,%M2")
@@ -2923,7 +2923,7 @@
   [(set (match_operand:SI 0 "gpc_reg_operand" "=r,r")
         (and:SI (match_operand:SI 1 "gpc_reg_operand" "%r,r")
                 (match_operand:SI 2 "and_operand" "?r,T")))]
-  "!rs6000_gen_cell_microcode"
+  "!GCC_OPTION (rs6000_gen_cell_microcode)"
   "@
    and %0,%1,%2
    rlwinm %0,%1,0,%m2,%M2")
@@ -2940,7 +2940,7 @@
 		    (const_int 0)))
    (clobber (match_scratch:SI 3 "=r,r,r,r,r,r,r,r"))
    (clobber (match_scratch:CC 4 "=X,X,X,X,X,x,x,X"))]
-  "TARGET_32BIT && rs6000_gen_cell_microcode"
+  "TARGET_32BIT && GCC_OPTION (rs6000_gen_cell_microcode)"
   "@
    and. %3,%1,%2
    andi. %3,%1,%b2
@@ -2961,7 +2961,7 @@
 		    (const_int 0)))
    (clobber (match_scratch:SI 3 "=r,r,r,r,r,r,r,r"))
    (clobber (match_scratch:CC 4 "=X,X,X,X,X,x,x,X"))]
-  "TARGET_64BIT && rs6000_gen_cell_microcode"
+  "TARGET_64BIT && GCC_OPTION (rs6000_gen_cell_microcode)"
   "@
    #
    andi. %3,%1,%b2
@@ -3021,7 +3021,7 @@
 	(and:SI (match_dup 1)
 		(match_dup 2)))
    (clobber (match_scratch:CC 4 "=X,X,X,X,X,x,x,X"))]
-  "TARGET_32BIT && rs6000_gen_cell_microcode"
+  "TARGET_32BIT && GCC_OPTION (rs6000_gen_cell_microcode)"
   "@
    and. %0,%1,%2
    andi. %0,%1,%b2
@@ -3044,7 +3044,7 @@
 	(and:SI (match_dup 1)
 		(match_dup 2)))
    (clobber (match_scratch:CC 4 "=X,X,X,X,X,x,x,X"))]
-  "TARGET_64BIT && rs6000_gen_cell_microcode"
+  "TARGET_64BIT && GCC_OPTION (rs6000_gen_cell_microcode)"
   "@
    #
    andi. %0,%1,%b2
@@ -3784,7 +3784,7 @@
 			 (match_operand:SI 3 "const_int_operand" "i"))
 		    (const_int 0)))
    (clobber (match_scratch:DI 4 "=r"))]
-  "TARGET_64BIT && rs6000_gen_cell_microcode"
+  "TARGET_64BIT && GCC_OPTION (rs6000_gen_cell_microcode)"
   "*
 {
   int start = INTVAL (operands[3]) & 63;
@@ -3807,7 +3807,7 @@
 		    (const_int 0)))
    (set (match_operand:DI 0 "gpc_reg_operand" "=r")
 	(zero_extract:DI (match_dup 1) (match_dup 2) (match_dup 3)))]
-  "TARGET_64BIT && rs6000_gen_cell_microcode"
+  "TARGET_64BIT && GCC_OPTION (rs6000_gen_cell_microcode)"
   "*
 {
   int start = INTVAL (operands[3]) & 63;
@@ -5030,7 +5030,7 @@
 		    (match_operand 2 "gpc_reg_operand" "")))]
   "RS6000_RECIP_AUTO_RE_P (<MODE>mode)
    && can_create_pseudo_p () && optimize_insn_for_speed_p ()
-   && flag_finite_math_only && !flag_trapping_math && flag_reciprocal_math"
+   && GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math) && GCC_OPTION (flag_reciprocal_math)"
   [(const_int 0)]
 {
   rs6000_emit_swdiv (operands[0], operands[1], operands[2], true);
@@ -5381,7 +5381,7 @@
 			       (match_operand:SFDF 2 "gpc_reg_operand" ""))
 			   (match_dup 1)
 			   (match_dup 2)))]
-  "TARGET_<MODE>_FPR && TARGET_PPC_GFXOPT && !flag_trapping_math"
+  "TARGET_<MODE>_FPR && TARGET_PPC_GFXOPT && !GCC_OPTION (flag_trapping_math)"
 {
   rs6000_emit_minmax (operands[0], SMAX, operands[1], operands[2]);
   DONE;
@@ -5401,7 +5401,7 @@
 			       (match_operand:SFDF 2 "gpc_reg_operand" ""))
 			   (match_dup 2)
 			   (match_dup 1)))]
-  "TARGET_<MODE>_FPR && TARGET_PPC_GFXOPT && !flag_trapping_math"
+  "TARGET_<MODE>_FPR && TARGET_PPC_GFXOPT && !GCC_OPTION (flag_trapping_math)"
 {
   rs6000_emit_minmax (operands[0], SMIN, operands[1], operands[2]);
   DONE;
@@ -5420,7 +5420,7 @@
 	(match_operator:SFDF 3 "min_max_operator"
 	 [(match_operand:SFDF 1 "gpc_reg_operand" "")
 	  (match_operand:SFDF 2 "gpc_reg_operand" "")]))]
-  "TARGET_<MODE>_FPR && TARGET_PPC_GFXOPT && !flag_trapping_math
+  "TARGET_<MODE>_FPR && TARGET_PPC_GFXOPT && !GCC_OPTION (flag_trapping_math)
    && !TARGET_VSX"
   [(const_int 0)]
 {
@@ -5435,7 +5435,7 @@
 	 [(match_operand:SF 1 "gpc_reg_operand" "")
 	  (match_operand:SF 2 "gpc_reg_operand" "")]))]
   "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS 
-   && TARGET_SINGLE_FLOAT && !flag_trapping_math"
+   && TARGET_SINGLE_FLOAT && !GCC_OPTION (flag_trapping_math)"
   [(const_int 0)]
   "
 { rs6000_emit_minmax (operands[0], GET_CODE (operands[3]),
@@ -5568,7 +5568,7 @@
 	 [(match_operand:DF 1 "gpc_reg_operand" "")
 	  (match_operand:DF 2 "gpc_reg_operand" "")]))]
   "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT 
-   && !flag_trapping_math"
+   && !GCC_OPTION (flag_trapping_math)"
   [(const_int 0)]
   "
 { rs6000_emit_minmax (operands[0], GET_CODE (operands[3]),
@@ -5863,7 +5863,7 @@
        || (TARGET_FPRS
 	   && ((TARGET_FCFIDUS && TARGET_LFIWZX)
 	       || (TARGET_DOUBLE_FLOAT && TARGET_FCFID
-		   && (TARGET_POWERPC64 || flag_unsafe_math_optimizations)))))"
+		   && (TARGET_POWERPC64 || GCC_OPTION (flag_unsafe_math_optimizations))))))"
   "
 {
   if (!TARGET_FPRS)
@@ -6165,8 +6165,8 @@
   [(set (match_operand:DF 0 "gpc_reg_operand" "=d")
 	(float:DF (fix:DI (match_operand:DF 1 "gpc_reg_operand" "d"))))]
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_FPRND
-   && !VECTOR_UNIT_VSX_P (DFmode) && flag_unsafe_math_optimizations
-   && !flag_trapping_math && TARGET_FRIZ"
+   && !VECTOR_UNIT_VSX_P (DFmode) && GCC_OPTION (flag_unsafe_math_optimizations)
+   && !GCC_OPTION (flag_trapping_math) && GCC_OPTION (TARGET_FRIZ)"
   "friz %0,%1"
   [(set_attr "type" "fp")])
 
@@ -6312,7 +6312,7 @@
        || (TARGET_FPRS
 	   && ((TARGET_FCFIDS && TARGET_LFIWAX)
 	       || (TARGET_DOUBLE_FLOAT && TARGET_FCFID
-		   && (TARGET_POWERPC64 || flag_unsafe_math_optimizations)))))"
+		   && (TARGET_POWERPC64 || GCC_OPTION (flag_unsafe_math_optimizations))))))"
   "
 {
   if (!TARGET_FPRS)
@@ -6407,13 +6407,13 @@
   [(set (match_operand:SF 0 "gpc_reg_operand" "")
         (float:SF (match_operand:DI 1 "gpc_reg_operand" "")))]
   "TARGET_FCFID && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT
-   && (TARGET_FCFIDS || TARGET_POWERPC64 || flag_unsafe_math_optimizations)"
+   && (TARGET_FCFIDS || TARGET_POWERPC64 || GCC_OPTION (flag_unsafe_math_optimizations))"
   "
 {
   if (!TARGET_FCFIDS)
     {
       rtx val = operands[1];
-      if (!flag_unsafe_math_optimizations)
+      if (!GCC_OPTION (flag_unsafe_math_optimizations))
 	{
 	  rtx label = gen_label_rtx ();
 	  val = gen_reg_rtx (DImode);
@@ -7910,7 +7910,7 @@
 	(and:DI (match_operand:DI 1 "gpc_reg_operand" "%r,r,r,r,r,r")
 		(match_operand:DI 2 "and64_2_operand" "?r,S,T,K,J,t")))
    (clobber (match_scratch:CC 3 "=X,X,X,x,x,X"))]
-  "TARGET_POWERPC64 && rs6000_gen_cell_microcode"
+  "TARGET_POWERPC64 && GCC_OPTION (rs6000_gen_cell_microcode)"
   "@
    and %0,%1,%2
    rldic%B2 %0,%1,0,%S2
@@ -7926,7 +7926,7 @@
 	(and:DI (match_operand:DI 1 "gpc_reg_operand" "%r,r,r,r")
 		(match_operand:DI 2 "and64_2_operand" "?r,S,T,t")))
    (clobber (match_scratch:CC 3 "=X,X,X,X"))]
-  "TARGET_POWERPC64 && !rs6000_gen_cell_microcode"
+  "TARGET_POWERPC64 && !GCC_OPTION (rs6000_gen_cell_microcode)"
   "@
    and %0,%1,%2
    rldic%B2 %0,%1,0,%S2
@@ -7962,7 +7962,7 @@
 		    (const_int 0)))
    (clobber (match_scratch:DI 3 "=r,r,r,r,r,r,r,r,r,r,r,r"))
    (clobber (match_scratch:CC 4 "=X,X,X,X,X,X,X,X,X,x,x,X"))]
-  "TARGET_64BIT && rs6000_gen_cell_microcode"
+  "TARGET_64BIT && GCC_OPTION (rs6000_gen_cell_microcode)"
   "@
    and. %3,%1,%2
    rldic%B2. %3,%1,0,%S2
@@ -8015,7 +8015,7 @@
    (set (match_operand:DI 0 "gpc_reg_operand" "=r,r,r,r,r,r,r,r,r,r,r,r")
 	(and:DI (match_dup 1) (match_dup 2)))
    (clobber (match_scratch:CC 4 "=X,X,X,X,X,X,X,X,X,x,x,X"))]
-  "TARGET_64BIT && rs6000_gen_cell_microcode"
+  "TARGET_64BIT && GCC_OPTION (rs6000_gen_cell_microcode)"
   "@
    and. %0,%1,%2
    rldic%B2. %0,%1,0,%S2
@@ -8749,7 +8749,7 @@
   [(set (match_operand:SI 0 "gpc_reg_operand" "")
 	(unspec:SI [(match_operand:SI 1 "got_operand" "")
 		    (match_dup 2)] UNSPEC_MOVSI_GOT))]
-  "DEFAULT_ABI == ABI_V4 && flag_pic == 1"
+  "DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic) == 1"
   "
 {
   if (GET_CODE (operands[1]) == CONST)
@@ -8778,7 +8778,7 @@
 	(unspec:SI [(match_operand:SI 1 "got_no_const_operand" "")
 		    (match_operand:SI 2 "gpc_reg_operand" "b")]
 		   UNSPEC_MOVSI_GOT))]
-  "DEFAULT_ABI == ABI_V4 && flag_pic == 1"
+  "DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic) == 1"
   "lwz %0,%a1@got(%2)"
   [(set_attr "type" "load")])
 
@@ -8790,7 +8790,7 @@
 		    (match_operand:SI 2 "memory_operand" "")]
 		   UNSPEC_MOVSI_GOT))]
   "DEFAULT_ABI == ABI_V4
-    && flag_pic == 1
+    && GCC_OPTION (flag_pic) == 1
     && (reload_in_progress || reload_completed)"
   [(set (match_dup 0) (match_dup 2))
    (set (match_dup 0) (unspec:SI [(match_dup 1)(match_dup 0)]
@@ -9612,7 +9612,7 @@
 {
   operands[2] = CONST0_RTX (DFmode);
   /* Generate GOT reference early for SVR4 PIC.  */
-  if (DEFAULT_ABI == ABI_V4 && flag_pic)
+  if (DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic))
     operands[2] = validize_mem (force_const_mem (DFmode, operands[2]));
 })
 
@@ -9662,7 +9662,7 @@
 (define_insn_and_split "trunctfdf2_internal1"
   [(set (match_operand:DF 0 "gpc_reg_operand" "=d,?d")
 	(float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "0,d")))]
-  "!TARGET_IEEEQUAD && !TARGET_XL_COMPAT
+  "!TARGET_IEEEQUAD && !GCC_OPTION (TARGET_XL_COMPAT)
    && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128"
   "@
    #
@@ -9678,7 +9678,7 @@
 (define_insn "trunctfdf2_internal2"
   [(set (match_operand:DF 0 "gpc_reg_operand" "=d")
 	(float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "d")))]
-  "!TARGET_IEEEQUAD && TARGET_XL_COMPAT
+  "!TARGET_IEEEQUAD && GCC_OPTION (TARGET_XL_COMPAT)
    && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT 
    && TARGET_LONG_DOUBLE_128"
   "fadd %0,%1,%L1"
@@ -9831,7 +9831,7 @@
   rtx label = gen_label_rtx ();
   if (TARGET_E500_DOUBLE)
     {
-      if (flag_finite_math_only && !flag_trapping_math)
+      if (GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))
 	emit_insn (gen_spe_abstf2_tst (operands[0], operands[1], label));
       else
 	emit_insn (gen_spe_abstf2_cmp (operands[0], operands[1], label));
@@ -10973,7 +10973,7 @@
 			  (match_operand:DI 2 "gpc_reg_operand" "r")))))
    (set (match_operand:DI 0 "gpc_reg_operand" "=b")
 	(plus:DI (match_dup 1) (match_dup 2)))]
-  "TARGET_POWERPC64 && rs6000_gen_cell_microcode
+  "TARGET_POWERPC64 && GCC_OPTION (rs6000_gen_cell_microcode)
    && !avoiding_indexed_address_p (DImode)"
   "lwaux %3,%0,%2"
   [(set_attr "type" "load_ext_ux")])
@@ -11044,7 +11044,7 @@
 			  (match_operand:SI 2 "reg_or_short_operand" "r,I")))))
    (set (match_operand:SI 0 "gpc_reg_operand" "=b,b")
 	(plus:SI (match_dup 1) (match_dup 2)))]
-  "TARGET_UPDATE && rs6000_gen_cell_microcode
+  "TARGET_UPDATE && GCC_OPTION (rs6000_gen_cell_microcode)
    && (!avoiding_indexed_address_p (SImode)
        || !gpc_reg_operand (operands[2], SImode))"
   "@
@@ -11270,9 +11270,9 @@
    (clobber (reg:SI LR_REGNO))]
   "HAVE_AS_TLS && DEFAULT_ABI == ABI_V4"
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
-      if (TARGET_SECURE_PLT && flag_pic == 2)
+      if (TARGET_SECURE_PLT && GCC_OPTION (flag_pic) == 2)
 	return "addi %0,%1,%2@got@tlsgd\;bl %z3+32768@plt";
       else
 	return "addi %0,%1,%2@got@tlsgd\;bl %z3@plt";
@@ -11359,9 +11359,9 @@
    (clobber (reg:SI LR_REGNO))]
   "HAVE_AS_TLS && DEFAULT_ABI == ABI_V4 && TARGET_TLS_MARKERS"
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
-      if (TARGET_SECURE_PLT && flag_pic == 2)
+      if (TARGET_SECURE_PLT && GCC_OPTION (flag_pic) == 2)
 	return "bl %z1+32768(%3@tlsgd)@plt";
       return "bl %z1(%3@tlsgd)@plt";
     }
@@ -11410,9 +11410,9 @@
    (clobber (reg:SI LR_REGNO))]
   "HAVE_AS_TLS && DEFAULT_ABI == ABI_V4"
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
-      if (TARGET_SECURE_PLT && flag_pic == 2)
+      if (TARGET_SECURE_PLT && GCC_OPTION (flag_pic) == 2)
 	return "addi %0,%1,%&@got@tlsld\;bl %z2+32768@plt";
       else
 	return "addi %0,%1,%&@got@tlsld\;bl %z2@plt";
@@ -11494,9 +11494,9 @@
    (clobber (reg:SI LR_REGNO))]
   "HAVE_AS_TLS && DEFAULT_ABI == ABI_V4 && TARGET_TLS_MARKERS"
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
-      if (TARGET_SECURE_PLT && flag_pic == 2)
+      if (TARGET_SECURE_PLT && GCC_OPTION (flag_pic) == 2)
 	return "bl %z1+32768(%&@tlsld)@plt";
       return "bl %z1(%&@tlsld)@plt";
     }
@@ -11888,7 +11888,7 @@
 (define_insn "load_toc_v4_pic_si"
   [(set (reg:SI LR_REGNO)
 	(unspec:SI [(const_int 0)] UNSPEC_TOC))]
-  "DEFAULT_ABI == ABI_V4 && flag_pic == 1 && TARGET_32BIT"
+  "DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic) == 1 && TARGET_32BIT"
   "bl _GLOBAL_OFFSET_TABLE_@local-4"
   [(set_attr "type" "branch")
    (set_attr "length" "4")])
@@ -11898,7 +11898,7 @@
 		   (match_operand:SI 0 "immediate_operand" "s"))
 	      (use (unspec [(match_dup 0)] UNSPEC_TOC))])]
   "TARGET_ELF && DEFAULT_ABI == ABI_V4
-   && (flag_pic == 2 || (flag_pic && TARGET_SECURE_PLT))"
+   && (GCC_OPTION (flag_pic) == 2 || (GCC_OPTION (flag_pic) && TARGET_SECURE_PLT))"
   "")
 
 (define_insn "load_toc_v4_PIC_1_normal"
@@ -11906,7 +11906,7 @@
 	(match_operand:SI 0 "immediate_operand" "s"))
    (use (unspec [(match_dup 0)] UNSPEC_TOC))]
   "!TARGET_LINK_STACK && TARGET_ELF && DEFAULT_ABI == ABI_V4
-   && (flag_pic == 2 || (flag_pic && TARGET_SECURE_PLT))"
+   && (GCC_OPTION (flag_pic) == 2 || (GCC_OPTION (flag_pic) && TARGET_SECURE_PLT))"
   "bcl 20,31,%0\\n%0:"
   [(set_attr "type" "branch")
    (set_attr "length" "4")])
@@ -11916,7 +11916,7 @@
 	(match_operand:SI 0 "immediate_operand" "s"))
    (use (unspec [(match_dup 0)] UNSPEC_TOC))]
   "TARGET_LINK_STACK && TARGET_ELF && DEFAULT_ABI == ABI_V4
-   && (flag_pic == 2 || (flag_pic && TARGET_SECURE_PLT))"
+   && (GCC_OPTION (flag_pic) == 2 || (GCC_OPTION (flag_pic) && TARGET_SECURE_PLT))"
   "*
 {
   char name[32];
@@ -11935,7 +11935,7 @@
 			       (label_ref (match_operand 1 "" ""))]
 		           UNSPEC_TOCPTR))
 	      (match_dup 1)])]
-  "TARGET_ELF && DEFAULT_ABI == ABI_V4 && flag_pic == 2"
+  "TARGET_ELF && DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic) == 2"
   "")
 
 (define_insn "load_toc_v4_PIC_1b_normal"
@@ -11944,7 +11944,7 @@
 		    (label_ref (match_operand 1 "" ""))]
 		UNSPEC_TOCPTR))
    (match_dup 1)]
-  "!TARGET_LINK_STACK && TARGET_ELF && DEFAULT_ABI == ABI_V4 && flag_pic == 2"
+  "!TARGET_LINK_STACK && TARGET_ELF && DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic) == 2"
   "bcl 20,31,$+8\;.long %0-$"
   [(set_attr "type" "branch")
    (set_attr "length" "8")])
@@ -11955,7 +11955,7 @@
 		    (label_ref (match_operand 1 "" ""))]
 		UNSPEC_TOCPTR))
    (match_dup 1)]
-  "TARGET_LINK_STACK && TARGET_ELF && DEFAULT_ABI == ABI_V4 && flag_pic == 2"
+  "TARGET_LINK_STACK && TARGET_ELF && DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic) == 2"
   "*
 {
   char name[32];
@@ -11973,7 +11973,7 @@
 	(mem:SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b")
 		   (minus:SI (match_operand:SI 2 "immediate_operand" "s")
 			     (match_operand:SI 3 "immediate_operand" "s")))))]
-  "TARGET_ELF && DEFAULT_ABI == ABI_V4 && flag_pic == 2"
+  "TARGET_ELF && DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic) == 2"
   "lwz %0,%2-%3(%1)"
   [(set_attr "type" "load")])
 
@@ -11983,7 +11983,7 @@
 		 (high:SI
 		   (minus:SI (match_operand:SI 2 "symbol_ref_operand" "s")
 			     (match_operand:SI 3 "symbol_ref_operand" "s")))))]
-  "TARGET_ELF && TARGET_SECURE_PLT && DEFAULT_ABI == ABI_V4 && flag_pic"
+  "TARGET_ELF && TARGET_SECURE_PLT && DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic)"
   "addis %0,%1,%2-%3@ha")
 
 (define_insn "load_toc_v4_PIC_3c"
@@ -11991,7 +11991,7 @@
 	(lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b")
 		   (minus:SI (match_operand:SI 2 "symbol_ref_operand" "s")
 			     (match_operand:SI 3 "symbol_ref_operand" "s"))))]
-  "TARGET_ELF && TARGET_SECURE_PLT && DEFAULT_ABI == ABI_V4 && flag_pic"
+  "TARGET_ELF && TARGET_SECURE_PLT && DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic)"
   "addi %0,%1,%2-%3@l")
 
 ;; If the TOC is shared over a translation unit, as happens with all
@@ -12001,9 +12001,9 @@
 
 (define_expand "builtin_setjmp_receiver"
   [(use (label_ref (match_operand 0 "" "")))]
-  "(DEFAULT_ABI == ABI_V4 && flag_pic == 1)
+  "(DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic) == 1)
    || (TARGET_TOC && TARGET_MINIMAL_TOC)
-   || (DEFAULT_ABI == ABI_DARWIN && flag_pic)"
+   || (DEFAULT_ABI == ABI_DARWIN && GCC_OPTION (flag_pic))"
   "
 {
 #if TARGET_MACHO
@@ -12222,7 +12222,7 @@
   else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS)
     output_asm_insn (\"creqv 6,6,6\", operands);
 
-  return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"bl %z0@local\" : \"bl %z0\";
+  return (DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic)) ? \"bl %z0@local\" : \"bl %z0\";
 }"
   [(set_attr "type" "branch")
    (set_attr "length" "4,8")])
@@ -12241,7 +12241,7 @@
   else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS)
     output_asm_insn (\"creqv 6,6,6\", operands);
 
-  return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"bl %z0@local\" : \"bl %z0\";
+  return (DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic)) ? \"bl %z0@local\" : \"bl %z0\";
 }"
   [(set_attr "type" "branch")
    (set_attr "length" "4,8")])
@@ -12261,7 +12261,7 @@
   else if (INTVAL (operands[3]) & CALL_V4_CLEAR_FP_ARGS)
     output_asm_insn (\"creqv 6,6,6\", operands);
 
-  return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"bl %z1@local\" : \"bl %z1\";
+  return (DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic)) ? \"bl %z1@local\" : \"bl %z1\";
 }"
   [(set_attr "type" "branch")
    (set_attr "length" "4,8")])
@@ -12282,7 +12282,7 @@
   else if (INTVAL (operands[3]) & CALL_V4_CLEAR_FP_ARGS)
     output_asm_insn (\"creqv 6,6,6\", operands);
 
-  return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"bl %z1@local\" : \"bl %z1\";
+  return (DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic)) ? \"bl %z1@local\" : \"bl %z1\";
 }"
   [(set_attr "type" "branch")
    (set_attr "length" "4,8")])
@@ -12331,7 +12331,7 @@
 #if TARGET_MACHO
   return output_call(insn, operands, 0, 2);
 #else
-  if (DEFAULT_ABI == ABI_V4 && flag_pic)
+  if (DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic))
     {
       gcc_assert (!TARGET_SECURE_PLT);
       return "bl %z0@plt";
@@ -12341,7 +12341,7 @@
 #endif
 }
   "DEFAULT_ABI == ABI_V4
-   && TARGET_SECURE_PLT && flag_pic && !SYMBOL_REF_LOCAL_P (operands[0])
+   && TARGET_SECURE_PLT && GCC_OPTION (flag_pic) && !SYMBOL_REF_LOCAL_P (operands[0])
    && (INTVAL (operands[2]) & CALL_LONG) == 0"
   [(parallel [(call (mem:SI (match_dup 0))
 		    (match_dup 1))
@@ -12361,7 +12361,7 @@
    (use (match_operand:SI 3 "register_operand" "r,r"))
    (clobber (reg:SI LR_REGNO))]
   "(DEFAULT_ABI == ABI_V4
-    && TARGET_SECURE_PLT && flag_pic && !SYMBOL_REF_LOCAL_P (operands[0])
+    && TARGET_SECURE_PLT && GCC_OPTION (flag_pic) && !SYMBOL_REF_LOCAL_P (operands[0])
     && (INTVAL (operands[2]) & CALL_LONG) == 0)"
 {
   if (INTVAL (operands[2]) & CALL_V4_SET_FP_ARGS)
@@ -12370,7 +12370,7 @@
   else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS)
     output_asm_insn ("creqv 6,6,6", operands);
 
-  if (flag_pic == 2)
+  if (GCC_OPTION (flag_pic) == 2)
     /* The magic 32768 offset here and in the other sysv call insns
        corresponds to the offset of r30 in .got2, as given by LCTOC1.
        See sysv4.h:toc_section.  */
@@ -12420,7 +12420,7 @@
 #if TARGET_MACHO
   return output_call(insn, operands, 1, 3);
 #else
-  if (DEFAULT_ABI == ABI_V4 && flag_pic)
+  if (DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic))
     {
       gcc_assert (!TARGET_SECURE_PLT);
       return "bl %z1@plt";
@@ -12430,7 +12430,7 @@
 #endif
 }
   "DEFAULT_ABI == ABI_V4
-   && TARGET_SECURE_PLT && flag_pic && !SYMBOL_REF_LOCAL_P (operands[1])
+   && TARGET_SECURE_PLT && GCC_OPTION (flag_pic) && !SYMBOL_REF_LOCAL_P (operands[1])
    && (INTVAL (operands[3]) & CALL_LONG) == 0"
   [(parallel [(set (match_dup 0)
 		   (call (mem:SI (match_dup 1))
@@ -12452,7 +12452,7 @@
    (use (match_operand:SI 4 "register_operand" "r,r"))
    (clobber (reg:SI LR_REGNO))]
   "(DEFAULT_ABI == ABI_V4
-    && TARGET_SECURE_PLT && flag_pic && !SYMBOL_REF_LOCAL_P (operands[1])
+    && TARGET_SECURE_PLT && GCC_OPTION (flag_pic) && !SYMBOL_REF_LOCAL_P (operands[1])
     && (INTVAL (operands[3]) & CALL_LONG) == 0)"
 {
   if (INTVAL (operands[3]) & CALL_V4_SET_FP_ARGS)
@@ -12461,7 +12461,7 @@
   else if (INTVAL (operands[3]) & CALL_V4_CLEAR_FP_ARGS)
     output_asm_insn ("creqv 6,6,6", operands);
 
-  if (flag_pic == 2)
+  if (GCC_OPTION (flag_pic) == 2)
     return "bl %z1+32768@plt";
   else
     return "bl %z1@plt";
@@ -12668,7 +12668,7 @@
   else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS)
     output_asm_insn (\"creqv 6,6,6\", operands);
 
-  return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"b %z0@local\" : \"b %z0\";
+  return (DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic)) ? \"b %z0@local\" : \"b %z0\";
 }"
   [(set_attr "type" "branch")
    (set_attr "length" "4,8")])
@@ -12688,7 +12688,7 @@
   else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS)
     output_asm_insn (\"creqv 6,6,6\", operands);
 
-  return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"b %z0@local\" : \"b %z0\";
+  return (DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic)) ? \"b %z0@local\" : \"b %z0\";
 }"
   [(set_attr "type" "branch")
    (set_attr "length" "4,8")])
@@ -12709,7 +12709,7 @@
   else if (INTVAL (operands[3]) & CALL_V4_CLEAR_FP_ARGS)
     output_asm_insn (\"creqv 6,6,6\", operands);
 
-  return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"b %z1@local\" : \"b %z1\";
+  return (DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic)) ? \"b %z1@local\" : \"b %z1\";
 }"
   [(set_attr "type" "branch")
    (set_attr "length" "4,8")])
@@ -12730,7 +12730,7 @@
   else if (INTVAL (operands[3]) & CALL_V4_CLEAR_FP_ARGS)
     output_asm_insn (\"creqv 6,6,6\", operands);
 
-  return (DEFAULT_ABI == ABI_V4 && flag_pic) ? \"b %z1@local\" : \"b %z1\";
+  return (DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic)) ? \"b %z1@local\" : \"b %z1\";
 }"
   [(set_attr "type" "branch")
    (set_attr "length" "4,8")])
@@ -12754,7 +12754,7 @@
 
   if (which_alternative >= 2)
     return \"b%T0\";
-  else if (DEFAULT_ABI == ABI_V4 && flag_pic)
+  else if (DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic))
     {
       gcc_assert (!TARGET_SECURE_PLT);
       return \"b %z0@plt\";
@@ -12785,7 +12785,7 @@
 
   if (which_alternative >= 2)
     return \"b%T1\";
-  else if (DEFAULT_ABI == ABI_V4 && flag_pic)
+  else if (DEFAULT_ABI == ABI_V4 && GCC_OPTION (flag_pic))
     {
       gcc_assert (!TARGET_SECURE_PLT);
       return \"b %z1@plt\";
@@ -12825,7 +12825,7 @@
   [(use (const_int 0))]
   ""
 {
-  if (!TARGET_SCHED_PROLOG)
+  if (!GCC_OPTION (TARGET_SCHED_PROLOG))
     emit_insn (gen_blockage ());
   rs6000_emit_epilogue (TRUE);
   DONE;
@@ -13166,7 +13166,7 @@
   [(set (match_operand:CCFP 0 "cc_reg_operand" "=y")
 	(compare:CCFP (match_operand:TF 1 "gpc_reg_operand" "d")
 		      (match_operand:TF 2 "gpc_reg_operand" "d")))]
-  "!TARGET_IEEEQUAD && !TARGET_XL_COMPAT
+  "!TARGET_IEEEQUAD && !GCC_OPTION (TARGET_XL_COMPAT)
    && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LONG_DOUBLE_128"
   "fcmpu %0,%1,%2\;bne %0,$+8\;fcmpu %0,%L1,%L2"
   [(set_attr "type" "fpcompare")
@@ -13185,7 +13185,7 @@
     (clobber (match_scratch:DF 9 "=d"))
     (clobber (match_scratch:DF 10 "=d"))
     (clobber (match_scratch:GPR 11 "=b"))]
-  "!TARGET_IEEEQUAD && TARGET_XL_COMPAT
+  "!TARGET_IEEEQUAD && GCC_OPTION (TARGET_XL_COMPAT)
    && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LONG_DOUBLE_128"
   "#"
   "&& reload_completed"
@@ -13492,9 +13492,9 @@
 	 (const_int 0)))
    (set (match_operand:P 0 "gpc_reg_operand" "=r")
 	(eq:P (match_dup 1) (match_dup 2)))]
-  "optimize_size"
+  "GCC_OPTION (optimize_size)"
   "#"
-  "optimize_size"
+  "GCC_OPTION (optimize_size)"
   [(set (match_dup 0)
 	(clz:P (match_dup 4)))
    (parallel [(set (match_dup 3)
@@ -13563,7 +13563,7 @@
 	  (match_operand:SI 3 "gpc_reg_operand" "r,r,r,r,r,r,r,r,r,r"))
 	 (const_int 0)))
    (clobber (match_scratch:SI 4 "=&r,&r,&r,&r,&r,&r,&r,&r,&r,&r"))]
-  "TARGET_32BIT && optimize_size"
+  "TARGET_32BIT && GCC_OPTION (optimize_size)"
   "@
    xor %4,%1,%2\;subfic %4,%4,0\;addze. %4,%3
    subfic %4,%1,0\;addze. %4,%3
@@ -13587,7 +13587,7 @@
 	  (match_operand:SI 3 "gpc_reg_operand" ""))
 	 (const_int 0)))
    (clobber (match_scratch:SI 4 ""))]
-  "TARGET_32BIT && optimize_size && reload_completed"
+  "TARGET_32BIT && GCC_OPTION (optimize_size) && reload_completed"
   [(set (match_dup 4)
 	(plus:SI (eq:SI (match_dup 1)
 		 (match_dup 2))
@@ -13607,7 +13607,7 @@
 	 (const_int 0)))
    (set (match_operand:SI 0 "gpc_reg_operand" "=&r,&r,&r,&r,&r,&r,&r,&r,&r,&r")
 	(plus:SI (eq:SI (match_dup 1) (match_dup 2)) (match_dup 3)))]
-  "TARGET_32BIT && optimize_size"
+  "TARGET_32BIT && GCC_OPTION (optimize_size)"
   "@
    xor %0,%1,%2\;subfic %0,%0,0\;addze. %0,%3
    subfic %0,%1,0\;addze. %0,%3
@@ -13632,7 +13632,7 @@
 	 (const_int 0)))
    (set (match_operand:SI 0 "gpc_reg_operand" "")
 	(plus:SI (eq:SI (match_dup 1) (match_dup 2)) (match_dup 3)))]
-  "TARGET_32BIT && optimize_size && reload_completed"
+  "TARGET_32BIT && GCC_OPTION (optimize_size) && reload_completed"
   [(set (match_dup 0)
 	(plus:SI (eq:SI (match_dup 1) (match_dup 2)) (match_dup 3)))
    (set (match_dup 4)
@@ -15012,7 +15012,7 @@
   ""
 {
   rs6000_emit_prologue ();
-  if (!TARGET_SCHED_PROLOG)
+  if (!GCC_OPTION (TARGET_SCHED_PROLOG))
     emit_insn (gen_blockage ());
   DONE;
 })
@@ -15165,7 +15165,7 @@
   [(use (const_int 0))]
   ""
 {
-  if (!TARGET_SCHED_PROLOG)
+  if (!GCC_OPTION (TARGET_SCHED_PROLOG))
     emit_insn (gen_blockage ());
   rs6000_emit_epilogue (FALSE);
   DONE;
diff --git a/gcc/config/rs6000/singlefp.h b/gcc/config/rs6000/singlefp.h
index 7922e56..c59438b 100644
--- a/gcc/config/rs6000/singlefp.h
+++ b/gcc/config/rs6000/singlefp.h
@@ -30,10 +30,10 @@
 
 /* FPU operations supported. 
    If TARGET_SINGLE_FPU set, processor supports single fp options. */
-#define TARGET_SINGLE_FLOAT (rs6000_single_float)
-#define TARGET_DOUBLE_FLOAT (rs6000_double_float)
+#define TARGET_SINGLE_FLOAT (GCC_OPTION (rs6000_single_float))
+#define TARGET_DOUBLE_FLOAT (GCC_OPTION (rs6000_double_float))
 #define TARGET_SINGLE_FPU   1
-#define TARGET_SIMPLE_FPU   (rs6000_simple_fpu)
+#define TARGET_SIMPLE_FPU   (GCC_OPTION (rs6000_simple_fpu))
 
 /* FP word width depends on single/double fp support. */
 #define UNITS_PER_FP_WORD ((TARGET_SOFT_FLOAT || TARGET_DOUBLE_FLOAT) ? 8 : 4)
diff --git a/gcc/config/rs6000/spe.md b/gcc/config/rs6000/spe.md
index ad7eaf0..ff5c3d8 100644
--- a/gcc/config/rs6000/spe.md
+++ b/gcc/config/rs6000/spe.md
@@ -2967,7 +2967,7 @@
 			(match_operand:SF 2 "gpc_reg_operand" "r"))]
 	 1000))]
   "TARGET_HARD_FLOAT && !TARGET_FPRS
-   && !(flag_finite_math_only && !flag_trapping_math)"
+   && !(GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))"
   "efscmpeq %0,%1,%2"
   [(set_attr "type" "veccmp")])
 
@@ -2978,7 +2978,7 @@
 			(match_operand:SF 2 "gpc_reg_operand" "r"))]
 	 1001))]
   "TARGET_HARD_FLOAT && !TARGET_FPRS
-   && flag_finite_math_only && !flag_trapping_math"
+   && GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math)"
   "efststeq %0,%1,%2"
   [(set_attr "type" "veccmpsimple")])
 
@@ -2989,7 +2989,7 @@
 			(match_operand:SF 2 "gpc_reg_operand" "r"))]
 	 1002))]
   "TARGET_HARD_FLOAT && !TARGET_FPRS
-   && !(flag_finite_math_only && !flag_trapping_math)"
+   && !(GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))"
   "efscmpgt %0,%1,%2"
   [(set_attr "type" "veccmp")])
 
@@ -3000,7 +3000,7 @@
 			(match_operand:SF 2 "gpc_reg_operand" "r"))]
 	 1003))]
   "TARGET_HARD_FLOAT && !TARGET_FPRS
-   && flag_finite_math_only && !flag_trapping_math"
+   && GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math)"
   "efststgt %0,%1,%2"
   [(set_attr "type" "veccmpsimple")])
 
@@ -3011,7 +3011,7 @@
 			(match_operand:SF 2 "gpc_reg_operand" "r"))]
 	 1004))]
   "TARGET_HARD_FLOAT && !TARGET_FPRS
-   && !(flag_finite_math_only && !flag_trapping_math)"
+   && !(GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))"
   "efscmplt %0,%1,%2"
   [(set_attr "type" "veccmp")])
 
@@ -3022,7 +3022,7 @@
 			(match_operand:SF 2 "gpc_reg_operand" "r"))]
 	 1005))]
   "TARGET_HARD_FLOAT && !TARGET_FPRS
-   && flag_finite_math_only && !flag_trapping_math"
+   && GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math)"
   "efststlt %0,%1,%2"
   [(set_attr "type" "veccmpsimple")])
 
@@ -3035,7 +3035,7 @@
 			(match_operand:DF 2 "gpc_reg_operand" "r"))]
 	 CMPDFEQ_GPR))]
   "TARGET_HARD_FLOAT && TARGET_E500_DOUBLE
-   && !(flag_finite_math_only && !flag_trapping_math)"
+   && !(GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))"
   "efdcmpeq %0,%1,%2"
   [(set_attr "type" "veccmp")])
 
@@ -3046,7 +3046,7 @@
 			(match_operand:DF 2 "gpc_reg_operand" "r"))]
 	 TSTDFEQ_GPR))]
   "TARGET_HARD_FLOAT && TARGET_E500_DOUBLE
-   && flag_finite_math_only && !flag_trapping_math"
+   && GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math)"
   "efdtsteq %0,%1,%2"
   [(set_attr "type" "veccmpsimple")])
 
@@ -3057,7 +3057,7 @@
 			(match_operand:DF 2 "gpc_reg_operand" "r"))]
 	 CMPDFGT_GPR))]
   "TARGET_HARD_FLOAT && TARGET_E500_DOUBLE
-   && !(flag_finite_math_only && !flag_trapping_math)"
+   && !(GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))"
   "efdcmpgt %0,%1,%2"
   [(set_attr "type" "veccmp")])
 
@@ -3068,7 +3068,7 @@
 			(match_operand:DF 2 "gpc_reg_operand" "r"))]
 	 TSTDFGT_GPR))]
   "TARGET_HARD_FLOAT && TARGET_E500_DOUBLE
-   && flag_finite_math_only && !flag_trapping_math"
+   && GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math)"
   "efdtstgt %0,%1,%2"
   [(set_attr "type" "veccmpsimple")])
 
@@ -3079,7 +3079,7 @@
 			(match_operand:DF 2 "gpc_reg_operand" "r"))]
 	 CMPDFLT_GPR))]
   "TARGET_HARD_FLOAT && TARGET_E500_DOUBLE
-   && !(flag_finite_math_only && !flag_trapping_math)"
+   && !(GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))"
   "efdcmplt %0,%1,%2"
   [(set_attr "type" "veccmp")])
 
@@ -3090,7 +3090,7 @@
 			(match_operand:DF 2 "gpc_reg_operand" "r"))]
 	 TSTDFLT_GPR))]
   "TARGET_HARD_FLOAT && TARGET_E500_DOUBLE
-   && flag_finite_math_only && !flag_trapping_math"
+   && GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math)"
   "efdtstlt %0,%1,%2"
   [(set_attr "type" "veccmpsimple")])
 
@@ -3104,7 +3104,7 @@
 	 CMPTFEQ_GPR))]
   "!TARGET_IEEEQUAD
    && TARGET_HARD_FLOAT && TARGET_E500_DOUBLE && TARGET_LONG_DOUBLE_128
-   && !(flag_finite_math_only && !flag_trapping_math)"
+   && !(GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))"
   "efdcmpeq %0,%1,%2\;bng %0,$+8\;efdcmpeq %0,%L1,%L2"
   [(set_attr "type" "veccmp")
    (set_attr "length" "12")])
@@ -3117,7 +3117,7 @@
 	 TSTTFEQ_GPR))]
   "!TARGET_IEEEQUAD
    && TARGET_HARD_FLOAT && TARGET_E500_DOUBLE && TARGET_LONG_DOUBLE_128
-   && flag_finite_math_only && !flag_trapping_math"
+   && GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math)"
   "efdtsteq %0,%1,%2\;bng %0,$+8\;efdtsteq %0,%L1,%L2"
   [(set_attr "type" "veccmpsimple")
    (set_attr "length" "12")])
@@ -3130,7 +3130,7 @@
 	 CMPTFGT_GPR))]
   "!TARGET_IEEEQUAD
    && TARGET_HARD_FLOAT && TARGET_E500_DOUBLE && TARGET_LONG_DOUBLE_128
-   && !(flag_finite_math_only && !flag_trapping_math)"
+   && !(GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))"
   "efdcmpgt %0,%1,%2\;bgt %0,$+16\;efdcmpeq %0,%1,%2\;bng %0,$+8\;efdcmpgt %0,%L1,%L2"
   [(set_attr "type" "veccmp")
    (set_attr "length" "20")])
@@ -3143,7 +3143,7 @@
 	 TSTTFGT_GPR))]
   "!TARGET_IEEEQUAD
    && TARGET_HARD_FLOAT && TARGET_E500_DOUBLE && TARGET_LONG_DOUBLE_128
-   && flag_finite_math_only && !flag_trapping_math"
+   && GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math)"
   "efdtstgt %0,%1,%2\;bgt %0,$+16\;efdtsteq %0,%1,%2\;bng %0,$+8\;efdtstgt %0,%L1,%L2"
   [(set_attr "type" "veccmpsimple")
    (set_attr "length" "20")])
@@ -3156,7 +3156,7 @@
 	 CMPTFLT_GPR))]
   "!TARGET_IEEEQUAD
    && TARGET_HARD_FLOAT && TARGET_E500_DOUBLE && TARGET_LONG_DOUBLE_128
-   && !(flag_finite_math_only && !flag_trapping_math)"
+   && !(GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math))"
   "efdcmplt %0,%1,%2\;bgt %0,$+16\;efdcmpeq %0,%1,%2\;bng %0,$+8\;efdcmplt %0,%L1,%L2"
   [(set_attr "type" "veccmp")
    (set_attr "length" "20")])
@@ -3169,7 +3169,7 @@
 	 TSTTFLT_GPR))]
   "!TARGET_IEEEQUAD
    && TARGET_HARD_FLOAT && TARGET_E500_DOUBLE && TARGET_LONG_DOUBLE_128
-   && flag_finite_math_only && !flag_trapping_math"
+   && GCC_OPTION (flag_finite_math_only) && !GCC_OPTION (flag_trapping_math)"
   "efdtstlt %0,%1,%2\;bgt %0,$+16\;efdtsteq %0,%1,%2\;bng %0,$+8\;efdtstlt %0,%L1,%L2"
   [(set_attr "type" "veccmpsimple")
    (set_attr "length" "20")])
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index d04e6e4..7b7da37 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -31,7 +31,7 @@
 #define	TARGET_OBJECT_FORMAT OBJECT_ELF
 
 /* Default ABI to compile code for.  */
-#define DEFAULT_ABI rs6000_current_abi
+#define DEFAULT_ABI GCC_OPTION (rs6000_current_abi)
 
 /* Default ABI to use.  */
 #define RS6000_ABI_NAME "sysv"
@@ -40,24 +40,24 @@
 #undef	ASM_DEFAULT_SPEC
 #define	ASM_DEFAULT_SPEC "-mppc"
 
-#define	TARGET_TOC		((rs6000_isa_flags & OPTION_MASK_64BIT)	\
-				 || ((rs6000_isa_flags			\
+#define	TARGET_TOC		((GCC_OPTION (rs6000_isa_flags) & OPTION_MASK_64BIT)	\
+				 || ((GCC_OPTION (rs6000_isa_flags)			\
 				      & (OPTION_MASK_RELOCATABLE	\
 					 | OPTION_MASK_MINIMAL_TOC))	\
-				     && flag_pic > 1)			\
+				     && GCC_OPTION (flag_pic) > 1)			\
 				 || DEFAULT_ABI != ABI_V4)
 
-#define	TARGET_BITFIELD_TYPE	(! TARGET_NO_BITFIELD_TYPE)
+#define	TARGET_BITFIELD_TYPE	(! GCC_OPTION (TARGET_NO_BITFIELD_TYPE))
 #define	TARGET_BIG_ENDIAN	(! TARGET_LITTLE_ENDIAN)
-#define	TARGET_PROTOTYPE	target_prototype
+#define	TARGET_PROTOTYPE	GCC_OPTION (target_prototype)
 #define	TARGET_NO_PROTOTYPE	(! TARGET_PROTOTYPE)
 #define	TARGET_NO_TOC		(! TARGET_TOC)
 #define	TARGET_NO_EABI		(! TARGET_EABI)
-#define	TARGET_REGNAMES		rs6000_regnames
+#define	TARGET_REGNAMES		GCC_OPTION (rs6000_regnames)
 
 #ifdef HAVE_AS_REL16
 #undef TARGET_SECURE_PLT
-#define TARGET_SECURE_PLT	secure_plt
+#define TARGET_SECURE_PLT	GCC_OPTION (secure_plt)
 #endif
 
 #define SDATA_DEFAULT_SIZE 8
@@ -68,148 +68,148 @@
 #define SUBTARGET_OVERRIDE_OPTIONS					\
 do {									\
   if (!global_options_set.x_g_switch_value)				\
-    g_switch_value = SDATA_DEFAULT_SIZE;				\
+    GCC_OPTION (g_switch_value) = SDATA_DEFAULT_SIZE;				\
 									\
-  if (rs6000_abi_name == NULL)						\
-    rs6000_abi_name = RS6000_ABI_NAME;					\
+  if (GCC_OPTION (rs6000_abi_name) == NULL)						\
+    GCC_OPTION (rs6000_abi_name) = RS6000_ABI_NAME;					\
 									\
-  if (!strcmp (rs6000_abi_name, "sysv"))				\
-    rs6000_current_abi = ABI_V4;					\
-  else if (!strcmp (rs6000_abi_name, "sysv-noeabi"))			\
+  if (!strcmp (GCC_OPTION (rs6000_abi_name), "sysv"))				\
+    GCC_OPTION (rs6000_current_abi) = ABI_V4;					\
+  else if (!strcmp (GCC_OPTION (rs6000_abi_name), "sysv-noeabi"))			\
     {									\
-      rs6000_current_abi = ABI_V4;					\
-      rs6000_isa_flags &= ~ OPTION_MASK_EABI;				\
+      GCC_OPTION (rs6000_current_abi) = ABI_V4;					\
+      GCC_OPTION (rs6000_isa_flags) &= ~ OPTION_MASK_EABI;				\
     }									\
-  else if (!strcmp (rs6000_abi_name, "sysv-eabi")			\
-	   || !strcmp (rs6000_abi_name, "eabi"))			\
+  else if (!strcmp (GCC_OPTION (rs6000_abi_name), "sysv-eabi")			\
+	   || !strcmp (GCC_OPTION (rs6000_abi_name), "eabi"))			\
     {									\
-      rs6000_current_abi = ABI_V4;					\
-      rs6000_isa_flags |= OPTION_MASK_EABI;				\
+      GCC_OPTION (rs6000_current_abi) = ABI_V4;					\
+      GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_EABI;				\
     }									\
-  else if (!strcmp (rs6000_abi_name, "aixdesc"))			\
-    rs6000_current_abi = ABI_AIX;					\
-  else if (!strcmp (rs6000_abi_name, "freebsd")				\
-	   || !strcmp (rs6000_abi_name, "linux"))			\
+  else if (!strcmp (GCC_OPTION (rs6000_abi_name), "aixdesc"))			\
+    GCC_OPTION (rs6000_current_abi) = ABI_AIX;					\
+  else if (!strcmp (GCC_OPTION (rs6000_abi_name), "freebsd")				\
+	   || !strcmp (GCC_OPTION (rs6000_abi_name), "linux"))			\
     {									\
       if (TARGET_64BIT)							\
-	rs6000_current_abi = ABI_AIX;					\
+	GCC_OPTION (rs6000_current_abi) = ABI_AIX;					\
       else								\
-	rs6000_current_abi = ABI_V4;					\
+	GCC_OPTION (rs6000_current_abi) = ABI_V4;					\
     }									\
-  else if (!strcmp (rs6000_abi_name, "netbsd"))				\
-    rs6000_current_abi = ABI_V4;					\
-  else if (!strcmp (rs6000_abi_name, "openbsd"))			\
-    rs6000_current_abi = ABI_V4;					\
-  else if (!strcmp (rs6000_abi_name, "i960-old"))			\
+  else if (!strcmp (GCC_OPTION (rs6000_abi_name), "netbsd"))				\
+    GCC_OPTION (rs6000_current_abi) = ABI_V4;					\
+  else if (!strcmp (GCC_OPTION (rs6000_abi_name), "openbsd"))			\
+    GCC_OPTION (rs6000_current_abi) = ABI_V4;					\
+  else if (!strcmp (GCC_OPTION (rs6000_abi_name), "i960-old"))			\
     {									\
-      rs6000_current_abi = ABI_V4;					\
-      rs6000_isa_flags |= (OPTION_MASK_LITTLE_ENDIAN | OPTION_MASK_EABI); \
-      rs6000_isa_flags &= ~OPTION_MASK_STRICT_ALIGN;			\
-      TARGET_NO_BITFIELD_WORD = 1;					\
+      GCC_OPTION (rs6000_current_abi) = ABI_V4;					\
+      GCC_OPTION (rs6000_isa_flags) |= (OPTION_MASK_LITTLE_ENDIAN | OPTION_MASK_EABI); \
+      GCC_OPTION (rs6000_isa_flags) &= ~OPTION_MASK_STRICT_ALIGN;			\
+      GCC_OPTION (TARGET_NO_BITFIELD_WORD) = 1;					\
     }									\
   else									\
     {									\
-      rs6000_current_abi = ABI_V4;					\
-      error ("bad value for -mcall-%s", rs6000_abi_name);		\
+      GCC_OPTION (rs6000_current_abi) = ABI_V4;					\
+      error ("bad value for -mcall-%s", GCC_OPTION (rs6000_abi_name));		\
     }									\
 									\
-  if (rs6000_sdata_name)						\
+  if (GCC_OPTION (rs6000_sdata_name))						\
     {									\
-      if (!strcmp (rs6000_sdata_name, "none"))				\
-	rs6000_sdata = SDATA_NONE;					\
-      else if (!strcmp (rs6000_sdata_name, "data"))			\
-	rs6000_sdata = SDATA_DATA;					\
-      else if (!strcmp (rs6000_sdata_name, "default"))			\
-	rs6000_sdata = (TARGET_EABI) ? SDATA_EABI : SDATA_SYSV;		\
-      else if (!strcmp (rs6000_sdata_name, "sysv"))			\
-	rs6000_sdata = SDATA_SYSV;					\
-      else if (!strcmp (rs6000_sdata_name, "eabi"))			\
-	rs6000_sdata = SDATA_EABI;					\
+      if (!strcmp (GCC_OPTION (rs6000_sdata_name), "none"))				\
+	GCC_OPTION (rs6000_sdata) = SDATA_NONE;					\
+      else if (!strcmp (GCC_OPTION (rs6000_sdata_name), "data"))			\
+	GCC_OPTION (rs6000_sdata) = SDATA_DATA;					\
+      else if (!strcmp (GCC_OPTION (rs6000_sdata_name), "default"))			\
+	GCC_OPTION (rs6000_sdata) = (TARGET_EABI) ? SDATA_EABI : SDATA_SYSV;		\
+      else if (!strcmp (GCC_OPTION (rs6000_sdata_name), "sysv"))			\
+	GCC_OPTION (rs6000_sdata) = SDATA_SYSV;					\
+      else if (!strcmp (GCC_OPTION (rs6000_sdata_name), "eabi"))			\
+	GCC_OPTION (rs6000_sdata) = SDATA_EABI;					\
       else								\
-	error ("bad value for -msdata=%s", rs6000_sdata_name);		\
+	error ("bad value for -msdata=%s", GCC_OPTION (rs6000_sdata_name));		\
     }									\
   else if (DEFAULT_ABI == ABI_V4)					\
     {									\
-      rs6000_sdata = SDATA_DATA;					\
-      rs6000_sdata_name = "data";					\
+      GCC_OPTION (rs6000_sdata) = SDATA_DATA;					\
+      GCC_OPTION (rs6000_sdata_name) = "data";					\
     }									\
   else									\
     {									\
-      rs6000_sdata = SDATA_NONE;					\
-      rs6000_sdata_name = "none";					\
+      GCC_OPTION (rs6000_sdata) = SDATA_NONE;					\
+      GCC_OPTION (rs6000_sdata_name) = "none";					\
     }									\
 									\
   if (TARGET_RELOCATABLE &&						\
-      (rs6000_sdata == SDATA_EABI || rs6000_sdata == SDATA_SYSV))	\
+      (GCC_OPTION (rs6000_sdata) == SDATA_EABI || GCC_OPTION (rs6000_sdata) == SDATA_SYSV))	\
     {									\
-      rs6000_sdata = SDATA_DATA;					\
+      GCC_OPTION (rs6000_sdata) = SDATA_DATA;					\
       error ("-mrelocatable and -msdata=%s are incompatible",		\
-	     rs6000_sdata_name);					\
+	     GCC_OPTION (rs6000_sdata_name));					\
     }									\
 									\
-  else if (flag_pic && DEFAULT_ABI == ABI_V4				\
-	   && (rs6000_sdata == SDATA_EABI				\
-	       || rs6000_sdata == SDATA_SYSV))				\
+  else if (GCC_OPTION (flag_pic) && DEFAULT_ABI == ABI_V4				\
+	   && (GCC_OPTION (rs6000_sdata) == SDATA_EABI				\
+	       || GCC_OPTION (rs6000_sdata) == SDATA_SYSV))				\
     {									\
-      rs6000_sdata = SDATA_DATA;					\
+      GCC_OPTION (rs6000_sdata) = SDATA_DATA;					\
       error ("-f%s and -msdata=%s are incompatible",			\
-	     (flag_pic > 1) ? "PIC" : "pic",				\
-	     rs6000_sdata_name);					\
+	     (GCC_OPTION (flag_pic) > 1) ? "PIC" : "pic",				\
+	     GCC_OPTION (rs6000_sdata_name));					\
     }									\
 									\
-  if ((rs6000_sdata != SDATA_NONE && DEFAULT_ABI != ABI_V4)		\
-      || (rs6000_sdata == SDATA_EABI && !TARGET_EABI))			\
+  if ((GCC_OPTION (rs6000_sdata) != SDATA_NONE && DEFAULT_ABI != ABI_V4)		\
+      || (GCC_OPTION (rs6000_sdata) == SDATA_EABI && !TARGET_EABI))			\
     {									\
-      rs6000_sdata = SDATA_NONE;					\
+      GCC_OPTION (rs6000_sdata) = SDATA_NONE;					\
       error ("-msdata=%s and -mcall-%s are incompatible",		\
-	     rs6000_sdata_name, rs6000_abi_name);			\
+	     GCC_OPTION (rs6000_sdata_name), GCC_OPTION (rs6000_abi_name));			\
     }									\
 									\
-  targetm.have_srodata_section = rs6000_sdata == SDATA_EABI;		\
+  targetm.have_srodata_section = GCC_OPTION (rs6000_sdata) == SDATA_EABI;		\
 									\
   if (TARGET_RELOCATABLE && !TARGET_MINIMAL_TOC)			\
     {									\
-      rs6000_isa_flags |= OPTION_MASK_MINIMAL_TOC;			\
+      GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_MINIMAL_TOC;			\
       error ("-mrelocatable and -mno-minimal-toc are incompatible");	\
     }									\
 									\
-  if (TARGET_RELOCATABLE && rs6000_current_abi != ABI_V4)		\
+  if (TARGET_RELOCATABLE && GCC_OPTION (rs6000_current_abi) != ABI_V4)		\
     {									\
-      rs6000_isa_flags &= ~OPTION_MASK_RELOCATABLE;			\
+      GCC_OPTION (rs6000_isa_flags) &= ~OPTION_MASK_RELOCATABLE;			\
       error ("-mrelocatable and -mcall-%s are incompatible",		\
-	     rs6000_abi_name);						\
+	     GCC_OPTION (rs6000_abi_name));						\
     }									\
 									\
-  if (!TARGET_64BIT && flag_pic > 1 && rs6000_current_abi != ABI_V4)	\
+  if (!TARGET_64BIT && GCC_OPTION (flag_pic) > 1 && GCC_OPTION (rs6000_current_abi) != ABI_V4)	\
     {									\
-      flag_pic = 0;							\
+      GCC_OPTION (flag_pic) = 0;							\
       error ("-fPIC and -mcall-%s are incompatible",			\
-	     rs6000_abi_name);						\
+	     GCC_OPTION (rs6000_abi_name));						\
     }									\
 									\
-  if (TARGET_SECURE_PLT != secure_plt)					\
+  if (TARGET_SECURE_PLT != GCC_OPTION (secure_plt))					\
     {									\
       error ("-msecure-plt not supported by your assembler");		\
     }									\
 									\
   /* Treat -fPIC the same as -mrelocatable.  */				\
-  if (flag_pic > 1 && DEFAULT_ABI == ABI_V4)				\
+  if (GCC_OPTION (flag_pic) > 1 && DEFAULT_ABI == ABI_V4)				\
     {									\
-      rs6000_isa_flags |= OPTION_MASK_RELOCATABLE | OPTION_MASK_MINIMAL_TOC; \
-      TARGET_NO_FP_IN_TOC = 1;						\
+      GCC_OPTION (rs6000_isa_flags) |= OPTION_MASK_RELOCATABLE | OPTION_MASK_MINIMAL_TOC; \
+      GCC_OPTION (TARGET_NO_FP_IN_TOC) = 1;						\
     }									\
 									\
   else if (TARGET_RELOCATABLE)						\
-    if (!flag_pic)							\
-      flag_pic = 2;							\
+    if (!GCC_OPTION (flag_pic))							\
+      GCC_OPTION (flag_pic) = 2;							\
 } while (0)
 
 #ifndef RS6000_BI_ARCH
 # define SUBSUBTARGET_OVERRIDE_OPTIONS					\
 do {									\
-  if ((TARGET_DEFAULT ^ rs6000_isa_flags) & OPTION_MASK_64BIT)		\
+  if ((TARGET_DEFAULT ^ GCC_OPTION (rs6000_isa_flags)) & OPTION_MASK_64BIT)		\
     error ("-m%s not supported in this configuration",			\
-	   (rs6000_isa_flags & OPTION_MASK_64BIT) ? "64" : "32");	\
+	   (GCC_OPTION (rs6000_isa_flags) & OPTION_MASK_64BIT) ? "64" : "32");	\
 } while (0)
 #endif
 
@@ -262,7 +262,7 @@ do {									\
 #define	PCC_BITFIELD_TYPE_MATTERS (TARGET_BITFIELD_TYPE)
 
 #undef	BITFIELD_NBYTES_LIMITED
-#define	BITFIELD_NBYTES_LIMITED (TARGET_NO_BITFIELD_WORD)
+#define	BITFIELD_NBYTES_LIMITED (GCC_OPTION (TARGET_NO_BITFIELD_WORD))
 
 /* Define this macro to be the value 1 if instructions will fail to
    work if given data not on the nominal alignment.  If instructions
@@ -317,7 +317,7 @@ do {									\
 
 /* Put PC relative got entries in .got2.  */
 #define	MINIMAL_TOC_SECTION_ASM_OP \
-  (TARGET_RELOCATABLE || (flag_pic && DEFAULT_ABI == ABI_V4)		\
+  (TARGET_RELOCATABLE || (GCC_OPTION (flag_pic) && DEFAULT_ABI == ABI_V4)		\
    ? "\t.section\t\".got2\",\"aw\"" : "\t.section\t\".got1\",\"aw\"")
 
 #define	SDATA_SECTION_ASM_OP "\t.section\t\".sdata\",\"aw\""
@@ -351,7 +351,7 @@ do {									\
        || GET_CODE (X) == LABEL_REF					\
        || (GET_CODE (X) == CONST_INT 					\
 	   && GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode))	\
-       || (!TARGET_NO_FP_IN_TOC						\
+       || (!GCC_OPTION (TARGET_NO_FP_IN_TOC)						\
 	   && !TARGET_RELOCATABLE					\
 	   && GET_CODE (X) == CONST_DOUBLE				\
 	   && SCALAR_FLOAT_MODE_P (GET_MODE (X))			\
@@ -401,7 +401,7 @@ do {									\
       ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT));	\
       ASM_OUTPUT_LABEL (FILE, NAME);					\
       ASM_OUTPUT_SKIP (FILE, SIZE);					\
-      if (!flag_inhibit_size_directive && (SIZE) > 0)			\
+      if (!GCC_OPTION (flag_inhibit_size_directive) && (SIZE) > 0)			\
 	ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE);			\
     }									\
   else									\
@@ -495,7 +495,7 @@ extern int fixuplabelno;
 #define TARGET_OS_SYSV_CPP_BUILTINS()		\
   do						\
     {						\
-      if (rs6000_isa_flags_explicit		\
+      if (GCC_OPTION (rs6000_isa_flags_explicit)		\
 	  & OPTION_MASK_RELOCATABLE)		\
 	builtin_define ("_RELOCATABLE");	\
     }						\
@@ -931,7 +931,7 @@ ncrtn.o%s"
    is 0 for data, 1 for code labels, 2 for function pointers.  GLOBAL is
    true if the symbol may be affected by dynamic relocations.  */
 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)			     \
-  ((flag_pic || TARGET_RELOCATABLE)					     \
+  ((GCC_OPTION (flag_pic) || TARGET_RELOCATABLE)					     \
    ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \
    : DW_EH_PE_absptr)
 
diff --git a/gcc/config/rs6000/vector.md b/gcc/config/rs6000/vector.md
index edbb831..8d49d31 100644
--- a/gcc/config/rs6000/vector.md
+++ b/gcc/config/rs6000/vector.md
@@ -969,7 +969,7 @@
 (define_expand "movmisalign<mode>"
  [(set (match_operand:VEC_N 0 "nonimmediate_operand" "")
        (match_operand:VEC_N 1 "any_operand" ""))]
- "VECTOR_MEM_VSX_P (<MODE>mode) && TARGET_ALLOW_MOVMISALIGN"
+ "VECTOR_MEM_VSX_P (<MODE>mode) && GCC_OPTION (TARGET_ALLOW_MOVMISALIGN)"
  "")
 
 
diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md
index 93c8c3b..c71b14b 100644
--- a/gcc/config/rs6000/vsx.md
+++ b/gcc/config/rs6000/vsx.md
@@ -1307,8 +1307,8 @@
 	 (fix:<VSI>
 	  (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?wa"))))]
   "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
-   && VECTOR_UNIT_VSX_P (<MODE>mode) && flag_unsafe_math_optimizations
-   && !flag_trapping_math && TARGET_FRIZ"
+   && VECTOR_UNIT_VSX_P (<MODE>mode) && GCC_OPTION (flag_unsafe_math_optimizations)
+   && !GCC_OPTION (flag_trapping_math) && GCC_OPTION (TARGET_FRIZ)"
   "x<VSv>r<VSs>iz %x0,%x1"
   [(set_attr "type" "<VStype_simple>")
    (set_attr "fp_type" "<VSfptype_simple>")])
diff --git a/gcc/config/rs6000/vxworks.h b/gcc/config/rs6000/vxworks.h
index 7b4e9b9..d436b09 100644
--- a/gcc/config/rs6000/vxworks.h
+++ b/gcc/config/rs6000/vxworks.h
@@ -124,7 +124,7 @@ VXWORKS_ADDITIONAL_CPP_SPEC
 #define SUBSUBTARGET_OVERRIDE_OPTIONS		\
   do {						\
   if (!global_options_set.x_g_switch_value)	\
-    g_switch_value = SDATA_DEFAULT_SIZE;	\
+    GCC_OPTION (g_switch_value) = SDATA_DEFAULT_SIZE;	\
   VXWORKS_OVERRIDE_OPTIONS;			\
   } while (0)
 
diff --git a/gcc/config/rs6000/xcoff.h b/gcc/config/rs6000/xcoff.h
index f2b7bd0..f95a939 100644
--- a/gcc/config/rs6000/xcoff.h
+++ b/gcc/config/rs6000/xcoff.h
@@ -84,7 +84,7 @@
        || (GET_CODE (X) == CONST_DOUBLE					\
 	   && (TARGET_MINIMAL_TOC					\
 	       || (SCALAR_FLOAT_MODE_P (GET_MODE (X))			\
-		   && ! TARGET_NO_FP_IN_TOC)))))
+		   && ! GCC_OPTION (TARGET_NO_FP_IN_TOC))))))
 
 #define TARGET_ASM_OUTPUT_ANCHOR  rs6000_xcoff_asm_output_anchor
 #define TARGET_ASM_GLOBALIZE_LABEL  rs6000_xcoff_asm_globalize_label
@@ -192,7 +192,7 @@
   putc ('.', FILE);						\
   RS6000_OUTPUT_BASENAME (FILE, buffer);			\
   fputs (":\n", FILE);						\
-  if (write_symbols != NO_DEBUG && !DECL_IGNORED_P (DECL))	\
+  if (GCC_OPTION (write_symbols) != NO_DEBUG && !DECL_IGNORED_P (DECL))	\
     xcoffout_declare_function (FILE, DECL, buffer);		\
 }
 
diff --git a/gcc/config/rs6000/xfpu.h b/gcc/config/rs6000/xfpu.h
index 841800b..2ab8fac 100644
--- a/gcc/config/rs6000/xfpu.h
+++ b/gcc/config/rs6000/xfpu.h
@@ -23,4 +23,4 @@
 /* Undefine definitions from rs6000.h. */
 #undef TARGET_XILINX_FPU 
 
-#define TARGET_XILINX_FPU  (rs6000_xilinx_fpu)
+#define TARGET_XILINX_FPU  (GCC_OPTION (rs6000_xilinx_fpu))
diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c
index 4242c1a..b2cca7f 100644
--- a/gcc/config/rx/rx.c
+++ b/gcc/config/rx/rx.c
@@ -169,7 +169,7 @@ rx_legitimize_address (rtx x,
 static bool
 rx_small_data_operand (rtx op)
 {
-  if (rx_small_data_limit == 0)
+  if (GCC_OPTION (rx_small_data_limit) == 0)
     return false;
 
   if (GET_CODE (op) == SYMBOL_REF)
@@ -1250,7 +1250,7 @@ rx_conditional_register_usage (void)
       fixed_regs[rx_pid_base_regnum_val] = call_used_regs [rx_pid_base_regnum_val] = 1;
     }
 
-  if (rx_small_data_limit > 0)
+  if (GCC_OPTION (rx_small_data_limit) > 0)
     {
       if (TARGET_PID)
 	rx_gp_base_regnum_val = rx_pid_base_regnum_val - 1;
@@ -1365,7 +1365,7 @@ rx_set_current_function (tree fndecl)
       target_reinit ();
     }
 
-  if (current_is_fast_interrupt && rx_warn_multiple_fast_interrupts)
+  if (current_is_fast_interrupt && GCC_OPTION (rx_warn_multiple_fast_interrupts))
     {
       /* We do not warn about the first fast interrupt routine that
 	 we see.  Instead we just push it onto the stack.  */
@@ -1635,15 +1635,15 @@ mark_frame_related (rtx insn)
 static bool
 ok_for_max_constant (HOST_WIDE_INT val)
 {
-  if (rx_max_constant_size == 0  || rx_max_constant_size == 4)
+  if (GCC_OPTION (rx_max_constant_size) == 0  || GCC_OPTION (rx_max_constant_size) == 4)
     /* If there is no constraint on the size of constants
        used as operands, then any value is legitimate.  */
     return true;
 
   /* rx_max_constant_size specifies the maximum number
      of bytes that can be used to hold a signed value.  */
-  return IN_RANGE (val, (-1 << (rx_max_constant_size * 8)),
-		        ( 1 << (rx_max_constant_size * 8)));
+  return IN_RANGE (val, (-1 << (GCC_OPTION (rx_max_constant_size) * 8)),
+		        ( 1 << (GCC_OPTION (rx_max_constant_size) * 8)));
 }
 
 /* Generate an ADD of SRC plus VAL into DEST.
@@ -1702,7 +1702,7 @@ rx_expand_prologue (void)
 
   rx_get_stack_layout (& low, & high, & mask, & frame_size, & stack_size);
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = frame_size + stack_size;
 
   /* If we use any of the callee-saved registers, save them now.  */
@@ -2161,7 +2161,7 @@ rx_in_small_data (const_tree decl)
   int size;
   const_tree section;
 
-  if (rx_small_data_limit == 0)
+  if (GCC_OPTION (rx_small_data_limit) == 0)
     return false;
 
   if (TREE_CODE (decl) != VAR_DECL)
@@ -2186,7 +2186,7 @@ rx_in_small_data (const_tree decl)
 
   size = int_size_in_bytes (TREE_TYPE (decl));
 
-  return (size > 0) && (size <= rx_small_data_limit);
+  return (size > 0) && (size <= GCC_OPTION (rx_small_data_limit));
 }
 
 /* Return a section for X.
@@ -2197,9 +2197,9 @@ rx_select_rtx_section (enum machine_mode mode,
 		       rtx x,
 		       unsigned HOST_WIDE_INT align)
 {
-  if (rx_small_data_limit > 0
-      && GET_MODE_SIZE (mode) <= rx_small_data_limit
-      && align <= (unsigned HOST_WIDE_INT) rx_small_data_limit * BITS_PER_UNIT)
+  if (GCC_OPTION (rx_small_data_limit) > 0
+      && GET_MODE_SIZE (mode) <= GCC_OPTION (rx_small_data_limit)
+      && align <= (unsigned HOST_WIDE_INT) GCC_OPTION (rx_small_data_limit) * BITS_PER_UNIT)
     return sdata_section;
 
   return default_elf_select_rtx_section (mode, x, align);
@@ -2210,7 +2210,7 @@ rx_select_section (tree decl,
 		   int reloc,
 		   unsigned HOST_WIDE_INT align)
 {
-  if (rx_small_data_limit > 0)
+  if (GCC_OPTION (rx_small_data_limit) > 0)
     {
       switch (categorize_decl_for_section (decl, reloc))
 	{
@@ -2398,7 +2398,7 @@ static rtx
 rx_expand_builtin_mvtipl (rtx arg)
 {
   /* The RX610 does not support the MVTIPL instruction.  */
-  if (rx_cpu_type == RX610)
+  if (GCC_OPTION (rx_cpu_type) == RX610)
     return NULL_RTX;
 
   if (! CONST_INT_P (arg) || ! IN_RANGE (INTVAL (arg), 0, (1 << 4) - 1))
@@ -2645,7 +2645,7 @@ rx_override_options_after_change (void)
 	 the use of RX FPU hardware then enable -ffinite-math-only,
 	 since the FPU instructions do not support NaNs and infinities.  */
       if (TARGET_USE_FPU)
-	flag_finite_math_only = 1;
+	GCC_OPTION (flag_finite_math_only) = 1;
 
       first_time = FALSE;
     }
@@ -2654,7 +2654,7 @@ rx_override_options_after_change (void)
       /* Alert the user if they are changing the optimization options
 	 to use IEEE compliant floating point arithmetic with RX FPU insns.  */
       if (TARGET_USE_FPU
-	  && !flag_finite_math_only)
+	  && !GCC_OPTION (flag_finite_math_only))
 	warning (0, "RX FPU instructions do not support NaNs and infinities");
     }
 }
@@ -2664,7 +2664,7 @@ rx_option_override (void)
 {
   unsigned int i;
   cl_deferred_option *opt;
-  vec<cl_deferred_option> *v = (vec<cl_deferred_option> *) rx_deferred_options;
+  vec<cl_deferred_option> *v = (vec<cl_deferred_option> *) GCC_OPTION (rx_deferred_options);
 
   if (v)
     FOR_EACH_VEC_ELT (*v, i, opt)
@@ -2703,17 +2703,17 @@ rx_option_override (void)
       }
 
   /* This target defaults to strict volatile bitfields.  */
-  if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
-    flag_strict_volatile_bitfields = 1;
+  if (GCC_OPTION (flag_strict_volatile_bitfields) < 0 && abi_version_at_least(2))
+    GCC_OPTION (flag_strict_volatile_bitfields) = 1;
 
   rx_override_options_after_change ();
 
-  if (align_jumps == 0 && ! optimize_size)
-    align_jumps = 3;
-  if (align_loops == 0 && ! optimize_size)
-    align_loops = 3;
-  if (align_labels == 0 && ! optimize_size)
-    align_labels = 3;
+  if (GCC_OPTION (align_jumps) == 0 && ! GCC_OPTION (optimize_size))
+    GCC_OPTION (align_jumps) = 3;
+  if (GCC_OPTION (align_loops) == 0 && ! GCC_OPTION (optimize_size))
+    GCC_OPTION (align_loops) = 3;
+  if (GCC_OPTION (align_labels) == 0 && ! GCC_OPTION (optimize_size))
+    GCC_OPTION (align_labels) = 3;
 }
 
 
@@ -2815,7 +2815,7 @@ rx_is_legitimate_constant (enum machine_mode mode ATTRIBUTE_UNUSED, rtx x)
     case SYMBOL_REF:
       return true;
     case CONST_DOUBLE:
-      return (rx_max_constant_size == 0 || rx_max_constant_size == 4);
+      return (GCC_OPTION (rx_max_constant_size) == 0 || GCC_OPTION (rx_max_constant_size) == 4);
     case CONST_VECTOR:
       return false;
     default:
@@ -3118,7 +3118,7 @@ rx_align_for_label (rtx lab, int uses_threshold)
   if (LABEL_P (lab) && LABEL_NUSES (lab) < uses_threshold)
     return 0;
 
-  return optimize_size ? 1 : 3;
+  return GCC_OPTION (optimize_size) ? 1 : 3;
 }
 
 static int
diff --git a/gcc/config/rx/rx.h b/gcc/config/rx/rx.h
index d99b19a..e4b1665 100644
--- a/gcc/config/rx/rx.h
+++ b/gcc/config/rx/rx.h
@@ -24,22 +24,22 @@
     {                                           \
       builtin_define ("__RX__"); 		\
       builtin_assert ("cpu=RX"); 		\
-      if (rx_cpu_type == RX610)			\
+      if (GCC_OPTION (rx_cpu_type) == RX610)			\
 	{					\
           builtin_define ("__RX610__");		\
           builtin_assert ("machine=RX610");	\
 	}					\
-      else if (rx_cpu_type == RX100)		\
+      else if (GCC_OPTION (rx_cpu_type) == RX100)		\
 	{					\
           builtin_define ("__RX100__");		\
           builtin_assert ("machine=RX100");	\
 	}					\
-      else if (rx_cpu_type == RX200)		\
+      else if (GCC_OPTION (rx_cpu_type) == RX200)		\
 	{					\
           builtin_define ("__RX200__");		\
           builtin_assert ("machine=RX200");	\
         }					\
-      else if (rx_cpu_type == RX600)		\
+      else if (GCC_OPTION (rx_cpu_type) == RX600)		\
         {					\
           builtin_define ("__RX600__");		\
           builtin_assert ("machine=RX600");	\
@@ -433,9 +433,9 @@ typedef unsigned int CUMULATIVE_ARGS;
 /* Compute the alignment needed for label X in various situations.
    If the user has specified an alignment then honour that, otherwise
    use rx_align_for_label.  */
-#define JUMP_ALIGN(x)				(align_jumps ? align_jumps : rx_align_for_label (x, 0))
-#define LABEL_ALIGN(x)				(align_labels ? align_labels : rx_align_for_label (x, 3))
-#define LOOP_ALIGN(x)				(align_loops ? align_loops : rx_align_for_label (x, 2))
+#define JUMP_ALIGN(x)				(GCC_OPTION (align_jumps) ? GCC_OPTION (align_jumps) : rx_align_for_label (x, 0))
+#define LABEL_ALIGN(x)				(GCC_OPTION (align_labels) ? GCC_OPTION (align_labels) : rx_align_for_label (x, 3))
+#define LOOP_ALIGN(x)				(GCC_OPTION (align_loops) ? GCC_OPTION (align_loops) : rx_align_for_label (x, 2))
 #define LABEL_ALIGN_AFTER_BARRIER(x)		rx_align_for_label (x, 0)
 
 #define ASM_OUTPUT_MAX_SKIP_ALIGN(STREAM, LOG, MAX_SKIP)	\
@@ -626,7 +626,7 @@ typedef unsigned int CUMULATIVE_ARGS;
 
 /* For PIC put jump tables into the text section so that the offsets that
    they contain are always computed between two same-section symbols.  */
-#define JUMP_TABLES_IN_TEXT_SECTION	(TARGET_PID || flag_pic)
+#define JUMP_TABLES_IN_TEXT_SECTION	(TARGET_PID || GCC_OPTION (flag_pic))
 
 /* This is a version of REG_P that also returns TRUE for SUBREGs.  */
 #define RX_REG_P(rtl) (REG_P (rtl) || GET_CODE (rtl) == SUBREG)
diff --git a/gcc/config/rx/rx.md b/gcc/config/rx/rx.md
index ecdfc15..6367dd7 100644
--- a/gcc/config/rx/rx.md
+++ b/gcc/config/rx/rx.md
@@ -1733,7 +1733,7 @@
 		   (memex_commutative:SI (match_dup 0)
 					 (match_dup 2)))
 	      (clobber (reg:CC CC_REG))])]
-  "peep2_regno_dead_p (2, REGNO (operands[0])) && (optimize < 3 || optimize_size)"
+  "peep2_regno_dead_p (2, REGNO (operands[0])) && (GCC_OPTION (optimize) < 3 || GCC_OPTION (optimize_size))"
   [(parallel [(set:SI (match_dup 2)
 		      (memex_commutative:SI (match_dup 2)
 					    (extend_types:SI (match_dup 1))))
@@ -1747,7 +1747,7 @@
 		   (memex_commutative:SI (match_dup 2)
 					 (match_dup 0)))
 	      (clobber (reg:CC CC_REG))])]
-  "peep2_regno_dead_p (2, REGNO (operands[0])) && (optimize < 3 || optimize_size)"
+  "peep2_regno_dead_p (2, REGNO (operands[0])) && (GCC_OPTION (optimize) < 3 || GCC_OPTION (optimize_size))"
   [(parallel [(set:SI (match_dup 2)
 		      (memex_commutative:SI (match_dup 2)
 					    (extend_types:SI (match_dup 1))))
@@ -1761,7 +1761,7 @@
 		   (memex_noncomm:SI (match_dup 2)
 				     (match_dup 0)))
 	      (clobber (reg:CC CC_REG))])]
-  "peep2_regno_dead_p (2, REGNO (operands[0])) && (optimize < 3 || optimize_size)"
+  "peep2_regno_dead_p (2, REGNO (operands[0])) && (GCC_OPTION (optimize) < 3 || GCC_OPTION (optimize_size))"
   [(parallel [(set:SI (match_dup 2)
 		      (memex_noncomm:SI (match_dup 2)
 					(extend_types:SI (match_dup 1))))
@@ -1774,7 +1774,7 @@
    (set (match_operand:SI                               2 "register_operand")
 	(memex_nocc:SI (match_dup 0)
 		       (match_dup 2)))]
-  "peep2_regno_dead_p (2, REGNO (operands[0])) && (optimize < 3 || optimize_size)"
+  "peep2_regno_dead_p (2, REGNO (operands[0])) && (GCC_OPTION (optimize) < 3 || GCC_OPTION (optimize_size))"
   [(set:SI (match_dup 2)
 	   (memex_nocc:SI (match_dup 2)
 			  (extend_types:SI (match_dup 1))))]
@@ -1786,7 +1786,7 @@
    (set (match_operand:SI                               2 "register_operand")
 	(memex_nocc:SI (match_dup 2)
 		       (match_dup 0)))]
-  "peep2_regno_dead_p (2, REGNO (operands[0])) && (optimize < 3 || optimize_size)"
+  "peep2_regno_dead_p (2, REGNO (operands[0])) && (GCC_OPTION (optimize) < 3 || GCC_OPTION (optimize_size))"
   [(set:SI (match_dup 2)
 	   (memex_nocc:SI (match_dup 2)
 			  (extend_types:SI (match_dup 1))))]
@@ -1797,7 +1797,7 @@
 	(memex_commutative:SI (match_operand:SI                               1 "register_operand" "%0")
  		              (extend_types:SI (match_operand:small_int_modes 2 "rx_restricted_mem_operand" "Q"))))
    (clobber (reg:CC CC_REG))]
-  "(optimize < 3 || optimize_size)"
+  "(GCC_OPTION (optimize) < 3 || GCC_OPTION (optimize_size))"
   "<memex_commutative:op>\t%<extend_types:letter>2, %0"
   [(set_attr "timings" "33")
    (set_attr "length"  "5")] ;; This length is corrected in rx_adjust_insn_length
@@ -1808,7 +1808,7 @@
 	(memex_noncomm:SI (match_operand:SI                               1 "register_operand" "0")
                           (extend_types:SI (match_operand:small_int_modes 2 "rx_restricted_mem_operand" "Q"))))
    (clobber (reg:CC CC_REG))]
-  "(optimize < 3 || optimize_size)"
+  "(GCC_OPTION (optimize) < 3 || GCC_OPTION (optimize_size))"
   "<memex_noncomm:op>\t%<extend_types:letter>2, %0"
   [(set_attr "timings" "33")
    (set_attr "length"  "5")] ;; This length is corrected in rx_adjust_insn_length
@@ -1818,7 +1818,7 @@
   [(set (match_operand:SI                                              0 "register_operand" "=r")
 	(memex_nocc:SI (match_operand:SI                               1 "register_operand" "%0")
 		       (extend_types:SI (match_operand:small_int_modes 2 "rx_restricted_mem_operand" "Q"))))]
-  "(optimize < 3 || optimize_size)"
+  "(GCC_OPTION (optimize) < 3 || GCC_OPTION (optimize_size))"
   "<memex_nocc:op>\t%<extend_types:letter>2, %0"
   [(set_attr "timings" "33")
    (set_attr "length"  "5")] ;; This length is corrected in rx_adjust_insn_length
@@ -1830,7 +1830,7 @@
    (set (reg:CC CC_REG)
 	(compare:CC (match_operand:SI                   2 "register_operand")
 		    (match_dup 0)))]
-  "peep2_regno_dead_p (2, REGNO (operands[0])) && (optimize < 3 || optimize_size)"
+  "peep2_regno_dead_p (2, REGNO (operands[0])) && (GCC_OPTION (optimize) < 3 || GCC_OPTION (optimize_size))"
   [(set (reg:CC CC_REG)
 	(compare:CC (match_dup 2)
 		    (extend_types:SI (match_dup 1))))]
@@ -1869,7 +1869,7 @@
   [(set (reg:CC CC_REG)
 	(compare:CC (match_operand:SI                               0 "register_operand" "r")
 		    (extend_types:SI (match_operand:small_int_modes 1 "rx_restricted_mem_operand" "Q"))))]
-  "(optimize < 3 || optimize_size)"
+  "(GCC_OPTION (optimize) < 3 || GCC_OPTION (optimize_size))"
   "cmp\t%<extend_types:letter>1, %0"
   [(set_attr "timings" "33")
    (set_attr "length"  "5")] ;; This length is corrected in rx_adjust_insn_length
diff --git a/gcc/config/s390/predicates.md b/gcc/config/s390/predicates.md
index 0191b93..4406953 100644
--- a/gcc/config/s390/predicates.md
+++ b/gcc/config/s390/predicates.md
@@ -62,7 +62,7 @@
 
 (define_special_predicate "bras_sym_operand"
   (ior (and (match_code "symbol_ref")
-	    (match_test "!flag_pic || SYMBOL_REF_LOCAL_P (op)"))
+	    (match_test "!GCC_OPTION (flag_pic) || SYMBOL_REF_LOCAL_P (op)"))
        (and (match_code "const")
 	    (and (match_test "GET_CODE (XEXP (op, 0)) == UNSPEC")
 		 (match_test "XINT (XEXP (op, 0), 1) == UNSPEC_PLT")))))
@@ -116,7 +116,7 @@
   if (GET_CODE (op) == SYMBOL_REF)
     return (!SYMBOL_REF_ALIGN1_P (op)
 	    && SYMBOL_REF_TLS_MODEL (op) == 0
-	    && (!flag_pic || SYMBOL_REF_LOCAL_P (op)));
+	    && (!GCC_OPTION (flag_pic) || SYMBOL_REF_LOCAL_P (op)));
 
   /* Everything else must have a CONST, so strip it.  */
   if (GET_CODE (op) != CONST)
@@ -141,7 +141,7 @@
   if (GET_CODE (op) == SYMBOL_REF)
     return ((SYMBOL_REF_FLAGS (op) & SYMBOL_FLAG_ALIGN1) == 0
 	    && SYMBOL_REF_TLS_MODEL (op) == 0
-	    && (!flag_pic || SYMBOL_REF_LOCAL_P (op)));
+	    && (!GCC_OPTION (flag_pic) || SYMBOL_REF_LOCAL_P (op)));
 
   /* Now we must have a @GOTENT offset or @PLT stub
      or an @INDNTPOFF TLS offset.  */
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 7a79286..651e04e 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -1891,7 +1891,7 @@ s390_decompose_address (rtx addr, struct s390_address *out)
 	      && frame_pointer_needed
 	      && REGNO (base) == HARD_FRAME_POINTER_REGNUM)
 	  || REGNO (base) == ARG_POINTER_REGNUM
-          || (flag_pic
+          || (GCC_OPTION (flag_pic)
               && REGNO (base) == PIC_OFFSET_TABLE_REGNUM))
         pointer = base_ptr = true;
 
@@ -1939,7 +1939,7 @@ s390_decompose_address (rtx addr, struct s390_address *out)
 	      && frame_pointer_needed
 	      && REGNO (indx) == HARD_FRAME_POINTER_REGNUM)
 	  || REGNO (indx) == ARG_POINTER_REGNUM
-          || (flag_pic
+          || (GCC_OPTION (flag_pic)
               && REGNO (indx) == PIC_OFFSET_TABLE_REGNUM))
         pointer = indx_ptr = true;
 
@@ -1993,7 +1993,7 @@ s390_decompose_address (rtx addr, struct s390_address *out)
       if (GET_CODE (disp) == UNSPEC
           && (XINT (disp, 1) == UNSPEC_GOT
 	      || XINT (disp, 1) == UNSPEC_GOTNTPOFF)
-	  && flag_pic == 1)
+	  && GCC_OPTION (flag_pic) == 1)
         {
 	  ;
         }
@@ -2757,7 +2757,7 @@ s390_legitimate_constant_p (enum machine_mode mode, rtx op)
   /* In the PIC case, symbolic constants must *not* be
      forced into the literal pool.  We accept them here,
      so that they will be handled by emit_symbolic_move.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     return 1;
 
   /* All remaining non-PIC symbolic constants are
@@ -2781,7 +2781,7 @@ s390_cannot_force_const_mem (enum machine_mode mode, rtx x)
 
     case LABEL_REF:
       /* Labels are OK iff we are non-PIC.  */
-      return flag_pic != 0;
+      return GCC_OPTION (flag_pic) != 0;
 
     case SYMBOL_REF:
       /* 'Naked' TLS symbol references are never OK,
@@ -2789,7 +2789,7 @@ s390_cannot_force_const_mem (enum machine_mode mode, rtx x)
       if (tls_symbolic_operand (x))
 	return true;
       else
-	return flag_pic != 0;
+	return GCC_OPTION (flag_pic) != 0;
 
     case CONST:
       return s390_cannot_force_const_mem (mode, XEXP (x, 0));
@@ -2951,7 +2951,7 @@ s390_preferred_reload_class (rtx op, reg_class_t rclass)
 	    && GET_CODE (XEXP (XEXP(op, 0), 0)) == SYMBOL_REF
 	    && GET_CODE (XEXP (XEXP(op, 0), 1)) == CONST_INT)
 	  {
-	    if (flag_pic && reg_class_subset_p (ADDR_REGS, rclass))
+	    if (GCC_OPTION (flag_pic) && reg_class_subset_p (ADDR_REGS, rclass))
 	      return ADDR_REGS;
 	    else
 	      return NO_REGS;
@@ -3192,7 +3192,7 @@ s390_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
   /* A scratch address register is needed when a symbolic constant is
      copied to r0 compiling with -fPIC.  In other cases the target
      register might be used as temporary (see legitimize_pic_address).  */
-  if (in_p && SYMBOLIC_CONST (x) && flag_pic == 2 && rclass != ADDR_REGS)
+  if (in_p && SYMBOLIC_CONST (x) && GCC_OPTION (flag_pic) == 2 && rclass != ADDR_REGS)
     sri->icode = (TARGET_64BIT ?
 		  CODE_FOR_reloaddi_PIC_addr :
 		  CODE_FOR_reloadsi_PIC_addr);
@@ -3337,7 +3337,7 @@ preferred_la_operand_p (rtx op1, rtx op2)
      preferable to use regular add instructions when possible.
      Starting with zEC12 the la with index register is "uncracked"
      again.  */
-  if (addr.indx && s390_tune == PROCESSOR_2817_Z196)
+  if (addr.indx && GCC_OPTION (s390_tune) == PROCESSOR_2817_Z196)
     return false;
 
   if (!TARGET_64BIT && !addr.pointer)
@@ -3501,7 +3501,7 @@ legitimize_pic_address (rtx orig, rtx reg)
 	  emit_move_insn (reg, new_rtx);
 	  new_rtx = reg;
 	}
-      else if (flag_pic == 1)
+      else if (GCC_OPTION (flag_pic) == 1)
         {
           /* Assume GOT offset is a valid displacement operand (< 4k
              or < 512k with z990).  This is handled the same way in
@@ -3584,7 +3584,7 @@ legitimize_pic_address (rtx orig, rtx reg)
 	  /* For -fPIC the GOT size might exceed the displacement
 	     range so make sure the value is in the literal pool.  */
 	case UNSPEC_GOT:
-	  if (flag_pic == 2)
+	  if (GCC_OPTION (flag_pic) == 2)
 	    new_rtx = force_const_mem (Pmode, orig);
 	  break;
 
@@ -3683,7 +3683,7 @@ s390_emit_tls_call_insn (rtx result_reg, rtx tls_call)
 {
   rtx insn;
 
-  if (!flag_pic)
+  if (!GCC_OPTION (flag_pic))
     emit_insn (s390_load_got ());
 
   if (!s390_tls_symbol)
@@ -3764,7 +3764,7 @@ legitimize_tls_address (rtx addr, rtx reg)
 	break;
 
       case TLS_MODEL_INITIAL_EXEC:
-	if (flag_pic == 1)
+	if (GCC_OPTION (flag_pic) == 1)
 	  {
 	    /* Assume GOT offset < 4k.  This is handled the same way
 	       in both 31- and 64-bit code.  */
@@ -3793,7 +3793,7 @@ legitimize_tls_address (rtx addr, rtx reg)
 	    temp = gen_reg_rtx (Pmode);
 	    emit_move_insn (temp, new_rtx);
 	  }
-	else if (flag_pic)
+	else if (GCC_OPTION (flag_pic))
 	  {
 	    /* If the GOT offset might be >= 4k, we have to load it
 	       from the literal pool.  */
@@ -3906,7 +3906,7 @@ emit_symbolic_move (rtx *operands)
     operands[1] = force_reg (Pmode, operands[1]);
   else if (TLS_SYMBOLIC_CONST (operands[1]))
     operands[1] = legitimize_tls_address (operands[1], temp);
-  else if (flag_pic)
+  else if (GCC_OPTION (flag_pic))
     operands[1] = legitimize_pic_address (operands[1], temp);
 }
 
@@ -3940,7 +3940,7 @@ s390_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
     {
       return x;
     }
-  else if (flag_pic)
+  else if (GCC_OPTION (flag_pic))
     {
       if (SYMBOLIC_CONST (x)
           || (GET_CODE (x) == PLUS
@@ -4018,7 +4018,7 @@ rtx
 legitimize_reload_address (rtx ad, enum machine_mode mode ATTRIBUTE_UNUSED,
 			   int opnum, int type)
 {
-  if (!optimize || TARGET_LONG_DISPLACEMENT)
+  if (!GCC_OPTION (optimize) || TARGET_LONG_DISPLACEMENT)
     return NULL_RTX;
 
   if (GET_CODE (ad) == PLUS)
@@ -4062,7 +4062,7 @@ s390_expand_movmem (rtx dst, rtx src, rtx len)
   /* When tuning for z10 or higher we rely on the Glibc functions to
      do the right thing. Only for constant lengths below 64k we will
      generate inline code.  */
-  if (s390_tune >= PROCESSOR_2097_Z10
+  if (GCC_OPTION (s390_tune) >= PROCESSOR_2097_Z10
       && (GET_CODE (len) != CONST_INT || INTVAL (len) > (1<<16)))
     return false;
 
@@ -4305,7 +4305,7 @@ s390_expand_cmpmem (rtx target, rtx op0, rtx op1, rtx len)
   /* When tuning for z10 or higher we rely on the Glibc functions to
      do the right thing. Only for constant lengths below 64k we will
      generate inline code.  */
-  if (s390_tune >= PROCESSOR_2097_Z10
+  if (GCC_OPTION (s390_tune) >= PROCESSOR_2097_Z10
       && (GET_CODE (len) != CONST_INT || INTVAL (len) > (1<<16)))
     return false;
 
@@ -5871,11 +5871,11 @@ s390_adjust_priority (rtx insn ATTRIBUTE_UNUSED, int priority)
   if (! INSN_P (insn))
     return priority;
 
-  if (s390_tune != PROCESSOR_2084_Z990
-      && s390_tune != PROCESSOR_2094_Z9_109
-      && s390_tune != PROCESSOR_2097_Z10
-      && s390_tune != PROCESSOR_2817_Z196
-      && s390_tune != PROCESSOR_2827_ZEC12)
+  if (GCC_OPTION (s390_tune) != PROCESSOR_2084_Z990
+      && GCC_OPTION (s390_tune) != PROCESSOR_2094_Z9_109
+      && GCC_OPTION (s390_tune) != PROCESSOR_2097_Z10
+      && GCC_OPTION (s390_tune) != PROCESSOR_2817_Z196
+      && GCC_OPTION (s390_tune) != PROCESSOR_2827_ZEC12)
     return priority;
 
   switch (s390_safe_attr_type (insn))
@@ -5900,7 +5900,7 @@ s390_adjust_priority (rtx insn ATTRIBUTE_UNUSED, int priority)
 static int
 s390_issue_rate (void)
 {
-  switch (s390_tune)
+  switch (GCC_OPTION (s390_tune))
     {
     case PROCESSOR_2084_Z990:
     case PROCESSOR_2094_Z9_109:
@@ -6074,7 +6074,7 @@ s390_split_branches (void)
 	 make sure it will be saved/restored by the prologue/epilogue.  */
       cfun_frame_layout.save_return_addr_p = 1;
 
-      if (!flag_pic)
+      if (!GCC_OPTION (flag_pic))
 	{
 	  new_literal = 1;
 	  tmp = force_const_mem (Pmode, *label);
@@ -7673,7 +7673,7 @@ s390_register_info ()
 	  cfun_frame_layout.high_fprs++;
       }
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     clobbered_regs[PIC_OFFSET_TABLE_REGNUM]
       |= !!df_regs_ever_live_p (PIC_OFFSET_TABLE_REGNUM);
 
@@ -8366,7 +8366,7 @@ global_not_special_regno_p (int regno)
 	  && !(regno == STACK_POINTER_REGNUM
 	       || regno == RETURN_REGNUM
 	       || regno == BASE_REGNUM
-	       || (flag_pic && regno == (int)PIC_OFFSET_TABLE_REGNUM)));
+	       || (GCC_OPTION (flag_pic) && regno == (int)PIC_OFFSET_TABLE_REGNUM)));
 }
 
 /* Generate insn to save registers FIRST to LAST into
@@ -8784,7 +8784,7 @@ s390_emit_prologue (void)
   if (!TARGET_PACKED_STACK)
     next_fpr = cfun_save_high_fprs_p ? FPR15_REGNUM : 0;
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = cfun_frame_layout.frame_size;
 
   /* Decrement stack pointer.  */
@@ -8794,12 +8794,12 @@ s390_emit_prologue (void)
       rtx frame_off = GEN_INT (-cfun_frame_layout.frame_size);
       rtx real_frame_off;
 
-      if (s390_stack_size)
+      if (GCC_OPTION (s390_stack_size))
   	{
 	  HOST_WIDE_INT stack_guard;
 
-	  if (s390_stack_guard)
-	    stack_guard = s390_stack_guard;
+	  if (GCC_OPTION (s390_stack_guard))
+	    stack_guard = GCC_OPTION (s390_stack_guard);
 	  else
 	    {
 	      /* If no value for stack guard is provided the smallest power of 2
@@ -8809,14 +8809,14 @@ s390_emit_prologue (void)
 		stack_guard <<= 1;
 	    }
 
-	  if (cfun_frame_layout.frame_size >= s390_stack_size)
+	  if (cfun_frame_layout.frame_size >= GCC_OPTION (s390_stack_size))
 	    {
 	      warning (0, "frame size of function %qs is %wd"
 		       " bytes exceeding user provided stack limit of "
 		       "%d bytes.  "
 		       "An unconditional trap is added.",
 		       current_function_name(), cfun_frame_layout.frame_size,
-		       s390_stack_size);
+		       GCC_OPTION (s390_stack_size));
 	      emit_insn (gen_trap ());
 	    }
 	  else
@@ -8824,7 +8824,7 @@ s390_emit_prologue (void)
 	      /* stack_guard has to be smaller than s390_stack_size.
 		 Otherwise we would emit an AND with zero which would
 		 not match the test under mask pattern.  */
-	      if (stack_guard >= s390_stack_size)
+	      if (stack_guard >= GCC_OPTION (s390_stack_size))
 		{
 		  warning (0, "frame size of function %qs is %wd"
 			   " bytes which is more than half the stack size. "
@@ -8835,7 +8835,7 @@ s390_emit_prologue (void)
 		}
 	      else
 		{
-		  HOST_WIDE_INT stack_check_mask = ((s390_stack_size - 1)
+		  HOST_WIDE_INT stack_check_mask = ((GCC_OPTION (s390_stack_size) - 1)
 						    & ~(stack_guard - 1));
 
 		  rtx t = gen_rtx_AND (Pmode, stack_pointer_rtx,
@@ -8852,12 +8852,12 @@ s390_emit_prologue (void)
 	    }
   	}
 
-      if (s390_warn_framesize > 0
-	  && cfun_frame_layout.frame_size >= s390_warn_framesize)
+      if (GCC_OPTION (s390_warn_framesize) > 0
+	  && cfun_frame_layout.frame_size >= GCC_OPTION (s390_warn_framesize))
 	warning (0, "frame size of %qs is %wd bytes",
 		 current_function_name (), cfun_frame_layout.frame_size);
 
-      if (s390_warn_dynamicstack_p && cfun->calls_alloca)
+      if (GCC_OPTION (s390_warn_dynamicstack_p) && cfun->calls_alloca)
 	warning (0, "%qs uses dynamic stack allocation", current_function_name ());
 
       /* Save incoming stack pointer into temp reg.  */
@@ -8955,7 +8955,7 @@ s390_emit_prologue (void)
 
   /* Set up got pointer, if needed.  */
 
-  if (flag_pic && df_regs_ever_live_p (PIC_OFFSET_TABLE_REGNUM))
+  if (GCC_OPTION (flag_pic) && df_regs_ever_live_p (PIC_OFFSET_TABLE_REGNUM))
     {
       rtx insns = s390_load_got ();
 
@@ -9688,7 +9688,7 @@ s390_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
 
       off = INTVAL (crtl->args.arg_offset_rtx);
       off = off < 0 ? 0 : off;
-      if (TARGET_DEBUG_ARG)
+      if (GCC_OPTION (TARGET_DEBUG_ARG))
 	fprintf (stderr, "va_start: n_gpr = %d, n_fpr = %d off %d\n",
 		 (int)n_gpr, (int)n_fpr, off);
 
@@ -9764,7 +9764,7 @@ s390_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
 
   if (pass_by_reference (NULL, TYPE_MODE (type), type, false))
     {
-      if (TARGET_DEBUG_ARG)
+      if (GCC_OPTION (TARGET_DEBUG_ARG))
 	{
 	  fprintf (stderr, "va_arg: aggregate type");
 	  debug_tree (type);
@@ -9785,7 +9785,7 @@ s390_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
     }
   else if (s390_function_arg_float (TYPE_MODE (type), type))
     {
-      if (TARGET_DEBUG_ARG)
+      if (GCC_OPTION (TARGET_DEBUG_ARG))
 	{
 	  fprintf (stderr, "va_arg: float type");
 	  debug_tree (type);
@@ -9801,7 +9801,7 @@ s390_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
     }
   else
     {
-      if (TARGET_DEBUG_ARG)
+      if (GCC_OPTION (TARGET_DEBUG_ARG))
 	{
 	  fprintf (stderr, "va_arg: other type");
 	  debug_tree (type);
@@ -10225,7 +10225,7 @@ s390_function_profiler (FILE *file, int labelno)
   SYMBOL_REF_FLAGS (op[3]) = SYMBOL_FLAG_LOCAL;
 
   op[4] = gen_rtx_SYMBOL_REF (Pmode, "_mcount");
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       op[4] = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op[4]), UNSPEC_PLT);
       op[4] = gen_rtx_CONST (Pmode, op[4]);
@@ -10238,7 +10238,7 @@ s390_function_profiler (FILE *file, int labelno)
       output_asm_insn ("brasl\t%0,%4", op);
       output_asm_insn ("lg\t%0,%1", op);
     }
-  else if (!flag_pic)
+  else if (!GCC_OPTION (flag_pic))
     {
       op[6] = gen_label_rtx ();
 
@@ -10325,7 +10325,7 @@ s390_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
 
   /* Operand 0 is the target function.  */
   op[0] = XEXP (DECL_RTL (function), 0);
-  if (flag_pic && !SYMBOL_REF_LOCAL_P (op[0]))
+  if (GCC_OPTION (flag_pic) && !SYMBOL_REF_LOCAL_P (op[0]))
     {
       nonlocal = 1;
       op[0] = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op[0]),
@@ -10521,17 +10521,17 @@ s390_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
       /* Jump to target.  */
       op[8] = gen_label_rtx ();
 
-      if (!flag_pic)
+      if (!GCC_OPTION (flag_pic))
 	output_asm_insn ("l\t%4,%8-%5(%4)", op);
       else if (!nonlocal)
 	output_asm_insn ("a\t%4,%8-%5(%4)", op);
       /* We cannot call through .plt, since .plt requires %r12 loaded.  */
-      else if (flag_pic == 1)
+      else if (GCC_OPTION (flag_pic) == 1)
 	{
 	  output_asm_insn ("a\t%4,%8-%5(%4)", op);
 	  output_asm_insn ("l\t%4,%0(%4)", op);
 	}
-      else if (flag_pic == 2)
+      else if (GCC_OPTION (flag_pic) == 2)
 	{
 	  op[9] = gen_rtx_REG (Pmode, 0);
 	  output_asm_insn ("l\t%9,%8-4-%5(%4)", op);
@@ -10545,7 +10545,7 @@ s390_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
       /* Output literal pool.  */
       output_asm_insn (".align\t4", op);
 
-      if (nonlocal && flag_pic == 2)
+      if (nonlocal && GCC_OPTION (flag_pic) == 2)
 	output_asm_insn (".long\t%0", op);
       if (nonlocal)
 	{
@@ -10554,7 +10554,7 @@ s390_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
 	}
 
       targetm.asm_out.internal_label (file, "L", CODE_LABEL_NUMBER (op[8]));
-      if (!flag_pic)
+      if (!GCC_OPTION (flag_pic))
 	output_asm_insn (".long\t%0", op);
       else
 	output_asm_insn (".long\t%0-%5", op);
@@ -10674,7 +10674,7 @@ s390_function_ok_for_sibcall (tree decl, tree exp)
 
   /* The 31 bit PLT code uses register 12 (GOT pointer - caller saved)
      which would have to be restored before the sibcall.  */
-  if (!TARGET_64BIT && flag_pic && decl && !targetm.binds_local_p (decl))
+  if (!TARGET_64BIT && GCC_OPTION (flag_pic) && decl && !targetm.binds_local_p (decl))
     return false;
 
   /* Register 6 on s390 is available as an argument register but unfortunately
@@ -10719,7 +10719,7 @@ s390_emit_call (rtx addr_location, rtx tls_call, rtx result_reg,
     {
       /* When calling a global routine in PIC mode, we must
          replace the symbol itself with the PLT stub.  */
-      if (flag_pic && !SYMBOL_REF_LOCAL_P (addr_location))
+      if (GCC_OPTION (flag_pic) && !SYMBOL_REF_LOCAL_P (addr_location))
         {
 	  if (retaddr_reg != NULL_RTX)
 	    {
@@ -10746,7 +10746,7 @@ s390_emit_call (rtx addr_location, rtx tls_call, rtx result_reg,
          routine address into a register.  */
       if (!TARGET_SMALL_EXEC && !TARGET_CPU_ZARCH)
         {
-	  if (flag_pic)
+	  if (GCC_OPTION (flag_pic))
 	    addr_location = legitimize_pic_address (addr_location, 0);
 	  else
 	    addr_location = force_reg (Pmode, addr_location);
@@ -10803,7 +10803,7 @@ s390_conditional_register_usage (void)
 {
   int i;
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;
       call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;
@@ -11400,9 +11400,9 @@ s390_reorg (void)
   s390_optimize_prologue ();
 
   /* Walk over the insns and do some >=z10 specific changes.  */
-  if (s390_tune == PROCESSOR_2097_Z10
-      || s390_tune == PROCESSOR_2817_Z196
-      || s390_tune == PROCESSOR_2827_ZEC12)
+  if (GCC_OPTION (s390_tune) == PROCESSOR_2097_Z10
+      || GCC_OPTION (s390_tune) == PROCESSOR_2817_Z196
+      || GCC_OPTION (s390_tune) == PROCESSOR_2827_ZEC12)
     {
       rtx insn;
       bool insn_added_p = false;
@@ -11421,7 +11421,7 @@ s390_reorg (void)
 
 	  if ((GET_CODE (PATTERN (insn)) == PARALLEL
 	       || GET_CODE (PATTERN (insn)) == SET)
-	      && s390_tune == PROCESSOR_2097_Z10)
+	      && GCC_OPTION (s390_tune) == PROCESSOR_2097_Z10)
 	    insn_added_p |= s390_z10_optimize_cmp (insn);
 	}
 
@@ -11613,11 +11613,11 @@ static int
 s390_sched_reorder (FILE *file, int verbose,
 		    rtx *ready, int *nreadyp, int clock ATTRIBUTE_UNUSED)
 {
-  if (s390_tune == PROCESSOR_2097_Z10)
+  if (GCC_OPTION (s390_tune) == PROCESSOR_2097_Z10)
     if (reload_completed && *nreadyp > 1)
       s390_z10_prevent_earlyload_conflicts (ready, nreadyp);
 
-  if (s390_tune == PROCESSOR_2827_ZEC12
+  if (GCC_OPTION (s390_tune) == PROCESSOR_2827_ZEC12
       && reload_completed
       && *nreadyp > 1)
     {
@@ -11700,7 +11700,7 @@ s390_sched_variable_issue (FILE *file, int verbose, rtx insn, int more)
 {
   last_scheduled_insn = insn;
 
-  if (s390_tune == PROCESSOR_2827_ZEC12
+  if (GCC_OPTION (s390_tune) == PROCESSOR_2827_ZEC12
       && reload_completed
       && recog_memoized (insn) >= 0)
     {
@@ -11791,9 +11791,9 @@ s390_loop_unroll_adjust (unsigned nunroll, struct loop *loop)
   unsigned i;
   unsigned mem_count = 0;
 
-  if (s390_tune != PROCESSOR_2097_Z10
-      && s390_tune != PROCESSOR_2817_Z196
-      && s390_tune != PROCESSOR_2827_ZEC12)
+  if (GCC_OPTION (s390_tune) != PROCESSOR_2097_Z10
+      && GCC_OPTION (s390_tune) != PROCESSOR_2817_Z196
+      && GCC_OPTION (s390_tune) != PROCESSOR_2827_ZEC12)
     return nunroll;
 
   /* Count the number of memory references within the loop body.  */
@@ -11827,7 +11827,7 @@ s390_option_override (void)
   unsigned int i;
   cl_deferred_option *opt;
   vec<cl_deferred_option> *v =
-    (vec<cl_deferred_option> *) s390_deferred_options;
+    (vec<cl_deferred_option> *) GCC_OPTION (s390_deferred_options);
 
   if (v)
     FOR_EACH_VEC_ELT (*v, i, opt)
@@ -11871,42 +11871,42 @@ s390_option_override (void)
   if (!(target_flags_explicit & MASK_ZARCH))
     {
       if (TARGET_64BIT)
-	target_flags |= MASK_ZARCH;
+	GCC_OPTION (target_flags) |= MASK_ZARCH;
       else
-	target_flags &= ~MASK_ZARCH;
+	GCC_OPTION (target_flags) &= ~MASK_ZARCH;
     }
 
   /* Set the march default in case it hasn't been specified on
      cmdline.  */
-  if (s390_arch == PROCESSOR_max)
+  if (GCC_OPTION (s390_arch) == PROCESSOR_max)
     {
-      s390_arch_string = TARGET_ZARCH? "z900" : "g5";
-      s390_arch = TARGET_ZARCH ? PROCESSOR_2064_Z900 : PROCESSOR_9672_G5;
-      s390_arch_flags = processor_flags_table[(int)s390_arch];
+      GCC_OPTION (s390_arch_string) = TARGET_ZARCH? "z900" : "g5";
+      GCC_OPTION (s390_arch) = TARGET_ZARCH ? PROCESSOR_2064_Z900 : PROCESSOR_9672_G5;
+      GCC_OPTION (s390_arch_flags) = processor_flags_table[(int)GCC_OPTION (s390_arch)];
     }
 
   /* Determine processor to tune for.  */
-  if (s390_tune == PROCESSOR_max)
+  if (GCC_OPTION (s390_tune) == PROCESSOR_max)
     {
-      s390_tune = s390_arch;
-      s390_tune_flags = s390_arch_flags;
+      GCC_OPTION (s390_tune) = GCC_OPTION (s390_arch);
+      GCC_OPTION (s390_tune_flags) = GCC_OPTION (s390_arch_flags);
     }
 
   /* Sanity checks.  */
   if (TARGET_ZARCH && !TARGET_CPU_ZARCH)
-    error ("z/Architecture mode not supported on %s", s390_arch_string);
+    error ("z/Architecture mode not supported on %s", GCC_OPTION (s390_arch_string));
   if (TARGET_64BIT && !TARGET_ZARCH)
     error ("64-bit ABI not supported in ESA/390 mode");
 
   /* Use hardware DFP if available and not explicitly disabled by
      user. E.g. with -m31 -march=z10 -mzarch   */
   if (!(target_flags_explicit & MASK_HARD_DFP) && TARGET_DFP)
-    target_flags |= MASK_HARD_DFP;
+    GCC_OPTION (target_flags) |= MASK_HARD_DFP;
 
   /* Enable hardware transactions if available and not explicitly
      disabled by user.  E.g. with -m31 -march=zEC12 -mzarch */
   if (!(target_flags_explicit & MASK_OPT_HTM) && TARGET_CPU_HTM && TARGET_ZARCH)
-    target_flags |= MASK_OPT_HTM;
+    GCC_OPTION (target_flags) |= MASK_OPT_HTM;
 
   if (TARGET_HARD_DFP && !TARGET_DFP)
     {
@@ -11914,13 +11914,13 @@ s390_option_override (void)
 	{
 	  if (!TARGET_CPU_DFP)
 	    error ("hardware decimal floating point instructions"
-		   " not available on %s", s390_arch_string);
+		   " not available on %s", GCC_OPTION (s390_arch_string));
 	  if (!TARGET_ZARCH)
 	    error ("hardware decimal floating point instructions"
 		   " not available in ESA/390 mode");
 	}
       else
-	target_flags &= ~MASK_HARD_DFP;
+	GCC_OPTION (target_flags) &= ~MASK_HARD_DFP;
     }
 
   if ((target_flags_explicit & MASK_SOFT_FLOAT) && TARGET_SOFT_FLOAT)
@@ -11928,11 +11928,11 @@ s390_option_override (void)
       if ((target_flags_explicit & MASK_HARD_DFP) && TARGET_HARD_DFP)
 	error ("-mhard-dfp can%'t be used in conjunction with -msoft-float");
 
-      target_flags &= ~MASK_HARD_DFP;
+      GCC_OPTION (target_flags) &= ~MASK_HARD_DFP;
     }
 
   /* Set processor cost function.  */
-  switch (s390_tune)
+  switch (GCC_OPTION (s390_tune))
     {
     case PROCESSOR_2084_Z990:
       s390_cost = &z990_cost;
@@ -11957,24 +11957,24 @@ s390_option_override (void)
     error ("-mbackchain -mpacked-stack -mhard-float are not supported "
 	   "in combination");
 
-  if (s390_stack_size)
+  if (GCC_OPTION (s390_stack_size))
     {
-      if (s390_stack_guard >= s390_stack_size)
+      if (GCC_OPTION (s390_stack_guard) >= GCC_OPTION (s390_stack_size))
 	error ("stack size must be greater than the stack guard value");
-      else if (s390_stack_size > 1 << 16)
+      else if (GCC_OPTION (s390_stack_size) > 1 << 16)
 	error ("stack size must not be greater than 64k");
     }
-  else if (s390_stack_guard)
+  else if (GCC_OPTION (s390_stack_guard))
     error ("-mstack-guard implies use of -mstack-size");
 
 #ifdef TARGET_DEFAULT_LONG_DOUBLE_128
   if (!(target_flags_explicit & MASK_LONG_DOUBLE_128))
-    target_flags |= MASK_LONG_DOUBLE_128;
+    GCC_OPTION (target_flags) |= MASK_LONG_DOUBLE_128;
 #endif
 
-  if (s390_tune == PROCESSOR_2097_Z10
-      || s390_tune == PROCESSOR_2817_Z196
-      || s390_tune == PROCESSOR_2827_ZEC12)
+  if (GCC_OPTION (s390_tune) == PROCESSOR_2097_Z10
+      || GCC_OPTION (s390_tune) == PROCESSOR_2817_Z196
+      || GCC_OPTION (s390_tune) == PROCESSOR_2827_ZEC12)
     {
       maybe_set_param_value (PARAM_MAX_UNROLLED_INSNS, 100,
 			     global_options.x_param_values,
@@ -12016,8 +12016,8 @@ s390_option_override (void)
   /* This cannot reside in s390_option_optimization_table since HAVE_prefetch
      requires the arch flags to be evaluated already.  Since prefetching
      is beneficial on s390, we enable it if available.  */
-  if (flag_prefetch_loop_arrays < 0 && HAVE_prefetch && optimize >= 3)
-    flag_prefetch_loop_arrays = 1;
+  if (GCC_OPTION (flag_prefetch_loop_arrays) < 0 && HAVE_prefetch && GCC_OPTION (optimize) >= 3)
+    GCC_OPTION (flag_prefetch_loop_arrays) = 1;
 
   /* Use the alternative scheduling-pressure algorithm by default.  */
   maybe_set_param_value (PARAM_SCHED_PRESSURE_ALGORITHM, 2,
@@ -12029,9 +12029,9 @@ s390_option_override (void)
       /* Don't emit DWARF3/4 unless specifically selected.  The TPF
 	 debuggers do not yet support DWARF 3/4.  */
       if (!global_options_set.x_dwarf_strict) 
-	dwarf_strict = 1;
+	GCC_OPTION (dwarf_strict) = 1;
       if (!global_options_set.x_dwarf_version)
-	dwarf_version = 2;
+	GCC_OPTION (dwarf_version) = 2;
     }
 
   /* Register a target-specific optimization-and-lowering pass
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index 2f2139e..c8544df 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -47,23 +47,23 @@ enum processor_flags
    current cpu mode (ESA or z/Architecture).  */
 
 #define TARGET_CPU_IEEE_FLOAT \
-	(s390_arch_flags & PF_IEEE_FLOAT)
+	(GCC_OPTION (s390_arch_flags) & PF_IEEE_FLOAT)
 #define TARGET_CPU_ZARCH \
-	(s390_arch_flags & PF_ZARCH)
+	(GCC_OPTION (s390_arch_flags) & PF_ZARCH)
 #define TARGET_CPU_LONG_DISPLACEMENT \
-	(s390_arch_flags & PF_LONG_DISPLACEMENT)
+	(GCC_OPTION (s390_arch_flags) & PF_LONG_DISPLACEMENT)
 #define TARGET_CPU_EXTIMM \
- 	(s390_arch_flags & PF_EXTIMM)
+ 	(GCC_OPTION (s390_arch_flags) & PF_EXTIMM)
 #define TARGET_CPU_DFP \
- 	(s390_arch_flags & PF_DFP)
+ 	(GCC_OPTION (s390_arch_flags) & PF_DFP)
 #define TARGET_CPU_Z10 \
- 	(s390_arch_flags & PF_Z10)
+ 	(GCC_OPTION (s390_arch_flags) & PF_Z10)
 #define TARGET_CPU_Z196 \
- 	(s390_arch_flags & PF_Z196)
+ 	(GCC_OPTION (s390_arch_flags) & PF_Z196)
 #define TARGET_CPU_ZEC12 \
- 	(s390_arch_flags & PF_ZEC12)
+ 	(GCC_OPTION (s390_arch_flags) & PF_ZEC12)
 #define TARGET_CPU_HTM \
- 	(s390_arch_flags & PF_TX)
+ 	(GCC_OPTION (s390_arch_flags) & PF_TX)
 
 /* These flags indicate that the generated code should run on a cpu
    providing the respective hardware facility when run in
@@ -84,7 +84,7 @@ enum processor_flags
 #define TARGET_HTM (TARGET_OPT_HTM)
 
 
-#define TARGET_AVOID_CMP_AND_BRANCH (s390_tune == PROCESSOR_2817_Z196)
+#define TARGET_AVOID_CMP_AND_BRANCH (GCC_OPTION (s390_tune) == PROCESSOR_2817_Z196)
 
 /* Run-time target specification.  */
 
@@ -595,7 +595,7 @@ extern const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER];
 
 /* Select a format to encode pointers in exception handling data.  */
 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL)			    \
-  (flag_pic								    \
+  (GCC_OPTION (flag_pic)								    \
     ? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4 \
    : DW_EH_PE_absptr)
 
@@ -737,7 +737,7 @@ do {									\
 
 /* A C expression for the cost of a branch instruction.  A value of 1
    is the default; other values are interpreted relative to that.  */
-#define BRANCH_COST(speed_p, predictable_p) s390_branch_cost
+#define BRANCH_COST(speed_p, predictable_p) GCC_OPTION (s390_branch_cost)
 
 /* Nonzero if access to memory by bytes is slow and undesirable.  */
 #define SLOW_BYTE_ACCESS 1
@@ -810,7 +810,7 @@ do {									\
 
 /* Position independent code.  */
 
-#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 12 : INVALID_REGNUM)
+#define PIC_OFFSET_TABLE_REGNUM (GCC_OPTION (flag_pic) ? 12 : INVALID_REGNUM)
 
 #define LEGITIMATE_PIC_OPERAND_P(X)  legitimate_pic_operand_p (X)
 
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index 76902b5..8965f8e 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -1885,7 +1885,7 @@
 {
   /* Make it explicit that loading a register from memory
      always sign-extends (at least) to SImode.  */
-  if (optimize && can_create_pseudo_p ()
+  if (GCC_OPTION (optimize) && can_create_pseudo_p ()
       && register_operand (operands[0], VOIDmode)
       && GET_CODE (operands[1]) == MEM)
     {
@@ -1944,7 +1944,7 @@
 {
   /* On z/Architecture, zero-extending from memory to register
      is just as fast as a QImode load.  */
-  if (TARGET_ZARCH && optimize && can_create_pseudo_p ()
+  if (TARGET_ZARCH && GCC_OPTION (optimize) && can_create_pseudo_p ()
       && register_operand (operands[0], VOIDmode)
       && GET_CODE (operands[1]) == MEM)
     {
@@ -8057,7 +8057,7 @@
   [(set_attr "op_type" "RI")
    (set_attr "type"    "branch")
    (set (attr "length")
-        (if_then_else (not (match_test "flag_pic"))
+        (if_then_else (not (match_test "GCC_OPTION (flag_pic)"))
           (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000))
                         (const_int 4) (const_int 6))
           (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000))
@@ -8132,7 +8132,7 @@
   [(set_attr "op_type" "RI")
    (set_attr "type"    "branch")
    (set (attr "length")
-        (if_then_else (not (match_test "flag_pic"))
+        (if_then_else (not (match_test "GCC_OPTION (flag_pic)"))
           (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000))
                         (const_int 4) (const_int 6))
           (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000))
@@ -8524,7 +8524,7 @@
    (set_attr "z10prop"  "z10_super_E1")
    (set_attr "type"  "branch")
    (set (attr "length")
-        (if_then_else (not (match_test "flag_pic"))
+        (if_then_else (not (match_test "GCC_OPTION (flag_pic)"))
           (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000))
                         (const_int 4) (const_int 6))
           (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000))
@@ -8636,7 +8636,7 @@
   [(set_attr "op_type" "RI")
    (set_attr "type"  "branch")
    (set (attr "length")
-        (if_then_else (not (match_test "flag_pic"))
+        (if_then_else (not (match_test "GCC_OPTION (flag_pic)"))
           (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000))
                         (const_int 4) (const_int 6))
           (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000))
@@ -8713,7 +8713,7 @@
    index = gen_const_mem (Pmode, gen_rtx_PLUS (Pmode, base, index));
    emit_move_insn (target, index);
 
-   if (flag_pic)
+   if (GCC_OPTION (flag_pic))
      target = gen_rtx_PLUS (Pmode, base, target);
    emit_jump_insn (gen_casesi_jump (target, operands[3]));
 
@@ -9450,7 +9450,7 @@
 
 (define_expand "builtin_setjmp_receiver"
   [(match_operand 0 "" "")]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
 {
   emit_insn (s390_load_got ());
   emit_use (pic_offset_table_rtx);
diff --git a/gcc/config/score/score.c b/gcc/config/score/score.c
index e238d6d..9c52ff6 100644
--- a/gcc/config/score/score.c
+++ b/gcc/config/score/score.c
@@ -311,7 +311,7 @@ score_compute_frame_size (HOST_WIDE_INT size)
   f->mask = 0;
   f->var_size = SCORE_STACK_ALIGN (size);
   f->args_size = crtl->outgoing_args_size;
-  f->cprestore_size = flag_pic ? UNITS_PER_WORD : 0;
+  f->cprestore_size = GCC_OPTION (flag_pic) ? UNITS_PER_WORD : 0;
   if (f->var_size == 0 && crtl->is_leaf)
     f->args_size = f->cprestore_size = 0;
 
@@ -574,7 +574,7 @@ score_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
   HOST_WIDE_INT tsize = f->total_size;
 
   fnname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
-  if (!flag_inhibit_size_directive)
+  if (!GCC_OPTION (flag_inhibit_size_directive))
     {
       fputs ("\t.ent\t", file);
       assemble_name (file, fnname);
@@ -583,7 +583,7 @@ score_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
   assemble_name (file, fnname);
   fputs (":\n", file);
 
-  if (!flag_inhibit_size_directive)
+  if (!GCC_OPTION (flag_inhibit_size_directive))
     {
       fprintf (file,
                "\t.frame\t%s," HOST_WIDE_INT_PRINT_DEC ",%s, %d\t\t"
@@ -611,7 +611,7 @@ score_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
 static void
 score_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
 {
-  if (!flag_inhibit_size_directive)
+  if (!GCC_OPTION (flag_inhibit_size_directive))
     {
       const char *fnname;
       fnname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
@@ -648,7 +648,7 @@ score_select_rtx_section (enum machine_mode mode, rtx x, unsigned HOST_WIDE_INT
 {
   if (GET_MODE_SIZE (mode) <= SCORE_SDATA_MAX)
     return get_named_section (0, ".sdata", 0);
-  else if (flag_pic && score_symbolic_expression_p (x))
+  else if (GCC_OPTION (flag_pic) && score_symbolic_expression_p (x))
     return get_named_section (0, ".data.rel.ro", 3);
   else
     return mergeable_constant_section (mode, align, 0);
@@ -686,7 +686,7 @@ score_asm_file_start (void)
   fprintf (asm_out_file, ASM_COMMENT_START
            "GCC for S+core %s \n", SCORE_GCC_VERSION);
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     fprintf (asm_out_file, "\t.set pic\n");
 }
 
@@ -719,7 +719,7 @@ score_asm_file_end (void)
 static void
 score_option_override (void)
 {
-  flag_pic = false;
+  GCC_OPTION (flag_pic) = false;
   score_sdata_max = SCORE_DEFAULT_SDATA_MAX;
 
 }
@@ -1142,14 +1142,14 @@ score_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED,
       return false;
 
     case MULT:
-      *total = optimize_size ? COSTS_N_INSNS (2) : COSTS_N_INSNS (12);
+      *total = GCC_OPTION (optimize_size) ? COSTS_N_INSNS (2) : COSTS_N_INSNS (12);
       return true;
 
     case DIV:
     case MOD:
     case UDIV:
     case UMOD:
-      *total = optimize_size ? COSTS_N_INSNS (2) : COSTS_N_INSNS (33);
+      *total = GCC_OPTION (optimize_size) ? COSTS_N_INSNS (2) : COSTS_N_INSNS (33);
       return true;
 
     case SIGN_EXTEND:
@@ -1458,7 +1458,7 @@ score_prologue (void)
 
   size = f->total_size - f->gp_reg_size;
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     emit_insn (gen_cpload_score7 ());
 
   for (regno = (int) GP_REG_LAST; regno >= (int) GP_REG_FIRST; regno--)
@@ -1504,7 +1504,7 @@ score_prologue (void)
   if (frame_pointer_needed)
     EMIT_PL (emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx));
 
-  if (flag_pic && f->cprestore_size)
+  if (GCC_OPTION (flag_pic) && f->cprestore_size)
     {
       if (frame_pointer_needed)
         emit_insn (gen_cprestore_use_fp_score7 (GEN_INT (size - f->cprestore_size)));
@@ -1931,7 +1931,7 @@ score_init_cumulative_args (CUMULATIVE_ARGS *cum,
 static void
 score_conditional_register_usage (void)
 {
-   if (!flag_pic)
+   if (!GCC_OPTION (flag_pic))
      fixed_regs[PIC_OFFSET_TABLE_REGNUM] =
      call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 0;
 }
diff --git a/gcc/config/score/score.h b/gcc/config/score/score.h
index 125a209..6101ce4 100644
--- a/gcc/config/score/score.h
+++ b/gcc/config/score/score.h
@@ -759,7 +759,7 @@ typedef struct score_args
   do {										\
     if (TARGET_SCORE7)								\
       {										\
-	if (flag_pic)								\
+	if (GCC_OPTION (flag_pic))								\
 	  fprintf (STREAM, "\t.gpword %sL%d\n", LOCAL_LABEL_PREFIX, VALUE);	\
 	else									\
 	  fprintf (STREAM, "\t.word %sL%d\n", LOCAL_LABEL_PREFIX, VALUE);	\
diff --git a/gcc/config/score/score.md b/gcc/config/score/score.md
index a4ffb3a..8465b11 100644
--- a/gcc/config/score/score.md
+++ b/gcc/config/score/score.md
@@ -1377,7 +1377,7 @@
         (label_ref (match_operand 0 "" "")))]
   ""
 {
-  if (!flag_pic)
+  if (!GCC_OPTION (flag_pic))
     return \"j\t%0\";
   else
     return \"b\t%0\";
@@ -1402,7 +1402,7 @@
   "(TARGET_SCORE7 || TARGET_SCORE7D)
    && SIBLING_CALL_P (insn)"
 {
-  if (!flag_pic)
+  if (!GCC_OPTION (flag_pic))
     switch (which_alternative)
       {
       case 0: return \"br%S0\t%0\";
@@ -1437,7 +1437,7 @@
   "(TARGET_SCORE7 || TARGET_SCORE7D)
    && SIBLING_CALL_P (insn)"
 {
-  if (!flag_pic)
+  if (!GCC_OPTION (flag_pic))
     switch (which_alternative)
       {
       case 0: return \"br%S1\t%1\";
@@ -1469,7 +1469,7 @@
    (clobber (reg:SI RA_REGNUM))]
   "(TARGET_SCORE7 || TARGET_SCORE7D)"
 {
-  if (!flag_pic)
+  if (!GCC_OPTION (flag_pic))
     switch (which_alternative)
       {
       case 0: return \"brl%S0\t%0\";
@@ -1503,7 +1503,7 @@
    (clobber (reg:SI RA_REGNUM))]
   "(TARGET_SCORE7 || TARGET_SCORE7D)"
 {
-  if (!flag_pic)
+  if (!GCC_OPTION (flag_pic))
     switch (which_alternative)
       {
       case 0: return \"brl%S1\t%1\";
@@ -1558,7 +1558,7 @@
    (use (label_ref (match_operand 1 "" "")))]
   "(TARGET_SCORE7 || TARGET_SCORE7D)"
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     return \"mv\tr29, %0\;.cpadd\tr29\;br\tr29\";
   else
     return \"br%S0\t%0\";
@@ -1604,7 +1604,7 @@
 (define_insn "cpload_score7"
   [(unspec_volatile:SI [(const_int 1)] CPLOAD)]
   "(TARGET_SCORE7 || TARGET_SCORE7D)
-   && flag_pic"
+   && GCC_OPTION (flag_pic)"
   ".cpload\tr29"
 )
 
@@ -1612,7 +1612,7 @@
   [(unspec_volatile:SI [(match_operand:SI 0 "" "")] CPRESTORE)
    (use (reg:SI FP_REGNUM))]
   "(TARGET_SCORE7 || TARGET_SCORE7D)
-   && flag_pic"
+   && GCC_OPTION (flag_pic)"
   ".cprestore\tr2, %0"
 )
 
@@ -1620,7 +1620,7 @@
   [(unspec_volatile:SI [(match_operand:SI 0 "" "")] CPRESTORE)
    (use (reg:SI SP_REGNUM))]
   "(TARGET_SCORE7 || TARGET_SCORE7D)
-   && flag_pic"
+   && GCC_OPTION (flag_pic)"
   ".cprestore\tr0, %0"
 )
 
diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
index c0a4ebd..bce5804 100644
--- a/gcc/config/sh/linux.h
+++ b/gcc/config/sh/linux.h
@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3.  If not see
 	fprintf (STREAM, "\tpt\t1f,tr1\n");				\
 	fprintf (STREAM, "\taddi.l\tr15,-8,r15\n");			\
 	fprintf (STREAM, "\tst.l\tr15,0,r18\n");			\
-	if (flag_pic)							\
+	if (GCC_OPTION (flag_pic))							\
 	  {								\
 	    const char *gofs = "(datalabel _GLOBAL_OFFSET_TABLE_-(0f-.))"; \
 	    fprintf (STREAM, "\tmovi\t((%s>>16)&0xffff),r21\n", gofs);	\
@@ -85,7 +85,7 @@ along with GCC; see the file COPYING3.  If not see
       }									\
     else								\
       {									\
-	if (flag_pic)							\
+	if (GCC_OPTION (flag_pic))							\
 	  {								\
 	    fprintf (STREAM, "\tmov.l\t3f,r1\n");			\
 	    fprintf (STREAM, "\tmova\t3f,r0\n");			\
@@ -100,7 +100,7 @@ along with GCC; see the file COPYING3.  If not see
 	fprintf (STREAM, "\tjmp\t@r1\n");				\
 	fprintf (STREAM, "\tlds\tr0,pr\n");				\
 	fprintf (STREAM, "\t.align\t2\n");				\
-	if (flag_pic)							\
+	if (GCC_OPTION (flag_pic))							\
 	  {								\
 	    fprintf (STREAM, "1:\t.long\tmcount@GOT\n");		\
 	    fprintf (STREAM, "3:\t.long\t_GLOBAL_OFFSET_TABLE_\n");	\
@@ -141,12 +141,12 @@ along with GCC; see the file COPYING3.  If not see
       if (global_options_set.x_sh_atomic_model_str == 0)		\
 	{								\
 	  if (TARGET_SH3)						\
-	    sh_atomic_model_str = "soft-gusa";				\
+	    GCC_OPTION (sh_atomic_model_str) = "soft-gusa";				\
 	  else if (TARGET_SH1)						\
-	    sh_atomic_model_str = "soft-imask";				\
+	    GCC_OPTION (sh_atomic_model_str) = "soft-imask";				\
 	}								\
       /* Set -musermode if it hasn't been specified.  */		\
       if (global_options_set.x_TARGET_USERMODE == 0)			\
-	TARGET_USERMODE = true;						\
+	GCC_OPTION (TARGET_USERMODE) = true;						\
     }									\
   while (0)
diff --git a/gcc/config/sh/netbsd-elf.h b/gcc/config/sh/netbsd-elf.h
index 8100cee..7e97025 100644
--- a/gcc/config/sh/netbsd-elf.h
+++ b/gcc/config/sh/netbsd-elf.h
@@ -101,6 +101,6 @@ while (0)
     {									\
       /* Set -musermode if it hasn't been specified.  */		\
       if (global_options_set.x_TARGET_USERMODE == 0)			\
-	TARGET_USERMODE = true;						\
+	GCC_OPTION (TARGET_USERMODE) = true;						\
     }									\
   while (0)
diff --git a/gcc/config/sh/sh-mem.cc b/gcc/config/sh/sh-mem.cc
index 45af23a..c14923c 100644
--- a/gcc/config/sh/sh-mem.cc
+++ b/gcc/config/sh/sh-mem.cc
@@ -112,7 +112,7 @@ expand_block_move (rtx *operands)
 	  emit_insn (gen_block_move_real_i4 (func_addr_rtx));
 	  return true;
 	}
-      else if (! optimize_size)
+      else if (! GCC_OPTION (optimize_size))
 	{
 	  const char *entry_name;
 	  rtx func_addr_rtx = gen_reg_rtx (Pmode);
@@ -151,7 +151,7 @@ expand_block_move (rtx *operands)
 
   /* This is the same number of bytes as a memcpy call, but to a different
      less common function name, so this will occasionally use more space.  */
-  if (! optimize_size)
+  if (! GCC_OPTION (optimize_size))
     {
       rtx func_addr_rtx = gen_reg_rtx (Pmode);
       int final_switch, while_loop;
@@ -291,7 +291,7 @@ sh_expand_cmpstr (rtx *operands)
   add_int_reg_note (jump, REG_BR_PROB, prob_unlikely);
 
   emit_insn (gen_cmpeqsi_t (tmp1, tmp2));
-  if (flag_delayed_branch)
+  if (GCC_OPTION (flag_delayed_branch))
     emit_insn (gen_zero_extendqisi2 (tmp2, gen_lowpart (QImode, tmp2)));
   jump = emit_jump_insn (gen_branch_true (L_loop_byte));
   add_int_reg_note (jump, REG_BR_PROB, prob_likely);
@@ -299,7 +299,7 @@ sh_expand_cmpstr (rtx *operands)
 
   emit_label (L_end_loop_byte);
 
-  if (! flag_delayed_branch)
+  if (! GCC_OPTION (flag_delayed_branch))
     emit_insn (gen_zero_extendqisi2 (tmp2, gen_lowpart (QImode, tmp2)));
   emit_insn (gen_zero_extendqisi2 (tmp1, gen_lowpart (QImode, tmp1)));
 
@@ -427,7 +427,7 @@ sh_expand_cmpnstr (rtx *operands)
                   add_int_reg_note (jump, REG_BR_PROB, prob_unlikely);
 
                   emit_insn (gen_cmpeqsi_t (tmp1, tmp2));
-                  if (flag_delayed_branch)
+                  if (GCC_OPTION (flag_delayed_branch))
                     emit_insn (gen_zero_extendqisi2 (tmp2,
                                                      gen_lowpart (QImode,
                                                                   tmp2)));
@@ -469,7 +469,7 @@ sh_expand_cmpnstr (rtx *operands)
           add_int_reg_note (jump, REG_BR_PROB, prob_unlikely);
 
           emit_insn (gen_cmpeqsi_t (tmp1, tmp2));
-          if (flag_delayed_branch)
+          if (GCC_OPTION (flag_delayed_branch))
             emit_insn (gen_zero_extendqisi2 (tmp2,
                                              gen_lowpart (QImode, tmp2)));
           jump = emit_jump_insn (gen_branch_false (L_end_loop_byte));
@@ -499,7 +499,7 @@ sh_expand_cmpnstr (rtx *operands)
   add_int_reg_note (jump, REG_BR_PROB, prob_unlikely);
 
   emit_insn (gen_cmpeqsi_t (tmp1, tmp2));
-  if (flag_delayed_branch)
+  if (GCC_OPTION (flag_delayed_branch))
     emit_insn (gen_zero_extendqisi2 (tmp2, gen_lowpart (QImode, tmp2)));
   jump = emit_jump_insn (gen_branch_false (L_end_loop_byte));
   add_int_reg_note (jump, REG_BR_PROB, prob_unlikely);
@@ -518,7 +518,7 @@ sh_expand_cmpnstr (rtx *operands)
 
   emit_label (L_end_loop_byte);
 
-  if (! flag_delayed_branch)
+  if (! GCC_OPTION (flag_delayed_branch))
     emit_insn (gen_zero_extendqisi2 (tmp2, gen_lowpart (QImode, tmp2)));
   emit_insn (gen_zero_extendqisi2 (tmp1, gen_lowpart (QImode, tmp1)));
 
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 6d909c7..795567b 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -716,7 +716,7 @@ got_mode_name:;
 	     "a multiple of 4 in the range 0-1020", ret.tcb_gbr_offset,
 	     ret.name);
 
-  if (ret.type == sh_atomic_model::soft_imask && TARGET_USERMODE)
+  if (ret.type == sh_atomic_model::soft_imask && GCC_OPTION (TARGET_USERMODE))
     err_ret ("cannot use atomic model %s in user mode", ret.name);
 
   return ret;
@@ -769,12 +769,12 @@ sh_option_override (void)
   int regno;
 
   SUBTARGET_OVERRIDE_OPTIONS;
-  if (optimize > 1 && !optimize_size)
-    target_flags |= MASK_SAVE_ALL_TARGET_REGS;
+  if (GCC_OPTION (optimize) > 1 && !GCC_OPTION (optimize_size))
+    GCC_OPTION (target_flags) |= MASK_SAVE_ALL_TARGET_REGS;
 
   /* Set default values of TARGET_CBRANCHDI4 and TARGET_CMPEQDI_T.  */
-  TARGET_CBRANCHDI4 = 1;
-  TARGET_CMPEQDI_T = 0;
+  GCC_OPTION (TARGET_CBRANCHDI4) = 1;
+  GCC_OPTION (TARGET_CMPEQDI_T) = 0;
 
   sh_cpu = PROCESSOR_SH1;
   assembler_dialect = 0;
@@ -801,15 +801,15 @@ sh_option_override (void)
   if (TARGET_SH5)
     {
       sh_cpu = PROCESSOR_SH5;
-      target_flags |= MASK_ALIGN_DOUBLE;
+      GCC_OPTION (target_flags) |= MASK_ALIGN_DOUBLE;
       if (TARGET_SHMEDIA_FPU)
-	target_flags |= MASK_FMOVD;
+	GCC_OPTION (target_flags) |= MASK_FMOVD;
       if (TARGET_SHMEDIA)
 	{
 	  /* There are no delay slots on SHmedia.  */
-	  flag_delayed_branch = 0;
+	  GCC_OPTION (flag_delayed_branch) = 0;
 	  /* Relaxation isn't yet supported for SHmedia */
-	  target_flags &= ~MASK_RELAX;
+	  GCC_OPTION (target_flags) &= ~MASK_RELAX;
 	  /* After reload, if conversion does little good but can cause
 	     ICEs:
 	     - find_if_block doesn't do anything for SH because we don't
@@ -824,35 +824,35 @@ sh_option_override (void)
 	     - find_if_case_2 doesn't do anything for the SHmedia after
 	       reload except when it can redirect a tablejump - and
 	       that's rather rare.  */
-	  flag_if_conversion2 = 0;
-	  if (! strcmp (sh_div_str, "call"))
+	  GCC_OPTION (flag_if_conversion2) = 0;
+	  if (! strcmp (GCC_OPTION (sh_div_str), "call"))
 	    sh_div_strategy = SH_DIV_CALL;
-	  else if (! strcmp (sh_div_str, "call2"))
+	  else if (! strcmp (GCC_OPTION (sh_div_str), "call2"))
 	    sh_div_strategy = SH_DIV_CALL2;
-	  if (! strcmp (sh_div_str, "fp") && TARGET_FPU_ANY)
+	  if (! strcmp (GCC_OPTION (sh_div_str), "fp") && TARGET_FPU_ANY)
 	    sh_div_strategy = SH_DIV_FP;
-	  else if (! strcmp (sh_div_str, "inv"))
+	  else if (! strcmp (GCC_OPTION (sh_div_str), "inv"))
 	    sh_div_strategy = SH_DIV_INV;
-	  else if (! strcmp (sh_div_str, "inv:minlat"))
+	  else if (! strcmp (GCC_OPTION (sh_div_str), "inv:minlat"))
 	    sh_div_strategy = SH_DIV_INV_MINLAT;
-	  else if (! strcmp (sh_div_str, "inv20u"))
+	  else if (! strcmp (GCC_OPTION (sh_div_str), "inv20u"))
 	    sh_div_strategy = SH_DIV_INV20U;
-	  else if (! strcmp (sh_div_str, "inv20l"))
+	  else if (! strcmp (GCC_OPTION (sh_div_str), "inv20l"))
 	    sh_div_strategy = SH_DIV_INV20L;
-	  else if (! strcmp (sh_div_str, "inv:call2"))
+	  else if (! strcmp (GCC_OPTION (sh_div_str), "inv:call2"))
 	    sh_div_strategy = SH_DIV_INV_CALL2;
-	  else if (! strcmp (sh_div_str, "inv:call"))
+	  else if (! strcmp (GCC_OPTION (sh_div_str), "inv:call"))
 	    sh_div_strategy = SH_DIV_INV_CALL;
-	  else if (! strcmp (sh_div_str, "inv:fp"))
+	  else if (! strcmp (GCC_OPTION (sh_div_str), "inv:fp"))
 	    {
 	      if (TARGET_FPU_ANY)
 		sh_div_strategy = SH_DIV_INV_FP;
 	      else
 		sh_div_strategy = SH_DIV_INV;
 	    }
-	  TARGET_CBRANCHDI4 = 0;
+	  GCC_OPTION (TARGET_CBRANCHDI4) = 0;
 	  /* Assembler CFI isn't yet fully supported for SHmedia.  */
-	  flag_dwarf2_cfi_asm = 0;
+	  GCC_OPTION (flag_dwarf2_cfi_asm) = 0;
 	}
     }
   else
@@ -863,13 +863,13 @@ sh_option_override (void)
     }
   if (TARGET_SH1)
     {
-      if (! strcmp (sh_div_str, "call-div1"))
+      if (! strcmp (GCC_OPTION (sh_div_str), "call-div1"))
 	sh_div_strategy = SH_DIV_CALL_DIV1;
-      else if (! strcmp (sh_div_str, "call-fp")
+      else if (! strcmp (GCC_OPTION (sh_div_str), "call-fp")
 	       && (TARGET_FPU_DOUBLE || TARGET_FPU_SINGLE_ONLY
 		   || (TARGET_SHCOMPACT && TARGET_FPU_ANY)))
 	sh_div_strategy = SH_DIV_CALL_FP;
-      else if (! strcmp (sh_div_str, "call-table") && TARGET_DYNSHIFT)
+      else if (! strcmp (GCC_OPTION (sh_div_str), "call-table") && TARGET_DYNSHIFT)
 	sh_div_strategy = SH_DIV_CALL_TABLE;
       else
 	/* Pick one that makes most sense for the target in general.
@@ -893,31 +893,31 @@ sh_option_override (void)
 	  sh_div_strategy = SH_DIV_CALL_DIV1;
     }
   if (!TARGET_SH1)
-    TARGET_PRETEND_CMOVE = 0;
-  if (sh_divsi3_libfunc[0])
+    GCC_OPTION (TARGET_PRETEND_CMOVE) = 0;
+  if (GCC_OPTION (sh_divsi3_libfunc)[0])
     ; /* User supplied - leave it alone.  */
   else if (TARGET_DIVIDE_CALL_FP)
-    sh_divsi3_libfunc = "__sdivsi3_i4";
+    GCC_OPTION (sh_divsi3_libfunc) = "__sdivsi3_i4";
   else if (TARGET_DIVIDE_CALL_TABLE)
-    sh_divsi3_libfunc = "__sdivsi3_i4i";
+    GCC_OPTION (sh_divsi3_libfunc) = "__sdivsi3_i4i";
   else if (TARGET_SH5)
-    sh_divsi3_libfunc = "__sdivsi3_1";
+    GCC_OPTION (sh_divsi3_libfunc) = "__sdivsi3_1";
   else
-    sh_divsi3_libfunc = "__sdivsi3";
-  if (sh_branch_cost == -1)
+    GCC_OPTION (sh_divsi3_libfunc) = "__sdivsi3";
+  if (GCC_OPTION (sh_branch_cost) == -1)
     {
-      sh_branch_cost = 1;
+      GCC_OPTION (sh_branch_cost) = 1;
 
       /*  The SH1 does not have delay slots, hence we get a pipeline stall
 	  at every branch.  The SH4 is superscalar, so the single delay slot
 	  is not sufficient to keep both pipelines filled.  */
       if (! TARGET_SH2 || TARGET_HARD_SH4)
-	sh_branch_cost = 2;
+	GCC_OPTION (sh_branch_cost) = 2;
     }
 
   /* Set -mzdcbranch for SH4 / SH4A if not otherwise specified by the user.  */
   if (! global_options_set.x_TARGET_ZDCBRANCH && TARGET_HARD_SH4)
-    TARGET_ZDCBRANCH = 1;
+    GCC_OPTION (TARGET_ZDCBRANCH) = 1;
 
   for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
     if (! VALID_REGISTER_P (regno))
@@ -927,9 +927,9 @@ sh_option_override (void)
     if (! VALID_REGISTER_P (ADDREGNAMES_REGNO (regno)))
       sh_additional_register_names[regno][0] = '\0';
 
-  if ((flag_pic && ! TARGET_PREFERGOT)
+  if ((GCC_OPTION (flag_pic) && ! TARGET_PREFERGOT)
       || (TARGET_SHMEDIA && !TARGET_PT_FIXED))
-    flag_no_function_cse = 1;
+    GCC_OPTION (flag_no_function_cse) = 1;
 
   if (targetm.small_register_classes_for_mode_p (VOIDmode))
     {
@@ -940,58 +940,58 @@ sh_option_override (void)
 	 When sched1 is enabled, the ready queue will be reordered by
 	 the target hooks if pressure is high.  We can not do this for
 	 PIC, SH3 and lower as they give spill failures for R0.  */
-      if (!TARGET_HARD_SH4 || flag_pic)
-	flag_schedule_insns = 0;
+      if (!TARGET_HARD_SH4 || GCC_OPTION (flag_pic))
+	GCC_OPTION (flag_schedule_insns) = 0;
       /* ??? Current exception handling places basic block boundaries
 	 after call_insns.  It causes the high pressure on R0 and gives
 	 spill failures for R0 in reload.  See PR 22553 and the thread
 	 on gcc-patches
 	 <http://gcc.gnu.org/ml/gcc-patches/2005-10/msg00816.html>.  */
-      else if (flag_exceptions)
+      else if (GCC_OPTION (flag_exceptions))
 	{
-	  if (flag_schedule_insns && global_options_set.x_flag_schedule_insns)
+	  if (GCC_OPTION (flag_schedule_insns) && global_options_set.x_flag_schedule_insns)
 	    warning (0, "ignoring -fschedule-insns because of exception "
 			"handling bug");
-	  flag_schedule_insns = 0;
+	  GCC_OPTION (flag_schedule_insns) = 0;
 	}
-      else if (flag_schedule_insns
+      else if (GCC_OPTION (flag_schedule_insns)
 	       && !global_options_set.x_flag_schedule_insns)
-	flag_schedule_insns = 0;
+	GCC_OPTION (flag_schedule_insns) = 0;
     }
 
   /* Unwind info is not correct around the CFG unless either a frame
      pointer is present or M_A_O_A is set.  Fixing this requires rewriting
      unwind info generation to be aware of the CFG and propagating states
      around edges.  */
-  if ((flag_unwind_tables || flag_asynchronous_unwind_tables
-       || flag_exceptions || flag_non_call_exceptions)
-      && flag_omit_frame_pointer && !TARGET_ACCUMULATE_OUTGOING_ARGS)
+  if ((GCC_OPTION (flag_unwind_tables) || GCC_OPTION (flag_asynchronous_unwind_tables)
+       || GCC_OPTION (flag_exceptions) || GCC_OPTION (flag_non_call_exceptions))
+      && GCC_OPTION (flag_omit_frame_pointer) && !GCC_OPTION (TARGET_ACCUMULATE_OUTGOING_ARGS))
     {
       warning (0, "unwind tables currently require either a frame pointer "
 	       "or -maccumulate-outgoing-args for correctness");
-      TARGET_ACCUMULATE_OUTGOING_ARGS = 1;
+      GCC_OPTION (TARGET_ACCUMULATE_OUTGOING_ARGS) = 1;
     }
 
   /* Unwinding with -freorder-blocks-and-partition does not work on this
      architecture, because it requires far jumps to label crossing between
      hot/cold sections which are rejected on this architecture.  */
-  if (flag_reorder_blocks_and_partition)
+  if (GCC_OPTION (flag_reorder_blocks_and_partition))
     {
-      if (flag_exceptions)
+      if (GCC_OPTION (flag_exceptions))
 	{
 	  inform (input_location, 
 		  "-freorder-blocks-and-partition does not work with "
 		  "exceptions on this architecture");
-	  flag_reorder_blocks_and_partition = 0;
-	  flag_reorder_blocks = 1;
+	  GCC_OPTION (flag_reorder_blocks_and_partition) = 0;
+	  GCC_OPTION (flag_reorder_blocks) = 1;
 	}
-      else if (flag_unwind_tables)
+      else if (GCC_OPTION (flag_unwind_tables))
 	{
 	  inform (input_location,
 		  "-freorder-blocks-and-partition does not support unwind "
 		  "info on this architecture");
-	  flag_reorder_blocks_and_partition = 0;
-	  flag_reorder_blocks = 1;
+	  GCC_OPTION (flag_reorder_blocks_and_partition) = 0;
+	  GCC_OPTION (flag_reorder_blocks) = 1;
 	}
     }
 
@@ -1004,31 +1004,31 @@ sh_option_override (void)
       Aligning all jumps increases the code size, even if it might
       result in slightly faster code.  Thus, it is set to the smallest 
       alignment possible if not specified by the user.  */
-  if (align_loops == 0)
+  if (GCC_OPTION (align_loops) == 0)
     {
       if (TARGET_SH5)
-	align_loops = 8;
+	GCC_OPTION (align_loops) = 8;
       else
-	align_loops = optimize_size ? 2 : 4;
+	GCC_OPTION (align_loops) = GCC_OPTION (optimize_size) ? 2 : 4;
     }
 
-  if (align_jumps == 0)
+  if (GCC_OPTION (align_jumps) == 0)
     {
       if (TARGET_SHMEDIA)
-	align_jumps = 1 << CACHE_LOG;
+	GCC_OPTION (align_jumps) = 1 << CACHE_LOG;
       else
-	align_jumps = 2;
+	GCC_OPTION (align_jumps) = 2;
     }
-  else if (align_jumps < (TARGET_SHMEDIA ? 4 : 2))
-    align_jumps = TARGET_SHMEDIA ? 4 : 2;
+  else if (GCC_OPTION (align_jumps) < (TARGET_SHMEDIA ? 4 : 2))
+    GCC_OPTION (align_jumps) = TARGET_SHMEDIA ? 4 : 2;
 
-  if (align_functions == 0)
+  if (GCC_OPTION (align_functions) == 0)
     {
       if (TARGET_SHMEDIA)
-	align_functions = optimize_size
+	GCC_OPTION (align_functions) = GCC_OPTION (optimize_size)
 			  ? FUNCTION_BOUNDARY/8 : (1 << CACHE_LOG);
       else
-	align_functions = optimize_size ? 2 : 4;
+	GCC_OPTION (align_functions) = GCC_OPTION (optimize_size) ? 2 : 4;
     }
 
   /* The linker relaxation code breaks when a function contains
@@ -1036,48 +1036,48 @@ sh_option_override (void)
      compilation unit.  */
   if (TARGET_RELAX)
     {
-      int min_align = align_loops > align_jumps ? align_loops : align_jumps;
+      int min_align = GCC_OPTION (align_loops) > GCC_OPTION (align_jumps) ? GCC_OPTION (align_loops) : GCC_OPTION (align_jumps);
 
       /* Also take possible .long constants / mova tables into account.	*/
       if (min_align < 4)
 	min_align = 4;
-      if (align_functions < min_align)
-	align_functions = min_align;
+      if (GCC_OPTION (align_functions) < min_align)
+	GCC_OPTION (align_functions) = min_align;
     }
 
-  if (flag_unsafe_math_optimizations)
+  if (GCC_OPTION (flag_unsafe_math_optimizations))
     {
       /* Enable fsca insn for SH4A if not otherwise specified by the user.  */
       if (global_options_set.x_TARGET_FSCA == 0 && TARGET_SH4A_FP)
-	TARGET_FSCA = 1;
+	GCC_OPTION (TARGET_FSCA) = 1;
 
       /* Enable fsrra insn for SH4A if not otherwise specified by the user.  */
       if (global_options_set.x_TARGET_FSRRA == 0 && TARGET_SH4A_FP)
-	TARGET_FSRRA = 1;
+	GCC_OPTION (TARGET_FSRRA) = 1;
     }
 
   /*  Allow fsrra insn only if -funsafe-math-optimizations and
       -ffinite-math-only is enabled.  */
-  TARGET_FSRRA = TARGET_FSRRA
-		 && flag_unsafe_math_optimizations
-		 && flag_finite_math_only;
+  GCC_OPTION (TARGET_FSRRA) = GCC_OPTION (TARGET_FSRRA)
+		 && GCC_OPTION (flag_unsafe_math_optimizations)
+		 && GCC_OPTION (flag_finite_math_only);
 
   /* If the -mieee option was not explicitly set by the user, turn it on
      unless -ffinite-math-only was specified.  See also PR 33135.  */
   if (! global_options_set.x_TARGET_IEEE)
-    TARGET_IEEE = ! flag_finite_math_only;
+    GCC_OPTION (TARGET_IEEE) = ! GCC_OPTION (flag_finite_math_only);
 
-  if (sh_fixed_range_str)
-    sh_fix_range (sh_fixed_range_str);
+  if (GCC_OPTION (sh_fixed_range_str))
+    sh_fix_range (GCC_OPTION (sh_fixed_range_str));
 
   /* This target defaults to strict volatile bitfields.  */
-  if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
-    flag_strict_volatile_bitfields = 1;
+  if (GCC_OPTION (flag_strict_volatile_bitfields) < 0 && abi_version_at_least(2))
+    GCC_OPTION (flag_strict_volatile_bitfields) = 1;
 
   /* Parse atomic model option and make sure it is valid for the current
      target CPU.  */
   selected_atomic_model_
-    = parse_validate_atomic_model_option (sh_atomic_model_str);
+    = parse_validate_atomic_model_option (GCC_OPTION (sh_atomic_model_str));
 
   register_sh_passes ();
 }
@@ -1209,7 +1209,7 @@ sh_print_operand (FILE *stream, rtx x, int code)
 	break;
       }
     case '>':
-      if (flag_verbose_asm && JUMP_LABEL (current_output_insn))
+      if (GCC_OPTION (flag_verbose_asm) && JUMP_LABEL (current_output_insn))
 	{
 	  fputs ("\t! target: ", stream);
 	  output_addr_const (stream, JUMP_LABEL (current_output_insn));
@@ -1648,7 +1648,7 @@ void
 prepare_move_operands (rtx operands[], enum machine_mode mode)
 {
   if ((mode == SImode || mode == DImode)
-      && flag_pic
+      && GCC_OPTION (flag_pic)
       && ! ((mode == Pmode || mode == ptr_mode)
 	    && tls_symbolic_operand (operands[1], Pmode) != TLS_MODEL_NONE))
     {
@@ -1735,7 +1735,7 @@ prepare_move_operands (rtx operands[], enum machine_mode mode)
 	{
 	  rtx tga_op1, tga_ret, tmp, tmp2;
 
-	  if (! flag_pic
+	  if (! GCC_OPTION (flag_pic)
 	      && (tls_kind == TLS_MODEL_GLOBAL_DYNAMIC
 		  || tls_kind == TLS_MODEL_LOCAL_DYNAMIC
 		  || tls_kind == TLS_MODEL_INITIAL_EXEC))
@@ -1743,11 +1743,11 @@ prepare_move_operands (rtx operands[], enum machine_mode mode)
 	      /* Don't schedule insns for getting GOT address when
 		 the first scheduling is enabled, to avoid spill
 		 failures for R0.  */
-	      if (flag_schedule_insns)
+	      if (GCC_OPTION (flag_schedule_insns))
 		emit_insn (gen_blockage ());
 	      emit_insn (gen_GOTaddr2picreg ());
 	      emit_use (gen_rtx_REG (SImode, PIC_REG));
-	      if (flag_schedule_insns)
+	      if (GCC_OPTION (flag_schedule_insns))
 		emit_insn (gen_blockage ());
 	}
 
@@ -2046,7 +2046,7 @@ expand_cbranchdi4 (rtx *operands, enum rtx_code comparison)
        but saves us mispredicts because only one branch needs prediction.
        It also enables generating the cmpeqdi_t-1 pattern.  */
     case EQ:
-      if (TARGET_CMPEQDI_T)
+      if (GCC_OPTION (TARGET_CMPEQDI_T))
 	{
 	  emit_insn (gen_cmpeqdi_t (operands[1], operands[2]));
 	  emit_jump_insn (gen_branch_true (operands[3]));
@@ -2073,7 +2073,7 @@ expand_cbranchdi4 (rtx *operands, enum rtx_code comparison)
 	}
       break;
     case NE:
-      if (TARGET_CMPEQDI_T)
+      if (GCC_OPTION (TARGET_CMPEQDI_T))
 	{
 	  emit_insn (gen_cmpeqdi_t (operands[1], operands[2]));
 	  emit_jump_insn (gen_branch_false (operands[3]));
@@ -2398,8 +2398,8 @@ sh_emit_compare_and_branch (rtx *operands, enum machine_mode mode)
   if (GET_MODE_CLASS (mode) == MODE_FLOAT)
     {
       if (code == LT
-	  || (code == LE && TARGET_IEEE && TARGET_SH2E)
-	  || (code == GE && !(TARGET_IEEE && TARGET_SH2E)))
+	  || (code == LE && GCC_OPTION (TARGET_IEEE) && TARGET_SH2E)
+	  || (code == GE && !(GCC_OPTION (TARGET_IEEE) && TARGET_SH2E)))
 	{
 	  tem = op0, op0 = op1, op1 = tem;
 	  code = swap_condition (code);
@@ -2408,7 +2408,7 @@ sh_emit_compare_and_branch (rtx *operands, enum machine_mode mode)
       /* GE becomes fcmp/gt+fcmp/eq, for SH2E and TARGET_IEEE only.  */
       if (code == GE)
 	{
-	  gcc_assert (TARGET_IEEE && TARGET_SH2E);
+	  gcc_assert (GCC_OPTION (TARGET_IEEE) && TARGET_SH2E);
 	  need_ccmpeq = true;
 	  code = GT;
 	}
@@ -2479,7 +2479,7 @@ sh_emit_compare_and_set (rtx *operands, enum machine_mode mode)
 	}
       if (code == GE)
 	{
-	  if (TARGET_IEEE)
+	  if (GCC_OPTION (TARGET_IEEE))
 	    {
 	      lab = gen_label_rtx ();
 	      sh_emit_scc_to_t (EQ, op0, op1);
@@ -2606,7 +2606,7 @@ output_movedouble (rtx insn ATTRIBUTE_UNUSED, rtx operands[],
 static void
 print_slot (rtx insn)
 {
-  final_scan_insn (XVECEXP (insn, 0, 1), asm_out_file, optimize, 1, NULL);
+  final_scan_insn (XVECEXP (insn, 0, 1), asm_out_file, GCC_OPTION (optimize), 1, NULL);
 
   INSN_DELETED_P (XVECEXP (insn, 0, 1)) = 1;
 }
@@ -2634,7 +2634,7 @@ output_far_jump (rtx insn, rtx op)
   else
     {
       far = 1;
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	{
 	  if (TARGET_SH2)
 	    jump =     "mov.l	%O0,%1" "\n"
@@ -2656,7 +2656,7 @@ output_far_jump (rtx insn, rtx op)
       && INSN_CODE (prev) == CODE_FOR_indirect_jump_scratch)
     {
       this_jmp.reg = SET_DEST (XVECEXP (PATTERN (prev), 0, 0));
-      if (REGNO (this_jmp.reg) == R0_REG && flag_pic && ! TARGET_SH2)
+      if (REGNO (this_jmp.reg) == R0_REG && GCC_OPTION (flag_pic) && ! TARGET_SH2)
 	jump =         "mov.l	r1,@-r15"	"\n"
 	       "	mova	%O0,r0"		"\n"
 	       "	mov.l	@r0,r1"		"\n"
@@ -2690,7 +2690,7 @@ output_far_jump (rtx insn, rtx op)
       else
 	output_asm_insn ("mov.l	@r15+,r13", 0);
     }
-  if (far && flag_pic && TARGET_SH2)
+  if (far && GCC_OPTION (flag_pic) && TARGET_SH2)
     {
       braf_base_lab = gen_label_rtx ();
       (*targetm.asm_out.internal_label) (asm_out_file, "L",
@@ -2700,7 +2700,7 @@ output_far_jump (rtx insn, rtx op)
     output_asm_insn (".align	2", 0);
   (*targetm.asm_out.internal_label) (asm_out_file, "L", CODE_LABEL_NUMBER (this_jmp.lab));
   this_jmp.op = op;
-  if (far && flag_pic)
+  if (far && GCC_OPTION (flag_pic))
     {
       if (TARGET_SH2)
 	this_jmp.lab = braf_base_lab;
@@ -2915,7 +2915,7 @@ sh_cannot_copy_insn_p (rtx insn)
 {
   rtx pat;
 
-  if (!reload_completed || !flag_pic)
+  if (!reload_completed || !GCC_OPTION (flag_pic))
     return false;
 
   if (!NONJUMP_INSN_P (insn))
@@ -3160,7 +3160,7 @@ and_xor_ior_costs (rtx x, int code)
 	  || satisfies_constraint_J16 (XEXP (x, 1)))
 	return 1;
       else
-	return 1 + rtx_cost (XEXP (x, 1), AND, 1, !optimize_size);
+	return 1 + rtx_cost (XEXP (x, 1), AND, 1, !GCC_OPTION (optimize_size));
     }
 
   /* These constants are single cycle extu.[bw] instructions.  */
@@ -3259,8 +3259,8 @@ addsubcosts (rtx x)
 static inline int
 multcosts (rtx x ATTRIBUTE_UNUSED)
 {
-  if (sh_multcost >= 0)
-    return sh_multcost;
+  if (GCC_OPTION (sh_multcost) >= 0)
+    return GCC_OPTION (sh_multcost);
   if (TARGET_SHMEDIA)
     /* ??? We have a mul insn, but it has a latency of three, and doesn't
        accept constants.  Ideally, we would use a cost of one or two and
@@ -3269,21 +3269,21 @@ multcosts (rtx x ATTRIBUTE_UNUSED)
        Using a multiply first and splitting it later if it's a loss
        doesn't work because of different sign / zero extension semantics
        of multiplies vs. shifts.  */
-    return optimize_size ? 2 : 3;
+    return GCC_OPTION (optimize_size) ? 2 : 3;
 
   if (TARGET_SH2)
     {
       /* We have a mul insn, so we can never take more than the mul and the
 	 read of the mac reg, but count more because of the latency and extra
 	 reg usage.  */
-      if (optimize_size)
+      if (GCC_OPTION (optimize_size))
 	return 2;
       return 3;
     }
 
   /* If we're aiming at small code, then just count the number of
      insns in a multiply call sequence.  */
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     return 5;
 
   /* Otherwise count all the insns in the routine we'd be calling too.  */
@@ -4897,7 +4897,7 @@ static void
 fixup_mova (rtx mova)
 {
   PUT_MODE (XEXP (MOVA_LABELREF (mova), 0), QImode);
-  if (! flag_pic)
+  if (! GCC_OPTION (flag_pic))
     {
       SET_SRC (PATTERN (mova)) = MOVA_LABELREF (mova);
       INSN_CODE (mova) = -1;
@@ -4943,7 +4943,7 @@ untangle_mova (int *num_mova, rtx *first_mova, rtx new_mova)
   int n_addr = 0; /* Initialization to shut up spurious warning.  */
   int f_target, n_target = 0; /* Likewise.  */
 
-  if (optimize)
+  if (GCC_OPTION (optimize))
     {
       /* If NEW_MOVA has no address yet, it will be handled later.  */
       if (INSN_ADDRESSES_SIZE() <= (unsigned) INSN_UID (new_mova))
@@ -4964,7 +4964,7 @@ untangle_mova (int *num_mova, rtx *first_mova, rtx new_mova)
       *first_mova = new_mova;
       return 2;
     }
-  if (!optimize
+  if (!GCC_OPTION (optimize)
       || ((f_target
 	   = INSN_ADDRESSES (INSN_UID (XEXP (MOVA_LABELREF (*first_mova), 0))))
 	  >= n_target))
@@ -5038,7 +5038,7 @@ find_barrier (int num_mova, rtx mova, rtx from)
       if (LABEL_P (from)
 	  && CODE_LABEL_NUMBER (from) <= max_labelno_before_reorg)
 	{
-	  if (optimize)
+	  if (GCC_OPTION (optimize))
 	    new_align = 1 << label_to_alignment (from);
 	  else if (BARRIER_P (prev_nonnote_insn (from)))
 	    new_align = 1 << barrier_align (from);
@@ -5149,7 +5149,7 @@ find_barrier (int num_mova, rtx mova, rtx from)
 	  switch (untangle_mova (&num_mova, &mova, from))
 	    {
 	      case 1:
-		if (flag_pic)
+		if (GCC_OPTION (flag_pic))
 		  {
 		    rtx src = SET_SRC (PATTERN (from));
 		    if (GET_CODE (src) == CONST
@@ -5200,7 +5200,7 @@ find_barrier (int num_mova, rtx mova, rtx from)
       /* For the SH1, we generate alignments even after jumps-around-jumps.  */
       else if (JUMP_P (from)
 	       && ! TARGET_SH2
-	       && ! optimize_size)
+	       && ! GCC_OPTION (optimize_size))
 	new_align = 4;
 
       /* There is a possibility that a bf is transformed into a bf/s by the
@@ -5290,7 +5290,7 @@ find_barrier (int num_mova, rtx mova, rtx from)
 
       /* Don't insert the constant pool table at the position which
 	 may be the landing pad.  */
-      if (flag_exceptions
+      if (GCC_OPTION (flag_exceptions)
 	  && CALL_P (from)
 	  && find_reg_note (from, REG_EH_REGION, NULL_RTX))
 	from = PREV_INSN (from);
@@ -5558,7 +5558,7 @@ gen_block_redirect (rtx jump, int addr, int need_block)
      when not optimizing.  */
   dest = XEXP (SET_SRC (PATTERN (jump)), 0);
   /* If the branch is out of range, try to find a scratch register for it.  */
-  if (optimize
+  if (GCC_OPTION (optimize)
       && (INSN_ADDRESSES (INSN_UID (dest)) - addr + (unsigned) 4092
 	  > 4092 + 4098))
     {
@@ -5566,7 +5566,7 @@ gen_block_redirect (rtx jump, int addr, int need_block)
       /* Don't look for the stack pointer as a scratch register,
 	 it would cause trouble if an interrupt occurred.  */
       unsigned attempt = 0x7fff, used;
-      int jump_left = flag_expensive_optimizations + 1;
+      int jump_left = GCC_OPTION (flag_expensive_optimizations) + 1;
 
       /* It is likely that the most recent eligible instruction is wanted for
 	 the delay slot.  Therefore, find out which registers it uses, and
@@ -5627,7 +5627,7 @@ gen_block_redirect (rtx jump, int addr, int need_block)
      Don't check if we are called recursively; the jump has been or will be
      checked in a different invocation then.  */
 
-  else if (optimize && need_block >= 0)
+  else if (GCC_OPTION (optimize) && need_block >= 0)
     {
       rtx next = next_active_insn (next_active_insn (dest));
       if (next && JUMP_P (next)
@@ -5717,7 +5717,7 @@ gen_far_branch (struct far_branch *bp)
      But don't do this when not optimizing, since we wouldn't suppress the
      alignment for the barrier then, and could end up with out-of-range
      pc-relative loads.  */
-  if (optimize)
+  if (GCC_OPTION (optimize))
     emit_barrier_after (jump);
   emit_label_after (bp->near_label, insn);
 
@@ -5816,7 +5816,7 @@ barrier_align (rtx barrier_or_label)
       pat = PATTERN (PREV_INSN (barrier_or_label));
       /* If this is a very small table, we want to keep the alignment after
 	 the table to the minimum for proper code alignment.  */
-      return ((optimize_size
+      return ((GCC_OPTION (optimize_size)
 	       || ((unsigned) XVECLEN (pat, 1) * GET_MODE_SIZE (GET_MODE (pat))
 		   <= (unsigned) 1 << (CACHE_LOG - 2)))
 	      ? 1 << TARGET_SHMEDIA : align_jumps_log);
@@ -5833,10 +5833,10 @@ barrier_align (rtx barrier_or_label)
     /* This is a barrier in front of a constant table.  */
     return 0;
 
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     return 0;
 
-  if (! TARGET_SH2 || ! optimize)
+  if (! TARGET_SH2 || ! GCC_OPTION (optimize))
     return align_jumps_log;
 
   /* When fixing up pcloads, a constant table might be inserted just before
@@ -5929,7 +5929,7 @@ sh_loop_align (rtx label)
 {
   rtx next = label;
 
-  if (! optimize || optimize_size)
+  if (! GCC_OPTION (optimize) || GCC_OPTION (optimize_size))
     return 0;
 
   do
@@ -5960,7 +5960,7 @@ sh_reorg (void)
   /* We must split call insns before introducing `mova's.  If we're
      optimizing, they'll have already been split.  Otherwise, make
      sure we don't split them too late.  */
-  if (! optimize)
+  if (! GCC_OPTION (optimize))
     split_all_insns_noflow ();
 
   if (TARGET_SHMEDIA)
@@ -6171,7 +6171,7 @@ sh_reorg (void)
   if (TARGET_SH2)
     fixup_addr_diff_vecs (first);
 
-  if (optimize)
+  if (GCC_OPTION (optimize))
     {
       mdep_reorg_phase = SH_SHORTEN_BRANCHES0;
       shorten_branches (first);
@@ -6384,7 +6384,7 @@ sh_reorg (void)
      also has an effect on the register that holds the address of the sfunc.
      Insert an extra dummy insn in front of each sfunc that pretends to
      use this register.  */
-  if (flag_delayed_branch)
+  if (GCC_OPTION (flag_delayed_branch))
     {
       for (insn = first; insn; insn = NEXT_INSN (insn))
 	{
@@ -6480,7 +6480,7 @@ split_branches (rtx first)
 		   proceeds to delete unreferenced code, and then if not
 		   optimizing, to un-delete the deleted instructions, thus
 		   leaving labels with too low uses counts.  */
-		if (! optimize)
+		if (! GCC_OPTION (optimize))
 		  {
 		    JUMP_LABEL (insn) = olabel;
 		    LABEL_NUSES (olabel)++;
@@ -6588,7 +6588,7 @@ split_branches (rtx first)
 		    if (! NEXT_INSN (far_label))
 		      continue;
 
-		    if (! optimize)
+		    if (! GCC_OPTION (optimize))
 		      {
 			JUMP_LABEL (insn) = far_label;
 			LABEL_NUSES (far_label)++;
@@ -6634,7 +6634,7 @@ split_branches (rtx first)
       if (far_branch_list->near_label
 	  && ! NEXT_INSN (far_branch_list->near_label))
 	gen_far_branch (far_branch_list);
-      if (optimize
+      if (GCC_OPTION (optimize)
 	  && far_branch_list->far_label
 	  && ! --LABEL_NUSES (far_branch_list->far_label))
 	delete_insn (far_branch_list->far_label);
@@ -6660,7 +6660,7 @@ void
 final_prescan_insn (rtx insn, rtx *opvec ATTRIBUTE_UNUSED,
 		    int noperands ATTRIBUTE_UNUSED)
 {
-  if (TARGET_DUMPISIZE)
+  if (GCC_OPTION (TARGET_DUMPISIZE))
     fprintf (asm_out_file, "\n! at %04x\n", INSN_ADDRESSES (INSN_UID (insn)));
 
   if (TARGET_RELAX)
@@ -7105,7 +7105,7 @@ static int
 shmedia_reserve_space_for_target_registers_p (int regs_saved,
 					      HARD_REG_SET *live_regs_mask)
 {
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     return 0;
   return shmedia_target_regs_stack_space (live_regs_mask) <= regs_saved;
 }
@@ -7147,7 +7147,7 @@ calc_live_regs (HARD_REG_SET *live_regs_mask)
   CLEAR_HARD_REG_SET (*live_regs_mask);
   if ((TARGET_SH4 || TARGET_SH2A_DOUBLE) && TARGET_FMOVD && interrupt_handler
       && df_regs_ever_live_p (FPSCR_REG))
-    target_flags &= ~MASK_FPU_SINGLE;
+    GCC_OPTION (target_flags) &= ~MASK_FPU_SINGLE;
   /* If we can save a lot of saves by switching to double mode, do that.  */
   else if ((TARGET_SH4 || TARGET_SH2A_DOUBLE) && TARGET_FMOVD
 	   && TARGET_FPU_SINGLE)
@@ -7157,7 +7157,7 @@ calc_live_regs (HARD_REG_SET *live_regs_mask)
 	      || interrupt_handler)
 	  && ++count > 2)
 	{
-	  target_flags &= ~MASK_FPU_SINGLE;
+	  GCC_OPTION (target_flags) &= ~MASK_FPU_SINGLE;
 	  break;
 	}
   /* PR_MEDIA_REG is a general purpose register, thus global_alloc already
@@ -7209,7 +7209,7 @@ calc_live_regs (HARD_REG_SET *live_regs_mask)
 	     && (reg != FPSCR_REG || TARGET_FPU_ANY))
 	  : (/* Only push those regs which are used and need to be saved.  */
 	     (TARGET_SHCOMPACT
-	      && flag_pic
+	      && GCC_OPTION (flag_pic)
 	      && crtl->args.info.call_cookie
 	      && reg == PIC_OFFSET_TABLE_REGNUM)
 	     || (df_regs_ever_live_p (reg)
@@ -7244,7 +7244,7 @@ calc_live_regs (HARD_REG_SET *live_regs_mask)
 	      else if (XD_REGISTER_P (reg))
 		{
 		  /* Must switch to double mode to access these registers.  */
-		  target_flags &= ~MASK_FPU_SINGLE;
+		  GCC_OPTION (target_flags) &= ~MASK_FPU_SINGLE;
 		}
 	    }
 	}
@@ -7254,7 +7254,7 @@ calc_live_regs (HARD_REG_SET *live_regs_mask)
   /* If we have a target register optimization pass after prologue / epilogue
      threading, we need to assume all target registers will be live even if
      they aren't now.  */
-  if (flag_branch_target_load_optimize2
+  if (GCC_OPTION (flag_branch_target_load_optimize2)
       && TARGET_SAVE_ALL_TARGET_REGS
       && shmedia_space_reserved_for_target_registers)
     for (reg = LAST_TARGET_REG; reg >= FIRST_TARGET_REG; reg--)
@@ -7315,7 +7315,7 @@ sh_media_register_for_return (void)
   if (sh_cfun_interrupt_handler_p ())
     return -1;
 
-  tr0_used = flag_pic && df_regs_ever_live_p (PIC_OFFSET_TABLE_REGNUM);
+  tr0_used = GCC_OPTION (flag_pic) && df_regs_ever_live_p (PIC_OFFSET_TABLE_REGNUM);
 
   for (regno = FIRST_TARGET_REG + tr0_used; regno <= LAST_TARGET_REG; regno++)
     if (call_really_used_regs[regno] && ! df_regs_ever_live_p (regno))
@@ -7454,7 +7454,7 @@ sh_expand_prologue (void)
   HARD_REG_SET live_regs_mask;
   int d, i;
   int d_rounding = 0;
-  int save_flags = target_flags;
+  int save_flags = GCC_OPTION (target_flags);
   int pretend_args;
   int stack_usage;
   tree sp_switch_attr
@@ -7475,7 +7475,7 @@ sh_expand_prologue (void)
 		       stack_pointer_rtx, 0, NULL, true);
   stack_usage = pretend_args + crtl->args.info.stack_regs * 8;
 
-  if (TARGET_SHCOMPACT && flag_pic && crtl->args.info.call_cookie)
+  if (TARGET_SHCOMPACT && GCC_OPTION (flag_pic) && crtl->args.info.call_cookie)
     /* We're going to use the PIC register to load the address of the
        incoming-argument decoder and/or of the return trampoline from
        the GOT, so make sure the PIC register is preserved and
@@ -7557,7 +7557,7 @@ sh_expand_prologue (void)
   d = calc_live_regs (&live_regs_mask);
   /* ??? Maybe we could save some switching if we can move a mode switch
      that already happens to be at the function start into the prologue.  */
-  if (target_flags != save_flags && ! current_function_interrupt)
+  if (GCC_OPTION (target_flags) != save_flags && ! current_function_interrupt)
     emit_insn (gen_toggle_sz ());
 
   if (TARGET_SH5)
@@ -7761,7 +7761,7 @@ sh_expand_prologue (void)
       stack_usage += d;
     }
 
-  if (flag_pic && df_regs_ever_live_p (PIC_OFFSET_TABLE_REGNUM))
+  if (GCC_OPTION (flag_pic) && df_regs_ever_live_p (PIC_OFFSET_TABLE_REGNUM))
     emit_insn (gen_GOTaddr2picreg ());
 
   if (SHMEDIA_REGS_STACK_ADJUST ())
@@ -7776,10 +7776,10 @@ sh_expand_prologue (void)
 		 (GEN_INT (-SHMEDIA_REGS_STACK_ADJUST ())));
     }
 
-  if (target_flags != save_flags && ! current_function_interrupt)
+  if (GCC_OPTION (target_flags) != save_flags && ! current_function_interrupt)
     emit_insn (gen_toggle_sz ());
 
-  target_flags = save_flags;
+  GCC_OPTION (target_flags) = save_flags;
 
   output_stack_adjust (-rounded_frame_size (d) + d_rounding,
 		       stack_pointer_rtx, 0, NULL, true);
@@ -7802,10 +7802,10 @@ sh_expand_prologue (void)
      the call to mcount.  Similarly if some call instructions are swapped
      before frame related insns, it'll confuse the unwinder because
      currently SH has no unwind info for function epilogues.  */
-  if (crtl->profile || flag_exceptions || flag_unwind_tables)
+  if (crtl->profile || GCC_OPTION (flag_exceptions) || GCC_OPTION (flag_unwind_tables))
     emit_insn (gen_blockage ());
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = stack_usage;
 }
 
@@ -7817,7 +7817,7 @@ sh_expand_epilogue (bool sibcall_p)
   int d, i;
   int d_rounding = 0;
 
-  int save_flags = target_flags;
+  int save_flags = GCC_OPTION (target_flags);
   int frame_size, save_size;
   int fpscr_deferred = 0;
   int e = sibcall_p ? -1 : 1;
@@ -7893,7 +7893,7 @@ sh_expand_epilogue (bool sibcall_p)
 
   /* Pop all the registers.  */
 
-  if (target_flags != save_flags && ! current_function_interrupt)
+  if (GCC_OPTION (target_flags) != save_flags && ! current_function_interrupt)
     emit_insn (gen_toggle_sz ());
   if (TARGET_SH5)
     {
@@ -8086,9 +8086,9 @@ sh_expand_epilogue (bool sibcall_p)
 	    pop (FPSCR_REG);
 	}
     }
-  if (target_flags != save_flags && ! current_function_interrupt)
+  if (GCC_OPTION (target_flags) != save_flags && ! current_function_interrupt)
     emit_insn (gen_toggle_sz ());
-  target_flags = save_flags;
+  GCC_OPTION (target_flags) = save_flags;
 
   output_stack_adjust (crtl->args.pretend_args_size
 		       + save_size + d_rounding
@@ -9212,7 +9212,7 @@ initial_elimination_offset (int from, int to)
   int regs_saved_rounding = 0;
   int total_saved_regs_space;
   int total_auto_space;
-  int save_flags = target_flags;
+  int save_flags = GCC_OPTION (target_flags);
   int copy_flags;
   HARD_REG_SET live_regs_mask;
 
@@ -9231,8 +9231,8 @@ initial_elimination_offset (int from, int to)
 			   - regs_saved % (STACK_BOUNDARY / BITS_PER_UNIT));
 
   total_auto_space = rounded_frame_size (regs_saved) - regs_saved_rounding;
-  copy_flags = target_flags;
-  target_flags = save_flags;
+  copy_flags = GCC_OPTION (target_flags);
+  GCC_OPTION (target_flags) = save_flags;
 
   total_saved_regs_space = regs_saved + regs_saved_rounding;
 
@@ -9270,13 +9270,13 @@ initial_elimination_offset (int from, int to)
       if (! TEST_HARD_REG_BIT (live_regs_mask, pr_reg))
 	return n;
 
-      target_flags = copy_flags;
+      GCC_OPTION (target_flags) = copy_flags;
 
       sh5_schedule_saves (&live_regs_mask, &schedule, n);
       for (entry = &schedule.entries[1]; entry->mode != VOIDmode; entry++)
 	if (entry->reg == pr_reg)
 	  {
-	    target_flags = save_flags;
+	    GCC_OPTION (target_flags) = save_flags;
 	    return entry->offset;
 	  }
       gcc_unreachable ();
@@ -9727,13 +9727,13 @@ sh_cfun_trap_exit_p (void)
 static const char *
 sh_check_pch_target_flags (int old_flags)
 {
-  if ((old_flags ^ target_flags) & (MASK_SH1 | MASK_SH2 | MASK_SH3
+  if ((old_flags ^ GCC_OPTION (target_flags)) & (MASK_SH1 | MASK_SH2 | MASK_SH3
 				    | MASK_SH_E | MASK_HARD_SH4
 				    | MASK_FPU_SINGLE | MASK_SH4))
     return _("created and used with different architectures / ABIs");
-  if ((old_flags ^ target_flags) & MASK_HITACHI)
+  if ((old_flags ^ GCC_OPTION (target_flags)) & MASK_HITACHI)
     return _("created and used with different ABIs");
-  if ((old_flags ^ target_flags) & MASK_LITTLE_ENDIAN)
+  if ((old_flags ^ GCC_OPTION (target_flags)) & MASK_LITTLE_ENDIAN)
     return _("created and used with different endianness");
   return NULL;
 }
@@ -10397,7 +10397,7 @@ sh_find_mov_disp_adjust (enum machine_mode mode, HOST_WIDE_INT offset)
 static rtx
 sh_legitimize_address (rtx x, rtx oldx, enum machine_mode mode)
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     x = legitimize_pic_address (oldx, mode, NULL_RTX);
 
   if (TARGET_SHMEDIA)
@@ -10622,7 +10622,7 @@ mark_constant_pool_use (rtx x)
 bool
 sh_can_redirect_branch (rtx branch1, rtx branch2)
 {
-  if (flag_expensive_optimizations && simplejump_p (branch2))
+  if (GCC_OPTION (flag_expensive_optimizations) && simplejump_p (branch2))
     {
       rtx dest = XEXP (SET_SRC (single_set (branch2)), 0);
       rtx insn;
@@ -10767,7 +10767,7 @@ sh_adjust_cost (rtx insn, rtx link ATTRIBUTE_UNUSED, rtx dep_insn, int cost)
 		  /* sibcalli_thunk uses a symbol_ref in an unspec.  */
 	      && (GET_CODE (XEXP (XEXP (call, 0), 0)) == UNSPEC
 		  || ! reg_set_p (XEXP (XEXP (call, 0), 0), dep_insn)))
-	    cost -= TARGET_SH4_300 ? 3 : 6;
+	    cost -= GCC_OPTION (TARGET_SH4_300) ? 3 : 6;
 	}
       /* Likewise, the most timing critical input for an sfuncs call
 	 is the function address.  However, sfuncs typically start
@@ -10784,9 +10784,9 @@ sh_adjust_cost (rtx insn, rtx link ATTRIBUTE_UNUSED, rtx dep_insn, int cost)
 	       && (reg = sfunc_uses_reg (insn)))
 	{
 	  if (! reg_set_p (reg, dep_insn))
-	    cost -= TARGET_SH4_300 ? 1 : 4;
+	    cost -= GCC_OPTION (TARGET_SH4_300) ? 1 : 4;
 	}
-      if (TARGET_HARD_SH4 && !TARGET_SH4_300)
+      if (TARGET_HARD_SH4 && !GCC_OPTION (TARGET_SH4_300))
 	{
 	  enum attr_type dep_type = get_attr_type (dep_insn);
 
@@ -10826,7 +10826,7 @@ sh_adjust_cost (rtx insn, rtx link ATTRIBUTE_UNUSED, rtx dep_insn, int cost)
 	      && get_attr_late_fp_use (insn) == LATE_FP_USE_YES)
 	    cost -= 1;
 	}
-      else if (TARGET_SH4_300)
+      else if (GCC_OPTION (TARGET_SH4_300))
 	{
 	  /* Stores need their input register two cycles later.  */
 	  if (dep_set && cost >= 1
@@ -10851,7 +10851,7 @@ sh_adjust_cost (rtx insn, rtx link ATTRIBUTE_UNUSED, rtx dep_insn, int cost)
     }
   /* An anti-dependence penalty of two applies if the first insn is a double
      precision fadd / fsub / fmul.  */
-  else if (!TARGET_SH4_300
+  else if (!GCC_OPTION (TARGET_SH4_300)
 	   && REG_NOTE_KIND (link) == REG_DEP_ANTI
 	   && recog_memoized (dep_insn) >= 0
 	   && (get_attr_type (dep_insn) == TYPE_DFP_ARITH
@@ -11474,8 +11474,8 @@ sh_trampoline_init (rtx tramp_mem, tree fndecl, rtx cxt)
   emit_move_insn (adjust_address (tramp_mem, SImode, 12), fnaddr);
   if (TARGET_HARD_SH4 || TARGET_SH5)
     {
-      if (!TARGET_INLINE_IC_INVALIDATE
-	  || (!(TARGET_SH4A_ARCH || TARGET_SH4_300) && TARGET_USERMODE))
+      if (!GCC_OPTION (TARGET_INLINE_IC_INVALIDATE)
+	  || (!(TARGET_SH4A_ARCH || GCC_OPTION (TARGET_SH4_300)) && GCC_OPTION (TARGET_USERMODE)))
 	emit_library_call (function_symbol (NULL, "__ic_invalidate",
 					    FUNCTION_ORDINARY),
 			   LCT_NORMAL, VOIDmode, 1, tramp, SImode);
@@ -11507,7 +11507,7 @@ sh_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
 	  && (! TARGET_SHCOMPACT
 	      || crtl->args.info.stack_regs == 0)
 	  && ! sh_cfun_interrupt_handler_p ()
-	  && (! flag_pic
+	  && (! GCC_OPTION (flag_pic)
 	      || (decl && ! TREE_PUBLIC (decl))
 	      || (decl && DECL_VISIBILITY (decl) != VISIBILITY_DEFAULT)));
 }
@@ -12088,7 +12088,7 @@ sh_hard_regno_mode_ok (unsigned int regno, enum machine_mode mode)
     return mode == PSImode;
 
   /* FIXME.  This works around PR target/37633 for -O0.  */
-  if (!optimize && TARGET_SHMEDIA32 && GET_MODE_SIZE (mode) > 4)
+  if (!GCC_OPTION (optimize) && TARGET_SHMEDIA32 && GET_MODE_SIZE (mode) > 4)
     {
       unsigned int n = GET_MODE_SIZE (mode) / 8;
 
@@ -12114,7 +12114,7 @@ sh_cannot_change_mode_class (enum machine_mode from, enum machine_mode to,
      on the stack with displacement addressing, as it happens with -O0.
      Thus we disallow the mode change for -O0.  */
   if (to == SFmode && VECTOR_MODE_P (from) && GET_MODE_INNER (from) == SFmode)
-    return optimize ? (reg_classes_intersect_p (GENERAL_REGS, rclass)) : false;
+    return GCC_OPTION (optimize) ? (reg_classes_intersect_p (GENERAL_REGS, rclass)) : false;
 
   if (GET_MODE_SIZE (from) != GET_MODE_SIZE (to))
     {
@@ -12180,7 +12180,7 @@ sh_register_move_cost (enum machine_mode mode,
     return 4;
 
   if (REGCLASS_HAS_FP_REG (dstclass) && srcclass == T_REGS)
-    return ((TARGET_HARD_SH4 && !optimize_size) ? 10 : 7);
+    return ((TARGET_HARD_SH4 && !GCC_OPTION (optimize_size)) ? 10 : 7);
 
   if ((REGCLASS_HAS_FP_REG (dstclass) && srcclass == MAC_REGS)
       || (dstclass == MAC_REGS && REGCLASS_HAS_FP_REG (srcclass)))
@@ -12220,8 +12220,8 @@ sh_register_move_cost (enum machine_mode mode,
   if (TARGET_SHMEDIA
       && ((srcclass) == TARGET_REGS || (srcclass) == SIBCALL_REGS))
     {
-      if (sh_gettrcost >= 0)
-	return sh_gettrcost;
+      if (GCC_OPTION (sh_gettrcost) >= 0)
+	return GCC_OPTION (sh_gettrcost);
       else if (!TARGET_PT_FIXED)
 	return 100;
     }
@@ -12394,18 +12394,18 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
   /* If the function is overridden, so is the thunk, hence we don't
      need GOT addressing even if this is a public symbol.  */
 #if 0
-  if (TARGET_SH1 && ! flag_weak)
+  if (TARGET_SH1 && ! GCC_OPTION (flag_weak))
     sibcall = gen_sibcalli_thunk (funexp, const0_rtx);
   else
 #endif
-  if (TARGET_SH2 && flag_pic)
+  if (TARGET_SH2 && GCC_OPTION (flag_pic))
     {
       sibcall = gen_sibcall_pcrel (funexp, const0_rtx);
       XEXP (XVECEXP (sibcall, 0, 2), 0) = scratch2;
     }
   else
     {
-      if (TARGET_SHMEDIA && flag_pic)
+      if (TARGET_SHMEDIA && GCC_OPTION (flag_pic))
 	{
 	  funexp = gen_sym2PIC (funexp);
 	  PUT_MODE (funexp, Pmode);
@@ -12425,7 +12425,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
 
   insns = get_insns ();
 
-  if (optimize > 0)
+  if (GCC_OPTION (optimize) > 0)
     {
       if (! cfun->cfg)
 	init_flow (cfun);
@@ -12454,7 +12454,7 @@ function_symbol (rtx target, const char *name, enum sh_function_kind kind)
     name = IDENTIFIER_POINTER (get_identifier (name));
   sym = gen_rtx_SYMBOL_REF (Pmode, name);
   SYMBOL_REF_FLAGS (sym) = SYMBOL_FLAG_FUNCTION;
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     switch (kind)
       {
       case FUNCTION_ORDINARY:
@@ -12944,7 +12944,7 @@ shmedia_prepare_call_address (rtx fnaddr, int is_sibcall)
 
   fnaddr = XEXP (fnaddr, 0);
   is_sym = GET_CODE (fnaddr) == SYMBOL_REF;
-  if (flag_pic && is_sym)
+  if (GCC_OPTION (flag_pic) && is_sym)
     {
       if (! SYMBOL_REF_LOCAL_P (fnaddr))
 	{
@@ -13163,7 +13163,7 @@ sh_conditional_register_usage (void)
       CLEAR_HARD_REG_SET (reg_class_contents[FP0_REGS]);
       regno_reg_class[FIRST_FP_REG] = FP_REGS;
     }
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;
       call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index 8819300..918677b 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -61,14 +61,14 @@ extern int code_for_indirect_jump_scratch;
 
 /* Nonzero if a double-precision FPU is available.  */
 #define TARGET_FPU_DOUBLE \
-  ((target_flags & MASK_SH4) != 0 || TARGET_SH2A_DOUBLE)
+  ((GCC_OPTION (target_flags) & MASK_SH4) != 0 || TARGET_SH2A_DOUBLE)
 
 /* Nonzero if an FPU is available.  */
 #define TARGET_FPU_ANY (TARGET_SH2E || TARGET_FPU_DOUBLE)
 
 /* Nonzero if we should generate code using type 4 insns.  */
 #undef TARGET_SH4
-#define TARGET_SH4 ((target_flags & MASK_SH4) != 0 && TARGET_SH1)
+#define TARGET_SH4 ((GCC_OPTION (target_flags) & MASK_SH4) != 0 && TARGET_SH1)
 
 /* Nonzero if we're generating code for the common subset of
    instructions present on both SH4a and SH4al-dsp.  */
@@ -885,7 +885,7 @@ extern char sh_additional_register_names[ADDREGNAMES_SIZE] \
 
 /* Register to hold the addressing base for position independent
    code access to data items.  */
-#define PIC_OFFSET_TABLE_REGNUM	(flag_pic ? PIC_REG : INVALID_REGNUM)
+#define PIC_OFFSET_TABLE_REGNUM	(GCC_OPTION (flag_pic) ? PIC_REG : INVALID_REGNUM)
 
 #define GOT_SYMBOL_NAME "*_GLOBAL_OFFSET_TABLE_"
 
@@ -1555,7 +1555,7 @@ struct sh_args {
 /* Alignment required for a trampoline in bits.  */
 #define TRAMPOLINE_ALIGNMENT \
   ((CACHE_LOG < 3 \
-    || (optimize_size && ! (TARGET_HARD_SH4 || TARGET_SH5))) ? 32 \
+    || (GCC_OPTION (optimize_size) && ! (TARGET_HARD_SH4 || TARGET_SH5))) ? 32 \
    : TARGET_SHMEDIA ? 256 : 64)
 
 /* A C expression whose value is RTL representing the value of the return
@@ -1586,11 +1586,11 @@ struct sh_args {
 
 #define MOVE_BY_PIECES_P(SIZE, ALIGN) \
   (move_by_pieces_ninsns (SIZE, ALIGN, MOVE_MAX_PIECES + 1) \
-   < (optimize_size ? 2 : ((ALIGN >= 32) ? 16 : 2)))
+   < (GCC_OPTION (optimize_size) ? 2 : ((ALIGN >= 32) ? 16 : 2)))
 
 #define STORE_BY_PIECES_P(SIZE, ALIGN) \
   (move_by_pieces_ninsns (SIZE, ALIGN, STORE_MAX_PIECES + 1) \
-   < (optimize_size ? 2 : ((ALIGN >= 32) ? 16 : 2)))
+   < (GCC_OPTION (optimize_size) ? 2 : ((ALIGN >= 32) ? 16 : 2)))
 
 #define SET_BY_PIECES_P(SIZE, ALIGN) STORE_BY_PIECES_P(SIZE, ALIGN)
 
@@ -1653,7 +1653,7 @@ struct sh_args {
   (CONSTANT_P (OP)							\
    && !CONST_INT_P (OP)							\
    && GET_CODE (OP) != CONST_DOUBLE					\
-   && (!flag_pic							\
+   && (!GCC_OPTION (flag_pic)							\
        || (LEGITIMATE_PIC_OPERAND_P (OP)				\
 	   && !PIC_ADDR_P (OP)						\
 	   && GET_CODE (OP) != LABEL_REF)))
@@ -1709,7 +1709,7 @@ struct sh_args {
    || GOTOFF_P (OP) || PIC_ADDR_P (OP))
 
 #define MOVI_SHORI_BASE_OPERAND_P(OP) \
-  (flag_pic \
+  (GCC_OPTION (flag_pic) \
    ? (GOT_ENTRY_P (OP) || GOTPLT_ENTRY_P (OP)  || GOTOFF_P (OP) \
       || PCREL_SYMOFF_P (OP)) \
    : NON_PIC_REFERENCE_P (OP))
@@ -1755,7 +1755,7 @@ struct sh_args {
 
 /* Specify the machine mode that this machine uses
    for the index in the tablejump instruction.  */
-#define CASE_VECTOR_MODE ((! optimize || TARGET_BIGTABLE) ? SImode : HImode)
+#define CASE_VECTOR_MODE ((! GCC_OPTION (optimize) || TARGET_BIGTABLE) ? SImode : HImode)
 
 #define CASE_VECTOR_SHORTEN_MODE(MIN_OFFSET, MAX_OFFSET, BODY) \
 ((MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 127 \
@@ -1931,7 +1931,7 @@ struct sh_args {
 
 /* A C expression for the cost of a branch instruction.  A value of 1
    is the default; other values are interpreted relative to that.  */
-#define BRANCH_COST(speed_p, predictable_p) sh_branch_cost
+#define BRANCH_COST(speed_p, predictable_p) GCC_OPTION (sh_branch_cost)
 
 /* Assembler output control.  */
 
@@ -2130,7 +2130,7 @@ struct sh_args {
 
 /* Output an absolute table element.  */
 #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE)  				\
-  if (! optimize || TARGET_BIGTABLE)					\
+  if (! GCC_OPTION (optimize) || TARGET_BIGTABLE)					\
     asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE)); 		\
   else									\
     asm_fprintf ((STREAM), "\t.word\t%LL%d\n", (VALUE));
@@ -2222,7 +2222,7 @@ extern int current_function_interrupt;
 
 /* Better to allocate once the maximum space for outgoing args in the
    prologue rather than duplicate around each call.  */
-#define ACCUMULATE_OUTGOING_ARGS TARGET_ACCUMULATE_OUTGOING_ARGS
+#define ACCUMULATE_OUTGOING_ARGS GCC_OPTION (TARGET_ACCUMULATE_OUTGOING_ARGS)
 
 #define NUM_MODES_FOR_MODE_SWITCHING { FP_MODE_NONE }
 
@@ -2277,8 +2277,8 @@ extern int current_function_interrupt;
 /* We have to distinguish between code and data, so that we apply
    datalabel where and only where appropriate.  Use sdataN for data.  */
 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
- ((flag_pic && (GLOBAL) ? DW_EH_PE_indirect : 0) \
-  | (flag_pic ? DW_EH_PE_pcrel : DW_EH_PE_absptr) \
+ ((GCC_OPTION (flag_pic) && (GLOBAL) ? DW_EH_PE_indirect : 0) \
+  | (GCC_OPTION (flag_pic) ? DW_EH_PE_pcrel : DW_EH_PE_absptr) \
   | ((CODE) ? 0 : (TARGET_SHMEDIA64 ? DW_EH_PE_sdata8 : DW_EH_PE_sdata4)))
 
 /* Handle special EH pointer encodings.  Absolute, pc-relative, and
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index ab1f0a5..eda3578 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -438,7 +438,7 @@
 ;; ??? using pc is not computed transitively.
 		(ne (match_dup 0) (match_dup 0))
 		(const_int 14)
-		(match_test "flag_pic")
+		(match_test "GCC_OPTION (flag_pic)")
 		(const_int 24)
 		] (const_int 16))
 	 (eq_attr "type" "jump")
@@ -451,7 +451,7 @@
 			      (symbol_ref "code_for_indirect_jump_scratch"))))
 		(cond [(eq_attr "braf_branch_p" "yes")
 		       (const_int 6)
-		       (not (match_test "flag_pic"))
+		       (not (match_test "GCC_OPTION (flag_pic)"))
 		       (const_int 10)
 		       (match_test "TARGET_SH2")
 		       (const_int 10)] (const_int 18))
@@ -460,14 +460,14 @@
 ;; ??? using pc is not computed transitively.
 		(ne (match_dup 0) (match_dup 0))
 		(const_int 12)
-		(match_test "flag_pic")
+		(match_test "GCC_OPTION (flag_pic)")
 		(const_int 22)
 		] (const_int 14))
 	 (eq_attr "type" "pt_media")
 	 (if_then_else (match_test "TARGET_SHMEDIA64")
 		       (const_int 20) (const_int 12))
 	 (and (eq_attr "type" "jump_media")
-	      (match_test "TARGET_SH5_CUT2_WORKAROUND"))
+	      (match_test "GCC_OPTION (TARGET_SH5_CUT2_WORKAROUND)"))
 	 (const_int 8)
 	 ] (if_then_else (match_test "TARGET_SHMEDIA")
 			 (const_int 4)
@@ -1082,7 +1082,7 @@
 			 (match_operand:SI 3 "arith_reg_operand" "")
 			 (match_operand:SI 4 "general_movsrc_operand" "")))
    (clobber (reg:SI T_REG))]
-  "TARGET_PRETEND_CMOVE"
+  "GCC_OPTION (TARGET_PRETEND_CMOVE)"
   "#"
   "&& 1"
   [(set (reg:SI T_REG) (lt:SI (xor:SI (match_dup 1) (match_dup 2))
@@ -1103,7 +1103,7 @@
 			 (match_operand:SI 3 "arith_reg_operand")
 			 (match_operand:SI 4 "general_movsrc_operand")))
    (clobber (reg:SI T_REG))]
-   "TARGET_PRETEND_CMOVE"
+   "GCC_OPTION (TARGET_PRETEND_CMOVE)"
    "#"
    "&& 1"
   [(set (reg:SI T_REG) (lt:SI (xor:SI (match_dup 1) (match_dup 2))
@@ -1160,7 +1160,7 @@
 		      (pc)))
    (clobber (match_dup 4))
    (clobber (reg:SI T_REG))]
-  "TARGET_CBRANCHDI4 || TARGET_SH2 || TARGET_SHMEDIA"
+  "GCC_OPTION (TARGET_CBRANCHDI4) || TARGET_SH2 || TARGET_SHMEDIA"
 {
   enum rtx_code comparison;
 
@@ -1170,7 +1170,7 @@
 					     operands[2], operands[3]));
       DONE;
     }
-  else if (!TARGET_CBRANCHDI4)
+  else if (!GCC_OPTION (TARGET_CBRANCHDI4))
     {
       sh_emit_compare_and_branch (operands, DImode);
       DONE;
@@ -1198,7 +1198,7 @@
 		      (pc)))
    (clobber (match_scratch:SI 4 "=X,&r"))
    (clobber (reg:SI T_REG))]
-  "TARGET_CBRANCHDI4"
+  "GCC_OPTION (TARGET_CBRANCHDI4)"
   "#"
   "&& reload_completed"
   [(pc)]
@@ -1255,7 +1255,7 @@
 ;; If we applied this split when not optimizing, it would only be
 ;; applied during the machine-dependent reorg, when no new basic blocks
 ;; may be created.
-  "TARGET_SH1 && reload_completed && optimize"
+  "TARGET_SH1 && reload_completed && GCC_OPTION (optimize)"
   [(set (reg:SI T_REG) (eq:SI (match_dup 2) (match_dup 3)))
    (set (pc) (if_then_else (eq (reg:SI T_REG) (const_int 0))
 			   (label_ref (match_dup 6))
@@ -1647,7 +1647,7 @@
 	(if_then_else (eq (reg:SI T_REG) (const_int 0))
 		      (match_operand:SI 1 "general_movsrc_operand" "r,I08")
 		      (match_operand:SI 2 "arith_reg_operand" "0,0")))]
-  "TARGET_PRETEND_CMOVE
+  "GCC_OPTION (TARGET_PRETEND_CMOVE)
    && (arith_reg_operand (operands[1], SImode)
        || (immediate_operand (operands[1], SImode)
 	   && satisfies_constraint_I08 (operands[1])))"
@@ -1664,7 +1664,7 @@
 	(if_then_else (ne (reg:SI T_REG) (const_int 0))
 		      (match_operand:SI 1 "general_movsrc_operand" "r,I08")
 		      (match_operand:SI 2 "arith_reg_operand" "0,0")))]
-  "TARGET_PRETEND_CMOVE
+  "GCC_OPTION (TARGET_PRETEND_CMOVE)
    && (arith_reg_operand (operands[1], SImode)
        || (immediate_operand (operands[1], SImode)
 	   && satisfies_constraint_I08 (operands[1])))"
@@ -1681,7 +1681,7 @@
 	(if_then_else:SI (match_operand 1 "comparison_operator" "")
 			 (match_operand:SI 2 "arith_reg_or_0_operand" "")
 			 (match_operand:SI 3 "arith_reg_operand" "")))]
-  "TARGET_SHMEDIA || TARGET_PRETEND_CMOVE"
+  "TARGET_SHMEDIA || GCC_OPTION (TARGET_PRETEND_CMOVE)"
 {
   if ((GET_CODE (operands[1]) == EQ || GET_CODE (operands[1]) == NE)
       && GET_MODE (XEXP (operands[1], 0)) == SImode
@@ -1691,7 +1691,7 @@
       && XEXP (operands[1], 1) == const0_rtx)
     ;
 
-  else if (TARGET_PRETEND_CMOVE)
+  else if (GCC_OPTION (TARGET_PRETEND_CMOVE))
     {
       enum rtx_code code = GET_CODE (operands[1]);
       enum rtx_code new_code = code;
@@ -2606,7 +2606,7 @@
   "&& (reload_in_progress || reload_completed)"
   [(pc)]
 {
-  const char *name = sh_divsi3_libfunc;
+  const char *name = GCC_OPTION (sh_divsi3_libfunc);
   enum sh_function_kind kind = SFUNC_GOT;
   rtx sym;
 
@@ -2706,12 +2706,12 @@
   /* Emit the move of the address to a pseudo outside of the libcall.  */
   if (TARGET_DIVIDE_CALL_TABLE)
     {
-      function_symbol (operands[3], sh_divsi3_libfunc, SFUNC_GOT);
+      function_symbol (operands[3], GCC_OPTION (sh_divsi3_libfunc), SFUNC_GOT);
       last = gen_divsi3_i4_int (operands[0], operands[3]);
     }
   else if (TARGET_DIVIDE_CALL_FP)
     {
-      function_symbol (operands[3], sh_divsi3_libfunc, SFUNC_STATIC);
+      function_symbol (operands[3], GCC_OPTION (sh_divsi3_libfunc), SFUNC_STATIC);
       if (TARGET_FPU_SINGLE)
 	last = gen_divsi3_i4_single (operands[0], operands[3]);
       else
@@ -2756,7 +2756,7 @@
 	dividend = force_reg (SImode, dividend);
       if (! arith_reg_operand (divisor, SImode))
 	divisor = force_reg (SImode, divisor);
-      if (flag_pic && Pmode != DImode)
+      if (GCC_OPTION (flag_pic) && Pmode != DImode)
 	{
 	  tab_base = gen_rtx_SYMBOL_REF (Pmode, "__div_table");
 	  tab_base = gen_datalabel_ref (tab_base);
@@ -2820,11 +2820,11 @@
 	  emit_move_insn (gen_rtx_REG (Pmode, R20_REG), tab_base);
 	}
       if (TARGET_FPU_ANY && TARGET_SH1)
-	function_symbol (operands[3], sh_divsi3_libfunc, SFUNC_STATIC);
+	function_symbol (operands[3], GCC_OPTION (sh_divsi3_libfunc), SFUNC_STATIC);
       else if (TARGET_DIVIDE_CALL2)
 	function_symbol (operands[3], "__sdivsi3_2", SFUNC_STATIC);
       else
-	function_symbol (operands[3], sh_divsi3_libfunc, SFUNC_GOT);
+	function_symbol (operands[3], GCC_OPTION (sh_divsi3_libfunc), SFUNC_GOT);
 
       if (TARGET_SHMEDIA)
 	last = ((TARGET_DIVIDE_CALL2 ? gen_divsi3_media_2 : gen_divsi3_i1_media)
@@ -2836,7 +2836,7 @@
     }
   else
     {
-      function_symbol (operands[3], sh_divsi3_libfunc, SFUNC_GOT);
+      function_symbol (operands[3], GCC_OPTION (sh_divsi3_libfunc), SFUNC_GOT);
       last = gen_divsi3_i1 (operands[0], operands[3]);
     }
   emit_move_insn (gen_rtx_REG (SImode, 4), operands[1]);
@@ -5726,7 +5726,7 @@ label:
 	  (eq:SI (reg:SI T_REG) (match_operand:SI 3 "const_int_operand" "M,N"))
 	  (match_operand:SI 1 "arith_reg_operand" "0,0")
 	  (neg:SI (match_operand:SI 2 "arith_reg_operand" "r,r"))))]
-  "TARGET_SH1 && TARGET_ZDCBRANCH"
+  "TARGET_SH1 && GCC_OPTION (TARGET_ZDCBRANCH)"
 {
   static const char* alt[] =
   {
@@ -5740,7 +5740,7 @@ label:
   };
   return alt[which_alternative];
 }
-  "TARGET_SH1 && ! TARGET_ZDCBRANCH"
+  "TARGET_SH1 && ! GCC_OPTION (TARGET_ZDCBRANCH)"
   [(const_int 0)]
 {
   rtx skip_neg_label = gen_label_rtx ();
@@ -6828,7 +6828,7 @@ label:
   [(set (match_operand:SI 0 "arith_reg_operand" "=r")
 	(const:SI (unspec:SI [(match_operand:DI 1 "immediate_operand" "s")
 			      (const_int 0)] UNSPEC_EXTRACT_S16)))]
-  "TARGET_SHMEDIA && flag_pic && reload_completed
+  "TARGET_SHMEDIA && GCC_OPTION (flag_pic) && reload_completed
    && GET_CODE (operands[1]) == SYMBOL_REF"
   "")
 
@@ -6881,7 +6881,7 @@ label:
       emit_insn (gen_ic_invalidate_line_compact (operands[0], operands[1]));
       DONE;
     }
-  else if (TARGET_SH4A_ARCH || TARGET_SH4_300)
+  else if (TARGET_SH4A_ARCH || GCC_OPTION (TARGET_SH4_300))
     {
       emit_insn (gen_ic_invalidate_line_sh4a (operands[0]));
       DONE;
@@ -6914,7 +6914,7 @@ label:
 (define_insn "ic_invalidate_line_sh4a"
   [(unspec_volatile [(match_operand:SI 0 "register_operand" "r")]
 		    UNSPEC_ICACHE)]
-  "TARGET_SH4A_ARCH || TARGET_SH4_300"
+  "TARGET_SH4A_ARCH || GCC_OPTION (TARGET_SH4_300)"
 {
   return       "ocbwb	@%0"	"\n"
 	 "	synco"		"\n"
@@ -7340,7 +7340,7 @@ label:
   [(set (match_operand:DI 0 "arith_reg_operand" "=r")
 	(const:DI (unspec:DI [(match_operand:DI 1 "immediate_operand" "s")
 			      (const_int 0)] UNSPEC_EXTRACT_S16)))]
-  "TARGET_SHMEDIA && flag_pic && reload_completed
+  "TARGET_SHMEDIA && GCC_OPTION (flag_pic) && reload_completed
    && GET_CODE (operands[1]) == SYMBOL_REF"
   "")
 
@@ -9150,7 +9150,7 @@ label:
       rtx func = XEXP (operands[0], 0);
       rtx r0, r1;
 
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	{
 	  if (GET_CODE (func) == SYMBOL_REF && ! SYMBOL_REF_LOCAL_P (func))
 	    {
@@ -9187,7 +9187,7 @@ label:
 
       DONE;
     }
-  else if (TARGET_SHCOMPACT && flag_pic
+  else if (TARGET_SHCOMPACT && GCC_OPTION (flag_pic)
 	   && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF
 	   && ! SYMBOL_REF_LOCAL_P (XEXP (operands[0], 0)))
     {
@@ -9196,7 +9196,7 @@ label:
       emit_insn (gen_symGOTPLT2reg (reg, XEXP (operands[0], 0)));
       XEXP (operands[0], 0) = reg;
     }
-  if (!flag_pic && TARGET_SH2A
+  if (!GCC_OPTION (flag_pic) && TARGET_SH2A
       && MEM_P (operands[0])
       && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
     {
@@ -9207,7 +9207,7 @@ label:
 	  DONE;
 	}
     }
-  if (flag_pic && TARGET_SH2
+  if (GCC_OPTION (flag_pic) && TARGET_SH2
       && MEM_P (operands[0])
       && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
     {
@@ -9279,7 +9279,7 @@ label:
   cookie = INTVAL (cookie_rtx);
   func = XEXP (operands[0], 0);
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       if (GET_CODE (func) == SYMBOL_REF && ! SYMBOL_REF_LOCAL_P (func))
 	{
@@ -9339,7 +9339,7 @@ label:
       rtx func = XEXP (operands[1], 0);
       rtx r0, r1;
 
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	{
 	  if (GET_CODE (func) == SYMBOL_REF && ! SYMBOL_REF_LOCAL_P (func))
 	    {
@@ -9378,7 +9378,7 @@ label:
 
       DONE;
     }
-  else if (TARGET_SHCOMPACT && flag_pic
+  else if (TARGET_SHCOMPACT && GCC_OPTION (flag_pic)
 	   && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF
 	   && ! SYMBOL_REF_LOCAL_P (XEXP (operands[1], 0)))
     {
@@ -9387,7 +9387,7 @@ label:
       emit_insn (gen_symGOTPLT2reg (reg, XEXP (operands[1], 0)));
       XEXP (operands[1], 0) = reg;
     }
-  if (!flag_pic && TARGET_SH2A
+  if (!GCC_OPTION (flag_pic) && TARGET_SH2A
       && MEM_P (operands[1])
       && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
     {
@@ -9398,7 +9398,7 @@ label:
 	  DONE;
 	}
     }
-  if (flag_pic && TARGET_SH2
+  if (GCC_OPTION (flag_pic) && TARGET_SH2
       && MEM_P (operands[1])
       && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
     {
@@ -9543,7 +9543,7 @@ label:
       rtx func = XEXP (operands[0], 0);
       rtx mach, r1;
 
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	{
 	  if (GET_CODE (func) == SYMBOL_REF && ! SYMBOL_REF_LOCAL_P (func))
 	    {
@@ -9591,7 +9591,7 @@ label:
       emit_call_insn (gen_sibcall_compact (operands[0], operands[1], mach));
       DONE;
     }
-  else if (TARGET_SHCOMPACT && flag_pic
+  else if (TARGET_SHCOMPACT && GCC_OPTION (flag_pic)
 	   && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF
 	   && ! SYMBOL_REF_LOCAL_P (XEXP (operands[0], 0)))
     {
@@ -9600,7 +9600,7 @@ label:
       emit_insn (gen_symGOT2reg (reg, XEXP (operands[0], 0)));
       XEXP (operands[0], 0) = reg;
     }
-  if (flag_pic && TARGET_SH2
+  if (GCC_OPTION (flag_pic) && TARGET_SH2
       && MEM_P (operands[0])
       && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF
       /* The PLT needs the PIC register, but the epilogue would have
@@ -9741,7 +9741,7 @@ label:
       rtx func = XEXP (operands[1], 0);
       rtx mach, r1;
 
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	{
 	  if (GET_CODE (func) == SYMBOL_REF && ! SYMBOL_REF_LOCAL_P (func))
 	    {
@@ -9790,7 +9790,7 @@ label:
 						 operands[2], mach));
       DONE;
     }
-  else if (TARGET_SHCOMPACT && flag_pic
+  else if (TARGET_SHCOMPACT && GCC_OPTION (flag_pic)
 	   && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF
 	   && ! SYMBOL_REF_LOCAL_P (XEXP (operands[1], 0)))
     {
@@ -9799,7 +9799,7 @@ label:
       emit_insn (gen_symGOT2reg (reg, XEXP (operands[1], 0)));
       XEXP (operands[1], 0) = reg;
     }
-  if (flag_pic && TARGET_SH2
+  if (GCC_OPTION (flag_pic) && TARGET_SH2
       && MEM_P (operands[1])
       && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF
       /* The PLT needs the PIC register, but the epilogue would have
@@ -9877,7 +9877,7 @@ label:
   cookie = INTVAL (cookie_rtx);
   func = XEXP (operands[1], 0);
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       if (GET_CODE (func) == SYMBOL_REF && ! SYMBOL_REF_LOCAL_P (func))
 	{
@@ -10130,7 +10130,7 @@ label:
   [(set (match_operand 0 "target_reg_operand" "=b")
 	(const (unspec [(match_operand 1 "" "Csy")]
 			     UNSPEC_DATALABEL)))]
-  "TARGET_SHMEDIA && flag_pic
+  "TARGET_SHMEDIA && GCC_OPTION (flag_pic)
    && satisfies_constraint_Csy (operands[1])"
   "ptb/u	datalabel %1, %0"
   [(set_attr "type" "ptabs_media")
@@ -10156,7 +10156,7 @@ label:
 
 (define_expand "builtin_setjmp_receiver"
   [(match_operand 0 "" "")]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
 {
   emit_insn (gen_GOTaddr2picreg ());
   DONE;
@@ -10211,14 +10211,14 @@ label:
 
       if (Pmode == DImode)
 	{      
-	  if (flag_pic > 1)
+	  if (GCC_OPTION (flag_pic) > 1)
 	    emit_insn (gen_movdi_const_32bit (reg, operands[1]));
 	  else
 	    emit_insn (gen_movdi_const_16bit (reg, operands[1]));
 	}
       else
 	{
-	  if (flag_pic > 1)
+	  if (GCC_OPTION (flag_pic) > 1)
 	    emit_insn (gen_movsi_const (reg, operands[1]));
 	  else
 	    emit_insn (gen_movsi_const_16bit (reg, operands[1]));
@@ -10233,7 +10233,7 @@ label:
      when rX is a GOT address for the guard symbol.  Ugly but doesn't
      matter because this is a rare situation.  */
   if (!TARGET_SHMEDIA
-      && flag_stack_protect
+      && GCC_OPTION (flag_stack_protect)
       && GET_CODE (operands[1]) == CONST
       && GET_CODE (XEXP (operands[1], 0)) == UNSPEC
       && GET_CODE (XVECEXP (XEXP (operands[1], 0), 0, 0)) == SYMBOL_REF
@@ -10838,7 +10838,7 @@ label:
 		    (label_ref (match_operand 2 "" ""))
 		    (label_ref (match_operand 3 "" ""))] UNSPEC_CASESI))
    (clobber (match_operand:SI 4 "" "=X,1"))]
-  "TARGET_SH2 && reload_completed && flag_pic"
+  "TARGET_SH2 && reload_completed && GCC_OPTION (flag_pic)"
 {
   rtx diff_vec = PATTERN (NEXT_INSN (operands[2]));
   gcc_assert (GET_CODE (diff_vec) == ADDR_DIFF_VEC);
@@ -11613,7 +11613,7 @@ label:
 	(and:SI (plus:SI (match_operand:SI 1 "t_reg_operand")
 			 (const_int -1))
 		(match_operand:SI 2 "arith_reg_operand" "0")))]
-  "TARGET_SH1 && TARGET_ZDCBRANCH"
+  "TARGET_SH1 && GCC_OPTION (TARGET_ZDCBRANCH)"
 {
   return       "bf	0f"	"\n"
 	 "	mov	#0,%0"	"\n"
@@ -11627,7 +11627,7 @@ label:
 	(if_then_else:SI (match_operand:SI 1 "t_reg_operand")
 			 (match_operand:SI 2 "arith_reg_operand" "0")
 			 (const_int 0)))]
-  "TARGET_SH1 && TARGET_ZDCBRANCH"
+  "TARGET_SH1 && GCC_OPTION (TARGET_ZDCBRANCH)"
 {
   return       "bt	0f"	"\n"
 	 "	mov	#0,%0"	"\n"
@@ -12053,7 +12053,7 @@ label:
 	(compare:SI (match_operand:BLK 1 "memory_operand")
 		    (match_operand:BLK 2 "memory_operand")))
    (use (match_operand 3 "immediate_operand"))]
-  "TARGET_SH1 && optimize"
+  "TARGET_SH1 && GCC_OPTION (optimize)"
 {
   if (! optimize_insn_for_size_p () && sh_expand_cmpstr (operands))
     DONE;
@@ -12067,7 +12067,7 @@ label:
 		    (match_operand:BLK 2 "memory_operand")))
    (use (match_operand:SI 3 "immediate_operand"))
    (use (match_operand:SI 4 "immediate_operand"))]
-  "TARGET_SH1 && optimize"
+  "TARGET_SH1 && GCC_OPTION (optimize)"
 {
   if (! optimize_insn_for_size_p () && sh_expand_cmpnstr (operands))
     DONE;
@@ -12081,7 +12081,7 @@ label:
 		   (match_operand:SI 2 "immediate_operand")
 		   (match_operand:SI 3 "immediate_operand")]
 		  UNSPEC_BUILTIN_STRLEN))]
-  "TARGET_SH1 && optimize"
+  "TARGET_SH1 && GCC_OPTION (optimize)"
 {
  if (! optimize_insn_for_size_p () && sh_expand_strlen (operands))
    DONE;
@@ -12152,7 +12152,7 @@ label:
   [(set (reg:PSI FPSCR_REG)
 	(mem:PSI (match_operand:SI 0 "register_operand" "")))]
   "(TARGET_SH4 || TARGET_SH2A_DOUBLE)
-   && (flag_peephole2 ? epilogue_completed : reload_completed)"
+   && (GCC_OPTION (flag_peephole2) ? epilogue_completed : reload_completed)"
   [(const_int 0)]
 {
   rtx fpscr, mem, new_insn;
@@ -12415,7 +12415,7 @@ label:
 			  (match_operand:SF 2 "fp_arith_reg_operand" "f"))
 		 (match_operand:SF 3 "arith_reg_operand" "0")))
    (use (match_operand:PSI 4 "fpscr_operand"))]
-  "TARGET_SH2E && flag_fp_contract_mode != FP_CONTRACT_OFF"
+  "TARGET_SH2E && GCC_OPTION (flag_fp_contract_mode) != FP_CONTRACT_OFF"
   "fmac	%1,%2,%0"
   "&& can_create_pseudo_p ()"
   [(parallel [(set (match_dup 0)
@@ -12439,7 +12439,7 @@ label:
 	(plus:SF (mult:SF (match_operand:SF 1 "fp_arith_reg_operand" "%f")
 			  (match_operand:SF 2 "fp_arith_reg_operand" "f"))
 		 (match_operand:SF 3 "fp_arith_reg_operand" "0")))]
-  "TARGET_SHMEDIA_FPU && flag_fp_contract_mode != FP_CONTRACT_OFF"
+  "TARGET_SHMEDIA_FPU && GCC_OPTION (flag_fp_contract_mode) != FP_CONTRACT_OFF"
   "fmac.s %1, %2, %0"
   [(set_attr "type" "fparith_media")])
 
@@ -12605,7 +12605,7 @@ label:
 	(ior:SI (reg:SI T_REG)
 		(eq:SI (match_operand:SF 0 "fp_arith_reg_operand" "f")
 		       (match_operand:SF 1 "fp_arith_reg_operand" "f"))))]
-  "TARGET_SH2E && TARGET_IEEE && ! (TARGET_SH4 || TARGET_SH2A_SINGLE)"
+  "TARGET_SH2E && GCC_OPTION (TARGET_IEEE) && ! (TARGET_SH4 || TARGET_SH2A_SINGLE)"
 {
   return output_ieee_ccmpeq (insn, operands);
 }
@@ -12638,7 +12638,7 @@ label:
 		(eq:SI (match_operand:SF 0 "fp_arith_reg_operand" "f")
 		       (match_operand:SF 1 "fp_arith_reg_operand" "f"))))
    (use (match_operand:PSI 2 "fpscr_operand" "c"))]
-  "TARGET_IEEE && (TARGET_SH4 || TARGET_SH2A_SINGLE)"
+  "GCC_OPTION (TARGET_IEEE) && (TARGET_SH4 || TARGET_SH2A_SINGLE)"
 {
   return output_ieee_ccmpeq (insn, operands);
 }
@@ -12755,7 +12755,7 @@ label:
 	(div:SF (match_operand:SF 1 "immediate_operand" "i")
 		(sqrt:SF (match_operand:SF 2 "fp_arith_reg_operand" "0"))))
    (use (match_operand:PSI 3 "fpscr_operand" "c"))]
-  "TARGET_FPU_ANY && TARGET_FSRRA
+  "TARGET_FPU_ANY && GCC_OPTION (TARGET_FSRRA)
    && operands[1] == CONST1_RTX (SFmode)"
   "fsrra	%0"
   [(set_attr "type" "fsrra")
@@ -12769,7 +12769,7 @@ label:
 	(unspec:SF [(match_operand:SF 2 "fp_arith_reg_operand")] UNSPEC_FCOSA))
    (set (match_operand:SF 1 "nonimmediate_operand")
 	(unspec:SF [(match_dup 2)] UNSPEC_FSINA))]
-  "TARGET_FPU_ANY && TARGET_FSCA"
+  "TARGET_FPU_ANY && GCC_OPTION (TARGET_FSCA)"
 {
   rtx scaled = gen_reg_rtx (SFmode);
   rtx truncated = gen_reg_rtx (SImode);
@@ -12796,7 +12796,7 @@ label:
 	 (unspec:SF [(mult:SF (float:SF (match_dup 1)) (match_dup 2))
 		    ] UNSPEC_FCOSA)))
    (use (match_operand:PSI 3 "fpscr_operand" "c"))]
-  "TARGET_FPU_ANY && TARGET_FSCA"
+  "TARGET_FPU_ANY && GCC_OPTION (TARGET_FSCA)"
   "fsca	fpul,%d0"
   "&& !fpul_operand (operands[1], SImode)"
   [(const_int 0)]
@@ -13091,7 +13091,7 @@ label:
 		(eq:SI (match_operand:DF 0 "fp_arith_reg_operand" "f")
 		       (match_operand:DF 1 "fp_arith_reg_operand" "f"))))
    (use (match_operand:PSI 2 "fpscr_operand" "c"))]
-  "TARGET_IEEE && (TARGET_SH4 || TARGET_SH2A_DOUBLE)"
+  "GCC_OPTION (TARGET_IEEE) && (TARGET_SH4 || TARGET_SH2A_DOUBLE)"
 {
   return output_ieee_ccmpeq (insn, operands);
 }
diff --git a/gcc/config/sh/sh_optimize_sett_clrt.cc b/gcc/config/sh/sh_optimize_sett_clrt.cc
index 313e5b5..cbbe3d3 100644
--- a/gcc/config/sh/sh_optimize_sett_clrt.cc
+++ b/gcc/config/sh/sh_optimize_sett_clrt.cc
@@ -164,7 +164,7 @@ sh_optimize_sett_clrt::~sh_optimize_sett_clrt (void)
 bool
 sh_optimize_sett_clrt::gate (void)
 {
-  return optimize > 0;
+  return GCC_OPTION (optimize) > 0;
 }
 
 unsigned int
diff --git a/gcc/config/sh/sh_treg_combine.cc b/gcc/config/sh/sh_treg_combine.cc
index e736040..1bef6e8 100644
--- a/gcc/config/sh/sh_treg_combine.cc
+++ b/gcc/config/sh/sh_treg_combine.cc
@@ -1438,7 +1438,7 @@ sh_treg_combine::try_optimize_cbranch (rtx insn)
 bool
 sh_treg_combine::gate (void)
 {
-  return optimize > 0;
+  return GCC_OPTION (optimize) > 0;
 }
 
 unsigned int
diff --git a/gcc/config/sh/sync.md b/gcc/config/sh/sync.md
index a0a22a1..f9c1af8 100644
--- a/gcc/config/sh/sync.md
+++ b/gcc/config/sh/sync.md
@@ -1250,11 +1250,11 @@
   [(match_operand:SI 0 "register_operand" "")		;; bool result output
    (match_operand:QI 1 "memory_operand" "")		;; memory
    (match_operand:SI 2 "const_int_operand" "")]		;; model
-  "(TARGET_ATOMIC_ANY || TARGET_ENABLE_TAS) && !TARGET_SHMEDIA"
+  "(TARGET_ATOMIC_ANY || GCC_OPTION (TARGET_ENABLE_TAS)) && !TARGET_SHMEDIA"
 {
   rtx addr = force_reg (Pmode, XEXP (operands[1], 0));
 
-  if (TARGET_ENABLE_TAS)
+  if (GCC_OPTION (TARGET_ENABLE_TAS))
     emit_insn (gen_tasb (addr));
   else
     {
@@ -1287,7 +1287,7 @@
 	       (const_int 0)))
    (set (mem:QI (match_dup 0))
 	(unspec:QI [(const_int 128)] UNSPEC_ATOMIC))]
-  "TARGET_ENABLE_TAS && !TARGET_SHMEDIA"
+  "GCC_OPTION (TARGET_ENABLE_TAS) && !TARGET_SHMEDIA"
   "tas.b	@%0"
   [(set_attr "insn_class" "co_group")])
 
@@ -1300,7 +1300,7 @@
    (clobber (match_scratch:QI 2 "=&u"))
    (clobber (reg:SI R0_REG))
    (clobber (reg:SI R1_REG))]
-  "TARGET_ATOMIC_SOFT_GUSA && !TARGET_ENABLE_TAS"
+  "TARGET_ATOMIC_SOFT_GUSA && !GCC_OPTION (TARGET_ENABLE_TAS)"
 {
   return "\r	mova	1f,r0"		"\n"
 	 "	.align 2"		"\n"
@@ -1323,7 +1323,7 @@
    (clobber (match_scratch:QI 3 "=&r"))
    (clobber (reg:SI R0_REG))
    (clobber (reg:SI R1_REG))]
-  "TARGET_ATOMIC_SOFT_TCB && !TARGET_ENABLE_TAS"
+  "TARGET_ATOMIC_SOFT_TCB && !GCC_OPTION (TARGET_ENABLE_TAS)"
 {
   return "\r	mova	1f,r0"		"\n"
 	 "	mov	#(0f-1f),r1"	"\n"
@@ -1345,7 +1345,7 @@
 	(unspec:QI [(match_operand:QI 1 "register_operand" "r")] UNSPEC_ATOMIC))
    (clobber (match_scratch:SI 2 "=&r"))
    (clobber (reg:SI R0_REG))]
-  "TARGET_ATOMIC_SOFT_IMASK && !TARGET_ENABLE_TAS"
+  "TARGET_ATOMIC_SOFT_IMASK && !GCC_OPTION (TARGET_ENABLE_TAS)"
 {
   return "\r	stc	sr,r0"		"\n"
 	 "	mov	r0,%2"		"\n"
@@ -1368,7 +1368,7 @@
    (clobber (match_scratch:SI 2 "=&r"))
    (clobber (match_scratch:SI 3 "=&r"))
    (clobber (match_scratch:SI 4 "=0"))]
-  "TARGET_ATOMIC_HARD_LLCS && !TARGET_ENABLE_TAS"
+  "TARGET_ATOMIC_HARD_LLCS && !GCC_OPTION (TARGET_ENABLE_TAS)"
 {
   return "\r	mov	#-4,%2"		"\n"
 	 "	and	%0,%2"		"\n"
diff --git a/gcc/config/sh/vxworks.h b/gcc/config/sh/vxworks.h
index 15dae73..ff10156 100644
--- a/gcc/config/sh/vxworks.h
+++ b/gcc/config/sh/vxworks.h
@@ -39,7 +39,7 @@ along with GCC; see the file COPYING3.  If not see
 	 linked with --emit-relocs).  No relaxation relocations	\
 	 appear in shared libraries, so relaxation is OK	\
 	 for RTP PIC.  */					\
-      if (TARGET_RELAX && !(TARGET_VXWORKS_RTP && flag_pic))	\
+      if (TARGET_RELAX && !(TARGET_VXWORKS_RTP && GCC_OPTION (flag_pic)))	\
 	error ("-mrelax is only supported for RTP PIC");	\
     }								\
   while (0)
diff --git a/gcc/config/sol2.c b/gcc/config/sol2.c
index d07a941..f086c58 100644
--- a/gcc/config/sol2.c
+++ b/gcc/config/sol2.c
@@ -296,5 +296,5 @@ solaris_override_options (void)
   /* Older versions of Solaris ld cannot handle CIE version 3 in .eh_frame.
      Don't emit DWARF3/4 unless specifically selected if so.  */
   if (!HAVE_LD_EH_FRAME_CIEV3 && !global_options_set.x_dwarf_version)
-    dwarf_version = 2;
+    GCC_OPTION (dwarf_version) = 2;
 }
diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h
index 2a657db..9116c31 100644
--- a/gcc/config/sol2.h
+++ b/gcc/config/sol2.h
@@ -244,7 +244,7 @@ along with GCC; see the file COPYING3.  If not see
 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL)		\
   do								\
     {								\
-      if (!flag_inhibit_size_directive)				\
+      if (!GCC_OPTION (flag_inhibit_size_directive))				\
 	ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME);			\
       solaris_output_init_fini (FILE, DECL);			\
     }								\
diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h
index b50a937..76bfa10 100644
--- a/gcc/config/sparc/sol2.h
+++ b/gcc/config/sparc/sol2.h
@@ -46,7 +46,7 @@ along with GCC; see the file COPYING3.  If not see
    relocs properly, so force them to be aligned.  */
 #ifndef HAVE_AS_SPARC_UA_PCREL
 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)		\
-  ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr)
+  ((GCC_OPTION (flag_pic) || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr)
 #endif
 
 
@@ -339,7 +339,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
 	ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");	\
 								\
       size_directive_output = 0;				\
-      if (!flag_inhibit_size_directive				\
+      if (!GCC_OPTION (flag_inhibit_size_directive)				\
 	  && (DECL) && DECL_SIZE (DECL))			\
 	{							\
 	  size_directive_output = 1;				\
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index f52b976..5c8d002 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -444,7 +444,7 @@ static const struct processor_costs *sparc_costs = &cypress_costs;
 #define LEAF_SIBCALL_SLOT_RESERVED_P 1
 #else
 #define LEAF_SIBCALL_SLOT_RESERVED_P \
-  ((TARGET_ARCH64 && !TARGET_CM_MEDLOW) || flag_pic)
+  ((TARGET_ARCH64 && !TARGET_CM_MEDLOW) || GCC_OPTION (flag_pic))
 #endif
 
 /* Vector to say how input registers are mapped to output registers.
@@ -875,7 +875,7 @@ static bool
 sparc_gate_work_around_errata (void)
 {
   /* The only errata we handle are those of the AT697F and UT699.  */
-  return sparc_fix_at697f != 0 || sparc_fix_ut699 != 0;
+  return GCC_OPTION (sparc_fix_at697f) != 0 || GCC_OPTION (sparc_fix_ut699) != 0;
 }
 
 static unsigned int
@@ -897,7 +897,7 @@ sparc_do_work_around_errata (void)
 	insn = XVECEXP (PATTERN (insn), 0, 1);
 
       /* Look for a single-word load into an odd-numbered FP register.  */
-      if (sparc_fix_at697f
+      if (GCC_OPTION (sparc_fix_at697f)
 	  && NONJUMP_INSN_P (insn)
 	  && (set = single_set (insn)) != NULL_RTX
 	  && GET_MODE_SIZE (GET_MODE (SET_SRC (set))) == 4
@@ -967,7 +967,7 @@ sparc_do_work_around_errata (void)
 	}
 
       /* Look for a single-word load into an integer register.  */
-      else if (sparc_fix_ut699
+      else if (GCC_OPTION (sparc_fix_ut699)
 	       && NONJUMP_INSN_P (insn)
 	       && (set = single_set (insn)) != NULL_RTX
 	       && GET_MODE_SIZE (GET_MODE (SET_SRC (set))) <= 4
@@ -1013,7 +1013,7 @@ sparc_do_work_around_errata (void)
 	}
 
       /* Look for a single-word load/operation into an FP register.  */
-      else if (sparc_fix_ut699
+      else if (GCC_OPTION (sparc_fix_ut699)
 	       && NONJUMP_INSN_P (insn)
 	       && (set = single_set (insn)) != NULL_RTX
 	       && GET_MODE_SIZE (GET_MODE (SET_SRC (set))) == 4
@@ -1309,12 +1309,12 @@ sparc_option_override (void)
   unsigned int i;
   int fpu;
 
-  if (sparc_debug_string != NULL)
+  if (GCC_OPTION (sparc_debug_string) != NULL)
     {
       const char *q;
       char *p;
 
-      p = ASTRDUP (sparc_debug_string);
+      p = ASTRDUP (GCC_OPTION (sparc_debug_string));
       while ((q = strtok (p, ",")) != NULL)
 	{
 	  bool invert;
@@ -1337,15 +1337,15 @@ sparc_option_override (void)
 	    error ("unknown -mdebug-%s switch", q);
 
 	  if (invert)
-	    sparc_debug &= ~mask;
+	    GCC_OPTION (sparc_debug) &= ~mask;
 	  else
-	    sparc_debug |= mask;
+	    GCC_OPTION (sparc_debug) |= mask;
 	}
     }
 
   if (TARGET_DEBUG_OPTIONS)
     {
-      dump_target_flags("Initial target_flags", target_flags);
+      dump_target_flags("Initial target_flags", GCC_OPTION (target_flags));
       dump_target_flags("target_flags_explicit", target_flags_explicit);
     }
 
@@ -1364,7 +1364,7 @@ sparc_option_override (void)
   if (TARGET_64BIT && ! TARGET_LONG_DOUBLE_128)
     {
       error ("-mlong-double-64 not allowed with -m64");
-      target_flags |= MASK_LONG_DOUBLE_128;
+      GCC_OPTION (target_flags) |= MASK_LONG_DOUBLE_128;
     }
 
   /* Code model selection.  */
@@ -1375,15 +1375,15 @@ sparc_option_override (void)
     sparc_cmodel = CM_32;
 #endif
 
-  if (sparc_cmodel_string != NULL)
+  if (GCC_OPTION (sparc_cmodel_string) != NULL)
     {
       if (TARGET_ARCH64)
 	{
 	  for (cmodel = &cmodels[0]; cmodel->name; cmodel++)
-	    if (strcmp (sparc_cmodel_string, cmodel->name) == 0)
+	    if (strcmp (GCC_OPTION (sparc_cmodel_string), cmodel->name) == 0)
 	      break;
 	  if (cmodel->name == NULL)
-	    error ("bad value (%s) for -mcmodel= switch", sparc_cmodel_string);
+	    error ("bad value (%s) for -mcmodel= switch", GCC_OPTION (sparc_cmodel_string));
 	  else
 	    sparc_cmodel = cmodel->value;
 	}
@@ -1399,7 +1399,7 @@ sparc_option_override (void)
         call_used_regs [i] = 1;
       }
 
-  fpu = target_flags & MASK_FPU; /* save current -mfpu status */
+  fpu = GCC_OPTION (target_flags) & MASK_FPU; /* save current -mfpu status */
 
   /* Set the default CPU.  */
   if (!global_options_set.x_sparc_cpu_and_features)
@@ -1408,25 +1408,25 @@ sparc_option_override (void)
 	if (def->cpu == TARGET_CPU_DEFAULT)
 	  break;
       gcc_assert (def->cpu != -1);
-      sparc_cpu_and_features = def->processor;
+      GCC_OPTION (sparc_cpu_and_features) = def->processor;
     }
 
   if (!global_options_set.x_sparc_cpu)
-    sparc_cpu = sparc_cpu_and_features;
+    GCC_OPTION (sparc_cpu) = GCC_OPTION (sparc_cpu_and_features);
 
-  cpu = &cpu_table[(int) sparc_cpu_and_features];
+  cpu = &cpu_table[(int) GCC_OPTION (sparc_cpu_and_features)];
 
   if (TARGET_DEBUG_OPTIONS)
     {
       fprintf (stderr, "sparc_cpu_and_features: %s\n", cpu->name);
       fprintf (stderr, "sparc_cpu: %s\n",
-	       cpu_table[(int) sparc_cpu].name);
+	       cpu_table[(int) GCC_OPTION (sparc_cpu)].name);
       dump_target_flags ("cpu->disable", cpu->disable);
       dump_target_flags ("cpu->enable", cpu->enable);
     }
 
-  target_flags &= ~cpu->disable;
-  target_flags |= (cpu->enable
+  GCC_OPTION (target_flags) &= ~cpu->disable;
+  GCC_OPTION (target_flags) |= (cpu->enable
 #ifndef HAVE_AS_FMAF_HPC_VIS3
 		   & ~(MASK_FMAF | MASK_VIS3)
 #endif
@@ -1441,59 +1441,59 @@ sparc_option_override (void)
   /* If -mfpu or -mno-fpu was explicitly used, don't override with
      the processor default.  */
   if (target_flags_explicit & MASK_FPU)
-    target_flags = (target_flags & ~MASK_FPU) | fpu;
+    GCC_OPTION (target_flags) = (GCC_OPTION (target_flags) & ~MASK_FPU) | fpu;
 
   /* -mvis2 implies -mvis */
   if (TARGET_VIS2)
-    target_flags |= MASK_VIS;
+    GCC_OPTION (target_flags) |= MASK_VIS;
 
   /* -mvis3 implies -mvis2 and -mvis */
   if (TARGET_VIS3)
-    target_flags |= MASK_VIS2 | MASK_VIS;
+    GCC_OPTION (target_flags) |= MASK_VIS2 | MASK_VIS;
 
   /* Don't allow -mvis, -mvis2, -mvis3, or -mfmaf if FPU is
      disabled.  */
   if (! TARGET_FPU)
-    target_flags &= ~(MASK_VIS | MASK_VIS2 | MASK_VIS3 | MASK_FMAF);
+    GCC_OPTION (target_flags) &= ~(MASK_VIS | MASK_VIS2 | MASK_VIS3 | MASK_FMAF);
 
   /* -mvis assumes UltraSPARC+, so we are sure v9 instructions
      are available.
      -m64 also implies v9.  */
   if (TARGET_VIS || TARGET_ARCH64)
     {
-      target_flags |= MASK_V9;
-      target_flags &= ~(MASK_V8 | MASK_SPARCLET | MASK_SPARCLITE);
+      GCC_OPTION (target_flags) |= MASK_V9;
+      GCC_OPTION (target_flags) &= ~(MASK_V8 | MASK_SPARCLET | MASK_SPARCLITE);
     }
 
   /* -mvis also implies -mv8plus on 32-bit */
   if (TARGET_VIS && ! TARGET_ARCH64)
-    target_flags |= MASK_V8PLUS;
+    GCC_OPTION (target_flags) |= MASK_V8PLUS;
 
   /* Use the deprecated v8 insns for sparc64 in 32 bit mode.  */
   if (TARGET_V9 && TARGET_ARCH32)
-    target_flags |= MASK_DEPRECATED_V8_INSNS;
+    GCC_OPTION (target_flags) |= MASK_DEPRECATED_V8_INSNS;
 
   /* V8PLUS requires V9, makes no sense in 64 bit mode.  */
   if (! TARGET_V9 || TARGET_ARCH64)
-    target_flags &= ~MASK_V8PLUS;
+    GCC_OPTION (target_flags) &= ~MASK_V8PLUS;
 
   /* Don't use stack biasing in 32 bit mode.  */
   if (TARGET_ARCH32)
-    target_flags &= ~MASK_STACK_BIAS;
+    GCC_OPTION (target_flags) &= ~MASK_STACK_BIAS;
 
   /* Supply a default value for align_functions.  */
-  if (align_functions == 0
-      && (sparc_cpu == PROCESSOR_ULTRASPARC
-	  || sparc_cpu == PROCESSOR_ULTRASPARC3
-	  || sparc_cpu == PROCESSOR_NIAGARA
-	  || sparc_cpu == PROCESSOR_NIAGARA2
-	  || sparc_cpu == PROCESSOR_NIAGARA3
-	  || sparc_cpu == PROCESSOR_NIAGARA4))
-    align_functions = 32;
+  if (GCC_OPTION (align_functions) == 0
+      && (GCC_OPTION (sparc_cpu) == PROCESSOR_ULTRASPARC
+	  || GCC_OPTION (sparc_cpu) == PROCESSOR_ULTRASPARC3
+	  || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA
+	  || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA2
+	  || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA3
+	  || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA4))
+    GCC_OPTION (align_functions) = 32;
 
   /* Validate PCC_STRUCT_RETURN.  */
-  if (flag_pcc_struct_return == DEFAULT_PCC_STRUCT_RETURN)
-    flag_pcc_struct_return = (TARGET_ARCH64 ? 0 : 1);
+  if (GCC_OPTION (flag_pcc_struct_return) == DEFAULT_PCC_STRUCT_RETURN)
+    GCC_OPTION (flag_pcc_struct_return) = (TARGET_ARCH64 ? 0 : 1);
 
   /* Only use .uaxword when compiling for a 64-bit target.  */
   if (!TARGET_ARCH64)
@@ -1505,7 +1505,7 @@ sparc_option_override (void)
   /* Set up function hooks.  */
   init_machine_status = sparc_init_machine_status;
 
-  switch (sparc_cpu)
+  switch (GCC_OPTION (sparc_cpu))
     {
     case PROCESSOR_V7:
     case PROCESSOR_CYPRESS:
@@ -1555,51 +1555,51 @@ sparc_option_override (void)
       gcc_unreachable ();
     };
 
-  if (sparc_memory_model == SMM_DEFAULT)
+  if (GCC_OPTION (sparc_memory_model) == SMM_DEFAULT)
     {
       /* Choose the memory model for the operating system.  */
       enum sparc_memory_model_type os_default = SUBTARGET_DEFAULT_MEMORY_MODEL;
       if (os_default != SMM_DEFAULT)
-	sparc_memory_model = os_default;
+	GCC_OPTION (sparc_memory_model) = os_default;
       /* Choose the most relaxed model for the processor.  */
       else if (TARGET_V9)
-	sparc_memory_model = SMM_RMO;
+	GCC_OPTION (sparc_memory_model) = SMM_RMO;
       else if (TARGET_LEON3)
-	sparc_memory_model = SMM_TSO;
+	GCC_OPTION (sparc_memory_model) = SMM_TSO;
       else if (TARGET_LEON)
-	sparc_memory_model = SMM_SC;
+	GCC_OPTION (sparc_memory_model) = SMM_SC;
       else if (TARGET_V8)
-	sparc_memory_model = SMM_PSO;
+	GCC_OPTION (sparc_memory_model) = SMM_PSO;
       else
-	sparc_memory_model = SMM_SC;
+	GCC_OPTION (sparc_memory_model) = SMM_SC;
     }
 
 #ifdef TARGET_DEFAULT_LONG_DOUBLE_128
   if (!(target_flags_explicit & MASK_LONG_DOUBLE_128))
-    target_flags |= MASK_LONG_DOUBLE_128;
+    GCC_OPTION (target_flags) |= MASK_LONG_DOUBLE_128;
 #endif
 
   if (TARGET_DEBUG_OPTIONS)
-    dump_target_flags ("Final target_flags", target_flags);
+    dump_target_flags ("Final target_flags", GCC_OPTION (target_flags));
 
   maybe_set_param_value (PARAM_SIMULTANEOUS_PREFETCHES,
-			 ((sparc_cpu == PROCESSOR_ULTRASPARC
-			   || sparc_cpu == PROCESSOR_NIAGARA
-			   || sparc_cpu == PROCESSOR_NIAGARA2
-			   || sparc_cpu == PROCESSOR_NIAGARA3
-			   || sparc_cpu == PROCESSOR_NIAGARA4)
+			 ((GCC_OPTION (sparc_cpu) == PROCESSOR_ULTRASPARC
+			   || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA
+			   || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA2
+			   || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA3
+			   || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA4)
 			  ? 2
-			  : (sparc_cpu == PROCESSOR_ULTRASPARC3
+			  : (GCC_OPTION (sparc_cpu) == PROCESSOR_ULTRASPARC3
 			     ? 8 : 3)),
 			 global_options.x_param_values,
 			 global_options_set.x_param_values);
   maybe_set_param_value (PARAM_L1_CACHE_LINE_SIZE,
-			 ((sparc_cpu == PROCESSOR_ULTRASPARC
-			   || sparc_cpu == PROCESSOR_ULTRASPARC3
-			   || sparc_cpu == PROCESSOR_NIAGARA
-			   || sparc_cpu == PROCESSOR_NIAGARA2
-			   || sparc_cpu == PROCESSOR_NIAGARA3
-			   || sparc_cpu == PROCESSOR_NIAGARA4)
+			 ((GCC_OPTION (sparc_cpu) == PROCESSOR_ULTRASPARC
+			   || GCC_OPTION (sparc_cpu) == PROCESSOR_ULTRASPARC3
+			   || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA
+			   || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA2
+			   || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA3
+			   || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA4)
 			  ? 64 : 32),
 			 global_options.x_param_values,
 			 global_options_set.x_param_values);
@@ -1608,7 +1608,7 @@ sparc_option_override (void)
      The IRA sharing algorithm works on single registers only and this
      pessimizes for double floating-point registers.  */
   if (!global_options_set.x_flag_ira_share_save_slots)
-    flag_ira_share_save_slots = 0;
+    GCC_OPTION (flag_ira_share_save_slots) = 0;
 
   /* We register a machine specific pass to work around errata, if any.
      The pass mut be scheduled as late as possible so that we have the
@@ -1725,7 +1725,7 @@ can_use_mov_pic_label_ref (rtx label)
 
   /* Finally, if we are reordering basic blocks and partition into hot
      and cold sections, this might happen for any label.  */
-  if (flag_reorder_blocks_and_partition)
+  if (GCC_OPTION (flag_reorder_blocks_and_partition))
     return false;
 
   return true;
@@ -1760,7 +1760,7 @@ sparc_expand_move (enum machine_mode mode, rtx *operands)
     }
 
   /* Fixup PIC cases.  */
-  if (flag_pic && CONSTANT_P (operands[1]))
+  if (GCC_OPTION (flag_pic) && CONSTANT_P (operands[1]))
     {
       if (pic_address_needs_scratch (operands[1]))
 	operands[1] = sparc_legitimize_pic_address (operands[1], NULL_RTX);
@@ -3734,7 +3734,7 @@ sparc_cannot_force_const_mem (enum machine_mode mode, rtx x)
 
     case LABEL_REF:
       /* Labels are OK iff we are non-PIC.  */
-      return flag_pic != 0;
+      return GCC_OPTION (flag_pic) != 0;
 
     case SYMBOL_REF:
       /* 'Naked' TLS symbol references are never OK,
@@ -3742,7 +3742,7 @@ sparc_cannot_force_const_mem (enum machine_mode mode, rtx x)
       if (SYMBOL_REF_TLS_MODEL (x))
 	return true;
       else
-	return flag_pic != 0;
+	return GCC_OPTION (flag_pic) != 0;
 
     case CONST:
       return sparc_cannot_force_const_mem (mode, XEXP (x, 0));
@@ -3781,7 +3781,7 @@ check_pic (int i)
 {
   rtx op;
 
-  switch (flag_pic)
+  switch (GCC_OPTION (flag_pic))
     {
     case 1:
       op = recog_data.operand[i];
@@ -3870,12 +3870,12 @@ constant_address_p (rtx x)
       return true;
 
     case CONST:
-      if (flag_pic && pic_address_needs_scratch (x))
+      if (GCC_OPTION (flag_pic) && pic_address_needs_scratch (x))
 	return false;
       return sparc_legitimate_constant_p (Pmode, x);
 
     case SYMBOL_REF:
-      return !flag_pic && sparc_legitimate_constant_p (Pmode, x);
+      return !GCC_OPTION (flag_pic) && sparc_legitimate_constant_p (Pmode, x);
 
     default:
       return false;
@@ -3935,7 +3935,7 @@ sparc_legitimate_address_p (enum machine_mode mode, rtx addr, bool strict)
 	  rs2 = XEXP (addr, 0);
 	}
 
-      if ((flag_pic == 1
+      if ((GCC_OPTION (flag_pic) == 1
 	   && rs1 == pic_offset_table_rtx
 	   && !REG_P (rs2)
 	   && GET_CODE (rs2) != SUBREG
@@ -3972,7 +3972,7 @@ sparc_legitimate_address_p (enum machine_mode mode, rtx addr, bool strict)
 	     DFmode/DImode because then mem_min_alignment is likely to be zero
 	     after reload and the  forced split would lack a matching splitter
 	     pattern.  */
-	  if (TARGET_ARCH32 && !optimize
+	  if (TARGET_ARCH32 && !GCC_OPTION (optimize)
 	      && (mode == DFmode || mode == DImode))
 	    return 0;
 	}
@@ -4061,7 +4061,7 @@ static rtx
 sparc_tls_got (void)
 {
   /* In PIC mode, this is just the PIC offset table.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       crtl->uses_pic_offset_table = 1;
       return pic_offset_table_rtx;
@@ -4264,7 +4264,7 @@ sparc_legitimize_pic_address (rtx orig, rtx reg)
 	  reg = gen_reg_rtx (Pmode);
 	}
 
-      if (flag_pic == 2)
+      if (GCC_OPTION (flag_pic) == 2)
 	{
 	  /* If not during reload, allocate another temp reg here for loading
 	     in the address, so that these instructions can be optimized
@@ -4391,7 +4391,7 @@ sparc_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
 
   if (sparc_tls_referenced_p (x))
     x = sparc_legitimize_tls_address (x);
-  else if (flag_pic)
+  else if (GCC_OPTION (flag_pic))
     x = sparc_legitimize_pic_address (x, NULL_RTX);
   else if (GET_CODE (x) == PLUS && CONSTANT_ADDRESS_P (XEXP (x, 1)))
     x = gen_rtx_PLUS (Pmode, XEXP (x, 0),
@@ -4465,7 +4465,7 @@ sparc_legitimize_reload_address (rtx x, enum machine_mode mode,
       && GET_CODE (x) != LO_SUM
       && GET_CODE (x) != HIGH
       && sparc_cmodel <= CM_MEDLOW
-      && !(flag_pic
+      && !(GCC_OPTION (flag_pic)
 	   && (symbolic_operand (x, Pmode) || pic_address_needs_scratch (x))))
     {
       x = gen_rtx_LO_SUM (GET_MODE (x), gen_rtx_HIGH (GET_MODE (x), x), x);
@@ -4508,7 +4508,7 @@ static bool
 sparc_mode_dependent_address_p (const_rtx addr,
 				addr_space_t as ATTRIBUTE_UNUSED)
 {
-  if (flag_pic && GET_CODE (addr) == PLUS)
+  if (GCC_OPTION (flag_pic) && GET_CODE (addr) == PLUS)
     {
       rtx op0 = XEXP (addr, 0);
       rtx op1 = XEXP (addr, 1);
@@ -4546,16 +4546,16 @@ get_pc_thunk_name (char name[32], unsigned int regno)
 static rtx
 gen_load_pcrel_sym (rtx op0, rtx op1, rtx op2, rtx op3)
 {
-  int orig_flag_pic = flag_pic;
+  int orig_flag_pic = GCC_OPTION (flag_pic);
   rtx insn;
 
   /* The load_pcrel_sym{si,di} patterns require absolute addressing.  */
-  flag_pic = 0;
+  GCC_OPTION (flag_pic) = 0;
   if (TARGET_ARCH64)
     insn = gen_load_pcrel_symdi (op0, op1, op2, op3);
   else
     insn = gen_load_pcrel_symsi (op0, op1, op2, op3);
-  flag_pic = orig_flag_pic;
+  GCC_OPTION (flag_pic) = orig_flag_pic;
 
   return insn;
 }
@@ -4606,7 +4606,7 @@ sparc_emit_call_insn (rtx pat, rtx addr)
 
   /* The PIC register is live on entry to VxWorks PIC PLT entries.  */
   if (TARGET_VXWORKS_RTP
-      && flag_pic
+      && GCC_OPTION (flag_pic)
       && GET_CODE (addr) == SYMBOL_REF
       && (SYMBOL_REF_DECL (addr)
 	  ? !targetm.binds_local_p (SYMBOL_REF_DECL (addr))
@@ -4673,7 +4673,7 @@ mem_min_alignment (rtx mem, int desired)
 	     unaligned pointer to local stack though.  */
 	  if (((cfun != 0
 		&& REGNO_POINTER_ALIGN (regno) >= desired * BITS_PER_UNIT)
-	       || (optimize && reload_completed))
+	       || (GCC_OPTION (optimize) && reload_completed))
 	      && (INTVAL (offset) & (desired - 1)) == 0)
 	    return 1;
 	}
@@ -5472,14 +5472,14 @@ sparc_expand_prologue (void)
      example, the regrename pass has special provisions to not rename to
      non-leaf registers in a leaf function.  */
   sparc_leaf_function_p
-    = optimize > 0 && crtl->is_leaf && only_leaf_regs_used ();
+    = GCC_OPTION (optimize) > 0 && crtl->is_leaf && only_leaf_regs_used ();
 
   size = sparc_compute_frame_size (get_frame_size(), sparc_leaf_function_p);
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = size;
 
-  if (flag_stack_check == STATIC_BUILTIN_STACK_CHECK)
+  if (GCC_OPTION (flag_stack_check) == STATIC_BUILTIN_STACK_CHECK)
     {
       if (crtl->is_leaf && !cfun->calls_alloca)
 	{
@@ -5583,14 +5583,14 @@ sparc_flat_expand_prologue (void)
   HOST_WIDE_INT size;
   rtx insn;
 
-  sparc_leaf_function_p = optimize > 0 && crtl->is_leaf;
+  sparc_leaf_function_p = GCC_OPTION (optimize) > 0 && crtl->is_leaf;
 
   size = sparc_compute_frame_size (get_frame_size(), sparc_leaf_function_p);
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = size;
 
-  if (flag_stack_check == STATIC_BUILTIN_STACK_CHECK)
+  if (GCC_OPTION (flag_stack_check) == STATIC_BUILTIN_STACK_CHECK)
     {
       if (crtl->is_leaf && !cfun->calls_alloca)
 	{
@@ -5897,7 +5897,7 @@ output_return (rtx insn)
 	 machinery occupies the delay slot.  */
       gcc_assert (!final_sequence);
 
-      if (flag_delayed_branch)
+      if (GCC_OPTION (flag_delayed_branch))
 	{
 	  if (!TARGET_FLAT && TARGET_V9)
 	    fputs ("\treturn\t%i7+8\n", asm_out_file);
@@ -5963,7 +5963,7 @@ output_return (rtx insn)
 	  /* The delay slot is empty.  */
 	  if (TARGET_V9)
 	    return "return\t%%i7+%)\n\t nop";
-	  else if (flag_delayed_branch)
+	  else if (GCC_OPTION (flag_delayed_branch))
 	    return "jmp\t%%i7+%)\n\t restore";
 	  else
 	    return "restore\n\tjmp\t%%o7+%)\n\t nop";
@@ -5980,7 +5980,7 @@ output_sibcall (rtx insn, rtx call_operand)
 {
   rtx operands[1];
 
-  gcc_assert (flag_delayed_branch);
+  gcc_assert (GCC_OPTION (flag_delayed_branch));
 
   operands[0] = call_operand;
 
@@ -7250,7 +7250,7 @@ sparc_struct_value_rtx (tree fndecl, int incoming)
          Variable size structure returns are handled per the normal
          procedures in GCC. This is enabled by -mstd-struct-return */
       if (incoming == 2
-	  && sparc_std_struct_return
+	  && GCC_OPTION (sparc_std_struct_return)
 	  && TYPE_SIZE_UNIT (TREE_TYPE (fndecl))
 	  && TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (fndecl))) == INTEGER_CST)
 	{
@@ -8762,13 +8762,13 @@ sparc_print_operand (FILE *file, rtx x, int code)
 	 this is a dbx bug.  So, we only do this when optimizing.
          On UltraSPARC, a branch in a delay slot causes a pipeline flush.
 	 Always emit a nop in case the next instruction is a branch.  */
-      if (! final_sequence && (optimize && (int)sparc_cpu < PROCESSOR_V9))
+      if (! final_sequence && (GCC_OPTION (optimize) && (int)GCC_OPTION (sparc_cpu) < PROCESSOR_V9))
 	fputs (",a", file);
       return;
     case '(':
       /* Output a 'nop' if there's nothing for the delay slot and we are
 	 not optimizing.  This is always used with '*' above.  */
-      if (! final_sequence && ! (optimize && (int)sparc_cpu < PROCESSOR_V9))
+      if (! final_sequence && ! (GCC_OPTION (optimize) && (int)GCC_OPTION (sparc_cpu) < PROCESSOR_V9))
 	fputs ("\n\t nop", file);
       else if (final_sequence)
         sparc_indent_opcode = 1;
@@ -8785,7 +8785,7 @@ sparc_print_operand (FILE *file, rtx x, int code)
 	 when sparc_std_struct_return is enabled. */
      if (!TARGET_ARCH64
 	 && cfun->returns_struct
-	 && !sparc_std_struct_return
+	 && !GCC_OPTION (sparc_std_struct_return)
 	 && DECL_SIZE (DECL_RESULT (current_function_decl))
 	 && TREE_CODE (DECL_SIZE (DECL_RESULT (current_function_decl)))
 	     == INTEGER_CST
@@ -9092,7 +9092,7 @@ sparc_print_operand_address (FILE *file, rtx x)
       output_address (XEXP (addr, 1));
       fputc (')', file);
     }
-  else if (flag_pic
+  else if (GCC_OPTION (flag_pic)
 	   && GET_CODE (addr) == CONST
 	   && GET_CODE (XEXP (addr, 0)) == MINUS
 	   && GET_CODE (XEXP (XEXP (addr, 0), 1)) == CONST
@@ -9340,12 +9340,12 @@ sparc32_initialize_trampoline (rtx m_tramp, rtx fnaddr, rtx cxt)
   /* On UltraSPARC a flush flushes an entire cache line.  The trampoline is
      aligned on a 16 byte boundary so one flush clears it all.  */
   emit_insn (gen_flushsi (validize_mem (adjust_address (m_tramp, SImode, 0))));
-  if (sparc_cpu != PROCESSOR_ULTRASPARC
-      && sparc_cpu != PROCESSOR_ULTRASPARC3
-      && sparc_cpu != PROCESSOR_NIAGARA
-      && sparc_cpu != PROCESSOR_NIAGARA2
-      && sparc_cpu != PROCESSOR_NIAGARA3
-      && sparc_cpu != PROCESSOR_NIAGARA4)
+  if (GCC_OPTION (sparc_cpu) != PROCESSOR_ULTRASPARC
+      && GCC_OPTION (sparc_cpu) != PROCESSOR_ULTRASPARC3
+      && GCC_OPTION (sparc_cpu) != PROCESSOR_NIAGARA
+      && GCC_OPTION (sparc_cpu) != PROCESSOR_NIAGARA2
+      && GCC_OPTION (sparc_cpu) != PROCESSOR_NIAGARA3
+      && GCC_OPTION (sparc_cpu) != PROCESSOR_NIAGARA4)
     emit_insn (gen_flushsi (validize_mem (adjust_address (m_tramp, SImode, 8))));
 
   /* Call __enable_execute_stack after writing onto the stack to make sure
@@ -9385,12 +9385,12 @@ sparc64_initialize_trampoline (rtx m_tramp, rtx fnaddr, rtx cxt)
   emit_move_insn (adjust_address (m_tramp, DImode, 24), fnaddr);
   emit_insn (gen_flushdi (validize_mem (adjust_address (m_tramp, DImode, 0))));
 
-  if (sparc_cpu != PROCESSOR_ULTRASPARC
-      && sparc_cpu != PROCESSOR_ULTRASPARC3
-      && sparc_cpu != PROCESSOR_NIAGARA
-      && sparc_cpu != PROCESSOR_NIAGARA2
-      && sparc_cpu != PROCESSOR_NIAGARA3
-      && sparc_cpu != PROCESSOR_NIAGARA4)
+  if (GCC_OPTION (sparc_cpu) != PROCESSOR_ULTRASPARC
+      && GCC_OPTION (sparc_cpu) != PROCESSOR_ULTRASPARC3
+      && GCC_OPTION (sparc_cpu) != PROCESSOR_NIAGARA
+      && GCC_OPTION (sparc_cpu) != PROCESSOR_NIAGARA2
+      && GCC_OPTION (sparc_cpu) != PROCESSOR_NIAGARA3
+      && GCC_OPTION (sparc_cpu) != PROCESSOR_NIAGARA4)
     emit_insn (gen_flushdi (validize_mem (adjust_address (m_tramp, DImode, 8))));
 
   /* Call __enable_execute_stack after writing onto the stack to make sure
@@ -9558,7 +9558,7 @@ hypersparc_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
 static int
 sparc_adjust_cost(rtx insn, rtx link, rtx dep, int cost)
 {
-  switch (sparc_cpu)
+  switch (GCC_OPTION (sparc_cpu))
     {
     case PROCESSOR_SUPERSPARC:
       cost = supersparc_adjust_cost (insn, link, dep, cost);
@@ -9582,16 +9582,16 @@ sparc_sched_init (FILE *dump ATTRIBUTE_UNUSED,
 static int
 sparc_use_sched_lookahead (void)
 {
-  if (sparc_cpu == PROCESSOR_NIAGARA
-      || sparc_cpu == PROCESSOR_NIAGARA2
-      || sparc_cpu == PROCESSOR_NIAGARA3)
+  if (GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA
+      || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA2
+      || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA3)
     return 0;
-  if (sparc_cpu == PROCESSOR_NIAGARA4)
+  if (GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA4)
     return 2;
-  if (sparc_cpu == PROCESSOR_ULTRASPARC
-      || sparc_cpu == PROCESSOR_ULTRASPARC3)
+  if (GCC_OPTION (sparc_cpu) == PROCESSOR_ULTRASPARC
+      || GCC_OPTION (sparc_cpu) == PROCESSOR_ULTRASPARC3)
     return 4;
-  if ((1 << sparc_cpu) &
+  if ((1 << GCC_OPTION (sparc_cpu)) &
       ((1 << PROCESSOR_SUPERSPARC) | (1 << PROCESSOR_HYPERSPARC) |
        (1 << PROCESSOR_SPARCLITE86X)))
     return 3;
@@ -9601,7 +9601,7 @@ sparc_use_sched_lookahead (void)
 static int
 sparc_issue_rate (void)
 {
-  switch (sparc_cpu)
+  switch (GCC_OPTION (sparc_cpu))
     {
     case PROCESSOR_NIAGARA:
     case PROCESSOR_NIAGARA2:
@@ -9804,7 +9804,7 @@ sparc_check_64 (rtx x, rtx insn)
   if (GET_MODE (x) == DImode)
     y = gen_rtx_REG (SImode, REGNO (x) + WORDS_BIG_ENDIAN);
 
-  if (flag_expensive_optimizations
+  if (GCC_OPTION (flag_expensive_optimizations)
       && df && DF_REG_DEF_COUNT (REGNO (y)) == 1)
     set_once = 1;
 
@@ -9968,10 +9968,10 @@ static bool
 sparc_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
 {
   return (decl
-	  && flag_delayed_branch
+	  && GCC_OPTION (flag_delayed_branch)
 	  && (TARGET_ARCH64 || ! cfun->returns_struct)
 	  && !(TARGET_VXWORKS_RTP
-	       && flag_pic
+	       && GCC_OPTION (flag_pic)
 	       && !targetm.binds_local_p (decl)));
 }
 
@@ -11220,12 +11220,12 @@ sparc_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
 
   if (need_memory)
     {
-      if (sparc_cpu == PROCESSOR_ULTRASPARC
-	  || sparc_cpu == PROCESSOR_ULTRASPARC3
-	  || sparc_cpu == PROCESSOR_NIAGARA
-	  || sparc_cpu == PROCESSOR_NIAGARA2
-	  || sparc_cpu == PROCESSOR_NIAGARA3
-	  || sparc_cpu == PROCESSOR_NIAGARA4)
+      if (GCC_OPTION (sparc_cpu) == PROCESSOR_ULTRASPARC
+	  || GCC_OPTION (sparc_cpu) == PROCESSOR_ULTRASPARC3
+	  || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA
+	  || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA2
+	  || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA3
+	  || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA4)
 	return 12;
 
       return 6;
@@ -11291,7 +11291,7 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
 
       int_arg_first = SPARC_OUTGOING_INT_ARG_FIRST;
     }
-  else if (flag_delayed_branch)
+  else if (GCC_OPTION (flag_delayed_branch))
     {
       /* We will emit a regular sibcall below, so we need to instruct
 	 output_sibcall that we are in a leaf function.  */
@@ -11396,7 +11396,7 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
     }
   funexp = XEXP (DECL_RTL (function), 0);
 
-  if (flag_delayed_branch)
+  if (GCC_OPTION (flag_delayed_branch))
     {
       funexp = gen_rtx_MEM (FUNCTION_MODE, funexp);
       insn = emit_call_insn (gen_sibcall (funexp));
@@ -11408,7 +11408,7 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
 	 without using delay slots...  */
       rtx spill_reg, seq, scratch = gen_rtx_REG (Pmode, 1);
 
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
         {
 	  spill_reg = gen_rtx_REG (word_mode, 15);  /* %o7 */
 	  start_sequence ();
@@ -11576,7 +11576,7 @@ sparc_file_end (void)
 	  make_decl_one_only (decl, DECL_ASSEMBLER_NAME (decl));
 	  DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN;
 	  DECL_VISIBILITY_SPECIFIED (decl) = 1;
-	  resolve_unique_section (decl, 0, flag_function_sections);
+	  resolve_unique_section (decl, 0, GCC_OPTION (flag_function_sections));
 	  allocate_struct_function (decl, true);
 	  cfun->is_thunk = 1;
 	  current_function_decl = decl;
@@ -11597,7 +11597,7 @@ sparc_file_end (void)
       if (do_cfi)
 	fprintf (asm_out_file, "\t.cfi_startproc\n");
 #endif
-      if (flag_delayed_branch)
+      if (GCC_OPTION (flag_delayed_branch))
 	fprintf (asm_out_file, "\tjmp\t%%o7+8\n\t add\t%%o7, %s, %s\n",
 		 reg_name, reg_name);
       else
@@ -11649,7 +11649,7 @@ sparc_emit_membar_for_model (enum memmodel model,
 
   int mm = 0, implied = 0;
 
-  switch (sparc_memory_model)
+  switch (GCC_OPTION (sparc_memory_model))
     {
     case SMM_SC:
       /* Sequential Consistency.  All memory transactions are immediately
@@ -12402,7 +12402,7 @@ sparc_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
 	&& symbolic_operand (x, mode))
        || (TARGET_CM_EMBMEDANY
 	   && text_segment_operand (x, mode)))
-      && ! flag_pic)
+      && ! GCC_OPTION (flag_pic))
     {
       if (in_p)
 	sri->icode = direct_optab_handler (reload_in_optab, mode);
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index dd2b5ad..d41e8fc 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -791,7 +791,7 @@ extern int sparc_mode_class[];
    data references.  */
 
 #define PIC_OFFSET_TABLE_REGNUM \
-  (flag_pic ? GLOBAL_OFFSET_TABLE_REGNUM : INVALID_REGNUM)
+  (GCC_OPTION (flag_pic) ? GLOBAL_OFFSET_TABLE_REGNUM : INVALID_REGNUM)
 
 /* Pick a default value we can notice from override_options:
    !v9: Default is on.
@@ -1351,14 +1351,14 @@ do {									\
 #ifdef HAVE_AS_SPARC_UA_PCREL
 #ifdef HAVE_AS_SPARC_UA_PCREL_HIDDEN
 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)			\
-  (flag_pic								\
+  (GCC_OPTION (flag_pic)								\
    ? (GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4\
    : ((TARGET_ARCH64 && ! GLOBAL)					\
       ? (DW_EH_PE_pcrel | DW_EH_PE_sdata4)				\
       : DW_EH_PE_absptr))
 #else
 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)			\
-  (flag_pic								\
+  (GCC_OPTION (flag_pic)								\
    ? (GLOBAL ? DW_EH_PE_absptr : (DW_EH_PE_pcrel | DW_EH_PE_sdata4))	\
    : ((TARGET_ARCH64 && ! GLOBAL)					\
       ? (DW_EH_PE_pcrel | DW_EH_PE_sdata4)				\
@@ -1443,12 +1443,12 @@ do {									   \
    this has to be DImode in that case */
 #ifdef HAVE_GAS_SUBSECTION_ORDERING
 #define CASE_VECTOR_MODE \
-(! TARGET_PTR64 ? SImode : flag_pic ? SImode : TARGET_CM_MEDLOW ? SImode : DImode)
+(! TARGET_PTR64 ? SImode : GCC_OPTION (flag_pic) ? SImode : TARGET_CM_MEDLOW ? SImode : DImode)
 #else
 /* If assembler does not have working .subsection -1, we use DImode for pic, as otherwise
    we have to sign extend which slows things down.  */
 #define CASE_VECTOR_MODE \
-(! TARGET_PTR64 ? SImode : flag_pic ? DImode : TARGET_CM_MEDLOW ? SImode : DImode)
+(! TARGET_PTR64 ? SImode : GCC_OPTION (flag_pic) ? DImode : TARGET_CM_MEDLOW ? SImode : DImode)
 #endif
 
 /* Define this as 1 if `char' should by default be signed; else as 0.  */
@@ -1546,15 +1546,15 @@ do {									   \
    a taken branch costs 6 cycles.  */
 
 #define BRANCH_COST(speed_p, predictable_p) \
-	((sparc_cpu == PROCESSOR_V9 \
-	  || sparc_cpu == PROCESSOR_ULTRASPARC) \
+	((GCC_OPTION (sparc_cpu) == PROCESSOR_V9 \
+	  || GCC_OPTION (sparc_cpu) == PROCESSOR_ULTRASPARC) \
 	 ? 7 \
-         : (sparc_cpu == PROCESSOR_ULTRASPARC3 \
+         : (GCC_OPTION (sparc_cpu) == PROCESSOR_ULTRASPARC3 \
             ? 9 \
-	 : (sparc_cpu == PROCESSOR_NIAGARA \
+	 : (GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA \
 	    ? 4 \
-	 : ((sparc_cpu == PROCESSOR_NIAGARA2 \
-	     || sparc_cpu == PROCESSOR_NIAGARA3) \
+	 : ((GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA2 \
+	     || GCC_OPTION (sparc_cpu) == PROCESSOR_NIAGARA3) \
 	    ? 5 \
 	 : 3))))
 
@@ -1771,7 +1771,7 @@ extern int sparc_indent_opcode;
 #define MASK_DEBUG_OPTIONS		0x01	/* debug option handling */
 #define MASK_DEBUG_ALL			MASK_DEBUG_OPTIONS
 
-#define TARGET_DEBUG_OPTIONS		(sparc_debug & MASK_DEBUG_OPTIONS)
+#define TARGET_DEBUG_OPTIONS		(GCC_OPTION (sparc_debug) & MASK_DEBUG_OPTIONS)
 
 /* By default, use the weakest memory model for the cpu.  */
 #ifndef SUBTARGET_DEFAULT_MEMORY_MODEL
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index 8b6c647..e64f463 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -291,7 +291,7 @@
   (const_string "none"))
 
 (define_attr "pic" "false,true"
-  (symbol_ref "(flag_pic != 0
+  (symbol_ref "(GCC_OPTION (flag_pic) != 0
 		? PIC_TRUE : PIC_FALSE)"))
 
 (define_attr "calls_alloca" "false,true"
@@ -307,7 +307,7 @@
 		? LEAF_FUNCTION_TRUE : LEAF_FUNCTION_FALSE)"))
 
 (define_attr "delayed_branch" "false,true"
-  (symbol_ref "(flag_delayed_branch != 0
+  (symbol_ref "(GCC_OPTION (flag_delayed_branch) != 0
 		? DELAYED_BRANCH_TRUE : DELAYED_BRANCH_FALSE)"))
 
 (define_attr "flat" "false,true"
@@ -315,7 +315,7 @@
 		? FLAT_TRUE : FLAT_FALSE)"))
 
 (define_attr "fix_ut699" "false,true"
-   (symbol_ref "(sparc_fix_ut699 != 0
+   (symbol_ref "(GCC_OPTION (sparc_fix_ut699) != 0
 		 ? FIX_UT699_TRUE : FIX_UT699_FALSE)"))
 
 ;; Length (in # of insns).
@@ -1363,7 +1363,7 @@
    (clobber (reg:P O7_REG))]
   "REGNO (operands[0]) == INTVAL (operands[3])"
 {
-  if (flag_delayed_branch)
+  if (GCC_OPTION (flag_delayed_branch))
     return "sethi\t%%hi(%a1-4), %0\n\tcall\t%a2\n\t add\t%0, %%lo(%a1+4), %0";
   else
     return "sethi\t%%hi(%a1-8), %0\n\tadd\t%0, %%lo(%a1-4), %0\n\tcall\t%a2\n\t nop";
@@ -1476,7 +1476,7 @@
   [(set (match_operand:SI 0 "register_operand" "=r")
         (lo_sum:SI (match_operand:SI 1 "register_operand" "r")
                    (unspec:SI [(match_operand:SI 2 "immediate_operand" "in")] UNSPEC_MOVE_PIC)))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
 {
 #ifdef HAVE_AS_SPARC_GOTDATA_OP
   return "xor\t%1, %%gdop_lox10(%a2), %0";
@@ -1488,7 +1488,7 @@
 (define_insn "movsi_high_pic"
   [(set (match_operand:SI 0 "register_operand" "=r")
         (high:SI (unspec:SI [(match_operand 1 "" "")] UNSPEC_MOVE_PIC)))]
-  "flag_pic && check_pic (1)"
+  "GCC_OPTION (flag_pic) && check_pic (1)"
 {
 #ifdef HAVE_AS_SPARC_GOTDATA_OP
   return "sethi\t%%gdop_hix22(%a1), %0";
@@ -1502,7 +1502,7 @@
         (unspec:SI [(match_operand:SI 1 "register_operand" "r")
 	            (match_operand:SI 2 "register_operand" "r")
 		    (match_operand 3 "symbolic_operand" "")] UNSPEC_MOVE_GOTDATA))]
-  "flag_pic && check_pic (1)"
+  "GCC_OPTION (flag_pic) && check_pic (1)"
 {
 #ifdef HAVE_AS_SPARC_GOTDATA_OP
   return "ld\t[%1 + %2], %0, %%gdop(%a3)";
@@ -1520,7 +1520,7 @@
      (unspec:SI [(match_dup 1) (match_dup 2)] UNSPEC_MOVE_PIC_LABEL)))
    (set (match_operand:SI 0 "register_operand" "=r")
 	(minus:SI (match_dup 5) (match_dup 4)))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
 {
   crtl->uses_pic_offset_table = 1;
   operands[2] = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
@@ -1542,7 +1542,7 @@
       (high:SI
         (unspec:SI [(match_operand:SI 1 "label_ref_operand" "")
 		    (match_operand:SI 2 "" "")] UNSPEC_MOVE_PIC_LABEL)))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "sethi\t%%hi(%a2-(%a1-.)), %0")
 
 (define_insn "*movsi_lo_sum_pic_label_ref"
@@ -1550,7 +1550,7 @@
       (lo_sum:SI (match_operand:SI 1 "register_operand" "r")
         (unspec:SI [(match_operand:SI 2 "label_ref_operand" "")
 		    (match_operand:SI 3 "" "")] UNSPEC_MOVE_PIC_LABEL)))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "or\t%1, %%lo(%a3-(%a2-.)), %0")
 
 ;; Set up the PIC register for VxWorks.
@@ -1654,7 +1654,7 @@
      (unspec:DI [(match_dup 1) (match_dup 2)] UNSPEC_MOVE_PIC_LABEL)))
    (set (match_operand:DI 0 "register_operand" "=r")
         (minus:DI (match_dup 5) (match_dup 4)))]
-  "TARGET_ARCH64 && flag_pic"
+  "TARGET_ARCH64 && GCC_OPTION (flag_pic)"
 {
   crtl->uses_pic_offset_table = 1;
   operands[2] = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
@@ -1676,7 +1676,7 @@
         (high:DI
           (unspec:DI [(match_operand:DI 1 "label_ref_operand" "")
                       (match_operand:DI 2 "" "")] UNSPEC_MOVE_PIC_LABEL)))]
-  "TARGET_ARCH64 && flag_pic"
+  "TARGET_ARCH64 && GCC_OPTION (flag_pic)"
   "sethi\t%%hi(%a2-(%a1-.)), %0")
 
 (define_insn "*movdi_lo_sum_pic_label_ref"
@@ -1684,7 +1684,7 @@
       (lo_sum:DI (match_operand:DI 1 "register_operand" "r")
         (unspec:DI [(match_operand:DI 2 "label_ref_operand" "")
                     (match_operand:DI 3 "" "")] UNSPEC_MOVE_PIC_LABEL)))]
-  "TARGET_ARCH64 && flag_pic"
+  "TARGET_ARCH64 && GCC_OPTION (flag_pic)"
   "or\t%1, %%lo(%a3-(%a2-.)), %0")
 
 ;; SPARC-v9 code model support insns.  See sparc_emit_set_symbolic_const64
@@ -1694,7 +1694,7 @@
   [(set (match_operand:DI 0 "register_operand" "=r")
         (lo_sum:DI (match_operand:DI 1 "register_operand" "r")
                    (unspec:DI [(match_operand:DI 2 "immediate_operand" "in")] UNSPEC_MOVE_PIC)))]
-  "TARGET_ARCH64 && flag_pic"
+  "TARGET_ARCH64 && GCC_OPTION (flag_pic)"
 {
 #ifdef HAVE_AS_SPARC_GOTDATA_OP
   return "xor\t%1, %%gdop_lox10(%a2), %0";
@@ -1706,7 +1706,7 @@
 (define_insn "movdi_high_pic"
   [(set (match_operand:DI 0 "register_operand" "=r")
         (high:DI (unspec:DI [(match_operand 1 "" "")] UNSPEC_MOVE_PIC)))]
-  "TARGET_ARCH64 && flag_pic && check_pic (1)"
+  "TARGET_ARCH64 && GCC_OPTION (flag_pic) && check_pic (1)"
 {
 #ifdef HAVE_AS_SPARC_GOTDATA_OP
   return "sethi\t%%gdop_hix22(%a1), %0";
@@ -1720,7 +1720,7 @@
         (unspec:DI [(match_operand:DI 1 "register_operand" "r")
 	            (match_operand:DI 2 "register_operand" "r")
 		    (match_operand 3 "symbolic_operand" "")] UNSPEC_MOVE_GOTDATA))]
-  "TARGET_ARCH64 && flag_pic && check_pic (1)"
+  "TARGET_ARCH64 && GCC_OPTION (flag_pic) && check_pic (1)"
 {
 #ifdef HAVE_AS_SPARC_GOTDATA_OP
   return "ldx\t[%1 + %2], %0, %%gdop(%a3)";
@@ -1847,7 +1847,7 @@
               (match_operand:TI 2 "register_operand" "=&r")])]
   "(TARGET_CM_MEDANY
     || TARGET_CM_EMBMEDANY)
-   && ! flag_pic"
+   && ! GCC_OPTION (flag_pic)"
 {
   sparc_emit_set_symbolic_const64 (operands[0], operands[1], operands[2]);
   DONE;
@@ -1859,7 +1859,7 @@
               (match_operand:TI 2 "register_operand" "=&r")])]
   "(TARGET_CM_MEDANY
     || TARGET_CM_EMBMEDANY)
-   && ! flag_pic"
+   && ! GCC_OPTION (flag_pic)"
 {
   sparc_emit_set_symbolic_const64 (operands[0], operands[1], operands[2]);
   DONE;
@@ -5490,7 +5490,7 @@
   [(set (match_operand:DF 0 "register_operand" "=e")
 	(mult:DF (float_extend:DF (match_operand:SF 1 "register_operand" "f"))
 		 (float_extend:DF (match_operand:SF 2 "register_operand" "f"))))]
-  "(TARGET_V8 || TARGET_V9) && TARGET_FPU && !sparc_fix_ut699"
+  "(TARGET_V8 || TARGET_V9) && TARGET_FPU && !GCC_OPTION (sparc_fix_ut699)"
   "fsmuld\t%1, %2, %0"
   [(set_attr "type" "fpmul")
    (set_attr "fptype" "double")])
@@ -5530,7 +5530,7 @@
   [(set (match_operand:DF 0 "register_operand" "=e")
 	(div:DF (match_operand:DF 1 "register_operand" "e")
 		(match_operand:DF 2 "register_operand" "e")))]
-  "TARGET_FPU && !sparc_fix_ut699"
+  "TARGET_FPU && !GCC_OPTION (sparc_fix_ut699)"
   "fdivd\t%1, %2, %0"
   [(set_attr "type" "fpdivd")
    (set_attr "fptype" "double")])
@@ -5539,7 +5539,7 @@
   [(set (match_operand:DF 0 "register_operand" "=e")
 	(div:DF (match_operand:DF 1 "register_operand" "e")
 		(match_operand:DF 2 "register_operand" "e")))]
-  "TARGET_FPU && sparc_fix_ut699"
+  "TARGET_FPU && GCC_OPTION (sparc_fix_ut699)"
   "fdivd\t%1, %2, %0\n\tstd\t%0, [%%sp-8]"
   [(set_attr "type" "fpdivd")
    (set_attr "fptype" "double")
@@ -5549,7 +5549,7 @@
   [(set (match_operand:SF 0 "register_operand" "=f")
 	(div:SF (match_operand:SF 1 "register_operand" "f")
 		(match_operand:SF 2 "register_operand" "f")))]
-  "TARGET_FPU && !sparc_fix_ut699"
+  "TARGET_FPU && !GCC_OPTION (sparc_fix_ut699)"
   "fdivs\t%1, %2, %0"
   [(set_attr "type" "fpdivs")])
 
@@ -5759,7 +5759,7 @@
 (define_insn "*sqrtdf2_nofix"
   [(set (match_operand:DF 0 "register_operand" "=e")
 	(sqrt:DF (match_operand:DF 1 "register_operand" "e")))]
-  "TARGET_FPU && !sparc_fix_ut699"
+  "TARGET_FPU && !GCC_OPTION (sparc_fix_ut699)"
   "fsqrtd\t%1, %0"
   [(set_attr "type" "fpsqrtd")
    (set_attr "fptype" "double")])
@@ -5767,7 +5767,7 @@
 (define_insn "*sqrtdf2_fix"
   [(set (match_operand:DF 0 "register_operand" "=e")
 	(sqrt:DF (match_operand:DF 1 "register_operand" "e")))]
-  "TARGET_FPU && sparc_fix_ut699"
+  "TARGET_FPU && GCC_OPTION (sparc_fix_ut699)"
   "fsqrtd\t%1, %0\n\tstd\t%0, [%%sp-8]"
   [(set_attr "type" "fpsqrtd")
    (set_attr "fptype" "double")
@@ -5776,7 +5776,7 @@
 (define_insn "sqrtsf2"
   [(set (match_operand:SF 0 "register_operand" "=f")
 	(sqrt:SF (match_operand:SF 1 "register_operand" "f")))]
-  "TARGET_FPU && !sparc_fix_ut699"
+  "TARGET_FPU && !GCC_OPTION (sparc_fix_ut699)"
   "fsqrts\t%1, %0"
   [(set_attr "type" "fpsqrts")])
 
@@ -6131,7 +6131,7 @@
   /* In pic mode, our address differences are against the base of the
      table.  Add that base value back in; CSE ought to be able to combine
      the two address loads.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       rtx tmp, tmp2;
       tmp = gen_rtx_LABEL_REF (Pmode, operands[1]);
@@ -6666,7 +6666,7 @@
 	       (match_operand:SI 1 "register_operand" "r")] UNSPEC_UPDATE_RETURN)]
   "! TARGET_ARCH64"
 {
-  if (flag_delayed_branch)
+  if (GCC_OPTION (flag_delayed_branch))
     return "cmp\t%1, 0\n\tbe,a\t.+8\n\t add\t%0, 4, %0";
   else
     return "cmp\t%1, 0\n\tbne\t.+12\n\t nop\n\tadd\t%0, 4, %0";
@@ -6757,7 +6757,7 @@
 
 (define_expand "builtin_setjmp_receiver"
   [(label_ref (match_operand 0 "" ""))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
 {
   load_got_register ();
   DONE;
diff --git a/gcc/config/sparc/sync.md b/gcc/config/sparc/sync.md
index fd5691f..35e62c6 100644
--- a/gcc/config/sparc/sync.md
+++ b/gcc/config/sparc/sync.md
@@ -233,7 +233,7 @@
    (match_operand:SI 1 "memory_operand" "")
    (match_operand:SI 2 "register_operand" "")
    (match_operand:SI 3 "const_int_operand" "")]
-  "(TARGET_V8 || TARGET_V9) && !sparc_fix_ut699"
+  "(TARGET_V8 || TARGET_V9) && !GCC_OPTION (sparc_fix_ut699)"
 {
   enum memmodel model = (enum memmodel) INTVAL (operands[3]);
 
@@ -249,7 +249,7 @@
 			    UNSPECV_SWAP))
    (set (match_dup 1)
 	(match_operand:SI 2 "register_operand" "0"))]
-  "(TARGET_V8 || TARGET_V9) && !sparc_fix_ut699"
+  "(TARGET_V8 || TARGET_V9) && !GCC_OPTION (sparc_fix_ut699)"
   "swap\t%1, %0"
   [(set_attr "type" "multi")])
 
@@ -257,7 +257,7 @@
   [(match_operand:QI 0 "register_operand" "")
    (match_operand:QI 1 "memory_operand" "")
    (match_operand:SI 2 "const_int_operand" "")]
-  "!sparc_fix_ut699"
+  "!GCC_OPTION (sparc_fix_ut699)"
 {
   enum memmodel model = (enum memmodel) INTVAL (operands[2]);
   rtx ret;
@@ -281,6 +281,6 @@
 	(unspec_volatile:QI [(match_operand:QI 1 "memory_operand" "+m")]
 			    UNSPECV_LDSTUB))
    (set (match_dup 1) (const_int -1))]
-  "!sparc_fix_ut699"
+  "!GCC_OPTION (sparc_fix_ut699)"
   "ldstub\t%1, %0"
   [(set_attr "type" "multi")])
diff --git a/gcc/config/spu/spu-builtins.md b/gcc/config/spu/spu-builtins.md
index 5df6fe0..aa05327 100644
--- a/gcc/config/spu/spu-builtins.md
+++ b/gcc/config/spu/spu-builtins.md
@@ -643,7 +643,7 @@
   [(unspec_volatile [(match_operand 1 "const_int_operand" "i")] UNSPEC_SET_INTR)
    (clobber (match_operand:SI 0 "spu_reg_operand" "=&r"))
    (clobber (mem:BLK (scratch)))]
-  "! flag_pic"
+  "! GCC_OPTION (flag_pic)"
   "ila\t%0,.+8\;bi%I1\t%0"
   [(set_attr "length" "8")
    (set_attr "type" "multi0")])
@@ -652,7 +652,7 @@
   [(unspec_volatile [(match_operand 1 "const_int_operand" "i")] UNSPEC_SET_INTR)
    (clobber (match_operand:SI 0 "spu_reg_operand" "=&r"))
    (clobber (mem:BLK (scratch)))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "brsl\t%0,.+4\;ai\t%0,%0,8\;bi%I1\t%0"
   [(set_attr "length" "12")
    (set_attr "type" "multi1")])
@@ -664,7 +664,7 @@
               (parallel [(unspec_volatile [(match_operand:SI 3 "const_int_operand" "i")] UNSPEC_SET_INTR)
                          (clobber (match_operand:SI 0 "spu_reg_operand" "=&r"))
 			 (clobber (mem:BLK (scratch)))]))]
-  "! flag_pic"
+  "! GCC_OPTION (flag_pic)"
   "ila\t%0,.+8\;bi%b2%b1z%I3\t%2,%0"
   [(set_attr "length" "8")
    (set_attr "type" "multi0")])
@@ -676,7 +676,7 @@
               (parallel [(unspec_volatile [(match_operand:SI 3 "const_int_operand" "i")] UNSPEC_SET_INTR)
                          (clobber (match_operand:SI 0 "spu_reg_operand" "=&r"))
 			 (clobber (mem:BLK (scratch)))]))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "brsl\t%0,.+4\;ai\t%0,%0,8\;bi%b2%b1z%I3\t%2,%0"
   [(set_attr "length" "12")
    (set_attr "type" "multi1")])
diff --git a/gcc/config/spu/spu-c.c b/gcc/config/spu/spu-c.c
index 9d7aa5a..4296030 100644
--- a/gcc/config/spu/spu-c.c
+++ b/gcc/config/spu/spu-c.c
@@ -101,7 +101,7 @@ spu_resolve_overloaded_builtin (location_t loc, tree fndecl, void *passed_args)
   tree match = NULL_TREE;
 
   /* The vector types are not available if the backend is not initialized.  */
-  gcc_assert (!flag_preprocess_only);
+  gcc_assert (!GCC_OPTION (flag_preprocess_only));
 
   desc = &spu_builtins[fcode];
   if (desc->type != B_OVERLOAD)
@@ -195,7 +195,7 @@ spu_cpu_cpp_builtins (struct cpp_reader *pfile)
   if (spu_arch == PROCESSOR_CELLEDP)
     cpp_define (pfile, "__SPU_EDP__");
   cpp_define (pfile, "__vector=__attribute__((__spu_vector__))");
-  switch (spu_ea_model)
+  switch (GCC_OPTION (spu_ea_model))
     {
     case 32:
       cpp_define (pfile, "__EA32__");
@@ -230,6 +230,6 @@ spu_c_common_override_options (void)
   if (!TARGET_STD_MAIN)
     {
       /* Don't give warnings about the main() function.  */
-      warn_main = 0;
+      GCC_OPTION (warn_main) = 0;
     }
 }
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index 302d7e0..b7480b7 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -209,7 +209,7 @@ static enum immediate_class classify_immediate (rtx op,
 						enum machine_mode mode);
 
 /* Pointer mode for __ea references.  */
-#define EAmode (spu_ea_model != 32 ? DImode : SImode)
+#define EAmode (GCC_OPTION (spu_ea_model) != 32 ? DImode : SImode)
 
 
 /* Define the structure for the machine field in struct function.  */
@@ -235,44 +235,44 @@ spu_option_override (void)
 
   /* Small loops will be unpeeled at -O3.  For SPU it is more important
      to keep code small by default.  */
-  if (!flag_unroll_loops && !flag_peel_loops)
+  if (!GCC_OPTION (flag_unroll_loops) && !GCC_OPTION (flag_peel_loops))
     maybe_set_param_value (PARAM_MAX_COMPLETELY_PEEL_TIMES, 4,
 			   global_options.x_param_values,
 			   global_options_set.x_param_values);
 
-  flag_omit_frame_pointer = 1;
+  GCC_OPTION (flag_omit_frame_pointer) = 1;
 
   /* Functions must be 8 byte aligned so we correctly handle dual issue */
-  if (align_functions < 8)
-    align_functions = 8;
+  if (GCC_OPTION (align_functions) < 8)
+    GCC_OPTION (align_functions) = 8;
 
-  spu_hint_dist = 8*4 - spu_max_nops*4;
+  spu_hint_dist = 8*4 - GCC_OPTION (spu_max_nops)*4;
   if (spu_hint_dist < 0) 
     spu_hint_dist = 0;
 
-  if (spu_fixed_range_string)
-    fix_range (spu_fixed_range_string);
+  if (GCC_OPTION (spu_fixed_range_string))
+    fix_range (GCC_OPTION (spu_fixed_range_string));
 
   /* Determine processor architectural level.  */
-  if (spu_arch_string)
+  if (GCC_OPTION (spu_arch_string))
     {
-      if (strcmp (&spu_arch_string[0], "cell") == 0)
+      if (strcmp (&GCC_OPTION (spu_arch_string)[0], "cell") == 0)
         spu_arch = PROCESSOR_CELL;
-      else if (strcmp (&spu_arch_string[0], "celledp") == 0)
+      else if (strcmp (&GCC_OPTION (spu_arch_string)[0], "celledp") == 0)
         spu_arch = PROCESSOR_CELLEDP;
       else
-        error ("bad value (%s) for -march= switch", spu_arch_string);
+        error ("bad value (%s) for -march= switch", GCC_OPTION (spu_arch_string));
     }
 
   /* Determine processor to tune for.  */
-  if (spu_tune_string)
+  if (GCC_OPTION (spu_tune_string))
     {
-      if (strcmp (&spu_tune_string[0], "cell") == 0)
+      if (strcmp (&GCC_OPTION (spu_tune_string)[0], "cell") == 0)
         spu_tune = PROCESSOR_CELL;
-      else if (strcmp (&spu_tune_string[0], "celledp") == 0)
+      else if (strcmp (&GCC_OPTION (spu_tune_string)[0], "celledp") == 0)
         spu_tune = PROCESSOR_CELLEDP;
       else
-        error ("bad value (%s) for -mtune= switch", spu_tune_string);
+        error ("bad value (%s) for -mtune= switch", GCC_OPTION (spu_tune_string));
     }
 
   /* Change defaults according to the processor architecture.  */
@@ -282,7 +282,7 @@ spu_option_override (void)
 	 the default to -mno-safe-hints on celledp -- only the original
 	 Cell/B.E. processors require this workaround.  */
       if (!(target_flags_explicit & MASK_SAFE_HINTS))
-	target_flags &= ~MASK_SAFE_HINTS;
+	GCC_OPTION (target_flags) &= ~MASK_SAFE_HINTS;
     }
 
   REAL_MODE_FORMAT (SFmode) = &spu_single_format;
@@ -1582,14 +1582,14 @@ spu_split_immediate (rtx * ops)
 	      emit_move_insn (ops[0], gen_rtx_HIGH (mode, ops[1]));
 	      emit_move_insn (ops[0], gen_rtx_LO_SUM (mode, ops[0], ops[1]));
 	    }
-	  else if (flag_pic)
+	  else if (GCC_OPTION (flag_pic))
 	    emit_insn (gen_pic (ops[0], ops[1]));
-	  if (flag_pic)
+	  if (GCC_OPTION (flag_pic))
 	    {
 	      rtx pic_reg = get_pic_reg ();
 	      emit_insn (gen_addsi3 (ops[0], ops[0], pic_reg));
 	    }
-	  return flag_pic || c == IC_IL2s;
+	  return GCC_OPTION (flag_pic) || c == IC_IL2s;
 	}
       break;
     case IC_IL1:
@@ -1611,7 +1611,7 @@ need_to_save_reg (int regno, int saving)
 {
   if (df_regs_ever_live_p (regno) && !call_used_regs[regno])
     return 1;
-  if (flag_pic
+  if (GCC_OPTION (flag_pic)
       && regno == PIC_OFFSET_TABLE_REGNUM
       && (!saving || cfun->machine->pic_reg == pic_offset_table_rtx))
     return 1;
@@ -1727,7 +1727,7 @@ spu_expand_prologue (void)
   rtx scratch_reg_0, scratch_reg_1;
   rtx insn, real;
 
-  if (flag_pic && optimize == 0 && !cfun->machine->pic_reg)
+  if (GCC_OPTION (flag_pic) && GCC_OPTION (optimize) == 0 && !cfun->machine->pic_reg)
     cfun->machine->pic_reg = pic_offset_table_rtx;
 
   if (spu_naked_function_p (current_function_decl))
@@ -1765,7 +1765,7 @@ spu_expand_prologue (void)
 	  }
     }
 
-  if (flag_pic && cfun->machine->pic_reg)
+  if (GCC_OPTION (flag_pic) && cfun->machine->pic_reg)
     {
       rtx pic_reg = cfun->machine->pic_reg;
       insn = emit_insn (gen_load_pic_offset (pic_reg, scratch_reg_0));
@@ -1774,7 +1774,7 @@ spu_expand_prologue (void)
 
   if (total_size > 0)
     {
-      if (flag_stack_check)
+      if (GCC_OPTION (flag_stack_check))
 	{
 	  /* We compare against total_size-1 because
 	     ($sp >= total_size) <=> ($sp > total_size-1) */
@@ -1832,7 +1832,7 @@ spu_expand_prologue (void)
 	}
     }
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = total_size;
 }
 
@@ -2434,7 +2434,7 @@ static int in_spu_reorg;
 static void
 spu_var_tracking (void)
 {
-  if (flag_var_tracking)
+  if (GCC_OPTION (flag_var_tracking))
     {
       df_analyze ();
       timevar_push (TV_VAR_TRACKING);
@@ -2457,7 +2457,7 @@ spu_machine_dependent_reorg (void)
   int i;
   unsigned int j;
 
-  if (!TARGET_BRANCH_HINTS || optimize == 0)
+  if (!TARGET_BRANCH_HINTS || GCC_OPTION (optimize) == 0)
     {
       /* We still do it for unoptimized code because an external
          function might have hinted a call or return. */
@@ -2782,7 +2782,7 @@ static void
 spu_sched_init (FILE *file ATTRIBUTE_UNUSED, int verbose ATTRIBUTE_UNUSED,
 		int max_ready ATTRIBUTE_UNUSED)
 {
-  if (align_labels > 4 || align_loops > 4 || align_jumps > 4)
+  if (GCC_OPTION (align_labels) > 4 || GCC_OPTION (align_loops) > 4 || GCC_OPTION (align_jumps) > 4)
     {
       /* When any block might be at least 8-byte aligned, assume they
          will all be at least 8-byte aligned to make sure dual issue
@@ -2954,23 +2954,23 @@ spu_sched_reorder (FILE *file ATTRIBUTE_UNUSED, int verbose ATTRIBUTE_UNUSED,
      without effecting the critical path.  We look at INSN_PRIORITY to
      make a good guess, but it isn't perfect so -mdual-nops=n can be
      used to effect it. */
-  if (in_spu_reorg && spu_dual_nops < 10)
+  if (in_spu_reorg && GCC_OPTION (spu_dual_nops) < 10)
     {
       /* When we are at an even address and we are not issuing nops to
          improve scheduling then we need to advance the cycle.  */
       if ((spu_sched_length & 7) == 0 && prev_clock_var == clock
-	  && (spu_dual_nops == 0
+	  && (GCC_OPTION (spu_dual_nops) == 0
 	      || (pipe_1 != -1
 		  && prev_priority >
-		  INSN_PRIORITY (ready[pipe_1]) + spu_dual_nops)))
+		  INSN_PRIORITY (ready[pipe_1]) + GCC_OPTION (spu_dual_nops))))
 	return 0;
 
       /* When at an odd address, schedule the highest priority insn
          without considering pipeline. */
       if ((spu_sched_length & 7) == 4 && prev_clock_var != clock
-	  && (spu_dual_nops == 0
+	  && (GCC_OPTION (spu_dual_nops) == 0
 	      || (prev_priority >
-		  INSN_PRIORITY (ready[nready - 1]) + spu_dual_nops)))
+		  INSN_PRIORITY (ready[nready - 1]) + GCC_OPTION (spu_dual_nops))))
 	return 1;
     }
 
@@ -3176,7 +3176,7 @@ classify_immediate (rtx op, enum machine_mode mode)
     mode = GET_MODE (op);
 
   /* A V4SI const_vector with all identical symbols is ok. */
-  if (!flag_pic
+  if (!GCC_OPTION (flag_pic)
       && mode == V4SImode
       && GET_CODE (op) == CONST_VECTOR
       && GET_CODE (CONST_VECTOR_ELT (op, 0)) != CONST_INT
@@ -3500,7 +3500,7 @@ spu_legitimate_constant_p (enum machine_mode mode, rtx x)
     return 0;
 
   /* V4SI with all identical symbols is valid. */
-  if (!flag_pic
+  if (!GCC_OPTION (flag_pic)
       && mode == V4SImode
       && (GET_CODE (CONST_VECTOR_ELT (x, 0)) == SYMBOL_REF
 	  || GET_CODE (CONST_VECTOR_ELT (x, 0)) == LABEL_REF
@@ -3951,12 +3951,12 @@ spu_build_builtin_va_list (void)
 
   /* We know this is being padded and we want it too.  It is an internal
      type so hide the warnings from the user. */
-  owp = warn_padded;
-  warn_padded = false;
+  owp = GCC_OPTION (warn_padded);
+  GCC_OPTION (warn_padded) = false;
 
   layout_type (record);
 
-  warn_padded = owp;
+  GCC_OPTION (warn_padded) = owp;
 
   /* The correct type is an array type of one element.  */
   return build_array_type (record, build_index_type (size_zero_node));
@@ -4117,7 +4117,7 @@ spu_setup_incoming_varargs (cumulative_args_t cum, enum machine_mode mode,
 static void
 spu_conditional_register_usage (void)
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;
       call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;
@@ -4274,7 +4274,7 @@ ea_load_store_inline (rtx mem, bool is_store, rtx ea_addr, rtx data_addr)
   rtx eq_index = gen_reg_rtx (SImode);
   rtx bcomp, hit_label, hit_ref, cont_label, insn;
 
-  if (spu_ea_model != 32)
+  if (GCC_OPTION (spu_ea_model) != 32)
     {
       splat_hi = gen_reg_rtx (V4SImode);
       cache_tag_hi = gen_reg_rtx (V4SImode);
@@ -4286,7 +4286,7 @@ ea_load_store_inline (rtx mem, bool is_store, rtx ea_addr, rtx data_addr)
   v = 0x0001020300010203LL;
   emit_move_insn (splat_mask, immed_double_const (v, v, TImode));
   ea_addr_si = ea_addr;
-  if (spu_ea_model != 32)
+  if (GCC_OPTION (spu_ea_model) != 32)
     ea_addr_si = convert_to_mode (SImode, ea_addr, 1);
 
   /* tag_index = ea_addr & (tag_array_size - 128)  */
@@ -4295,7 +4295,7 @@ ea_load_store_inline (rtx mem, bool is_store, rtx ea_addr, rtx data_addr)
   /* splat ea_addr to all 4 slots.  */
   emit_insn (gen_shufb (splat, ea_addr_si, ea_addr_si, splat_mask));
   /* Similarly for high 32 bits of ea_addr.  */
-  if (spu_ea_model != 32)
+  if (GCC_OPTION (spu_ea_model) != 32)
     emit_insn (gen_shufb (splat_hi, ea_addr, ea_addr, splat_mask));
 
   /* block_off = ea_addr & 127  */
@@ -4306,7 +4306,7 @@ ea_load_store_inline (rtx mem, bool is_store, rtx ea_addr, rtx data_addr)
 
   /* Read cache tags.  */
   emit_move_insn (cache_tag, gen_rtx_MEM (V4SImode, tag_addr));
-  if (spu_ea_model != 32)
+  if (GCC_OPTION (spu_ea_model) != 32)
     emit_move_insn (cache_tag_hi, gen_rtx_MEM (V4SImode,
 					       plus_constant (Pmode,
 							      tag_addr, 16)));
@@ -4321,7 +4321,7 @@ ea_load_store_inline (rtx mem, bool is_store, rtx ea_addr, rtx data_addr)
 
   /* Compare tags.  */
   emit_insn (gen_ceq_v4si (tag_equal, tag, cache_tag));
-  if (spu_ea_model != 32)
+  if (GCC_OPTION (spu_ea_model) != 32)
     {
       emit_insn (gen_ceq_v4si (tag_equal_hi, splat_hi, cache_tag_hi));
       emit_insn (gen_andv4si3 (tag_equal, tag_equal, tag_equal_hi));
@@ -4414,7 +4414,7 @@ expand_ea_mem (rtx mem, bool is_store)
   rtx new_mem;
 
   ea_addr = force_reg (EAmode, XEXP (mem, 0));
-  if (optimize_size || optimize == 0)
+  if (GCC_OPTION (optimize_size) || GCC_OPTION (optimize) == 0)
     ea_load_store (mem, is_store, ea_addr, data_addr);
   else
     ea_load_store_inline (mem, is_store, ea_addr, data_addr);
@@ -5164,7 +5164,7 @@ static void
 reloc_diagnostic (rtx x)
 {
   tree decl = 0;
-  if (!flag_pic || !(TARGET_WARN_RELOC || TARGET_ERROR_RELOC))
+  if (!GCC_OPTION (flag_pic) || !(TARGET_WARN_RELOC || TARGET_ERROR_RELOC))
     return;
 
   if (GET_CODE (x) == SYMBOL_REF)
@@ -5383,7 +5383,7 @@ spu_allocate_stack (rtx op0, rtx op1)
   emit_insn (gen_spu_convert (sp, stack_pointer_rtx));
   emit_insn (gen_subv4si3 (sp, sp, splatted));
 
-  if (flag_stack_check)
+  if (GCC_OPTION (flag_stack_check))
     {
       rtx avail = gen_reg_rtx(SImode);
       rtx result = gen_reg_rtx(SImode);
@@ -6668,7 +6668,7 @@ spu_add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind,
   unsigned *cost = (unsigned *) data;
   unsigned retval = 0;
 
-  if (flag_vect_cost_model)
+  if (GCC_OPTION (flag_vect_cost_model))
     {
       tree vectype = stmt_info ? stmt_vectype (stmt_info) : NULL_TREE;
       int stmt_cost = spu_builtin_vectorization_cost (kind, vectype, misalign);
diff --git a/gcc/config/spu/spu.h b/gcc/config/spu/spu.h
index ac05f4c..05b6f5c 100644
--- a/gcc/config/spu/spu.h
+++ b/gcc/config/spu/spu.h
@@ -108,7 +108,7 @@ extern GTY(()) int spu_tune;
 	(GET_CODE (X) == SYMBOL_REF \
           && (SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_ALIGN1) == 0 \
 	  && (! SYMBOL_REF_FUNCTION_P (X) \
-	      || align_functions >= 16))
+	      || GCC_OPTION (align_functions) >= 16))
 
 #define PCC_BITFIELD_TYPE_MATTERS 1
 
@@ -401,7 +401,7 @@ do {									\
 
 /* Costs */
 
-#define BRANCH_COST(speed_p, predictable_p) spu_branch_cost
+#define BRANCH_COST(speed_p, predictable_p) GCC_OPTION (spu_branch_cost)
 
 #define SLOW_BYTE_ACCESS 0
 
diff --git a/gcc/config/spu/spu.md b/gcc/config/spu/spu.md
index 228b228..a075f65 100644
--- a/gcc/config/spu/spu.md
+++ b/gcc/config/spu/spu.md
@@ -301,7 +301,7 @@
   [(set (match_operand:SI 0 "spu_reg_operand" "=r")
 	(match_operand:SI 1 "immediate_operand" "s"))
    (use (const_int 0))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "ila\t%0,%%pic(%1)")
 
 ;; Whenever a function generates the 'pic' pattern above we need to
@@ -313,7 +313,7 @@
 	(unspec:SI [(const_int 0)] 0))
    (set (match_operand:SI 1 "spu_reg_operand" "=r")
 	(unspec:SI [(const_int 0)] 0))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "ila\t%1,.+8\;brsl\t%0,4"
   [(set_attr "length" "8")
    (set_attr "type" "multi0")])
@@ -853,7 +853,7 @@
                                              0x06071415, 0x16178080);
     rtx r0 = gen_reg_rtx (V16QImode);
 
-    if (optimize_size)
+    if (GCC_OPTION (optimize_size))
     {
        start_sequence ();
        value =
@@ -946,7 +946,7 @@
     rtx r0 = gen_reg_rtx (V16QImode);
     rtx r1 = gen_reg_rtx (V4SImode);
 
-    if (optimize_size)
+    if (GCC_OPTION (optimize_size))
     {      
       start_sequence ();
       value =
@@ -1932,7 +1932,7 @@
    (clobber (match_scratch:VSF 3 "=&r"))
    (clobber (match_scratch:VSF 4 "=&r"))
    (clobber (scratch:VSF))]
-  "flag_unsafe_math_optimizations"
+  "GCC_OPTION (flag_unsafe_math_optimizations)"
   "#"
   "reload_completed"
   [(set (match_dup:VSF 0)
@@ -1957,7 +1957,7 @@
    (clobber (match_scratch:VSF 3 "=&r"))
    (clobber (match_scratch:VSF 4 "=&r"))
    (clobber (match_scratch:VSF 5 "=&r"))]
-  "!flag_unsafe_math_optimizations"
+  "!GCC_OPTION (flag_unsafe_math_optimizations)"
   "#"
   "reload_completed"
   [(set (match_dup:VSF 0)
@@ -3107,7 +3107,7 @@
 
         emit_insn (gen_andv4si3 (a_abs, ra, sign_mask));
         emit_insn (gen_andv4si3 (b_abs, rb, sign_mask));
-	if (!flag_finite_math_only)
+	if (!GCC_OPTION (flag_finite_math_only))
           {
             emit_insn (gen_clgt_v4si (a_nan, a_abs, nan_mask));
             emit_insn (gen_ceq_v4si (ahi_inf, a_abs, nan_mask));
@@ -3122,7 +3122,7 @@
 				GEN_INT (4 * 8)));
         emit_insn (gen_andv4si3 (iszero, iszero, temp_v4si));
         emit_insn (gen_iorv4si3 (temp2, biteq, iszero));
-	if (!flag_finite_math_only)
+	if (!GCC_OPTION (flag_finite_math_only))
           {
             emit_insn (gen_andc_v4si (temp2, temp2, a_nan));
 	  }
@@ -3393,7 +3393,7 @@ selb\t%0,%5,%0,%3"
       emit_insn (gen_andv4si3 (a_abs, ra, sign_mask));
       emit_insn (gen_andv4si3 (b_abs, rb, sign_mask));
 
-      if (!flag_finite_math_only)
+      if (!GCC_OPTION (flag_finite_math_only))
 	{
 	  /* check if ra is NaN  */
           emit_insn (gen_ceq_v4si (hi_inf, a_abs, nan_mask));
@@ -3439,7 +3439,7 @@ selb\t%0,%5,%0,%3"
       emit_insn (gen_andv4si3 (temp2, temp2, temp_v4si));
       emit_insn (gen_iorv4si3 (temp2, gt_hi, temp2));
       emit_insn (gen_shufb (temp2, temp2, temp2, hi_promote));
-      if (!flag_finite_math_only)
+      if (!GCC_OPTION (flag_finite_math_only))
         {
 	  /* correct for NaNs  */
           emit_insn (gen_andc_v4si (temp2, temp2, a_nan));
@@ -4049,7 +4049,7 @@ selb\t%0,%4,%0,%3"
     emit_insn (gen_ashlsi3(sindex, index, GEN_INT (2)));
     emit_move_insn (addr, gen_rtx_MEM (SImode,
 				       gen_rtx_PLUS (SImode, table, sindex)));
-    if (flag_pic)
+    if (GCC_OPTION (flag_pic))
       emit_insn (gen_addsi3 (addr, addr, table));
 
     emit_cmp_and_jump_insns (index, operands[2], GTU, NULL_RTX, SImode, 1, operands[4]);
@@ -4497,7 +4497,7 @@ selb\t%0,%4,%0,%3"
       adjusted by modifying this register prior to the loop.
 .     ??? The possible introduction of a new block to initialize the
       new IV can potentially effects branch optimizations.  */
-   if (optimize > 0 && flag_modulo_sched)
+   if (GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_modulo_sched))
    {
      rtx s0;
      rtx bcomp;
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index 6a64fcc..2a4b332 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -1052,7 +1052,7 @@ xstormy16_expand_prologue (void)
   if (layout.locals_size >= 32768)
     error ("local variable memory requirements exceed capacity");
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = layout.frame_size;
 
   /* Save the argument registers if necessary.  */
diff --git a/gcc/config/tilegx/tilegx.c b/gcc/config/tilegx/tilegx.c
index c3b7126..9fabae2 100644
--- a/gcc/config/tilegx/tilegx.c
+++ b/gcc/config/tilegx/tilegx.c
@@ -85,18 +85,18 @@ tilegx_option_override (void)
 {
   if (global_options_set.x_tilegx_cmodel)
     {
-      switch (tilegx_cmodel)
+      switch (GCC_OPTION (tilegx_cmodel))
 	{
 	case CM_SMALL:
 	case CM_SMALL_PIC:
-	  if (flag_pic)
-	    tilegx_cmodel = CM_SMALL_PIC;
+	  if (GCC_OPTION (flag_pic))
+	    GCC_OPTION (tilegx_cmodel) = CM_SMALL_PIC;
 	  break;
 
 	case CM_LARGE:
 	case CM_LARGE_PIC:
-	  if (flag_pic)
-	    tilegx_cmodel = CM_LARGE_PIC;
+	  if (GCC_OPTION (flag_pic))
+	    GCC_OPTION (tilegx_cmodel) = CM_LARGE_PIC;
 	  break;
 
 	default:
@@ -104,12 +104,12 @@ tilegx_option_override (void)
 	}
     }
   else
-    tilegx_cmodel = flag_pic ? CM_SMALL_PIC : CM_SMALL;
+    GCC_OPTION (tilegx_cmodel) = GCC_OPTION (flag_pic) ? CM_SMALL_PIC : CM_SMALL;
 
   /* When modulo scheduling is enabled, we still rely on regular
      scheduler for bundling.  */
-  if (flag_modulo_sched)
-    flag_resched_modulo_sched = 1;
+  if (GCC_OPTION (flag_modulo_sched))
+    GCC_OPTION (flag_resched_modulo_sched) = 1;
 }
 
 
@@ -158,7 +158,7 @@ tilegx_cannot_force_const_mem (enum machine_mode mode ATTRIBUTE_UNUSED,
 static bool
 tilegx_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
 {
-  return (tilegx_cmodel != CM_LARGE && tilegx_cmodel != CM_LARGE_PIC
+  return (GCC_OPTION (tilegx_cmodel) != CM_LARGE && GCC_OPTION (tilegx_cmodel) != CM_LARGE_PIC
 	  && (decl != NULL));
 }
 
@@ -346,12 +346,12 @@ tilegx_build_builtin_va_list (void)
 
   /* We know this is being padded and we want it too.  It is an
      internal type so hide the warnings from the user.  */
-  owp = warn_padded;
-  warn_padded = false;
+  owp = GCC_OPTION (warn_padded);
+  GCC_OPTION (warn_padded) = false;
 
   layout_type (record);
 
-  warn_padded = owp;
+  GCC_OPTION (warn_padded) = owp;
 
   /* The correct type is an array type of one element.  */
   return record;
@@ -747,7 +747,7 @@ tilegx_init_expanders (void)
      status.  */
   init_machine_status = tilegx_init_machine_status;
 
-  if (cfun && cfun->machine && flag_pic)
+  if (cfun && cfun->machine && GCC_OPTION (flag_pic))
     {
       static int label_num = 0;
 
@@ -968,7 +968,7 @@ static rtx
 tilegx_tls_got (void)
 {
   rtx temp;
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       crtl->uses_pic_offset_table = 1;
       return tilegx_got_rtx ();
@@ -1144,7 +1144,7 @@ tilegx_compute_pcrel_address (rtx result, rtx addr)
 					    text_label_rtx,
 					    addr, text_label_symbol));
     }
-  else if (tilegx_cmodel == CM_LARGE_PIC)
+  else if (GCC_OPTION (tilegx_cmodel) == CM_LARGE_PIC)
     {
       temp3 = create_temp_reg_if_possible (Pmode, result);
       emit_insn (gen_mov_large_pcrel_step1 (temp, addr, text_label_symbol));
@@ -1247,8 +1247,8 @@ tilegx_legitimize_pic_address (rtx orig,
 	     optimized properly.  */
 	  rtx temp_reg = create_temp_reg_if_possible (Pmode, reg);
 
-	  gcc_assert (flag_pic);
-	  if (flag_pic == 1)
+	  gcc_assert (GCC_OPTION (flag_pic));
+	  if (GCC_OPTION (flag_pic) == 1)
 	    {
 	      if (TARGET_32BIT)
 		{
@@ -1371,7 +1371,7 @@ tilegx_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
     {
       return tilegx_legitimize_tls_address (x);
     }
-  else if (flag_pic)
+  else if (GCC_OPTION (flag_pic))
     {
       return tilegx_legitimize_pic_address (x, mode, 0);
     }
@@ -1427,12 +1427,12 @@ tilegx_delegitimize_address (rtx x)
 static void
 load_pic_register (bool delay_pic_helper ATTRIBUTE_UNUSED)
 {
-  int orig_flag_pic = flag_pic;
+  int orig_flag_pic = GCC_OPTION (flag_pic);
 
   rtx got_symbol = tilegx_got_symbol ();
   rtx text_label_symbol = tilegx_text_label_symbol ();
   rtx text_label_rtx = tilegx_text_label_rtx ();
-  flag_pic = 0;
+  GCC_OPTION (flag_pic) = 0;
 
   if (TARGET_32BIT)
     {
@@ -1446,7 +1446,7 @@ load_pic_register (bool delay_pic_helper ATTRIBUTE_UNUSED)
 
   tilegx_compute_pcrel_address (tilegx_got_rtx (), got_symbol);
 
-  flag_pic = orig_flag_pic;
+  GCC_OPTION (flag_pic) = orig_flag_pic;
 
   /* Need to emit this whether or not we obey regdecls, since
      setjmp/longjmp can cause life info to screw up.  ??? In the case
@@ -1828,7 +1828,7 @@ tilegx_expand_mov (enum machine_mode mode, rtx *operands)
     }
 
   /* Fixup PIC cases.  */
-  if (flag_pic && CONSTANT_P (operands[1]))
+  if (GCC_OPTION (flag_pic) && CONSTANT_P (operands[1]))
     {
       if (tilegx_pic_address_needs_scratch (operands[1]))
 	operands[1] = tilegx_legitimize_pic_address (operands[1], mode, 0);
@@ -2747,7 +2747,7 @@ tilegx_output_cbranch (rtx insn, rtx *operands, bool reversed)
 void
 tilegx_expand_tablejump (rtx op0, rtx op1)
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       rtx temp = gen_reg_rtx (Pmode);
       rtx temp2 = gen_reg_rtx (Pmode);
@@ -3676,7 +3676,7 @@ need_to_save_reg (unsigned int regno)
       && df_regs_ever_live_p (regno))
     return true;
 
-  if (flag_pic
+  if (GCC_OPTION (flag_pic)
       && (regno == PIC_OFFSET_TABLE_REGNUM
 	  || regno == TILEGX_PIC_TEXT_LABEL_REGNUM)
       && (crtl->uses_pic_offset_table || crtl->saves_all_registers))
@@ -3997,7 +3997,7 @@ tilegx_expand_prologue (void)
 
   int total_size = compute_total_frame_size ();
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = total_size;
 
   /* Save lr first in its special location because code after this
@@ -4009,7 +4009,7 @@ tilegx_expand_prologue (void)
   if (total_size == 0)
     {
       /* Load the PIC register if needed.  */
-      if (flag_pic && crtl->uses_pic_offset_table)
+      if (GCC_OPTION (flag_pic) && crtl->uses_pic_offset_table)
 	load_pic_register (false);
 
       return;
@@ -4131,7 +4131,7 @@ tilegx_expand_prologue (void)
     emit_insn (gen_blockage ());
 
   /* Load the PIC register if needed.  */
-  if (flag_pic && crtl->uses_pic_offset_table)
+  if (GCC_OPTION (flag_pic) && crtl->uses_pic_offset_table)
     load_pic_register (false);
 }
 
@@ -4266,7 +4266,7 @@ tilegx_expand_epilogue (bool sibcall_p)
     }
 
   /* Mark the pic registers as live outside of the function.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       emit_use (cfun->machine->text_label_rtx);
       emit_use (cfun->machine->got_rtx);
@@ -4572,7 +4572,7 @@ replace_mov_pcrel_step1 (rtx insn)
 
   start_sequence ();
 
-  if (flag_pic != 1)
+  if (GCC_OPTION (flag_pic) != 1)
     {
       if (TARGET_32BIT)
 	emit_insn (gen_mov_got32_step1_32bit (opnds[0], opnds[1]));
@@ -4649,7 +4649,7 @@ replace_mov_pcrel_step2 (rtx insn)
 
   start_sequence ();
 
-  if (flag_pic == 1)
+  if (GCC_OPTION (flag_pic) == 1)
     {
       if (TARGET_32BIT)
 	emit_insn (gen_add_got16_32bit (opnds[0], got_rtx, opnds[2]));
@@ -4708,7 +4708,7 @@ replace_mov_pcrel_step3 (rtx insn)
 
   start_sequence ();
 
-  if (flag_pic == 1)
+  if (GCC_OPTION (flag_pic) == 1)
     {
       emit_move_insn (opnds[0], gen_const_mem (Pmode, opnds[2]));
     }
@@ -4864,12 +4864,12 @@ tilegx_reorg (void)
      now.  */
   compute_bb_for_insn ();
 
-  if (flag_reorder_blocks_and_partition)
+  if (GCC_OPTION (flag_reorder_blocks_and_partition))
     {
       tilegx_fixup_pcrel_references ();
     }
 
-  if (flag_schedule_insns_after_reload)
+  if (GCC_OPTION (flag_schedule_insns_after_reload))
     {
       split_all_insns ();
 
@@ -4883,7 +4883,7 @@ tilegx_reorg (void)
 
   df_analyze ();
 
-  if (flag_var_tracking)
+  if (GCC_OPTION (flag_var_tracking))
     {
       timevar_push (TV_VAR_TRACKING);
       variable_tracking_main ();
@@ -5370,10 +5370,10 @@ tilegx_print_operand (FILE *file, rtx x, int code)
     case 'p':
       if (GET_CODE (x) == SYMBOL_REF)
 	{
-	  if (flag_pic && !SYMBOL_REF_LOCAL_P (x))
+	  if (GCC_OPTION (flag_pic) && !SYMBOL_REF_LOCAL_P (x))
 	    fprintf (file, "plt(");
 	  output_addr_const (file, x);
-	  if (flag_pic && !SYMBOL_REF_LOCAL_P (x))
+	  if (GCC_OPTION (flag_pic) && !SYMBOL_REF_LOCAL_P (x))
 	    fprintf (file, ")");
 	}
       else
@@ -5517,7 +5517,7 @@ tilegx_function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED)
       fprintf (file, "\t}\n");
     }
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       fprintf (file,
 	       "\t{\n"
diff --git a/gcc/config/tilegx/tilegx.h b/gcc/config/tilegx/tilegx.h
index f241fe4..d832396 100644
--- a/gcc/config/tilegx/tilegx.h
+++ b/gcc/config/tilegx/tilegx.h
@@ -168,8 +168,8 @@
 
 /* Register that holds an address into the text segment that can be
    used by pic code.  */
-#define TILEGX_PIC_TEXT_LABEL_REGNUM (flag_pic ? 50 : INVALID_REGNUM)
-#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 51 : INVALID_REGNUM)
+#define TILEGX_PIC_TEXT_LABEL_REGNUM (GCC_OPTION (flag_pic) ? 50 : INVALID_REGNUM)
+#define PIC_OFFSET_TABLE_REGNUM (GCC_OPTION (flag_pic) ? 51 : INVALID_REGNUM)
 #define HARD_FRAME_POINTER_REGNUM 52
 #define THREAD_POINTER_REGNUM 53
 #define STACK_POINTER_REGNUM 54
diff --git a/gcc/config/tilegx/tilegx.md b/gcc/config/tilegx/tilegx.md
index 94946bb..3911e0d 100644
--- a/gcc/config/tilegx/tilegx.md
+++ b/gcc/config/tilegx/tilegx.md
@@ -974,7 +974,7 @@
 			[(match_operand:I48MODE 1 "symbolic_operand" "")
 			 (match_operand:I48MODE 2 "symbolic_operand" "")]
                         UNSPEC_HW1_LAST_PCREL)))]
-  "flag_pic")
+  "GCC_OPTION (flag_pic)")
   
 (define_expand "mov_pcrel_step2<bitsuffix>"
   [(set (match_operand:I48MODE 0 "register_operand" "")
@@ -985,7 +985,7 @@
 			    (match_operand:I48MODE 3 "symbolic_operand" "")]
 			   UNSPEC_HW0_PCREL))]
 	 UNSPEC_INSN_ADDR_SHL16INSLI))]
-  "flag_pic")
+  "GCC_OPTION (flag_pic)")
 
 (define_insn "mov_pcrel_step3<bitsuffix>"
   [(set (match_operand:I48MODE 0 "register_operand" "=r")
@@ -994,7 +994,7 @@
 			 (match_operand:I48MODE 3 "symbolic_operand" "in")
 			 (match_operand:I48MODE 4 "symbolic_operand" "in")]
                         UNSPEC_MOV_PCREL_STEP3))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "add<x>\t%0, %r1, %r2")
 
 ;; The next three patterns are used to to materialize a position
@@ -1007,7 +1007,7 @@
 		   [(match_operand:DI 1 "symbolic_operand" "")
 		    (match_operand:DI 2 "symbolic_operand" "")]
 		   UNSPEC_HW2_LAST_PCREL)))]
-  "flag_pic")
+  "GCC_OPTION (flag_pic)")
   
 (define_expand "mov_large_pcrel_step2"
   [(set (match_operand:DI 0 "register_operand" "")
@@ -1018,7 +1018,7 @@
 		       (match_operand:DI 3 "symbolic_operand" "")]
 		      UNSPEC_HW1_PCREL))]
 	 UNSPEC_INSN_ADDR_SHL16INSLI))]
-  "flag_pic")
+  "GCC_OPTION (flag_pic)")
 
 ;; Note: step 3 is same as move_pcrel_step2.
 (define_expand "mov_large_pcrel_step3"
@@ -1030,7 +1030,7 @@
 		       (match_operand:DI 3 "symbolic_operand" "")]
 		      UNSPEC_HW0_PCREL))]
 	 UNSPEC_INSN_ADDR_SHL16INSLI))]
-  "flag_pic")
+  "GCC_OPTION (flag_pic)")
 
 (define_insn "mov_large_pcrel_step4"
   [(set (match_operand:DI 0 "register_operand" "=r")
@@ -1039,7 +1039,7 @@
 			 (match_operand:DI 3 "symbolic_operand" "in")
 			 (match_operand:DI 4 "symbolic_operand" "in")]
 		   UNSPEC_MOV_LARGE_PCREL_STEP4))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "add\t%0, %r1, %r2")
 
 ;; The next three patterns are used to materialize a position
@@ -1051,7 +1051,7 @@
 			[(match_operand:DI 1 "symbolic_operand" "")
 			 (match_operand:DI 2 "symbolic_operand" "")]
                         UNSPEC_HW2_LAST_PLT_PCREL)))]
-  "flag_pic")
+  "GCC_OPTION (flag_pic)")
   
 (define_expand "mov_plt_pcrel_step2"
   [(set (match_operand:DI 0 "register_operand" "")
@@ -1062,7 +1062,7 @@
 			    (match_operand:DI 3 "symbolic_operand" "")]
 		      UNSPEC_HW1_PLT_PCREL))]
 	 UNSPEC_INSN_ADDR_SHL16INSLI))]
-  "flag_pic")
+  "GCC_OPTION (flag_pic)")
 
 (define_expand "mov_plt_pcrel_step3"
   [(set (match_operand:DI 0 "register_operand" "")
@@ -1073,7 +1073,7 @@
 			    (match_operand:DI 3 "symbolic_operand" "")]
 		      UNSPEC_HW0_PLT_PCREL))]
 	 UNSPEC_INSN_ADDR_SHL16INSLI))]
-  "flag_pic")
+  "GCC_OPTION (flag_pic)")
 
 ;; The next two patterns are used to materialize a position independent
 ;; 32-bit plt address by adding the difference of two labels to a base
@@ -1084,7 +1084,7 @@
 			[(match_operand:SI 1 "symbolic_operand" "")
 			 (match_operand:SI 2 "symbolic_operand" "")]
                         UNSPEC_HW1_LAST_PLT_PCREL)))]
-  "flag_pic")
+  "GCC_OPTION (flag_pic)")
   
 (define_expand "mov_plt_pcrel_step2_32bit"
   [(set (match_operand:SI 0 "register_operand" "")
@@ -1095,7 +1095,7 @@
 			    (match_operand:SI 3 "symbolic_operand" "")]
 		      UNSPEC_HW0_PLT_PCREL))]
 	 UNSPEC_INSN_ADDR_SHL16INSLI))]
-  "flag_pic")
+  "GCC_OPTION (flag_pic)")
 
 (define_expand "add_got16<bitsuffix>"
   [(set (match_operand:I48MODE 0 "register_operand" "")
@@ -1104,14 +1104,14 @@
 	 (const:I48MODE
 	  (unspec:I48MODE [(match_operand:I48MODE 2 "symbolic_operand" "")]
 			  UNSPEC_HW0_LAST_GOT))))]
-  "flag_pic == 1")
+  "GCC_OPTION (flag_pic) == 1")
 
 (define_expand "mov_got32_step1<bitsuffix>"
   [(set (match_operand:I48MODE 0 "register_operand" "")
 	(const:I48MODE
 	 (unspec:I48MODE [(match_operand:I48MODE 1 "symbolic_operand" "")]
 			 UNSPEC_HW1_LAST_GOT)))]
-  "flag_pic == 2")
+  "GCC_OPTION (flag_pic) == 2")
 
 (define_expand "mov_got32_step2<bitsuffix>"
   [(set (match_operand:I48MODE 0 "register_operand" "")
@@ -1121,7 +1121,7 @@
 	   (unspec:I48MODE [(match_operand:I48MODE 2 "symbolic_operand" "")]
 			   UNSPEC_HW0_GOT))]
 	 UNSPEC_INSN_ADDR_SHL16INSLI))]
-  "flag_pic == 2")
+  "GCC_OPTION (flag_pic) == 2")
 
 
 ;;
@@ -2429,7 +2429,7 @@
    (use (match_operand 1 "" ""))]   ;; label
    ""
 {
-  if (optimize > 0 && flag_modulo_sched)
+  if (GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_modulo_sched))
   {
      rtx s0;
      rtx bcomp;
@@ -2509,13 +2509,13 @@
   rtx addr;
   if (GET_CODE (orig_addr) == SYMBOL_REF)
     {
-      if (tilegx_cmodel == CM_LARGE)
+      if (GCC_OPTION (tilegx_cmodel) == CM_LARGE)
         {
           addr = gen_reg_rtx (Pmode);
           tilegx_expand_set_const64 (addr, orig_addr);
           operands[0] = gen_rtx_MEM (DImode, addr);
         }
-      else if (tilegx_cmodel == CM_LARGE_PIC)
+      else if (GCC_OPTION (tilegx_cmodel) == CM_LARGE_PIC)
         {
           crtl->uses_pic_offset_table = 1;
           addr = gen_reg_rtx (Pmode);
@@ -2551,13 +2551,13 @@
   rtx addr;
   if (GET_CODE (orig_addr) == SYMBOL_REF)
     {
-      if (tilegx_cmodel == CM_LARGE)
+      if (GCC_OPTION (tilegx_cmodel) == CM_LARGE)
         {
           addr = gen_reg_rtx (Pmode);
           tilegx_expand_set_const64 (addr, orig_addr);
           operands[1] = gen_rtx_MEM (DImode, addr);
         }
-      else if (tilegx_cmodel == CM_LARGE_PIC)
+      else if (GCC_OPTION (tilegx_cmodel) == CM_LARGE_PIC)
         {
           crtl->uses_pic_offset_table = 1;
           addr = gen_reg_rtx (Pmode);
diff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c
index 74f8800..8ef5f7e 100644
--- a/gcc/config/tilepro/tilepro.c
+++ b/gcc/config/tilepro/tilepro.c
@@ -86,8 +86,8 @@ tilepro_option_override (void)
 {
   /* When modulo scheduling is enabled, we still rely on regular
      scheduler for bundling.  */
-  if (flag_modulo_sched)
-    flag_resched_modulo_sched = 1;
+  if (GCC_OPTION (flag_modulo_sched))
+    GCC_OPTION (flag_resched_modulo_sched) = 1;
 }
 
 
@@ -299,12 +299,12 @@ tilepro_build_builtin_va_list (void)
 
   /* We know this is being padded and we want it too.  It is an
      internal type so hide the warnings from the user.  */
-  owp = warn_padded;
-  warn_padded = false;
+  owp = GCC_OPTION (warn_padded);
+  GCC_OPTION (warn_padded) = false;
 
   layout_type (record);
 
-  warn_padded = owp;
+  GCC_OPTION (warn_padded) = owp;
 
   /* The correct type is an array type of one element.  */
   return record;
@@ -686,7 +686,7 @@ tilepro_init_expanders (void)
      status.  */
   init_machine_status = tilepro_init_machine_status;
 
-  if (cfun && cfun->machine && flag_pic)
+  if (cfun && cfun->machine && GCC_OPTION (flag_pic))
     {
       static int label_num = 0;
 
@@ -869,7 +869,7 @@ static rtx
 tilepro_tls_got (void)
 {
   rtx temp;
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       crtl->uses_pic_offset_table = 1;
       return tilepro_got_rtx ();
@@ -1025,8 +1025,8 @@ tilepro_legitimize_pic_address (rtx orig,
 	     optimized properly.  */
 	  rtx temp_reg = create_temp_reg_if_possible (Pmode, reg);
 
-	  gcc_assert (flag_pic);
-	  if (flag_pic == 1)
+	  gcc_assert (GCC_OPTION (flag_pic));
+	  if (GCC_OPTION (flag_pic) == 1)
 	    {
 	      emit_insn (gen_add_got16 (temp_reg,
 					tilepro_got_rtx (), orig));
@@ -1136,7 +1136,7 @@ tilepro_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
     {
       return tilepro_legitimize_tls_address (x);
     }
-  else if (flag_pic)
+  else if (GCC_OPTION (flag_pic))
     {
       return tilepro_legitimize_pic_address (x, mode, 0);
     }
@@ -1173,12 +1173,12 @@ tilepro_delegitimize_address (rtx x)
 static void
 load_pic_register (bool delay_pic_helper ATTRIBUTE_UNUSED)
 {
-  int orig_flag_pic = flag_pic;
+  int orig_flag_pic = GCC_OPTION (flag_pic);
 
   rtx got_symbol = tilepro_got_symbol ();
   rtx text_label_symbol = tilepro_text_label_symbol ();
   rtx text_label_rtx = tilepro_text_label_rtx ();
-  flag_pic = 0;
+  GCC_OPTION (flag_pic) = 0;
 
   emit_insn (gen_insn_lnk_and_label (text_label_rtx, text_label_symbol));
 
@@ -1189,7 +1189,7 @@ load_pic_register (bool delay_pic_helper ATTRIBUTE_UNUSED)
 			     tilepro_got_rtx (),
 			     got_symbol, text_label_symbol));
 
-  flag_pic = orig_flag_pic;
+  GCC_OPTION (flag_pic) = orig_flag_pic;
 
   /* Need to emit this whether or not we obey regdecls, since
      setjmp/longjmp can cause life info to screw up.  ??? In the case
@@ -1491,7 +1491,7 @@ tilepro_expand_mov (enum machine_mode mode, rtx *operands)
     }
 
   /* Fixup PIC cases.  */
-  if (flag_pic && CONSTANT_P (operands[1]))
+  if (GCC_OPTION (flag_pic) && CONSTANT_P (operands[1]))
     {
       if (tilepro_pic_address_needs_scratch (operands[1]))
 	operands[1] = tilepro_legitimize_pic_address (operands[1], mode, 0);
@@ -1508,7 +1508,7 @@ tilepro_expand_mov (enum machine_mode mode, rtx *operands)
     }
 
   /* Fixup for UNSPEC addresses.  */
-  if (flag_pic
+  if (GCC_OPTION (flag_pic)
       && GET_CODE (operands[1]) == HIGH
       && GET_CODE (XEXP (operands[1], 0)) == CONST
       && GET_CODE (XEXP (XEXP (operands[1], 0), 0)) == UNSPEC)
@@ -1522,7 +1522,7 @@ tilepro_expand_mov (enum machine_mode mode, rtx *operands)
 				     XVECEXP (unspec, 0, 1)));
 	  return true;
 	}
-      else if (flag_pic == 2 && unspec_num == UNSPEC_GOT32_SYM)
+      else if (GCC_OPTION (flag_pic) == 2 && unspec_num == UNSPEC_GOT32_SYM)
 	{
 	  emit_insn (gen_addhi_got32 (operands[0], const0_rtx,
 				      XVECEXP (unspec, 0, 0)));
@@ -2555,7 +2555,7 @@ tilepro_output_cbranch (rtx insn, rtx *operands, bool reversed)
 void
 tilepro_expand_tablejump (rtx op0, rtx op1)
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       rtx table = gen_rtx_LABEL_REF (Pmode, op1);
       rtx temp = gen_reg_rtx (Pmode);
@@ -3221,7 +3221,7 @@ need_to_save_reg (unsigned int regno)
       && df_regs_ever_live_p (regno))
     return true;
 
-  if (flag_pic
+  if (GCC_OPTION (flag_pic)
       && (regno == PIC_OFFSET_TABLE_REGNUM
 	  || regno == TILEPRO_PIC_TEXT_LABEL_REGNUM)
       && (crtl->uses_pic_offset_table || crtl->saves_all_registers))
@@ -3536,7 +3536,7 @@ tilepro_expand_prologue (void)
 
   int total_size = compute_total_frame_size ();
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = total_size;
 
   /* Save lr first in its special location because code after this
@@ -3548,7 +3548,7 @@ tilepro_expand_prologue (void)
   if (total_size == 0)
     {
       /* Load the PIC register if needed.  */
-      if (flag_pic && crtl->uses_pic_offset_table)
+      if (GCC_OPTION (flag_pic) && crtl->uses_pic_offset_table)
 	load_pic_register (false);
 
       return;
@@ -3669,7 +3669,7 @@ tilepro_expand_prologue (void)
     emit_insn (gen_blockage ());
 
   /* Load the PIC register if needed.  */
-  if (flag_pic && crtl->uses_pic_offset_table)
+  if (GCC_OPTION (flag_pic) && crtl->uses_pic_offset_table)
     load_pic_register (false);
 }
 
@@ -3791,7 +3791,7 @@ tilepro_expand_epilogue (bool sibcall_p)
     }
 
   /* Mark the pic registers as live outside of the function.  */
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       emit_use (cfun->machine->text_label_rtx);
       emit_use (cfun->machine->got_rtx);
@@ -4037,7 +4037,7 @@ replace_pc_relative_symbol_ref (rtx insn, rtx opnds[4], bool first_insn_p)
 
   start_sequence ();
 
-  if (flag_pic == 1)
+  if (GCC_OPTION (flag_pic) == 1)
     {
       if (!first_insn_p)
 	{
@@ -4320,12 +4320,12 @@ tilepro_reorg (void)
      now.  */
   compute_bb_for_insn ();
 
-  if (flag_reorder_blocks_and_partition)
+  if (GCC_OPTION (flag_reorder_blocks_and_partition))
     {
       tilepro_fixup_pcrel_references ();
     }
 
-  if (flag_schedule_insns_after_reload)
+  if (GCC_OPTION (flag_schedule_insns_after_reload))
     {
       split_all_insns ();
 
@@ -4339,7 +4339,7 @@ tilepro_reorg (void)
 
   df_analyze ();
 
-  if (flag_var_tracking)
+  if (GCC_OPTION (flag_var_tracking))
     {
       timevar_push (TV_VAR_TRACKING);
       variable_tracking_main ();
@@ -4694,10 +4694,10 @@ tilepro_print_operand (FILE *file, rtx x, int code)
     case 'p':
       if (GET_CODE (x) == SYMBOL_REF)
 	{
-	  if (flag_pic && !SYMBOL_REF_LOCAL_P (x))
+	  if (GCC_OPTION (flag_pic) && !SYMBOL_REF_LOCAL_P (x))
 	    fprintf (file, "plt(");
 	  output_addr_const (file, x);
-	  if (flag_pic && !SYMBOL_REF_LOCAL_P (x))
+	  if (GCC_OPTION (flag_pic) && !SYMBOL_REF_LOCAL_P (x))
 	    fprintf (file, ")");
 	}
       else
@@ -4925,7 +4925,7 @@ tilepro_function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED)
       fprintf (file, "\t}\n");
     }
 
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       fprintf (file,
 	       "\t{\n"
diff --git a/gcc/config/tilepro/tilepro.h b/gcc/config/tilepro/tilepro.h
index 0c5e87c..afb5e18 100644
--- a/gcc/config/tilepro/tilepro.h
+++ b/gcc/config/tilepro/tilepro.h
@@ -134,8 +134,8 @@
 
 /* Register that holds an address into the text segment that can be
    used by pic code.  */
-#define TILEPRO_PIC_TEXT_LABEL_REGNUM (flag_pic ? 50 : INVALID_REGNUM)
-#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 51 : INVALID_REGNUM)
+#define TILEPRO_PIC_TEXT_LABEL_REGNUM (GCC_OPTION (flag_pic) ? 50 : INVALID_REGNUM)
+#define PIC_OFFSET_TABLE_REGNUM (GCC_OPTION (flag_pic) ? 51 : INVALID_REGNUM)
 #define HARD_FRAME_POINTER_REGNUM 52
 #define THREAD_POINTER_REGNUM 53
 #define STACK_POINTER_REGNUM 54
diff --git a/gcc/config/tilepro/tilepro.md b/gcc/config/tilepro/tilepro.md
index 314dd90..89ed253 100644
--- a/gcc/config/tilepro/tilepro.md
+++ b/gcc/config/tilepro/tilepro.md
@@ -1321,7 +1321,7 @@
    (use (match_operand 1 "" ""))]   ;; label
    ""
 {
-  if (optimize > 0)
+  if (GCC_OPTION (optimize) > 0)
   {
      rtx s0;
      rtx bcomp;
@@ -3583,7 +3583,7 @@
 	  (unspec:SI [(match_operand:SI 2 "symbolic_operand" "")
 		      (match_operand:SI 3 "symbolic_operand" "")]
 		     UNSPEC_PCREL_SYM))))]
-  "flag_pic")
+  "GCC_OPTION (flag_pic)")
 
 (define_expand "auli_pcrel"
   [(set (match_operand:SI 0 "register_operand" "")
@@ -3594,7 +3594,7 @@
 	   (unspec:SI [(match_operand:SI 2 "symbolic_operand" "")
 		       (match_operand:SI 3 "symbolic_operand" "")]
                       UNSPEC_PCREL_SYM)))))]
-  "flag_pic")
+  "GCC_OPTION (flag_pic)")
 
 (define_expand "add_got16"
   [(set (match_operand:SI 0 "register_operand" "")
@@ -3602,7 +3602,7 @@
 	 (match_operand:SI 1 "reg_or_0_operand" "")
 	 (const:SI (unspec:SI [(match_operand:SI 2 "symbolic_operand" "")]
 			      UNSPEC_GOT16_SYM))))]
-  "flag_pic == 1")
+  "GCC_OPTION (flag_pic) == 1")
 
 (define_expand "addhi_got32"
   [(set (match_operand:SI 0 "register_operand" "")
@@ -3611,7 +3611,7 @@
 	 (high:SI
 	  (const:SI (unspec:SI [(match_operand:SI 2 "symbolic_operand" "")]
 			       UNSPEC_GOT32_SYM)))))]
-  "flag_pic == 2")
+  "GCC_OPTION (flag_pic) == 2")
 
 (define_expand "addlo_got32"
   [(set (match_operand:SI 0 "register_operand" "")
@@ -3619,7 +3619,7 @@
 	 (match_operand:SI 1 "reg_or_0_operand" "")
 	 (const:SI (unspec:SI [(match_operand:SI 2 "symbolic_operand" "")]
 			      UNSPEC_GOT32_SYM))))]
-  "flag_pic == 2")
+  "GCC_OPTION (flag_pic) == 2")
 
 
 ;;
diff --git a/gcc/config/v850/predicates.md b/gcc/config/v850/predicates.md
index 1e16c1c..f3ba1e7 100644
--- a/gcc/config/v850/predicates.md
+++ b/gcc/config/v850/predicates.md
@@ -85,7 +85,7 @@
   (match_code "reg,symbol_ref")
 {
   /* Only registers are valid call operands if TARGET_LONG_CALLS.  */
-  if (TARGET_LONG_CALLS)
+  if (GCC_OPTION (TARGET_LONG_CALLS))
     return GET_CODE (op) == REG;
   return (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == REG);
 })
@@ -165,7 +165,7 @@
 
   /* If there are no registers to save then the function prologue
      is not suitable.  */
-  if (count <= (TARGET_LONG_CALLS ? 3 : 2))
+  if (count <= (GCC_OPTION (TARGET_LONG_CALLS) ? 3 : 2))
     return 0;
 
   /* The pattern matching has already established that we are adjusting the
@@ -182,7 +182,7 @@
 
      */
 
-  for (i = 2; i < count - (TARGET_LONG_CALLS ? 2: 1); i++)
+  for (i = 2; i < count - (GCC_OPTION (TARGET_LONG_CALLS) ? 2: 1); i++)
     {
       rtx dest;
       rtx src;
@@ -230,7 +230,7 @@
       || REGNO (XEXP (vector_element, 0)) != 10)
     return 0;
 
-  if (TARGET_LONG_CALLS)
+  if (GCC_OPTION (TARGET_LONG_CALLS))
     {
       vector_element = XVECEXP (op, 0, i++);
 
diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c
index eb19326..3240ecc 100644
--- a/gcc/config/v850/v850.c
+++ b/gcc/config/v850/v850.c
@@ -1130,7 +1130,7 @@ substitute_ep_register (rtx first_insn,
       *p_ep = gen_rtx_REG (Pmode, 30);
     }
 
-  if (TARGET_DEBUG)
+  if (GCC_OPTION (TARGET_DEBUG))
     fprintf (stderr, "\
 Saved %d bytes (%d uses of register %s) in function %s, starting as insn %d, ending at %d\n",
 	     2 * (uses - 3), uses, reg_names[regno],
@@ -1590,7 +1590,7 @@ use_prolog_function (int num_save, int frame_size)
   if (! TARGET_DISABLE_CALLT)
       save_func_len = restore_func_len = 2;
   else
-      save_func_len = restore_func_len = TARGET_LONG_CALLS ? (4+4+4+2+2) : 4;
+      save_func_len = restore_func_len = GCC_OPTION (TARGET_LONG_CALLS) ? (4+4+4+2+2) : 4;
 
   if (unalloc_stack)
     {
@@ -1654,7 +1654,7 @@ expand_prologue (void)
 
   actual_fsize = compute_frame_size (size, &reg_saved);
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     current_function_static_stack_size = actual_fsize;
 
   /* Save/setup global registers for interrupt functions right now.  */
@@ -1711,7 +1711,7 @@ expand_prologue (void)
 	  save_all = gen_rtx_PARALLEL
 	    (VOIDmode,
 	     rtvec_alloc (num_save + 1
-			  + (TARGET_DISABLE_CALLT ? (TARGET_LONG_CALLS ? 2 : 1) : 0)));
+			  + (TARGET_DISABLE_CALLT ? (GCC_OPTION (TARGET_LONG_CALLS) ? 2 : 1) : 0)));
 
 	  XVECEXP (save_all, 0, 0)
 	    = gen_rtx_SET (VOIDmode,
@@ -1736,7 +1736,7 @@ expand_prologue (void)
 	      XVECEXP (save_all, 0, num_save + 1)
 		= gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (Pmode, 10));
 
-	      if (TARGET_LONG_CALLS)
+	      if (GCC_OPTION (TARGET_LONG_CALLS))
 		XVECEXP (save_all, 0, num_save + 2)
 		  = gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (Pmode, 11));
 	    }
@@ -2208,13 +2208,13 @@ v850_encode_data_area (tree decl, rtx symbol)
 	  if (size <= 0)
 	    ;
 
-	  else if (size <= small_memory_max [(int) SMALL_MEMORY_TDA])
+	  else if (size <= GCC_OPTION (small_memory_max) [(int) SMALL_MEMORY_TDA])
 	    v850_set_data_area (decl, DATA_AREA_TDA);
 
-	  else if (size <= small_memory_max [(int) SMALL_MEMORY_SDA])
+	  else if (size <= GCC_OPTION (small_memory_max) [(int) SMALL_MEMORY_SDA])
 	    v850_set_data_area (decl, DATA_AREA_SDA);
 
-	  else if (size <= small_memory_max [(int) SMALL_MEMORY_ZDA])
+	  else if (size <= GCC_OPTION (small_memory_max) [(int) SMALL_MEMORY_ZDA])
 	    v850_set_data_area (decl, DATA_AREA_ZDA);
 	}
       
@@ -2325,7 +2325,7 @@ construct_restore_jr (rtx op)
      be popping more registers than is strictly necessary, but
      it does save code space.  */
   
-  if (TARGET_LONG_CALLS)
+  if (GCC_OPTION (TARGET_LONG_CALLS))
     {
       char name[40];
       
@@ -2365,7 +2365,7 @@ construct_save_jarl (rtx op)
   int i;
   static char buff [100]; /* XXX */
   
-  if (count <= (TARGET_LONG_CALLS ? 3 : 2)) 
+  if (count <= (GCC_OPTION (TARGET_LONG_CALLS) ? 3 : 2)) 
     {
       error ("bogus JARL construction: %d", count);
       return NULL;
@@ -2382,7 +2382,7 @@ construct_save_jarl (rtx op)
   stack_bytes = INTVAL (XEXP (SET_SRC (XVECEXP (op, 0, 0)), 1));
 
   /* Each push will put 4 bytes from the stack....  */
-  stack_bytes += (count - (TARGET_LONG_CALLS ? 3 : 2)) * 4;
+  stack_bytes += (count - (GCC_OPTION (TARGET_LONG_CALLS) ? 3 : 2)) * 4;
 
   /* Make sure that the amount we are popping either 0 or 16 bytes.  */
   if (stack_bytes != 0)
@@ -2393,7 +2393,7 @@ construct_save_jarl (rtx op)
 
   /* Now compute the bit mask of registers to push.  */
   mask = 0;
-  for (i = 1; i < count - (TARGET_LONG_CALLS ? 2 : 1); i++)
+  for (i = 1; i < count - (GCC_OPTION (TARGET_LONG_CALLS) ? 2 : 1); i++)
     {
       rtx vector_element = XVECEXP (op, 0, i);
       
@@ -2432,7 +2432,7 @@ construct_save_jarl (rtx op)
      be pushing more registers than is strictly necessary, but
      it does save code space.  */
   
-  if (TARGET_LONG_CALLS)
+  if (GCC_OPTION (TARGET_LONG_CALLS))
     {
       char name[40];
       
@@ -3097,7 +3097,7 @@ v850_adjust_insn_length (rtx insn, int length)
     {
       if (CALL_P (insn))
 	{
-	  if (TARGET_LONG_CALLS)
+	  if (GCC_OPTION (TARGET_LONG_CALLS))
 	    {
 	      /* call_internal_long, call_value_internal_long.  */
 	      if (length == 8)
@@ -3138,12 +3138,12 @@ static const struct attribute_spec v850_attribute_table[] =
 static void
 v850_option_override (void)
 {
-  if (flag_exceptions || flag_non_call_exceptions)
-    flag_omit_frame_pointer = 0;
+  if (GCC_OPTION (flag_exceptions) || GCC_OPTION (flag_non_call_exceptions))
+    GCC_OPTION (flag_omit_frame_pointer) = 0;
 
   /* The RH850 ABI does not (currently) support the use of the CALLT instruction.  */
   if (! TARGET_GCC_ABI)
-    target_flags |= MASK_DISABLE_CALLT;
+    GCC_OPTION (target_flags) |= MASK_DISABLE_CALLT;
 }
 
 const char *
diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h
index 92db20a4..752a0aa 100644
--- a/gcc/config/v850/v850.h
+++ b/gcc/config/v850/v850.h
@@ -195,7 +195,7 @@ extern GTY(()) rtx v850_compare_op1;
 
 /* Allocation boundary (in *bits*) for the code of a function.
    16 is the minimum boundary; 32 would give better performance.  */
-#define FUNCTION_BOUNDARY 	(((! TARGET_GCC_ABI) || optimize_size) ? 16 : 32)
+#define FUNCTION_BOUNDARY 	(((! TARGET_GCC_ABI) || GCC_OPTION (optimize_size)) ? 16 : 32)
 
 /* No data type wants to be aligned rounder than this.  */
 #define BIGGEST_ALIGNMENT	(TARGET_8BYTE_ALIGN ? 64 : 32)
diff --git a/gcc/config/v850/v850.md b/gcc/config/v850/v850.md
index 341aae4..3ab194c 100644
--- a/gcc/config/v850/v850.md
+++ b/gcc/config/v850/v850.md
@@ -51,7 +51,7 @@
   (const_int 4))
 
 (define_attr "long_calls" "yes,no"
-  (const (if_then_else (symbol_ref "TARGET_LONG_CALLS")
+  (const (if_then_else (symbol_ref "GCC_OPTION (TARGET_LONG_CALLS)")
 		       (const_string "yes")
 		       (const_string "no"))))
 	    
@@ -1696,9 +1696,9 @@
   ""
   {
     if (! call_address_operand (XEXP (operands[0], 0), QImode)
-	|| TARGET_LONG_CALLS)
+	|| GCC_OPTION (TARGET_LONG_CALLS))
       XEXP (operands[0], 0) = force_reg (SImode, XEXP (operands[0], 0));
-    if (TARGET_LONG_CALLS)
+    if (GCC_OPTION (TARGET_LONG_CALLS))
       emit_call_insn (gen_call_internal_long (XEXP (operands[0], 0), operands[1]));
     else
       emit_call_insn (gen_call_internal_short (XEXP (operands[0], 0), operands[1]));
@@ -1710,7 +1710,7 @@
   [(call (mem:QI (match_operand:SI 0 "call_address_operand" "S,r"))
 	 (match_operand:SI 1 "general_operand" "g,g"))
    (clobber (reg:SI 31))]
-  "! TARGET_LONG_CALLS"
+  "! GCC_OPTION (TARGET_LONG_CALLS)"
   {
     if (which_alternative == 1)
       {
@@ -1730,7 +1730,7 @@
   [(call (mem:QI (match_operand:SI 0 "call_address_operand" "S,r"))
 	 (match_operand:SI 1 "general_operand" "g,g"))
    (clobber (reg:SI 31))]
-  "TARGET_LONG_CALLS"
+  "GCC_OPTION (TARGET_LONG_CALLS)"
 {
   if (which_alternative == 0)
     {
@@ -1762,9 +1762,9 @@
   ""
   {
     if (! call_address_operand (XEXP (operands[1], 0), QImode)
-	|| TARGET_LONG_CALLS)
+	|| GCC_OPTION (TARGET_LONG_CALLS))
       XEXP (operands[1], 0) = force_reg (SImode, XEXP (operands[1], 0));
-    if (TARGET_LONG_CALLS)
+    if (GCC_OPTION (TARGET_LONG_CALLS))
       emit_call_insn (gen_call_value_internal_long (operands[0],
 	 					    XEXP (operands[1], 0),
 						    operands[2]));
@@ -1780,7 +1780,7 @@
 	(call (mem:QI (match_operand:SI 1 "call_address_operand" "S,r"))
 	      (match_operand:SI 2 "general_operand" "g,g")))
    (clobber (reg:SI 31))]
-  "! TARGET_LONG_CALLS"
+  "! GCC_OPTION (TARGET_LONG_CALLS)"
   {
     if (which_alternative == 1)
       {
@@ -1801,7 +1801,7 @@
 	(call (mem:QI (match_operand:SI 1 "call_address_operand" "S,r"))
 	      (match_operand:SI 2 "general_operand" "g,g")))
    (clobber (reg:SI 31))]
-  "TARGET_LONG_CALLS"
+  "GCC_OPTION (TARGET_LONG_CALLS)"
 {
   if (which_alternative == 0)
     {
@@ -2861,7 +2861,7 @@
    (set (mem:SI (plus:SI (reg:SI 3) (const_int  -4))) (reg:SI 11))]
   ""
 {
-  if (TARGET_PROLOG_FUNCTION && !TARGET_LONG_CALLS)
+  if (TARGET_PROLOG_FUNCTION && !GCC_OPTION (TARGET_LONG_CALLS))
     return "addi -20,sp,sp \; st.w r11,16[sp] \; st.w r10,12[sp] \; jarl __save_interrupt,r10";
   else
     {
@@ -2879,7 +2879,7 @@
     }
 }
   [(set (attr "length")
-        (if_then_else (match_test "TARGET_LONG_CALLS")
+        (if_then_else (match_test "GCC_OPTION (TARGET_LONG_CALLS)")
                        (const_int 10)
                        (const_int 34)))
    (set_attr "cc" "clobber")])
@@ -2895,7 +2895,7 @@
    (set (reg:SI 30) (mem:SI (reg:SI 3)))]
   ""
 {
-  if (TARGET_PROLOG_FUNCTION && !TARGET_LONG_CALLS)
+  if (TARGET_PROLOG_FUNCTION && !GCC_OPTION (TARGET_LONG_CALLS))
     return "jr __return_interrupt";
   else 
     {
@@ -2910,7 +2910,7 @@
     }
 }
   [(set (attr "length")
-        (if_then_else (match_test "TARGET_LONG_CALLS")
+        (if_then_else (match_test "GCC_OPTION (TARGET_LONG_CALLS)")
                        (const_int 4)
                        (const_int 24)))
    (set_attr "cc" "clobber")])
@@ -2933,7 +2933,7 @@
   [(unspec_volatile [(const_int 0)] 0)]
   ""
 {
-  if (TARGET_PROLOG_FUNCTION && !TARGET_LONG_CALLS)
+  if (TARGET_PROLOG_FUNCTION && !GCC_OPTION (TARGET_LONG_CALLS))
     return "jarl __save_all_interrupt,r10";
 
   output_asm_insn ("addi -120, sp, sp", operands);
@@ -3003,7 +3003,7 @@
   return "";
 }
   [(set (attr "length")
-        (if_then_else (match_test "TARGET_LONG_CALLS")
+        (if_then_else (match_test "GCC_OPTION (TARGET_LONG_CALLS)")
                        (const_int 4)
                        (const_int 62)
 	))
@@ -3011,7 +3011,7 @@
 
 (define_insn "_save_all_interrupt"
   [(unspec_volatile [(const_int 0)] 0)]
-  "TARGET_V850 && ! TARGET_LONG_CALLS"
+  "TARGET_V850 && ! GCC_OPTION (TARGET_LONG_CALLS)"
   "jarl __save_all_interrupt,r10"
   [(set_attr "length" "4")
    (set_attr "cc" "clobber")])
@@ -3033,7 +3033,7 @@
   [(unspec_volatile [(const_int 0)] 1)]
   ""
 {
-  if (TARGET_PROLOG_FUNCTION && !TARGET_LONG_CALLS)
+  if (TARGET_PROLOG_FUNCTION && !GCC_OPTION (TARGET_LONG_CALLS))
     return "jarl __restore_all_interrupt,r10";
 
   if (TARGET_EP)
@@ -3101,7 +3101,7 @@
   return "";
 }
   [(set (attr "length")
-        (if_then_else (match_test "TARGET_LONG_CALLS")
+        (if_then_else (match_test "GCC_OPTION (TARGET_LONG_CALLS)")
                        (const_int 4)
                        (const_int 62)
 	))
@@ -3109,7 +3109,7 @@
 
 (define_insn "_restore_all_interrupt"
   [(unspec_volatile [(const_int 0)] 1)]
-  "TARGET_V850 && ! TARGET_LONG_CALLS"
+  "TARGET_V850 && ! GCC_OPTION (TARGET_LONG_CALLS)"
   "jarl __restore_all_interrupt,r10"
   [(set_attr "length" "4")
    (set_attr "cc" "clobber")])
diff --git a/gcc/config/vax/constraints.md b/gcc/config/vax/constraints.md
index daa9eeb..2b8e252 100644
--- a/gcc/config/vax/constraints.md
+++ b/gcc/config/vax/constraints.md
@@ -116,4 +116,4 @@
     "@internal satisfies CONSTANT_P and, if pic is enabled, is not a SYMBOL_REF, LABEL_REF, or CONST."
   (and (match_test ("CONSTANT_P (op)"))
        (ior (not (match_code "symbol_ref,label_ref,const"))
-	    (match_test "!flag_pic"))))
+	    (match_test "!GCC_OPTION (flag_pic)"))))
diff --git a/gcc/config/vax/elf.h b/gcc/config/vax/elf.h
index d6041dc..b8376b9 100644
--- a/gcc/config/vax/elf.h
+++ b/gcc/config/vax/elf.h
@@ -79,8 +79,8 @@ along with GCC; see the file COPYING3.  If not see
   do							\
     {							\
       /* Turn off function CSE if we're doing PIC.  */	\
-      if (flag_pic)					\
-	flag_no_function_cse = 1;			\
+      if (GCC_OPTION (flag_pic))					\
+	GCC_OPTION (flag_no_function_cse) = 1;			\
     }							\
   while (0)
 
diff --git a/gcc/config/vax/predicates.md b/gcc/config/vax/predicates.md
index 0820c9d..4f9e3f5 100644
--- a/gcc/config/vax/predicates.md
+++ b/gcc/config/vax/predicates.md
@@ -29,10 +29,10 @@
   if (GET_CODE (op) == LABEL_REF)
     return 1;
   if (GET_CODE (op) == SYMBOL_REF)
-    return !flag_pic || SYMBOL_REF_LOCAL_P (op);
+    return !GCC_OPTION (flag_pic) || SYMBOL_REF_LOCAL_P (op);
   if (GET_CODE (XEXP (XEXP (op, 0), 0)) == LABEL_REF)
     return 1;
-  return !flag_pic || SYMBOL_REF_LOCAL_P (XEXP (XEXP (op, 0), 0));
+  return !GCC_OPTION (flag_pic) || SYMBOL_REF_LOCAL_P (XEXP (XEXP (op, 0), 0));
 })
 
 (define_predicate "external_symbolic_operand"
@@ -45,7 +45,7 @@
 		    && !SYMBOL_REF_LOCAL_P (XEXP (XEXP (op, 0), 0))")))
 
 (define_predicate "nonsymbolic_operand"
-  (and (ior (match_test "!flag_pic")
+  (and (ior (match_test "!GCC_OPTION (flag_pic)")
 	    (not (match_operand 0 "symbolic_operand")))
        (match_operand 0 "general_operand" "")))
 
@@ -86,7 +86,7 @@
 
 (define_predicate "illegal_blk_memory_operand"
    (and (match_code "mem")
-	(ior (and (match_test "flag_pic")
+	(ior (and (match_test "GCC_OPTION (flag_pic)")
 		  (match_operand 0 "external_memory_operand" ""))
 	     (ior (match_operand 0 "indexed_memory_operand" "")
 		  (ior (match_operand 0 "indirect_memory_operand" "")
@@ -94,7 +94,7 @@
 
 (define_predicate "illegal_addsub_di_memory_operand"
    (and (match_code "mem")
-	(ior (and (match_test "flag_pic")
+	(ior (and (match_test "GCC_OPTION (flag_pic)")
 		  (match_operand 0 "external_memory_operand" ""))
 	     (ior (match_operand 0 "indexed_memory_operand" "")
 		  (ior (match_operand 0 "indirect_memory_operand" "")
diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c
index 2b152fd..42fe18d 100644
--- a/gcc/config/vax/vax.c
+++ b/gcc/config/vax/vax.c
@@ -227,7 +227,7 @@ vax_file_start (void)
 {
   default_file_start ();
 
-  if (write_symbols == DBX_DEBUG)
+  if (GCC_OPTION (write_symbols) == DBX_DEBUG)
     fprintf (asm_out_file, "___vax_%c_doubles:\n", ASM_DOUBLE_CHAR);
 }
 
@@ -265,7 +265,7 @@ split_quadword_operands (rtx insn, enum rtx_code code, rtx * operands,
 	  rtx addr = XEXP (operands[i], 0);
 	  operands[i] = low[i] = gen_rtx_MEM (SImode, addr);
 	}
-      else if (optimize_size && MEM_P (operands[i])
+      else if (GCC_OPTION (optimize_size) && MEM_P (operands[i])
 	       && REG_P (XEXP (operands[i], 0))
 	       && (code != MINUS || operands[1] != const0_rtx)
 	       && find_regno_note (insn, REG_DEAD,
@@ -437,10 +437,10 @@ print_operand_address (FILE * file, rtx addr)
       if (reg1)
 	{
 	  if (breg
-	      || (flag_pic && GET_CODE (addr) == SYMBOL_REF)
+	      || (GCC_OPTION (flag_pic) && GET_CODE (addr) == SYMBOL_REF)
 	      || (offset
 		  && (MEM_P (offset)
-		      || (flag_pic && symbolic_operand (offset, SImode)))))
+		      || (GCC_OPTION (flag_pic) && symbolic_operand (offset, SImode)))))
 	    {
 	      gcc_assert (!ireg);
 	      ireg = reg1;
@@ -451,7 +451,7 @@ print_operand_address (FILE * file, rtx addr)
 
       if (offset != 0)
 	{
-	  if (flag_pic && symbolic_operand (offset, SImode))
+	  if (GCC_OPTION (flag_pic) && symbolic_operand (offset, SImode))
 	    {
 	      if (breg && ireg)
 		{
@@ -460,7 +460,7 @@ print_operand_address (FILE * file, rtx addr)
 		}
 
 #ifdef NO_EXTERNAL_INDIRECT_ADDRESS
-	      if (flag_pic > 1 && GET_CODE (offset) == CONST
+	      if (GCC_OPTION (flag_pic) > 1 && GET_CODE (offset) == CONST
 		  && GET_CODE (XEXP (XEXP (offset, 0), 0)) == SYMBOL_REF
 		  && !SYMBOL_REF_LOCAL_P (XEXP (XEXP (offset, 0), 0)))
 		{
@@ -550,7 +550,7 @@ print_operand (FILE *file, rtx x, int code)
     }
   else
     {
-      if (flag_pic > 1 && symbolic_operand (x, SImode))
+      if (GCC_OPTION (flag_pic) > 1 && symbolic_operand (x, SImode))
 	{
 	  debug_rtx (x);
 	  output_operand_lossage ("symbol used as immediate operand");
@@ -1143,7 +1143,7 @@ vax_output_int_move (rtx insn ATTRIBUTE_UNUSED, rtx *operands,
     case DImode:
       if (operands[1] == const0_rtx)
 	return "clrq %0";
-      if (TARGET_QMATH && optimize_size
+      if (TARGET_QMATH && GCC_OPTION (optimize_size)
 	  && (CONST_INT_P (operands[1])
 	      || GET_CODE (operands[1]) == CONST_DOUBLE))
 	{
@@ -1279,7 +1279,7 @@ vax_output_int_move (rtx insn ATTRIBUTE_UNUSED, rtx *operands,
 	    return "movzbl %1,%0";
 	  if (i >= -0x80 && i < 0)
 	    return "cvtbl %1,%0";
-	  if (optimize_size
+	  if (GCC_OPTION (optimize_size)
 	      && (n = exact_log2 (i & (-i))) != -1
 	      && ((unsigned HOST_WIDE_INT)i >> n) < 64)
 	    {
@@ -1364,8 +1364,8 @@ vax_output_int_add (rtx insn, rtx *operands, enum machine_mode mode)
 	  {
 	    gcc_assert (rtx_equal_p (operands[0], operands[1]));
 #ifdef NO_EXTERNAL_INDIRECT_ADDRESSS
-	    gcc_assert (!flag_pic || !external_memory_operand (low[2], SImode));
-	    gcc_assert (!flag_pic || !external_memory_operand (low[0], SImode));
+	    gcc_assert (!GCC_OPTION (flag_pic) || !external_memory_operand (low[2], SImode));
+	    gcc_assert (!GCC_OPTION (flag_pic) || !external_memory_operand (low[0], SImode));
 #endif
 
 	    /* No reason to add a 0 to the low part and thus no carry, so just
@@ -1499,11 +1499,11 @@ vax_output_int_add (rtx insn, rtx *operands, enum machine_mode mode)
 	  return "movab %a1[%2],%0";
 	}
 
-      if (flag_pic && REG_P (operands[0])
+      if (GCC_OPTION (flag_pic) && REG_P (operands[0])
 	  && symbolic_operand (operands[2], SImode))
 	return "movab %a2,%0;addl2 %1,%0";
 
-      if (flag_pic
+      if (GCC_OPTION (flag_pic)
 	  && (symbolic_operand (operands[1], SImode)
 	      || symbolic_operand (operands[1], SImode)))
 	debug_rtx (insn);
@@ -1639,7 +1639,7 @@ legitimate_constant_address_p (rtx x)
   if (GET_CODE (x) != CONST)
     return false;
 #ifdef NO_EXTERNAL_INDIRECT_ADDRESS
-  if (flag_pic
+  if (GCC_OPTION (flag_pic)
       && GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF
       && !SYMBOL_REF_LOCAL_P (XEXP (XEXP (x, 0), 0)))
     return false;
@@ -1668,10 +1668,10 @@ static bool
 indirectable_constant_address_p (rtx x, bool indirect)
 {
   if (GET_CODE (x) == SYMBOL_REF)
-    return !flag_pic || SYMBOL_REF_LOCAL_P (x) || !indirect;
+    return !GCC_OPTION (flag_pic) || SYMBOL_REF_LOCAL_P (x) || !indirect;
 
   if (GET_CODE (x) == CONST)
-    return !flag_pic
+    return !GCC_OPTION (flag_pic)
 	   || GET_CODE (XEXP (XEXP (x, 0), 0)) != SYMBOL_REF
 	   || SYMBOL_REF_LOCAL_P (XEXP (XEXP (x, 0), 0));
 
@@ -1699,7 +1699,7 @@ indirectable_address_p (rtx x, bool strict, bool indirect)
     return true;
   if (GET_CODE (x) != PLUS
       || !BASE_REGISTER_P (XEXP (x, 0), strict)
-      || (flag_pic && !CONST_INT_P (XEXP (x, 1))))
+      || (GCC_OPTION (flag_pic) && !CONST_INT_P (XEXP (x, 1))))
     return false;
   return indirectable_constant_address_p (XEXP (x, 1), indirect);
 }
@@ -1789,8 +1789,8 @@ indexable_address_p (rtx xfoo0, rtx xfoo1, enum machine_mode mode, bool strict)
   if (!CONSTANT_ADDRESS_P (xfoo0))
     return false;
   if (BASE_REGISTER_P (xfoo1, strict))
-    return !flag_pic || mode == QImode;
-  if (flag_pic && symbolic_operand (xfoo0, SImode))
+    return !GCC_OPTION (flag_pic) || mode == QImode;
+  if (GCC_OPTION (flag_pic) && symbolic_operand (xfoo0, SImode))
     return false;
   return reg_plus_index_p (xfoo1, mode, strict);
 }
@@ -1854,9 +1854,9 @@ vax_mode_dependent_address_p (const_rtx x, addr_space_t as ATTRIBUTE_UNUSED)
     return false;
   if (CONST_INT_P (xfoo1) && REG_P (xfoo0))
     return false;
-  if (!flag_pic && CONSTANT_ADDRESS_P (xfoo0) && REG_P (xfoo1))
+  if (!GCC_OPTION (flag_pic) && CONSTANT_ADDRESS_P (xfoo0) && REG_P (xfoo1))
     return false;
-  if (!flag_pic && CONSTANT_ADDRESS_P (xfoo1) && REG_P (xfoo0))
+  if (!GCC_OPTION (flag_pic) && CONSTANT_ADDRESS_P (xfoo1) && REG_P (xfoo0))
     return false;
 
   return true;
@@ -1871,7 +1871,7 @@ fixup_mathdi_operand (rtx x, enum machine_mode mode)
       rtx temp = gen_reg_rtx (Pmode);
       rtx offset = 0;
 #ifdef NO_EXTERNAL_INDIRECT_ADDRESS
-      if (GET_CODE (addr) == CONST && flag_pic)
+      if (GET_CODE (addr) == CONST && GCC_OPTION (flag_pic))
 	{
 	  offset = XEXP (XEXP (addr, 0), 1);
 	  addr = XEXP (XEXP (addr, 0), 0);
diff --git a/gcc/config/vax/vax.md b/gcc/config/vax/vax.md
index d392973..023e653 100644
--- a/gcc/config/vax/vax.md
+++ b/gcc/config/vax/vax.md
@@ -140,7 +140,7 @@
   "
 {
 #ifdef NO_EXTERNAL_INDIRECT_ADDRESS
-  if (flag_pic
+  if (GCC_OPTION (flag_pic)
       && GET_CODE (operands[1]) == CONST
       && GET_CODE (XEXP (XEXP (operands[1], 0), 0)) == SYMBOL_REF
       && !SYMBOL_REF_LOCAL_P (XEXP (XEXP (operands[1], 0), 0)))
@@ -342,28 +342,28 @@
   [(set (match_operand:SI 0 "push_operand" "=g")
 	(plus:SI (match_operand:SI 1 "register_operand" "%r")
 		 (match_operand:SI 2 "local_symbolic_operand" "i")))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "pushab %a2[%1]")
 
 (define_insn "pushextsymreg"
   [(set (match_operand:SI 0 "push_operand" "=g")
 	(plus:SI (match_operand:SI 1 "register_operand" "%r")
 		 (match_operand:SI 2 "external_symbolic_operand" "i")))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "pushab %a2[%1]")
 
 (define_insn "movlclsymreg"
   [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
 	(plus:SI (match_operand:SI 1 "register_operand" "%r")
 		 (match_operand:SI 2 "local_symbolic_operand" "i")))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "movab %a2[%1],%0")
 
 (define_insn "movextsymreg"
   [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
 	(plus:SI (match_operand:SI 1 "register_operand" "%r")
 		 (match_operand:SI 2 "external_symbolic_operand" "i")))]
-  "flag_pic"
+  "GCC_OPTION (flag_pic)"
   "movab %a2[%1],%0")
 
 (define_insn "add<mode>3"
@@ -665,13 +665,13 @@
       int i = INTVAL (operands[2]);
       if (i == 1)
 	return \"addl3 %1,%1,%0\";
-      if (i == 2 && !optimize_size)
+      if (i == 2 && !GCC_OPTION (optimize_size))
 	{
 	  if (push_operand (operands[0], SImode))
 	    return \"pushal 0[%1]\";
 	  return \"moval 0[%1],%0\";
 	}
-      if (i == 3 && !optimize_size)
+      if (i == 3 && !GCC_OPTION (optimize_size))
 	{
 	  if (push_operand (operands[0], SImode))
 	    return \"pushaq 0[%1]\";
@@ -1017,7 +1017,7 @@
 	  operands[1] = gen_rtx_MEM (QImode, tmp);
 	  operands[3] = GEN_INT (v + (o & 3) * 8);
 	}
-      if (optimize_size)
+      if (GCC_OPTION (optimize_size))
 	return \"extzv %3,%2,%1,%0\";
     }
   return \"rotl %R3,%1,%0\;bicl2 %M2,%0\";
diff --git a/gcc/config/vms/vms-c.c b/gcc/config/vms/vms-c.c
index 6c71104..aebc786 100644
--- a/gcc/config/vms/vms-c.c
+++ b/gcc/config/vms/vms-c.c
@@ -72,7 +72,7 @@ vms_pragma_member_alignment (cpp_reader *pfile ATTRIBUTE_UNUSED)
   if (tok == CPP_EOF)
     {
       /* Disable packing.  */
-      maximum_field_alignment = initial_max_fld_align;
+      maximum_field_alignment = GCC_OPTION (initial_max_fld_align);
       return;
     }
   if (tok != CPP_NAME)
@@ -337,7 +337,7 @@ static void
 vms_pragma_pointer_size (cpp_reader * ARG_UNUSED (dummy))
 {
   /* Ignore if no -mpointer-size option.  */
-  if (flag_vms_pointer_size == VMS_POINTER_SIZE_NONE)
+  if (GCC_OPTION (flag_vms_pointer_size) == VMS_POINTER_SIZE_NONE)
     return;
 
   handle_pragma_pointer_size ("pointer_size");
@@ -455,10 +455,10 @@ void
 vms_c_common_override_options (void)
 {
   /* Allow variadic functions without parameters (as declared in starlet).  */
-  flag_allow_parameterless_variadic_functions = TRUE;
+  GCC_OPTION (flag_allow_parameterless_variadic_functions) = TRUE;
 
   /* Initialize c_default_pointer_mode.  */
-  switch (flag_vms_pointer_size)
+  switch (GCC_OPTION (flag_vms_pointer_size))
     {
     case VMS_POINTER_SIZE_NONE:
       break;
diff --git a/gcc/config/vms/vms.c b/gcc/config/vms/vms.c
index 0a8a5b8..cd298d8 100644
--- a/gcc/config/vms/vms.c
+++ b/gcc/config/vms/vms.c
@@ -150,7 +150,7 @@ vms_patch_builtins (void)
 
       /* Discard 32ONLY if using 64 bit pointers.  */
       if ((n->flags & VMS_CRTL_32ONLY)
-	  && flag_vms_pointer_size == VMS_POINTER_SIZE_64)
+	  && GCC_OPTION (flag_vms_pointer_size) == VMS_POINTER_SIZE_64)
 	continue;
 
       /* Handle DPML unless overridden by decc.  */
@@ -255,10 +255,10 @@ vms_patch_builtins (void)
           vms_add_crtl_xlat (alt, nlen + 3, res, rlen + nlen);
 
           use_64 = (((n->flags & VMS_CRTL_64)
-                     && flag_vms_pointer_size == VMS_POINTER_SIZE_64)
+                     && GCC_OPTION (flag_vms_pointer_size) == VMS_POINTER_SIZE_64)
                     || ((n->flags & VMS_CRTL_MALLOC)
-                        && flag_vms_malloc64
-                        && flag_vms_pointer_size != VMS_POINTER_SIZE_NONE));
+                        && GCC_OPTION (flag_vms_malloc64)
+                        && GCC_OPTION (flag_vms_pointer_size) != VMS_POINTER_SIZE_NONE));
           if (!use_64)
             vms_add_crtl_xlat (n->name, nlen, res, rlen + nlen);
 
@@ -299,14 +299,14 @@ void
 vms_start_function (const char *fnname)
 {
 #if VMS_DEBUGGING_INFO
-  if (vms_debug_main
-      && debug_info_level > DINFO_LEVEL_NONE
-      && strncmp (vms_debug_main, fnname, strlen (vms_debug_main)) == 0)
+  if (GCC_OPTION (vms_debug_main)
+      && GCC_OPTION (debug_info_level) > DINFO_LEVEL_NONE
+      && strncmp (GCC_OPTION (vms_debug_main), fnname, strlen (GCC_OPTION (vms_debug_main))) == 0)
     {
       targetm.asm_out.globalize_label (asm_out_file, VMS_DEBUG_MAIN_POINTER);
       ASM_OUTPUT_DEF (asm_out_file, VMS_DEBUG_MAIN_POINTER, fnname);
       dwarf2out_vms_debug_main_pointer ();
-      vms_debug_main = 0;
+      GCC_OPTION (vms_debug_main) = 0;
     }
 #endif
 
@@ -316,9 +316,9 @@ vms_start_function (const char *fnname)
     {
       unsigned int flags = 0;
 
-      if (flag_vms_pointer_size == VMS_POINTER_SIZE_64)
+      if (GCC_OPTION (flag_vms_pointer_size) == VMS_POINTER_SIZE_64)
 	flags |= MAIN_FLAG_64BIT;
-      if (!flag_vms_return_codes)
+      if (!GCC_OPTION (flag_vms_return_codes))
 	flags |= MAIN_FLAG_POSIX;
 
       targetm.asm_out.globalize_label (asm_out_file, VMS_MAIN_FLAGS_SYMBOL);
diff --git a/gcc/config/vms/vms.h b/gcc/config/vms/vms.h
index dabc351..8dfccd9 100644
--- a/gcc/config/vms/vms.h
+++ b/gcc/config/vms/vms.h
@@ -28,9 +28,9 @@ along with GCC; see the file COPYING3.  If not see
     builtin_assert ("system=vms");					 \
     SUBTARGET_OS_CPP_BUILTINS();					 \
     builtin_define ("__int64=long long");				 \
-    if (flag_vms_pointer_size == VMS_POINTER_SIZE_32)			 \
+    if (GCC_OPTION (flag_vms_pointer_size) == VMS_POINTER_SIZE_32)			 \
       builtin_define ("__INITIAL_POINTER_SIZE=32");			 \
-    else if (flag_vms_pointer_size == VMS_POINTER_SIZE_64)		 \
+    else if (GCC_OPTION (flag_vms_pointer_size) == VMS_POINTER_SIZE_64)		 \
       builtin_define ("__INITIAL_POINTER_SIZE=64");			 \
     if (POINTER_SIZE == 64)						 \
       builtin_define ("__LONG_POINTERS=1");				 \
@@ -57,7 +57,7 @@ extern void vms_c_register_includes (const char *, const char *, int);
 
 /* Pointer is 32 bits but the hardware has 64-bit addresses, sign extended.  */
 #undef POINTER_SIZE
-#define POINTER_SIZE (flag_vms_pointer_size == VMS_POINTER_SIZE_NONE ? 32 : 64)
+#define POINTER_SIZE (GCC_OPTION (flag_vms_pointer_size) == VMS_POINTER_SIZE_NONE ? 32 : 64)
 #define POINTERS_EXTEND_UNSIGNED 0
 
 /* Always a 32 bit type.  */
@@ -66,10 +66,10 @@ extern void vms_c_register_includes (const char *, const char *, int);
 
 /* ???: Defined as a 'int' by dec-c, but obstack.h doesn't like it.  */
 #undef PTRDIFF_TYPE
-#define PTRDIFF_TYPE (flag_vms_pointer_size == VMS_POINTER_SIZE_NONE ? \
+#define PTRDIFF_TYPE (GCC_OPTION (flag_vms_pointer_size) == VMS_POINTER_SIZE_NONE ? \
                       "int" : "long long int")
 
-#define SIZETYPE (flag_vms_pointer_size == VMS_POINTER_SIZE_NONE ? \
+#define SIZETYPE (GCC_OPTION (flag_vms_pointer_size) == VMS_POINTER_SIZE_NONE ? \
 		  "unsigned int" : "long long unsigned int")
 
 #define C_COMMON_OVERRIDE_OPTIONS vms_c_common_override_options ()
diff --git a/gcc/config/vxworks.c b/gcc/config/vxworks.c
index bd5e735..6f94b69 100644
--- a/gcc/config/vxworks.c
+++ b/gcc/config/vxworks.c
@@ -141,14 +141,14 @@ vxworks_override_options (void)
   targetm.have_ctors_dtors = TARGET_VXWORKS_RTP;
 
   /* PIC is only supported for RTPs.  */
-  if (flag_pic && !TARGET_VXWORKS_RTP)
+  if (GCC_OPTION (flag_pic) && !TARGET_VXWORKS_RTP)
     error ("PIC is only supported for RTPs");
 
   /* Default to strict dwarf-2 to prevent potential difficulties observed with
      non-gdb debuggers on extensions > 2.  */
   if (!global_options_set.x_dwarf_strict)
-    dwarf_strict = 1;
+    GCC_OPTION (dwarf_strict) = 1;
 
   if (!global_options_set.x_dwarf_version)
-    dwarf_version = 2;
+    GCC_OPTION (dwarf_version) = 2;
 }
diff --git a/gcc/config/xtensa/predicates.md b/gcc/config/xtensa/predicates.md
index 4a43341..857361b 100644
--- a/gcc/config/xtensa/predicates.md
+++ b/gcc/config/xtensa/predicates.md
@@ -95,7 +95,7 @@
   if (CONSTANT_ADDRESS_P (op))
     {
       /* Direct calls only allowed to static functions with PIC.  */
-      if (flag_pic)
+      if (GCC_OPTION (flag_pic))
 	{
 	  tree callee, callee_sec, caller_sec;
 
@@ -107,7 +107,7 @@
 	     a different section, since there's a good chance it will be
 	     out of range.  */
 
-	  if (flag_function_sections
+	  if (GCC_OPTION (flag_function_sections)
 	      || DECL_ONE_ONLY (current_function_decl))
 	    return false;
 	  caller_sec = DECL_SECTION_NAME (current_function_decl);
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index 06e1eb7..c9d9af3 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -1256,7 +1256,7 @@ xtensa_expand_block_move (rtx *operands)
   rtx x;
 
   /* If this is not a fixed size move, just call memcpy.  */
-  if (!optimize || (GET_CODE (operands[2]) != CONST_INT))
+  if (!GCC_OPTION (optimize) || (GET_CODE (operands[2]) != CONST_INT))
     return 0;
 
   bytes = INTVAL (operands[2]);
@@ -1271,7 +1271,7 @@ xtensa_expand_block_move (rtx *operands)
 
   /* Decide whether to expand inline based on the optimization level.  */
   move_ratio = 4;
-  if (optimize > 2)
+  if (GCC_OPTION (optimize) > 2)
     move_ratio = LARGEST_MOVE_RATIO;
   num_pieces = (bytes / align) + (bytes % align); /* Close enough anyway.  */
   if (num_pieces > move_ratio)
@@ -2222,30 +2222,30 @@ xtensa_option_override (void)
 
   /* Check PIC settings.  PIC is only supported when using L32R
      instructions, and some targets need to always use PIC.  */
-  if (flag_pic && TARGET_CONST16)
+  if (GCC_OPTION (flag_pic) && TARGET_CONST16)
     error ("-f%s is not supported with CONST16 instructions",
-	   (flag_pic > 1 ? "PIC" : "pic"));
+	   (GCC_OPTION (flag_pic) > 1 ? "PIC" : "pic"));
   else if (TARGET_FORCE_NO_PIC)
-    flag_pic = 0;
+    GCC_OPTION (flag_pic) = 0;
   else if (XTENSA_ALWAYS_PIC)
     {
       if (TARGET_CONST16)
 	error ("PIC is required but not supported with CONST16 instructions");
-      flag_pic = 1;
+      GCC_OPTION (flag_pic) = 1;
     }
   /* There's no need for -fPIC (as opposed to -fpic) on Xtensa.  */
-  if (flag_pic > 1)
-    flag_pic = 1;
-  if (flag_pic && !flag_pie)
-    flag_shlib = 1;
+  if (GCC_OPTION (flag_pic) > 1)
+    GCC_OPTION (flag_pic) = 1;
+  if (GCC_OPTION (flag_pic) && !GCC_OPTION (flag_pie))
+    GCC_OPTION (flag_shlib) = 1;
 
   /* Hot/cold partitioning does not work on this architecture, because of
      constant pools (the load instruction cannot necessarily reach that far).
      Therefore disable it on this architecture.  */
-  if (flag_reorder_blocks_and_partition)
+  if (GCC_OPTION (flag_reorder_blocks_and_partition))
     {
-      flag_reorder_blocks_and_partition = 0;
-      flag_reorder_blocks = 1;
+      GCC_OPTION (flag_reorder_blocks_and_partition) = 0;
+      GCC_OPTION (flag_reorder_blocks) = 1;
     }
 }
 
@@ -2517,7 +2517,7 @@ xtensa_output_addr_const_extra (FILE *fp, rtx x)
 	  fputs ("@DTPOFF", fp);
 	  return true;
 	case UNSPEC_PLT:
-	  if (flag_pic)
+	  if (GCC_OPTION (flag_pic))
 	    {
 	      output_addr_const (fp, XVECEXP (x, 0, 0));
 	      fputs ("@PLT", fp);
diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
index c4a8f88..8519687 100644
--- a/gcc/config/xtensa/xtensa.h
+++ b/gcc/config/xtensa/xtensa.h
@@ -553,7 +553,7 @@ typedef struct xtensa_args
 #define FUNCTION_PROFILER(FILE, LABELNO) \
   do {									\
     fprintf (FILE, "\t%s\ta10, a0\n", TARGET_DENSITY ? "mov.n" : "mov"); \
-    if (flag_pic)							\
+    if (GCC_OPTION (flag_pic))							\
       {									\
 	fprintf (FILE, "\tmovi\ta8, _mcount@PLT\n");			\
 	fprintf (FILE, "\tcallx8\ta8\n");				\
@@ -752,7 +752,7 @@ typedef struct xtensa_args
 
 /* Indicate that jump tables go in the text section.  This is
    necessary when compiling PIC code.  */
-#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
+#define JUMP_TABLES_IN_TEXT_SECTION (GCC_OPTION (flag_pic))
 
 
 /* Define the strings to put out for each section in the object file.  */
@@ -766,7 +766,7 @@ typedef struct xtensa_args
   do {									\
     if ((SIZE) > 0)							\
       {									\
-	resolve_unique_section ((FUNDECL), 0, flag_function_sections);	\
+	resolve_unique_section ((FUNDECL), 0, GCC_OPTION (flag_function_sections));	\
 	switch_to_section (function_section (FUNDECL));			\
 	fprintf (FILE, "\t.literal_position\n");			\
       }									\
@@ -794,7 +794,7 @@ typedef struct xtensa_args
 #define DWARF_FRAME_REGISTERS 16
 #define EH_RETURN_DATA_REGNO(N) ((N) < 2 ? (N) + 2 : INVALID_REGNUM)
 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL)			\
-  (flag_pic								\
+  (GCC_OPTION (flag_pic)								\
    ? (((GLOBAL) ? DW_EH_PE_indirect : 0)				\
       | DW_EH_PE_pcrel | DW_EH_PE_sdata4)				\
    : DW_EH_PE_absptr)
diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
index dddc6ab..3c4c786 100644
--- a/gcc/config/xtensa/xtensa.md
+++ b/gcc/config/xtensa/xtensa.md
@@ -374,7 +374,7 @@
   [(set (match_operand:SF 0 "register_operand" "=f")
 	(div:SF (match_operand:SF 1 "const_float_1_operand" "")
 		(match_operand:SF 2 "register_operand" "f")))]
-  "TARGET_HARD_FLOAT_RECIP && flag_unsafe_math_optimizations"
+  "TARGET_HARD_FLOAT_RECIP && GCC_OPTION (flag_unsafe_math_optimizations)"
   "recip.s\t%0, %2"
   [(set_attr "type"	"fdiv")
    (set_attr "mode"	"SF")
@@ -419,7 +419,7 @@
   [(set (match_operand:SF 0 "register_operand" "=f")
 	(div:SF (match_operand:SF 1 "const_float_1_operand" "")
 		(sqrt:SF (match_operand:SF 2 "register_operand" "f"))))]
-  "TARGET_HARD_FLOAT_RSQRT && flag_unsafe_math_optimizations"
+  "TARGET_HARD_FLOAT_RSQRT && GCC_OPTION (flag_unsafe_math_optimizations)"
   "rsqrt.s\t%0, %2"
   [(set_attr "type"	"fsqrt")
    (set_attr "mode"	"SF")
@@ -1494,7 +1494,7 @@
    ""
 {
   rtx target = operands[0];
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
       /* For PIC, the table entry is relative to the start of the table.  */
       rtx label = gen_reg_rtx (SImode);
@@ -1530,7 +1530,7 @@
   ""
 {
   rtx addr = XEXP (operands[0], 0);
-  if (flag_pic && GET_CODE (addr) == SYMBOL_REF
+  if (GCC_OPTION (flag_pic) && GET_CODE (addr) == SYMBOL_REF
       && (!SYMBOL_REF_LOCAL_P (addr) || SYMBOL_REF_EXTERNAL_P (addr)))
     addr = gen_sym_PLT (addr);
   if (!call_insn_operand (addr, VOIDmode))
@@ -1555,7 +1555,7 @@
   ""
 {
   rtx addr = XEXP (operands[1], 0);
-  if (flag_pic && GET_CODE (addr) == SYMBOL_REF
+  if (GCC_OPTION (flag_pic) && GET_CODE (addr) == SYMBOL_REF
       && (!SYMBOL_REF_LOCAL_P (addr) || SYMBOL_REF_EXTERNAL_P (addr)))
     addr = gen_sym_PLT (addr);
   if (!call_insn_operand (addr, VOIDmode))
diff --git a/gcc/convert.c b/gcc/convert.c
index 91c1da2..e669849 100644
--- a/gcc/convert.c
+++ b/gcc/convert.c
@@ -100,7 +100,7 @@ convert_to_real (tree type, tree expr)
   /* Disable until we figure out how to decide whether the functions are
      present in runtime.  */
   /* Convert (float)sqrt((double)x) where x is float into sqrtf(x) */
-  if (optimize
+  if (GCC_OPTION (optimize)
       && (TYPE_MODE (type) == TYPE_MODE (double_type_node)
           || TYPE_MODE (type) == TYPE_MODE (float_type_node)))
     {
@@ -124,7 +124,7 @@ convert_to_real (tree type, tree expr)
 	    /* The above functions may set errno differently with float
 	       input or output so this transformation is not safe with
 	       -fmath-errno.  */
-	    if (flag_errno_math)
+	    if (GCC_OPTION (flag_errno_math))
 	      break;
 	  CASE_MATHFN (ACOS)
 	  CASE_MATHFN (ACOSH)
@@ -144,7 +144,7 @@ convert_to_real (tree type, tree expr)
  	  CASE_MATHFN (TAN)
  	  CASE_MATHFN (TANH)
 	    /* The above functions are not safe to do this conversion.  */
-	    if (!flag_unsafe_math_optimizations)
+	    if (!GCC_OPTION (flag_unsafe_math_optimizations))
 	      break;
 	  CASE_MATHFN (SQRT)
 	  CASE_MATHFN (FABS)
@@ -174,7 +174,7 @@ convert_to_real (tree type, tree expr)
                  floating-point-square-root
 		 */
 	      if ((fcode == BUILT_IN_SQRT || fcode == BUILT_IN_SQRTL)
-		  && !flag_unsafe_math_optimizations)
+		  && !GCC_OPTION (flag_unsafe_math_optimizations))
 		{
 		  /* The following conversion is unsafe even the precision condition
 		     below is satisfied:
@@ -212,7 +212,7 @@ convert_to_real (tree type, tree expr)
 	  break;
 	}
     }
-  if (optimize
+  if (GCC_OPTION (optimize)
       && (((fcode == BUILT_IN_FLOORL
 	   || fcode == BUILT_IN_CEILL
 	   || fcode == BUILT_IN_ROUNDL
@@ -252,7 +252,7 @@ convert_to_real (tree type, tree expr)
 	   round-to-nearest rounding mode when the inner type is float.  */
 	case ABS_EXPR:
 	case NEGATE_EXPR:
-	  if (!flag_rounding_math
+	  if (!GCC_OPTION (flag_rounding_math)
 	      && FLOAT_TYPE_P (itype)
 	      && TYPE_PRECISION (type) < TYPE_PRECISION (itype))
 	    return build1 (TREE_CODE (expr), type,
@@ -326,7 +326,7 @@ convert_to_real (tree type, tree expr)
 		     values representable in the TYPE to be within the
 		     range of normal values of ITYPE.  */
 		  if (TYPE_PRECISION (newtype) < TYPE_PRECISION (itype)
-		      && (flag_unsafe_math_optimizations
+		      && (GCC_OPTION (flag_unsafe_math_optimizations)
 			  || (TYPE_PRECISION (newtype) == TYPE_PRECISION (type)
 			      && real_can_shorten_arithmetic (TYPE_MODE (itype),
 							      TYPE_MODE (type))
@@ -350,7 +350,7 @@ convert_to_real (tree type, tree expr)
     case REAL_TYPE:
       /* Ignore the conversion if we don't need to store intermediate
 	 results and neither type is a decimal float.  */
-      return build1 ((flag_float_store
+      return build1 ((GCC_OPTION (flag_float_store)
 		     || DECIMAL_FLOAT_TYPE_P (type)
 		     || DECIMAL_FLOAT_TYPE_P (itype))
 		     ? CONVERT_EXPR : NOP_EXPR, type, expr);
@@ -408,8 +408,8 @@ convert_to_integer (tree type, tree expr)
      between converting from double->char vs double->long->char.
      We're in "undefined" territory but we prefer to be conservative,
      so only proceed in "unsafe" math mode.  */
-  if (optimize
-      && (flag_unsafe_math_optimizations
+  if (GCC_OPTION (optimize)
+      && (GCC_OPTION (flag_unsafe_math_optimizations)
 	  || (long_integer_type_node
 	      && outprec >= TYPE_PRECISION (long_integer_type_node))))
     {
@@ -470,7 +470,7 @@ convert_to_integer (tree type, tree expr)
 
 	CASE_FLT_FN (BUILT_IN_NEARBYINT):
 	  /* Only convert nearbyint* if we can ignore math exceptions.  */
-	  if (flag_trapping_math)
+	  if (GCC_OPTION (flag_trapping_math))
 	    break;
 	  /* ... Fall through ...  */
 	CASE_FLT_FN (BUILT_IN_RINT):
@@ -504,9 +504,9 @@ convert_to_integer (tree type, tree expr)
     }
 
   /* Convert (int)logb(d) -> ilogb(d).  */
-  if (optimize
-      && flag_unsafe_math_optimizations
-      && !flag_trapping_math && !flag_errno_math && flag_finite_math_only
+  if (GCC_OPTION (optimize)
+      && GCC_OPTION (flag_unsafe_math_optimizations)
+      && !GCC_OPTION (flag_trapping_math) && !GCC_OPTION (flag_errno_math) && GCC_OPTION (flag_finite_math_only)
       && integer_type_node
       && (outprec > TYPE_PRECISION (integer_type_node)
 	  || (outprec == TYPE_PRECISION (integer_type_node)
diff --git a/gcc/coverage.c b/gcc/coverage.c
index 8b62403..2832fb2 100644
--- a/gcc/coverage.c
+++ b/gcc/coverage.c
@@ -348,7 +348,7 @@ get_coverage_counts (unsigned counter, unsigned expected,
 
       if (!warned++ && dump_enabled_p ())
 	dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, input_location,
-                         (flag_guess_branch_prob
+                         (GCC_OPTION (flag_guess_branch_prob)
                           ? "file %s not found, execution counts estimated\n"
                           : "file %s not found, execution counts assumed to "
                             "be zero\n"),
@@ -389,10 +389,10 @@ get_coverage_counts (unsigned counter, unsigned expected,
 	      dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, input_location,
                                "coverage mismatch ignored\n");
 	      dump_printf (MSG_OPTIMIZED_LOCATIONS,
-                           flag_guess_branch_prob
+                           GCC_OPTION (flag_guess_branch_prob)
                            ? G_("execution counts estimated\n")
                            : G_("execution counts assumed to be zero\n"));
-	      if (!flag_guess_branch_prob)
+	      if (!GCC_OPTION (flag_guess_branch_prob))
 		dump_printf (MSG_OPTIMIZED_LOCATIONS,
                              "this can result in poorly optimized code\n");
 	    }
@@ -566,7 +566,7 @@ coverage_compute_profile_id (struct cgraph_node *n)
     chksum = coverage_checksum_string
       (chksum, first_global_object_name);
   chksum = coverage_checksum_string
-    (chksum, aux_base_name);
+    (chksum, GCC_OPTION (aux_base_name));
 
   /* Non-negative integers are hopefully small enough to fit in all targets.  */
   return chksum & 0x7fffffff;
@@ -1143,19 +1143,19 @@ coverage_init (const char *filename)
     g->get_passes ()->get_pass_profile ()->static_pass_number;
   g->get_dumps ()->dump_start (profile_pass_num, NULL);
 
-  if (!profile_data_prefix && !IS_ABSOLUTE_PATH (filename))
-    profile_data_prefix = getpwd ();
+  if (!GCC_OPTION (profile_data_prefix) && !IS_ABSOLUTE_PATH (filename))
+    GCC_OPTION (profile_data_prefix) = getpwd ();
 
-  if (profile_data_prefix)
-    prefix_len = strlen (profile_data_prefix);
+  if (GCC_OPTION (profile_data_prefix))
+    prefix_len = strlen (GCC_OPTION (profile_data_prefix));
 
   /* Name of da file.  */
   da_file_name = XNEWVEC (char, len + strlen (GCOV_DATA_SUFFIX)
 			  + prefix_len + 2);
 
-  if (profile_data_prefix)
+  if (GCC_OPTION (profile_data_prefix))
     {
-      memcpy (da_file_name, profile_data_prefix, prefix_len);
+      memcpy (da_file_name, GCC_OPTION (profile_data_prefix), prefix_len);
       da_file_name[prefix_len++] = '/';
     }
   memcpy (da_file_name + prefix_len, filename, len);
@@ -1163,11 +1163,11 @@ coverage_init (const char *filename)
 
   bbg_file_stamp = local_tick;
   
-  if (flag_branch_probabilities)
+  if (GCC_OPTION (flag_branch_probabilities))
     read_counts_file ();
 
   /* Name of bbg file.  */
-  if (flag_test_coverage && !flag_compare_debug)
+  if (GCC_OPTION (flag_test_coverage) && !GCC_OPTION (flag_compare_debug))
     {
       bbg_file_name = XNEWVEC (char, len + strlen (GCOV_NOTE_SUFFIX) + 1);
       memcpy (bbg_file_name, filename, len);
@@ -1198,7 +1198,7 @@ coverage_finish (void)
   if (bbg_file_name && gcov_close ())
     unlink (bbg_file_name);
 
-  if (!flag_branch_probabilities && flag_test_coverage
+  if (!GCC_OPTION (flag_branch_probabilities) && GCC_OPTION (flag_test_coverage)
       && (!local_tick || local_tick == (unsigned)-1))
     /* Only remove the da file, if we're emitting coverage code and
        cannot uniquely stamp it.  If we can stamp it, libgcov will DTRT.  */
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 877f6d9..76defaa 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -3644,7 +3644,7 @@ build_user_type_conversion_1 (tree totype, tree expr, int flags,
 	}
     }
 
-  candidates = splice_viable (candidates, pedantic, &any_viable_p);
+  candidates = splice_viable (candidates, GCC_OPTION (pedantic), &any_viable_p);
   if (!any_viable_p)
     {
       if (args)
@@ -3870,7 +3870,7 @@ perform_overload_resolution (tree fn,
 		  LOOKUP_NORMAL,
 		  candidates, complain);
 
-  *candidates = splice_viable (*candidates, pedantic, any_viable_p);
+  *candidates = splice_viable (*candidates, GCC_OPTION (pedantic), any_viable_p);
   if (*any_viable_p)
     cand = tourney (*candidates, complain);
   else
@@ -3922,7 +3922,7 @@ build_new_function_call (tree fn, vec<tree, va_gc> **args, bool koenig_p,
 	return error_mark_node;
     }
 
-  if (flag_tm)
+  if (GCC_OPTION (flag_tm))
     tm_malloc_replacement (fn);
 
   /* If this function was found without using argument dependent
@@ -4008,7 +4008,7 @@ build_operator_new_call (tree fnname, vec<tree, va_gc> **args,
   if (size_check != NULL_TREE)
     {
       tree errval = TYPE_MAX_VALUE (sizetype);
-      if (cxx_dialect >= cxx11 && flag_exceptions)
+      if (cxx_dialect >= cxx11 && GCC_OPTION (flag_exceptions))
 	errval = throw_bad_array_new_length ();
       *size = fold_build3 (COND_EXPR, sizetype, size_check,
 			   original_size, errval);
@@ -4181,7 +4181,7 @@ build_op_call_1 (tree obj, vec<tree, va_gc> **args, tsubst_flags_t complain)
 	  }
     }
 
-  candidates = splice_viable (candidates, pedantic, &any_viable_p);
+  candidates = splice_viable (candidates, GCC_OPTION (pedantic), &any_viable_p);
   if (!any_viable_p)
     {
       if (complain & tf_error)
@@ -4274,7 +4274,7 @@ op_error (location_t loc, enum tree_code code, enum tree_code code2,
   switch (code)
     {
     case COND_EXPR:
-      if (flag_diagnostics_show_caret)
+      if (GCC_OPTION (flag_diagnostics_show_caret))
 	error_at (loc, op_error_string (G_("ternary %<operator?:%>"),
 					3, match),
 		  TREE_TYPE (arg1), TREE_TYPE (arg2), TREE_TYPE (arg3));
@@ -4287,7 +4287,7 @@ op_error (location_t loc, enum tree_code code, enum tree_code code2,
 
     case POSTINCREMENT_EXPR:
     case POSTDECREMENT_EXPR:
-      if (flag_diagnostics_show_caret)
+      if (GCC_OPTION (flag_diagnostics_show_caret))
 	error_at (loc, op_error_string (G_("%<operator%s%>"), 1, match),
 		  opname, TREE_TYPE (arg1));
       else
@@ -4297,7 +4297,7 @@ op_error (location_t loc, enum tree_code code, enum tree_code code2,
       break;
 
     case ARRAY_REF:
-      if (flag_diagnostics_show_caret)
+      if (GCC_OPTION (flag_diagnostics_show_caret))
 	error_at (loc, op_error_string (G_("%<operator[]%>"), 2, match),
 		  TREE_TYPE (arg1), TREE_TYPE (arg2));
       else
@@ -4308,7 +4308,7 @@ op_error (location_t loc, enum tree_code code, enum tree_code code2,
 
     case REALPART_EXPR:
     case IMAGPART_EXPR:
-      if (flag_diagnostics_show_caret)
+      if (GCC_OPTION (flag_diagnostics_show_caret))
 	error_at (loc, op_error_string (G_("%qs"), 1, match),
 		  opname, TREE_TYPE (arg1));
       else
@@ -4318,7 +4318,7 @@ op_error (location_t loc, enum tree_code code, enum tree_code code2,
 
     default:
       if (arg2)
-	if (flag_diagnostics_show_caret)
+	if (GCC_OPTION (flag_diagnostics_show_caret))
 	  error_at (loc, op_error_string (G_("%<operator%s%>"), 2, match),
 		    opname, TREE_TYPE (arg1), TREE_TYPE (arg2));
 	else
@@ -4327,7 +4327,7 @@ op_error (location_t loc, enum tree_code code, enum tree_code code2,
 		    opname, arg1, opname, arg2,
 		    TREE_TYPE (arg1), TREE_TYPE (arg2));
       else
-	if (flag_diagnostics_show_caret)
+	if (GCC_OPTION (flag_diagnostics_show_caret))
 	  error_at (loc, op_error_string (G_("%<operator%s%>"), 1, match),
 		    opname, TREE_TYPE (arg1));
 	else
@@ -4794,7 +4794,7 @@ build_conditional_expr_1 (location_t loc, tree arg1, tree arg2, tree arg3,
 
 	 If the overload resolution fails, the program is
 	 ill-formed.  */
-      candidates = splice_viable (candidates, pedantic, &any_viable_p);
+      candidates = splice_viable (candidates, GCC_OPTION (pedantic), &any_viable_p);
       if (!any_viable_p)
 	{
           if (complain & tf_error)
@@ -4892,7 +4892,7 @@ build_conditional_expr_1 (location_t loc, tree arg1, tree arg2, tree arg3,
 			"conditional expression: %qT vs %qT",
 			arg2_type, arg3_type);
         }
-      else if (extra_warnings
+      else if (GCC_OPTION (extra_warnings)
 	       && ((TREE_CODE (arg2_type) == ENUMERAL_TYPE
 		    && !same_type_p (arg3_type, type_promotes_to (arg2_type)))
 		   || (TREE_CODE (arg3_type) == ENUMERAL_TYPE
@@ -5320,7 +5320,7 @@ build_new_op_1 (location_t loc, enum tree_code code, int flags, tree arg1,
       break;
 
     default:
-      strict_p = pedantic;
+      strict_p = GCC_OPTION (pedantic);
       break;
     }
 
@@ -5342,14 +5342,14 @@ build_new_op_1 (location_t loc, enum tree_code code, int flags, tree arg1,
 	     -fpermissive.  */
 	  else
 	    {
-	      const char *msg = (flag_permissive) 
+	      const char *msg = (GCC_OPTION (flag_permissive)) 
 		? G_("no %<%D(int)%> declared for postfix %qs,"
 		     " trying prefix operator instead")
 		: G_("no %<%D(int)%> declared for postfix %qs");
 	      permerror (loc, msg, fnname, operator_name_info[code].name);
 	    }
 
-	  if (!flag_permissive)
+	  if (!GCC_OPTION (flag_permissive))
 	    return error_mark_node;
 
 	  if (code == POSTINCREMENT_EXPR)
@@ -6358,7 +6358,7 @@ convert_arg_to_ellipsis (tree arg, tsubst_flags_t complain)
       && !DECIMAL_FLOAT_MODE_P (TYPE_MODE (arg_type)))
     {
       if ((complain & tf_warning)
-	  && warn_double_promotion && !c_inhibit_evaluation_warnings)
+	  && GCC_OPTION (warn_double_promotion) && !c_inhibit_evaluation_warnings)
 	warning_at (loc, OPT_Wdouble_promotion,
 		    "implicit conversion from %qT to %qT when passing "
 		    "argument to function",
@@ -6603,7 +6603,7 @@ convert_for_arg_passing (tree type, tree val, tsubst_flags_t complain)
 				   TYPE_SIZE (integer_type_node)))
     val = cp_perform_integral_promotions (val, complain);
   if ((complain & tf_warning)
-      && warn_suggest_attribute_format)
+      && GCC_OPTION (warn_suggest_attribute_format))
     {
       tree rhstype = TREE_TYPE (val);
       const enum tree_code coder = TREE_CODE (rhstype);
@@ -6624,7 +6624,7 @@ convert_for_arg_passing (tree type, tree val, tsubst_flags_t complain)
 bool
 magic_varargs_p (tree fn)
 {
-  if (flag_cilkplus && is_cilkplus_reduce_builtin (fn) != BUILT_IN_NONE)
+  if (GCC_OPTION (flag_cilkplus) && is_cilkplus_reduce_builtin (fn) != BUILT_IN_NONE)
     return true;
 
   if (DECL_BUILT_IN (fn))
@@ -6978,7 +6978,7 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
       /* Warn about initializer_list deduction that isn't currently in the
 	 working draft.  */
       if (cxx_dialect > cxx98
-	  && flag_deduce_init_list
+	  && GCC_OPTION (flag_deduce_init_list)
 	  && cand->template_decl
 	  && is_std_init_list (non_reference (type))
 	  && BRACE_ENCLOSED_INITIALIZER_P (arg))
@@ -7048,7 +7048,7 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
   /* Avoid actually calling copy constructors and copy assignment operators,
      if possible.  */
 
-  if (! flag_elide_constructors)
+  if (! GCC_OPTION (flag_elide_constructors))
     /* Do things the hard way.  */;
   else if (cand->num_convs == 1 
            && (DECL_COPY_CONSTRUCTOR_P (fn) 
@@ -7247,7 +7247,7 @@ build_cxx_call (tree fn, int nargs, tree *argarray,
     /* If it is a built-in array notation function, then the return type of
      the function is the element type of the array passed in as array 
      notation (i.e. the first parameter of the function).  */
-  if (flag_cilkplus && TREE_CODE (fn) == CALL_EXPR) 
+  if (GCC_OPTION (flag_cilkplus) && TREE_CODE (fn) == CALL_EXPR) 
     {
       enum built_in_function bif = 
 	is_cilkplus_reduce_builtin (CALL_EXPR_FN (fn));
@@ -7274,13 +7274,13 @@ build_cxx_call (tree fn, int nargs, tree *argarray,
   /* Some built-in function calls will be evaluated at compile-time in
      fold ().  Set optimize to 1 when folding __builtin_constant_p inside
      a constexpr function so that fold_builtin_1 doesn't fold it to 0.  */
-  optimize_sav = optimize;
-  if (!optimize && fndecl && DECL_IS_BUILTIN_CONSTANT_P (fndecl)
+  optimize_sav = GCC_OPTION (optimize);
+  if (!GCC_OPTION (optimize) && fndecl && DECL_IS_BUILTIN_CONSTANT_P (fndecl)
       && current_function_decl
       && DECL_DECLARED_CONSTEXPR_P (current_function_decl))
-    optimize = 1;
+    GCC_OPTION (optimize) = 1;
   fn = fold_if_not_in_template (fn);
-  optimize = optimize_sav;
+  GCC_OPTION (optimize) = optimize_sav;
 
   if (VOID_TYPE_P (TREE_TYPE (fn)))
     return fn;
@@ -7765,7 +7765,7 @@ build_new_method_call_1 (tree instance, tree fns, vec<tree, va_gc> **args,
 		      access_binfo, flags, &candidates, complain);
     }
   any_viable_p = false;
-  candidates = splice_viable (candidates, pedantic, &any_viable_p);
+  candidates = splice_viable (candidates, GCC_OPTION (pedantic), &any_viable_p);
 
   if (!any_viable_p)
     {
@@ -8600,7 +8600,7 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn,
       if (comp != 0)
 	{
 	  if ((complain & tf_warning)
-	      && warn_sign_promo
+	      && GCC_OPTION (warn_sign_promo)
 	      && (CONVERSION_RANK (t1) + CONVERSION_RANK (t2)
 		  == cr_std + cr_promotion)
 	      && t1->kind == ck_std
@@ -8646,7 +8646,7 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn,
      either between a constructor and a conversion op, or between two
      conversion ops.  */
   if ((complain & tf_warning)
-      && winner && warn_conversion && cand1->second_conv
+      && winner && GCC_OPTION (warn_conversion) && cand1->second_conv
       && (!DECL_CONSTRUCTOR_P (cand1->fn) || !DECL_CONSTRUCTOR_P (cand2->fn))
       && winner != compare_ics (cand1->second_conv, cand2->second_conv))
     {
@@ -8869,7 +8869,7 @@ tweak:
 
   /* Extension: If the worst conversion for one candidate is worse than the
      worst conversion for the other, take the first.  */
-  if (!pedantic && (complain & tf_warning_or_error))
+  if (!GCC_OPTION (pedantic) && (complain & tf_warning_or_error))
     {
       conversion_rank rank1 = cr_identity, rank2 = cr_identity;
       struct z_candidate *w = 0, *l = 0;
@@ -9262,7 +9262,7 @@ set_up_extended_ref_temp (tree decl, tree expr, vec<tree, va_gc> **cleanups,
     expr = get_target_expr (expr);
 
   if (TREE_CODE (decl) == FIELD_DECL
-      && extra_warnings && !TREE_NO_WARNING (decl))
+      && GCC_OPTION (extra_warnings) && !TREE_NO_WARNING (decl))
     {
       warning (OPT_Wextra, "a temporary bound to %qD only persists "
 	       "until the constructor exits", decl);
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index b46391b..5bb0caa 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -1605,7 +1605,7 @@ check_bases (tree t,
 
       /* Don't bother collecting tm attributes if transactional memory
 	 support is not enabled.  */
-      if (flag_tm)
+      if (GCC_OPTION (flag_tm))
 	{
 	  tree tm_attr = find_tm_attribute (TYPE_ATTRIBUTES (basetype));
 	  if (tm_attr)
@@ -1860,7 +1860,7 @@ maybe_warn_about_overly_private_class (tree t)
   int has_nonprivate_method = 0;
   tree fn;
 
-  if (!warn_ctor_dtor_privacy
+  if (!GCC_OPTION (warn_ctor_dtor_privacy)
       /* If the class has friends, those entities might create and
 	 access instances, so we should not warn.  */
       || (CLASSTYPE_FRIEND_CLASSES (t)
@@ -3675,7 +3675,7 @@ check_field_decls (tree t, tree *access_decls,
 	is needed to free dynamic memory.
 
      This seems enough for practical purposes.  */
-  if (warn_ecpp
+  if (GCC_OPTION (warn_ecpp)
       && has_pointers
       && TYPE_HAS_USER_CONSTRUCTOR (t)
       && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)
@@ -4198,7 +4198,7 @@ layout_empty_base (record_layout_info rli, tree binfo,
   if (CLASSTYPE_USER_ALIGN (basetype))
     {
       rli->record_align = MAX (rli->record_align, CLASSTYPE_ALIGN (basetype));
-      if (warn_packed)
+      if (GCC_OPTION (warn_packed))
 	rli->unpacked_align = MAX (rli->unpacked_align, CLASSTYPE_ALIGN (basetype));
       TYPE_USER_ALIGN (rli->t) = 1;
     }
@@ -4833,7 +4833,7 @@ set_method_tm_attributes (tree t)
 
   /* Don't bother collecting tm attributes if transactional memory
      support is not enabled.  */
-  if (!flag_tm)
+  if (!GCC_OPTION (flag_tm))
     return;
 
   /* Process virtual methods first, as they inherit directly from the
@@ -5550,7 +5550,7 @@ check_bases_and_members (tree t)
   /* If the class has no user-declared constructor, but does have
      non-static const or reference data members that can never be
      initialized, issue a warning.  */
-  if (warn_uninitialized
+  if (GCC_OPTION (warn_uninitialized)
       /* Classes with user-declared constructors are presumed to
 	 initialize these members.  */
       && !TYPE_HAS_USER_CONSTRUCTOR (t)
@@ -5815,7 +5815,7 @@ layout_virtual_bases (record_layout_info rli, splay_tree offsets)
 	     cases; to deal with all the possibilities would probably
 	     require performing both layout algorithms and comparing
 	     the results which is not particularly tractable.  */
-	  if (warn_abi
+	  if (GCC_OPTION (warn_abi)
 	      && first_vbase
 	      && (tree_int_cst_lt
 		  (size_binop (CEIL_DIV_EXPR,
@@ -5931,7 +5931,7 @@ warn_about_ambiguous_bases (tree t)
     }
 
   /* Check for ambiguous virtual bases.  */
-  if (extra_warnings)
+  if (GCC_OPTION (extra_warnings))
     for (vbases = CLASSTYPE_VBASECLASSES (t), i = 0;
 	 vec_safe_iterate (vbases, i, &binfo); i++)
       {
@@ -6159,7 +6159,7 @@ layout_class_type (tree t, tree *virtuals_p)
 	  /* We must also reset the DECL_MODE of the field.  */
 	  if (abi_version_at_least (2))
 	    DECL_MODE (field) = TYPE_MODE (type);
-	  else if (warn_abi
+	  else if (GCC_OPTION (warn_abi)
 		   && DECL_MODE (field) != TYPE_MODE (type))
 	    /* Versions of G++ before G++ 3.4 did not reset the
 	       DECL_MODE.  */
@@ -6181,7 +6181,7 @@ layout_class_type (tree t, tree *virtuals_p)
       /* If a bit-field does not immediately follow another bit-field,
 	 and yet it starts in the middle of a byte, we have failed to
 	 comply with the ABI.  */
-      if (warn_abi
+      if (GCC_OPTION (warn_abi)
 	  && DECL_C_BIT_FIELD (field)
 	  /* The TREE_NO_WARNING flag gets set by Objective-C when
 	     laying out an Objective-C class.  The ObjC ABI differs
@@ -6197,7 +6197,7 @@ layout_class_type (tree t, tree *virtuals_p)
 
       /* G++ used to use DECL_FIELD_OFFSET as if it were the byte
 	 offset of the field.  */
-      if (warn_abi
+      if (GCC_OPTION (warn_abi)
 	  && !abi_version_at_least (2)
 	  && !tree_int_cst_equal (DECL_FIELD_OFFSET (field),
 				  byte_position (field))
@@ -6288,7 +6288,7 @@ layout_class_type (tree t, tree *virtuals_p)
 	{
 	  TYPE_SIZE (base_t) = bitsize_zero_node;
 	  TYPE_SIZE_UNIT (base_t) = size_zero_node;
-	  if (warn_abi && !integer_zerop (rli_size_unit_so_far (rli)))
+	  if (GCC_OPTION (warn_abi) && !integer_zerop (rli_size_unit_so_far (rli)))
 	    warning (OPT_Wabi,
 		     "layout of classes derived from empty class %qT "
 		     "may change in a future version of GCC",
@@ -6527,7 +6527,7 @@ finish_struct_1 (tree t)
 
       /* If we're warning about ABI tags, check the types of the new
 	 virtual functions.  */
-      if (warn_abi_tag)
+      if (GCC_OPTION (warn_abi_tag))
 	for (tree v = virtuals; v; v = TREE_CHAIN (v))
 	  check_abi_tags (t, TREE_VALUE (v));
     }
@@ -6597,7 +6597,7 @@ finish_struct_1 (tree t)
 
   /* This warning does not make sense for Java classes, since they
      cannot have destructors.  */
-  if (!TYPE_FOR_JAVA (t) && warn_nonvdtor && TYPE_POLYMORPHIC_P (t))
+  if (!TYPE_FOR_JAVA (t) && GCC_OPTION (warn_nonvdtor) && TYPE_POLYMORPHIC_P (t))
     {
       tree dtor;
 
@@ -6619,7 +6619,7 @@ finish_struct_1 (tree t)
 
   complete_vars (t);
 
-  if (warn_overloaded_virtual)
+  if (GCC_OPTION (warn_overloaded_virtual))
     warn_hidden (t);
 
   /* Class layout, assignment of virtual table slots, etc., is now
@@ -6629,7 +6629,7 @@ finish_struct_1 (tree t)
 
   maybe_suppress_debug_info (t);
 
-  if (flag_vtable_verify)
+  if (GCC_OPTION (flag_vtable_verify))
     vtv_save_class_info (t);
 
   dump_class_hierarchy (t);
@@ -7593,7 +7593,7 @@ resolve_address_of_overloaded_function (tree target_type,
   fn = TREE_PURPOSE (matches);
 
   if (DECL_NONSTATIC_MEMBER_FUNCTION_P (fn)
-      && !(flags & tf_ptrmem_ok) && !flag_ms_extensions)
+      && !(flags & tf_ptrmem_ok) && !GCC_OPTION (flag_ms_extensions))
     {
       static int explained;
 
@@ -7687,7 +7687,7 @@ instantiate_type (tree lhstype, tree rhs, tsubst_flags_t flags)
       tree fntype = non_reference (lhstype);
       if (same_type_p (fntype, TREE_TYPE (rhs)))
 	return rhs;
-      if (flag_ms_extensions
+      if (GCC_OPTION (flag_ms_extensions)
 	  && TYPE_PTRMEMFUNC_P (fntype)
 	  && !TYPE_PTRMEMFUNC_P (TREE_TYPE (rhs)))
 	/* Microsoft allows `A::f' to be resolved to a
@@ -7722,7 +7722,7 @@ instantiate_type (tree lhstype, tree rhs, tsubst_flags_t flags)
   gcc_assert (TREE_CODE (rhs) == ADDR_EXPR
 	      || TREE_CODE (rhs) == COMPONENT_REF
 	      || is_overloaded_fn (rhs)
-	      || (flag_ms_extensions && TREE_CODE (rhs) == FUNCTION_DECL));
+	      || (GCC_OPTION (flag_ms_extensions) && TREE_CODE (rhs) == FUNCTION_DECL));
 
   /* This should really only be used when attempting to distinguish
      what sort of a pointer to function we have.  For now, any
@@ -7997,8 +7997,8 @@ note_name_declared_in_class (tree name, tree decl)
      name, and the C++ standard says this diagnostic is not required.  So
      allow it in extern "C" blocks unless predantic is specified.
      Allow it in all cases if -ms-extensions is specified.  */
-  if ((!pedantic && current_lang_name == lang_name_c)
-      || flag_ms_extensions)
+  if ((!GCC_OPTION (pedantic) && current_lang_name == lang_name_c)
+      || GCC_OPTION (flag_ms_extensions))
     return;
   n = splay_tree_lookup (names_used, (splay_tree_key) name);
   if (n)
@@ -9418,7 +9418,7 @@ build_rtti_vtbl_entries (tree binfo, vtbl_init_data* vid)
 			BINFO_OFFSET (vid->rtti_binfo), BINFO_OFFSET (b));
 
   /* The second entry is the address of the typeinfo object.  */
-  if (flag_rtti)
+  if (GCC_OPTION (flag_rtti))
     decl = build_address (get_tinfo_decl (t));
   else
     decl = integer_zero_node;
diff --git a/gcc/cp/cp-cilkplus.c b/gcc/cp/cp-cilkplus.c
index f3a2aff..7bcc0d9 100644
--- a/gcc/cp/cp-cilkplus.c
+++ b/gcc/cp/cp-cilkplus.c
@@ -130,7 +130,7 @@ cilk_install_body_with_frame_cleanup (tree fndecl, tree orig_body, void *wd)
   append_to_statement_list (detach_expr, &body);
   cilk_outline (fndecl, &orig_body, (struct wrapper_data *) wd);
   append_to_statement_list (orig_body, &body);
-  if (flag_exceptions)
+  if (GCC_OPTION (flag_exceptions))
     {
       tree except_flag = set_cilk_except_flag (frame);
       tree except_data = set_cilk_except_data (frame);
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index ef4b043..4abce98 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -428,7 +428,7 @@ gimplify_expr_stmt (tree *stmt_p)
      In this case we will not want to emit the gimplified statement.
      However, we may still want to emit a warning, so we do that before
      gimplification.  */
-  if (stmt && warn_unused_value)
+  if (stmt && GCC_OPTION (warn_unused_value))
     {
       if (!TREE_SIDE_EFFECTS (stmt))
 	{
@@ -1311,7 +1311,7 @@ cp_genericize (tree fndecl)
     return;
 
   /* Expand all the array notations here.  */
-  if (flag_cilkplus 
+  if (GCC_OPTION (flag_cilkplus) 
       && contains_array_notation_expr (DECL_SAVED_TREE (fndecl)))
     DECL_SAVED_TREE (fndecl) = 
       expand_array_notation_exprs (DECL_SAVED_TREE (fndecl));
@@ -1320,7 +1320,7 @@ cp_genericize (tree fndecl)
      walk_tree's hash functionality.  */
   cp_genericize_tree (&DECL_SAVED_TREE (fndecl));
 
-  if (flag_sanitize & SANITIZE_RETURN)
+  if (GCC_OPTION (flag_sanitize) & SANITIZE_RETURN)
     cp_ubsan_maybe_instrument_return (fndecl);
 
   /* Do everything else.  */
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index e8ece0e..0088d19 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -184,7 +184,7 @@ cp_convert_to_pointer (tree type, tree expr, tsubst_flags_t complain)
 			   /*c_cast_p=*/false, complain);
   else if (TYPE_PTRMEMFUNC_P (intype))
     {
-      if (!warn_pmf2ptr)
+      if (!GCC_OPTION (warn_pmf2ptr))
 	{
 	  if (TREE_CODE (expr) == PTRMEM_CST)
 	    return cp_convert_to_pointer (type, PTRMEM_CST_MEMBER (expr),
@@ -1156,7 +1156,7 @@ convert_to_void (tree expr, impl_conv_void implicit, tsubst_flags_t complain)
                  such expressions, see build_over_call in call.c.)
                - automatic dereferencing of references, since the user cannot
                  control it. (See also warn_if_unused_value() in c-common.c.)  */
-            if (warn_unused_value
+            if (GCC_OPTION (warn_unused_value)
 		&& implicit != ICV_CAST
                 && (complain & tf_warning)
                 && !TREE_NO_WARNING (expr)
@@ -1335,7 +1335,7 @@ convert_to_void (tree expr, impl_conv_void implicit, tsubst_flags_t complain)
   if (expr != error_mark_node && !VOID_TYPE_P (TREE_TYPE (expr)))
     {
       if (implicit != ICV_CAST
-	  && warn_unused_value
+	  && GCC_OPTION (warn_unused_value)
 	  && !TREE_NO_WARNING (expr)
 	  && !processing_template_decl)
 	{
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 4eb3e69..a470951 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -619,10 +619,10 @@ poplevel (int keep, int reverse, int functionbody)
      ended.  We only use the new rules if flag_new_for_scope is
      nonzero.  */
   leaving_for_scope
-    = current_binding_level->kind == sk_for && flag_new_for_scope == 1;
+    = current_binding_level->kind == sk_for && GCC_OPTION (flag_new_for_scope) == 1;
 
   /* Before we remove the declarations first check for unused variables.  */
-  if ((warn_unused_variable || warn_unused_but_set_variable)
+  if ((GCC_OPTION (warn_unused_variable) || GCC_OPTION (warn_unused_but_set_variable))
       && !processing_template_decl)
     for (tree d = getdecls (); d; d = TREE_CHAIN (d))
       {
@@ -1183,9 +1183,9 @@ check_redeclaration_exception_specification (tree new_decl,
      all declarations, including the definition and an explicit
      specialization, of that function shall have an
      exception-specification with the same set of type-ids.  */
-  if ((pedantic || ! DECL_IN_SYSTEM_HEADER (old_decl))
+  if ((GCC_OPTION (pedantic) || ! DECL_IN_SYSTEM_HEADER (old_decl))
       && ! DECL_IS_BUILTIN (old_decl)
-      && flag_exceptions
+      && GCC_OPTION (flag_exceptions)
       && !comp_except_specs (new_exceptions, old_exceptions, ce_normal))
     {
       error ("declaration of %qF has a different exception specifier",
@@ -1798,7 +1798,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
       /* Optionally warn about more than one declaration for the same
 	 name, but don't warn about a function declaration followed by a
 	 definition.  */
-      if (warn_redundant_decls && ! DECL_ARTIFICIAL (olddecl)
+      if (GCC_OPTION (warn_redundant_decls) && ! DECL_ARTIFICIAL (olddecl)
 	  && !(new_defines_function && DECL_INITIAL (olddecl) == NULL_TREE)
 	  /* Don't warn about extern decl followed by definition.  */
 	  && !(DECL_EXTERNAL (olddecl) && ! DECL_EXTERNAL (newdecl))
@@ -2976,7 +2976,7 @@ check_goto (tree decl)
 
   if (ent->in_omp_scope)
     error ("  enters OpenMP structured block");
-  else if (flag_openmp)
+  else if (GCC_OPTION (flag_openmp))
     {
       cp_binding_level *b;
       for (b = current_binding_level; b ; b = b->level_chain)
@@ -3714,8 +3714,8 @@ cxx_init_decl_processing (void)
   TREE_PUBLIC (global_namespace) = 1;
   begin_scope (sk_namespace, global_namespace);
 
-  if (flag_visibility_ms_compat)
-    default_visibility = VISIBILITY_HIDDEN;
+  if (GCC_OPTION (flag_visibility_ms_compat))
+    GCC_OPTION (default_visibility) = VISIBILITY_HIDDEN;
 
   /* Initially, C.  */
   current_lang_name = lang_name_c;
@@ -3872,17 +3872,17 @@ cxx_init_decl_processing (void)
   init_rtti_processing ();
   init_template_processing ();
 
-  if (flag_exceptions)
+  if (GCC_OPTION (flag_exceptions))
     init_exception_processing ();
 
   if (! supports_one_only ())
-    flag_weak = 0;
+    GCC_OPTION (flag_weak) = 0;
 
   make_fname_decl = cp_make_fname_decl;
   start_fname_decls ();
 
   /* Show we use EH for cleanups.  */
-  if (flag_exceptions)
+  if (GCC_OPTION (flag_exceptions))
     using_eh_for_cleanups ();
 }
 
@@ -4132,7 +4132,7 @@ push_cp_library_fn (enum tree_code operator_code, tree type,
 				 operator_code,
 				 type, ecf_flags);
   pushdecl (fn);
-  if (flag_tm)
+  if (GCC_OPTION (flag_tm))
     apply_tm_attr (fn, get_identifier ("transaction_safe"));
   return fn;
 }
@@ -4356,7 +4356,7 @@ check_tag_decl (cp_decl_specifier_seq *declspecs,
         error ("%<constexpr%> cannot be used for type declarations");
     }
 
-  if (declspecs->attributes && warn_attributes && declared_type)
+  if (declspecs->attributes && GCC_OPTION (warn_attributes) && declared_type)
     {
       location_t loc;
       if (!CLASS_TYPE_P (declared_type)
@@ -4908,7 +4908,7 @@ maybe_deduce_size_from_array_init (tree decl, tree init)
 		 well as static, so it does not get allocated.  If it's not
 		 `static', then don't mark it extern; finish_incomplete_decl
 		 will give it a default size and it will get allocated.  */
-	      else if (!pedantic && TREE_STATIC (decl) && !TREE_PUBLIC (decl))
+	      else if (!GCC_OPTION (pedantic) && TREE_STATIC (decl) && !TREE_PUBLIC (decl))
 		DECL_EXTERNAL (decl) = 1;
 	    }
 	  else if (failure == 3)
@@ -4999,7 +4999,7 @@ maybe_commonize_var (tree decl)
       && DECL_FUNCTION_SCOPE_P (decl)
       && vague_linkage_p (DECL_CONTEXT (decl)))
     {
-      if (flag_weak)
+      if (GCC_OPTION (flag_weak))
 	{
 	  /* With weak symbols, we simply make the variable COMDAT;
 	     that will cause copies in multiple translations units to
@@ -5775,7 +5775,7 @@ check_initializer (tree decl, tree init, int flags, vec<tree, va_gc> **cleanups)
 
 	  init_code = store_init_value (decl, init, cleanups, flags);
 
-	  if (pedantic && TREE_CODE (type) == ARRAY_TYPE
+	  if (GCC_OPTION (pedantic) && TREE_CODE (type) == ARRAY_TYPE
 	      && DECL_INITIAL (decl)
 	      && TREE_CODE (DECL_INITIAL (decl)) == STRING_CST
 	      && PAREN_STRING_LITERAL_P (DECL_INITIAL (decl)))
@@ -6583,7 +6583,7 @@ get_atexit_fn_ptr_type (void)
   if (!atexit_fn_ptr_type_node)
     {
       tree arg_type;
-      if (flag_use_cxa_atexit 
+      if (GCC_OPTION (flag_use_cxa_atexit) 
 	  && !targetm.cxx.use_atexit_for_cxa_atexit ())
 	/* The parameter to "__cxa_atexit" is "void (*)(void *)".  */
 	arg_type = ptr_type_node;
@@ -6615,7 +6615,7 @@ get_atexit_node (void)
   if (atexit_node)
     return atexit_node;
 
-  if (flag_use_cxa_atexit && !targetm.cxx.use_atexit_for_cxa_atexit ())
+  if (GCC_OPTION (flag_use_cxa_atexit) && !targetm.cxx.use_atexit_for_cxa_atexit ())
     {
       /* The declaration for `__cxa_atexit' is:
 
@@ -6728,7 +6728,7 @@ start_cleanup_fn (void)
   char name[32];
   tree fntype;
   tree fndecl;
-  bool use_cxa_atexit = flag_use_cxa_atexit
+  bool use_cxa_atexit = GCC_OPTION (flag_use_cxa_atexit)
 			&& !targetm.cxx.use_atexit_for_cxa_atexit ();
 
   push_to_top_level ();
@@ -6804,7 +6804,7 @@ register_dtor_fn (tree decl)
      "__aeabi_atexit"), and DECL is a class object, we can just pass the
      destructor to "__cxa_atexit"; we don't have to build a temporary
      function to do the cleanup.  */
-  dso_parm = (flag_use_cxa_atexit
+  dso_parm = (GCC_OPTION (flag_use_cxa_atexit)
 	      && !targetm.cxx.use_atexit_for_cxa_atexit ());
   ob_parm = (DECL_THREAD_LOCAL_P (decl) || dso_parm);
   use_dtor = ob_parm && CLASS_TYPE_P (type);
@@ -6957,7 +6957,7 @@ expand_static_init (tree decl, tree init)
       tree guard, guard_addr;
       tree flag, begin;
       /* We don't need thread-safety code for thread-local vars.  */
-      bool thread_guard = (flag_threadsafe_statics
+      bool thread_guard = (GCC_OPTION (flag_threadsafe_statics)
 			   && !DECL_THREAD_LOCAL_P (decl));
 
       /* Emit code to perform this initialization but once.  This code
@@ -7167,10 +7167,10 @@ cp_complete_array_type_or_error (tree *ptype, tree initial_value,
   bool sfinae = !(complain & tf_error);
   /* In SFINAE context we can't be lenient about zero-size arrays.  */
   if (sfinae)
-    ++pedantic;
+    ++GCC_OPTION (pedantic);
   failure = cp_complete_array_type (ptype, initial_value, do_default);
   if (sfinae)
-    --pedantic;
+    --GCC_OPTION (pedantic);
   if (failure)
     {
       if (sfinae)
@@ -7658,7 +7658,7 @@ grokfndecl (tree ctype,
   if (TYPE_NOTHROW_P (type) || nothrow_libfn_p (decl))
     TREE_NOTHROW (decl) = 1;
 
-  if (flag_openmp || flag_cilkplus)
+  if (GCC_OPTION (flag_openmp) || GCC_OPTION (flag_cilkplus))
     {
       /* Adjust "omp declare simd" attributes.  */
       tree ods = lookup_attribute ("omp declare simd", *attrlist);
@@ -7727,7 +7727,7 @@ grokfndecl (tree ctype,
 	  newtype = build_function_type (integer_type_node, oldtypeargs);
 	  TREE_TYPE (decl) = newtype;
 	}
-      if (warn_main)
+      if (GCC_OPTION (warn_main))
 	check_main_parameter_types (decl);
     }
 
@@ -8326,14 +8326,14 @@ compute_array_index_type (tree name, tree size, tsubst_flags_t complain)
 	error ("size of array is not an integral constant-expression");
       size = integer_one_node;
     }
-  else if (cxx_dialect < cxx1y && pedantic && warn_vla != 0)
+  else if (cxx_dialect < cxx1y && GCC_OPTION (pedantic) && GCC_OPTION (warn_vla) != 0)
     {
       if (name)
 	pedwarn (input_location, OPT_Wvla, "ISO C++ forbids variable length array %qD", name);
       else
 	pedwarn (input_location, OPT_Wvla, "ISO C++ forbids variable length array");
     }
-  else if (warn_vla > 0)
+  else if (GCC_OPTION (warn_vla) > 0)
     {
       if (name)
 	warning (OPT_Wvla, 
@@ -8384,7 +8384,7 @@ compute_array_index_type (tree name, tree size, tsubst_flags_t complain)
 
 	  stabilize_vla_size (itype);
 
-	  if (cxx_dialect >= cxx1y && flag_exceptions)
+	  if (cxx_dialect >= cxx1y && GCC_OPTION (flag_exceptions))
 	    {
 	      /* If the VLA bound is larger than half the address space,
 	         or less than zero, throw std::bad_array_length.  */
@@ -8394,7 +8394,7 @@ compute_array_index_type (tree name, tree size, tsubst_flags_t complain)
 			     throw_bad_array_length (), void_zero_node);
 	      finish_expr_stmt (comp);
 	    }
-	  else if (flag_sanitize & SANITIZE_VLA)
+	  else if (GCC_OPTION (flag_sanitize) & SANITIZE_VLA)
 	    {
 	      /* From C++1y onwards, we throw an exception on a negative
 		 length size of an array; see above.  */
@@ -8473,7 +8473,7 @@ create_array_type_for_decl (tree name, tree type, tree size)
 
   /* 8.3.4/1: If the type of the identifier of D contains the auto
      type-specifier, the program is ill-formed.  */
-  if (pedantic && type_uses_auto (type))
+  if (GCC_OPTION (pedantic) && type_uses_auto (type))
     pedwarn (input_location, OPT_Wpedantic,
 	     "declaration of %qD as array of %<auto%>", name);
 
@@ -8531,7 +8531,7 @@ create_array_type_for_decl (tree name, tree type, tree size)
     }
 
   if (cxx_dialect >= cxx1y && array_of_runtime_bound_p (type)
-      && (flag_iso || warn_vla > 0))
+      && (flag_iso || GCC_OPTION (warn_vla) > 0))
     pedwarn (input_location, OPT_Wvla, "array of array of runtime bound");
 
   /* Figure out the index type for the array.  */
@@ -9072,11 +9072,11 @@ grokdeclarator (const cp_declarator *declarator,
 
       if (type_was_error_mark_node)
 	/* We've already issued an error, don't complain more.  */;
-      else if (in_system_header_at (input_location) || flag_ms_extensions)
+      else if (in_system_header_at (input_location) || GCC_OPTION (flag_ms_extensions))
 	/* Allow it, sigh.  */;
       else if (! is_main)
 	permerror (input_location, "ISO C++ forbids declaration of %qs with no type", name);
-      else if (pedantic)
+      else if (GCC_OPTION (pedantic))
 	pedwarn (input_location, OPT_Wpedantic,
 		 "ISO C++ forbids declaration of %qs with no type", name);
       else
@@ -9095,7 +9095,7 @@ grokdeclarator (const cp_declarator *declarator,
 	  error ("%<__int128%> is not supported by this target");
 	  explicit_int128 = false;
 	}
-      else if (pedantic && ! in_system_header_at (input_location))
+      else if (GCC_OPTION (pedantic) && ! in_system_header_at (input_location))
 	pedwarn (input_location, OPT_Wpedantic,
 		 "ISO C++ does not support %<__int128%> for %qs", name);
     }
@@ -9145,12 +9145,12 @@ grokdeclarator (const cp_declarator *declarator,
       else
 	{
 	  ok = 1;
-	  if (!explicit_int && !defaulted_int && !explicit_char && !explicit_int128 && pedantic)
+	  if (!explicit_int && !defaulted_int && !explicit_char && !explicit_int128 && GCC_OPTION (pedantic))
 	    {
 	      pedwarn (input_location, OPT_Wpedantic, 
 		       "long, short, signed or unsigned used invalidly for %qs",
 		       name);
-	      if (flag_pedantic_errors)
+	      if (GCC_OPTION (flag_pedantic_errors))
 		ok = 0;
 	    }
 	}
@@ -9177,7 +9177,7 @@ grokdeclarator (const cp_declarator *declarator,
 
 	 Naturally, we extend this to long long as well.  Note that
 	 this does not include wchar_t.  */
-      || (bitfield && !flag_signed_bitfields
+      || (bitfield && !GCC_OPTION (flag_signed_bitfields)
 	  && !signed_p
 	  /* A typedef for plain `int' without `signed' can be
 	     controlled just like plain `int', but a typedef for
@@ -9764,7 +9764,7 @@ grokdeclarator (const cp_declarator *declarator,
 		   type);
 
 	  if (cxx_dialect >= cxx1y && array_of_runtime_bound_p (type)
-	      && (flag_iso || warn_vla > 0))
+	      && (flag_iso || GCC_OPTION (warn_vla) > 0))
 	    pedwarn (input_location, OPT_Wvla,
 		     declarator->kind == cdk_reference
 		     ? G_("reference to array of runtime bound")
@@ -10113,7 +10113,7 @@ grokdeclarator (const cp_declarator *declarator,
 	}
 
       if (cxx_dialect >= cxx1y && array_of_runtime_bound_p (type)
-	  && (flag_iso || warn_vla > 0))
+	  && (flag_iso || GCC_OPTION (warn_vla) > 0))
 	pedwarn (input_location, OPT_Wvla,
 		 "typedef naming array of runtime bound");
 
@@ -10698,7 +10698,7 @@ grokdeclarator (const cp_declarator *declarator,
 	if (! toplevel_bindings_p ()
 	    && (storage_class == sc_static
 		|| decl_spec_seq_has_spec_p (declspecs, ds_inline))
-	    && pedantic)
+	    && GCC_OPTION (pedantic))
 	  {
 	    if (storage_class == sc_static)
 	      pedwarn (input_location, OPT_Wpedantic, 
@@ -10796,7 +10796,7 @@ grokdeclarator (const cp_declarator *declarator,
 		error ("static member %qD declared %<register%>", decl);
 		storage_class = sc_none;
 	      }
-	    if (storage_class == sc_extern && pedantic)
+	    if (storage_class == sc_extern && GCC_OPTION (pedantic))
 	      {
 		pedwarn (input_location, OPT_Wpedantic, 
 			 "cannot explicitly declare member %q#D to have "
@@ -10951,7 +10951,7 @@ check_default_argument (tree decl, tree arg, tsubst_flags_t complain)
 				     LOOKUP_IMPLICIT);
   --cp_unevaluated_operand;
 
-  if (warn_zero_as_null_pointer_constant
+  if (GCC_OPTION (warn_zero_as_null_pointer_constant)
       && TYPE_PTR_OR_PTRMEM_P (decl_type)
       && null_ptr_cst_p (arg)
       && (complain & tf_warning)
@@ -11571,7 +11571,7 @@ grok_op_properties (tree decl, bool complain)
       /* Warn about conversion operators that will never be used.  */
       if (IDENTIFIER_TYPENAME_P (name)
 	  && ! DECL_TEMPLATE_INFO (decl)
-	  && warn_conversion
+	  && GCC_OPTION (warn_conversion)
 	  /* Warn only declaring the function; there is no need to
 	     warn again about out-of-class definitions.  */
 	  && class_type == current_class_type)
@@ -11689,7 +11689,7 @@ grok_op_properties (tree decl, bool complain)
 	    }
 
 	  /* More Effective C++ rule 6.  */
-	  if (warn_ecpp
+	  if (GCC_OPTION (warn_ecpp)
 	      && (operator_code == POSTINCREMENT_EXPR
 		  || operator_code == POSTDECREMENT_EXPR
 		  || operator_code == PREINCREMENT_EXPR
@@ -11739,7 +11739,7 @@ grok_op_properties (tree decl, bool complain)
 	    }
 
 	  /* More Effective C++ rule 7.  */
-	  if (warn_ecpp
+	  if (GCC_OPTION (warn_ecpp)
 	      && (operator_code == TRUTH_ANDIF_EXPR
 		  || operator_code == TRUTH_ORIF_EXPR
 		  || operator_code == COMPOUND_EXPR))
@@ -11748,7 +11748,7 @@ grok_op_properties (tree decl, bool complain)
 	}
 
       /* Effective C++ rule 23.  */
-      if (warn_ecpp
+      if (GCC_OPTION (warn_ecpp)
 	  && arity == 2
 	  && !DECL_ASSIGNMENT_OPERATOR_P (decl)
 	  && (operator_code == PLUS_EXPR
@@ -12661,7 +12661,7 @@ finish_enum_value_list (tree enumtype)
          user can request that for all enumerations with a command line
          flag, or for just one enumeration with an attribute.  */
 
-      use_short_enum = flag_short_enums
+      use_short_enum = GCC_OPTION (flag_short_enums)
         || lookup_attribute ("packed", TYPE_ATTRIBUTES (enumtype));
 
       for (itk = (use_short_enum ? itk_char : itk_int);
@@ -12721,7 +12721,7 @@ finish_enum_value_list (tree enumtype)
         (ENUM_UNDERLYING_TYPE (enumtype), precision, unsignedp);
 
       /* If -fstrict-enums, still constrain TYPE_MIN/MAX_VALUE.  */
-      if (flag_strict_enums)
+      if (GCC_OPTION (flag_strict_enums))
 	set_min_and_max_values_for_integral_type (enumtype, precision,
 						  unsignedp);
     }
@@ -13112,7 +13112,7 @@ start_preparsed_function (tree decl1, tree attrs, int flags)
     maybe_begin_member_template_processing (decl1);
 
   /* Effective C++ rule 15.  */
-  if (warn_ecpp
+  if (GCC_OPTION (warn_ecpp)
       && DECL_OVERLOADED_OPERATOR_P (decl1) == NOP_EXPR
       && VOID_TYPE_P (TREE_TYPE (fntype)))
     warning (OPT_Weffc__, "%<operator=%> should return a reference to %<*this%>");
@@ -13194,7 +13194,7 @@ start_preparsed_function (tree decl1, tree attrs, int flags)
 	      /* Otherwise, OLDDECL is either a previous declaration
 		 of the same function or DECL1 itself.  */
 
-	      if (warn_missing_declarations
+	      if (GCC_OPTION (warn_missing_declarations)
 		  && olddecl == decl1
 		  && !DECL_MAIN_P (decl1)
 		  && TREE_PUBLIC (decl1)
@@ -13345,7 +13345,7 @@ start_preparsed_function (tree decl1, tree attrs, int flags)
 	  DECL_EXTERNAL (decl1)
 	    = (finfo->interface_only
 	       || (DECL_DECLARED_INLINE_P (decl1)
-		   && ! flag_implement_inlines
+		   && ! GCC_OPTION (flag_implement_inlines)
 		   && !DECL_VINDEX (decl1)));
 
 	  /* For WIN32 we also want to put these in linkonce sections.  */
@@ -13457,7 +13457,7 @@ start_function (cp_decl_specifier_seq *declspecs,
 static bool
 use_eh_spec_block (tree fn)
 {
-  return (flag_exceptions && flag_enforce_eh_specs
+  return (GCC_OPTION (flag_exceptions) && GCC_OPTION (flag_enforce_eh_specs)
 	  && !processing_template_decl
 	  && !type_throw_all_p (TREE_TYPE (fn))
 	  /* We insert the EH_SPEC_BLOCK only in the original
@@ -13856,7 +13856,7 @@ finish_function (int flags)
   /* If this function can't throw any exceptions, remember that.  */
   if (!processing_template_decl
       && !cp_function_chain->can_throw
-      && !flag_non_call_exceptions
+      && !GCC_OPTION (flag_non_call_exceptions)
       && !decl_replaceable_p (fndecl))
     TREE_NOTHROW (fndecl) = 1;
 
@@ -13950,7 +13950,7 @@ finish_function (int flags)
     save_function_data (fndecl);
 
   /* Complain if there's just no return statement.  */
-  if (warn_return_type
+  if (GCC_OPTION (warn_return_type)
       && !VOID_TYPE_P (TREE_TYPE (fntype))
       && !dependent_type_p (TREE_TYPE (fntype))
       && !current_function_returns_value && !current_function_returns_null
@@ -13977,7 +13977,7 @@ finish_function (int flags)
   cfun->function_end_locus = input_location;
 
   /* Complain about parameters that are only set, but never otherwise used.  */
-  if (warn_unused_but_set_parameter
+  if (GCC_OPTION (warn_unused_but_set_parameter)
       && !processing_template_decl
       && errorcount == unused_but_set_errorcount
       && !DECL_CLONED_FUNCTION_P (fndecl))
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index dfc532d..7b596cd 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -1131,7 +1131,7 @@ is_late_template_attribute (tree attr, tree decl)
     return false;
 
   /* #pragma omp declare simd attribute needs to be always deferred.  */
-  if (flag_openmp
+  if (GCC_OPTION (flag_openmp)
       && is_attribute_p ("omp declare simd", name))
     return true;
 
@@ -1700,7 +1700,7 @@ mark_vtable_entries (tree decl)
 void
 comdat_linkage (tree decl)
 {
-  if (flag_weak)
+  if (GCC_OPTION (flag_weak))
     make_decl_one_only (decl, cxx_comdat_group (decl));
   else if (TREE_CODE (decl) == FUNCTION_DECL
 	   || (VAR_P (decl) && DECL_ARTIFICIAL (decl)))
@@ -1760,7 +1760,7 @@ maybe_make_one_only (tree decl)
      after a weak one is an error.  Also, not making explicit
      instantiations one_only means that we can end up with two copies of
      some template instantiations.  */
-  if (! flag_weak)
+  if (! GCC_OPTION (flag_weak))
     return;
 
   /* We can't set DECL_COMDAT on functions, or cp_finish_file will think
@@ -1835,7 +1835,7 @@ import_export_class (tree ctype)
   else if (lookup_attribute ("dllexport", TYPE_ATTRIBUTES (ctype)))
     import_export = 1;
   else if (CLASSTYPE_IMPLICIT_INSTANTIATION (ctype)
-	   && !flag_implicit_templates)
+	   && !GCC_OPTION (flag_implicit_templates))
     /* For a template class, without -fimplicit-templates, check the
        repository.  If the virtual table is assigned to this
        translation unit, then export the class; otherwise, import
@@ -1852,7 +1852,7 @@ import_export_class (tree ctype)
 	 translation units.  If we were to emit the vtable in each
 	 translation unit containing a definition, we would get
 	 multiple definition errors at link-time.  */
-      if (method && (flag_weak || ! DECL_DECLARED_INLINE_P (method)))
+      if (method && (GCC_OPTION (flag_weak) || ! DECL_DECLARED_INLINE_P (method)))
 	import_export = (DECL_REALLY_EXTERN (method) ? -1 : 1);
     }
 
@@ -1930,7 +1930,7 @@ decl_needed_p (tree decl)
       return true;
   /* Functions marked "dllexport" must be emitted so that they are
      visible to other DLLs.  */
-  if (flag_keep_inline_dllexport
+  if (GCC_OPTION (flag_keep_inline_dllexport)
       && lookup_attribute ("dllexport", DECL_ATTRIBUTES (decl)))
     return true;
   /* Otherwise, DECL does not need to be emitted -- yet.  A subsequent
@@ -2005,7 +2005,7 @@ maybe_emit_vtables (tree ctype)
 
       /* Because we're only doing syntax-checking, we'll never end up
 	 actually marking the variable as written.  */
-      if (flag_syntax_only)
+      if (GCC_OPTION (flag_syntax_only))
 	TREE_ASM_WRITTEN (vtbl) = 1;
       else if (DECL_ONE_ONLY (vtbl))
 	{
@@ -2212,7 +2212,7 @@ determine_visibility (tree decl)
 		determine_visibility_from_class (decl, DECL_CONTEXT (fn));
 	      else if (determine_hidden_inline (fn))
 		{
-		  DECL_VISIBILITY (decl) = default_visibility;
+		  DECL_VISIBILITY (decl) = GCC_OPTION (default_visibility);
 		  DECL_VISIBILITY_SPECIFIED (decl) =
 		    visibility_options.inpragma;
 		}
@@ -2229,7 +2229,7 @@ determine_visibility (tree decl)
 	  use_template = 0;
 	}
       else if (VAR_P (decl) && DECL_TINFO_P (decl)
-	       && flag_visibility_ms_compat)
+	       && GCC_OPTION (flag_visibility_ms_compat))
 	{
 	  /* Under -fvisibility-ms-compat, types are visible by default,
 	     even though their contents aren't.  */
@@ -2267,7 +2267,7 @@ determine_visibility (tree decl)
             {
 	      /* Set default visibility to whatever the user supplied with
 	         #pragma GCC visibility or a namespace visibility attribute.  */
-	      DECL_VISIBILITY (decl) = default_visibility;
+	      DECL_VISIBILITY (decl) = GCC_OPTION (default_visibility);
 	      DECL_VISIBILITY_SPECIFIED (decl) = visibility_options.inpragma;
             }
 	}
@@ -2707,7 +2707,7 @@ import_export_decl (tree decl)
       else if (CLASSTYPE_INTERFACE_KNOWN (class_type)
 	       && CLASSTYPE_INTERFACE_ONLY (class_type))
 	import_p = true;
-      else if ((!flag_weak || TARGET_WEAK_NOT_IN_ARCHIVE_TOC)
+      else if ((!GCC_OPTION (flag_weak) || TARGET_WEAK_NOT_IN_ARCHIVE_TOC)
 	       && !CLASSTYPE_USE_TEMPLATE (class_type)
 	       && CLASSTYPE_KEY_METHOD (class_type)
 	       && !DECL_DECLARED_INLINE_P (CLASSTYPE_KEY_METHOD (class_type)))
@@ -2726,7 +2726,7 @@ import_export_decl (tree decl)
 	{
 	  /* CLASS_TYPE is being exported from this translation unit,
 	     so DECL should be defined here.  */
-	  if (!flag_weak && CLASSTYPE_EXPLICIT_INSTANTIATION (class_type))
+	  if (!GCC_OPTION (flag_weak) && CLASSTYPE_EXPLICIT_INSTANTIATION (class_type))
 	    /* If a class is declared in a header with the "extern
 	       template" extension, then it will not be instantiated,
 	       even in translation units that would normally require
@@ -2758,7 +2758,7 @@ import_export_decl (tree decl)
 		}
 	    }
 	}
-      else if (!flag_implicit_templates
+      else if (!GCC_OPTION (flag_implicit_templates)
 	       && CLASSTYPE_IMPLICIT_INSTANTIATION (class_type))
 	import_p = true;
       else
@@ -2778,7 +2778,7 @@ import_export_decl (tree decl)
 		 that RTTI information will be emitted with the
 		 virtual table of the class, so we must emit it
 		 wherever it is used.  */
-	      && flag_rtti)
+	      && GCC_OPTION (flag_rtti))
 	    import_p = true;
 	  else
 	    {
@@ -2789,7 +2789,7 @@ import_export_decl (tree decl)
 			      || (CLASSTYPE_KEY_METHOD (type)
 				  && DECL_DECLARED_INLINE_P (CLASSTYPE_KEY_METHOD (type))));
 		  mark_needed (decl);
-		  if (!flag_weak)
+		  if (!GCC_OPTION (flag_weak))
 		    {
 		      comdat_p = false;
 		      DECL_EXTERNAL (decl) = 0;
@@ -2806,9 +2806,9 @@ import_export_decl (tree decl)
     {
       /* DECL is an implicit instantiation of a function or static
 	 data member.  */
-      if ((flag_implicit_templates
+      if ((GCC_OPTION (flag_implicit_templates)
 	   && !flag_use_repository)
-	  || (flag_implicit_inline_templates
+	  || (GCC_OPTION (flag_implicit_inline_templates)
 	      && TREE_CODE (decl) == FUNCTION_DECL
 	      && DECL_DECLARED_INLINE_P (decl)))
 	comdat_p = true;
@@ -2828,14 +2828,14 @@ import_export_decl (tree decl)
 	      DECL_NOT_REALLY_EXTERN (decl)
 		= ! (CLASSTYPE_INTERFACE_ONLY (ctype)
 		     || (DECL_DECLARED_INLINE_P (decl)
-			 && ! flag_implement_inlines
+			 && ! GCC_OPTION (flag_implement_inlines)
 			 && !DECL_VINDEX (decl)));
 
 	      if (!DECL_NOT_REALLY_EXTERN (decl))
 		DECL_EXTERNAL (decl) = 1;
 
 	      /* Always make artificials weak.  */
-	      if (DECL_ARTIFICIAL (decl) && flag_weak)
+	      if (DECL_ARTIFICIAL (decl) && GCC_OPTION (flag_weak))
 		comdat_p = true;
 	      else
 		maybe_make_one_only (decl);
@@ -3056,7 +3056,7 @@ get_tls_init_fn (tree var)
 
   /* If -fno-extern-tls-init, assume that we don't need to call
      a tls init function for a variable defined in another TU.  */
-  if (!flag_extern_tls_init && DECL_EXTERNAL (var))
+  if (!GCC_OPTION (flag_extern_tls_init) && DECL_EXTERNAL (var))
     return NULL_TREE;
 
 #ifdef ASM_OUTPUT_DEF
@@ -3557,7 +3557,7 @@ one_static_initialization_or_destruction (tree decl, tree init, bool initp)
 
       /* When using __cxa_atexit, we just check the GUARD as we would
 	 for a local static.  */
-      if (flag_use_cxa_atexit)
+      if (GCC_OPTION (flag_use_cxa_atexit))
 	{
 	  /* When using __cxa_atexit, we never try to destroy
 	     anything from a static destructor.  */
@@ -3599,7 +3599,7 @@ one_static_initialization_or_destruction (tree decl, tree init, bool initp)
 
   /* If we're using __cxa_atexit, we have not already set the GUARD,
      so we must do so now.  */
-  if (guard && initp && flag_use_cxa_atexit)
+  if (guard && initp && GCC_OPTION (flag_use_cxa_atexit))
     finish_expr_stmt (set_guard (guard));
 
   /* Perform the initialization or destruction.  */
@@ -3608,7 +3608,7 @@ one_static_initialization_or_destruction (tree decl, tree init, bool initp)
       if (init)
 	{
 	  finish_expr_stmt (init);
-	  if (flag_sanitize & SANITIZE_ADDRESS)
+	  if (GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
 	    {
 	      varpool_node *vnode = varpool_get_node (decl);
 	      if (vnode)
@@ -3618,7 +3618,7 @@ one_static_initialization_or_destruction (tree decl, tree init, bool initp)
 
       /* If we're using __cxa_atexit, register a function that calls the
 	 destructor for the object.  */
-      if (flag_use_cxa_atexit)
+      if (GCC_OPTION (flag_use_cxa_atexit))
 	finish_expr_stmt (register_dtor_fn (decl));
     }
   else
@@ -3663,7 +3663,7 @@ do_static_initialization_or_destruction (tree vars, bool initp)
      in other compilation units, or at least those that haven't been
      initialized yet.  Variables that need dynamic construction in
      the current compilation unit are kept accessible.  */
-  if (flag_sanitize & SANITIZE_ADDRESS)
+  if (GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
     finish_expr_stmt (asan_dynamic_init_call (/*after_p=*/false));
 
   node = vars;
@@ -3716,7 +3716,7 @@ do_static_initialization_or_destruction (tree vars, bool initp)
 
   /* Revert what __asan_before_dynamic_init did by calling
      __asan_after_dynamic_init.  */
-  if (flag_sanitize & SANITIZE_ADDRESS)
+  if (GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
     finish_expr_stmt (asan_dynamic_init_call (/*after_p=*/true));
 
   /* Finish up the init/destruct if-stmt body.  */
@@ -4267,10 +4267,10 @@ cp_write_global_declarations (void)
   cgraph_process_same_body_aliases ();
 
   /* Handle -fdump-ada-spec[-slim] */
-  if (flag_dump_ada_spec || flag_dump_ada_spec_slim)
+  if (GCC_OPTION (flag_dump_ada_spec) || GCC_OPTION (flag_dump_ada_spec_slim))
     {
-      if (flag_dump_ada_spec_slim)
-	collect_source_ref (main_input_filename);
+      if (GCC_OPTION (flag_dump_ada_spec_slim))
+	collect_source_ref (GCC_OPTION (main_input_filename));
       else
 	collect_source_refs (global_namespace);
 
@@ -4392,7 +4392,7 @@ cp_write_global_declarations (void)
 	     __cxa_atexit, then we don't need to do this; functions
 	     were registered at initialization time to destroy the
 	     local statics.  */
-	  if (!flag_use_cxa_atexit && vars)
+	  if (!GCC_OPTION (flag_use_cxa_atexit) && vars)
 	    {
 	      vars = nreverse (vars);
 	      do_static_initialization_or_destruction (vars, /*initp=*/false);
@@ -4503,7 +4503,7 @@ cp_write_global_declarations (void)
 	      /* If we're compiling -fsyntax-only pretend that this
 		 function has been written out so that we don't try to
 		 expand it again.  */
-	      if (flag_syntax_only)
+	      if (GCC_OPTION (flag_syntax_only))
 		TREE_ASM_WRITTEN (decl) = 1;
 	      reconsider = true;
 	    }
@@ -4600,7 +4600,7 @@ cp_write_global_declarations (void)
   timevar_stop (TV_PHASE_DEFERRED);
   timevar_start (TV_PHASE_OPT_GEN);
 
-  if (flag_vtable_verify)
+  if (GCC_OPTION (flag_vtable_verify))
     {
       vtv_recover_class_info ();
       vtv_compute_class_hierarchy_transitive_closure ();
@@ -4609,7 +4609,7 @@ cp_write_global_declarations (void)
 
   finalize_compilation_unit ();
 
-  if (flag_vtable_verify)
+  if (GCC_OPTION (flag_vtable_verify))
     {
       /* Generate the special constructor initialization function that
          calls __VLTRegisterPairs, and give it a very high
@@ -4648,7 +4648,7 @@ cp_write_global_declarations (void)
      to a file.  */
   dump_tu ();
 
-  if (flag_detailed_statistics)
+  if (GCC_OPTION (flag_detailed_statistics))
     {
       dump_tree_statistics ();
       dump_time_statistics ();
@@ -4760,7 +4760,7 @@ possibly_inlined_p (tree decl)
   gcc_assert (TREE_CODE (decl) == FUNCTION_DECL);
   if (DECL_UNINLINABLE (decl))
     return false;
-  if (!optimize || pragma_java_exceptions)
+  if (!GCC_OPTION (optimize) || pragma_java_exceptions)
     return DECL_DECLARED_INLINE_P (decl);
   /* When optimizing, we might inline everything when flatten
      attribute or heuristics inlining for size or autoinlining
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 454feb5..86f54b4 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -180,7 +180,7 @@ get_non_default_template_args_count (tree args, int flags)
 	 turn cause codegen differences between compilations with and
 	 without -g.  */
       (flags & TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS) != 0
-      || !flag_pretty_templates)
+      || !GCC_OPTION (flag_pretty_templates))
     return n;
 
   return GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (INNERMOST_TEMPLATE_ARGS (args));
@@ -370,7 +370,7 @@ dump_type (cxx_pretty_printer *pp, tree t, int flags)
       tree decl = TYPE_NAME (t);
       if ((flags & TFF_CHASE_TYPEDEF)
 	       || DECL_SELF_REFERENCE_P (decl)
-	       || (!flag_pretty_templates
+	       || (!GCC_OPTION (flag_pretty_templates)
 		   && DECL_LANG_SPECIFIC (decl) && DECL_TEMPLATE_INFO (decl)))
 	t = strip_typedefs (t);
       else if (alias_template_specialization_p (t))
@@ -625,7 +625,7 @@ dump_aggr_type (cxx_pretty_printer *pp, tree t, int flags)
 
       if ((typdef
 	   && ((flags & TFF_CHASE_TYPEDEF)
-	       || (!flag_pretty_templates && DECL_LANG_SPECIFIC (name)
+	       || (!GCC_OPTION (flag_pretty_templates) && DECL_LANG_SPECIFIC (name)
 		   && DECL_TEMPLATE_INFO (name))))
 	  || DECL_SELF_REFERENCE_P (name))
 	{
@@ -1433,7 +1433,7 @@ dump_function_decl (cxx_pretty_printer *pp, tree t, int flags)
 
   /* Pretty print template instantiations only.  */
   if (DECL_USE_TEMPLATE (t) && DECL_TEMPLATE_INFO (t)
-      && flag_pretty_templates)
+      && GCC_OPTION (flag_pretty_templates))
     {
       tree tmpl;
 
@@ -2012,7 +2012,7 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags)
 	      }
 	    skipfirst = true;
 	  }
-	if (flag_sanitize & SANITIZE_UNDEFINED
+	if (GCC_OPTION (flag_sanitize) & SANITIZE_UNDEFINED
 	    && is_ubsan_builtin_p (fn))
 	  {
 	    pp_string (cxx_pp, M_("<ubsan routine call>"));
@@ -3269,17 +3269,17 @@ print_instantiation_partial_context (diagnostic_context *context,
 
   t = t0;
 
-  if (template_backtrace_limit
-      && n_total > template_backtrace_limit) 
+  if (GCC_OPTION (template_backtrace_limit)
+      && n_total > GCC_OPTION (template_backtrace_limit)) 
     {
-      int skip = n_total - template_backtrace_limit;
-      int head = template_backtrace_limit / 2;
+      int skip = n_total - GCC_OPTION (template_backtrace_limit);
+      int head = GCC_OPTION (template_backtrace_limit) / 2;
 
       /* Avoid skipping just 1.  If so, skip 2.  */
       if (skip == 1)
        {
          skip = 2;
-         head = (template_backtrace_limit - 1) / 2;
+         head = (GCC_OPTION (template_backtrace_limit) - 1) / 2;
        }
      
       for (n = 0; n < head; n++)
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 221971a..2c9770c 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -196,7 +196,7 @@ do_begin_catch (void)
       fn = declare_library_fn (fn, ptr_type_node, ptr_type_node, ECF_NOTHROW);
 
       /* Create its transactional-memory equivalent.  */
-      if (flag_tm)
+      if (GCC_OPTION (flag_tm))
 	{
 	  tree fn2 = get_identifier ("_ITM_cxa_begin_catch");
 	  if (!get_global_value_if_present (fn2, &fn2))
@@ -244,7 +244,7 @@ do_end_catch (tree type)
       fn = push_void_library_fn (fn, void_list_node, 0);
 
       /* Create its transactional-memory equivalent.  */
-      if (flag_tm)
+      if (GCC_OPTION (flag_tm))
 	{
 	  tree fn2 = get_identifier ("_ITM_cxa_end_catch");
 	  if (!get_global_value_if_present (fn2, &fn2))
@@ -376,7 +376,7 @@ build_must_not_throw_expr (tree body, tree cond)
 {
   tree type = body ? TREE_TYPE (body) : void_type_node;
 
-  if (!flag_exceptions)
+  if (!GCC_OPTION (flag_exceptions))
     return body;
 
   if (cond && !value_dependent_expression_p (cond))
@@ -459,7 +459,7 @@ initialize_handler_parm (tree decl, tree exp)
 static inline int
 doing_eh (void)
 {
-  if (! flag_exceptions)
+  if (! GCC_OPTION (flag_exceptions))
     {
       static int warned = 0;
       if (! warned)
@@ -523,7 +523,7 @@ expand_start_catch_block (tree decl)
   /* If the C++ object needs constructing, we need to do that before
      calling __cxa_begin_catch, so that std::uncaught_exception gets
      the right value during the copy constructor.  */
-  else if (flag_use_cxa_get_exception_ptr
+  else if (GCC_OPTION (flag_use_cxa_get_exception_ptr)
 	   && TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (decl)))
     {
       exp = do_get_exception_ptr ();
@@ -633,7 +633,7 @@ do_allocate_exception (tree type)
       fn = declare_library_fn (fn, ptr_type_node, size_type_node,
 			        ECF_NOTHROW | ECF_MALLOC);
 
-      if (flag_tm)
+      if (GCC_OPTION (flag_tm))
 	{
 	  tree fn2 = get_identifier ("_ITM_cxa_allocate_exception");
 	  if (!get_global_value_if_present (fn2, &fn2))
@@ -775,7 +775,7 @@ build_throw (tree exp)
 					  cleanup_type, NULL_TREE);
 	  fn = push_throw_library_fn (fn, tmp);
 
-	  if (flag_tm)
+	  if (GCC_OPTION (flag_tm))
 	    {
 	      tree fn2 = get_identifier ("_ITM_cxa_throw");
 	      if (!get_global_value_if_present (fn2, &fn2))
@@ -906,7 +906,7 @@ build_throw (tree exp)
 	    (fn, build_function_type_list (void_type_node, NULL_TREE));
 	}
 
-      if (flag_tm)
+      if (GCC_OPTION (flag_tm))
 	apply_tm_attr (fn, get_identifier ("transaction_pure"));
 
       /* ??? Indicate that this function call allows exceptions of the type
@@ -1245,7 +1245,7 @@ expr_noexcept_p (tree expr, tsubst_flags_t complain)
   fn = cp_walk_tree_without_duplicates (&expr, check_noexcept_r, 0);
   if (fn)
     {
-      if ((complain & tf_warning) && warn_noexcept
+      if ((complain & tf_warning) && GCC_OPTION (warn_noexcept)
 	  && TREE_CODE (fn) == FUNCTION_DECL)
 	{
 	  if (!DECL_INITIAL (fn))
@@ -1290,7 +1290,7 @@ type_noexcept_p (const_tree type)
 {
   tree spec = TYPE_RAISES_EXCEPTIONS (type);
   gcc_assert (!DEFERRED_NOEXCEPT_SPEC_P (spec));
-  if (flag_nothrow_opt)
+  if (GCC_OPTION (flag_nothrow_opt))
     return nothrow_spec_p (spec);
   else
     return spec == noexcept_true_spec;
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c
index 150b392..383e387 100644
--- a/gcc/cp/friend.c
+++ b/gcc/cp/friend.c
@@ -536,7 +536,7 @@ do_friend (tree ctype, tree declarator, tree decl,
 	  /* We must check whether the decl refers to template
 	     arguments before push_template_decl_real adds a
 	     reference to the containing template class.  */
-	  int warn = (warn_nontemplate_friend
+	  int warn = (GCC_OPTION (warn_nontemplate_friend)
 		      && ! funcdef_flag && ! is_friend_template
 		      && current_template_parms
 		      && uses_template_parms (decl));
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 7f5d045..302de3e 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -562,7 +562,7 @@ perform_member_init (tree member, tree init)
 
   /* Effective C++ rule 12 requires that all data members be
      initialized.  */
-  if (warn_ecpp && init == NULL_TREE && TREE_CODE (type) != ARRAY_TYPE)
+  if (GCC_OPTION (warn_ecpp) && init == NULL_TREE && TREE_CODE (type) != ARRAY_TYPE)
     warning_at (DECL_SOURCE_LOCATION (current_function_decl), OPT_Weffc__,
 		"%qD should be initialized in the member initialization list",
 		member);
@@ -575,7 +575,7 @@ perform_member_init (tree member, tree init)
   if (decl == error_mark_node)
     return;
 
-  if (warn_init_self && init && TREE_CODE (init) == TREE_LIST
+  if (GCC_OPTION (warn_init_self) && init && TREE_CODE (init) == TREE_LIST
       && TREE_CHAIN (init) == NULL_TREE)
     {
       tree val = TREE_VALUE (init);
@@ -866,7 +866,7 @@ sort_mem_initializers (tree t, tree mem_inits)
       /* Issue a warning if the explicit initializer order does not
 	 match that which will actually occur.
 	 ??? Are all these on the correct lines?  */
-      if (warn_reorder && !subobject_init)
+      if (GCC_OPTION (warn_reorder) && !subobject_init)
 	{
 	  if (TREE_CODE (TREE_PURPOSE (next_subobject)) == FIELD_DECL)
 	    warning (OPT_Wreorder, "%q+D will be initialized after",
@@ -1061,7 +1061,7 @@ emit_mem_initializers (tree mem_inits)
 	     the base class should probably be explicitly initialized if there
 	     is a user-defined constructor in the base class (other than the
 	     default constructor, which will be called anyway).  */
-	  if (extra_warnings
+	  if (GCC_OPTION (extra_warnings)
 	      && DECL_COPY_CONSTRUCTOR_P (current_function_decl)
 	      && type_has_user_nondefault_constructor (BINFO_TYPE (subobject)))
 	    warning_at (DECL_SOURCE_LOCATION (current_function_decl),
@@ -1941,7 +1941,7 @@ build_offset_ref (tree type, tree member, bool address_p,
 	  member = build2 (OFFSET_REF, TREE_TYPE (member), decl, member);
 	  /* In Microsoft mode, treat a non-static member function as if
 	     it were a pointer-to-member.  */
-	  if (flag_ms_extensions)
+	  if (GCC_OPTION (flag_ms_extensions))
 	    {
 	      PTRMEM_OK_P (member) = 1;
 	      return cp_build_addr_expr (member, complain);
@@ -2549,7 +2549,7 @@ build_new_1 (vec<tree, va_gc> **placement, tree type, tree nelts,
 	    }
 	  /* Perform the overflow check.  */
 	  tree errval = TYPE_MAX_VALUE (sizetype);
-	  if (cxx_dialect >= cxx11 && flag_exceptions)
+	  if (cxx_dialect >= cxx11 && GCC_OPTION (flag_exceptions))
 	    errval = throw_bad_array_new_length ();
 	  if (outer_nelts_check != NULL_TREE)
             size = fold_build3 (COND_EXPR, sizetype, outer_nelts_check,
@@ -2675,7 +2675,7 @@ build_new_1 (vec<tree, va_gc> **placement, tree type, tree nelts,
      So check for a null exception spec on the op new we just called.  */
 
   nothrow = TYPE_NOTHROW_P (TREE_TYPE (alloc_fn));
-  check_new = (flag_check_new || nothrow) && ! use_java_new;
+  check_new = (GCC_OPTION (flag_check_new) || nothrow) && ! use_java_new;
 
   if (cookie_size)
     {
@@ -2855,7 +2855,7 @@ build_new_1 (vec<tree, va_gc> **placement, tree type, tree nelts,
 	 unambiguous matching deallocation function can be found,
 	 propagating the exception does not cause the object's memory to be
 	 freed.  */
-      if (flag_exceptions && ! use_java_new)
+      if (GCC_OPTION (flag_exceptions) && ! use_java_new)
 	{
 	  enum tree_code dcode = array_p ? VEC_DELETE_EXPR : DELETE_EXPR;
 	  tree cleanup;
@@ -3420,7 +3420,7 @@ build_vec_init (tree base, tree maxindex, tree init,
   if (init && TREE_CODE (init) == CONSTRUCTOR
       && CONSTRUCTOR_NELTS (init) > 0
       && !TREE_CONSTANT (maxindex)
-      && flag_exceptions)
+      && GCC_OPTION (flag_exceptions))
     length_check = fold_build2 (LT_EXPR, boolean_type_node, maxindex,
 				size_int (CONSTRUCTOR_NELTS (init) - 1));
 
@@ -3519,7 +3519,7 @@ build_vec_init (tree base, tree maxindex, tree init,
   /* Protect the entire array initialization so that we can destroy
      the partially constructed array if an exception is thrown.
      But don't do this if we're assigning.  */
-  if (flag_exceptions && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
+  if (GCC_OPTION (flag_exceptions) && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
       && from_array != 2)
     {
       try_block = begin_try_block ();
@@ -3781,7 +3781,7 @@ build_vec_init (tree base, tree maxindex, tree init,
     }
 
   /* Make sure to cleanup any partially constructed elements.  */
-  if (flag_exceptions && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
+  if (GCC_OPTION (flag_exceptions) && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
       && from_array != 2)
     {
       tree e;
@@ -3937,7 +3937,7 @@ build_delete (tree otype, tree addr, special_function_kind auto_delete,
 		}
 	      complete_p = false;
 	    }
-	  else if (auto_delete == sfk_deleting_destructor && warn_delnonvdtor
+	  else if (auto_delete == sfk_deleting_destructor && GCC_OPTION (warn_delnonvdtor)
 	           && MAYBE_CLASS_TYPE_P (type) && !CLASSTYPE_FINAL (type)
 		   && TYPE_POLYMORPHIC_P (type))
 	    {
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 3fe275e..c7dfe40 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -174,9 +174,9 @@ init_reswords (void)
 
   if (cxx_dialect < cxx11)
     mask |= D_CXX0X;
-  if (flag_no_asm)
+  if (GCC_OPTION (flag_no_asm))
     mask |= D_ASM | D_EXT;
-  if (flag_no_gnu_keywords)
+  if (GCC_OPTION (flag_no_gnu_keywords))
     mask |= D_EXT;
 
   /* The Objective-C keywords are all context-dependent.  */
@@ -362,8 +362,8 @@ handle_pragma_interface (cpp_reader* /*dfile*/)
     {
       /* If this is zero at this point, then we are
 	 auto-implementing.  */
-      if (main_input_filename == 0)
-	main_input_filename = LOCATION_FILE (input_location);
+      if (GCC_OPTION (main_input_filename) == 0)
+	GCC_OPTION (main_input_filename) = LOCATION_FILE (input_location);
     }
 
   finfo->interface_only = interface_strcmp (filename);
@@ -394,8 +394,8 @@ handle_pragma_implementation (cpp_reader* /*dfile*/)
 
   if (fname == 0)
     {
-      if (main_input_filename)
-	filename = main_input_filename;
+      if (GCC_OPTION (main_input_filename))
+	filename = GCC_OPTION (main_input_filename);
       else
 	filename = LOCATION_FILE (input_location);
       filename = lbasename (filename);
@@ -493,7 +493,7 @@ unqualified_fn_lookup_error (tree name)
 		 "parameter, so a declaration of %qD must be available",
 		 name, name);
 
-      if (!flag_permissive)
+      if (!GCC_OPTION (flag_permissive))
 	{
 	  static bool hint;
 	  if (!hint)
@@ -709,8 +709,8 @@ in_main_input_context (void)
   struct tinst_level *tl = outermost_tinst_level();
 
   if (tl)
-    return filename_cmp (main_input_filename,
+    return filename_cmp (GCC_OPTION (main_input_filename),
 			 LOCATION_FILE (tl->locus)) == 0;
   else
-    return filename_cmp (main_input_filename, LOCATION_FILE (input_location)) == 0;
+    return filename_cmp (GCC_OPTION (main_input_filename), LOCATION_FILE (input_location)) == 0;
 }
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 251edb1..5e3ce82 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -3352,7 +3352,7 @@ start_mangling (const tree entity)
 static void
 finish_mangling_internal (const bool warn)
 {
-  if (warn_abi && warn && G.need_abi_warning)
+  if (GCC_OPTION (warn_abi) && warn && G.need_abi_warning)
     warning (OPT_Wabi, "the mangled name of %qD will change in a future "
 	     "version of GCC",
 	     G.entity);
@@ -3502,11 +3502,11 @@ mangle_decl (const tree decl)
 		"avoids this error with a change in mangling");
 
 #ifdef ASM_OUTPUT_DEF
-      save_ver = flag_abi_version;
-      flag_abi_version = 0;
+      save_ver = GCC_OPTION (flag_abi_version);
+      GCC_OPTION (flag_abi_version) = 0;
       id2 = mangle_decl_string (decl);
       id2 = targetm.mangle_decl_assembler_name (decl, id2);
-      flag_abi_version = save_ver;
+      GCC_OPTION (flag_abi_version) = save_ver;
 
       alias = make_alias_for (decl, id2);
       DECL_IGNORED_P (alias) = 1;
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index d72b564..92e177a 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -257,7 +257,7 @@ make_alias_for_thunk (tree function)
 
   alias = make_alias_for (function, get_identifier (buf));
 
-  if (!flag_syntax_only)
+  if (!GCC_OPTION (flag_syntax_only))
     {
       struct cgraph_node *funcn, *aliasn;
       funcn = cgraph_get_node (function);
@@ -345,7 +345,7 @@ use_thunk (tree thunk_fndecl, bool emit_p)
   DECL_COMDAT (thunk_fndecl) = DECL_COMDAT (function);
   DECL_WEAK (thunk_fndecl) = DECL_WEAK (function);
 
-  if (flag_syntax_only)
+  if (GCC_OPTION (flag_syntax_only))
     {
       TREE_ASM_WRITTEN (thunk_fndecl) = 1;
       return;
@@ -356,11 +356,11 @@ use_thunk (tree thunk_fndecl, bool emit_p)
   if (TARGET_USE_LOCAL_THUNK_ALIAS_P (function)
       && targetm_common.have_named_sections)
     {
-      resolve_unique_section (function, 0, flag_function_sections);
+      resolve_unique_section (function, 0, GCC_OPTION (flag_function_sections));
 
       if (DECL_SECTION_NAME (function) != NULL && DECL_ONE_ONLY (function))
 	{
-	  resolve_unique_section (thunk_fndecl, 0, flag_function_sections);
+	  resolve_unique_section (thunk_fndecl, 0, GCC_OPTION (flag_function_sections));
 
 	  /* Output the thunk into the same section as function.  */
 	  DECL_SECTION_NAME (thunk_fndecl) = DECL_SECTION_NAME (function);
@@ -1999,7 +1999,7 @@ lazily_declare_fn (special_function_kind sfk, tree type)
       /* G++ 3.2 put the implicit destructor at the *beginning* of the
 	 TYPE_METHODS list, which cause the destructor to be emitted
 	 in an incorrect location in the vtable.  */
-      if (warn_abi && sfk == sfk_destructor && DECL_VIRTUAL_P (fn))
+      if (GCC_OPTION (warn_abi) && sfk == sfk_destructor && DECL_VIRTUAL_P (fn))
 	warning (OPT_Wabi, "vtable layout for class %qT may not be ABI-compliant"
 		 "and may change in a future version of GCC due to "
 		 "implicit virtual destructor",
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index ea16061..fc23cab 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -986,7 +986,7 @@ pushdecl_maybe_friend_1 (tree x, bool is_friend)
 
       if (TREE_CODE (x) == FUNCTION_DECL
 	  && is_friend
-	  && !flag_friend_injection)
+	  && !GCC_OPTION (flag_friend_injection))
 	{
 	  /* This is a new declaration of a friend function, so hide
 	     it from ordinary function lookup.  */
@@ -1195,7 +1195,7 @@ pushdecl_maybe_friend_1 (tree x, bool is_friend)
 		  nowarn = true;
 		}
 
-	      if (warn_shadow && !nowarn)
+	      if (GCC_OPTION (warn_shadow) && !nowarn)
 		{
 		  bool warned;
 
@@ -1218,7 +1218,7 @@ pushdecl_maybe_friend_1 (tree x, bool is_friend)
 	    }
 
 	  /* Maybe warn if shadowing something else.  */
-	  else if (warn_shadow && !DECL_EXTERNAL (x)
+	  else if (GCC_OPTION (warn_shadow) && !DECL_EXTERNAL (x)
                    /* No shadow warnings for internally generated vars unless
                       it's an implicit typedef (see create_implicit_typedef
                       in decl.c).  */
@@ -1421,7 +1421,7 @@ check_for_out_of_scope_variable (tree decl)
     {
       permerror (input_location, "name lookup of %qD changed for ISO %<for%> scoping",
 	         DECL_NAME (decl));
-      if (flag_permissive)
+      if (GCC_OPTION (flag_permissive))
         permerror (input_location, "  using obsolete binding at %q+D", decl);
       else
 	{
@@ -2351,7 +2351,7 @@ push_overloaded_decl_1 (tree decl, int flags, bool is_friend)
       if (TREE_CODE (old) == TYPE_DECL && DECL_ARTIFICIAL (old))
 	{
 	  tree t = TREE_TYPE (old);
-	  if (MAYBE_CLASS_TYPE_P (t) && warn_shadow
+	  if (MAYBE_CLASS_TYPE_P (t) && GCC_OPTION (warn_shadow)
 	      && (! DECL_IN_SYSTEM_HEADER (decl)
 		  || ! DECL_IN_SYSTEM_HEADER (old)))
 	    warning (OPT_Wshadow, "%q#D hides constructor for %q#T", decl, t);
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index b089432..ffde94c 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -260,7 +260,7 @@ maybe_thunk_body (tree fn, bool force)
   int parmno, vtt_parmno, max_parms;
   tree fns[3];
 
-  if (!force && !flag_declone_ctor_dtor)
+  if (!force && !GCC_OPTION (flag_declone_ctor_dtor))
     return 0;
 
   /* If function accepts variable arguments, give up.  */
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 46e2453..d09fa2c 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -782,7 +782,7 @@ cp_lexer_get_preprocessor_token (cp_lexer *lexer, cp_token *token)
 	}
       else
 	{
-          if (warn_cxx0x_compat
+          if (GCC_OPTION (warn_cxx0x_compat)
               && C_RID_CODE (token->u.value) >= RID_FIRST_CXX0X
               && C_RID_CODE (token->u.value) <= RID_LAST_CXX0X)
             {
@@ -4175,7 +4175,7 @@ cp_parser_primary_expression (cp_parser *parser,
 	 enumeration type.  */
       if (TREE_CODE (token->u.value) == REAL_CST
 	  && parser->integral_constant_expression_p
-	  && pedantic)
+	  && GCC_OPTION (pedantic))
 	{
 	  /* CAST_P will be set even in invalid code like "int(2.7 +
 	     ...)".   Therefore, we have to check that the next token
@@ -5812,7 +5812,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
 	postfix_expression = 
 	  cp_parser_postfix_expression (parser, false, false, 
 					false, false, &idk);
-	if (!flag_cilkplus)
+	if (!GCC_OPTION (flag_cilkplus))
 	  {
 	    error_at (token->location, "-fcilkplus must be enabled to use"
 		      " %<_Cilk_spawn%>");
@@ -5837,7 +5837,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
       }
       
     case RID_CILK_SYNC:
-      if (flag_cilkplus)
+      if (GCC_OPTION (flag_cilkplus))
 	{ 
 	  tree sync_expr = build_cilk_sync ();
 	  SET_EXPR_LOCATION (sync_expr, 
@@ -6378,7 +6378,7 @@ cp_parser_postfix_open_square_expression (cp_parser *parser,
 	  cp_lexer_set_source_position (parser->lexer);
 	  maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
 	  index = cp_parser_braced_list (parser, &expr_nonconst_p);
-	  if (flag_cilkplus
+	  if (GCC_OPTION (flag_cilkplus)
 	      && cp_lexer_peek_token (parser->lexer)->type == CPP_COLON)
 	    {
 	      error_at (cp_lexer_peek_token (parser->lexer)->location,
@@ -6388,7 +6388,7 @@ cp_parser_postfix_open_square_expression (cp_parser *parser,
 	      return error_mark_node;
 	    }
 	}
-      else if (flag_cilkplus)
+      else if (GCC_OPTION (flag_cilkplus))
 	{
 	  /* Here are have these two options:
 	     ARRAY[EXP : EXP]        - Array notation expr with default
@@ -6996,7 +6996,7 @@ cp_parser_unary_expression (cp_parser *parser, bool address_p, bool cast_p,
 	    /* Parse the cast-expression.  */
 	    expr = cp_parser_simple_cast_expression (parser);
 	    /* Restore the PEDANTIC flag.  */
-	    pedantic = saved_pedantic;
+	    GCC_OPTION (pedantic) = saved_pedantic;
 
 	    return expr;
 	  }
@@ -7766,7 +7766,7 @@ cp_parser_cast_expression (cp_parser *parser, bool address_p, bool cast_p,
 					    pidk);
 
 	  /* Warn about old-style casts, if so requested.  */
-	  if (warn_old_style_cast
+	  if (GCC_OPTION (warn_old_style_cast)
 	      && !in_system_header_at (input_location)
 	      && !VOID_TYPE_P (type)
 	      && current_lang_name != lang_name_c)
@@ -7902,7 +7902,7 @@ cp_parser_binary_expression (cp_parser* parser, bool cast_p,
       /* Get an operator token.  */
       token = cp_lexer_peek_token (parser->lexer);
 
-      if (warn_cxx0x_compat
+      if (GCC_OPTION (warn_cxx0x_compat)
           && token->type == CPP_RSHIFT
           && !parser->greater_than_is_operator_p)
         {
@@ -10921,7 +10921,7 @@ cp_parser_declaration (cp_parser* parser)
       /* Parse the qualified declaration.  */
       cp_parser_declaration (parser);
       /* Restore the PEDANTIC flag.  */
-      pedantic = saved_pedantic;
+      GCC_OPTION (pedantic) = saved_pedantic;
 
       return;
     }
@@ -11041,7 +11041,7 @@ cp_parser_block_declaration (cp_parser *parser,
       /* Parse the qualified declaration.  */
       cp_parser_block_declaration (parser, statement_p);
       /* Restore the PEDANTIC flag.  */
-      pedantic = saved_pedantic;
+      GCC_OPTION (pedantic) = saved_pedantic;
 
       return;
     }
@@ -13419,7 +13419,7 @@ cp_parser_template_id (cp_parser *parser,
 	  inform (next_token->location,
 		  "%<<:%> is an alternate spelling for %<[%>."
 		  " Insert whitespace between %<<%> and %<::%>");
-	  if (!hint && !flag_permissive)
+	  if (!hint && !GCC_OPTION (flag_permissive))
 	    {
 	      inform (next_token->location, "(if you use %<-fpermissive%> "
 		      "or %<-std=c++11%>, or %<-std=gnu++11%> G++ will "
@@ -17142,7 +17142,7 @@ cp_parser_direct_declarator (cp_parser* parser,
 		  /* In here, we handle cases where attribute is used after
 		     the function declaration.  For example:
 		     void func (int x) __attribute__((vector(..)));  */
-		  if (flag_cilkplus
+		  if (GCC_OPTION (flag_cilkplus)
 		      && cp_next_tokens_can_be_gnu_attribute_p (parser))
 		    {
 		      cp_parser_parse_tentatively (parser);
@@ -18628,7 +18628,7 @@ cp_parser_parameter_declaration (cp_parser *parser,
 
       if (!parser->default_arg_ok_p)
 	{
-	  if (flag_permissive)
+	  if (GCC_OPTION (flag_permissive))
 	    warning (0, "deprecated use of default argument for parameter of non-function");
 	  else
 	    {
@@ -19494,7 +19494,7 @@ cp_parser_class_specifier_1 (cp_parser* parser)
       if (pushed_scope)
 	pop_scope (pushed_scope);
       /* Now parse the body of the functions.  */
-      if (flag_openmp)
+      if (GCC_OPTION (flag_openmp))
 	{
 	  /* OpenMP UDRs need to be parsed before all other functions.  */
 	  FOR_EACH_VEC_SAFE_ELT (unparsed_funs_with_definitions, ix, decl)
@@ -20134,7 +20134,7 @@ cp_parser_member_declaration (cp_parser* parser)
       /* Recurse.  */
       cp_parser_member_declaration (parser);
       /* Restore the old value of the PEDANTIC flag.  */
-      pedantic = saved_pedantic;
+      GCC_OPTION (pedantic) = saved_pedantic;
 
       return;
     }
@@ -21640,7 +21640,7 @@ cp_parser_gnu_attributes_opt (cp_parser* parser)
 static inline bool
 is_cilkplus_vector_p (tree name)
 { 
-  if (flag_cilkplus && is_attribute_p ("vector", name)) 
+  if (GCC_OPTION (flag_cilkplus) && is_attribute_p ("vector", name)) 
     return true;
   return false;
 }
@@ -22048,7 +22048,7 @@ static bool
 cp_parser_extension_opt (cp_parser* parser, int* saved_pedantic)
 {
   /* Save the old value of the PEDANTIC flag.  */
-  *saved_pedantic = pedantic;
+  *saved_pedantic = GCC_OPTION (pedantic);
 
   if (cp_lexer_next_token_is_keyword (parser->lexer, RID_EXTENSION))
     {
@@ -22056,7 +22056,7 @@ cp_parser_extension_opt (cp_parser* parser, int* saved_pedantic)
       cp_lexer_consume_token (parser->lexer);
       /* We're not being pedantic while the `__extension__' keyword is
 	 in effect.  */
-      pedantic = 0;
+      GCC_OPTION (pedantic) = 0;
 
       return true;
     }
@@ -24612,7 +24612,7 @@ cp_parser_optional_template_keyword (cp_parser *parser)
 	 template and what is not.  In C++11,  per the resolution of DR 468,
 	 `template' is allowed in cases where it is not strictly necessary.  */
       if (!processing_template_decl
-	  && pedantic && cxx_dialect == cxx98)
+	  && GCC_OPTION (pedantic) && cxx_dialect == cxx98)
 	{
 	  cp_token *token = cp_lexer_peek_token (parser->lexer);
 	  pedwarn (token->location, OPT_Wpedantic,
@@ -27013,7 +27013,7 @@ cp_parser_omp_clause_name (cp_parser *parser)
 	    result = PRAGMA_OMP_CLAUSE_MAP;
 	  else if (!strcmp ("mergeable", p))
 	    result = PRAGMA_OMP_CLAUSE_MERGEABLE;
-	  else if (flag_cilkplus && !strcmp ("mask", p))
+	  else if (GCC_OPTION (flag_cilkplus) && !strcmp ("mask", p))
 	    result = PRAGMA_CILK_CLAUSE_MASK;
 	  break;
 	case 'n':
@@ -27021,7 +27021,7 @@ cp_parser_omp_clause_name (cp_parser *parser)
 	    result = PRAGMA_OMP_CLAUSE_NOTINBRANCH;
 	  else if (!strcmp ("nowait", p))
 	    result = PRAGMA_OMP_CLAUSE_NOWAIT;
-	  else if (flag_cilkplus && !strcmp ("nomask", p))
+	  else if (GCC_OPTION (flag_cilkplus) && !strcmp ("nomask", p))
 	    result = PRAGMA_CILK_CLAUSE_NOMASK;
 	  else if (!strcmp ("num_teams", p))
 	    result = PRAGMA_OMP_CLAUSE_NUM_TEAMS;
@@ -27069,7 +27069,7 @@ cp_parser_omp_clause_name (cp_parser *parser)
 	    result = PRAGMA_OMP_CLAUSE_UNTIED;
 	  break;
 	case 'v':
-	  if (flag_cilkplus && !strcmp ("vectorlength", p))
+	  if (GCC_OPTION (flag_cilkplus) && !strcmp ("vectorlength", p))
 	    result = PRAGMA_CILK_CLAUSE_VECTORLENGTH;
 	  break;
 	}
@@ -28398,7 +28398,7 @@ cp_parser_omp_all_clauses (cp_parser *parser, omp_clause_mask mask,
  saw_error:
   /* In Cilk Plus SIMD enabled functions there is no pragma_token, so
      no reason to skip to the end.  */
-  if (!(flag_cilkplus && pragma_tok == NULL))
+  if (!(GCC_OPTION (flag_cilkplus) && pragma_tok == NULL))
     cp_parser_skip_to_pragma_eol (parser, pragma_tok);
   if (finish_p)
     return finish_omp_clauses (clauses);
@@ -29594,7 +29594,7 @@ cp_parser_omp_for (cp_parser *parser, cp_token *pragma_tok,
 	    cclauses = cclauses_buf;
 
 	  cp_lexer_consume_token (parser->lexer);
-	  if (!flag_openmp)  /* flag_openmp_simd  */
+	  if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
 	    return cp_parser_omp_simd (parser, pragma_tok, p_name, mask,
 				       cclauses);
 	  sb = begin_omp_structured_block ();
@@ -29614,7 +29614,7 @@ cp_parser_omp_for (cp_parser *parser, cp_token *pragma_tok,
 	  return ret;
 	}
     }
-  if (!flag_openmp)  /* flag_openmp_simd  */
+  if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
     {
       cp_parser_require_pragma_eol (parser, pragma_tok);
       return NULL_TREE;
@@ -29806,7 +29806,7 @@ cp_parser_omp_parallel (cp_parser *parser, cp_token *pragma_tok,
 	cclauses = cclauses_buf;
 
       cp_lexer_consume_token (parser->lexer);
-      if (!flag_openmp)  /* flag_openmp_simd  */
+      if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
 	return cp_parser_omp_for (parser, pragma_tok, p_name, mask, cclauses);
       block = begin_omp_parallel ();
       save = cp_parser_begin_omp_structured_block (parser);
@@ -29823,7 +29823,7 @@ cp_parser_omp_parallel (cp_parser *parser, cp_token *pragma_tok,
       cp_parser_skip_to_pragma_eol (parser, pragma_tok);
       return NULL_TREE;
     }
-  else if (!flag_openmp)  /* flag_openmp_simd  */
+  else if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
     {
       cp_parser_require_pragma_eol (parser, pragma_tok);
       return NULL_TREE;
@@ -30056,7 +30056,7 @@ cp_parser_omp_distribute (cp_parser *parser, cp_token *pragma_tok,
 	  if (cclauses == NULL)
 	    cclauses = cclauses_buf;
 	  cp_lexer_consume_token (parser->lexer);
-	  if (!flag_openmp)  /* flag_openmp_simd  */
+	  if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
 	    {
 	      if (simd)
 		return cp_parser_omp_simd (parser, pragma_tok, p_name, mask,
@@ -30086,7 +30086,7 @@ cp_parser_omp_distribute (cp_parser *parser, cp_token *pragma_tok,
 	  return ret;
 	}
     }
-  if (!flag_openmp)  /* flag_openmp_simd  */
+  if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
     {
       cp_parser_require_pragma_eol (parser, pragma_tok);
       return NULL_TREE;
@@ -30146,7 +30146,7 @@ cp_parser_omp_teams (cp_parser *parser, cp_token *pragma_tok,
 	    cclauses = cclauses_buf;
 
 	  cp_lexer_consume_token (parser->lexer);
-	  if (!flag_openmp)  /* flag_openmp_simd  */
+	  if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
 	    return cp_parser_omp_distribute (parser, pragma_tok, p_name, mask,
 					     cclauses);
 	  sb = begin_omp_structured_block ();
@@ -30165,7 +30165,7 @@ cp_parser_omp_teams (cp_parser *parser, cp_token *pragma_tok,
 	  return add_stmt (ret);
 	}
     }
-  if (!flag_openmp)  /* flag_openmp_simd  */
+  if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
     {
       cp_parser_require_pragma_eol (parser, pragma_tok);
       return NULL_TREE;
@@ -30287,7 +30287,7 @@ cp_parser_omp_target (cp_parser *parser, cp_token *pragma_tok,
 
 	  cp_lexer_consume_token (parser->lexer);
 	  strcpy (p_name, "#pragma omp target");
-	  if (!flag_openmp)  /* flag_openmp_simd  */
+	  if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
 	    return cp_parser_omp_teams (parser, pragma_tok, p_name,
 					OMP_TARGET_CLAUSE_MASK, cclauses);
 	  keep_next_level (true);
@@ -30306,7 +30306,7 @@ cp_parser_omp_target (cp_parser *parser, cp_token *pragma_tok,
 	  add_stmt (stmt);
 	  return true;
 	}
-      else if (!flag_openmp)  /* flag_openmp_simd  */
+      else if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
 	{
 	  cp_parser_require_pragma_eol (parser, pragma_tok);
 	  return NULL_TREE;
@@ -30984,7 +30984,7 @@ cp_parser_omp_declare (cp_parser *parser, cp_token *pragma_tok,
 					   context);
 	  return;
 	}
-      if (!flag_openmp)  /* flag_openmp_simd  */
+      if (!GCC_OPTION (flag_openmp))  /* flag_openmp_simd  */
 	{
 	  cp_parser_require_pragma_eol (parser, pragma_tok);
 	  return;
@@ -31180,7 +31180,7 @@ cp_parser_transaction_expression (cp_parser *parser, enum rid keyword)
   gcc_assert (keyword == RID_TRANSACTION_ATOMIC
       || keyword == RID_TRANSACTION_RELAXED);
 
-  if (!flag_tm)
+  if (!GCC_OPTION (flag_tm))
     error (keyword == RID_TRANSACTION_RELAXED
 	   ? G_("%<__transaction_relaxed%> without transactional memory "
 		"support enabled")
@@ -31230,7 +31230,7 @@ cp_parser_transaction_expression (cp_parser *parser, enum rid keyword)
   if (cp_parser_non_integral_constant_expression (parser, NIC_TRANSACTION))
     return error_mark_node;
 
-  return (flag_tm ? expr : error_mark_node);
+  return (GCC_OPTION (flag_tm) ? expr : error_mark_node);
 }
 
 /* Parse a function-transaction-block.
@@ -31312,7 +31312,7 @@ cp_parser_transaction_cancel (cp_parser *parser)
 
   cp_parser_require (parser, CPP_SEMICOLON, RT_SEMICOLON);
 
-  if (!flag_tm)
+  if (!GCC_OPTION (flag_tm))
     {
       error_at (token->location, "%<__transaction_cancel%> without "
 		"transactional memory support enabled");
@@ -31640,7 +31640,7 @@ c_parse_file (void)
   already_called = true;
 
   the_parser = cp_parser_new ();
-  push_deferring_access_checks (flag_access_control
+  push_deferring_access_checks (GCC_OPTION (flag_access_control)
 				? dk_no_deferred : dk_no_check);
   cp_parser_translation_unit (the_parser);
   the_parser = NULL;
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index c791d03..0148865 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -6399,7 +6399,7 @@ convert_template_argument (tree parm,
 	  else if (complain & tf_warning_or_error)
 	    pedwarn (input_location, OPT_Wpedantic, "injected-class-name %qD"
 		     " used as template template argument", TYPE_NAME (arg));
-	  else if (flag_pedantic_errors)
+	  else if (GCC_OPTION (flag_pedantic_errors))
 	    t = arg;
 
 	  arg = t;
@@ -8754,7 +8754,7 @@ apply_late_template_attributes (tree *decl_p, tree attributes, int attr_flags,
 	    {
 	      *p = TREE_CHAIN (t);
 	      TREE_CHAIN (t) = NULL_TREE;
-	      if ((flag_openmp || flag_cilkplus)
+	      if ((GCC_OPTION (flag_openmp) || GCC_OPTION (flag_cilkplus))
 		  && is_attribute_p ("omp declare simd",
 				     get_attribute_name (t))
 		  && TREE_VALUE (t))
@@ -11959,7 +11959,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
 	if (cxx_dialect >= cxx1y
 	    && !(TREE_CODE (t) == REFERENCE_TYPE && REFERENCE_VLA_OK (t))
 	    && array_of_runtime_bound_p (type)
-	    && (flag_iso || warn_vla > 0))
+	    && (flag_iso || GCC_OPTION (warn_vla) > 0))
 	  {
 	    if (complain & tf_warning_or_error)
 	      pedwarn
@@ -14252,7 +14252,7 @@ tsubst_copy_and_build (tree t,
 
 	op = RECUR (TREE_OPERAND (t, 0));
 
-	warning_sentinel s(warn_useless_cast);
+	warning_sentinel s(GCC_OPTION (warn_useless_cast));
 	switch (TREE_CODE (t))
 	  {
 	  case CAST_EXPR:
@@ -14347,8 +14347,8 @@ tsubst_copy_and_build (tree t,
     case MEMBER_REF:
     case DOTSTAR_EXPR:
       {
-	warning_sentinel s1(warn_type_limits);
-	warning_sentinel s2(warn_div_by_zero);
+	warning_sentinel s1(GCC_OPTION (warn_type_limits));
+	warning_sentinel s2(GCC_OPTION (warn_div_by_zero));
 	tree r = build_x_binary_op
 	  (input_location, TREE_CODE (t),
 	   RECUR (TREE_OPERAND (t, 0)),
@@ -14478,7 +14478,7 @@ tsubst_copy_and_build (tree t,
 
     case MODOP_EXPR:
       {
-	warning_sentinel s(warn_div_by_zero);
+	warning_sentinel s(GCC_OPTION (warn_div_by_zero));
 	tree r = build_x_modify_expr
 	  (EXPR_LOCATION (t),
 	   RECUR (TREE_OPERAND (t, 0)),
@@ -17394,7 +17394,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict,
 
       /* Replace T with std::initializer_list<T> for deduction.  */
       if (TREE_CODE (parm) == TEMPLATE_TYPE_PARM
-	  && flag_deduce_init_list)
+	  && GCC_OPTION (flag_deduce_init_list))
 	parm = listify (parm);
 
       if (!is_std_init_list (parm)
@@ -18156,7 +18156,7 @@ mark_decl_instantiated (tree result, int extern_p)
       mark_definable (result);
       mark_needed (result);
       /* Always make artificials weak.  */
-      if (DECL_ARTIFICIAL (result) && flag_weak)
+      if (DECL_ARTIFICIAL (result) && GCC_OPTION (flag_weak))
 	comdat_linkage (result);
       /* For WIN32 we also want to put explicit instantiations in
 	 linkonce sections.  */
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c
index f076f23..e7954d1 100644
--- a/gcc/cp/repo.c
+++ b/gcc/cp/repo.c
@@ -99,11 +99,11 @@ get_base_filename (const char *filename)
 
       if (strcmp (q, "-o") == 0)
 	{
-	  if (flag_compare_debug)
+	  if (GCC_OPTION (flag_compare_debug))
 	    /* Just in case aux_base_name was based on a name with two
 	       or more '.'s, add an arbitrary extension that will be
 	       stripped by the caller.  */
-	    output = concat (aux_base_name, ".o", NULL);
+	    output = concat (GCC_OPTION (aux_base_name), ".o", NULL);
 	  else
 	    output = extract_string (&p);
 	}
@@ -175,7 +175,7 @@ init_repo (void)
   if (!temporary_obstack_initialized_p)
     gcc_obstack_init (&temporary_obstack);
 
-  repo_file = open_repo_file (main_input_filename);
+  repo_file = open_repo_file (GCC_OPTION (main_input_filename));
 
   if (repo_file == 0)
     return;
@@ -241,7 +241,7 @@ finish_repo (void)
   FILE *repo_file;
   unsigned ix;
 
-  if (!flag_use_repository || flag_compare_debug)
+  if (!flag_use_repository || GCC_OPTION (flag_compare_debug))
     return;
 
   if (seen_error ())
@@ -251,7 +251,7 @@ finish_repo (void)
   if (repo_file == 0)
     goto out;
 
-  fprintf (repo_file, "M %s\n", main_input_filename);
+  fprintf (repo_file, "M %s\n", GCC_OPTION (main_input_filename));
   dir = getpwd ();
   fprintf (repo_file, "D %s\n", dir);
   args = getenv ("COLLECT_GCC_OPTIONS");
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index a8e6d25..af39791 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -285,7 +285,7 @@ typeid_ok_p (void)
 {
   tree pseudo_type_info, type_info_type;
 
-  if (! flag_rtti)
+  if (! GCC_OPTION (flag_rtti))
     {
       error ("cannot use typeid with -fno-rtti");
       return false;
@@ -690,7 +690,7 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain)
 	    }
 
 	  /* Use of dynamic_cast when -fno-rtti is prohibited.  */
-	  if (!flag_rtti)
+	  if (!GCC_OPTION (flag_rtti))
 	    {
               if (complain & tf_error)
                 error ("%<dynamic_cast%> not permitted with -fno-rtti");
@@ -1536,7 +1536,7 @@ emit_support_tinfos (void)
 
 	     It might also not be necessary to follow this detail of the
 	     ABI.  */
-	  if (!flag_weak || ! targetm.cxx.library_rtti_comdat ())
+	  if (!GCC_OPTION (flag_weak) || ! targetm.cxx.library_rtti_comdat ())
 	    {
 	      gcc_assert (TREE_PUBLIC (tinfo) && !DECL_COMDAT (tinfo));
 	      DECL_INTERFACE_KNOWN (tinfo) = 1;
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index d99e182..afe7de5 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -2143,14 +2143,14 @@ get_pure_virtuals (tree type)
 void
 maybe_suppress_debug_info (tree t)
 {
-  if (write_symbols == NO_DEBUG)
+  if (GCC_OPTION (write_symbols) == NO_DEBUG)
     return;
 
   /* We might have set this earlier in cp_finish_decl.  */
   TYPE_DECL_SUPPRESS_DEBUG (TYPE_MAIN_DECL (t)) = 0;
 
   /* Always emit the information for each class every time. */
-  if (flag_emit_class_debug_always)
+  if (GCC_OPTION (flag_emit_class_debug_always))
     return;
 
   /* If we already know how we're handling this class, handle debug info
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 886fbb8..3f43563 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -650,7 +650,7 @@ maybe_convert_cond (tree cond)
   if (processing_template_decl)
     return cond;
 
-  if (warn_sequence_point)
+  if (GCC_OPTION (warn_sequence_point))
     verify_sequence_points (cond);
 
   /* Do the conversion.  */
@@ -658,7 +658,7 @@ maybe_convert_cond (tree cond)
 
   if (TREE_CODE (cond) == MODIFY_EXPR
       && !TREE_NO_WARNING (cond)
-      && warn_parentheses)
+      && GCC_OPTION (warn_parentheses))
     {
       warning (OPT_Wparentheses,
 	       "suggest parentheses around assignment used as truth value");
@@ -679,7 +679,7 @@ finish_expr_stmt (tree expr)
     {
       if (!processing_template_decl)
 	{
-	  if (warn_sequence_point)
+	  if (GCC_OPTION (warn_sequence_point))
 	    verify_sequence_points (expr);
 	  expr = convert_to_void (expr, ICV_STATEMENT, tf_warning_or_error);
 	}
@@ -863,11 +863,11 @@ finish_return_stmt (tree expr)
   expr = check_return_expr (expr, &no_warning);
 
   if (error_operand_p (expr)
-      || (flag_openmp && !check_omp_return ()))
+      || (GCC_OPTION (flag_openmp) && !check_omp_return ()))
     return error_mark_node;
   if (!processing_template_decl)
     {
-      if (warn_sequence_point)
+      if (GCC_OPTION (warn_sequence_point))
 	verify_sequence_points (expr);
       
       if (DECL_DESTRUCTOR_P (current_function_decl)
@@ -898,7 +898,7 @@ tree
 begin_for_scope (tree *init)
 {
   tree scope = NULL_TREE;
-  if (flag_new_for_scope > 0)
+  if (GCC_OPTION (flag_new_for_scope) > 0)
     scope = do_pushlevel (sk_for);
 
   if (processing_template_decl)
@@ -923,7 +923,7 @@ begin_for_stmt (tree scope, tree init)
 
   if (scope == NULL_TREE)
     {
-      gcc_assert (!init || !(flag_new_for_scope > 0));
+      gcc_assert (!init || !(GCC_OPTION (flag_new_for_scope) > 0));
       if (!init)
 	scope = begin_for_scope (&init);
     }
@@ -981,7 +981,7 @@ finish_for_expr (tree expr, tree for_stmt)
     }
   if (!processing_template_decl)
     {
-      if (warn_sequence_point)
+      if (GCC_OPTION (warn_sequence_point))
 	verify_sequence_points (expr);
       expr = convert_to_void (expr, ICV_THIRD_IN_FOR,
                               tf_warning_or_error);
@@ -1011,7 +1011,7 @@ finish_for_stmt (tree for_stmt)
     FOR_BODY (for_stmt) = do_poplevel (FOR_BODY (for_stmt));
 
   /* Pop the scope for the body of the loop.  */
-  if (flag_new_for_scope > 0)
+  if (GCC_OPTION (flag_new_for_scope) > 0)
     {
       tree scope;
       tree *scope_ptr = (TREE_CODE (for_stmt) == RANGE_FOR_STMT
@@ -1040,7 +1040,7 @@ begin_range_for_stmt (tree scope, tree init)
 
   if (scope == NULL_TREE)
     {
-      gcc_assert (!init || !(flag_new_for_scope > 0));
+      gcc_assert (!init || !(GCC_OPTION (flag_new_for_scope) > 0));
       if (!init)
 	scope = begin_for_scope (&init);
     }
@@ -1135,7 +1135,7 @@ finish_switch_cond (tree cond, tree switch_stmt)
     }
   if (check_for_bare_parameter_packs (cond))
     cond = error_mark_node;
-  else if (!processing_template_decl && warn_sequence_point)
+  else if (!processing_template_decl && GCC_OPTION (warn_sequence_point))
     verify_sequence_points (cond);
 
   finish_cond (&SWITCH_STMT_COND (switch_stmt), cond);
@@ -2322,7 +2322,7 @@ finish_call_expr (tree fn, vec<tree, va_gc> **args, bool disallow_virtual,
 
       if (!result)
 	{
-	  if (warn_sizeof_pointer_memaccess
+	  if (GCC_OPTION (warn_sizeof_pointer_memaccess)
 	      && !vec_safe_is_empty (*args)
 	      && !processing_template_decl)
 	    {
@@ -2778,7 +2778,7 @@ begin_class_definition (tree t)
   pushclass (t);
   TYPE_BEING_DEFINED (t) = 1;
 
-  if (flag_pack_struct)
+  if (GCC_OPTION (flag_pack_struct))
     {
       tree v;
       TYPE_PACKED (t) = 1;
@@ -3991,10 +3991,10 @@ expand_or_defer_fn_1 (tree fn)
 	 this function as needed so that finish_file will make sure to
 	 output it later.  Similarly, all dllexport'd functions must
 	 be emitted; there may be callers in other DLLs.  */
-      if ((flag_keep_inline_functions
+      if ((GCC_OPTION (flag_keep_inline_functions)
 	   && DECL_DECLARED_INLINE_P (fn)
 	   && !DECL_REALLY_EXTERN (fn))
-	  || (flag_keep_inline_dllexport
+	  || (GCC_OPTION (flag_keep_inline_dllexport)
 	      && lookup_attribute ("dllexport", DECL_ATTRIBUTES (fn))))
 	{
 	  mark_needed (fn);
@@ -4018,7 +4018,7 @@ expand_or_defer_fn_1 (tree fn)
 
   /* There's no reason to do any of the work here if we're only doing
      semantic analysis; this code just generates RTL.  */
-  if (flag_syntax_only)
+  if (GCC_OPTION (flag_syntax_only))
     return false;
 
   return true;
@@ -6729,7 +6729,7 @@ begin_transaction_stmt (location_t loc, tree *pcompound, int flags)
   r = build_stmt (loc, TRANSACTION_EXPR, NULL_TREE);
 
   /* Only add the statement to the function if support enabled.  */
-  if (flag_tm)
+  if (GCC_OPTION (flag_tm))
     add_stmt (r);
   else
     error_at (loc, ((flags & TM_STMT_ATTR_RELAXED) != 0
@@ -7040,7 +7040,7 @@ finish_decltype_type (tree expr, bool id_expression_or_member_access_p,
     }
 
   if (cxx_dialect >= cxx1y && array_of_runtime_bound_p (type)
-      && (flag_iso || warn_vla > 0))
+      && (flag_iso || GCC_OPTION (warn_vla) > 0))
     {
       if (complain & tf_warning_or_error)
 	pedwarn (input_location, OPT_Wvla,
@@ -8318,7 +8318,7 @@ push_cx_call_context (tree call)
   if (!EXPR_HAS_LOCATION (call))
     SET_EXPR_LOCATION (call, input_location);
   call_stack.safe_push (call);
-  if (call_stack.length () > (unsigned) max_constexpr_depth)
+  if (call_stack.length () > (unsigned) GCC_OPTION (max_constexpr_depth))
     return false;
   return true;
 }
@@ -8465,7 +8465,7 @@ cxx_eval_call_expression (const constexpr_call *old_call, tree t,
       if (!allow_non_constant)
 	error ("constexpr evaluation depth exceeds maximum of %d (use "
 	       "-fconstexpr-depth= to increase the maximum)",
-	       max_constexpr_depth);
+	       GCC_OPTION (max_constexpr_depth));
       *non_constant_p = true;
       entry->result = result = error_mark_node;
     }
@@ -8540,7 +8540,7 @@ verify_constant (tree t, bool allow_non_constant, bool *non_constant_p,
 	  permerror (input_location, "overflow in constant expression");
 	  /* If we're being permissive (and are in an enforcing
 	     context), ignore the overflow.  */
-	  if (flag_permissive)
+	  if (GCC_OPTION (flag_permissive))
 	    return *non_constant_p;
 	}
       *overflow_p = true;
@@ -9427,7 +9427,7 @@ cxx_eval_constant_expression (const constexpr_call *call, tree t,
     {
       if (TREE_CODE (t) == PTRMEM_CST)
 	t = cplus_expand_constant (t);
-      else if (TREE_OVERFLOW (t) && (!flag_permissive || allow_non_constant))
+      else if (TREE_OVERFLOW (t) && (!GCC_OPTION (flag_permissive) || allow_non_constant))
 	*overflow_p = true;
       return t;
     }
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 559f19b5..2fedb1e 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -1558,7 +1558,7 @@ cxx_sizeof_or_alignof_type (tree type, enum tree_code op, bool complain)
     }
 
   if (cxx_dialect >= cxx1y && array_of_runtime_bound_p (type)
-      && (flag_iso || warn_vla > 0))
+      && (flag_iso || GCC_OPTION (warn_vla) > 0))
     {
       if (complain & tf_warning_or_error)
 	pedwarn (input_location, OPT_Wvla,
@@ -1791,7 +1791,7 @@ invalid_nonstatic_memfn_p (tree expr, tsubst_flags_t complain)
   if (expr == NULL_TREE)
     return false;
   /* Don't enforce this in MS mode.  */
-  if (flag_ms_extensions)
+  if (GCC_OPTION (flag_ms_extensions))
     return false;
   if (is_overloaded_fn (expr) && !really_overloaded_fn (expr))
     expr = get_first_fn (expr);
@@ -2365,7 +2365,7 @@ build_class_member_access_expr (tree object, tree member,
 	 we know for a fact that didn't come from offsetof.  This does occur
 	 in various testsuite cases where a null object is passed where a
 	 vtable access is required.  */
-      if (null_object_p && warn_invalid_offsetof
+      if (null_object_p && GCC_OPTION (warn_invalid_offsetof)
 	  && CLASSTYPE_NON_STD_LAYOUT (object_type)
 	  && !DECL_FIELD_IS_BASE (member)
 	  && cp_unevaluated_operand == 0
@@ -2929,7 +2929,7 @@ cp_build_indirect_ref (tree ptr, ref_operator errorstring,
 	  /* If a warning is issued, mark it to avoid duplicates from
 	     the backend.  This only needs to be done at
 	     warn_strict_aliasing > 2.  */
-	  if (warn_strict_aliasing > 2)
+	  if (GCC_OPTION (warn_strict_aliasing) > 2)
 	    if (strict_aliasing_warning (TREE_TYPE (TREE_OPERAND (ptr, 0)),
 					 type, TREE_OPERAND (ptr, 0)))
 	      TREE_NO_WARNING (ptr) = 1;
@@ -3022,7 +3022,7 @@ cp_build_array_ref (location_t loc, tree array, tree idx,
 
   /* If an array's index is an array notation, then its rank cannot be
      greater than one.  */ 
-  if (flag_cilkplus && contains_array_notation_expr (idx))
+  if (GCC_OPTION (flag_cilkplus) && contains_array_notation_expr (idx))
     {
       size_t rank = 0;
 
@@ -3123,7 +3123,7 @@ cp_build_array_ref (location_t loc, tree array, tree idx,
       /* Note in C++ it is valid to subscript a `register' array, since
 	 it is valid to take the address of something with that
 	 storage specification.  */
-      if (extra_warnings)
+      if (GCC_OPTION (extra_warnings))
 	{
 	  tree foo = array;
 	  while (TREE_CODE (foo) == COMPONENT_REF)
@@ -3484,7 +3484,7 @@ cp_build_function_call_vec (tree function, vec<tree, va_gc> **params,
     {
       if (complain & tf_error)
 	{
-	  if (!flag_diagnostics_show_caret)
+	  if (!GCC_OPTION (flag_diagnostics_show_caret))
 	    error_at (input_location,
 		      "%qE cannot be used as a function", original);
 	  else if (DECL_P (original))
@@ -3768,7 +3768,7 @@ build_x_binary_op (location_t loc, enum tree_code code, tree arg1,
   /* Check for cases such as x+y<<z which users are likely to
      misinterpret.  But don't warn about obj << x + y, since that is a
      common idiom for I/O.  */
-  if (warn_parentheses
+  if (GCC_OPTION (warn_parentheses)
       && (complain & tf_warning)
       && !processing_template_decl
       && !error_operand_p (arg1)
@@ -4625,14 +4625,14 @@ cp_build_binary_op (location_t location,
       else if (code0 == POINTER_TYPE && null_ptr_cst_p (op1))
 	{
 	  result_type = type0;
-	  if (extra_warnings && (complain & tf_warning))
+	  if (GCC_OPTION (extra_warnings) && (complain & tf_warning))
 	    warning (OPT_Wextra,
 		     "ordered comparison of pointer with integer zero");
 	}
       else if (code1 == POINTER_TYPE && null_ptr_cst_p (op0))
 	{
 	  result_type = type1;
-	  if (extra_warnings && (complain & tf_warning))
+	  if (GCC_OPTION (extra_warnings) && (complain & tf_warning))
 	    warning (OPT_Wextra,
 		     "ordered comparison of pointer with integer zero");
 	}
@@ -4749,7 +4749,7 @@ cp_build_binary_op (location_t location,
 	      || code == MULT_EXPR
 	      || (code == TRUNC_DIV_EXPR && first_complex))
 	  && TREE_CODE (TREE_TYPE (result_type)) == REAL_TYPE
-	  && flag_signed_zeros)
+	  && GCC_OPTION (flag_signed_zeros))
 	{
 	  /* An operation on mixed real/complex operands must be
 	     handled specially, but the language-independent code can
@@ -4863,7 +4863,7 @@ cp_build_binary_op (location_t location,
 	}
 
       if ((short_compare || code == MIN_EXPR || code == MAX_EXPR)
-	  && warn_sign_compare
+	  && GCC_OPTION (warn_sign_compare)
 	  /* Do not warn until the template is instantiated; we cannot
 	     bound the ranges of the arguments until that point.  */
 	  && !processing_template_decl
@@ -4904,7 +4904,7 @@ cp_build_binary_op (location_t location,
   if (build_type == NULL_TREE)
     build_type = result_type;
 
-  if ((flag_sanitize & (SANITIZE_SHIFT | SANITIZE_DIVIDE))
+  if ((GCC_OPTION (flag_sanitize) & (SANITIZE_SHIFT | SANITIZE_DIVIDE))
       && !processing_template_decl
       && current_function_decl != 0
       && !lookup_attribute ("no_sanitize_undefined",
@@ -4918,7 +4918,7 @@ cp_build_binary_op (location_t location,
 								  tf_none));
       op1 = maybe_constant_value (fold_non_dependent_expr_sfinae (op1,
 								  tf_none));
-      if (doing_div_or_mod && (flag_sanitize & SANITIZE_DIVIDE))
+      if (doing_div_or_mod && (GCC_OPTION (flag_sanitize) & SANITIZE_DIVIDE))
 	{
 	  /* For diagnostics we want to use the promoted types without
 	     shorten_binary_op.  So convert the arguments to the
@@ -4932,7 +4932,7 @@ cp_build_binary_op (location_t location,
 	    }
 	  instrument_expr = ubsan_instrument_division (location, cop0, cop1);
 	}
-      else if (doing_shift && (flag_sanitize & SANITIZE_SHIFT))
+      else if (doing_shift && (GCC_OPTION (flag_sanitize) & SANITIZE_SHIFT))
 	instrument_expr = ubsan_instrument_shift (location, code, op0, op1);
     }
 
@@ -5135,7 +5135,7 @@ build_x_unary_op (location_t loc, enum tree_code code, tree xarg,
 
       /* A pointer to member-function can be formed only by saying
 	 &X::mf.  */
-      if (!flag_ms_extensions && TREE_CODE (TREE_TYPE (xarg)) == METHOD_TYPE
+      if (!GCC_OPTION (flag_ms_extensions) && TREE_CODE (TREE_TYPE (xarg)) == METHOD_TYPE
 	  && (TREE_CODE (xarg) != OFFSET_REF || !PTRMEM_OK_P (xarg)))
 	{
 	  if (TREE_CODE (xarg) != OFFSET_REF
@@ -5166,7 +5166,7 @@ build_x_unary_op (location_t loc, enum tree_code code, tree xarg,
 	{
 	  ptrmem = PTRMEM_OK_P (xarg);
 
-	  if (!ptrmem && !flag_ms_extensions
+	  if (!ptrmem && !GCC_OPTION (flag_ms_extensions)
 	      && TREE_CODE (TREE_TYPE (TREE_OPERAND (xarg, 1))) == METHOD_TYPE)
 	    {
 	      /* A single non-static member, make sure we don't allow a
@@ -5309,7 +5309,7 @@ cp_build_addr_expr_1 (tree arg, bool strict_lvalue, tsubst_flags_t complain)
       tree fn = get_first_fn (TREE_OPERAND (arg, 1));
       mark_used (fn);
 
-      if (! flag_ms_extensions)
+      if (! GCC_OPTION (flag_ms_extensions))
 	{
 	  tree name = DECL_NAME (fn);
 	  if (!(complain & tf_error))
@@ -5371,15 +5371,15 @@ cp_build_addr_expr_1 (tree arg, bool strict_lvalue, tsubst_flags_t complain)
       arg = build1 (CONVERT_EXPR, type, arg);
       return arg;
     }
-  else if (pedantic && DECL_MAIN_P (arg))
+  else if (GCC_OPTION (pedantic) && DECL_MAIN_P (arg))
     {
       /* ARM $3.4 */
       /* Apparently a lot of autoconf scripts for C++ packages do this,
 	 so only complain if -Wpedantic.  */
-      if (complain & (flag_pedantic_errors ? tf_error : tf_warning))
+      if (complain & (GCC_OPTION (flag_pedantic_errors) ? tf_error : tf_warning))
 	pedwarn (input_location, OPT_Wpedantic,
 		 "ISO C++ forbids taking address of function %<::main%>");
-      else if (flag_pedantic_errors)
+      else if (GCC_OPTION (flag_pedantic_errors))
 	return error_mark_node;
     }
 
@@ -5478,7 +5478,7 @@ cp_build_addr_expr_1 (tree arg, bool strict_lvalue, tsubst_flags_t complain)
   if (argtype != error_mark_node)
     {
       if (cxx_dialect >= cxx1y && array_of_runtime_bound_p (argtype)
-	  && (flag_iso || warn_vla > 0))
+	  && (flag_iso || GCC_OPTION (warn_vla) > 0))
 	{
 	  if (complain & tf_warning_or_error)
 	    pedwarn (input_location, OPT_Wvla,
@@ -6001,7 +6001,7 @@ cxx_mark_addressable (tree exp)
 		  ("address of explicit register variable %qD requested", x);
 		return false;
 	      }
-	    else if (extra_warnings)
+	    else if (GCC_OPTION (extra_warnings))
 	      warning
 		(OPT_Wextra, "address requested for %qD, which is declared %<register%>", x);
 	  }
@@ -6206,7 +6206,7 @@ cp_build_compound_expr (tree lhs, tree rhs, tsubst_flags_t complain)
   if (lhs == error_mark_node || rhs == error_mark_node)
     return error_mark_node;
 
-  if (flag_cilkplus
+  if (GCC_OPTION (flag_cilkplus)
       && (TREE_CODE (lhs) == CILK_SPAWN_STMT
 	  || TREE_CODE (rhs) == CILK_SPAWN_STMT))
     {
@@ -6255,7 +6255,7 @@ check_for_casting_away_constness (tree src_type, tree dest_type,
 {
   /* C-style casts are allowed to cast away constness.  With
      WARN_CAST_QUAL, we still want to issue a warning.  */
-  if (cast == CAST_EXPR && !warn_cast_qual)
+  if (cast == CAST_EXPR && !GCC_OPTION (warn_cast_qual))
     return false;
   
   if (!casts_away_constness (src_type, dest_type, complain))
@@ -6293,7 +6293,7 @@ check_for_casting_away_constness (tree src_type, tree dest_type,
 void
 maybe_warn_about_useless_cast (tree type, tree expr, tsubst_flags_t complain)
 {
-  if (warn_useless_cast
+  if (GCC_OPTION (warn_useless_cast)
       && complain & tf_warning)
     {
       /* In C++14 mode, this interacts badly with force_paren_expr.  And it
@@ -6679,8 +6679,8 @@ convert_member_func_to_ptr (tree type, tree expr, tsubst_flags_t complain)
   if (!(complain & tf_warning_or_error))
     return error_mark_node;
 
-  if (pedantic || warn_pmf2ptr)
-    pedwarn (input_location, pedantic ? OPT_Wpedantic : OPT_Wpmf_conversions,
+  if (GCC_OPTION (pedantic) || GCC_OPTION (warn_pmf2ptr))
+    pedwarn (input_location, GCC_OPTION (pedantic) ? OPT_Wpedantic : OPT_Wpmf_conversions,
 	     "converting from %qT to %qT", intype, type);
 
   if (TREE_CODE (intype) == METHOD_TYPE)
@@ -6751,7 +6751,7 @@ build_reinterpret_cast_1 (tree type, tree expr, bool c_cast_p,
 
       expr = cp_build_addr_expr (expr, complain);
 
-      if (warn_strict_aliasing > 2)
+      if (GCC_OPTION (warn_strict_aliasing) > 2)
 	strict_aliasing_warning (TREE_TYPE (expr), type, expr);
 
       if (expr != error_mark_node)
@@ -6836,7 +6836,7 @@ build_reinterpret_cast_1 (tree type, tree expr, bool c_cast_p,
 					       complain))
 	return error_mark_node;
       /* Warn about possible alignment problems.  */
-      if (STRICT_ALIGNMENT && warn_cast_align
+      if (STRICT_ALIGNMENT && GCC_OPTION (warn_cast_align)
           && (complain & tf_warning)
 	  && !VOID_TYPE_P (type)
 	  && TREE_CODE (TREE_TYPE (intype)) != FUNCTION_TYPE
@@ -6849,7 +6849,7 @@ build_reinterpret_cast_1 (tree type, tree expr, bool c_cast_p,
       /* We need to strip nops here, because the front end likes to
 	 create (int *)&a for array-to-pointer decay, instead of &a[0].  */
       STRIP_NOPS (sexpr);
-      if (warn_strict_aliasing <= 2)
+      if (GCC_OPTION (warn_strict_aliasing) <= 2)
 	strict_aliasing_warning (intype, type, sexpr);
 
       return fold_if_not_in_template (build_nop (type, expr));
@@ -7559,7 +7559,7 @@ cp_build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs,
   if (newrhs == error_mark_node)
     return error_mark_node;
 
-  if (c_dialect_objc () && flag_objc_gc)
+  if (c_dialect_objc () && GCC_OPTION (flag_objc_gc))
     {
       result = objc_generate_write_barrier (lhs, modifycode, newrhs);
 
@@ -8053,7 +8053,7 @@ convert_for_assignment (tree type, tree rhs,
       /* When -Wno-pmf-conversions is use, we just silently allow
 	 conversions from pointers-to-members to plain pointers.  If
 	 the conversion doesn't work, cp_convert will complain.  */
-      if (!warn_pmf2ptr
+      if (!GCC_OPTION (warn_pmf2ptr)
 	  && TYPE_PTR_P (type)
 	  && TYPE_PTRMEMFUNC_P (rhstype))
 	rhs = cp_convert (strip_top_quals (type), rhs, complain);
@@ -8103,7 +8103,7 @@ convert_for_assignment (tree type, tree rhs,
 	  return error_mark_node;
 	}
     }
-  if (warn_suggest_attribute_format)
+  if (GCC_OPTION (warn_suggest_attribute_format))
     {
       const enum tree_code codel = TREE_CODE (type);
       if ((codel == POINTER_TYPE || codel == REFERENCE_TYPE)
@@ -8150,7 +8150,7 @@ convert_for_assignment (tree type, tree rhs,
 
   /* If -Wparentheses, warn about a = b = c when a has type bool and b
      does not.  */
-  if (warn_parentheses
+  if (GCC_OPTION (warn_parentheses)
       && TREE_CODE (type) == BOOLEAN_TYPE
       && TREE_CODE (rhs) == MODIFY_EXPR
       && !TREE_NO_WARNING (rhs)
@@ -8342,7 +8342,7 @@ check_return_expr (tree retval, bool *no_warning)
 
   *no_warning = false;
 
-  if (flag_cilkplus && retval && contains_cilk_spawn_stmt (retval))
+  if (GCC_OPTION (flag_cilkplus) && retval && contains_cilk_spawn_stmt (retval))
     {
       error_at (EXPR_LOCATION (retval), "use of %<_Cilk_spawn%> in a return "
 		"statement is not allowed");
@@ -8484,13 +8484,13 @@ check_return_expr (tree retval, bool *no_warning)
   if ((DECL_OVERLOADED_OPERATOR_P (current_function_decl) == NEW_EXPR
        || DECL_OVERLOADED_OPERATOR_P (current_function_decl) == VEC_NEW_EXPR)
       && !TYPE_NOTHROW_P (TREE_TYPE (current_function_decl))
-      && ! flag_check_new
+      && ! GCC_OPTION (flag_check_new)
       && retval && null_ptr_cst_p (retval))
     warning (0, "%<operator new%> must not return NULL unless it is "
 	     "declared %<throw()%> (or -fcheck-new is in effect)");
 
   /* Effective C++ rule 15.  See also start_function.  */
-  if (warn_ecpp
+  if (GCC_OPTION (warn_ecpp)
       && DECL_NAME (current_function_decl) == ansi_assopname(NOP_EXPR))
     {
       bool warn = true;
@@ -8551,7 +8551,7 @@ check_return_expr (tree retval, bool *no_warning)
      /* And the returned value must be non-volatile.  */
      && ! TYPE_VOLATILE (TREE_TYPE (retval)));
      
-  if (fn_returns_value_p && flag_elide_constructors)
+  if (fn_returns_value_p && GCC_OPTION (flag_elide_constructors))
     {
       if (named_return_value_okay_p
           && (current_function_return_value == NULL_TREE
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index bd21ad8..eed5a32 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -496,7 +496,7 @@ cxx_incomplete_type_diagnostic (const_tree value, const_tree type,
 	if (is_overloaded_fn (member))
 	  member = get_first_fn (member);
 	if (DECL_FUNCTION_MEMBER_P (member)
-	    && ! flag_ms_extensions)
+	    && ! GCC_OPTION (flag_ms_extensions))
 	  emit_diagnostic (diag_kind, input_location, 0,
 			   "invalid use of member function "
 			   "(did you forget the %<()%> ?)");
@@ -847,7 +847,7 @@ check_narrowing (tree type, tree init)
   bool ok = true;
   REAL_VALUE_TYPE d;
 
-  if (!warn_narrowing || !ARITHMETIC_TYPE_P (type))
+  if (!GCC_OPTION (warn_narrowing) || !ARITHMETIC_TYPE_P (type))
     return;
 
   if (BRACE_ENCLOSED_INITIALIZER_P (init)
diff --git a/gcc/cp/vtable-class-hierarchy.c b/gcc/cp/vtable-class-hierarchy.c
index 6da17c7..904d00f 100644
--- a/gcc/cp/vtable-class-hierarchy.c
+++ b/gcc/cp/vtable-class-hierarchy.c
@@ -166,7 +166,7 @@ vtv_build_vtable_verify_fndecl (void)
       && TREE_CODE (verify_vtbl_ptr_fndecl) != ERROR_MARK)
     return;
 
-  if (flag_vtv_debug)
+  if (GCC_OPTION (flag_vtv_debug))
     {
       func_type = build_function_type_list (const_ptr_type_node,
                                             build_pointer_type (ptr_type_node),
@@ -242,7 +242,7 @@ init_functions (void)
                                               build_pointer_type (ptr_type_node),
                                               NULL_TREE);
 
-  if (flag_vtv_debug)
+  if (GCC_OPTION (flag_vtv_debug))
     vlt_register_set_fndecl = build_lang_decl
                                        (FUNCTION_DECL,
                                         get_identifier ("__VLTRegisterSetDebug"),
@@ -265,7 +265,7 @@ init_functions (void)
 
   /* Build function decl for __VLTRegisterPair*.  */
 
-  if (flag_vtv_debug)
+  if (GCC_OPTION (flag_vtv_debug))
     {
       register_pairs_type = build_function_type_list (void_type_node,
                                                       build_pointer_type
@@ -686,7 +686,7 @@ vtv_string_hash (const char *in)
 static char *
 get_log_file_name (const char *fname)
 {
-  const char *tmp_dir = concat (dump_dir_name, NULL);
+  const char *tmp_dir = concat (GCC_OPTION (dump_dir_name), NULL);
   char *full_name;
   int dir_len;
   int fname_len;
@@ -828,7 +828,7 @@ insert_call_to_register_pair (vec<tree> *vtbl_ptr_array, tree arg1,
   else
     vtable_address = (*vtbl_ptr_array)[0];
 
-  if (flag_vtv_debug)
+  if (GCC_OPTION (flag_vtv_debug))
     call_expr = build_call_expr (vlt_register_pairs_fndecl, 6, arg1, arg2,
                                  size_hint_arg, vtable_address, str1, str2);
   else
@@ -881,7 +881,7 @@ output_set_info (tree record_type, vec<tree> vtbl_ptr_array)
         }
 
       snprintf (buffer, sizeof (buffer), "%s %s %s + %d\n",
-                main_input_filename, class_name, vptr_name, vptr_offset);
+                GCC_OPTION (main_input_filename), class_name, vptr_name, vptr_offset);
       bytes_written = write (vtv_debug_log_fd, buffer, strlen(buffer));
     }
 
@@ -919,7 +919,7 @@ register_all_pairs (tree body)
       gcc_assert (current->class_info != NULL);
 
 
-      if (flag_vtv_debug)
+      if (GCC_OPTION (flag_vtv_debug))
         str1 = build_string_from_id (DECL_NAME (base_ptr_var_decl));
 
       new_type = build_pointer_type (TREE_TYPE (base_ptr_var_decl));
@@ -1012,7 +1012,7 @@ register_all_pairs (tree body)
         str2 = build_string_literal (strlen ("unknown") + 1,
                                      "unknown");
 
-      if (flag_vtv_debug)
+      if (GCC_OPTION (flag_vtv_debug))
         output_set_info (current->class_info->class_type,
                          *vtbl_ptr_array);
 
@@ -1037,7 +1037,7 @@ register_all_pairs (tree body)
             }
         }
 
-      if (flag_vtv_counts && current_set_size > 0)
+      if (GCC_OPTION (flag_vtv_counts) && current_set_size > 0)
         write_out_current_set_data (base_class, current_set_size);
 
     }
@@ -1119,7 +1119,7 @@ write_out_vtv_count_data (void)
     }
 
   snprintf (buffer, sizeof (buffer), "%s %d %d %d %d %d\n",
-            main_input_filename, total_num_virtual_calls,
+            GCC_OPTION (main_input_filename), total_num_virtual_calls,
             total_num_verified_vcalls, num_calls_to_regset,
             num_calls_to_regpair, unused_vtbl_map_vars);
 
@@ -1147,7 +1147,7 @@ vtv_register_class_hierarchy_information (tree init_routine_body)
   /* Add class hierarchy pairs to the vtable map data structure.  */
   registered_something = register_all_pairs (init_routine_body);
 
-  if (flag_vtv_counts)
+  if (GCC_OPTION (flag_vtv_counts))
     write_out_vtv_count_data ();
 
   return registered_something;
@@ -1182,7 +1182,7 @@ vtv_generate_init_routine (void)
       TREE_STATIC (vtv_fndecl) = 1;
       TREE_USED (vtv_fndecl) = 1;
       DECL_PRESERVE_P (vtv_fndecl) = 1;
-      if (flag_vtable_verify == VTV_PREINIT_PRIORITY)
+      if (GCC_OPTION (flag_vtable_verify) == VTV_PREINIT_PRIORITY)
         DECL_STATIC_CONSTRUCTOR (vtv_fndecl) = 0;
 
       gimplify_function_tree (vtv_fndecl);
@@ -1190,7 +1190,7 @@ vtv_generate_init_routine (void)
 
       cgraph_process_new_functions ();
 
-      if (flag_vtable_verify == VTV_PREINIT_PRIORITY)
+      if (GCC_OPTION (flag_vtable_verify) == VTV_PREINIT_PRIORITY)
         assemble_vtv_preinit_initializer (vtv_fndecl);
 
     }
@@ -1273,7 +1273,7 @@ vtable_find_or_create_map_decl (tree base_type)
 static void
 vtv_insert_single_class_info (tree type)
 {
-  if (flag_vtable_verify)
+  if (GCC_OPTION (flag_vtable_verify))
     {
       tree binfo =  TYPE_BINFO (type);
       tree base_binfo;
@@ -1310,7 +1310,7 @@ vtv_insert_single_class_info (tree type)
 void
 vtv_save_class_info (tree record)
 {
-  if (!flag_vtable_verify || TREE_CODE (record) == UNION_TYPE)
+  if (!GCC_OPTION (flag_vtable_verify) || TREE_CODE (record) == UNION_TYPE)
     return;
 
   if (!vlt_saved_class_info)
diff --git a/gcc/cppbuiltin.c b/gcc/cppbuiltin.c
index 8b2c6b4..0beda0f 100644
--- a/gcc/cppbuiltin.c
+++ b/gcc/cppbuiltin.c
@@ -79,33 +79,33 @@ define__GNUC__ (cpp_reader *pfile)
 static void
 define_builtin_macros_for_compilation_flags (cpp_reader *pfile)
 {
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     {
-      cpp_define_formatted (pfile, "__pic__=%d", flag_pic);
-      cpp_define_formatted (pfile, "__PIC__=%d", flag_pic);
+      cpp_define_formatted (pfile, "__pic__=%d", GCC_OPTION (flag_pic));
+      cpp_define_formatted (pfile, "__PIC__=%d", GCC_OPTION (flag_pic));
     }
-  if (flag_pie)
+  if (GCC_OPTION (flag_pie))
     {
-      cpp_define_formatted (pfile, "__pie__=%d", flag_pie);
-      cpp_define_formatted (pfile, "__PIE__=%d", flag_pie);
+      cpp_define_formatted (pfile, "__pie__=%d", GCC_OPTION (flag_pie));
+      cpp_define_formatted (pfile, "__PIE__=%d", GCC_OPTION (flag_pie));
     }
 
-  if (flag_sanitize & SANITIZE_ADDRESS)
+  if (GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
     cpp_define (pfile, "__SANITIZE_ADDRESS__");
 
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     cpp_define (pfile, "__OPTIMIZE_SIZE__");
-  if (optimize)
+  if (GCC_OPTION (optimize))
     cpp_define (pfile, "__OPTIMIZE__");
 
   if (fast_math_flags_set_p (&global_options))
     cpp_define (pfile, "__FAST_MATH__");
-  if (flag_signaling_nans)
+  if (GCC_OPTION (flag_signaling_nans))
     cpp_define (pfile, "__SUPPORT_SNAN__");
 
   cpp_define_formatted (pfile, "__FINITE_MATH_ONLY__=%d",
-			flag_finite_math_only);
-  if (flag_cilkplus)
+			GCC_OPTION (flag_finite_math_only));
+  if (GCC_OPTION (flag_cilkplus))
     cpp_define (pfile, "__cilk=200");
 }
 
diff --git a/gcc/cprop.c b/gcc/cprop.c
index c3acb05..3a76f56 100644
--- a/gcc/cprop.c
+++ b/gcc/cprop.c
@@ -1899,7 +1899,7 @@ one_cprop_pass (void)
 static bool
 gate_rtl_cprop (void)
 {
-  return optimize > 0 && flag_gcse
+  return GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_gcse)
     && !cfun->calls_setjmp
     && dbg_cnt (cprop);
 }
diff --git a/gcc/cse.c b/gcc/cse.c
index 852d13e..a9aab44 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -4802,7 +4802,7 @@ cse_insn (rtx insn)
 	 have done the AND in a wider mode, we can use a SUBREG of that
 	 value.  */
 
-      if (flag_expensive_optimizations && ! src_related
+      if (GCC_OPTION (flag_expensive_optimizations) && ! src_related
 	  && GET_CODE (src) == AND && CONST_INT_P (XEXP (src, 1))
 	  && GET_MODE_SIZE (mode) < UNITS_PER_WORD)
 	{
@@ -4845,7 +4845,7 @@ cse_insn (rtx insn)
 	 also have such operations, but this is only likely to be
 	 beneficial on these machines.  */
 
-      if (flag_expensive_optimizations && src_related == 0
+      if (GCC_OPTION (flag_expensive_optimizations) && src_related == 0
 	  && (GET_MODE_SIZE (mode) < UNITS_PER_WORD)
 	  && GET_MODE_CLASS (mode) == MODE_INT
 	  && MEM_P (src) && ! do_not_record
@@ -5777,7 +5777,7 @@ cse_insn (rtx insn)
 	/* Don't record value if we are not supposed to risk allocating
 	   floating-point values in registers that might be wider than
 	   memory.  */
-	if ((flag_float_store
+	if ((GCC_OPTION (flag_float_store)
 	     && MEM_P (dest)
 	     && FLOAT_MODE_P (GET_MODE (dest)))
 	    /* Don't record BLKmode values, because we don't know the
@@ -6595,7 +6595,7 @@ cse_main (rtx f ATTRIBUTE_UNUSED, int nregs)
 	     && i < n_blocks);
 
       /* Find all paths starting with BB, and process them.  */
-      while (cse_find_path (bb, &ebb_data, flag_cse_follow_jumps))
+      while (cse_find_path (bb, &ebb_data, GCC_OPTION (flag_cse_follow_jumps)))
 	{
 	  /* Pre-scan the path.  */
 	  cse_prescan_path (&ebb_data);
@@ -7453,7 +7453,7 @@ cse_condition_code_reg (void)
 static bool
 gate_handle_cse (void)
 {
-  return optimize > 0;
+  return GCC_OPTION (optimize) > 0;
 }
 
 static unsigned int
@@ -7468,7 +7468,7 @@ rest_of_handle_cse (void)
 
   /* If we are not running more CSE passes, then we are no longer
      expecting CSE to be run.  But always rerun it in a cheap mode.  */
-  cse_not_expected = !flag_rerun_cse_after_loop && !flag_gcse;
+  cse_not_expected = !GCC_OPTION (flag_rerun_cse_after_loop) && !GCC_OPTION (flag_gcse);
 
   if (tem == 2)
     {
@@ -7477,7 +7477,7 @@ rest_of_handle_cse (void)
       cleanup_cfg (CLEANUP_CFG_CHANGED);
       timevar_pop (TV_JUMP);
     }
-  else if (tem == 1 || optimize > 1)
+  else if (tem == 1 || GCC_OPTION (optimize) > 1)
     cleanup_cfg (0);
 
   return 0;
@@ -7526,7 +7526,7 @@ make_pass_cse (gcc::context *ctxt)
 static bool
 gate_handle_cse2 (void)
 {
-  return optimize > 0 && flag_rerun_cse_after_loop;
+  return GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_rerun_cse_after_loop);
 }
 
 /* Run second CSE pass after loop optimizations.  */
@@ -7605,7 +7605,7 @@ make_pass_cse2 (gcc::context *ctxt)
 static bool
 gate_handle_cse_after_global_opts (void)
 {
-  return optimize > 0 && flag_rerun_cse_after_global_opts;
+  return GCC_OPTION (optimize) > 0 && flag_rerun_cse_after_global_opts;
 }
 
 /* Run second CSE pass after loop optimizations.  */
@@ -7616,15 +7616,15 @@ rest_of_handle_cse_after_global_opts (void)
   int tem;
 
   /* We only want to do local CSE, so don't follow jumps.  */
-  save_cfj = flag_cse_follow_jumps;
-  flag_cse_follow_jumps = 0;
+  save_cfj = GCC_OPTION (flag_cse_follow_jumps);
+  GCC_OPTION (flag_cse_follow_jumps) = 0;
 
   rebuild_jump_labels (get_insns ());
   tem = cse_main (get_insns (), max_reg_num ());
   purge_all_dead_edges ();
   delete_trivially_dead_insns (get_insns (), max_reg_num ());
 
-  cse_not_expected = !flag_rerun_cse_after_loop;
+  cse_not_expected = !GCC_OPTION (flag_rerun_cse_after_loop);
 
   /* If cse altered any jumps, rerun jump opts to clean things up.  */
   if (tem == 2)
@@ -7637,7 +7637,7 @@ rest_of_handle_cse_after_global_opts (void)
   else if (tem == 1)
     cleanup_cfg (0);
 
-  flag_cse_follow_jumps = save_cfj;
+  GCC_OPTION (flag_cse_follow_jumps) = save_cfj;
   return 0;
 }
 
diff --git a/gcc/cselib.c b/gcc/cselib.c
index 26bcbe0..de2230d 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -1324,7 +1324,7 @@ new_cselib_val (unsigned int hash, enum machine_mode mode, rtx x)
   if (dump_file && (dump_flags & TDF_CSELIB))
     {
       fprintf (dump_file, "cselib value %u:%u ", e->uid, hash);
-      if (flag_dump_noaddr || flag_dump_unnumbered)
+      if (GCC_OPTION (flag_dump_noaddr) || GCC_OPTION (flag_dump_unnumbered))
 	fputs ("# ", dump_file);
       else
 	fprintf (dump_file, "%p ", (void*)e);
@@ -1381,7 +1381,7 @@ cselib_lookup_mem (rtx x, int create)
 
   if (MEM_VOLATILE_P (x) || mode == BLKmode
       || !cselib_record_memory
-      || (FLOAT_MODE_P (mode) && flag_float_store))
+      || (FLOAT_MODE_P (mode) && GCC_OPTION (flag_float_store)))
     return 0;
 
   addr_mode = GET_MODE (XEXP (x, 0));
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 7a13289..c0b9320 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -819,7 +819,7 @@ stabstr_continue (void)
 #ifndef DBX_FINISH_STABS
 #define DBX_FINISH_STABS(SYM, CODE, LINE, ADDR, LABEL, NUMBER)	\
 do {								\
-  int line_ = use_gnu_debug_info_extensions ? LINE : 0;		\
+  int line_ = GCC_OPTION (use_gnu_debug_info_extensions) ? LINE : 0;		\
 								\
   dbxout_int (CODE);						\
   fputs (",0,", asm_out_file);					\
@@ -950,14 +950,14 @@ dbxout_function_end (tree decl ATTRIBUTE_UNUSED)
   /* The N_FUN tag at the end of the function is a GNU extension,
      which may be undesirable, and is unnecessary if we do not have
      named sections.  */
-  if (!use_gnu_debug_info_extensions
+  if (!GCC_OPTION (use_gnu_debug_info_extensions)
       || NO_DBX_FUNCTION_END
       || !targetm_common.have_named_sections)
     return;
 
   /* By convention, GCC will mark the end of a function with an N_FUN
      symbol and an empty string.  */
-  if (flag_reorder_blocks_and_partition)
+  if (GCC_OPTION (flag_reorder_blocks_and_partition))
     {
       dbxout_begin_empty_stabs (N_FUN);
       dbxout_stab_value_label_diff (crtl->subsections.hot_section_end_label,
@@ -975,7 +975,7 @@ dbxout_function_end (tree decl ATTRIBUTE_UNUSED)
       dbxout_stab_value_label_diff (lscope_label_name, begin_label);
     }
 
-  if (!NO_DBX_BNSYM_ENSYM && !flag_debug_only_used_symbols)
+  if (!NO_DBX_BNSYM_ENSYM && !GCC_OPTION (flag_debug_only_used_symbols))
     dbxout_stabd (N_ENSYM, 0);
 }
 #endif /* DBX_DEBUGGING_INFO */
@@ -1037,7 +1037,7 @@ dbxout_init (const char *input_file_name)
   ASM_GENERATE_INTERNAL_LABEL (ltext_label_name, "Ltext", 0);
 
   /* Put the current working directory in an N_SO symbol.  */
-  if (use_gnu_debug_info_extensions && !NO_DBX_MAIN_SOURCE_DIRECTORY)
+  if (GCC_OPTION (use_gnu_debug_info_extensions) && !NO_DBX_MAIN_SOURCE_DIRECTORY)
     {
       static const char *cwd;
 
@@ -1286,10 +1286,10 @@ dbxout_source_file (const char *filename)
 static void
 dbxout_begin_prologue (unsigned int lineno, const char *filename)
 {
-  if (use_gnu_debug_info_extensions
+  if (GCC_OPTION (use_gnu_debug_info_extensions)
       && !NO_DBX_FUNCTION_END
       && !NO_DBX_BNSYM_ENSYM
-      && !flag_debug_only_used_symbols)
+      && !GCC_OPTION (flag_debug_only_used_symbols))
     dbxout_stabd (N_BNSYM, 0);
 
   /* pre-increment the scope counter */
@@ -1537,7 +1537,7 @@ dbxout_type_fields (tree type)
 	    stabstr_I (DECL_NAME (tem));
 	  stabstr_C (':');
 
-	  if (use_gnu_debug_info_extensions
+	  if (GCC_OPTION (use_gnu_debug_info_extensions)
 	      && (TREE_PRIVATE (tem) || TREE_PROTECTED (tem)
 		  || TREE_CODE (tem) != FIELD_DECL))
 	    {
@@ -1551,7 +1551,7 @@ dbxout_type_fields (tree type)
 
 	  if (TREE_CODE (tem) == VAR_DECL)
 	    {
-	      if (TREE_STATIC (tem) && use_gnu_debug_info_extensions)
+	      if (TREE_STATIC (tem) && GCC_OPTION (use_gnu_debug_info_extensions))
 		{
 		  tree name = DECL_ASSEMBLER_NAME (tem);
 
@@ -1803,7 +1803,7 @@ dbxout_type (tree type, int full)
 
   /* If we are not using extensions, stabs does not distinguish const and
      volatile, so there is no need to make them separate types.  */
-  if (!use_gnu_debug_info_extensions)
+  if (!GCC_OPTION (use_gnu_debug_info_extensions))
     type = main_variant;
 
   if (TYPE_SYMTAB_ADDRESS (type) == 0)
@@ -1829,7 +1829,7 @@ dbxout_type (tree type, int full)
 #endif
     }
 
-  if (flag_debug_only_used_symbols)
+  if (GCC_OPTION (flag_debug_only_used_symbols))
     {
       if ((TREE_CODE (type) == RECORD_TYPE
 	   || TREE_CODE (type) == UNION_TYPE
@@ -1882,7 +1882,7 @@ dbxout_type (tree type, int full)
   if ((TREE_CODE (type) == RECORD_TYPE || TREE_CODE (type) == UNION_TYPE
        || TREE_CODE (type) == QUAL_UNION_TYPE
        || TREE_CODE (type) == ENUMERAL_TYPE)
-      && ! use_gnu_debug_info_extensions)
+      && ! GCC_OPTION (use_gnu_debug_info_extensions))
     /* We must use the same test here as we use twice below when deciding
        whether to emit a cross-reference.  */
     if ((TYPE_NAME (type) != 0
@@ -1923,7 +1923,7 @@ dbxout_type (tree type, int full)
     }
   else if (main_variant != TYPE_MAIN_VARIANT (type))
     {
-      if (flag_debug_only_used_symbols)
+      if (GCC_OPTION (flag_debug_only_used_symbols))
         {
           tree orig_type = DECL_ORIGINAL_TYPE (TYPE_NAME (type));
 
@@ -1975,7 +1975,7 @@ dbxout_type (tree type, int full)
 	  /* If the size is non-standard, say what it is if we can use
 	     GDB extensions.  */
 
-	  if (use_gnu_debug_info_extensions
+	  if (GCC_OPTION (use_gnu_debug_info_extensions)
 	      && TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node))
 	    {
 	      stabstr_S ("@s");
@@ -1991,7 +1991,7 @@ dbxout_type (tree type, int full)
 	  /* If the size is non-standard, say what it is if we can use
 	     GDB extensions.  */
 
-	  if (use_gnu_debug_info_extensions
+	  if (GCC_OPTION (use_gnu_debug_info_extensions)
 	      && TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node))
 	    {
 	      stabstr_S ("@s");
@@ -2039,7 +2039,7 @@ dbxout_type (tree type, int full)
       break;
 
     case BOOLEAN_TYPE:
-      if (use_gnu_debug_info_extensions)
+      if (GCC_OPTION (use_gnu_debug_info_extensions))
 	{
 	  stabstr_S ("@s");
 	  stabstr_D (BITS_PER_UNIT * int_size_in_bytes (type));
@@ -2084,7 +2084,7 @@ dbxout_type (tree type, int full)
 
     case ARRAY_TYPE:
       /* Make arrays of packed bits look like bitstrings for chill.  */
-      if (TYPE_PACKED (type) && use_gnu_debug_info_extensions)
+      if (TYPE_PACKED (type) && GCC_OPTION (use_gnu_debug_info_extensions))
 	{
 	  stabstr_S ("@s");
 	  stabstr_D (BITS_PER_UNIT * int_size_in_bytes (type));
@@ -2099,7 +2099,7 @@ dbxout_type (tree type, int full)
 	 ar1;0;N;M for a C array of type M and size N+1.  */
       /* Check if a character string type, which in Chill is
 	 different from an array of characters.  */
-      if (TYPE_STRING_FLAG (type) && use_gnu_debug_info_extensions)
+      if (TYPE_STRING_FLAG (type) && GCC_OPTION (use_gnu_debug_info_extensions))
 	{
 	  stabstr_S ("@S;");
 	}
@@ -2121,7 +2121,7 @@ dbxout_type (tree type, int full)
 
     case VECTOR_TYPE:
       /* Make vectors look like an array.  */
-      if (use_gnu_debug_info_extensions)
+      if (GCC_OPTION (use_gnu_debug_info_extensions))
 	stabstr_S ("@V;");
 
       /* Output "a" followed by a range type definition
@@ -2186,7 +2186,7 @@ dbxout_type (tree type, int full)
 	    tree child;
 	    vec<tree, va_gc> *accesses = BINFO_BASE_ACCESSES (binfo);
 
-	    if (use_gnu_debug_info_extensions)
+	    if (GCC_OPTION (use_gnu_debug_info_extensions))
 	      {
 		if (BINFO_N_BASE_BINFOS (binfo))
 		  {
@@ -2199,7 +2199,7 @@ dbxout_type (tree type, int full)
 	      {
 		tree access = (accesses ? (*accesses)[i] : access_public_node);
 
-		if (use_gnu_debug_info_extensions)
+		if (GCC_OPTION (use_gnu_debug_info_extensions))
 		  {
 		    stabstr_C (BINFO_VIRTUAL_P (child) ? '1' : '0');
 		    stabstr_C (access == access_public_node ? '2' :
@@ -2244,14 +2244,14 @@ dbxout_type (tree type, int full)
 
       /* Write out the field declarations.  */
       dbxout_type_fields (type);
-      if (use_gnu_debug_info_extensions && TYPE_METHODS (type) != NULL_TREE)
+      if (GCC_OPTION (use_gnu_debug_info_extensions) && TYPE_METHODS (type) != NULL_TREE)
 	{
 	  dbxout_type_methods (type);
 	}
 
       stabstr_C (';');
 
-      if (use_gnu_debug_info_extensions && TREE_CODE (type) == RECORD_TYPE
+      if (GCC_OPTION (use_gnu_debug_info_extensions) && TREE_CODE (type) == RECORD_TYPE
 	  /* Avoid the ~ if we don't really need it--it confuses dbx.  */
 	  && TYPE_VFIELD (type))
 	{
@@ -2282,7 +2282,7 @@ dbxout_type (tree type, int full)
 	  stabstr_C (':');
 	  return;
 	}
-      if (use_gnu_debug_info_extensions
+      if (GCC_OPTION (use_gnu_debug_info_extensions)
 	  && TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node))
 	{
 	  stabstr_S ("@s");
@@ -2323,7 +2323,7 @@ dbxout_type (tree type, int full)
       break;
 
     case METHOD_TYPE:
-      if (use_gnu_debug_info_extensions)
+      if (GCC_OPTION (use_gnu_debug_info_extensions))
 	{
 	  stabstr_C ('#');
 
@@ -2340,7 +2340,7 @@ dbxout_type (tree type, int full)
       break;
 
     case OFFSET_TYPE:
-      if (use_gnu_debug_info_extensions)
+      if (GCC_OPTION (use_gnu_debug_info_extensions))
 	{
 	  stabstr_C ('@');
 	  dbxout_type (TYPE_OFFSET_BASETYPE (type), 0);
@@ -2353,7 +2353,7 @@ dbxout_type (tree type, int full)
       break;
 
     case REFERENCE_TYPE:
-      if (use_gnu_debug_info_extensions)
+      if (GCC_OPTION (use_gnu_debug_info_extensions))
 	{
 	  stabstr_C ('&');
 	}
@@ -2389,7 +2389,7 @@ print_int_cst_bounds_in_octal_p (tree type, tree low, tree high)
      This is because we print the bounds as signed decimal, and hence they
      can't span same size unsigned types.  */
 
-  if (use_gnu_debug_info_extensions
+  if (GCC_OPTION (use_gnu_debug_info_extensions)
       && low && TREE_CODE (low) == INTEGER_CST
       && high && TREE_CODE (high) == INTEGER_CST
       && (TYPE_PRECISION (type) > TYPE_PRECISION (integer_type_node)
@@ -2636,7 +2636,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
      symbol nodes are flagged with TREE_USED.  Ignore any that
      aren't flagged as TREE_USED.  */
 
-  if (flag_debug_only_used_symbols
+  if (GCC_OPTION (flag_debug_only_used_symbols)
       && (!TREE_USED (decl)
           && (TREE_CODE (decl) != VAR_DECL || !DECL_INITIAL (decl))))
     DBXOUT_DECR_NESTING_AND_RETURN (0);
@@ -2648,7 +2648,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
       DBXOUT_DECR_NESTING_AND_RETURN (0);
     }
 
-  if (flag_debug_only_used_symbols)
+  if (GCC_OPTION (flag_debug_only_used_symbols))
     {
       tree t;
 
@@ -2722,7 +2722,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
 	  || GET_CODE (XEXP (decl_rtl, 0)) != SYMBOL_REF)
 	break;
 
-      if (flag_debug_only_used_symbols)
+      if (GCC_OPTION (flag_debug_only_used_symbols))
 	output_used_types ();
 
       dbxout_begin_complex_stabs ();
@@ -2788,7 +2788,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
 		 || TREE_CODE (type) == UNION_TYPE
 		 || TREE_CODE (type) == QUAL_UNION_TYPE)
 		&& TYPE_NAME (type) == decl
-		&& !use_gnu_debug_info_extensions
+		&& !GCC_OPTION (use_gnu_debug_info_extensions)
 		&& !TREE_ASM_WRITTEN (TYPE_NAME (type))
 		/* Distinguish the implicit typedefs of C++
 		   from explicit ones that might be found in C.  */
@@ -2815,7 +2815,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
 	    dbxout_begin_complex_stabs ();
 
 	    /* Output leading class/struct qualifiers.  */
-	    if (use_gnu_debug_info_extensions)
+	    if (GCC_OPTION (use_gnu_debug_info_extensions))
 	      dbxout_class_name_qualifiers (decl);
 
 	    /* Output typedef name.  */
@@ -2831,7 +2831,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
 		   from explicit ones that might be found in C.  */
 		&& DECL_ARTIFICIAL (decl))
 	      {
-		if (use_gnu_debug_info_extensions)
+		if (GCC_OPTION (use_gnu_debug_info_extensions))
 		  {
 		    stabstr_C ('T');
 		    TREE_ASM_WRITTEN (TYPE_NAME (type)) = 1;
@@ -3537,7 +3537,7 @@ dbxout_parms (tree parms)
 	    code = DBX_REGPARM_STABS_CODE;
 
 	    /* GDB likes this marked with a special letter.  */
-	    letter = (use_gnu_debug_info_extensions
+	    letter = (GCC_OPTION (use_gnu_debug_info_extensions)
 		      ? 'a' : DBX_REGPARM_STABS_LETTER);
 	    eff_type = TREE_TYPE (parms);
 
@@ -3737,7 +3737,7 @@ dbxout_block (tree block, int depth, tree args)
 	  /* In dbx format, the syms of a block come before the N_LBRAC.
 	     If nothing is output, we don't need the N_LBRAC, either.  */
 	  did_output = 0;
-	  if (debug_info_level != DINFO_LEVEL_TERSE || depth == 0)
+	  if (GCC_OPTION (debug_info_level) != DINFO_LEVEL_TERSE || depth == 0)
 	    did_output = dbxout_syms (BLOCK_VARS (block));
 	  if (args)
 	    dbxout_reg_parms (args);
diff --git a/gcc/dce.c b/gcc/dce.c
index 07592f4..5497750 100644
--- a/gcc/dce.c
+++ b/gcc/dce.c
@@ -782,7 +782,7 @@ rest_of_handle_ud_dce (void)
 static bool
 gate_ud_dce (void)
 {
-  return optimize > 1 && flag_dce
+  return GCC_OPTION (optimize) > 1 && GCC_OPTION (flag_dce)
     && dbg_cnt (dce_ud);
 }
 
@@ -1159,7 +1159,7 @@ run_word_dce (void)
 {
   int old_flags;
 
-  if (!flag_dce)
+  if (!GCC_OPTION (flag_dce))
     return;
 
   timevar_push (TV_DCE);
@@ -1185,7 +1185,7 @@ run_word_dce (void)
 void
 run_fast_df_dce (void)
 {
-  if (flag_dce)
+  if (GCC_OPTION (flag_dce))
     {
       /* If dce is able to delete something, it has to happen
 	 immediately.  Otherwise there will be problems handling the
@@ -1207,7 +1207,7 @@ run_fast_df_dce (void)
 void
 run_fast_dce (void)
 {
-  if (flag_dce)
+  if (GCC_OPTION (flag_dce))
     rest_of_handle_fast_dce ();
 }
 
@@ -1215,7 +1215,7 @@ run_fast_dce (void)
 static bool
 gate_fast_dce (void)
 {
-  return optimize > 0 && flag_dce
+  return GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_dce)
     && dbg_cnt (dce_fast);
 }
 
diff --git a/gcc/ddg.c b/gcc/ddg.c
index d6ee0c2..fa2a585 100644
--- a/gcc/ddg.c
+++ b/gcc/ddg.c
@@ -216,7 +216,7 @@ create_ddg_dep_from_intra_loop_link (ddg_ptr g, ddg_node_ptr src_node,
      reg-moves will not be created for this address.  
      TODO: support the removal of all anti-deps edges, i.e. including those
      whose register has multiple defs in the loop.  */
-  if (flag_modulo_sched_allow_regmoves 
+  if (GCC_OPTION (flag_modulo_sched_allow_regmoves) 
       && (t == ANTI_DEP && dt == REG_DEP)
       && !def_has_ccmode_p (dest_node->insn)
       && !autoinc_var_is_used_p (dest_node->insn, src_node->insn))
@@ -350,7 +350,7 @@ add_cross_iteration_register_deps (ddg_ptr g, df_ref last_def)
             is used in USE_INSN then do not remove the edge to make sure
             reg-moves will not be created for that address.  */
           if (DF_REF_ID (last_def) != DF_REF_ID (first_def)
-              || !flag_modulo_sched_allow_regmoves
+              || !GCC_OPTION (flag_modulo_sched_allow_regmoves)
 	      || JUMP_P (use_node->insn)
               || autoinc_var_is_used_p (DF_REF_INSN (last_def), use_insn)
 	      || def_has_ccmode_p (DF_REF_INSN (last_def)))
@@ -570,7 +570,7 @@ build_intra_loop_deps (ddg_ptr g)
 		     removing these edges could cause a violation of the
 		     memory dependencies.  Thus we add intra edges between
 		     every two memory instructions in this case.  */
-		  if (flag_modulo_sched_allow_regmoves
+		  if (GCC_OPTION (flag_modulo_sched_allow_regmoves)
 		      && !bitmap_bit_p (dest_node->predecessors, j))
 		    add_intra_loop_mem_dep (g, j_node, dest_node);
 		}
diff --git a/gcc/defaults.h b/gcc/defaults.h
index f94ae17..b610d6d 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -602,7 +602,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 
 /* WCHAR_TYPE gets overridden by -fshort-wchar.  */
 #define MODIFIED_WCHAR_TYPE \
-	(flag_short_wchar ? "short unsigned int" : WCHAR_TYPE)
+	(GCC_OPTION (flag_short_wchar) ? "short unsigned int" : WCHAR_TYPE)
 
 #ifndef PTRDIFF_TYPE
 #define PTRDIFF_TYPE "long int"
diff --git a/gcc/df-core.c b/gcc/df-core.c
index edb3b25..07e5018 100644
--- a/gcc/df-core.c
+++ b/gcc/df-core.c
@@ -719,7 +719,7 @@ rest_of_handle_df_initialize (void)
 
   /* These three problems are permanent.  */
   df_lr_add_problem ();
-  if (optimize > 1)
+  if (GCC_OPTION (optimize) > 1)
     df_live_add_problem ();
 
   df->postorder = XNEWVEC (int, last_basic_block_for_fn (cfun));
@@ -743,7 +743,7 @@ rest_of_handle_df_initialize (void)
 static bool
 gate_opt (void)
 {
-  return optimize > 0;
+  return GCC_OPTION (optimize) > 0;
 }
 
 
@@ -789,7 +789,7 @@ make_pass_df_initialize_opt (gcc::context *ctxt)
 static bool
 gate_no_opt (void)
 {
-  return optimize == 0;
+  return GCC_OPTION (optimize) == 0;
 }
 
 
@@ -2477,7 +2477,7 @@ df_ref_debug (df_ref ref, FILE *file)
 	   DF_REF_TYPE (ref));
   if (DF_REF_LOC (ref))
     {
-      if (flag_dump_noaddr)
+      if (GCC_OPTION (flag_dump_noaddr))
 	fprintf (file, "loc #(#) chain ");
       else
 	fprintf (file, "loc %p(%p) chain ", (void *)DF_REF_LOC (ref),
diff --git a/gcc/df-problems.c b/gcc/df-problems.c
index 77f8c99..2afbf6a 100644
--- a/gcc/df-problems.c
+++ b/gcc/df-problems.c
@@ -1433,7 +1433,7 @@ df_live_alloc (bitmap all_blocks ATTRIBUTE_UNUSED)
 	  bitmap_initialize (&bb_info->out, &problem_data->live_bitmaps);
 	}
     }
-  df_live->optional_p = (optimize <= 1);
+  df_live->optional_p = (GCC_OPTION (optimize) <= 1);
 }
 
 
diff --git a/gcc/dojump.c b/gcc/dojump.c
index 7846314..5acb71c 100644
--- a/gcc/dojump.c
+++ b/gcc/dojump.c
@@ -78,8 +78,8 @@ discard_pending_stack_adjust (void)
 void
 clear_pending_stack_adjust (void)
 {
-  if (optimize > 0
-      && (! flag_omit_frame_pointer || cfun->calls_alloca)
+  if (GCC_OPTION (optimize) > 0
+      && (! GCC_OPTION (flag_omit_frame_pointer) || cfun->calls_alloca)
       && EXIT_IGNORE_STACK)
     discard_pending_stack_adjust ();
 }
diff --git a/gcc/dse.c b/gcc/dse.c
index 09dc5df..6f8e330 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -1510,7 +1510,7 @@ record_store (rtx body, bb_info_t bb_info)
       && !MEM_VOLATILE_P (mem)
       /* Sometimes the store and reload is used for truncation and
 	 rounding.  */
-      && !(FLOAT_MODE_P (GET_MODE (mem)) && (flag_float_store)))
+      && !(FLOAT_MODE_P (GET_MODE (mem)) && (GCC_OPTION (flag_float_store))))
     {
       rhs = SET_SRC (body);
       if (CONSTANT_P (rhs))
@@ -3715,14 +3715,14 @@ rest_of_handle_dse (void)
 static bool
 gate_dse1 (void)
 {
-  return optimize > 0 && flag_dse
+  return GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_dse)
     && dbg_cnt (dse1);
 }
 
 static bool
 gate_dse2 (void)
 {
-  return optimize > 0 && flag_dse
+  return GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_dse)
     && dbg_cnt (dse2);
 }
 
diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c
index fd630a6..58586a1 100644
--- a/gcc/dumpfile.c
+++ b/gcc/dumpfile.c
@@ -228,7 +228,7 @@ get_dump_file_name (int phase) const
 	dump_id[0] = '\0';
     }
 
-  return concat (dump_base_name, dump_id, dfi->suffix, NULL);
+  return concat (GCC_OPTION (dump_base_name), dump_id, dfi->suffix, NULL);
 }
 
 /* For a given DFI, open an alternate dump filename (which could also
diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c
index 1372b23..e7e8f1b 100644
--- a/gcc/dwarf2asm.c
+++ b/gcc/dwarf2asm.c
@@ -107,7 +107,7 @@ dw2_asm_output_data (int size, unsigned HOST_WIDE_INT value,
   else
     assemble_integer (GEN_INT (value), size, BITS_PER_UNIT, 1);
 
-  if (flag_debug_asm && comment)
+  if (GCC_OPTION (flag_debug_asm) && comment)
     {
       fputs ("\t" ASM_COMMENT_START " ", asm_out_file);
       vfprintf (asm_out_file, comment, ap);
@@ -139,7 +139,7 @@ dw2_asm_output_delta (int size, const char *lab1, const char *lab2,
 				       gen_rtx_SYMBOL_REF (Pmode, lab1),
 				       gen_rtx_SYMBOL_REF (Pmode, lab2)));
 #endif
-  if (flag_debug_asm && comment)
+  if (GCC_OPTION (flag_debug_asm) && comment)
     {
       fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START);
       vfprintf (asm_out_file, comment, ap);
@@ -167,7 +167,7 @@ dw2_asm_output_vms_delta (int size ATTRIBUTE_UNUSED,
   dw2_asm_output_delta (size, lab1, lab2, comment);
 #else
   ASM_OUTPUT_DWARF_VMS_DELTA (asm_out_file, size, lab1, lab2);
-  if (flag_debug_asm && comment)
+  if (GCC_OPTION (flag_debug_asm) && comment)
     {
       fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START);
       vfprintf (asm_out_file, comment, ap);
@@ -200,7 +200,7 @@ dw2_asm_output_offset (int size, const char *label,
   dw2_assemble_integer (size, gen_rtx_SYMBOL_REF (Pmode, label));
 #endif
 
-  if (flag_debug_asm && comment)
+  if (GCC_OPTION (flag_debug_asm) && comment)
     {
       fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START);
       vfprintf (asm_out_file, comment, ap);
@@ -233,7 +233,7 @@ dw2_asm_output_pcrel (int size ATTRIBUTE_UNUSED,
 				       pc_rtx));
 #endif
 
-  if (flag_debug_asm && comment)
+  if (GCC_OPTION (flag_debug_asm) && comment)
     {
       fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START);
       vfprintf (asm_out_file, comment, ap);
@@ -256,7 +256,7 @@ dw2_asm_output_addr (int size, const char *label,
 
   dw2_assemble_integer (size, gen_rtx_SYMBOL_REF (Pmode, label));
 
-  if (flag_debug_asm && comment)
+  if (GCC_OPTION (flag_debug_asm) && comment)
     {
       fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START);
       vfprintf (asm_out_file, comment, ap);
@@ -278,7 +278,7 @@ dw2_asm_output_addr_rtx (int size, rtx addr,
 
   dw2_assemble_integer (size, addr);
 
-  if (flag_debug_asm && comment)
+  if (GCC_OPTION (flag_debug_asm) && comment)
     {
       fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START);
       vfprintf (asm_out_file, comment, ap);
@@ -309,7 +309,7 @@ dw2_asm_output_nstring (const char *str, size_t orig_len,
   if (len == (size_t) -1)
     len = strlen (str);
 
-  if (flag_debug_asm && comment)
+  if (GCC_OPTION (flag_debug_asm) && comment)
     {
       fputs ("\t.ascii \"", asm_out_file);
       for (i = 0; i < len; i++)
@@ -596,7 +596,7 @@ dw2_asm_output_data_uleb128 (unsigned HOST_WIDE_INT value,
   fputs ("\t.uleb128 ", asm_out_file);
   fprint_whex (asm_out_file, value);
 
-  if (flag_debug_asm && comment)
+  if (GCC_OPTION (flag_debug_asm) && comment)
     {
       fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START);
       vfprintf (asm_out_file, comment, ap);
@@ -627,7 +627,7 @@ dw2_asm_output_data_uleb128 (unsigned HOST_WIDE_INT value,
       }
     while (work != 0);
 
-  if (flag_debug_asm)
+  if (GCC_OPTION (flag_debug_asm))
     {
       fprintf (asm_out_file, "\t%s uleb128 " HOST_WIDE_INT_PRINT_HEX,
 	       ASM_COMMENT_START, value);
@@ -680,7 +680,7 @@ dw2_asm_output_data_sleb128 (HOST_WIDE_INT value,
 #ifdef HAVE_AS_LEB128
   fprintf (asm_out_file, "\t.sleb128 " HOST_WIDE_INT_PRINT_DEC, value);
 
-  if (flag_debug_asm && comment)
+  if (GCC_OPTION (flag_debug_asm) && comment)
     {
       fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START);
       vfprintf (asm_out_file, comment, ap);
@@ -714,7 +714,7 @@ dw2_asm_output_data_sleb128 (HOST_WIDE_INT value,
       }
     while (more);
 
-  if (flag_debug_asm)
+  if (GCC_OPTION (flag_debug_asm))
     {
       fprintf (asm_out_file, "\t%s sleb128 " HOST_WIDE_INT_PRINT_DEC,
 	       ASM_COMMENT_START, value);
@@ -749,7 +749,7 @@ dw2_asm_output_delta_uleb128 (const char *lab1 ATTRIBUTE_UNUSED,
   gcc_unreachable ();
 #endif
 
-  if (flag_debug_asm && comment)
+  if (GCC_OPTION (flag_debug_asm) && comment)
     {
       fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START);
       vfprintf (asm_out_file, comment, ap);
@@ -779,7 +779,7 @@ dw2_asm_output_delta_sleb128 (const char *lab1 ATTRIBUTE_UNUSED,
   gcc_unreachable ();
 #endif
 
-  if (flag_debug_asm && comment)
+  if (GCC_OPTION (flag_debug_asm) && comment)
     {
       fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START);
       vfprintf (asm_out_file, comment, ap);
@@ -1012,7 +1012,7 @@ dw2_asm_output_encoded_addr_rtx (int encoding, rtx addr, bool is_public,
 #endif
     }
 
-  if (flag_debug_asm && comment)
+  if (GCC_OPTION (flag_debug_asm) && comment)
     {
       fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START);
       vfprintf (asm_out_file, comment, ap);
diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c
index abcdeb3..f2ed324 100644
--- a/gcc/dwarf2cfi.c
+++ b/gcc/dwarf2cfi.c
@@ -2103,10 +2103,10 @@ cfi_label_required_p (dw_cfi_ref cfi)
   if (!dwarf2out_do_cfi_asm ())
     return true;
 
-  if (dwarf_version == 2
-      && debug_info_level > DINFO_LEVEL_TERSE
-      && (write_symbols == DWARF2_DEBUG
-	  || write_symbols == VMS_AND_DWARF2_DEBUG))
+  if (GCC_OPTION (dwarf_version) == 2
+      && GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE
+      && (GCC_OPTION (write_symbols) == DWARF2_DEBUG
+	  || GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG))
     {
       switch (cfi->dw_cfi_opc)
 	{
@@ -3233,7 +3233,7 @@ output_cfi_directive (FILE *f, dw_cfi_ref cfi)
 	{
 	  fprintf (f, "\t.cfi_escape %#x,", DW_CFA_GNU_args_size);
 	  dw2_asm_output_data_uleb128_raw (cfi->dw_cfi_oprnd1.dw_cfi_offset);
-	  if (flag_debug_asm)
+	  if (GCC_OPTION (flag_debug_asm))
 	    fprintf (f, "\t%s args_size "HOST_WIDE_INT_PRINT_DEC,
 		     ASM_COMMENT_START, cfi->dw_cfi_oprnd1.dw_cfi_offset);
 	  fputc ('\n', f);
@@ -3322,7 +3322,7 @@ dwarf2out_do_frame (void)
   /* We want to emit correct CFA location expressions or lists, so we
      have to return true if we're going to output debug info, even if
      we're not going to output frame or unwind info.  */
-  if (write_symbols == DWARF2_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == DWARF2_DEBUG || GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     return true;
 
   if (saved_do_cfi_asm > 0)
@@ -3331,7 +3331,7 @@ dwarf2out_do_frame (void)
   if (targetm.debug_unwind_info () == UI_DWARF2)
     return true;
 
-  if ((flag_unwind_tables || flag_exceptions)
+  if ((GCC_OPTION (flag_unwind_tables) || GCC_OPTION (flag_exceptions))
       && targetm_common.except_unwind_info (&global_options) == UI_DWARF2)
     return true;
 
@@ -3351,7 +3351,7 @@ dwarf2out_do_cfi_asm (void)
   /* Assume failure for a moment.  */
   saved_do_cfi_asm = -1;
 
-  if (!flag_dwarf2_cfi_asm || !dwarf2out_do_frame ())
+  if (!GCC_OPTION (flag_dwarf2_cfi_asm) || !dwarf2out_do_frame ())
     return false;
   if (!HAVE_GAS_CFI_PERSONALITY_DIRECTIVE)
     return false;
@@ -3368,7 +3368,7 @@ dwarf2out_do_cfi_asm (void)
   /* If we can't get the assembler to emit only .debug_frame, and we don't need
      dwarf2 unwind info for exceptions, then emit .debug_frame by hand.  */
   if (!HAVE_GAS_CFI_SECTIONS_DIRECTIVE
-      && !flag_unwind_tables && !flag_exceptions
+      && !GCC_OPTION (flag_unwind_tables) && !GCC_OPTION (flag_exceptions)
       && targetm_common.except_unwind_info (&global_options) != UI_DWARF2)
     return false;
 
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 2b584a5..d11ae04 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -314,8 +314,8 @@ matches_main_base (const char *path)
       const char *base;
       int length = base_of_path (path, &base);
       last_path = path;
-      last_match = (length == main_input_baselength
-                    && memcmp (base, main_input_basename, length) == 0);
+      last_match = (length == GCC_OPTION (main_input_baselength)
+                    && memcmp (base, GCC_OPTION (main_input_basename), length) == 0);
     }
   return last_match;
 }
@@ -365,9 +365,9 @@ should_emit_struct_debug (tree type, enum debug_info_usage usage)
   bool generic = lang_hooks.types.generic_p (type);
 
   if (generic)
-    criterion = debug_struct_generic[usage];
+    criterion = GCC_OPTION (debug_struct_generic)[usage];
   else
-    criterion = debug_struct_ordinary[usage];
+    criterion = GCC_OPTION (debug_struct_ordinary)[usage];
 
   if (criterion == DINFO_STRUCT_FILE_NONE)
     return DUMP_GSTRUCT (type, usage, criterion, generic, false, false);
@@ -432,7 +432,7 @@ switch_to_eh_frame_section (bool back)
 						       /*global=*/1);
 	  lsda_encoding = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0,
 							/*global=*/0);
-	  flags = ((! flag_pic
+	  flags = ((! GCC_OPTION (flag_pic)
 		    || ((fde_encoding & 0x70) != DW_EH_PE_absptr
 			&& (fde_encoding & 0x70) != DW_EH_PE_aligned
 			&& (per_encoding & 0x70) != DW_EH_PE_absptr
@@ -690,7 +690,7 @@ output_fde (dw_fde_ref fde, bool for_eh, bool second,
 static bool
 fde_needed_for_eh_p (dw_fde_ref fde)
 {
-  if (flag_asynchronous_unwind_tables)
+  if (GCC_OPTION (flag_asynchronous_unwind_tables))
     return true;
 
   if (TARGET_USES_WEAK_UNWIND_INFO && DECL_WEAK (fde->decl))
@@ -700,7 +700,7 @@ fde_needed_for_eh_p (dw_fde_ref fde)
     return true;
 
   /* If exceptions are enabled, we have collected nothrow info.  */
-  if (flag_exceptions && (fde->all_throwers_are_sibcalls || fde->nothrow))
+  if (GCC_OPTION (flag_exceptions) && (fde->all_throwers_are_sibcalls || fde->nothrow))
     return false;
 
   return true;
@@ -760,7 +760,7 @@ output_call_frame_info (int for_eh)
     }
 
   /* We're going to be generating comments, so turn on app.  */
-  if (flag_debug_asm)
+  if (GCC_OPTION (flag_debug_asm))
     app_enable ();
 
   /* Switch to the proper frame section, first time.  */
@@ -790,7 +790,7 @@ output_call_frame_info (int for_eh)
      due to overflowing the return register column.  */
   return_reg = DWARF2_FRAME_REG_OUT (DWARF_FRAME_RETURN_COLUMN, for_eh);
   dw_cie_version = 1;
-  if (return_reg >= 256 || dwarf_version > 2)
+  if (return_reg >= 256 || GCC_OPTION (dwarf_version) > 2)
     dw_cie_version = 3;
   dw2_asm_output_data (1, dw_cie_version, "CIE Version");
 
@@ -923,7 +923,7 @@ output_call_frame_info (int for_eh)
     dw2_asm_output_data (4, 0, "End of Table");
 
   /* Turn off app to make assembly quicker.  */
-  if (flag_debug_asm)
+  if (GCC_OPTION (flag_debug_asm))
     app_disable ();
 }
 
@@ -1019,7 +1019,7 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED,
   /* ??? current_function_func_begin_label is also used by except.c for
      call-site information.  We must emit this label if it might be used.  */
   if (!do_frame
-      && (!flag_exceptions
+      && (!GCC_OPTION (flag_exceptions)
 	  || targetm_common.except_unwind_info (&global_options) == UI_SJLJ))
     return;
 
@@ -1152,7 +1152,7 @@ dwarf2out_frame_finish (void)
     output_call_frame_info (0);
 
   /* Output another copy for the unwinder.  */
-  if ((flag_unwind_tables || flag_exceptions)
+  if ((GCC_OPTION (flag_unwind_tables) || GCC_OPTION (flag_exceptions))
       && targetm_common.except_unwind_info (&global_options) == UI_DWARF2)
     output_call_frame_info (1);
 }
@@ -1501,7 +1501,7 @@ loc_list_plus_const (dw_loc_list_ref list_head, HOST_WIDE_INT offset)
 }
 
 #define DWARF_REF_SIZE	\
-  (dwarf_version == 2 ? DWARF2_ADDR_SIZE : DWARF_OFFSET_SIZE)
+  (GCC_OPTION (dwarf_version) == 2 ? DWARF2_ADDR_SIZE : DWARF_OFFSET_SIZE)
 
 static unsigned long int get_base_type_offset (dw_die_ref);
 
@@ -2453,7 +2453,7 @@ const struct gcc_debug_hooks dwarf2_debug_hooks =
    remove duplicates.  But not all tools support .debug_types sections
    yet.  */
 
-#define use_debug_types (dwarf_version >= 4 && flag_debug_types_section)
+#define use_debug_types (GCC_OPTION (dwarf_version) >= 4 && GCC_OPTION (flag_debug_types_section))
 
 /* Various DIE's use offsets relative to the beginning of the
    .debug_info section to refer to each other.  */
@@ -2870,7 +2870,7 @@ static GTY (()) vec<macinfo_entry, va_gc> *macinfo_table;
 /* True if .debug_macinfo or .debug_macros section is going to be
    emitted.  */
 #define have_macinfo \
-  (debug_info_level >= DINFO_LEVEL_VERBOSE \
+  (GCC_OPTION (debug_info_level) >= DINFO_LEVEL_VERBOSE \
    && !macinfo_table->is_empty ())
 
 /* Array of dies for which we should generate .debug_ranges info.  */
@@ -3252,10 +3252,10 @@ static inline enum dwarf_location_atom
 dw_addr_op (enum dtprel_bool dtprel)
 {
   if (dtprel == dtprel_true)
-    return (dwarf_split_debug_info ? DW_OP_GNU_const_index
+    return (GCC_OPTION (dwarf_split_debug_info) ? DW_OP_GNU_const_index
             : (DWARF2_ADDR_SIZE == 4 ? DW_OP_const4u : DW_OP_const8u));
   else
-    return dwarf_split_debug_info ? DW_OP_GNU_addr_index : DW_OP_addr;
+    return GCC_OPTION (dwarf_split_debug_info) ? DW_OP_GNU_addr_index : DW_OP_addr;
 }
 
 /* Return a pointer to a newly allocated address location description.  If
@@ -3269,7 +3269,7 @@ new_addr_loc_descr (rtx addr, enum dtprel_bool dtprel)
   ref->dw_loc_oprnd1.val_class = dw_val_class_addr;
   ref->dw_loc_oprnd1.v.val_addr = addr;
   ref->dtprel = dtprel;
-  if (dwarf_split_debug_info)
+  if (GCC_OPTION (dwarf_split_debug_info))
     ref->dw_loc_oprnd1.val_entry
         = add_addr_table_entry (addr,
                                 dtprel ? ate_kind_rtx_dtprel : ate_kind_rtx);
@@ -3307,7 +3307,7 @@ new_addr_loc_descr (rtx addr, enum dtprel_bool dtprel)
 #endif
 #ifndef DEBUG_MACINFO_SECTION
 #define DEBUG_MACINFO_SECTION                                           \
-  (!dwarf_split_debug_info                                              \
+  (!GCC_OPTION (dwarf_split_debug_info)                                              \
    ? (DEBUG_NORM_MACINFO_SECTION) : (DEBUG_DWO_MACINFO_SECTION))
 #endif
 #ifndef DEBUG_NORM_MACRO_SECTION
@@ -3318,7 +3318,7 @@ new_addr_loc_descr (rtx addr, enum dtprel_bool dtprel)
 #endif
 #ifndef DEBUG_MACRO_SECTION
 #define DEBUG_MACRO_SECTION                                             \
-  (!dwarf_split_debug_info                                              \
+  (!GCC_OPTION (dwarf_split_debug_info)                                              \
    ? (DEBUG_NORM_MACRO_SECTION) : (DEBUG_DWO_MACRO_SECTION))
 #endif
 #ifndef DEBUG_LINE_SECTION
@@ -3335,19 +3335,19 @@ new_addr_loc_descr (rtx addr, enum dtprel_bool dtprel)
 #endif
 #ifndef DEBUG_PUBNAMES_SECTION
 #define DEBUG_PUBNAMES_SECTION	\
-  ((debug_generate_pub_sections == 2) \
+  ((GCC_OPTION (debug_generate_pub_sections) == 2) \
    ? ".debug_gnu_pubnames" : ".debug_pubnames")
 #endif
 #ifndef DEBUG_PUBTYPES_SECTION
 #define DEBUG_PUBTYPES_SECTION	\
-  ((debug_generate_pub_sections == 2) \
+  ((GCC_OPTION (debug_generate_pub_sections) == 2) \
    ? ".debug_gnu_pubtypes" : ".debug_pubtypes")
 #endif
 #define DEBUG_NORM_STR_OFFSETS_SECTION ".debug_str_offsets"
 #define DEBUG_DWO_STR_OFFSETS_SECTION ".debug_str_offsets.dwo"
 #ifndef DEBUG_STR_OFFSETS_SECTION
 #define DEBUG_STR_OFFSETS_SECTION                                       \
-  (!dwarf_split_debug_info                                              \
+  (!GCC_OPTION (dwarf_split_debug_info)                                              \
    ? (DEBUG_NORM_STR_OFFSETS_SECTION) : (DEBUG_DWO_STR_OFFSETS_SECTION))
 #endif
 #ifndef DEBUG_STR_DWO_SECTION
@@ -3367,11 +3367,11 @@ new_addr_loc_descr (rtx addr, enum dtprel_bool dtprel)
 
 /* Section flags for .debug_macinfo/.debug_macro section.  */
 #define DEBUG_MACRO_SECTION_FLAGS                                       \
-  (dwarf_split_debug_info ? SECTION_DEBUG | SECTION_EXCLUDE : SECTION_DEBUG)
+  (GCC_OPTION (dwarf_split_debug_info) ? SECTION_DEBUG | SECTION_EXCLUDE : SECTION_DEBUG)
 
 /* Section flags for .debug_str section.  */
 #define DEBUG_STR_SECTION_FLAGS                                 \
-  (HAVE_GAS_SHF_MERGE && flag_merge_debug_strings               \
+  (HAVE_GAS_SHF_MERGE && GCC_OPTION (flag_merge_debug_strings)               \
    ? SECTION_DEBUG | SECTION_MERGE | SECTION_STRINGS | 1        \
    : SECTION_DEBUG)
 
@@ -3822,7 +3822,7 @@ add_AT_low_high_pc (dw_die_ref die, const char *lbl_low, const char *lbl_high,
   attr.dw_attr = DW_AT_low_pc;
   attr.dw_attr_val.val_class = dw_val_class_lbl_id;
   attr.dw_attr_val.v.val_lbl_id = lbl_id;
-  if (dwarf_split_debug_info && !force_direct)
+  if (GCC_OPTION (dwarf_split_debug_info) && !force_direct)
     attr.dw_attr_val.val_entry
         = add_addr_table_entry (lbl_id, ate_kind_label);
   else
@@ -3830,14 +3830,14 @@ add_AT_low_high_pc (dw_die_ref die, const char *lbl_low, const char *lbl_high,
   add_dwarf_attr (die, &attr);
 
   attr.dw_attr = DW_AT_high_pc;
-  if (dwarf_version < 4)
+  if (GCC_OPTION (dwarf_version) < 4)
     attr.dw_attr_val.val_class = dw_val_class_lbl_id;
   else
     attr.dw_attr_val.val_class = dw_val_class_high_pc;
   lbl_id = xstrdup (lbl_high);
   attr.dw_attr_val.v.val_lbl_id = lbl_id;
   if (attr.dw_attr_val.val_class == dw_val_class_lbl_id
-      && dwarf_split_debug_info && !force_direct)
+      && GCC_OPTION (dwarf_split_debug_info) && !force_direct)
     attr.dw_attr_val.val_entry
         = add_addr_table_entry (lbl_id, ate_kind_label);
   else
@@ -3936,7 +3936,7 @@ set_indirect_string (struct indirect_string_node *node)
   ++dw2_string_counter;
   node->label = xstrdup (label);
 
-  if (!dwarf_split_debug_info)
+  if (!GCC_OPTION (dwarf_split_debug_info))
     {
       node->form = DW_FORM_strp;
       node->index = NOT_INDEXED;
@@ -4194,7 +4194,7 @@ add_addr_table_entry (void *addr, enum ate_kind kind)
   addr_table_entry finder;
   void **slot;
 
-  gcc_assert (dwarf_split_debug_info);
+  gcc_assert (GCC_OPTION (dwarf_split_debug_info));
   if (! addr_index_table)
     addr_index_table = htab_create_ggc (10, addr_table_entry_do_hash,
                                         addr_table_entry_eq, NULL);
@@ -4224,7 +4224,7 @@ remove_addr_table_entry (addr_table_entry *entry)
 {
   addr_table_entry *node;
 
-  gcc_assert (dwarf_split_debug_info && addr_index_table);
+  gcc_assert (GCC_OPTION (dwarf_split_debug_info) && addr_index_table);
   node = (addr_table_entry *) htab_find (addr_index_table, entry);
   /* After an index is assigned, the table is frozen.  */
   gcc_assert (node->refcount > 0 && node->index == NO_INDEX_ASSIGNED);
@@ -4282,7 +4282,7 @@ add_AT_addr (dw_die_ref die, enum dwarf_attribute attr_kind, rtx addr,
   attr.dw_attr = attr_kind;
   attr.dw_attr_val.val_class = dw_val_class_addr;
   attr.dw_attr_val.v.val_addr = addr;
-  if (dwarf_split_debug_info && !force_direct)
+  if (GCC_OPTION (dwarf_split_debug_info) && !force_direct)
     attr.dw_attr_val.val_entry = add_addr_table_entry (addr, ate_kind_rtx);
   else
     attr.dw_attr_val.val_entry = NULL;
@@ -4350,7 +4350,7 @@ add_AT_lbl_id (dw_die_ref die, enum dwarf_attribute attr_kind,
   attr.dw_attr_val.val_class = dw_val_class_lbl_id;
   attr.dw_attr_val.val_entry = NULL;
   attr.dw_attr_val.v.val_lbl_id = xstrdup (lbl_id);
-  if (dwarf_split_debug_info)
+  if (GCC_OPTION (dwarf_split_debug_info))
     attr.dw_attr_val.val_entry
         = add_addr_table_entry (attr.dw_attr_val.v.val_lbl_id,
                                 ate_kind_label);
@@ -4423,7 +4423,7 @@ add_AT_range_list (dw_die_ref die, enum dwarf_attribute attr_kind,
   /* For the range_list attribute, use val_entry to store whether the
      offset should follow split-debug-info or normal semantics.  This
      value is read in output_range_list_offset.  */
-  if (dwarf_split_debug_info && !force_direct)
+  if (GCC_OPTION (dwarf_split_debug_info) && !force_direct)
     attr.dw_attr_val.val_entry = UNRELOCATED_OFFSET;
   else
     attr.dw_attr_val.val_entry = RELOCATED_OFFSET;
@@ -7583,7 +7583,7 @@ dwarf2_build_local_stub (external_ref **slot, dw_die_ref data)
 {
   struct external_ref *ref_p = *slot;
 
-  if (ref_p->stub == NULL && ref_p->n_refs > 1 && !dwarf_strict)
+  if (ref_p->stub == NULL && ref_p->n_refs > 1 && !GCC_OPTION (dwarf_strict))
     {
       /* We have multiple references to this type, so build a small stub.
 	 Both of these forms are a bit dodgy from the perspective of the
@@ -7743,7 +7743,7 @@ size_of_die (dw_die_ref die)
       switch (AT_class (a))
 	{
 	case dw_val_class_addr:
-          if (dwarf_split_debug_info && AT_index (a) != NOT_INDEXED)
+          if (GCC_OPTION (dwarf_split_debug_info) && AT_index (a) != NOT_INDEXED)
             {
               gcc_assert (AT_index (a) != NO_INDEX_ASSIGNED);
               size += size_of_uleb128 (AT_index (a));
@@ -7759,7 +7759,7 @@ size_of_die (dw_die_ref die)
 	    unsigned long lsize = size_of_locs (AT_loc (a));
 
 	    /* Block length.  */
-	    if (dwarf_version >= 4)
+	    if (GCC_OPTION (dwarf_version) >= 4)
 	      size += size_of_uleb128 (lsize);
 	    else
 	      size += constant_size (lsize);
@@ -7767,7 +7767,7 @@ size_of_die (dw_die_ref die)
 	  }
 	  break;
 	case dw_val_class_loc_list:
-          if (dwarf_split_debug_info && AT_index (a) != NOT_INDEXED)
+          if (GCC_OPTION (dwarf_split_debug_info) && AT_index (a) != NOT_INDEXED)
             {
               gcc_assert (AT_index (a) != NO_INDEX_ASSIGNED);
               size += size_of_uleb128 (AT_index (a));
@@ -7784,7 +7784,7 @@ size_of_die (dw_die_ref die)
 	case dw_val_class_unsigned_const:
 	  {
 	    int csize = constant_size (AT_unsigned (a));
-	    if (dwarf_version == 3
+	    if (GCC_OPTION (dwarf_version) == 3
 		&& a->dw_attr == DW_AT_data_member_location
 		&& csize >= 4)
 	      size += size_of_uleb128 (AT_unsigned (a));
@@ -7804,7 +7804,7 @@ size_of_die (dw_die_ref die)
 		    * a->dw_attr_val.v.val_vec.elt_size; /* block */
 	  break;
 	case dw_val_class_flag:
-	  if (dwarf_version >= 4)
+	  if (GCC_OPTION (dwarf_version) >= 4)
 	    /* Currently all add_AT_flag calls pass in 1 as last argument,
 	       so DW_FORM_flag_present can be used.  If that ever changes,
 	       we'll need to use DW_FORM_flag and have some optimization
@@ -7824,7 +7824,7 @@ size_of_die (dw_die_ref die)
 		 it's always sized as an offset.  */
 	      if (use_debug_types)
 		size += DWARF_TYPE_SIGNATURE_SIZE;
-	      else if (dwarf_version == 2)
+	      else if (GCC_OPTION (dwarf_version) == 2)
 		size += DWARF2_ADDR_SIZE;
 	      else
 		size += DWARF_OFFSET_SIZE;
@@ -7836,7 +7836,7 @@ size_of_die (dw_die_ref die)
 	  size += DWARF_OFFSET_SIZE;
 	  break;
 	case dw_val_class_lbl_id:
-          if (dwarf_split_debug_info && AT_index (a) != NOT_INDEXED)
+          if (GCC_OPTION (dwarf_split_debug_info) && AT_index (a) != NOT_INDEXED)
             {
               gcc_assert (AT_index (a) != NO_INDEX_ASSIGNED);
               size += size_of_uleb128 (AT_index (a));
@@ -7988,7 +7988,7 @@ include_pubname_in_output (vec<pubname_entry, va_gc> *table, pubname_entry *p)
   /* By limiting gnu pubnames to definitions only, gold can generate a
      gdb index without entries for declarations, which don't include
      enough information to be useful.  */
-  if (debug_generate_pub_sections == 2 && is_declaration_die (p->die))
+  if (GCC_OPTION (debug_generate_pub_sections) == 2 && is_declaration_die (p->die))
     return false;
 
   if (table == pubname_table)
@@ -8008,7 +8008,7 @@ include_pubname_in_output (vec<pubname_entry, va_gc> *table, pubname_entry *p)
   /* The pubtypes table shouldn't include types that have been
      pruned.  */
   return (p->die->die_offset != 0
-          || !flag_eliminate_unused_debug_types);
+          || !GCC_OPTION (flag_eliminate_unused_debug_types));
 }
 
 /* Return the size of the .debug_pubnames or .debug_pubtypes table
@@ -8020,7 +8020,7 @@ size_of_pubnames (vec<pubname_entry, va_gc> *names)
   unsigned long size;
   unsigned i;
   pubname_ref p;
-  int space_for_flags = (debug_generate_pub_sections == 2) ? 1 : 0;
+  int space_for_flags = (GCC_OPTION (debug_generate_pub_sections) == 2) ? 1 : 0;
 
   size = DWARF_PUBNAMES_HEADER_SIZE;
   FOR_EACH_VEC_ELT (*names, i, p)
@@ -8101,7 +8101,7 @@ value_format (dw_attr_ref a)
 	}
     case dw_val_class_range_list:
     case dw_val_class_loc_list:
-      if (dwarf_version >= 4)
+      if (GCC_OPTION (dwarf_version) >= 4)
 	return DW_FORM_sec_offset;
       /* FALLTHRU */
     case dw_val_class_vms_delta:
@@ -8116,7 +8116,7 @@ value_format (dw_attr_ref a)
 	  gcc_unreachable ();
 	}
     case dw_val_class_loc:
-      if (dwarf_version >= 4)
+      if (GCC_OPTION (dwarf_version) >= 4)
 	return DW_FORM_exprloc;
       switch (constant_size (size_of_locs (AT_loc (a))))
 	{
@@ -8143,11 +8143,11 @@ value_format (dw_attr_ref a)
 	     DW_FORM_data4 or DW_FORM_data8 is a loclistptr, not
 	     constant, so we need to use DW_FORM_udata if we need
 	     a large constant.  */
-	  if (dwarf_version == 3 && a->dw_attr == DW_AT_data_member_location)
+	  if (GCC_OPTION (dwarf_version) == 3 && a->dw_attr == DW_AT_data_member_location)
 	    return DW_FORM_udata;
 	  return DW_FORM_data4;
 	case 8:
-	  if (dwarf_version == 3 && a->dw_attr == DW_AT_data_member_location)
+	  if (GCC_OPTION (dwarf_version) == 3 && a->dw_attr == DW_AT_data_member_location)
 	    return DW_FORM_udata;
 	  return DW_FORM_data8;
 	default:
@@ -8180,7 +8180,7 @@ value_format (dw_attr_ref a)
 	  gcc_unreachable ();
 	}
     case dw_val_class_flag:
-      if (dwarf_version >= 4)
+      if (GCC_OPTION (dwarf_version) >= 4)
 	{
 	  /* Currently all add_AT_flag calls pass in 1 as last argument,
 	     so DW_FORM_flag_present can be used.  If that ever changes,
@@ -8204,7 +8204,7 @@ value_format (dw_attr_ref a)
               ? DW_FORM_addr : DW_FORM_GNU_addr_index);
     case dw_val_class_lineptr:
     case dw_val_class_macptr:
-      return dwarf_version >= 4 ? DW_FORM_sec_offset : DW_FORM_data;
+      return GCC_OPTION (dwarf_version) >= 4 ? DW_FORM_sec_offset : DW_FORM_data;
     case dw_val_class_str:
       return AT_string_form (a);
     case dw_val_class_file:
@@ -8373,7 +8373,7 @@ output_loc_list (dw_loc_list_ref list_head)
 	 in a single range are unlikely very useful.  */
       if (size > 0xffff)
 	continue;
-      if (dwarf_split_debug_info)
+      if (GCC_OPTION (dwarf_split_debug_info))
         {
           dw2_asm_output_data (1, DW_LLE_GNU_start_length_entry,
                                "Location list start/length entry (%s)",
@@ -8414,7 +8414,7 @@ output_loc_list (dw_loc_list_ref list_head)
       output_loc_sequence (curr->expr, -1);
     }
 
-  if (dwarf_split_debug_info)
+  if (GCC_OPTION (dwarf_split_debug_info))
     dw2_asm_output_data (1, DW_LLE_GNU_end_of_list_entry,
                          "Location list terminator (%s)",
                          list_head->ll_symbol);
@@ -8459,7 +8459,7 @@ output_loc_list_offset (dw_attr_ref a)
   char *sym = AT_loc_list (a)->ll_symbol;
 
   gcc_assert (sym);
-  if (dwarf_split_debug_info)
+  if (GCC_OPTION (dwarf_split_debug_info))
     dw2_asm_output_delta (DWARF_OFFSET_SIZE, sym, loc_section_label,
                           "%s", dwarf_attr_name (a->dw_attr));
   else
@@ -8474,7 +8474,7 @@ output_attr_index_or_value (dw_attr_ref a)
 {
   const char *name = dwarf_attr_name (a->dw_attr);
 
-  if (dwarf_split_debug_info && AT_index (a) != NOT_INDEXED)
+  if (GCC_OPTION (dwarf_split_debug_info) && AT_index (a) != NOT_INDEXED)
     {
       dw2_asm_output_data_uleb128 (AT_index (a), "%s", name);
       return;
@@ -8550,7 +8550,7 @@ output_die (dw_die_ref die)
 	  size = size_of_locs (AT_loc (a));
 
 	  /* Output the block length for this list of location operations.  */
-	  if (dwarf_version >= 4)
+	  if (GCC_OPTION (dwarf_version) >= 4)
 	    dw2_asm_output_data_uleb128 (size, "%s", name);
 	  else
 	    dw2_asm_output_data (constant_size (size), size, "%s", name);
@@ -8568,7 +8568,7 @@ output_die (dw_die_ref die)
 	case dw_val_class_unsigned_const:
 	  {
 	    int csize = constant_size (AT_unsigned (a));
-	    if (dwarf_version == 3
+	    if (GCC_OPTION (dwarf_version) == 3
 		&& a->dw_attr == DW_AT_data_member_location
 		&& csize >= 4)
 	      dw2_asm_output_data_uleb128 (AT_unsigned (a), "%s", name);
@@ -8628,7 +8628,7 @@ output_die (dw_die_ref die)
 	  }
 
 	case dw_val_class_flag:
-	  if (dwarf_version >= 4)
+	  if (GCC_OPTION (dwarf_version) >= 4)
 	    {
 	      /* Currently all add_AT_flag calls pass in 1 as last argument,
 		 so DW_FORM_flag_present can be used.  If that ever changes,
@@ -8637,7 +8637,7 @@ output_die (dw_die_ref die)
 		 DW_FORM_flag_present if it is set to 1 in all DIEs using
 		 the same abbrev entry.  */
 	      gcc_assert (AT_flag (a) == 1);
-	      if (flag_debug_asm)
+	      if (GCC_OPTION (flag_debug_asm))
 		fprintf (asm_out_file, "\t\t\t%s %s\n",
 			 ASM_COMMENT_START, name);
 	      break;
@@ -8669,7 +8669,7 @@ output_die (dw_die_ref die)
 		  /* In DWARF2, DW_FORM_ref_addr is sized by target address
 		     length, whereas in DWARF3 it's always sized as an
 		     offset.  */
-		  if (dwarf_version == 2)
+		  if (GCC_OPTION (dwarf_version) == 2)
 		    size = DWARF2_ADDR_SIZE;
 		  else
 		    size = DWARF_OFFSET_SIZE;
@@ -8772,7 +8772,7 @@ output_die (dw_die_ref die)
 static void
 output_compilation_unit_header (void)
 {
-  int ver = dwarf_version;
+  int ver = GCC_OPTION (dwarf_version);
 
   if (DWARF_INITIAL_LENGTH_SIZE - DWARF_OFFSET_SIZE == 4)
     dw2_asm_output_data (4, 0xffffffff,
@@ -8854,10 +8854,10 @@ output_comp_unit (dw_die_ref die, int output_if_empty)
 static inline bool
 want_pubnames (void)
 {
-  if (debug_info_level <= DINFO_LEVEL_TERSE)
+  if (GCC_OPTION (debug_info_level) <= DINFO_LEVEL_TERSE)
     return false;
-  if (debug_generate_pub_sections != -1)
-    return debug_generate_pub_sections;
+  if (GCC_OPTION (debug_generate_pub_sections) != -1)
+    return GCC_OPTION (debug_generate_pub_sections);
   return targetm.want_debug_pub_sections;
 }
 
@@ -8901,7 +8901,7 @@ add_skeleton_AT_string (dw_die_ref die, enum dwarf_attribute attr_kind,
 static void
 add_top_level_skeleton_die_attrs (dw_die_ref die)
 {
-  const char *dwo_file_name = concat (aux_base_name, ".dwo", NULL);
+  const char *dwo_file_name = concat (GCC_OPTION (aux_base_name), ".dwo", NULL);
   const char *comp_dir = comp_dir_string ();
 
   add_skeleton_AT_string (die, DW_AT_GNU_dwo_name, dwo_file_name);
@@ -8955,7 +8955,7 @@ output_skeleton_debug_sections (dw_die_ref comp_unit)
                        - DWARF_INITIAL_LENGTH_SIZE
                        + size_of_die (comp_unit),
                       "Length of Compilation Unit Info");
-  dw2_asm_output_data (2, dwarf_version, "DWARF version number");
+  dw2_asm_output_data (2, GCC_OPTION (dwarf_version), "DWARF version number");
   dw2_asm_output_offset (DWARF_OFFSET_SIZE, debug_skeleton_abbrev_section_label,
                          debug_abbrev_section,
                          "Offset Into Abbrev. Section");
@@ -9002,7 +9002,7 @@ output_comdat_type_unit (comdat_type_node *node)
   calc_die_sizes (node->root_die);
 
 #if defined (OBJECT_FORMAT_ELF)
-  if (!dwarf_split_debug_info)
+  if (!GCC_OPTION (dwarf_split_debug_info))
     secname = ".debug_types";
   else
     secname = ".debug_types.dwo";
@@ -9034,7 +9034,7 @@ output_comdat_type_unit (comdat_type_node *node)
   unmark_dies (node->root_die);
 
 #if defined (OBJECT_FORMAT_ELF)
-  if (dwarf_split_debug_info)
+  if (GCC_OPTION (dwarf_split_debug_info))
     {
       /* Produce the skeleton type-unit header.  */
       const char *secname = ".debug_types";
@@ -9052,7 +9052,7 @@ output_comdat_type_unit (comdat_type_node *node)
                            + size_of_die (get_skeleton_type_unit ())
                            + DWARF_TYPE_SIGNATURE_SIZE + DWARF_OFFSET_SIZE,
                            "Length of Type Unit Info");
-      dw2_asm_output_data (2, dwarf_version, "DWARF version number");
+      dw2_asm_output_data (2, GCC_OPTION (dwarf_version), "DWARF version number");
       dw2_asm_output_offset (DWARF_OFFSET_SIZE,
                              debug_skeleton_abbrev_section_label,
                              debug_abbrev_section,
@@ -9190,7 +9190,7 @@ output_pubname (dw_offset die_offset, pubname_entry *entry)
 
   dw2_asm_output_data (DWARF_OFFSET_SIZE, die_offset, "DIE offset");
 
-  if (debug_generate_pub_sections == 2)
+  if (GCC_OPTION (debug_generate_pub_sections) == 2)
     {
       /* This logic follows gdb's method for determining the value of the flag
          byte.  */
@@ -9268,7 +9268,7 @@ output_pubnames (vec<pubname_entry, va_gc> *names)
   /* Version number for pubnames/pubtypes is independent of dwarf version.  */
   dw2_asm_output_data (2, 2, "DWARF Version");
 
-  if (dwarf_split_debug_info)
+  if (GCC_OPTION (dwarf_split_debug_info))
     dw2_asm_output_offset (DWARF_OFFSET_SIZE, debug_skeleton_info_section_label,
                            debug_skeleton_info_section,
                            "Offset of Compilation Unit Info");
@@ -9344,7 +9344,7 @@ output_aranges (unsigned long aranges_length)
 		       "Length of Address Ranges Info");
   /* Version number for aranges is still 2, even in DWARF3.  */
   dw2_asm_output_data (2, 2, "DWARF Version");
-  if (dwarf_split_debug_info)
+  if (GCC_OPTION (dwarf_split_debug_info))
     dw2_asm_output_offset (DWARF_OFFSET_SIZE, debug_skeleton_info_section_label,
                            debug_skeleton_info_section,
                            "Offset of Compilation Unit Info");
@@ -10018,7 +10018,7 @@ static void
 output_line_info (bool prologue_only)
 {
   char l1[20], l2[20], p1[20], p2[20];
-  int ver = dwarf_version;
+  int ver = GCC_OPTION (dwarf_version);
   bool saw_one = false;
   int opc;
 
@@ -10145,7 +10145,7 @@ base_type_die (tree type)
   switch (TREE_CODE (type))
     {
     case INTEGER_TYPE:
-      if ((dwarf_version >= 4 || !dwarf_strict)
+      if ((GCC_OPTION (dwarf_version) >= 4 || !GCC_OPTION (dwarf_strict))
 	  && TYPE_NAME (type)
 	  && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
 	  && DECL_IS_BUILTIN (TYPE_NAME (type))
@@ -10175,7 +10175,7 @@ base_type_die (tree type)
     case REAL_TYPE:
       if (DECIMAL_FLOAT_MODE_P (TYPE_MODE (type)))
 	{
-	  if (dwarf_version >= 3 || !dwarf_strict)
+	  if (GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict))
 	    encoding = DW_ATE_decimal_float;
 	  else
 	    encoding = DW_ATE_lo_user;
@@ -10185,7 +10185,7 @@ base_type_die (tree type)
       break;
 
     case FIXED_POINT_TYPE:
-      if (!(dwarf_version >= 3 || !dwarf_strict))
+      if (!(GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict)))
 	encoding = DW_ATE_lo_user;
       else if (TYPE_UNSIGNED (type))
 	encoding = DW_ATE_unsigned_fixed;
@@ -10447,7 +10447,7 @@ modified_type_die (tree type, int is_const_type, int is_volatile_type,
     }
   else if (code == REFERENCE_TYPE)
     {
-      if (TYPE_REF_IS_RVALUE (type) && dwarf_version >= 4)
+      if (TYPE_REF_IS_RVALUE (type) && GCC_OPTION (dwarf_version) >= 4)
 	mod_type_die = new_die (DW_TAG_rvalue_reference_type, mod_scope,
 				type);
       else
@@ -10802,7 +10802,7 @@ reg_loc_descriptor (rtx rtl, enum var_init_status initialized)
     {
       dw_loc_descr_ref result = NULL;
 
-      if (dwarf_version >= 4 || !dwarf_strict)
+      if (GCC_OPTION (dwarf_version) >= 4 || !GCC_OPTION (dwarf_strict))
 	{
 	  result = mem_loc_descriptor (rtl, GET_MODE (rtl), VOIDmode,
 				       initialized);
@@ -11108,7 +11108,7 @@ address_of_int_loc_descriptor (int size, HOST_WIDE_INT i)
   int litsize;
   dw_loc_descr_ref loc_result = NULL;
 
-  if (!(dwarf_version >= 4 || !dwarf_strict))
+  if (!(GCC_OPTION (dwarf_version) >= 4 || !GCC_OPTION (dwarf_strict)))
     return NULL;
 
   litsize = size_of_int_loc_descriptor (i);
@@ -11197,7 +11197,7 @@ based_loc_descr (rtx reg, HOST_WIDE_INT offset,
 #endif
   regno = DWARF_FRAME_REGNUM (regno);
 
-  if (!optimize && fde
+  if (!GCC_OPTION (optimize) && fde
       && (fde->drap_reg == regno || fde->vdrap_reg == regno))
     {
       /* Use cfa+offset to represent the location of arguments passed
@@ -11468,7 +11468,7 @@ scompare_loc_descriptor (enum dwarf_location_atom op, rtx rtl,
   if (op_mode == VOIDmode)
     return NULL;
 
-  if (dwarf_strict
+  if (GCC_OPTION (dwarf_strict)
       && (GET_MODE_CLASS (op_mode) != MODE_INT
 	  || GET_MODE_SIZE (op_mode) > DWARF2_ADDR_SIZE))
     return NULL;
@@ -11579,7 +11579,7 @@ ucompare_loc_descriptor (enum dwarf_location_atom op, rtx rtl,
   if (GET_MODE_CLASS (op_mode) != MODE_INT)
     return NULL;
 
-  if (dwarf_strict && GET_MODE_SIZE (op_mode) > DWARF2_ADDR_SIZE)
+  if (GCC_OPTION (dwarf_strict) && GET_MODE_SIZE (op_mode) > DWARF2_ADDR_SIZE)
     return NULL;
 
   op0 = mem_loc_descriptor (XEXP (rtl, 0), op_mode, mem_mode,
@@ -11642,7 +11642,7 @@ minmax_loc_descriptor (rtx rtl, enum machine_mode mode,
   dw_loc_descr_ref op0, op1, ret;
   dw_loc_descr_ref bra_node, drop_node;
 
-  if (dwarf_strict
+  if (GCC_OPTION (dwarf_strict)
       && (GET_MODE_CLASS (mode) != MODE_INT
 	  || GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE))
     return NULL;
@@ -12125,7 +12125,7 @@ parameter_ref_descriptor (rtx rtl)
   dw_loc_descr_ref ret;
   dw_die_ref ref;
 
-  if (dwarf_strict)
+  if (GCC_OPTION (dwarf_strict))
     return NULL;
   gcc_assert (TREE_CODE (DEBUG_PARAMETER_REF_DECL (rtl)) == PARM_DECL);
   ref = lookup_decl_die (DEBUG_PARAMETER_REF_DECL (rtl));
@@ -12217,7 +12217,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
 					       mem_mode, initialized);
 	  break;
 	}
-      if (dwarf_strict)
+      if (GCC_OPTION (dwarf_strict))
 	break;
       if (GET_MODE_SIZE (mode) > GET_MODE_SIZE (GET_MODE (inner)))
 	break;
@@ -12267,7 +12267,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
 	  dw_die_ref type_die;
 	  unsigned int dbx_regnum;
 
-	  if (dwarf_strict)
+	  if (GCC_OPTION (dwarf_strict))
 	    break;
 	  if (REGNO (rtl) > FIRST_PSEUDO_REGISTER)
 	    break;
@@ -12351,7 +12351,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
 	  add_loc_descr (&mem_loc_result, int_loc_descriptor (shift));
 	  add_loc_descr (&mem_loc_result, new_loc_descr (op, 0, 0));
 	}
-      else if (!dwarf_strict)
+      else if (!GCC_OPTION (dwarf_strict))
 	{
 	  dw_die_ref type_die1, type_die2;
 	  dw_loc_descr_ref cvt;
@@ -12401,7 +12401,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
 	      dw_die_ref type_die;
 	      dw_loc_descr_ref deref;
 
-	      if (dwarf_strict)
+	      if (GCC_OPTION (dwarf_strict))
 		return NULL;
 	      type_die
 		= base_type_for_mode (mode, GET_MODE_CLASS (mode) == MODE_INT);
@@ -12473,7 +12473,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
       return 0;
 
     case ENTRY_VALUE:
-      if (dwarf_strict)
+      if (GCC_OPTION (dwarf_strict))
 	return NULL;
       if (REG_P (ENTRY_VALUE_EXP (rtl)))
 	{
@@ -12573,7 +12573,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
       goto do_binop;
 
     case DIV:
-      if (!dwarf_strict
+      if (!GCC_OPTION (dwarf_strict)
 	  && GET_MODE_CLASS (mode) == MODE_INT
 	  && GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE)
 	{
@@ -12651,7 +12651,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
       break;
 
     case MOD:
-      if (GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE && !dwarf_strict)
+      if (GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE && !GCC_OPTION (dwarf_strict))
 	{
 	  mem_loc_result = typed_binop (DW_OP_mod, rtl,
 					base_type_for_mode (mode, 0),
@@ -12677,7 +12677,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
       break;
 
     case UDIV:
-      if (!dwarf_strict && GET_MODE_CLASS (mode) == MODE_INT)
+      if (!GCC_OPTION (dwarf_strict) && GET_MODE_CLASS (mode) == MODE_INT)
 	{
 	  if (GET_MODE_CLASS (mode) > DWARF2_ADDR_SIZE)
 	    {
@@ -12725,7 +12725,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
 	  mem_loc_result = int_loc_descriptor (INTVAL (rtl));
 	  break;
 	}
-      if (!dwarf_strict
+      if (!GCC_OPTION (dwarf_strict)
 	  && (GET_MODE_BITSIZE (mode) == HOST_BITS_PER_WIDE_INT
 	      || GET_MODE_BITSIZE (mode) == HOST_BITS_PER_DOUBLE_INT))
 	{
@@ -12769,7 +12769,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
       break;
 
     case CONST_DOUBLE:
-      if (!dwarf_strict)
+      if (!GCC_OPTION (dwarf_strict))
 	{
 	  dw_die_ref type_die;
 
@@ -12936,7 +12936,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
     case UNSIGNED_FLOAT:
     case FIX:
     case UNSIGNED_FIX:
-      if (!dwarf_strict)
+      if (!GCC_OPTION (dwarf_strict))
 	{
 	  dw_die_ref type_die;
 	  dw_loc_descr_ref cvt;
@@ -13134,7 +13134,7 @@ implicit_ptr_descriptor (rtx rtl, HOST_WIDE_INT offset)
   dw_loc_descr_ref ret;
   dw_die_ref ref;
 
-  if (dwarf_strict)
+  if (GCC_OPTION (dwarf_strict))
     return NULL;
   gcc_assert (TREE_CODE (DEBUG_IMPLICIT_PTR_DECL (rtl)) == VAR_DECL
 	      || TREE_CODE (DEBUG_IMPLICIT_PTR_DECL (rtl)) == PARM_DECL
@@ -13268,7 +13268,7 @@ loc_descriptor (rtx rtl, enum machine_mode mode,
       if (mode == VOIDmode)
 	mode = GET_MODE (rtl);
 
-      if (mode != VOIDmode && (dwarf_version >= 4 || !dwarf_strict))
+      if (mode != VOIDmode && (GCC_OPTION (dwarf_version) >= 4 || !GCC_OPTION (dwarf_strict)))
 	{
 	  gcc_assert (mode == GET_MODE (rtl) || VOIDmode == GET_MODE (rtl));
 
@@ -13303,7 +13303,7 @@ loc_descriptor (rtx rtl, enum machine_mode mode,
       if (mode == VOIDmode)
 	mode = GET_MODE (rtl);
 
-      if (mode != VOIDmode && (dwarf_version >= 4 || !dwarf_strict))
+      if (mode != VOIDmode && (GCC_OPTION (dwarf_version) >= 4 || !GCC_OPTION (dwarf_strict)))
 	{
 	  unsigned int elt_size = GET_MODE_UNIT_SIZE (GET_MODE (rtl));
 	  unsigned int length = CONST_VECTOR_NUNITS (rtl);
@@ -13367,7 +13367,7 @@ loc_descriptor (rtx rtl, enum machine_mode mode,
 	break;
     case LABEL_REF:
       if (mode != VOIDmode && GET_MODE_SIZE (mode) == DWARF2_ADDR_SIZE
-	  && (dwarf_version >= 4 || !dwarf_strict))
+	  && (GCC_OPTION (dwarf_version) >= 4 || !GCC_OPTION (dwarf_strict)))
 	{
          loc_result = new_addr_loc_descr (rtl, dtprel_false);
 	  add_loc_descr (&loc_result, new_loc_descr (DW_OP_stack_value, 0, 0));
@@ -13392,8 +13392,8 @@ loc_descriptor (rtx rtl, enum machine_mode mode,
     default:
       if ((GET_MODE_CLASS (mode) == MODE_INT && GET_MODE (rtl) == mode
 	   && GET_MODE_SIZE (GET_MODE (rtl)) <= DWARF2_ADDR_SIZE
-	   && dwarf_version >= 4)
-	  || (!dwarf_strict && mode != VOIDmode && mode != BLKmode))
+	   && GCC_OPTION (dwarf_version) >= 4)
+	  || (!GCC_OPTION (dwarf_strict) && mode != VOIDmode && mode != BLKmode))
 	{
 	  /* Value expression.  */
 	  loc_result = mem_loc_descriptor (rtl, mode, VOIDmode, initialized);
@@ -13503,7 +13503,7 @@ dw_loc_list_1 (tree loc, rtx varloc, int want_address,
     return 0;
 
   if (want_address == 2 && !have_address
-      && (dwarf_version >= 4 || !dwarf_strict))
+      && (GCC_OPTION (dwarf_version) >= 4 || !GCC_OPTION (dwarf_strict)))
     {
       if (int_size_in_bytes (TREE_TYPE (loc)) > DWARF2_ADDR_SIZE)
 	{
@@ -13553,7 +13553,7 @@ new_loc_descr_op_bit_piece (HOST_WIDE_INT bitsize, HOST_WIDE_INT offset)
 {
   if ((bitsize % BITS_PER_UNIT) == 0 && offset == 0)
     return new_loc_descr (DW_OP_piece, bitsize / BITS_PER_UNIT, 0);
-  else if (dwarf_version >= 3 || !dwarf_strict)
+  else if (GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict))
     return new_loc_descr (DW_OP_bit_piece, bitsize, offset);
   else
     return NULL;
@@ -13978,7 +13978,7 @@ loc_list_for_address_of_addr_expr_of_indirect_ref (tree loc, bool toplev)
     list_ret = loc_list_from_tree (TREE_OPERAND (obj, 0), toplev ? 2 : 1);
   else if (toplev
 	   && int_size_in_bytes (TREE_TYPE (loc)) <= DWARF2_ADDR_SIZE
-	   && (dwarf_version >= 4 || !dwarf_strict))
+	   && (GCC_OPTION (dwarf_version) >= 4 || !GCC_OPTION (dwarf_strict)))
     {
       list_ret = loc_list_from_tree (TREE_OPERAND (obj, 0), 0);
       if (!list_ret)
@@ -14107,7 +14107,7 @@ loc_list_from_tree (tree loc, int want_address)
 	  else
 	    {
 	      if (!targetm.emutls.debug_form_tls_address
-		  || !(dwarf_version >= 3 || !dwarf_strict))
+		  || !(GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict)))
 		return 0;
 	      /* We stuffed the control variable into the DECL_VALUE_EXPR
 		 to signal (via DECL_HAS_VALUE_EXPR_P) that the decl should
@@ -14534,7 +14534,7 @@ loc_list_from_tree (tree loc, int want_address)
     return 0;
 
   if (want_address == 2 && !have_address
-      && (dwarf_version >= 4 || !dwarf_strict))
+      && (GCC_OPTION (dwarf_version) >= 4 || !GCC_OPTION (dwarf_strict)))
     {
       if (int_size_in_bytes (TREE_TYPE (loc)) > DWARF2_ADDR_SIZE)
 	{
@@ -14827,12 +14827,12 @@ add_accessibility_attribute (dw_die_ref die, tree decl)
     add_AT_unsigned (die, DW_AT_accessibility, DW_ACCESS_protected);
   else if (TREE_PRIVATE (decl))
     {
-      if (dwarf_version == 2
+      if (GCC_OPTION (dwarf_version) == 2
 	  || die->die_parent == NULL
 	  || die->die_parent->die_tag != DW_TAG_class_type)
 	add_AT_unsigned (die, DW_AT_accessibility, DW_ACCESS_private);
     }
-  else if (dwarf_version > 2
+  else if (GCC_OPTION (dwarf_version) > 2
 	   && die->die_parent
 	   && die->die_parent->die_tag == DW_TAG_class_type)
     add_AT_unsigned (die, DW_AT_accessibility, DW_ACCESS_public);
@@ -14912,7 +14912,7 @@ add_data_member_location_attribute (dw_die_ref die, tree decl)
 
   if (! loc_descr)
     {
-      if (dwarf_version > 2)
+      if (GCC_OPTION (dwarf_version) > 2)
 	{
 	  /* Don't need to output a location expression, just the constant. */
 	  if (offset < 0)
@@ -15093,7 +15093,7 @@ add_const_value_attribute (dw_die_ref die, rtx rtl)
       return true;
 
     case CONST_STRING:
-      if (dwarf_version >= 4 || !dwarf_strict)
+      if (GCC_OPTION (dwarf_version) >= 4 || !GCC_OPTION (dwarf_strict))
 	{
 	  dw_loc_descr_ref loc_result;
 	  resolve_one_addr (&rtl, NULL);
@@ -15114,7 +15114,7 @@ add_const_value_attribute (dw_die_ref die, rtx rtl)
       if (!const_ok_for_output (rtl))
 	return false;
     case LABEL_REF:
-      if (dwarf_version >= 4 || !dwarf_strict)
+      if (GCC_OPTION (dwarf_version) >= 4 || !GCC_OPTION (dwarf_strict))
 	goto rtl_addr;
       return false;
 
@@ -16160,7 +16160,7 @@ lower_bound_default (void)
     case DW_LANG_UPC:
     case DW_LANG_D:
     case DW_LANG_Python:
-      return dwarf_version >= 4 ? 0 : -1;
+      return GCC_OPTION (dwarf_version) >= 4 ? 0 : -1;
     case DW_LANG_Ada95:
     case DW_LANG_Ada83:
     case DW_LANG_Cobol74:
@@ -16168,7 +16168,7 @@ lower_bound_default (void)
     case DW_LANG_Pascal83:
     case DW_LANG_Modula2:
     case DW_LANG_PLI:
-      return dwarf_version >= 4 ? 1 : -1;
+      return GCC_OPTION (dwarf_version) >= 4 ? 1 : -1;
     default:
       return -1;
     }
@@ -16545,7 +16545,7 @@ add_pure_or_virtual_attribute (dw_die_ref die, tree func_decl)
 				   0));
 
       /* GNU extension: Record what type this method came from originally.  */
-      if (debug_info_level > DINFO_LEVEL_TERSE
+      if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE
 	  && DECL_CONTEXT (func_decl))
 	add_AT_die_ref (die, DW_AT_containing_type,
 			lookup_type_die (DECL_CONTEXT (func_decl)));
@@ -16565,7 +16565,7 @@ add_linkage_attr (dw_die_ref die, tree decl)
   if (name[0] == '*')
     name = &name[1];
 
-  if (dwarf_version >= 4)
+  if (GCC_OPTION (dwarf_version) >= 4)
     add_AT_string (die, DW_AT_linkage_name, name);
   else
     add_AT_string (die, DW_AT_MIPS_linkage_name, name);
@@ -16590,7 +16590,7 @@ add_src_coords_attributes (dw_die_ref die, tree decl)
 static void
 add_linkage_name (dw_die_ref die, tree decl)
 {
-  if (debug_info_level > DINFO_LEVEL_TERSE
+  if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE
       && (TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == VAR_DECL)
       && TREE_PUBLIC (decl)
       && !DECL_ABSTRACT (decl)
@@ -16746,7 +16746,7 @@ scope_die_for (tree t, dw_die_ref context_die)
     {
       if (context_die == lookup_decl_die (containing_scope))
 	/* OK */;
-      else if (debug_info_level > DINFO_LEVEL_TERSE)
+      else if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
 	context_die = get_context_die (containing_scope);
       else
 	containing_scope = NULL_TREE;
@@ -16770,7 +16770,7 @@ scope_die_for (tree t, dw_die_ref context_die)
   else if (TYPE_P (containing_scope))
     {
       /* For types, we can just look up the appropriate DIE.  */
-      if (debug_info_level > DINFO_LEVEL_TERSE)
+      if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
 	scope_die = get_context_die (containing_scope);
       else
 	{
@@ -16877,7 +16877,7 @@ add_calling_convention_attribute (dw_die_ref subr_die, tree decl)
 	rely on the old way, which we thus keep.  */
       value = DW_CC_program;
 
-      if (dwarf_version >= 4 || !dwarf_strict)
+      if (GCC_OPTION (dwarf_version) >= 4 || !GCC_OPTION (dwarf_strict))
 	add_AT_flag (subr_die, DW_AT_main_subprogram, 1);
     }
 
@@ -17284,7 +17284,7 @@ record_type_tag (tree type)
       return DW_TAG_class_type;
 
     case RECORD_IS_INTERFACE:
-      if (dwarf_version >= 3 || !dwarf_strict)
+      if (GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict))
 	return DW_TAG_interface_type;
       return DW_TAG_structure_type;
 
@@ -17309,7 +17309,7 @@ gen_enumeration_type_die (tree type, dw_die_ref context_die)
 			  scope_die_for (type, context_die), type);
       equate_type_number_to_die (type, type_die);
       add_name_attribute (type_die, type_tag (type));
-      if (dwarf_version >= 4 || !dwarf_strict)
+      if (GCC_OPTION (dwarf_version) >= 4 || !GCC_OPTION (dwarf_strict))
 	{
 	  if (ENUM_IS_SCOPED (type))
 	    add_AT_flag (type_die, DW_AT_enum_class, 1);
@@ -17552,7 +17552,7 @@ gen_formal_types_die (tree function_or_method_type, dw_die_ref context_die)
 	  && link == first_parm_type)
 	{
 	  add_AT_flag (parm_die, DW_AT_artificial, 1);
-	  if (dwarf_version >= 3 || !dwarf_strict)
+	  if (GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict))
 	    add_AT_die_ref (context_die, DW_AT_object_pointer, parm_die);
 	}
       else if (arg && DECL_ARTIFICIAL (arg))
@@ -17787,7 +17787,7 @@ dwarf2out_abstract_function (tree decl)
 
   /* Be sure we've emitted the in-class declaration DIE (if any) first, so
      we don't get confused by DECL_ABSTRACT.  */
-  if (debug_info_level > DINFO_LEVEL_TERSE)
+  if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
     {
       context = decl_class_context (decl);
       if (context)
@@ -17955,7 +17955,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
   if (!declaration && !origin && !old_die
       && DECL_CONTEXT (decl) && TYPE_P (DECL_CONTEXT (decl))
       && !class_or_namespace_scope_p (context_die)
-      && debug_info_level > DINFO_LEVEL_TERSE)
+      && GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
     old_die = force_decl_die (decl);
 
   if (origin != NULL)
@@ -18028,7 +18028,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
 
 	  /* If the prototype had an 'auto' or 'decltype(auto)' return type,
 	     emit the real type on the definition die.  */
-	  if (is_cxx() && debug_info_level > DINFO_LEVEL_TERSE)
+	  if (is_cxx() && GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
 	    {
 	      dw_die_ref die = get_AT_ref (old_die, DW_AT_type);
 	      if (die == auto_die || die == decltype_auto_die)
@@ -18046,7 +18046,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
 
       add_name_and_src_coords_attributes (subr_die, decl);
       add_pubname (decl, subr_die);
-      if (debug_info_level > DINFO_LEVEL_TERSE)
+      if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
 	{
 	  add_prototyped_attribute (subr_die, TREE_TYPE (decl));
 	  add_type_attribute (subr_die, TREE_TYPE (TREE_TYPE (decl)),
@@ -18069,7 +18069,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
 	  /* If this is an explicit function declaration then generate
 	     a DW_AT_explicit attribute.  */
 	  if (lang_hooks.decls.function_decl_explicit_p (decl)
-	      && (dwarf_version >= 3 || !dwarf_strict))
+	      && (GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict)))
 	    add_AT_flag (subr_die, DW_AT_explicit, 1);
 
 	  /* The first time we see a member function, it is in the context of
@@ -18114,7 +18114,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
 	equate_decl_number_to_die (decl, subr_die);
 
       gcc_checking_assert (fun);
-      if (!flag_reorder_blocks_and_partition)
+      if (!GCC_OPTION (flag_reorder_blocks_and_partition))
 	{
 	  dw_fde_ref fde = fun->fde;
 	  if (fde->dw_fde_begin)
@@ -18168,7 +18168,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
 
 	  if (fde->dw_fde_second_begin)
 	    {
-	      if (dwarf_version >= 3 || !dwarf_strict)
+	      if (GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict))
 		{
 		  /* We should use ranges for non-contiguous code section 
 		     addresses.  Use the actual code range for the initial
@@ -18245,7 +18245,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
 	 (3) We can at least reuse the code inspection and interpretation
 	 code that determines the CFA position at various points in the
 	 function.  */
-      if (dwarf_version >= 3 && targetm.debug_unwind_info () == UI_DWARF2)
+      if (GCC_OPTION (dwarf_version) >= 3 && targetm.debug_unwind_info () == UI_DWARF2)
 	{
 	  dw_loc_descr_ref op = new_loc_descr (DW_OP_call_frame_cfa, 0, 0);
 	  add_AT_loc (subr_die, DW_AT_frame_base, op);
@@ -18272,7 +18272,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
     }
 
   /* Generate child dies for template paramaters.  */
-  if (debug_info_level > DINFO_LEVEL_TERSE)
+  if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
     gen_generic_params_dies (decl);
 
   /* Now output descriptions of the arguments for this function. This gets
@@ -18288,7 +18288,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
   /* In the case where we are describing a mere function declaration, all we
      need to do here (and all we *can* do here) is to describe the *types* of
      its formal parameters.  */
-  if (debug_info_level <= DINFO_LEVEL_TERSE)
+  if (GCC_OPTION (debug_info_level) <= DINFO_LEVEL_TERSE)
     ;
   else if (declaration)
     gen_formal_types_die (decl, subr_die);
@@ -18333,7 +18333,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
 	      if (parm == DECL_ARGUMENTS (decl)
 		  && TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE
 		  && parm_die
-		  && (dwarf_version >= 3 || !dwarf_strict))
+		  && (GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict)))
 		add_AT_die_ref (subr_die, DW_AT_object_pointer, parm_die);
 
 	      parm = DECL_CHAIN (parm);
@@ -18389,7 +18389,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
       current_function_has_inlines = 0;
       decls_for_scope (outer_scope, subr_die, 0);
 
-      if (call_arg_locations && !dwarf_strict)
+      if (call_arg_locations && !GCC_OPTION (dwarf_strict))
 	{
 	  struct call_arg_loc_node *ca_loc;
 	  for (ca_loc = call_arg_locations; ca_loc; ca_loc = ca_loc->next)
@@ -18527,7 +18527,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
       call_arg_loc_last = NULL;
       if (tail_call_site_count >= 0
 	  && tail_call_site_count == tail_call_site_note_count
-	  && !dwarf_strict)
+	  && !GCC_OPTION (dwarf_strict))
 	{
 	  if (call_site_count >= 0
 	      && call_site_count == call_site_note_count)
@@ -18883,7 +18883,7 @@ add_call_src_coords_attributes (tree stmt, dw_die_ref die)
 {
   expanded_location s = expand_location (BLOCK_SOURCE_LOCATION (stmt));
 
-  if (dwarf_version >= 3 || !dwarf_strict)
+  if (GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict))
     {
       add_AT_file (die, DW_AT_call_file, lookup_filename (s.file));
       add_AT_unsigned (die, DW_AT_call_line, s.line);
@@ -18900,7 +18900,7 @@ add_high_low_attributes (tree stmt, dw_die_ref die)
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
   if (BLOCK_FRAGMENT_CHAIN (stmt)
-      && (dwarf_version >= 3 || !dwarf_strict))
+      && (GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict)))
     {
       tree chain, superblock = NULL_TREE;
       dw_die_ref pdie;
@@ -19108,7 +19108,7 @@ gen_reference_type_die (tree type, dw_die_ref context_die)
 {
   dw_die_ref ref_die, scope_die = scope_die_for (type, context_die);
 
-  if (TYPE_REF_IS_RVALUE (type) && dwarf_version >= 4)
+  if (TYPE_REF_IS_RVALUE (type) && GCC_OPTION (dwarf_version) >= 4)
     ref_die = new_die (DW_TAG_rvalue_reference_type, scope_die, type);
   else
     ref_die = new_die (DW_TAG_reference_type, scope_die, type);
@@ -19149,10 +19149,10 @@ gen_producer_string (void)
   const char *language_string = lang_hooks.name;
   char *producer, *tail;
   const char *p;
-  size_t len = dwarf_record_gcc_switches ? 0 : 3;
+  size_t len = GCC_OPTION (dwarf_record_gcc_switches) ? 0 : 3;
   size_t plen = strlen (language_string) + 1 + strlen (version_string);
 
-  for (j = 1; dwarf_record_gcc_switches && j < save_decoded_options_count; j++)
+  for (j = 1; GCC_OPTION (dwarf_record_gcc_switches) && j < save_decoded_options_count; j++)
     switch (save_decoded_options[j].opt_index)
       {
       case OPT_o:
@@ -19289,7 +19289,7 @@ gen_compile_unit_die (const char *filename)
     language = DW_LANG_Fortran77;
   else if (strcmp (language_string, "GNU Pascal") == 0)
     language = DW_LANG_Pascal83;
-  else if (dwarf_version >= 3 || !dwarf_strict)
+  else if (GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict))
     {
       if (strcmp (language_string, "GNU Ada") == 0)
 	language = DW_LANG_Ada95;
@@ -19301,7 +19301,7 @@ gen_compile_unit_die (const char *filename)
 	language = DW_LANG_ObjC;
       else if (strcmp (language_string, "GNU Objective-C++") == 0)
 	language = DW_LANG_ObjC_plus_plus;
-      else if (dwarf_version >= 5 || !dwarf_strict)
+      else if (GCC_OPTION (dwarf_version) >= 5 || !GCC_OPTION (dwarf_strict))
 	{
 	  if (strcmp (language_string, "GNU Go") == 0)
 	    language = DW_LANG_Go;
@@ -19347,13 +19347,13 @@ gen_inheritance_die (tree binfo, tree access, dw_die_ref context_die)
      the default has always been DW_ACCESS_private.  */
   if (access == access_public_node)
     {
-      if (dwarf_version == 2
+      if (GCC_OPTION (dwarf_version) == 2
 	  || context_die->die_tag == DW_TAG_class_type)
       add_AT_unsigned (die, DW_AT_accessibility, DW_ACCESS_public);
     }
   else if (access == access_protected_node)
     add_AT_unsigned (die, DW_AT_accessibility, DW_ACCESS_protected);
-  else if (dwarf_version > 2
+  else if (GCC_OPTION (dwarf_version) > 2
 	   && context_die->die_tag != DW_TAG_class_type)
     add_AT_unsigned (die, DW_AT_accessibility, DW_ACCESS_private);
 }
@@ -19450,7 +19450,7 @@ gen_struct_or_union_type_die (tree type, dw_die_ref context_die,
   scope_die = scope_die_for (type, context_die);
 
   /* Generate child dies for template paramaters.  */
-  if (!type_die && debug_info_level > DINFO_LEVEL_TERSE)
+  if (!type_die && GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
     schedule_generic_params_dies_gen (type);
 
   if (! type_die || (nested && is_cu_die (scope_die)))
@@ -19748,7 +19748,7 @@ gen_type_die_with_usage (tree type, dw_die_ref context_die,
   if (!TREE_ASM_WRITTEN (type)
       && lang_hooks.types.get_array_descr_info
       && lang_hooks.types.get_array_descr_info (type, &info)
-      && (dwarf_version >= 3 || !dwarf_strict))
+      && (GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict)))
     {
       gen_descr_array_type_die (type, &info, context_die);
       TREE_ASM_WRITTEN (type) = 1;
@@ -19923,7 +19923,7 @@ gen_block_die (tree stmt, dw_die_ref context_die, int depth)
     {
       /* Determine if this block directly contains any "significant"
 	 local declarations which we will need to output DIEs for.  */
-      if (debug_info_level > DINFO_LEVEL_TERSE)
+      if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
 	/* We are not in terse mode so *any* local declaration counts
 	   as being a "significant" one.  */
 	must_output_die = ((BLOCK_VARS (stmt) != NULL
@@ -20016,7 +20016,7 @@ decls_for_scope (tree stmt, dw_die_ref context_die, int depth)
      sub-blocks.  Also, nested function and tag DIEs have been
      generated with a parent of NULL; fix that up now.  We don't
      have to do this if we're at -g1.  */
-  if (debug_info_level > DINFO_LEVEL_TERSE)
+  if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
     {
       for (decl = BLOCK_VARS (stmt); decl != NULL; decl = DECL_CHAIN (decl))
 	process_scope_var (stmt, decl, NULL_TREE, context_die);
@@ -20143,7 +20143,7 @@ force_decl_die (tree decl)
 	  break;
 
 	case NAMESPACE_DECL:
-	  if (dwarf_version >= 3 || !dwarf_strict)
+	  if (GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict))
 	    dwarf2out_decl (decl);
 	  else
 	    /* DWARF2 has neither DW_TAG_module, nor DW_TAG_namespace.  */
@@ -20213,7 +20213,7 @@ declare_in_namespace (tree thing, dw_die_ref context_die)
 {
   dw_die_ref ns_context;
 
-  if (debug_info_level <= DINFO_LEVEL_TERSE)
+  if (GCC_OPTION (debug_info_level) <= DINFO_LEVEL_TERSE)
     return context_die;
 
   /* If this decl is from an inlined function, then don't try to emit it in its
@@ -20360,7 +20360,7 @@ gen_decl_die (tree decl, tree origin, dw_die_ref context_die)
 	}
 
       /* Otherwise we're emitting the primary DIE for this decl.  */
-      else if (debug_info_level > DINFO_LEVEL_TERSE)
+      else if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
 	{
 	  /* Before we describe the FUNCTION_DECL itself, make sure that we
 	     have its containing type.  */
@@ -20392,7 +20392,7 @@ gen_decl_die (tree decl, tree origin, dw_die_ref context_die)
     case TYPE_DECL:
       /* If we are in terse mode, don't generate any DIEs to represent any
 	 actual typedefs.  */
-      if (debug_info_level <= DINFO_LEVEL_TERSE)
+      if (GCC_OPTION (debug_info_level) <= DINFO_LEVEL_TERSE)
 	break;
 
       /* In the special case of a TYPE_DECL node representing the declaration
@@ -20416,7 +20416,7 @@ gen_decl_die (tree decl, tree origin, dw_die_ref context_die)
       break;
 
     case LABEL_DECL:
-      if (debug_info_level >= DINFO_LEVEL_NORMAL)
+      if (GCC_OPTION (debug_info_level) >= DINFO_LEVEL_NORMAL)
 	gen_label_die (decl, context_die);
       break;
 
@@ -20424,7 +20424,7 @@ gen_decl_die (tree decl, tree origin, dw_die_ref context_die)
     case RESULT_DECL:
       /* If we are in terse mode, don't generate any DIEs to represent any
 	 variable declarations or definitions.  */
-      if (debug_info_level <= DINFO_LEVEL_TERSE)
+      if (GCC_OPTION (debug_info_level) <= DINFO_LEVEL_TERSE)
 	break;
 
       /* Output any DIEs that are needed to specify the type of this data
@@ -20479,7 +20479,7 @@ gen_decl_die (tree decl, tree origin, dw_die_ref context_die)
 
     case NAMESPACE_DECL:
     case IMPORTED_DECL:
-      if (dwarf_version >= 3 || !dwarf_strict)
+      if (GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict))
 	gen_namespace_die (decl, context_die);
       break;
 
@@ -20588,7 +20588,7 @@ dwarf2out_imported_module_or_decl_1 (tree decl,
 
   if (TREE_CODE (decl) == NAMESPACE_DECL)
     {
-      if (dwarf_version >= 3 || !dwarf_strict)
+      if (GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict))
 	imported_die = new_die (DW_TAG_imported_module,
 				lexical_block_die,
 				lexical_block);
@@ -20620,7 +20620,7 @@ dwarf2out_imported_module_or_decl (tree decl, tree name, tree context,
   /* dw_die_ref at_import_die;  */
   dw_die_ref scope_die;
 
-  if (debug_info_level <= DINFO_LEVEL_TERSE)
+  if (GCC_OPTION (debug_info_level) <= DINFO_LEVEL_TERSE)
     return;
 
   gcc_assert (decl);
@@ -20636,7 +20636,7 @@ dwarf2out_imported_module_or_decl (tree decl, tree name, tree context,
       && !should_emit_struct_debug (context, DINFO_USAGE_DIR_USE))
     return;
 
-  if (!(dwarf_version >= 3 || !dwarf_strict))
+  if (!(GCC_OPTION (dwarf_version) >= 3 || !GCC_OPTION (dwarf_strict)))
     return;
 
   scope_die = get_context_die (context);
@@ -20663,7 +20663,7 @@ gen_namelist_decl (tree name, dw_die_ref scope_die, tree item_decls)
   tree value;
   unsigned i;
 
-  if (debug_info_level <= DINFO_LEVEL_TERSE)
+  if (GCC_OPTION (debug_info_level) <= DINFO_LEVEL_TERSE)
     return NULL;
 
   gcc_assert (scope_die != NULL);
@@ -20745,7 +20745,7 @@ dwarf2out_decl (tree decl)
 	 we're a method, it will be ignored, since we already have a DIE.  */
       if (decl_function_context (decl)
 	  /* But if we're in terse mode, we don't care about scope.  */
-	  && debug_info_level > DINFO_LEVEL_TERSE)
+	  && GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
 	context_die = NULL;
       break;
 
@@ -20769,12 +20769,12 @@ dwarf2out_decl (tree decl)
 
       /* If we are in terse mode, don't generate any DIEs to represent any
 	 variable declarations or definitions.  */
-      if (debug_info_level <= DINFO_LEVEL_TERSE)
+      if (GCC_OPTION (debug_info_level) <= DINFO_LEVEL_TERSE)
 	return;
       break;
 
     case CONST_DECL:
-      if (debug_info_level <= DINFO_LEVEL_TERSE)
+      if (GCC_OPTION (debug_info_level) <= DINFO_LEVEL_TERSE)
 	return;
       if (!is_fortran () && !is_ada ())
 	return;
@@ -20784,7 +20784,7 @@ dwarf2out_decl (tree decl)
 
     case NAMESPACE_DECL:
     case IMPORTED_DECL:
-      if (debug_info_level <= DINFO_LEVEL_TERSE)
+      if (GCC_OPTION (debug_info_level) <= DINFO_LEVEL_TERSE)
 	return;
       if (lookup_decl_die (decl) != NULL)
 	return;
@@ -20801,7 +20801,7 @@ dwarf2out_decl (tree decl)
 	return;
 
       /* If we are in terse mode, don't generate any DIEs for types.  */
-      if (debug_info_level <= DINFO_LEVEL_TERSE)
+      if (GCC_OPTION (debug_info_level) <= DINFO_LEVEL_TERSE)
 	return;
 
       /* If we're a function-scope tag, initially use a parent of NULL;
@@ -21349,7 +21349,7 @@ set_cur_line_info_table (section *sec)
     {
       const char *end_label;
 
-      if (flag_reorder_blocks_and_partition)
+      if (GCC_OPTION (flag_reorder_blocks_and_partition))
 	{
 	  if (in_cold_section_p)
 	    end_label = crtl->subsections.cold_section_end_label;
@@ -21391,7 +21391,7 @@ dwarf2out_begin_function (tree fun)
   if (sec != text_section)
     have_multiple_function_sections = true;
 
-  if (flag_reorder_blocks_and_partition && !cold_text_section)
+  if (GCC_OPTION (flag_reorder_blocks_and_partition) && !cold_text_section)
     {
       gcc_assert (current_function_decl == fun);
       cold_text_section = unlikely_text_section ();
@@ -21484,12 +21484,12 @@ dwarf2out_source_line (unsigned int line, const char *filename,
   unsigned int file_num;
   dw_line_info_table *table;
 
-  if (debug_info_level < DINFO_LEVEL_TERSE || line == 0)
+  if (GCC_OPTION (debug_info_level) < DINFO_LEVEL_TERSE || line == 0)
     return;
 
   /* The discriminator column was added in dwarf4.  Simplify the below
      by simply removing it if we're not supposed to output it.  */
-  if (dwarf_version < 4 && dwarf_strict)
+  if (GCC_OPTION (dwarf_version) < 4 && GCC_OPTION (dwarf_strict))
     discriminator = 0;
 
   table = cur_line_info_table;
@@ -21518,7 +21518,7 @@ dwarf2out_source_line (unsigned int line, const char *filename,
   switch_to_section (current_function_section ());
 
   /* If requested, emit something human-readable.  */
-  if (flag_debug_asm)
+  if (GCC_OPTION (flag_debug_asm))
     fprintf (asm_out_file, "\t%s %s:%d\n", ASM_COMMENT_START, filename, line);
 
   if (DWARF2_ASM_LINE_DEBUG_INFO)
@@ -21574,7 +21574,7 @@ dwarf2out_source_line (unsigned int line, const char *filename,
 static void
 dwarf2out_start_source_file (unsigned int lineno, const char *filename)
 {
-  if (flag_eliminate_dwarf2_dups)
+  if (GCC_OPTION (flag_eliminate_dwarf2_dups))
     {
       /* Record the beginning of the file for break_out_includes.  */
       dw_die_ref bincl_die;
@@ -21583,7 +21583,7 @@ dwarf2out_start_source_file (unsigned int lineno, const char *filename)
       add_AT_string (bincl_die, DW_AT_name, remap_debug_filename (filename));
     }
 
-  if (debug_info_level >= DINFO_LEVEL_VERBOSE)
+  if (GCC_OPTION (debug_info_level) >= DINFO_LEVEL_VERBOSE)
     {
       macinfo_entry e;
       e.code = DW_MACINFO_start_file;
@@ -21598,11 +21598,11 @@ dwarf2out_start_source_file (unsigned int lineno, const char *filename)
 static void
 dwarf2out_end_source_file (unsigned int lineno ATTRIBUTE_UNUSED)
 {
-  if (flag_eliminate_dwarf2_dups)
+  if (GCC_OPTION (flag_eliminate_dwarf2_dups))
     /* Record the end of the file for break_out_includes.  */
     new_die (DW_TAG_GNU_EINCL, comp_unit_die (), NULL);
 
-  if (debug_info_level >= DINFO_LEVEL_VERBOSE)
+  if (GCC_OPTION (debug_info_level) >= DINFO_LEVEL_VERBOSE)
     {
       macinfo_entry e;
       e.code = DW_MACINFO_end_file;
@@ -21620,7 +21620,7 @@ static void
 dwarf2out_define (unsigned int lineno ATTRIBUTE_UNUSED,
 		  const char *buffer ATTRIBUTE_UNUSED)
 {
-  if (debug_info_level >= DINFO_LEVEL_VERBOSE)
+  if (GCC_OPTION (debug_info_level) >= DINFO_LEVEL_VERBOSE)
     {
       macinfo_entry e;
       /* Insert a dummy first entry to be able to optimize the whole
@@ -21647,7 +21647,7 @@ static void
 dwarf2out_undef (unsigned int lineno ATTRIBUTE_UNUSED,
 		 const char *buffer ATTRIBUTE_UNUSED)
 {
-  if (debug_info_level >= DINFO_LEVEL_VERBOSE)
+  if (GCC_OPTION (debug_info_level) >= DINFO_LEVEL_VERBOSE)
     {
       macinfo_entry e;
       /* Insert a dummy first entry to be able to optimize the whole
@@ -21719,7 +21719,7 @@ output_macinfo_op (macinfo_entry *ref)
     case DW_MACINFO_define:
     case DW_MACINFO_undef:
       len = strlen (ref->info) + 1;
-      if (!dwarf_strict
+      if (!GCC_OPTION (dwarf_strict)
 	  && len > DWARF_OFFSET_SIZE
 	  && !DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET
 	  && (debug_str_section->common.flags & SECTION_MERGE) != 0)
@@ -21915,7 +21915,7 @@ save_macinfo_strings (void)
           case DW_MACINFO_define:
           case DW_MACINFO_undef:
             len = strlen (ref->info) + 1;
-            if (!dwarf_strict
+            if (!GCC_OPTION (dwarf_strict)
                 && len > DWARF_OFFSET_SIZE
                 && !DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET
                 && (debug_str_section->common.flags & SECTION_MERGE) != 0)
@@ -21952,7 +21952,7 @@ output_macinfo (void)
 	      && (int) DW_MACINFO_end_file == (int) DW_MACRO_GNU_end_file);
 
   /* For .debug_macro emit the section header.  */
-  if (!dwarf_strict)
+  if (!GCC_OPTION (dwarf_strict))
     {
       dw2_asm_output_data (2, 4, "DWARF macro version number");
       if (DWARF_OFFSET_SIZE == 8)
@@ -21960,7 +21960,7 @@ output_macinfo (void)
       else
 	dw2_asm_output_data (1, 2, "Flags: 32-bit, lineptr present");
       dw2_asm_output_offset (DWARF_OFFSET_SIZE,
-                             (!dwarf_split_debug_info ? debug_line_section_label
+                             (!GCC_OPTION (dwarf_split_debug_info) ? debug_line_section_label
                               : debug_skeleton_line_section_label),
                              debug_line_section, NULL);
     }
@@ -21985,7 +21985,7 @@ output_macinfo (void)
 	  break;
 	case DW_MACINFO_define:
 	case DW_MACINFO_undef:
-	  if (!dwarf_strict
+	  if (!GCC_OPTION (dwarf_strict)
 	      && HAVE_COMDAT_GROUP
 	      && vec_safe_length (files) != 1
 	      && i > 0
@@ -22101,7 +22101,7 @@ dwarf2out_init (const char *filename ATTRIBUTE_UNUSED)
 
   vec_alloc (used_rtx_array, 32);
 
-  if (!dwarf_split_debug_info)
+  if (!GCC_OPTION (dwarf_split_debug_info))
     {
       debug_info_section = get_section (DEBUG_INFO_SECTION,
                                         SECTION_DEBUG, NULL);
@@ -22145,7 +22145,7 @@ dwarf2out_init (const char *filename ATTRIBUTE_UNUSED)
     }
   debug_aranges_section = get_section (DEBUG_ARANGES_SECTION,
 				       SECTION_DEBUG, NULL);
-  debug_macinfo_section = get_section (dwarf_strict
+  debug_macinfo_section = get_section (GCC_OPTION (dwarf_strict)
 				       ? DEBUG_MACINFO_SECTION
 				       : DEBUG_MACRO_SECTION,
                                        DEBUG_MACRO_SECTION_FLAGS, NULL);
@@ -22179,12 +22179,12 @@ dwarf2out_init (const char *filename ATTRIBUTE_UNUSED)
   ASM_GENERATE_INTERNAL_LABEL (debug_addr_section_label,
                                DEBUG_ADDR_SECTION_LABEL, 0);
   ASM_GENERATE_INTERNAL_LABEL (macinfo_section_label,
-			       dwarf_strict
+			       GCC_OPTION (dwarf_strict)
 			       ? DEBUG_MACINFO_SECTION_LABEL
 			       : DEBUG_MACRO_SECTION_LABEL, 0);
   ASM_GENERATE_INTERNAL_LABEL (loc_section_label, DEBUG_LOC_SECTION_LABEL, 0);
 
-  if (debug_info_level >= DINFO_LEVEL_VERBOSE)
+  if (GCC_OPTION (debug_info_level) >= DINFO_LEVEL_VERBOSE)
     vec_alloc (macinfo_table, 64);
 
   switch_to_section (text_section);
@@ -22203,7 +22203,7 @@ dwarf2out_assembly_start (void)
 {
   if (HAVE_GAS_CFI_SECTIONS_DIRECTIVE
       && dwarf2out_do_cfi_asm ()
-      && (!(flag_unwind_tables || flag_exceptions)
+      && (!(GCC_OPTION (flag_unwind_tables) || GCC_OPTION (flag_exceptions))
 	  || targetm_common.except_unwind_info (&global_options) != UI_DWARF2))
     fprintf (asm_out_file, "\t.cfi_sections\t.debug_frame\n");
 }
@@ -22296,7 +22296,7 @@ static void
 output_indirect_strings (void)
 {
   switch_to_section (debug_str_section);
-  if (!dwarf_split_debug_info)
+  if (!GCC_OPTION (dwarf_split_debug_info))
     htab_traverse (debug_str_hash, output_indirect_string, NULL);
   else
     {
@@ -23081,7 +23081,7 @@ resolve_addr_in_expr (dw_loc_descr_ref loc)
 		 || prev->dw_loc_opc == DW_OP_bit_piece)
 		&& loc->dw_loc_next
 		&& loc->dw_loc_next->dw_loc_opc == DW_OP_stack_value
-		&& !dwarf_strict
+		&& !GCC_OPTION (dwarf_strict)
 		&& optimize_one_addr_into_implicit_ptr (loc))
 	      break;
 	    return false;
@@ -23215,7 +23215,7 @@ optimize_location_into_implicit_ptr (dw_die_ref die, tree decl)
      DW_AT_const_value instead.  */
   if (tree_add_const_value_attribute (die, init))
     return;
-  if (dwarf_strict)
+  if (GCC_OPTION (dwarf_strict))
     return;
   /* If init is ADDR_EXPR or POINTER_PLUS_EXPR of ADDR_EXPR,
      and ADDR_EXPR refers to a decl that has DW_AT_location or
@@ -23310,7 +23310,7 @@ resolve_addr (dw_die_ref die)
 			gcc_assert (!next->ll_symbol);
 			next->ll_symbol = (*curr)->ll_symbol;
 		      }
-                    if (dwarf_split_debug_info)
+                    if (GCC_OPTION (dwarf_split_debug_info))
                       remove_loc_list_addr_table_entries (l);
 		    *curr = next;
 		  }
@@ -23342,14 +23342,14 @@ resolve_addr (dw_die_ref die)
 	     DW_OP_plus_uconst - older consumers might
 	     rely on it being that op instead of a more complex,
 	     but shorter, location description.  */
-	  if ((dwarf_version > 2
+	  if ((GCC_OPTION (dwarf_version) > 2
 	       || a->dw_attr != DW_AT_data_member_location
 	       || l == NULL
 	       || l->dw_loc_opc != DW_OP_plus_uconst
 	       || l->dw_loc_next != NULL)
 	      && !resolve_addr_in_expr (l))
 	    {
-	      if (dwarf_split_debug_info)
+	      if (GCC_OPTION (dwarf_split_debug_info))
 		remove_loc_list_addr_table_entries (l);
 	      if (l != NULL
 		  && l->dw_loc_next == NULL
@@ -23731,7 +23731,7 @@ compare_loc_operands (dw_loc_descr_ref x, dw_loc_descr_ref y)
         can cause irrelevant differences in dw_loc_addr.  */
       gcc_assert (valx1->val_class == dw_val_class_loc
 		  && valy1->val_class == dw_val_class_loc
-                  && (dwarf_split_debug_info
+                  && (GCC_OPTION (dwarf_split_debug_info)
                       || x->dw_loc_addr == y->dw_loc_addr));
       return valx1->v.val_loc->dw_loc_addr == valy1->v.val_loc->dw_loc_addr;
     case DW_OP_implicit_value:
@@ -24054,7 +24054,7 @@ dwarf2out_finish (const char *filename)
       /* When generating LTO bytecode we can not generate new assembler
          names at this point and all important decls got theirs via
 	 free-lang-data.  */
-      if ((!flag_generate_lto || DECL_ASSEMBLER_NAME_SET_P (decl))
+      if ((!GCC_OPTION (flag_generate_lto) || DECL_ASSEMBLER_NAME_SET_P (decl))
 	  && DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl))
 	{
 	  add_linkage_attr (node->die, decl);
@@ -24068,7 +24068,7 @@ dwarf2out_finish (const char *filename)
      emit full debugging info for them.  */
   retry_incomplete_types ();
 
-  if (flag_eliminate_unused_debug_types)
+  if (GCC_OPTION (flag_eliminate_unused_debug_types))
     prune_unused_types ();
 
   /* Generate separate COMDAT sections for type DIEs. */
@@ -24096,7 +24096,7 @@ dwarf2out_finish (const char *filename)
 
   /* Generate separate CUs for each of the include files we've seen.
      They will go into limbo_die_list.  */
-  if (flag_eliminate_dwarf2_dups)
+  if (GCC_OPTION (flag_eliminate_dwarf2_dups))
     break_out_includes (comp_unit_die ());
 
   /* Traverse the DIE's and add add sibling attributes to those DIE's
@@ -24110,7 +24110,7 @@ dwarf2out_finish (const char *filename)
   /* When splitting DWARF info, we put some attributes in the
      skeleton compile_unit DIE that remains in the .o, while
      most attributes go in the DWO compile_unit_die.  */
-  if (dwarf_split_debug_info)
+  if (GCC_OPTION (dwarf_split_debug_info))
     main_comp_unit_die = gen_compile_unit_die (NULL);
   else
     main_comp_unit_die = comp_unit_die ();
@@ -24127,7 +24127,7 @@ dwarf2out_finish (const char *filename)
   /* We can only use the low/high_pc attributes if all of the code was
      in .text.  */
   if (!have_multiple_function_sections 
-      || (dwarf_version < 3 && dwarf_strict))
+      || (GCC_OPTION (dwarf_version) < 3 && GCC_OPTION (dwarf_strict)))
     {
       /* Don't add if the CU has no associated code.  */
       if (text_section_used)
@@ -24169,23 +24169,23 @@ dwarf2out_finish (const char *filename)
 	     DW_AT_entry_pc instead of DW_AT_low_pc for this purpose.
 	     Emit both to give time for other tools to adapt.  */
           add_AT_addr (main_comp_unit_die, DW_AT_low_pc, const0_rtx, true);
-	  if (! dwarf_strict && dwarf_version < 4)
+	  if (! GCC_OPTION (dwarf_strict) && GCC_OPTION (dwarf_version) < 4)
             add_AT_addr (main_comp_unit_die, DW_AT_entry_pc, const0_rtx, true);
 
 	  add_ranges (NULL);
 	}
     }
 
-  if (debug_info_level >= DINFO_LEVEL_TERSE)
+  if (GCC_OPTION (debug_info_level) >= DINFO_LEVEL_TERSE)
     add_AT_lineptr (main_comp_unit_die, DW_AT_stmt_list,
 		    debug_line_section_label);
 
   if (have_macinfo)
     add_AT_macptr (comp_unit_die (),
-		   dwarf_strict ? DW_AT_macro_info : DW_AT_GNU_macros,
+		   GCC_OPTION (dwarf_strict) ? DW_AT_macro_info : DW_AT_GNU_macros,
 		   macinfo_section_label);
 
-  if (dwarf_split_debug_info && addr_index_table != NULL)
+  if (GCC_OPTION (dwarf_split_debug_info) && addr_index_table != NULL)
     {
       /* optimize_location_lists calculates the size of the lists,
          so index them first, and assign indices to the entries.
@@ -24202,7 +24202,7 @@ dwarf2out_finish (const char *filename)
 
   save_macinfo_strings ();
 
-  if (dwarf_split_debug_info)
+  if (GCC_OPTION (dwarf_split_debug_info))
     {
       unsigned int index = 0;
 
@@ -24233,9 +24233,9 @@ dwarf2out_finish (const char *filename)
       /* Add a pointer to the line table for the main compilation unit
          so that the debugger can make sense of DW_AT_decl_file
          attributes.  */
-      if (debug_info_level >= DINFO_LEVEL_TERSE)
+      if (GCC_OPTION (debug_info_level) >= DINFO_LEVEL_TERSE)
         add_AT_lineptr (ctnode->root_die, DW_AT_stmt_list,
-                        (!dwarf_split_debug_info
+                        (!GCC_OPTION (dwarf_split_debug_info)
                          ? debug_line_section_label
                          : debug_skeleton_line_section_label));
 
@@ -24248,10 +24248,10 @@ dwarf2out_finish (const char *filename)
      both the main_cu and all skeleton TUs.  Making this call unconditional
      would end up either adding a second copy of the AT_pubnames attribute, or
      requiring a special case in add_top_level_skeleton_die_attrs.  */
-  if (!dwarf_split_debug_info)
+  if (!GCC_OPTION (dwarf_split_debug_info))
     add_AT_pubnames (comp_unit_die ());
 
-  if (dwarf_split_debug_info)
+  if (GCC_OPTION (dwarf_split_debug_info))
     {
       int mark;
       unsigned char checksum[16];
@@ -24284,7 +24284,7 @@ dwarf2out_finish (const char *filename)
      or .debug_macro will be emitted.  */
   output_comp_unit (comp_unit_die (), have_macinfo);
 
-  if (dwarf_split_debug_info && info_section_emitted)
+  if (GCC_OPTION (dwarf_split_debug_info) && info_section_emitted)
     output_skeleton_debug_sections (main_comp_unit_die);
 
   /* Output the abbreviation table.  */
@@ -24347,7 +24347,7 @@ dwarf2out_finish (const char *filename)
   if (! DWARF2_ASM_LINE_DEBUG_INFO)
     output_line_info (false);
 
-  if (dwarf_split_debug_info && info_section_emitted)
+  if (GCC_OPTION (dwarf_split_debug_info) && info_section_emitted)
     {
       switch_to_section (debug_skeleton_line_section);
       ASM_OUTPUT_LABEL (asm_out_file, debug_skeleton_line_section_label);
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 4736f8d..3cc5bbd 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -3777,7 +3777,7 @@ add_insn_after_nobb (rtx insn, rtx after)
 {
   rtx next = NEXT_INSN (after);
 
-  gcc_assert (!optimize || !INSN_DELETED_P (after));
+  gcc_assert (!GCC_OPTION (optimize) || !INSN_DELETED_P (after));
 
   link_insn_into_chain (insn, after, next);
 
@@ -3806,7 +3806,7 @@ add_insn_before_nobb (rtx insn, rtx before)
 {
   rtx prev = PREV_INSN (before);
 
-  gcc_assert (!optimize || !INSN_DELETED_P (before));
+  gcc_assert (!GCC_OPTION (optimize) || !INSN_DELETED_P (before));
 
   link_insn_into_chain (insn, prev, before);
 
diff --git a/gcc/except.c b/gcc/except.c
index 908954c..c1b2e52 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -234,7 +234,7 @@ static void sjlj_output_call_site_table (void);
 void
 init_eh (void)
 {
-  if (! flag_exceptions)
+  if (! GCC_OPTION (flag_exceptions))
     return;
 
   type_to_runtime_map = htab_create_ggc (31, t2r_hash, t2r_eq, NULL);
@@ -1012,7 +1012,7 @@ dw2_build_landing_pads (void)
      new landing pads later, which means that we need to hold on to
      the post-landing-pad block.  Prevent it from being merged away.
      We'll remove this bit after partitioning.  */
-  if (flag_reorder_blocks_and_partition)
+  if (GCC_OPTION (flag_reorder_blocks_and_partition))
     e_flags |= EDGE_PRESERVE;
 
   for (i = 1; vec_safe_iterate (cfun->eh->lp_array, i, &lp); ++i)
@@ -1723,7 +1723,7 @@ make_reg_eh_region_note_nothrow_nononlocal (rtx insn)
 bool
 insn_could_throw_p (const_rtx insn)
 {
-  if (!flag_exceptions)
+  if (!GCC_OPTION (flag_exceptions))
     return false;
   if (CALL_P (insn))
     return true;
@@ -1968,7 +1968,7 @@ set_nothrow_function_flags (void)
   if (TREE_NOTHROW (current_function_decl))
     return 0;
 
-  if (! flag_exceptions)
+  if (! GCC_OPTION (flag_exceptions))
     return 0;
 
   for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
@@ -2588,7 +2588,7 @@ convert_to_eh_region_ranges (void)
 	     && NOTE_KIND (iter) == NOTE_INSN_SWITCH_TEXT_SECTIONS)
       {
 	gcc_assert (section_switch_note == NULL_RTX);
-	gcc_assert (flag_reorder_blocks_and_partition);
+	gcc_assert (GCC_OPTION (flag_reorder_blocks_and_partition));
 	section_switch_note = iter;
 	if (first_no_action_insn)
 	  {
@@ -2841,7 +2841,7 @@ switch_to_exception_section (const char * ARG_UNUSED (fnname))
 	    {
 	      int tt_format =
 		ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0, /*global=*/1);
-	      flags = ((! flag_pic
+	      flags = ((! GCC_OPTION (flag_pic)
 			|| ((tt_format & 0x70) != DW_EH_PE_absptr
 			    && (tt_format & 0x70) != DW_EH_PE_aligned))
 		       ? 0 : SECTION_WRITE);
@@ -2850,7 +2850,7 @@ switch_to_exception_section (const char * ARG_UNUSED (fnname))
 	    flags = SECTION_WRITE;
 
 #ifdef HAVE_LD_EH_GC_SECTIONS
-	  if (flag_function_sections
+	  if (GCC_OPTION (flag_function_sections)
 	      || (DECL_ONE_ONLY (current_function_decl) && HAVE_COMDAT_GROUP))
 	    {
 	      char *section_name = XNEWVEC (char, strlen (fnname) + 32);
@@ -2869,7 +2869,7 @@ switch_to_exception_section (const char * ARG_UNUSED (fnname))
 	}
       else
 	exception_section
-	  = s = flag_pic ? data_section : readonly_data_section;
+	  = s = GCC_OPTION (flag_pic) ? data_section : readonly_data_section;
     }
 
   switch_to_section (s);
diff --git a/gcc/explow.c b/gcc/explow.c
index f4df9df..4f60a9e 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -565,7 +565,7 @@ use_anchored_address (rtx x)
   HOST_WIDE_INT offset;
   enum machine_mode mode;
 
-  if (!flag_section_anchors)
+  if (!GCC_OPTION (flag_section_anchors))
     return x;
 
   if (!MEM_P (x))
@@ -1195,7 +1195,7 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align,
   /* If stack usage info is requested, look into the size we are passed.
      We need to do so this early to avoid the obfuscation that may be
      introduced later by the various alignment operations.  */
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     {
       if (CONST_INT_P (size))
 	stack_usage_size = INTVAL (size);
@@ -1287,7 +1287,7 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align,
       size = plus_constant (Pmode, size, extra);
       size = force_operand (size, NULL_RTX);
 
-      if (flag_stack_usage_info)
+      if (GCC_OPTION (flag_stack_usage_info))
 	stack_usage_size += extra;
 
       if (extra && size_align > extra_align)
@@ -1311,7 +1311,7 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align,
     {
       size = round_push (size);
 
-      if (flag_stack_usage_info)
+      if (GCC_OPTION (flag_stack_usage_info))
 	{
 	  int align = crtl->preferred_stack_boundary / BITS_PER_UNIT;
 	  stack_usage_size = (stack_usage_size + align - 1) / align * align;
@@ -1322,7 +1322,7 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align,
 
   /* The size is supposed to be fully adjusted at this point so record it
      if stack usage info is requested.  */
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     {
       current_function_dynamic_stack_size += stack_usage_size;
 
@@ -1342,7 +1342,7 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align,
      be released when we release the current stack segment.  The
      effect is that stack allocation becomes less efficient, but at
      least it doesn't cause a stack overflow.  */
-  if (flag_split_stack)
+  if (GCC_OPTION (flag_split_stack))
     {
       rtx available_label, ask, space, func;
 
@@ -1403,10 +1403,10 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align,
      account what has already been checked.  */
   if (STACK_CHECK_MOVING_SP)
     ;
-  else if (flag_stack_check == GENERIC_STACK_CHECK)
+  else if (GCC_OPTION (flag_stack_check) == GENERIC_STACK_CHECK)
     probe_stack_range (STACK_OLD_CHECK_PROTECT + STACK_CHECK_MAX_FRAME_SIZE,
 		       size);
-  else if (flag_stack_check == STATIC_BUILTIN_STACK_CHECK)
+  else if (GCC_OPTION (flag_stack_check) == STATIC_BUILTIN_STACK_CHECK)
     probe_stack_range (STACK_CHECK_PROTECT, size);
 
   /* Don't let anti_adjust_stack emit notes.  */
@@ -1463,7 +1463,7 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align,
 
       saved_stack_pointer_delta = stack_pointer_delta;
 
-      if (flag_stack_check && STACK_CHECK_MOVING_SP)
+      if (GCC_OPTION (flag_stack_check) && STACK_CHECK_MOVING_SP)
 	anti_adjust_stack_and_probe (size, false);
       else
 	anti_adjust_stack (size);
@@ -1483,7 +1483,7 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align,
   /* Finish up the split stack handling.  */
   if (final_label != NULL_RTX)
     {
-      gcc_assert (flag_split_stack);
+      gcc_assert (GCC_OPTION (flag_split_stack));
       emit_move_insn (final_target, target);
       emit_label (final_label);
       target = final_target;
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 7c1c979..c31137b 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -441,7 +441,7 @@ strict_volatile_bitfield_p (rtx op0, unsigned HOST_WIDE_INT bitsize,
      volatile MEM.  */
   if (!MEM_P (op0)
       || !MEM_VOLATILE_P (op0)
-      || flag_strict_volatile_bitfields <= 0)
+      || GCC_OPTION (flag_strict_volatile_bitfields) <= 0)
     return false;
 
   /* Non-integral modes likely only happen with packed structures.
@@ -2969,12 +2969,12 @@ expand_mult_const (enum machine_mode mode, rtx op0, HOST_WIDE_INT val,
   for (opno = 1; opno < alg->ops; opno++)
     {
       int log = alg->log[opno];
-      rtx shift_subtarget = optimize ? 0 : accum;
+      rtx shift_subtarget = GCC_OPTION (optimize) ? 0 : accum;
       rtx add_target
 	= (opno == alg->ops - 1 && target != 0 && variant != add_variant
-	   && !optimize)
+	   && !GCC_OPTION (optimize))
 	  ? target : 0;
-      rtx accum_target = optimize ? 0 : accum;
+      rtx accum_target = GCC_OPTION (optimize) ? 0 : accum;
       rtx accum_inner;
 
       switch (alg->op[opno])
@@ -3027,7 +3027,7 @@ expand_mult_const (enum machine_mode mode, rtx op0, HOST_WIDE_INT val,
 	  tem = expand_shift (LSHIFT_EXPR, mode, accum, log, NULL_RTX, 0);
 	  accum = force_operand (gen_rtx_MINUS (mode, tem, accum),
 				 (add_target
-				  ? add_target : (optimize ? 0 : tem)));
+				  ? add_target : (GCC_OPTION (optimize) ? 0 : tem)));
 	  val_so_far = (val_so_far << log) - val_so_far;
 	  break;
 
@@ -3097,7 +3097,7 @@ expand_mult (enum machine_mode mode, rtx op0, rtx op1, rtx target,
   rtx scalar_op1;
   int max_cost;
   bool speed = optimize_insn_for_speed_p ();
-  bool do_trapv = flag_trapv && SCALAR_INT_MODE_P (mode) && !unsignedp;
+  bool do_trapv = GCC_OPTION (flag_trapv) && SCALAR_INT_MODE_P (mode) && !unsignedp;
 
   if (CONSTANT_P (op0))
     {
@@ -3964,7 +3964,7 @@ expand_divmod (int rem_flag, enum tree_code code, enum machine_mode mode,
     {
       if (rem_flag)
 	return const0_rtx;
-      return expand_unop (mode, flag_trapv && GET_MODE_CLASS (mode) == MODE_INT
+      return expand_unop (mode, GCC_OPTION (flag_trapv) && GET_MODE_CLASS (mode) == MODE_INT
 			  ? negv_optab : neg_optab, op0, target, 0);
     }
 
@@ -5186,7 +5186,7 @@ emit_cstore (rtx target, enum insn_code icode, enum rtx_code code,
 
   comparison = gen_rtx_fmt_ee (code, result_mode, x, y);
 
-  create_output_operand (&ops[0], optimize ? NULL_RTX : target, result_mode);
+  create_output_operand (&ops[0], GCC_OPTION (optimize) ? NULL_RTX : target, result_mode);
   create_fixed_operand (&ops[1], comparison);
   create_fixed_operand (&ops[2], x);
   create_fixed_operand (&ops[3], y);
@@ -5218,7 +5218,7 @@ emit_cstore (rtx target, enum insn_code icode, enum rtx_code code,
 
   /* If we want to keep subexpressions around, don't reuse our last
      target.  */
-  if (optimize)
+  if (GCC_OPTION (optimize))
     subtarget = 0;
 
   /* Now normalize to the proper value in MODE.  Sometimes we don't
@@ -5510,7 +5510,7 @@ emit_store_flag (rtx target, enum rtx_code code, rtx op0, rtx op1,
   /* If optimizing, use different pseudo registers for each insn, instead
      of reusing the same pseudo.  This leads to better CSE, but slows
      down the compiler, since there are more pseudos */
-  subtarget = (!optimize
+  subtarget = (!GCC_OPTION (optimize)
 	       && (target_mode == mode)) ? target : NULL_RTX;
   trueval = GEN_INT (normalizep ? normalizep : STORE_FLAG_VALUE);
 
diff --git a/gcc/expr.c b/gcc/expr.c
index 2dcdfc2..c0775fc 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -502,7 +502,7 @@ convert_move (rtx to, rtx from, int unsignedp)
 	     so that we always generate the same set of insns for
 	     better cse'ing; if an intermediate assignment occurred,
 	     we won't be doing the operation directly on the SUBREG.  */
-	  if (optimize > 0 && GET_CODE (from) == SUBREG)
+	  if (GCC_OPTION (optimize) > 0 && GET_CODE (from) == SUBREG)
 	    from = force_reg (from_mode, from);
 	  emit_unop_insn (code, to, from, equiv_code);
 	  return;
@@ -3611,7 +3611,7 @@ emit_move_insn (rtx x, rtx y)
 
   if (CONSTANT_P (y))
     {
-      if (optimize
+      if (GCC_OPTION (optimize)
 	  && SCALAR_FLOAT_MODE_P (GET_MODE (x))
 	  && (last_insn = compress_float_constant (x, y)))
 	return last_insn;
@@ -4437,7 +4437,7 @@ emit_push_insn (rtx x, enum machine_mode mode, tree type, rtx size,
 static rtx
 get_subtarget (rtx x)
 {
-  return (optimize
+  return (GCC_OPTION (optimize)
           || x == 0
 	   /* Only registers can be subtargets.  */
 	   || !REG_P (x)
@@ -6710,7 +6710,7 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize,
     {
       tree field = TREE_OPERAND (exp, 1);
       size_tree = DECL_SIZE (field);
-      if (flag_strict_volatile_bitfields > 0
+      if (GCC_OPTION (flag_strict_volatile_bitfields) > 0
 	  && TREE_THIS_VOLATILE (exp)
 	  && DECL_BIT_FIELD_TYPE (field)
 	  && DECL_MODE (field) != BLKmode)
@@ -7541,7 +7541,7 @@ expand_operands (tree exp0, tree exp1, rtx target, rtx *op0, rtx *op1,
     {
       /* If we need to preserve evaluation order, copy exp0 into its own
 	 temporary variable so that it can't be clobbered by exp1.  */
-      if (flag_evaluation_order && TREE_SIDE_EFFECTS (exp1))
+      if (GCC_OPTION (flag_evaluation_order) && TREE_SIDE_EFFECTS (exp1))
 	exp0 = save_expr (exp0);
       *op0 = expand_expr (exp0, target, VOIDmode, modifier);
       *op1 = expand_expr (exp1, NULL_RTX, VOIDmode, modifier);
@@ -8294,7 +8294,7 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode,
 
 	 If this is an EXPAND_SUM call, always return the sum.  */
       if (modifier == EXPAND_SUM || modifier == EXPAND_INITIALIZER
-	  || (mode == ptr_mode && (unsignedp || ! flag_trapv)))
+	  || (mode == ptr_mode && (unsignedp || ! GCC_OPTION (flag_trapv))))
 	{
 	  if (modifier == EXPAND_STACK_PARM)
 	    target = 0;
@@ -8946,7 +8946,7 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode,
 	   || ! safe_from_p (target, treeop1, 1)
 	   /* Make sure we don't have a hard reg (such as function's return
 	      value) live across basic blocks, if not optimizing.  */
-	   || (!optimize && REG_P (target)
+	   || (!GCC_OPTION (optimize) && REG_P (target)
 	       && REGNO (target) < FIRST_PSEUDO_REGISTER)))
 	target = gen_reg_rtx (tmode != VOIDmode ? tmode : mode);
 
@@ -9390,7 +9390,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
       if (g == NULL
 	  && modifier == EXPAND_INITIALIZER
 	  && !SSA_NAME_IS_DEFAULT_DEF (exp)
-	  && (optimize || DECL_IGNORED_P (SSA_NAME_VAR (exp)))
+	  && (GCC_OPTION (optimize) || DECL_IGNORED_P (SSA_NAME_VAR (exp)))
 	  && stmt_is_replaceable_p (SSA_NAME_DEF_STMT (exp)))
 	g = SSA_NAME_DEF_STMT (exp);
       if (g)
@@ -9832,7 +9832,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
 		}
 	  }
 
-	else if (optimize >= 1
+	else if (GCC_OPTION (optimize) >= 1
 		 && modifier != EXPAND_CONST_ADDRESS
 		 && modifier != EXPAND_INITIALIZER
 		 && modifier != EXPAND_MEMORY
@@ -11133,7 +11133,7 @@ do_tablejump (rtx index, enum machine_mode mode, rtx range, rtx table_label,
      out of PIC_CASE_VECTOR_ADDRESS won't be a valid address,
      and break_out_memory_refs will go to work on it and mess it up.  */
 #ifdef PIC_CASE_VECTOR_ADDRESS
-  if (flag_pic && !REG_P (index))
+  if (GCC_OPTION (flag_pic) && !REG_P (index))
     index = copy_to_mode_reg (Pmode, index);
 #endif
 
@@ -11147,7 +11147,7 @@ do_tablejump (rtx index, enum machine_mode mode, rtx range, rtx table_label,
 		   gen_int_mode (GET_MODE_SIZE (CASE_VECTOR_MODE), Pmode)),
      gen_rtx_LABEL_REF (Pmode, table_label));
 #ifdef PIC_CASE_VECTOR_ADDRESS
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     index = PIC_CASE_VECTOR_ADDRESS (index);
   else
 #endif
@@ -11160,7 +11160,7 @@ do_tablejump (rtx index, enum machine_mode mode, rtx range, rtx table_label,
 
   /* If we are generating PIC code or if the table is PC-relative, the
      table and JUMP_INSN must be adjacent, so don't output a BARRIER.  */
-  if (! CASE_VECTOR_PC_RELATIVE && ! flag_pic)
+  if (! CASE_VECTOR_PC_RELATIVE && ! GCC_OPTION (flag_pic))
     emit_barrier ();
 }
 
diff --git a/gcc/final.c b/gcc/final.c
index 83abee2..9dac6c0 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -689,7 +689,7 @@ compute_alignments (void)
   label_align = XCNEWVEC (struct label_alignment, max_labelno - min_labelno + 1);
 
   /* If not optimizing or optimizing for size, don't assign any alignments.  */
-  if (! optimize || optimize_function_for_size_p (cfun))
+  if (! GCC_OPTION (optimize) || optimize_function_for_size_p (cfun))
     return 0;
 
   if (dump_file)
@@ -1039,10 +1039,10 @@ shorten_branches (rtx first)
      lengths as we find the need for this, till nothing changes.
      When not optimizing, we start assuming maximum lengths, and
      do a single pass to update the lengths.  */
-  bool increasing = optimize != 0;
+  bool increasing = GCC_OPTION (optimize) != 0;
 
 #ifdef CASE_VECTOR_SHORTEN_MODE
-  if (optimize)
+  if (GCC_OPTION (optimize))
     {
       /* Look for ADDR_DIFF_VECs, and initialize their minimum and maximum
          label fields.  */
@@ -1268,7 +1268,7 @@ shorten_branches (rtx first)
 	  INSN_ADDRESSES (uid) = insn_current_address;
 
 #ifdef CASE_VECTOR_SHORTEN_MODE
-	  if (optimize
+	  if (GCC_OPTION (optimize)
 	      && JUMP_TABLE_DATA_P (insn)
 	      && GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC)
 	    {
@@ -1577,7 +1577,7 @@ remap_debug_filename (const char *filename)
 static bool
 dwarf2_debug_info_emitted_p (tree decl)
 {
-  if (write_symbols != DWARF2_DEBUG && write_symbols != VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) != DWARF2_DEBUG && GCC_OPTION (write_symbols) != VMS_AND_DWARF2_DEBUG)
     return false;
 
   if (DECL_IGNORED_P (decl))
@@ -1739,7 +1739,7 @@ final_start_function (rtx first, FILE *file,
 
   high_block_linenum = high_function_linenum = last_linenum;
 
-  if (flag_sanitize & SANITIZE_ADDRESS)
+  if (GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
     asan_function_start ();
 
   if (!DECL_IGNORED_P (current_function_decl))
@@ -1794,7 +1794,7 @@ final_start_function (rtx first, FILE *file,
 
   /* If debugging, assign block numbers to all of the blocks in this
      function.  */
-  if (write_symbols)
+  if (GCC_OPTION (write_symbols))
     {
       reemit_insn_block_notes ();
       number_blocks (current_function_decl);
@@ -1804,13 +1804,13 @@ final_start_function (rtx first, FILE *file,
       TREE_ASM_WRITTEN (DECL_INITIAL (current_function_decl)) = 1;
     }
 
-  if (warn_frame_larger_than
-    && get_frame_size () > frame_larger_than_size)
+  if (GCC_OPTION (warn_frame_larger_than)
+    && get_frame_size () > GCC_OPTION (frame_larger_than_size))
   {
       /* Issue a warning */
       warning (OPT_Wframe_larger_than_,
                "the frame size of %wd bytes is larger than %wd bytes",
-               get_frame_size (), frame_larger_than_size);
+               get_frame_size (), GCC_OPTION (frame_larger_than_size));
   }
 
   /* First output the function prologue: code to set up the stack frame.  */
@@ -1910,7 +1910,7 @@ dump_basic_block_info (FILE *file, rtx insn, basic_block *start_to_bb,
 {
   basic_block bb;
 
-  if (!flag_debug_asm)
+  if (!GCC_OPTION (flag_debug_asm))
     return;
 
   if (INSN_UID (insn) < bb_map_size
@@ -1985,7 +1985,7 @@ final (rtx first, FILE *file, int optimize_p)
 
   CC_STATUS_INIT;
 
-  if (flag_debug_asm)
+  if (GCC_OPTION (flag_debug_asm))
     {
       basic_block bb;
 
@@ -2023,7 +2023,7 @@ final (rtx first, FILE *file, int optimize_p)
       insn = final_scan_insn (insn, file, optimize_p, 0, &seen);
     }
 
-  if (flag_debug_asm)
+  if (GCC_OPTION (flag_debug_asm))
     {
       free (start_to_bb);
       free (end_to_bb);
@@ -2251,11 +2251,11 @@ final_scan_insn (rtx insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
 	  break;
 
 	case NOTE_INSN_BLOCK_BEG:
-	  if (debug_info_level == DINFO_LEVEL_NORMAL
-	      || debug_info_level == DINFO_LEVEL_VERBOSE
-	      || write_symbols == DWARF2_DEBUG
-	      || write_symbols == VMS_AND_DWARF2_DEBUG
-	      || write_symbols == VMS_DEBUG)
+	  if (GCC_OPTION (debug_info_level) == DINFO_LEVEL_NORMAL
+	      || GCC_OPTION (debug_info_level) == DINFO_LEVEL_VERBOSE
+	      || GCC_OPTION (write_symbols) == DWARF2_DEBUG
+	      || GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG
+	      || GCC_OPTION (write_symbols) == VMS_DEBUG)
 	    {
 	      int n = BLOCK_NUMBER (NOTE_BLOCK (insn));
 
@@ -2270,8 +2270,8 @@ final_scan_insn (rtx insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
 	      /* Mark this block as output.  */
 	      TREE_ASM_WRITTEN (NOTE_BLOCK (insn)) = 1;
 	    }
-	  if (write_symbols == DBX_DEBUG
-	      || write_symbols == SDB_DEBUG)
+	  if (GCC_OPTION (write_symbols) == DBX_DEBUG
+	      || GCC_OPTION (write_symbols) == SDB_DEBUG)
 	    {
 	      location_t *locus_ptr
 		= block_nonartificial_location (NOTE_BLOCK (insn));
@@ -2285,11 +2285,11 @@ final_scan_insn (rtx insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
 	  break;
 
 	case NOTE_INSN_BLOCK_END:
-	  if (debug_info_level == DINFO_LEVEL_NORMAL
-	      || debug_info_level == DINFO_LEVEL_VERBOSE
-	      || write_symbols == DWARF2_DEBUG
-	      || write_symbols == VMS_AND_DWARF2_DEBUG
-	      || write_symbols == VMS_DEBUG)
+	  if (GCC_OPTION (debug_info_level) == DINFO_LEVEL_NORMAL
+	      || GCC_OPTION (debug_info_level) == DINFO_LEVEL_VERBOSE
+	      || GCC_OPTION (write_symbols) == DWARF2_DEBUG
+	      || GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG
+	      || GCC_OPTION (write_symbols) == VMS_DEBUG)
 	    {
 	      int n = BLOCK_NUMBER (NOTE_BLOCK (insn));
 
@@ -2302,8 +2302,8 @@ final_scan_insn (rtx insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
 	      if (!DECL_IGNORED_P (current_function_decl))
 		debug_hooks->end_block (high_block_linenum, n);
 	    }
-	  if (write_symbols == DBX_DEBUG
-	      || write_symbols == SDB_DEBUG)
+	  if (GCC_OPTION (write_symbols) == DBX_DEBUG
+	      || GCC_OPTION (write_symbols) == SDB_DEBUG)
 	    {
 	      tree outer_block = BLOCK_SUPERCONTEXT (NOTE_BLOCK (insn));
 	      location_t *locus_ptr
@@ -2835,7 +2835,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
 #ifdef HAVE_peephole
 	/* Do machine-specific peephole optimizations if desired.  */
 
-	if (optimize_p && !flag_no_peephole && !nopeepholes)
+	if (optimize_p && !GCC_OPTION (flag_no_peephole) && !nopeepholes)
 	  {
 	    rtx next = peephole (insn);
 	    /* When peepholing, if there were notes within the peephole,
@@ -2877,7 +2877,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
 	/* Dump the insn in the assembly for debugging (-dAP).
 	   If the final dump is requested as slim RTL, dump slim
 	   RTL to the assembly file also.  */
-	if (flag_dump_rtl_in_asm)
+	if (GCC_OPTION (flag_dump_rtl_in_asm))
 	  {
 	    print_rtx_head = ASM_COMMENT_START;
 	    if (! (dump_flags & TDF_SLIM))
@@ -3607,9 +3607,9 @@ output_asm_insn (const char *templ, rtx *operands)
     switch (c)
       {
       case '\n':
-	if (flag_verbose_asm)
+	if (GCC_OPTION (flag_verbose_asm))
 	  output_asm_operand_names (operands, oporder, ops);
-	if (flag_print_asm_name)
+	if (GCC_OPTION (flag_print_asm_name))
 	  output_asm_name ();
 
 	ops = 0;
@@ -3738,9 +3738,9 @@ output_asm_insn (const char *templ, rtx *operands)
       }
 
   /* Write out the variable names for operands, if we know them.  */
-  if (flag_verbose_asm)
+  if (GCC_OPTION (flag_verbose_asm))
     output_asm_operand_names (operands, oporder, ops);
-  if (flag_print_asm_name)
+  if (GCC_OPTION (flag_print_asm_name))
     output_asm_name ();
 
   putc ('\n', asm_out_file);
@@ -4240,7 +4240,7 @@ leaf_function_p (void)
 {
   rtx insn;
 
-  if (crtl->profile || profile_arc_flag)
+  if (crtl->profile || GCC_OPTION (profile_arc_flag))
     return 0;
 
   for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
@@ -4423,8 +4423,8 @@ rest_of_handle_final (void)
   fnname = XSTR (x, 0);
 
   assemble_start_function (current_function_decl, fnname);
-  final_start_function (get_insns (), asm_out_file, optimize);
-  final (get_insns (), asm_out_file, optimize);
+  final_start_function (get_insns (), asm_out_file, GCC_OPTION (optimize));
+  final (get_insns (), asm_out_file, GCC_OPTION (optimize));
   final_end_function ();
 
   /* The IA-64 ".handlerdata" directive must be issued before the ".endp"
@@ -4439,7 +4439,7 @@ rest_of_handle_final (void)
   /* Free up reg info memory.  */
   free_reg_info ();
 
-  if (! quiet_flag)
+  if (! GCC_OPTION (quiet_flag))
     fflush (asm_out_file);
 
   /* Write DBX symbols if requested.  */
@@ -4563,22 +4563,22 @@ rest_of_clean_state (void)
 {
   rtx insn, next;
   FILE *final_output = NULL;
-  int save_unnumbered = flag_dump_unnumbered;
-  int save_noaddr = flag_dump_noaddr;
+  int save_unnumbered = GCC_OPTION (flag_dump_unnumbered);
+  int save_noaddr = GCC_OPTION (flag_dump_noaddr);
 
-  if (flag_dump_final_insns)
+  if (GCC_OPTION (flag_dump_final_insns))
     {
-      final_output = fopen (flag_dump_final_insns, "a");
+      final_output = fopen (GCC_OPTION (flag_dump_final_insns), "a");
       if (!final_output)
 	{
 	  error ("could not open final insn dump file %qs: %m",
-		 flag_dump_final_insns);
-	  flag_dump_final_insns = NULL;
+		 GCC_OPTION (flag_dump_final_insns));
+	  GCC_OPTION (flag_dump_final_insns) = NULL;
 	}
       else
 	{
-	  flag_dump_noaddr = flag_dump_unnumbered = 1;
-	  if (flag_compare_debug_opt || flag_compare_debug)
+	  GCC_OPTION (flag_dump_noaddr) = GCC_OPTION (flag_dump_unnumbered) = 1;
+	  if (GCC_OPTION (flag_compare_debug_opt) || GCC_OPTION (flag_compare_debug))
 	    dump_flags |= TDF_NOUID;
 	  dump_function_header (final_output, current_function_decl,
 				dump_flags);
@@ -4618,15 +4618,15 @@ rest_of_clean_state (void)
 
   if (final_output)
     {
-      flag_dump_noaddr = save_noaddr;
-      flag_dump_unnumbered = save_unnumbered;
+      GCC_OPTION (flag_dump_noaddr) = save_noaddr;
+      GCC_OPTION (flag_dump_unnumbered) = save_unnumbered;
       final_insns_dump_p = false;
 
       if (fclose (final_output))
 	{
 	  error ("could not close final insn dump file %qs: %m",
-		 flag_dump_final_insns);
-	  flag_dump_final_insns = NULL;
+		 GCC_OPTION (flag_dump_final_insns));
+	  GCC_OPTION (flag_dump_final_insns) = NULL;
 	}
     }
 
@@ -4634,7 +4634,7 @@ rest_of_clean_state (void)
      don't leave any temporary anonymous types
      queued up for sdb output.  */
 #ifdef SDB_DEBUGGING_INFO
-  if (write_symbols == SDB_DEBUG)
+  if (GCC_OPTION (write_symbols) == SDB_DEBUG)
     sdbout_types (NULL_TREE);
 #endif
 
diff --git a/gcc/flags.h b/gcc/flags.h
index 475d428..cfbdbc4 100644
--- a/gcc/flags.h
+++ b/gcc/flags.h
@@ -91,10 +91,10 @@ extern struct target_flag_state *this_target_flag_state;
    greater is in use.  */
 
 #define abi_version_at_least(N) \
-  (flag_abi_version == 0 || flag_abi_version >= (N))
+  (GCC_OPTION (flag_abi_version) == 0 || GCC_OPTION (flag_abi_version) >= (N))
 
 /* Whether to emit an overflow warning whose code is C.  */
-#define issue_strict_overflow_warning(c) (warn_strict_overflow >= (int) (c))
+#define issue_strict_overflow_warning(c) (GCC_OPTION (warn_strict_overflow) >= (int) (c))
 
 #endif
 
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 891c0d5..b08c26f 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -352,7 +352,7 @@ negate_mathfn_p (enum built_in_function code)
     CASE_FLT_FN (BUILT_IN_LRINT):
     CASE_FLT_FN (BUILT_IN_NEARBYINT):
     CASE_FLT_FN (BUILT_IN_RINT):
-      return !flag_rounding_math;
+      return !GCC_OPTION (flag_rounding_math);
 
     default:
       break;
@@ -575,7 +575,7 @@ fold_negate_expr (location_t loc, tree t)
     case REAL_CST:
       tem = fold_negate_const (t, type);
       /* Two's complement FP formats, such as c4x, may overflow.  */
-      if (!TREE_OVERFLOW (tem) || !flag_trapping_math)
+      if (!TREE_OVERFLOW (tem) || !GCC_OPTION (flag_trapping_math))
 	return tem;
       break;
 
@@ -830,7 +830,7 @@ split_tree (tree in, enum tree_code code, tree *conp, tree *litp,
       || TREE_CODE (in) == FIXED_CST)
     *litp = in;
   else if (TREE_CODE (in) == code
-	   || ((! FLOAT_TYPE_P (TREE_TYPE (in)) || flag_associative_math)
+	   || ((! FLOAT_TYPE_P (TREE_TYPE (in)) || GCC_OPTION (flag_associative_math))
 	       && ! SAT_FIXED_POINT_TYPE_P (TREE_TYPE (in))
 	       /* We can associate addition and subtraction together (even
 		  though the C standard doesn't say so) for integers because
@@ -1212,7 +1212,7 @@ const_binop (enum tree_code code, tree arg1, tree arg2)
 	 by zero exception.  */
       if (code == RDIV_EXPR
 	  && REAL_VALUES_EQUAL (d2, dconst0)
-	  && (flag_trapping_math || ! MODE_HAS_INFINITIES (mode)))
+	  && (GCC_OPTION (flag_trapping_math) || ! MODE_HAS_INFINITIES (mode)))
 	return NULL_TREE;
 
       /* If either operand is a NaN, just return it.  Otherwise, set up
@@ -1227,7 +1227,7 @@ const_binop (enum tree_code code, tree arg1, tree arg2)
 
       /* Don't constant fold this floating point operation if
 	 the result has overflowed and flag_trapping_math.  */
-      if (flag_trapping_math
+      if (GCC_OPTION (flag_trapping_math)
 	  && MODE_HAS_INFINITIES (mode)
 	  && REAL_VALUE_ISINF (result)
 	  && !REAL_VALUE_ISINF (d1)
@@ -1238,8 +1238,8 @@ const_binop (enum tree_code code, tree arg1, tree arg2)
 	 result may dependent upon the run-time rounding mode and
 	 flag_rounding_math is set, or if GCC's software emulation
 	 is unable to accurately represent the result.  */
-      if ((flag_rounding_math
-	   || (MODE_COMPOSITE_P (mode) && !flag_unsafe_math_optimizations))
+      if ((GCC_OPTION (flag_rounding_math)
+	   || (MODE_COMPOSITE_P (mode) && !GCC_OPTION (flag_unsafe_math_optimizations)))
 	  && (inexact || !real_identical (&result, &value)))
 	return NULL_TREE;
 
@@ -1331,7 +1331,7 @@ const_binop (enum tree_code code, tree arg1, tree arg2)
 	case CEIL_DIV_EXPR:
 	case FLOOR_DIV_EXPR:
 	case ROUND_DIV_EXPR:
-	  if (flag_complex_method == 0)
+	  if (GCC_OPTION (flag_complex_method) == 0)
 	  {
 	    /* Keep this algorithm in sync with
 	       tree-complex.c:expand_complex_div_straight().
@@ -2208,7 +2208,7 @@ pedantic_non_lvalue_loc (location_t loc, tree x)
 enum tree_code
 invert_tree_comparison (enum tree_code code, bool honor_nans)
 {
-  if (honor_nans && flag_trapping_math && code != EQ_EXPR && code != NE_EXPR
+  if (honor_nans && GCC_OPTION (flag_trapping_math) && code != EQ_EXPR && code != NE_EXPR
       && code != ORDERED_EXPR && code != UNORDERED_EXPR)
     return ERROR_MARK;
 
@@ -2409,7 +2409,7 @@ combine_comparisons (location_t loc,
       else if (compcode == COMPCODE_ORD)
 	compcode = COMPCODE_TRUE;
     }
-   else if (flag_trapping_math)
+   else if (GCC_OPTION (flag_trapping_math))
      {
 	/* Check that the original operation and the optimized ones will trap
 	   under the same condition.  */
@@ -3180,7 +3180,7 @@ fold_truth_not_expr (location_t loc, tree arg)
     {
       tree op_type = TREE_TYPE (TREE_OPERAND (arg, 0));
       if (FLOAT_TYPE_P (op_type)
-	  && flag_trapping_math
+	  && GCC_OPTION (flag_trapping_math)
 	  && code != ORDERED_EXPR && code != UNORDERED_EXPR
 	  && code != NE_EXPR && code != EQ_EXPR)
 	return NULL_TREE;
@@ -4732,7 +4732,7 @@ fold_cond_expr_with_comparison (location_t loc, tree type,
 	return pedantic_non_lvalue_loc (loc, fold_convert_loc (loc, type, arg1));
       case UNGE_EXPR:
       case UNGT_EXPR:
-	if (flag_trapping_math)
+	if (GCC_OPTION (flag_trapping_math))
 	  break;
 	/* Fall through.  */
       case GE_EXPR:
@@ -4744,7 +4744,7 @@ fold_cond_expr_with_comparison (location_t loc, tree type,
 	return pedantic_non_lvalue_loc (loc, fold_convert_loc (loc, type, tem));
       case UNLE_EXPR:
       case UNLT_EXPR:
-	if (flag_trapping_math)
+	if (GCC_OPTION (flag_trapping_math))
 	  break;
       case LE_EXPR:
       case LT_EXPR:
@@ -6680,7 +6680,7 @@ fold_single_bit_test (location_t loc, enum tree_code code,
 	 Normally unsigned is faster, but for some machines signed is.  */
 #ifdef LOAD_EXTEND_OP
       ops_unsigned = (LOAD_EXTEND_OP (operand_mode) == SIGN_EXTEND
-		      && !flag_syntax_only) ? 0 : 1;
+		      && !GCC_OPTION (flag_syntax_only)) ? 0 : 1;
 #else
       ops_unsigned = 1;
 #endif
@@ -6716,7 +6716,7 @@ fold_single_bit_test (location_t loc, enum tree_code code,
 static bool
 reorder_operands_p (const_tree arg0, const_tree arg1)
 {
-  if (! flag_evaluation_order)
+  if (! GCC_OPTION (flag_evaluation_order))
       return true;
   if (TREE_CONSTANT (arg0) || TREE_CONSTANT (arg1))
     return true;
@@ -6763,7 +6763,7 @@ tree_swap_operands_p (const_tree arg0, const_tree arg1, bool reorder)
   if (optimize_function_for_size_p (cfun))
     return 0;
 
-  if (reorder && flag_evaluation_order
+  if (reorder && GCC_OPTION (flag_evaluation_order)
       && (TREE_SIDE_EFFECTS (arg0) || TREE_SIDE_EFFECTS (arg1)))
     return 0;
 
@@ -7922,7 +7922,7 @@ fold_unary_loc (location_t loc, enum tree_code code, tree type, tree op0)
 		     && (INTEGRAL_TYPE_P
 			 (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (tem, 1), 0))))
 		     && TYPE_PRECISION (TREE_TYPE (tem)) <= BITS_PER_WORD)
-		  || flag_syntax_only))
+		  || GCC_OPTION (flag_syntax_only)))
 	    tem = build1_loc (loc, code, type,
 			      build3 (COND_EXPR,
 				      TREE_TYPE (TREE_OPERAND
@@ -8131,7 +8131,7 @@ fold_unary_loc (location_t loc, enum tree_code code, tree type, tree op0)
 	      change = (cst == 0);
 #ifdef LOAD_EXTEND_OP
 	      if (change
-		  && !flag_syntax_only
+		  && !GCC_OPTION (flag_syntax_only)
 		  && (LOAD_EXTEND_OP (TYPE_MODE (TREE_TYPE (and0)))
 		      == ZERO_EXTEND))
 		{
@@ -8594,7 +8594,7 @@ fold_truth_andor (location_t loc, enum tree_code code, tree type,
   tree tem;
 
   /* We only do these simplifications if we are optimizing.  */
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     return NULL_TREE;
 
   /* Check for things like (A || B) && (A || C).  We can convert this
@@ -9456,7 +9456,7 @@ fold_comparison (location_t loc, enum tree_code code, tree type,
 	 or a MINUS_EXPR of a real constant, we can convert it into a
 	 comparison with a revised real constant as long as no overflow
 	 occurs when unsafe_math_optimizations are enabled.  */
-      if (flag_unsafe_math_optimizations
+      if (GCC_OPTION (flag_unsafe_math_optimizations)
 	  && TREE_CODE (arg1) == REAL_CST
 	  && (TREE_CODE (arg0) == PLUS_EXPR
 	      || TREE_CODE (arg0) == MINUS_EXPR)
@@ -9471,7 +9471,7 @@ fold_comparison (location_t loc, enum tree_code code, tree type,
          a MINUS_EXPR whose first operand is also a real constant, i.e.
          (c1 - x) < c2 becomes x > c1-c2.  Reordering is allowed on
          floating-point types only if -fassociative-math is set.  */
-      if (flag_associative_math
+      if (GCC_OPTION (flag_associative_math)
 	  && TREE_CODE (arg1) == REAL_CST
 	  && TREE_CODE (arg0) == MINUS_EXPR
 	  && TREE_CODE (TREE_OPERAND (arg0, 0)) == REAL_CST
@@ -9483,8 +9483,8 @@ fold_comparison (location_t loc, enum tree_code code, tree type,
 
       /* Fold comparisons against built-in math functions.  */
       if (TREE_CODE (arg1) == REAL_CST
-	  && flag_unsafe_math_optimizations
-	  && ! flag_errno_math)
+	  && GCC_OPTION (flag_unsafe_math_optimizations)
+	  && ! GCC_OPTION (flag_errno_math))
 	{
 	  enum built_in_function fcode = builtin_mathfn_code (arg0);
 
@@ -10062,11 +10062,11 @@ tree_expr_nonzero_warnv_p (tree t, bool *strict_overflow_p)
       {
 	tree fndecl = get_callee_fndecl (t);
 	if (!fndecl) return false;
-	if (flag_delete_null_pointer_checks && !flag_check_new
+	if (GCC_OPTION (flag_delete_null_pointer_checks) && !GCC_OPTION (flag_check_new)
 	    && DECL_IS_OPERATOR_NEW (fndecl)
 	    && !TREE_NOTHROW (fndecl))
 	  return true;
-	if (flag_delete_null_pointer_checks
+	if (GCC_OPTION (flag_delete_null_pointer_checks)
 	    && lookup_attribute ("returns_nonnull",
 		 TYPE_ATTRIBUTES (TREE_TYPE (fndecl))))
 	  return true;
@@ -10351,7 +10351,7 @@ fold_binary_loc (location_t loc,
     case PLUS_EXPR:
       /* A + (-B) -> A - B */
       if (TREE_CODE (arg1) == NEGATE_EXPR
-	  && (flag_sanitize & SANITIZE_SI_OVERFLOW) == 0)
+	  && (GCC_OPTION (flag_sanitize) & SANITIZE_SI_OVERFLOW) == 0)
 	return fold_build2_loc (loc, MINUS_EXPR, type,
 			    fold_convert_loc (loc, type, arg0),
 			    fold_convert_loc (loc, type,
@@ -10359,7 +10359,7 @@ fold_binary_loc (location_t loc,
       /* (-A) + B -> B - A */
       if (TREE_CODE (arg0) == NEGATE_EXPR
 	  && reorder_operands_p (TREE_OPERAND (arg0, 0), arg1)
-	  && (flag_sanitize & SANITIZE_SI_OVERFLOW) == 0)
+	  && (GCC_OPTION (flag_sanitize) & SANITIZE_SI_OVERFLOW) == 0)
 	return fold_build2_loc (loc, MINUS_EXPR, type,
 			    fold_convert_loc (loc, type, arg1),
 			    fold_convert_loc (loc, type,
@@ -10429,7 +10429,7 @@ fold_binary_loc (location_t loc,
 	  && !TYPE_SATURATING (type)
 	  && TYPE_UNSIGNED (type) == TYPE_UNSIGNED (TREE_TYPE (arg0))
 	  && TYPE_UNSIGNED (type) == TYPE_UNSIGNED (TREE_TYPE (arg1))
-	  && (!FLOAT_TYPE_P (type) || flag_associative_math))
+	  && (!FLOAT_TYPE_P (type) || GCC_OPTION (flag_associative_math)))
         {
 	  tree tem = fold_plusminus_mult_expr (loc, code, type, arg0, arg1);
 	  if (tem)
@@ -10516,7 +10516,7 @@ fold_binary_loc (location_t loc,
 	      && REAL_VALUE_NEGATIVE (TREE_REAL_CST (arg1)))
 	    {
 	      tem = fold_negate_const (arg1, type);
-	      if (!TREE_OVERFLOW (arg1) || !flag_trapping_math)
+	      if (!TREE_OVERFLOW (arg1) || !GCC_OPTION (flag_trapping_math))
 		return fold_build2_loc (loc, MINUS_EXPR, type,
 				    fold_convert_loc (loc, type, arg0),
 				    fold_convert_loc (loc, type, tem));
@@ -10557,7 +10557,7 @@ fold_binary_loc (location_t loc,
 		}
 	    }
 
-	  if (flag_unsafe_math_optimizations
+	  if (GCC_OPTION (flag_unsafe_math_optimizations)
 	      && (TREE_CODE (arg0) == RDIV_EXPR || TREE_CODE (arg0) == MULT_EXPR)
 	      && (TREE_CODE (arg1) == RDIV_EXPR || TREE_CODE (arg1) == MULT_EXPR)
 	      && (tem = distribute_real_division (loc, code, type, arg0, arg1)))
@@ -10572,7 +10572,7 @@ fold_binary_loc (location_t loc,
           /* Convert a + (b*c + d*e) into (a + b*c) + d*e.
              We associate floats only if the user has specified
              -fassociative-math.  */
-          if (flag_associative_math
+          if (GCC_OPTION (flag_associative_math)
               && TREE_CODE (arg1) == PLUS_EXPR
               && TREE_CODE (arg0) != MULT_EXPR)
             {
@@ -10589,7 +10589,7 @@ fold_binary_loc (location_t loc,
           /* Convert (b*c + d*e) + a into b*c + (d*e +a).
              We associate floats only if the user has specified
              -fassociative-math.  */
-          if (flag_associative_math
+          if (GCC_OPTION (flag_associative_math)
               && TREE_CODE (arg0) == PLUS_EXPR
               && TREE_CODE (arg1) != MULT_EXPR)
             {
@@ -10700,7 +10700,7 @@ fold_binary_loc (location_t loc,
 	 -fassociative-math.
 	 And, we need to make sure type is not saturating.  */
 
-      if ((! FLOAT_TYPE_P (type) || flag_associative_math)
+      if ((! FLOAT_TYPE_P (type) || GCC_OPTION (flag_associative_math))
 	  && !TYPE_SATURATING (type))
 	{
 	  tree var0, con0, lit0, minus_lit0;
@@ -11057,7 +11057,7 @@ fold_binary_loc (location_t loc,
 	}
 
       if (FLOAT_TYPE_P (type)
-	  && flag_unsafe_math_optimizations
+	  && GCC_OPTION (flag_unsafe_math_optimizations)
 	  && (TREE_CODE (arg0) == RDIV_EXPR || TREE_CODE (arg0) == MULT_EXPR)
 	  && (TREE_CODE (arg1) == RDIV_EXPR || TREE_CODE (arg1) == MULT_EXPR)
 	  && (tem = distribute_real_division (loc, code, type, arg0, arg1)))
@@ -11072,7 +11072,7 @@ fold_binary_loc (location_t loc,
 	  && !TYPE_SATURATING (type)
 	  && TYPE_UNSIGNED (type) == TYPE_UNSIGNED (TREE_TYPE (arg0))
 	  && TYPE_UNSIGNED (type) == TYPE_UNSIGNED (TREE_TYPE (arg1))
-	  && (!FLOAT_TYPE_P (type) || flag_associative_math))
+	  && (!FLOAT_TYPE_P (type) || GCC_OPTION (flag_associative_math)))
         {
 	  tree tem = fold_plusminus_mult_expr (loc, code, type, arg0, arg1);
 	  if (tem)
@@ -11196,7 +11196,7 @@ fold_binary_loc (location_t loc,
 	  /* Convert (C1/X)*C2 into (C1*C2)/X.  This transformation may change
              the result for floating point types due to rounding so it is applied
              only if -fassociative-math was specify.  */
-	  if (flag_associative_math
+	  if (GCC_OPTION (flag_associative_math)
 	      && TREE_CODE (arg0) == RDIV_EXPR
 	      && TREE_CODE (arg1) == REAL_CST
 	      && TREE_CODE (TREE_OPERAND (arg0, 0)) == REAL_CST)
@@ -11246,16 +11246,16 @@ fold_binary_loc (location_t loc,
 	  /* Optimize z * conj(z) for floating point complex numbers.
 	     Guarded by flag_unsafe_math_optimizations as non-finite
 	     imaginary components don't produce scalar results.  */
-	  if (flag_unsafe_math_optimizations
+	  if (GCC_OPTION (flag_unsafe_math_optimizations)
 	      && TREE_CODE (arg0) == CONJ_EXPR
 	      && operand_equal_p (TREE_OPERAND (arg0, 0), arg1, 0))
 	    return fold_mult_zconjz (loc, type, arg1);
-	  if (flag_unsafe_math_optimizations
+	  if (GCC_OPTION (flag_unsafe_math_optimizations)
 	      && TREE_CODE (arg1) == CONJ_EXPR
 	      && operand_equal_p (arg0, TREE_OPERAND (arg1, 0), 0))
 	    return fold_mult_zconjz (loc, type, arg0);
 
-	  if (flag_unsafe_math_optimizations)
+	  if (GCC_OPTION (flag_unsafe_math_optimizations))
 	    {
 	      enum built_in_function fcode0 = builtin_mathfn_code (arg0);
 	      enum built_in_function fcode1 = builtin_mathfn_code (arg1);
@@ -11381,7 +11381,7 @@ fold_binary_loc (location_t loc,
 
 	      /* Canonicalize x*x as pow(x,2.0), which is expanded as x*x.  */
 	      if (!in_gimple_form
-		  && optimize
+		  && GCC_OPTION (optimize)
 		  && operand_equal_p (arg0, arg1, 0))
 		{
 		  tree powfn = mathfn_built_in (type, BUILT_IN_POW);
@@ -12210,14 +12210,14 @@ fold_binary_loc (location_t loc,
 	 so only do this if -freciprocal-math.  We can actually
 	 always safely do it if ARG1 is a power of two, but it's hard to
 	 tell if it is or not in a portable manner.  */
-      if (optimize
+      if (GCC_OPTION (optimize)
 	  && (TREE_CODE (arg1) == REAL_CST
 	      || (TREE_CODE (arg1) == COMPLEX_CST
 		  && COMPLEX_FLOAT_TYPE_P (TREE_TYPE (arg1)))
 	      || (TREE_CODE (arg1) == VECTOR_CST
 		  && VECTOR_FLOAT_TYPE_P (TREE_TYPE (arg1)))))
 	{
-	  if (flag_reciprocal_math
+	  if (GCC_OPTION (flag_reciprocal_math)
 	      && 0 != (tem = const_binop (code, build_one_cst (type), arg1)))
 	    return fold_build2_loc (loc, MULT_EXPR, type, arg0, tem);
 	  /* Find the reciprocal if optimizing and the result is exact.
@@ -12231,14 +12231,14 @@ fold_binary_loc (location_t loc,
 	    }
 	}
       /* Convert A/B/C to A/(B*C).  */
-      if (flag_reciprocal_math
+      if (GCC_OPTION (flag_reciprocal_math)
 	  && TREE_CODE (arg0) == RDIV_EXPR)
 	return fold_build2_loc (loc, RDIV_EXPR, type, TREE_OPERAND (arg0, 0),
 			    fold_build2_loc (loc, MULT_EXPR, type,
 					 TREE_OPERAND (arg0, 1), arg1));
 
       /* Convert A/(B/C) to (A/B)*C.  */
-      if (flag_reciprocal_math
+      if (GCC_OPTION (flag_reciprocal_math)
 	  && TREE_CODE (arg1) == RDIV_EXPR)
 	return fold_build2_loc (loc, MULT_EXPR, type,
 			    fold_build2_loc (loc, RDIV_EXPR, type, arg0,
@@ -12246,7 +12246,7 @@ fold_binary_loc (location_t loc,
 			    TREE_OPERAND (arg1, 1));
 
       /* Convert C1/(X*C2) into (C1/C2)/X.  */
-      if (flag_reciprocal_math
+      if (GCC_OPTION (flag_reciprocal_math)
 	  && TREE_CODE (arg1) == MULT_EXPR
 	  && TREE_CODE (arg0) == REAL_CST
 	  && TREE_CODE (TREE_OPERAND (arg1, 1)) == REAL_CST)
@@ -12258,7 +12258,7 @@ fold_binary_loc (location_t loc,
 				TREE_OPERAND (arg1, 0));
 	}
 
-      if (flag_unsafe_math_optimizations)
+      if (GCC_OPTION (flag_unsafe_math_optimizations))
 	{
 	  enum built_in_function fcode0 = builtin_mathfn_code (arg0);
 	  enum built_in_function fcode1 = builtin_mathfn_code (arg1);
@@ -13253,7 +13253,7 @@ fold_binary_loc (location_t loc,
 	   || TREE_CODE (arg0) == BIT_FIELD_REF)
 	  /* Handle the constant case even without -O
 	     to make sure the warnings are given.  */
-	  && (optimize || TREE_CODE (arg1) == INTEGER_CST))
+	  && (GCC_OPTION (optimize) || TREE_CODE (arg1) == INTEGER_CST))
 	{
 	  t1 = optimize_bit_field_compare (loc, code, type, arg0, arg1);
 	  if (t1)
@@ -13966,7 +13966,7 @@ fold_binary_loc (location_t loc,
       /* If the first operand is NaN, the result is constant.  */
       if (TREE_CODE (arg0) == REAL_CST
 	  && REAL_VALUE_ISNAN (TREE_REAL_CST (arg0))
-	  && (code != LTGT_EXPR || ! flag_trapping_math))
+	  && (code != LTGT_EXPR || ! GCC_OPTION (flag_trapping_math)))
 	{
 	  t1 = (code == ORDERED_EXPR || code == LTGT_EXPR)
 	       ? integer_zero_node
@@ -13977,7 +13977,7 @@ fold_binary_loc (location_t loc,
       /* If the second operand is NaN, the result is constant.  */
       if (TREE_CODE (arg1) == REAL_CST
 	  && REAL_VALUE_ISNAN (TREE_REAL_CST (arg1))
-	  && (code != LTGT_EXPR || ! flag_trapping_math))
+	  && (code != LTGT_EXPR || ! GCC_OPTION (flag_trapping_math)))
 	{
 	  t1 = (code == ORDERED_EXPR || code == LTGT_EXPR)
 	       ? integer_zero_node
@@ -13991,7 +13991,7 @@ fold_binary_loc (location_t loc,
 	return constant_boolean_node (1, type);
 
       if (code == LTGT_EXPR
-	  && !flag_trapping_math
+	  && !GCC_OPTION (flag_trapping_math)
 	  && operand_equal_p (arg0, arg1, 0))
 	return constant_boolean_node (0, type);
 
@@ -15345,22 +15345,22 @@ fold_build_call_array_loc (location_t loc, tree type, tree fn,
    potential run-time traps and exceptions that fold must preserve.  */
 
 #define START_FOLD_INIT \
-  int saved_signaling_nans = flag_signaling_nans;\
-  int saved_trapping_math = flag_trapping_math;\
-  int saved_rounding_math = flag_rounding_math;\
-  int saved_trapv = flag_trapv;\
+  int saved_signaling_nans = GCC_OPTION (flag_signaling_nans);\
+  int saved_trapping_math = GCC_OPTION (flag_trapping_math);\
+  int saved_rounding_math = GCC_OPTION (flag_rounding_math);\
+  int saved_trapv = GCC_OPTION (flag_trapv);\
   int saved_folding_initializer = folding_initializer;\
-  flag_signaling_nans = 0;\
-  flag_trapping_math = 0;\
-  flag_rounding_math = 0;\
-  flag_trapv = 0;\
+  GCC_OPTION (flag_signaling_nans) = 0;\
+  GCC_OPTION (flag_trapping_math) = 0;\
+  GCC_OPTION (flag_rounding_math) = 0;\
+  GCC_OPTION (flag_trapv) = 0;\
   folding_initializer = 1;
 
 #define END_FOLD_INIT \
-  flag_signaling_nans = saved_signaling_nans;\
-  flag_trapping_math = saved_trapping_math;\
-  flag_rounding_math = saved_rounding_math;\
-  flag_trapv = saved_trapv;\
+  GCC_OPTION (flag_signaling_nans) = saved_signaling_nans;\
+  GCC_OPTION (flag_trapping_math) = saved_trapping_math;\
+  GCC_OPTION (flag_rounding_math) = saved_rounding_math;\
+  GCC_OPTION (flag_trapv) = saved_trapv;\
   folding_initializer = saved_folding_initializer;
 
 tree
@@ -16247,7 +16247,7 @@ tree_single_nonzero_warnv_p (tree t, bool *strict_overflow_p)
 	   so protect with -fdelete-null-pointer-checks; but not variables
 	   allocated on the stack.  */
 	if (DECL_P (base)
-	    && (flag_delete_null_pointer_checks
+	    && (GCC_OPTION (flag_delete_null_pointer_checks)
 		|| (DECL_CONTEXT (base)
 		    && TREE_CODE (DECL_CONTEXT (base)) == FUNCTION_DECL
 		    && auto_var_in_fn_p (base, DECL_CONTEXT (base)))))
@@ -16513,7 +16513,7 @@ fold_relational_const (enum tree_code code, tree type, tree op0, tree op1)
 	    case GT_EXPR:
 	    case GE_EXPR:
 	    case LTGT_EXPR:
-	      if (flag_trapping_math)
+	      if (GCC_OPTION (flag_trapping_math))
 		return NULL_TREE;
 	      result = 0;
 	      break;
diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c
index 053cf76..fff0d36 100644
--- a/gcc/fortran/arith.c
+++ b/gcc/fortran/arith.c
@@ -294,7 +294,7 @@ gfc_check_integer_range (mpz_t p, int kind)
   i = gfc_validate_kind (BT_INTEGER, kind, false);
   result = ARITH_OK;
 
-  if (pedantic)
+  if (GCC_OPTION (pedantic))
     {
       if (mpz_cmp (p, gfc_integer_kinds[i].pedantic_min_int) < 0)
 	result = ARITH_ASYMMETRIC;
diff --git a/gcc/fortran/cpp.c b/gcc/fortran/cpp.c
index 68ce91f..e5b54c7 100644
--- a/gcc/fortran/cpp.c
+++ b/gcc/fortran/cpp.c
@@ -468,7 +468,7 @@ gfc_cpp_post_options (void)
   cpp_option->traditional = 1;
   cpp_option->cplusplus_comments = 0;
 
-  cpp_option->cpp_pedantic = pedantic;
+  cpp_option->cpp_pedantic = GCC_OPTION (pedantic);
 
   cpp_option->dollars_in_ident = gfc_option.flag_dollar_ok;
   cpp_option->discard_comments = gfc_cpp_option.discard_comments;
@@ -489,7 +489,7 @@ gfc_cpp_post_options (void)
   }
 
   if (gfc_cpp_option.working_directory == -1)
-    gfc_cpp_option.working_directory = (debug_info_level != DINFO_LEVEL_NONE);
+    gfc_cpp_option.working_directory = (GCC_OPTION (debug_info_level) != DINFO_LEVEL_NONE);
 
   cpp_post_options (cpp_in);
 
@@ -544,7 +544,7 @@ gfc_cpp_init_0 (void)
 	     is necessary to redirect assembler output (actually nothing
 	     as -E implies -fsyntax-only) to another file, otherwise the
 	     output from preprocessing is lost.  */
-	  asm_file_name = gfc_cpp_option.temporary_filename;
+	  GCC_OPTION (asm_file_name) = gfc_cpp_option.temporary_filename;
 
 	  print.outf = fopen (gfc_cpp_option.output_filename, "w");
 	  if (print.outf == NULL)
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 4048ac9..c5cb40d 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -5940,7 +5940,7 @@ set_enum_kind(void)
   if (max_enum == NULL || enum_history == NULL)
     return;
 
-  if (!flag_short_enums)
+  if (!GCC_OPTION (flag_short_enums))
     return;
 
   i = 0;
diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c
index e843fa5..ee293da 100644
--- a/gcc/fortran/error.c
+++ b/gcc/fortran/error.c
@@ -808,7 +808,7 @@ gfc_warning (const char *gmsgid, ...)
 {
   va_list argp;
 
-  if (inhibit_warnings)
+  if (GCC_OPTION (inhibit_warnings))
     return;
 
   warning_buffer.flag = 1;
@@ -824,7 +824,7 @@ gfc_warning (const char *gmsgid, ...)
   if (buffer_flag == 0)
   {
     warnings++;
-    if (warnings_are_errors)
+    if (GCC_OPTION (warnings_are_errors))
       gfc_increment_error_count();
   }
 }
@@ -838,7 +838,7 @@ gfc_notification_std (int std)
 {
   bool warning;
 
-  warning = ((gfc_option.warn_std & std) != 0) && !inhibit_warnings;
+  warning = ((gfc_option.warn_std & std) != 0) && !GCC_OPTION (inhibit_warnings);
   if ((gfc_option.allow_std & std) != 0 && !warning)
     return SILENT;
 
@@ -859,7 +859,7 @@ gfc_notify_std (int std, const char *gmsgid, ...)
   const char *msg1, *msg2;
   char *buffer;
 
-  warning = ((gfc_option.warn_std & std) != 0) && !inhibit_warnings;
+  warning = ((gfc_option.warn_std & std) != 0) && !GCC_OPTION (inhibit_warnings);
   if ((gfc_option.allow_std & std) != 0 && !warning)
     return true;
 
@@ -918,14 +918,14 @@ gfc_notify_std (int std, const char *gmsgid, ...)
 
   if (buffer_flag == 0)
     {
-      if (warning && !warnings_are_errors)
+      if (warning && !GCC_OPTION (warnings_are_errors))
 	warnings++;
       else
 	gfc_increment_error_count();
       cur_error_buffer->flag = 0;
     }
 
-  return (warning && !warnings_are_errors) ? true : false;
+  return (warning && !GCC_OPTION (warnings_are_errors)) ? true : false;
 }
 
 
@@ -937,7 +937,7 @@ gfc_warning_now (const char *gmsgid, ...)
   va_list argp;
   int i;
 
-  if (inhibit_warnings)
+  if (GCC_OPTION (inhibit_warnings))
     return;
 
   i = buffer_flag;
@@ -950,7 +950,7 @@ gfc_warning_now (const char *gmsgid, ...)
 
   error_char ('\0');
 
-  if (warnings_are_errors)
+  if (GCC_OPTION (warnings_are_errors))
     gfc_increment_error_count();
 
   buffer_flag = i;
@@ -1012,7 +1012,7 @@ gfc_error (const char *gmsgid, ...)
 
 warning:
 
-  if (inhibit_warnings)
+  if (GCC_OPTION (inhibit_warnings))
     return;
 
   warning_buffer.flag = 1;
@@ -1028,7 +1028,7 @@ warning:
   if (buffer_flag == 0)
   {
     warnings++;
-    if (warnings_are_errors)
+    if (GCC_OPTION (warnings_are_errors))
       gfc_increment_error_count();
   }
 }
@@ -1059,7 +1059,7 @@ gfc_error_now (const char *gmsgid, ...)
 
   buffer_flag = i;
 
-  if (flag_fatal_errors)
+  if (GCC_OPTION (flag_fatal_errors))
     exit (FATAL_EXIT_CODE);
 }
 
@@ -1139,7 +1139,7 @@ gfc_error_check (void)
 
       gfc_increment_error_count();
 
-      if (flag_fatal_errors)
+      if (GCC_OPTION (flag_fatal_errors))
 	exit (FATAL_EXIT_CODE);
     }
 
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c
index e25e92a..67057a6 100644
--- a/gcc/fortran/f95-lang.c
+++ b/gcc/fortran/f95-lang.c
@@ -223,7 +223,7 @@ gfc_init (void)
   if (!gfc_new_file ())
     fatal_error ("can't open input file: %s", gfc_source_file);
 
-  if (flag_preprocess_only)
+  if (GCC_OPTION (flag_preprocess_only))
     return false;
 
   return true;
@@ -1038,7 +1038,7 @@ gfc_init_builtin_functions (void)
 #include "../sync-builtins.def"
 #undef DEF_SYNC_BUILTIN
 
-  if (gfc_option.gfc_flag_openmp || flag_tree_parallelize_loops)
+  if (gfc_option.gfc_flag_openmp || GCC_OPTION (flag_tree_parallelize_loops))
     {
 #undef DEF_GOMP_BUILTIN
 #define DEF_GOMP_BUILTIN(code, name, type, attr) \
@@ -1081,7 +1081,7 @@ gfc_init_ts (void)
 void
 gfc_maybe_initialize_eh (void)
 {
-  if (!flag_exceptions || gfc_eh_initialized_p)
+  if (!GCC_OPTION (flag_exceptions) || gfc_eh_initialized_p)
     return;
 
   gfc_eh_initialized_p = true;
diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c
index e663868..bddec04 100644
--- a/gcc/fortran/frontend-passes.c
+++ b/gcc/fortran/frontend-passes.c
@@ -1381,7 +1381,7 @@ optimize_comparison (gfc_expr *e, gfc_intrinsic_op op)
 
   /* Don't compare REAL or COMPLEX expressions when honoring NaNs.  */
 
-  if (flag_finite_math_only
+  if (GCC_OPTION (flag_finite_math_only)
       || (op1->ts.type != BT_REAL && op2->ts.type != BT_REAL
 	  && op1->ts.type != BT_COMPLEX && op2->ts.type != BT_COMPLEX))
     {
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index 84d0db8..739b677 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -164,7 +164,7 @@ next_char (gfc_instring in_string)
       if (gfc_match_special_char (&c) == MATCH_NO)
 	gfc_current_locus = old_locus;
 
-      if (!(gfc_option.allow_std & GFC_STD_GNU) && !inhibit_warnings)
+      if (!(gfc_option.allow_std & GFC_STD_GNU) && !GCC_OPTION (inhibit_warnings))
 	gfc_warning ("Extension: backslash character at %C");
     }
 
@@ -964,7 +964,7 @@ data_desc:
       break;
 
     case FMT_H:
-      if (!(gfc_option.allow_std & GFC_STD_GNU) && !inhibit_warnings)
+      if (!(gfc_option.allow_std & GFC_STD_GNU) && !GCC_OPTION (inhibit_warnings))
 	{
 	  if (mode != MODE_FORMAT)
 	    format_locus.nextc += format_string_pos;
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index a2b91ca..dc14968 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -263,21 +263,21 @@ gfc_post_options (const char **pfilename)
 
   /* Excess precision other than "fast" requires front-end
      support.  */
-  if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD
+  if (GCC_OPTION (flag_excess_precision_cmdline) == EXCESS_PRECISION_STANDARD
       && TARGET_FLT_EVAL_METHOD_NON_DEFAULT)
     sorry ("-fexcess-precision=standard for Fortran");
-  flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
+  GCC_OPTION (flag_excess_precision_cmdline) = EXCESS_PRECISION_FAST;
 
   /* Fortran allows associative math - but we cannot reassociate if
      we want traps or signed zeros. Cf. also flag_protect_parens.  */
-  if (flag_associative_math == -1)
-    flag_associative_math = (!flag_trapping_math && !flag_signed_zeros);
+  if (GCC_OPTION (flag_associative_math) == -1)
+    GCC_OPTION (flag_associative_math) = (!GCC_OPTION (flag_trapping_math) && !GCC_OPTION (flag_signed_zeros));
 
   if (gfc_option.flag_protect_parens == -1)
-    gfc_option.flag_protect_parens = !optimize_fast;
+    gfc_option.flag_protect_parens = !GCC_OPTION (optimize_fast);
 
   if (gfc_option.flag_stack_arrays == -1)
-    gfc_option.flag_stack_arrays = optimize_fast;
+    gfc_option.flag_stack_arrays = GCC_OPTION (optimize_fast);
 
   /* By default, disable (re)allocation during assignment for -std=f95,
      and enable it for F2003/F2008/GNU/Legacy. */
@@ -290,15 +290,15 @@ gfc_post_options (const char **pfilename)
     }
 
   /* -fbounds-check is equivalent to -fcheck=bounds */
-  if (flag_bounds_check)
+  if (GCC_OPTION (flag_bounds_check))
     gfc_option.rtcheck |= GFC_RTCHECK_BOUNDS;
 
-  if (flag_compare_debug)
+  if (GCC_OPTION (flag_compare_debug))
     gfc_option.dump_fortran_original = 0;
 
   /* Make -fmax-errors visible to gfortran's diagnostic machinery.  */
   if (global_options_set.x_flag_max_errors)
-    gfc_option.max_errors = flag_max_errors;
+    gfc_option.max_errors = GCC_OPTION (flag_max_errors);
 
   /* Verify the input file name.  */
   if (!filename || strcmp (filename, "-") == 0)
@@ -369,10 +369,10 @@ gfc_post_options (const char **pfilename)
     }
 
   /* If -pedantic, warn about the use of GNU extensions.  */
-  if (pedantic && (gfc_option.allow_std & GFC_STD_GNU) != 0)
+  if (GCC_OPTION (pedantic) && (gfc_option.allow_std & GFC_STD_GNU) != 0)
     gfc_option.warn_std |= GFC_STD_GNU;
   /* -std=legacy -pedantic is effectively -std=gnu.  */
-  if (pedantic && (gfc_option.allow_std & GFC_STD_LEGACY) != 0)
+  if (GCC_OPTION (pedantic) && (gfc_option.allow_std & GFC_STD_LEGACY) != 0)
     gfc_option.warn_std |= GFC_STD_F95_OBS | GFC_STD_F95_DEL | GFC_STD_LEGACY;
 
   /* If the user didn't explicitly specify -f(no)-second-underscore we
@@ -420,7 +420,7 @@ gfc_post_options (const char **pfilename)
   if (!gfc_option.flag_automatic)
     gfc_option.flag_max_stack_var_size = 0;
   
-  if (pedantic)
+  if (GCC_OPTION (pedantic))
     { 
       gfc_option.warn_ampersand = 1;
       gfc_option.warn_tabs = 0;
@@ -430,7 +430,7 @@ gfc_post_options (const char **pfilename)
      specified it directly.  */
 
   if (gfc_option.flag_frontend_optimize == -1)
-    gfc_option.flag_frontend_optimize = optimize;
+    gfc_option.flag_frontend_optimize = GCC_OPTION (optimize);
 
   if (gfc_option.warn_realloc_lhs_all)
     gfc_option.warn_realloc_lhs = 1;
@@ -462,9 +462,9 @@ set_Wall (int setting)
   gfc_option.warn_target_lifetime = setting;
   gfc_option.warn_zerotrip = setting;
 
-  warn_return_type = setting;
-  warn_uninitialized = setting;
-  warn_maybe_uninitialized = setting;
+  GCC_OPTION (warn_return_type) = setting;
+  GCC_OPTION (warn_uninitialized) = setting;
+  GCC_OPTION (warn_maybe_uninitialized) = setting;
 }
 
 /* Set the options for -Wextra.  */
@@ -707,7 +707,7 @@ gfc_handle_option (size_t scode, const char *arg, int value,
       break;
 
     case OPT_Wreturn_type:
-      warn_return_type = value;
+      GCC_OPTION (warn_return_type) = value;
       break;
 
     case OPT_Wsurprising:
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index e2eb467..93fa45f 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -863,7 +863,7 @@ next_string_char (gfc_char_t delimiter, int *ret)
       if (gfc_match_special_char (&c) == MATCH_NO)
 	gfc_current_locus = old_locus;
 
-      if (!(gfc_option.allow_std & GFC_STD_GNU) && !inhibit_warnings)
+      if (!(gfc_option.allow_std & GFC_STD_GNU) && !GCC_OPTION (inhibit_warnings))
 	gfc_warning ("Extension: backslash character at %C");
     }
 
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 6e23e57..d163b65 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -2093,7 +2093,7 @@ resolve_elemental_actual (gfc_expr *expr, gfc_code *c)
       else if (isym)
 	formal_optional = true;
 
-      if (pedantic && arg->expr != NULL
+      if (GCC_OPTION (pedantic) && arg->expr != NULL
 	  && arg->expr->expr_type == EXPR_VARIABLE
 	  && arg->expr->symtree->n.sym->attr.optional
 	  && formal_optional
@@ -2429,7 +2429,7 @@ resolve_global_procedure (gfc_symbol *sym, locus *where,
 	  goto done;
 	}
 
-      if (!pedantic && (gfc_option.allow_std & GFC_STD_GNU))
+      if (!GCC_OPTION (pedantic) && (gfc_option.allow_std & GFC_STD_GNU))
 	/* Turn erros into warnings with -std=gnu and -std=legacy.  */
 	gfc_errors_to_warnings (1);
 
@@ -2441,7 +2441,7 @@ resolve_global_procedure (gfc_symbol *sym, locus *where,
 	  goto done;
 	}
 
-      if (!pedantic
+      if (!GCC_OPTION (pedantic)
 	  || ((gfc_option.warn_std & GFC_STD_LEGACY)
 	      && !(gfc_option.warn_std & GFC_STD_GNU)))
 	gfc_errors_to_warnings (1);
@@ -14572,7 +14572,7 @@ resolve_types (gfc_namespace *ns)
     resolve_equivalence (eq);
 
   /* Warn about unused labels.  */
-  if (warn_unused_label)
+  if (GCC_OPTION (warn_unused_label))
     warn_unused_fortran_label (ns->st_labels);
 
   gfc_resolve_uops (ns->uop_root);
diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c
index 8f51734..ec814ad 100644
--- a/gcc/fortran/scanner.c
+++ b/gcc/fortran/scanner.c
@@ -658,7 +658,7 @@ gfc_define_undef_line (void)
   char *tmp;
 
   /* All lines beginning with '#' are either #define or #undef.  */
-  if (debug_info_level != DINFO_LEVEL_VERBOSE || gfc_peek_ascii_char () != '#')
+  if (GCC_OPTION (debug_info_level) != DINFO_LEVEL_VERBOSE || gfc_peek_ascii_char () != '#')
     return 0;
 
   if (wide_strncmp (gfc_current_locus.nextc, "#define ", 8) == 0)
@@ -1107,7 +1107,7 @@ restart:
 	{
 	  if (++continue_count == gfc_option.max_continue_free)
 	    {
-	      if (gfc_notification_std (GFC_STD_GNU) || pedantic)
+	      if (gfc_notification_std (GFC_STD_GNU) || GCC_OPTION (pedantic))
 		gfc_warning ("Limit of %d continuations exceeded in "
 			     "statement at %C", gfc_option.max_continue_free);
 	    }
@@ -1239,7 +1239,7 @@ restart:
 	{
 	  if (++continue_count == gfc_option.max_continue_fixed)
 	    {
-	      if (gfc_notification_std (GFC_STD_GNU) || pedantic)
+	      if (gfc_notification_std (GFC_STD_GNU) || GCC_OPTION (pedantic))
 		gfc_warning ("Limit of %d continuations exceeded in "
 			     "statement at %C",
 			     gfc_option.max_continue_fixed);
@@ -1477,7 +1477,7 @@ load_line (FILE *input, gfc_char_t **pbuf, int *pbuflen, const int *first_char)
 	  if (gfc_current_form == FORM_FREE 
 	      && !seen_printable && seen_ampersand)
 	    {
-	      if (pedantic)
+	      if (GCC_OPTION (pedantic))
 		gfc_error_now ("'&' not allowed by itself in line %d",
 			       current_line);
 	      else
@@ -2017,7 +2017,7 @@ load_file (const char *realfilename, const char *displayedname, bool initial)
 	  /* When -g3 is specified, it's possible that we emit #define
 	     and #undef lines, which we need to pass to the middle-end
 	     so that it can emit correct debug info.  */
-	  if (debug_info_level == DINFO_LEVEL_VERBOSE
+	  if (GCC_OPTION (debug_info_level) == DINFO_LEVEL_VERBOSE
 	      && (wide_strncmp (line, "#define ", 8) == 0
 		  || wide_strncmp (line, "#undef ", 7) == 0))
 	    ;
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index cf7b661..8189895 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -3614,7 +3614,7 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, gfc_wrapped_block * block)
 		  break;
 	    }
 	  /* TODO: move to the appropriate place in resolve.c.  */
-	  if (warn_return_type && el == NULL)
+	  if (GCC_OPTION (warn_return_type) && el == NULL)
 	    gfc_warning ("Return value of function '%s' at %L not set",
 			 proc_sym->name, &proc_sym->declared_at);
 	}
@@ -4257,7 +4257,7 @@ gfc_create_module_variable (gfc_symbol * sym)
 		  && gfc_option.flag_module_private))))
     sym->attr.access = ACCESS_PRIVATE;
 
-  if (warn_unused_variable && !sym->attr.referenced
+  if (GCC_OPTION (warn_unused_variable) && !sym->attr.referenced
       && sym->attr.access == ACCESS_PRIVATE)
     gfc_warning ("Unused PRIVATE module variable '%s' declared at %L",
 		 sym->name, &sym->declared_at);
@@ -4834,7 +4834,7 @@ generate_local_decl (gfc_symbol * sym)
 
       /* Warn for unused variables, but not if they're inside a common
 	 block or a namelist.  */
-      else if (warn_unused_variable
+      else if (GCC_OPTION (warn_unused_variable)
 	       && !(sym->attr.in_common || sym->mark || sym->attr.in_namelist))
 	{
 	  if (sym->attr.use_only)
@@ -4891,7 +4891,7 @@ generate_local_decl (gfc_symbol * sym)
     }
   else if (sym->attr.flavor == FL_PARAMETER)
     {
-      if (warn_unused_parameter
+      if (GCC_OPTION (warn_unused_parameter)
            && !sym->attr.referenced)
 	{
            if (!sym->attr.use_assoc)
@@ -4905,7 +4905,7 @@ generate_local_decl (gfc_symbol * sym)
   else if (sym->attr.flavor == FL_PROCEDURE)
     {
       /* TODO: move to the appropriate place in resolve.c.  */
-      if (warn_return_type
+      if (GCC_OPTION (warn_return_type)
 	  && sym->attr.function
 	  && sym->result
 	  && sym != sym->result
@@ -5281,7 +5281,7 @@ create_main_function (tree fndecl)
                             build_int_cst (integer_type_node,
                                            gfc_option.allow_std));
     CONSTRUCTOR_APPEND_ELT (v, NULL_TREE,
-                            build_int_cst (integer_type_node, pedantic));
+                            build_int_cst (integer_type_node, GCC_OPTION (pedantic)));
     /* TODO: This is the old -fdump-core option, which is unused but
        passed due to ABI compatibility; remove when bumping the
        library ABI.  */
@@ -5644,10 +5644,10 @@ gfc_generate_function_code (gfc_namespace * ns)
       if (result == NULL_TREE)
 	{
 	  /* TODO: move to the appropriate place in resolve.c.  */
-	  if (warn_return_type && sym == sym->result)
+	  if (GCC_OPTION (warn_return_type) && sym == sym->result)
 	    gfc_warning ("Return value of function '%s' at %L not set",
 			 sym->name, &sym->declared_at);
-	  if (warn_return_type)
+	  if (GCC_OPTION (warn_return_type))
 	    TREE_NO_WARNING(sym->backend_decl) = 1;
 	}
       else
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index f5350bb..174aadd 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -2102,8 +2102,8 @@ gfc_conv_cst_int_power (gfc_se * se, tree lhs, tree rhs)
   type = TREE_TYPE (lhs);
   sgn = tree_int_cst_sgn (rhs);
 
-  if (((FLOAT_TYPE_P (type) && !flag_unsafe_math_optimizations)
-       || optimize_size) && (m > 2 || m < -1))
+  if (((FLOAT_TYPE_P (type) && !GCC_OPTION (flag_unsafe_math_optimizations))
+       || GCC_OPTION (optimize_size)) && (m > 2 || m < -1))
     return 0;
 
   /* rhs == 0  */
@@ -2823,7 +2823,7 @@ gfc_build_compare_string (tree len1, tree str1, tree len2, tree str2, int kind,
     }
 
   if ((code == EQ_EXPR || code == NE_EXPR)
-      && optimize
+      && GCC_OPTION (optimize)
       && INTEGER_CST_P (len1) && INTEGER_CST_P (len2))
     {
       /* If one string is a string literal with LEN_TRIM longer
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index e21d52f..afc14d7 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -1823,7 +1823,7 @@ gfc_conv_intrinsic_mod (gfc_se * se, gfc_expr * expr, int modulo)
 
       zero = gfc_build_const (type, integer_zero_node);
       tmp = gfc_evaluate_now (se->expr, &se->pre);
-      if (!flag_signed_zeros)
+      if (!GCC_OPTION (flag_signed_zeros))
 	{
 	  test = fold_build2_loc (input_location, LT_EXPR, boolean_type_node,
 				  args[0], zero);
@@ -7403,7 +7403,7 @@ gfc_inline_intrinsic_function_p (gfc_expr *expr)
     case GFC_ISYM_PRODUCT:
     case GFC_ISYM_SUM:
       /* Disable inline expansion if code size matters.  */
-      if (optimize_size)
+      if (GCC_OPTION (optimize_size))
 	return false;
 
       args = expr->value.function.actual;
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index 1a9068c..af54adc 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -2184,7 +2184,7 @@ gfc_trans_character_select (gfc_code *code)
 		      break;
 		  if (i != d->low->value.character.length)
 		    {
-		      if (optimize && d->high && i == 1)
+		      if (GCC_OPTION (optimize) && d->high && i == 1)
 			{
 			  gcc_assert (d->high->expr_type == EXPR_CONSTANT
 				      && d->high->ts.type == BT_CHARACTER);
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 5961c26..d990d3e 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -2035,7 +2035,7 @@ gfc_unlikely (tree cond, enum br_predictor predictor)
 {
   tree tmp;
 
-  if (optimize)
+  if (GCC_OPTION (optimize))
     {
       cond = fold_convert (long_integer_type_node, cond);
       tmp = build_zero_cst (long_integer_type_node);
@@ -2057,7 +2057,7 @@ gfc_likely (tree cond, enum br_predictor predictor)
 {
   tree tmp;
 
-  if (optimize)
+  if (GCC_OPTION (optimize))
     {
       cond = fold_convert (long_integer_type_node, cond);
       tmp = build_one_cst (long_integer_type_node);
diff --git a/gcc/function.c b/gcc/function.c
index a61e475..1463fbf 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -991,14 +991,14 @@ combine_temp_slots (void)
 
   /* We can't combine slots, because the information about which slot
      is in which alias set will be lost.  */
-  if (flag_strict_aliasing)
+  if (GCC_OPTION (flag_strict_aliasing))
     return;
 
   /* If there are a lot of temp slots, don't do anything unless
      high levels of optimization.  */
-  if (! flag_expensive_optimizations)
+  if (! GCC_OPTION (flag_expensive_optimizations))
     for (p = avail_temp_slots, num_slots = 0; p; p = p->next, num_slots++)
-      if (num_slots > 100 || (num_slots > 10 && optimize == 0))
+      if (num_slots > 100 || (num_slots > 10 && GCC_OPTION (optimize) == 0))
 	return;
 
   for (p = avail_temp_slots; p; p = next)
@@ -2041,7 +2041,7 @@ aggregate_value_p (const_tree exp, const_tree fntype)
   if (TREE_ADDRESSABLE (type))
     return 1;
 
-  if (flag_pcc_struct_return && AGGREGATE_TYPE_P (type))
+  if (GCC_OPTION (flag_pcc_struct_return) && AGGREGATE_TYPE_P (type))
     return 1;
 
   if (targetm.calls.return_in_memory (type, fntype))
@@ -2090,7 +2090,7 @@ use_register_for_decl (const_tree decl)
      into registers.  */
   /* ??? This should be checked after DECL_ARTIFICIAL, but tree-ssa
      propagates values across these stores, and it probably shouldn't.  */
-  if (flag_float_store && FLOAT_TYPE_P (TREE_TYPE (decl)))
+  if (GCC_OPTION (flag_float_store) && FLOAT_TYPE_P (TREE_TYPE (decl)))
     return false;
 
   /* If we're not interested in tracking debugging information for
@@ -2098,7 +2098,7 @@ use_register_for_decl (const_tree decl)
   if (DECL_IGNORED_P (decl))
     return true;
 
-  if (optimize)
+  if (GCC_OPTION (optimize))
     return true;
 
   if (!DECL_REGISTER (decl))
@@ -2743,7 +2743,7 @@ assign_parm_adjust_stack_rtl (struct assign_parm_data_one *data)
   /* If stack protection is in effect for this function, don't leave any
      pointers in their passed stack slots.  */
   else if (crtl->stack_protect_guard
-	   && (flag_stack_protect == 2
+	   && (GCC_OPTION (flag_stack_protect) == 2
 	       || data->passed_pointer
 	       || POINTER_TYPE_P (data->nominal_type)))
     stack_parm = NULL;
@@ -3646,7 +3646,7 @@ gimplify_parameters (void)
 	      /* For constant-sized objects, this is trivial; for
 		 variable-sized objects, we have to play games.  */
 	      if (TREE_CODE (DECL_SIZE_UNIT (parm)) == INTEGER_CST
-		  && !(flag_stack_check == GENERIC_STACK_CHECK
+		  && !(GCC_OPTION (flag_stack_check) == GENERIC_STACK_CHECK
 		       && compare_tree_int (DECL_SIZE_UNIT (parm),
 					    STACK_CHECK_MAX_VAR_SIZE) > 0))
 		{
@@ -4339,7 +4339,7 @@ number_blocks (tree fn)
      from 1 within each function, rather than keeping a running
      count.  */
 #if defined (SDB_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
-  if (write_symbols == SDB_DEBUG || write_symbols == XCOFF_DEBUG)
+  if (GCC_OPTION (write_symbols) == SDB_DEBUG || GCC_OPTION (write_symbols) == XCOFF_DEBUG)
     next_block_index = 1;
 #endif
 
@@ -4535,7 +4535,7 @@ allocate_struct_function (tree fndecl, bool abstract_p)
 
       /* ??? This could be set on a per-function basis by the front-end
          but is this worth the hassle?  */
-      cfun->can_throw_non_call_exceptions = flag_non_call_exceptions;
+      cfun->can_throw_non_call_exceptions = GCC_OPTION (flag_non_call_exceptions);
     }
 }
 
@@ -4568,13 +4568,13 @@ prepare_function_start (void)
   init_expr ();
   default_rtl_profile ();
 
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     {
       cfun->su = ggc_alloc_cleared_stack_usage ();
       cfun->su->static_stack_size = -1;
     }
 
-  cse_not_expected = ! optimize;
+  cse_not_expected = ! GCC_OPTION (optimize);
 
   /* Caller save not needed yet.  */
   caller_save_needed = 0;
@@ -4690,7 +4690,7 @@ expand_function_start (tree subr)
   init_recog_no_volatile ();
 
   crtl->profile
-    = (profile_flag
+    = (GCC_OPTION (profile_flag)
        && ! DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (subr));
 
   crtl->limit_stack
@@ -4844,7 +4844,7 @@ expand_function_start (tree subr)
     }
 
   /* If we are doing generic stack checking, the probe should go here.  */
-  if (flag_stack_check == GENERIC_STACK_CHECK)
+  if (GCC_OPTION (flag_stack_check) == GENERIC_STACK_CHECK)
     stack_check_probe_note = emit_note (NOTE_INSN_DELETED);
 }
 
@@ -4971,7 +4971,7 @@ expand_function_end (void)
   /* If we are doing generic stack checking and this function makes calls,
      do a stack probe at the start of the function to ensure we have enough
      space for another stack frame.  */
-  if (flag_stack_check == GENERIC_STACK_CHECK)
+  if (GCC_OPTION (flag_stack_check) == GENERIC_STACK_CHECK)
     {
       rtx insn, seq;
 
@@ -5020,7 +5020,7 @@ expand_function_end (void)
     {
       /* Let except.c know where it should emit the call to unregister
 	 the function context for sjlj exceptions.  */
-      if (flag_exceptions)
+      if (GCC_OPTION (flag_exceptions))
 	sjlj_emit_function_exit_after (get_last_insn ());
     }
   else
@@ -5913,7 +5913,7 @@ thread_prologue_and_epilogue_insns (void)
   orig_entry_edge = entry_edge;
 
   split_prologue_seq = NULL_RTX;
-  if (flag_split_stack
+  if (GCC_OPTION (flag_split_stack)
       && (lookup_attribute ("no_split_stack", DECL_ATTRIBUTES (cfun->decl))
 	  == NULL))
     {
@@ -5976,7 +5976,7 @@ thread_prologue_and_epilogue_insns (void)
 	break;
       }
       
-  if (flag_shrink_wrap && HAVE_simple_return
+  if (GCC_OPTION (flag_shrink_wrap) && HAVE_simple_return
       && (targetm.profile_before_prologue () || !crtl->profile)
       && nonempty_prologue && !crtl->calls_eh_return)
     {
@@ -6345,7 +6345,7 @@ thread_prologue_and_epilogue_insns (void)
 #ifdef HAVE_simple_return
   if (entry_edge != orig_entry_edge)
     {
-      if (optimize)
+      if (GCC_OPTION (optimize))
 	{
 	  unsigned i, last;
 
@@ -6382,7 +6382,7 @@ thread_prologue_and_epilogue_insns (void)
       if (exit_fallthru_edge == NULL)
 	goto epilogue_done;
 
-      if (optimize)
+      if (GCC_OPTION (optimize))
 	{
 	  basic_block last_bb = exit_fallthru_edge->src;
 
@@ -6828,7 +6828,7 @@ rest_of_handle_check_leaf_regs (void)
 {
 #ifdef LEAF_REGISTERS
   crtl->uses_only_leaf_regs
-    = optimize > 0 && only_leaf_regs_used () && leaf_function_p ();
+    = GCC_OPTION (optimize) > 0 && only_leaf_regs_used () && leaf_function_p ();
 #endif
   return 0;
 }
@@ -6865,7 +6865,7 @@ used_types_insert (tree t)
   if (TYPE_NAME (t) == NULL_TREE
       || TYPE_NAME (t) == TYPE_NAME (TYPE_MAIN_VARIANT (t)))
     t = TYPE_MAIN_VARIANT (t);
-  if (debug_info_level > DINFO_LEVEL_NONE)
+  if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_NONE)
     {
       if (cfun)
 	used_types_insert_helper (t, cfun);
@@ -6982,7 +6982,7 @@ make_pass_leaf_regs (gcc::context *ctxt)
 static unsigned int
 rest_of_handle_thread_prologue_and_epilogue (void)
 {
-  if (optimize)
+  if (GCC_OPTION (optimize))
     cleanup_cfg (CLEANUP_EXPENSIVE);
 
   /* On some machines, the prologue and epilogue code, or parts thereof,
@@ -6996,7 +6996,7 @@ rest_of_handle_thread_prologue_and_epilogue (void)
   cleanup_cfg (0);
 
   /* The stack usage info is finalized during prologue expansion.  */
-  if (flag_stack_usage_info)
+  if (GCC_OPTION (flag_stack_usage_info))
     output_stack_usage ();
 
   return 0;
diff --git a/gcc/fwprop.c b/gcc/fwprop.c
index 4317f51..ae55d79 100644
--- a/gcc/fwprop.c
+++ b/gcc/fwprop.c
@@ -1449,7 +1449,7 @@ fwprop_done (void)
 static bool
 gate_fwprop (void)
 {
-  return optimize > 0 && flag_forward_propagate;
+  return GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_forward_propagate);
 }
 
 static unsigned int
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 691623a..58f629b 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -1418,7 +1418,7 @@ init_spec (void)
   if (specs)
     return;			/* Already initialized.  */
 
-  if (verbose_flag)
+  if (GCC_OPTION (verbose_flag))
     fnotice (stderr, "Using built-in specs.\n");
 
 #ifdef EXTRA_SPECS
@@ -1615,7 +1615,7 @@ set_spec (const char *name, const char *spec, bool user_p)
 		     : xstrdup (spec));
 
 #ifdef DEBUG_SPECS
-  if (verbose_flag)
+  if (GCC_OPTION (verbose_flag))
     fnotice (stderr, "Setting spec %s to '%s'\n\n", name, *(sl->ptr_spec));
 #endif
 
@@ -1724,7 +1724,7 @@ load_specs (const char *filename)
   char *specs;
   char *specs_p;
 
-  if (verbose_flag)
+  if (GCC_OPTION (verbose_flag))
     fnotice (stderr, "Reading specs from %s\n", filename);
 
   /* Open and stat the file.  */
@@ -1849,7 +1849,7 @@ read_specs (const char *filename, bool main_p, bool user_p)
 	      new_filename = find_a_file (&startfile_prefixes, p1, R_OK, true);
 	      if (new_filename)
 		read_specs (new_filename, false, user_p);
-	      else if (verbose_flag)
+	      else if (GCC_OPTION (verbose_flag))
 		fnotice (stderr, "could not find specs file %s\n", p1);
 	      continue;
 	    }
@@ -1917,7 +1917,7 @@ read_specs (const char *filename, bool main_p, bool user_p)
 			       "already defined spec %qs",
 		    filename, p1, p2);
 
-	      if (verbose_flag)
+	      if (GCC_OPTION (verbose_flag))
 		{
 		  fnotice (stderr, "rename spec %s to %s\n", p1, p2);
 #ifdef DEBUG_SPECS
@@ -2120,7 +2120,7 @@ delete_if_ordinary (const char *name)
 
   if (i == 'y' || i == 'Y')
 #endif /* DEBUG */
-  DELETE_IF_ORDINARY (name, st, verbose_flag);
+  DELETE_IF_ORDINARY (name, st, GCC_OPTION (verbose_flag));
 }
 
 static void
@@ -2353,7 +2353,7 @@ add_to_obstack (char *path, void *data)
 static void
 xputenv (const char *string)
 {
-  if (verbose_flag)
+  if (GCC_OPTION (verbose_flag))
     fnotice (stderr, "%s\n", string);
   putenv (CONST_CAST (char *, string));
 }
@@ -2607,13 +2607,13 @@ execute (void)
 
   gcc_assert (!processing_spec_function);
 
-  if (wrapper_string)
+  if (GCC_OPTION (wrapper_string))
     {
       string = find_a_file (&exec_prefixes,
 			    argbuf[0], X_OK, false);
       if (string)
 	argbuf[0] = string;
-      insert_wrapper (wrapper_string);
+      insert_wrapper (GCC_OPTION (wrapper_string));
     }
 
   /* Count # of piped commands.  */
@@ -2633,7 +2633,7 @@ execute (void)
   commands[0].prog = argbuf[0]; /* first command.  */
   commands[0].argv = argbuf.address ();
 
-  if (!wrapper_string)
+  if (!GCC_OPTION (wrapper_string))
     {
       string = find_a_file (&exec_prefixes, commands[0].prog, X_OK, false);
       commands[0].argv[0] = (string) ? string : commands[0].argv[0];
@@ -2659,7 +2659,7 @@ execute (void)
 
   /* If -v, print what we are about to do, and maybe query.  */
 
-  if (verbose_flag)
+  if (GCC_OPTION (verbose_flag))
     {
       /* For help listings, put a blank line between sub-processes.  */
       if (print_help_list)
@@ -2762,7 +2762,7 @@ execute (void)
 
   /* Run each piped subprocess.  */
 
-  pex = pex_init (PEX_USE_PIPES | ((report_times || report_times_to_file)
+  pex = pex_init (PEX_USE_PIPES | ((GCC_OPTION (report_times) || report_times_to_file)
 				   ? PEX_RECORD_TIMES : 0),
 		  progname, temp_filename);
   if (pex == NULL)
@@ -2807,7 +2807,7 @@ execute (void)
     if (!pex_get_status (pex, n_commands, statuses))
       fatal_error ("failed to get exit status: %m");
 
-    if (report_times || report_times_to_file)
+    if (GCC_OPTION (report_times) || report_times_to_file)
       {
 	times = (struct pex_time *) alloca (n_commands * sizeof (struct pex_time));
 	if (!pex_get_times (pex, n_commands, times))
@@ -2848,7 +2848,7 @@ execute (void)
 	    ret_code = -1;
 	  }
 
-	if (report_times || report_times_to_file)
+	if (GCC_OPTION (report_times) || report_times_to_file)
 	  {
 	    struct pex_time *pt = &times[i];
 	    double ut, st;
@@ -2860,7 +2860,7 @@ execute (void)
 
 	    if (ut + st != 0)
 	      {
-		if (report_times)
+		if (GCC_OPTION (report_times))
 		  fnotice (stderr, "# %s %.2f %.2f\n",
 			   commands[i].prog, ut, st);
 
@@ -3072,7 +3072,7 @@ display_help (void)
   fputs (_("  --target-help            Display target specific command line options\n"), stdout);
   fputs (_("  --help={common|optimizers|params|target|warnings|[^]{joined|separate|undocumented}}[,...]\n"), stdout);
   fputs (_("                           Display specific types of command line options\n"), stdout);
-  if (! verbose_flag)
+  if (! GCC_OPTION (verbose_flag))
     fputs (_("  (Use '-v --help' to display command line options of sub-processes)\n"), stdout);
   fputs (_("  --version                Display compiler version information\n"), stdout);
   fputs (_("  -dumpspecs               Display all of the built in spec strings\n"), stdout);
@@ -3379,7 +3379,7 @@ driver_handle_option (struct gcc_options *opts,
       break;
 
     case OPT_print_libgcc_file_name:
-      print_file_name = "libgcc.a";
+      GCC_OPTION (print_file_name) = "libgcc.a";
       do_save = false;
       break;
 
@@ -3582,7 +3582,7 @@ driver_handle_option (struct gcc_options *opts,
 	 is intended for use in shell scripts to capture the
 	 driver-generated command line.  */
       verbose_only_flag++;
-      verbose_flag = 1;
+      GCC_OPTION (verbose_flag) = 1;
       do_save = false;
       break;
 
@@ -3652,7 +3652,7 @@ driver_handle_option (struct gcc_options *opts,
       break;
 
     case OPT_fwpa:
-      flag_wpa = "";
+      GCC_OPTION (flag_wpa) = "";
       break;
 
     default:
@@ -3992,12 +3992,12 @@ process_command (unsigned int decoded_options_count,
       save_temps_prefix = NULL;
     }
 
-  if (save_temps_flag && use_pipes)
+  if (save_temps_flag && GCC_OPTION (use_pipes))
     {
       /* -save-temps overrides -pipe, so that temp files are produced */
       if (save_temps_flag)
 	warning (0, "-pipe ignored because -save-temps specified");
-      use_pipes = 0;
+      GCC_OPTION (use_pipes) = 0;
     }
 
   if (!compare_debug)
@@ -4629,7 +4629,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
 	    /* A `|' before the newline means use a pipe here,
 	       but only if -pipe was specified.
 	       Otherwise, execute now and don't pass the `|' as an arg.  */
-	    if (use_pipes)
+	    if (GCC_OPTION (use_pipes))
 	      {
 		input_from_pipe = 1;
 		break;
@@ -4783,7 +4783,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
 	    }
 	    goto create_temp_file;
 	  case '|':
-	    if (use_pipes)
+	    if (GCC_OPTION (use_pipes))
 	      {
 		obstack_1grow (&obstack, '-');
 		delete_this_arg = 0;
@@ -4799,7 +4799,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
 	      }
 	    goto create_temp_file;
 	  case 'm':
-	    if (use_pipes)
+	    if (GCC_OPTION (use_pipes))
 	      {
 		/* consume suffix */
 		while (*p == '.' || ISALNUM ((unsigned char) *p))
@@ -6504,7 +6504,7 @@ main (int argc, char **argv)
 
   /* Process sysroot_suffix_spec.  */
   if (*sysroot_suffix_spec != 0
-      && !no_sysroot_suffix
+      && !GCC_OPTION (no_sysroot_suffix)
       && do_spec_2 (sysroot_suffix_spec) == 0)
     {
       if (argbuf.length () > 1)
@@ -6528,7 +6528,7 @@ main (int argc, char **argv)
 
   /* Process sysroot_hdrs_suffix_spec.  */
   if (*sysroot_hdrs_suffix_spec != 0
-      && !no_sysroot_suffix
+      && !GCC_OPTION (no_sysroot_suffix)
       && do_spec_2 (sysroot_hdrs_suffix_spec) == 0)
     {
       if (argbuf.length () > 1)
@@ -6703,7 +6703,7 @@ main (int argc, char **argv)
 
   /* Obey some of the options.  */
 
-  if (print_search_dirs)
+  if (GCC_OPTION (print_search_dirs))
     {
       printf (_("install: %s%s\n"),
 	      gcc_exec_prefix ? gcc_exec_prefix : standard_exec_prefix,
@@ -6715,15 +6715,15 @@ main (int argc, char **argv)
       return (0);
     }
 
-  if (print_file_name)
+  if (GCC_OPTION (print_file_name))
     {
-      printf ("%s\n", find_file (print_file_name));
+      printf ("%s\n", find_file (GCC_OPTION (print_file_name)));
       return (0);
     }
 
-  if (print_prog_name)
+  if (GCC_OPTION (print_prog_name))
     {
-      if (use_ld != NULL && ! strcmp (print_prog_name, "ld"))
+      if (use_ld != NULL && ! strcmp (GCC_OPTION (print_prog_name), "ld"))
 	{
 	  /* Append USE_LD to to the default linker.  */
 #ifdef DEFAULT_LINKER
@@ -6753,20 +6753,20 @@ main (int argc, char **argv)
 	      return (0);
 	    }
 #endif
-	  print_prog_name = concat (print_prog_name, use_ld, NULL);
+	  GCC_OPTION (print_prog_name) = concat (GCC_OPTION (print_prog_name), use_ld, NULL);
 	}
-      char *newname = find_a_file (&exec_prefixes, print_prog_name, X_OK, 0);
-      printf ("%s\n", (newname ? newname : print_prog_name));
+      char *newname = find_a_file (&exec_prefixes, GCC_OPTION (print_prog_name), X_OK, 0);
+      printf ("%s\n", (newname ? newname : GCC_OPTION (print_prog_name)));
       return (0);
     }
 
-  if (print_multi_lib)
+  if (GCC_OPTION (print_multi_lib))
     {
       print_multilib_info ();
       return (0);
     }
 
-  if (print_multi_directory)
+  if (GCC_OPTION (print_multi_directory))
     {
       if (multilib_dir == NULL)
 	printf (".\n");
@@ -6775,7 +6775,7 @@ main (int argc, char **argv)
       return (0);
     }
 
-  if (print_multiarch)
+  if (GCC_OPTION (print_multiarch))
     {
       if (multiarch_dir == NULL)
 	printf ("\n");
@@ -6784,7 +6784,7 @@ main (int argc, char **argv)
       return (0);
     }
 
-  if (print_sysroot)
+  if (GCC_OPTION (print_sysroot))
     {
       if (target_system_root)
 	{
@@ -6796,7 +6796,7 @@ main (int argc, char **argv)
       return (0);
     }
 
-  if (print_multi_os_directory)
+  if (GCC_OPTION (print_multi_os_directory))
     {
       if (multilib_os_dir == NULL)
 	printf (".\n");
@@ -6805,7 +6805,7 @@ main (int argc, char **argv)
       return (0);
     }
 
-  if (print_sysroot_headers_suffix)
+  if (GCC_OPTION (print_sysroot_headers_suffix))
     {
       if (*sysroot_hdrs_suffix_spec)
 	{
@@ -6824,7 +6824,7 @@ main (int argc, char **argv)
     {
       display_help ();
 
-      if (! verbose_flag)
+      if (! GCC_OPTION (verbose_flag))
 	{
 	  printf (_("\nFor bug reporting instructions, please see:\n"));
 	  printf ("%s.\n", bug_report_url);
@@ -6849,7 +6849,7 @@ main (int argc, char **argv)
       fputs (_("This is free software; see the source for copying conditions.  There is NO\n\
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"),
 	     stdout);
-      if (! verbose_flag)
+      if (! GCC_OPTION (verbose_flag))
 	return 0;
 
       /* We do not exit here. We use the same mechanism of --help to print
@@ -6858,7 +6858,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
       fflush (stdout);
     }
 
-  if (verbose_flag)
+  if (GCC_OPTION (verbose_flag))
     {
       int n;
       const char *thrmod;
@@ -6916,7 +6916,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
 
   explicit_link_files = XCNEWVEC (char, n_infiles);
 
-  combine_inputs = have_o || flag_wpa;
+  combine_inputs = have_o || GCC_OPTION (flag_wpa);
 
   for (i = 0; (int) i < n_infiles; i++)
     {
@@ -7000,7 +7000,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
 		this_file_error = 1;
 	      else if (compare_debug && debug_check_temp_file[0])
 		{
-		  if (verbose_flag)
+		  if (GCC_OPTION (verbose_flag))
 		    inform (0, "recompiling with -fcompare-debug");
 
 		  compare_debug = -compare_debug;
@@ -7025,7 +7025,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
 			      && filename_cmp (debug_check_temp_file[0],
 					       debug_check_temp_file[1]));
 
-		  if (verbose_flag)
+		  if (GCC_OPTION (verbose_flag))
 		    inform (0, "comparing final insns dumps");
 
 		  if (compare_files (debug_check_temp_file))
@@ -7182,7 +7182,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
 
  out:
   return (signal_count != 0 ? 2
-	  : seen_error () ? (pass_exit_codes ? greatest_status : 1)
+	  : seen_error () ? (GCC_OPTION (pass_exit_codes) ? greatest_status : 1)
 	  : 0);
 }
 
@@ -8159,13 +8159,13 @@ sanitize_spec_function (int argc, const char **argv)
     return NULL;
 
   if (strcmp (argv[0], "address") == 0)
-    return (flag_sanitize & SANITIZE_ADDRESS) ? "" : NULL;
+    return (GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS) ? "" : NULL;
   if (strcmp (argv[0], "thread") == 0)
-    return (flag_sanitize & SANITIZE_THREAD) ? "" : NULL;
+    return (GCC_OPTION (flag_sanitize) & SANITIZE_THREAD) ? "" : NULL;
   if (strcmp (argv[0], "undefined") == 0)
-    return (flag_sanitize & SANITIZE_UNDEFINED) ? "" : NULL;
+    return (GCC_OPTION (flag_sanitize) & SANITIZE_UNDEFINED) ? "" : NULL;
   if (strcmp (argv[0], "leak") == 0)
-    return ((flag_sanitize
+    return ((GCC_OPTION (flag_sanitize)
 	     & (SANITIZE_ADDRESS | SANITIZE_LEAK | SANITIZE_THREAD))
 	    == SANITIZE_LEAK) ? "" : NULL;
   return NULL;
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 2bb0b5f..edcd74a 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -916,7 +916,7 @@ oprs_unchanged_p (const_rtx x, const_rtx insn, int avail_p)
       }
 
     case MEM:
-      if (! flag_gcse_lm
+      if (! GCC_OPTION (flag_gcse_lm)
 	  || load_killed_in_block_p (current_bb, DF_INSN_LUID (insn),
 				     x, avail_p))
 	return 0;
@@ -1304,7 +1304,7 @@ hash_scan_set (rtx set, rtx insn, struct hash_table_d *table)
   /* In case of store we want to consider the memory value as available in
      the REG stored in that memory. This makes it possible to remove
      redundant loads from due to stores to the same location.  */
-  else if (flag_gcse_las && REG_P (src) && MEM_P (dest))
+  else if (GCC_OPTION (flag_gcse_las) && REG_P (src) && MEM_P (dest))
       {
         unsigned int regno = REGNO (src);
 	int max_distance = 0;
@@ -1500,7 +1500,7 @@ record_last_mem_set_info (rtx insn)
 {
   int bb;
 
-  if (! flag_gcse_lm)
+  if (! GCC_OPTION (flag_gcse_lm))
     return;
 
   /* load_killed_in_block_p will handle the case of calls clobbering
@@ -2679,11 +2679,11 @@ one_pre_gcse_pass (void)
 
   alloc_hash_table (&expr_hash_table);
   add_noreturn_fake_exit_edges ();
-  if (flag_gcse_lm)
+  if (GCC_OPTION (flag_gcse_lm))
     compute_ld_motion_mems ();
 
   compute_hash_table (&expr_hash_table);
-  if (flag_gcse_lm)
+  if (GCC_OPTION (flag_gcse_lm))
     trim_ld_motion_mems ();
   if (dump_file)
     dump_hash_table (dump_file, "Expression", &expr_hash_table);
@@ -2698,7 +2698,7 @@ one_pre_gcse_pass (void)
       free_pre_mem ();
     }
 
-  if (flag_gcse_lm)
+  if (GCC_OPTION (flag_gcse_lm))
     free_ld_motion_mems ();
   remove_fake_exit_edges ();
   free_hash_table (&expr_hash_table);
@@ -2987,7 +2987,7 @@ should_hoist_expr_to_dom (basic_block expr_bb, struct expr *expr,
   int visited_allocated_locally = 0;
   int decreased_pressure = 0;
 
-  if (flag_ira_hoist_pressure)
+  if (GCC_OPTION (flag_ira_hoist_pressure))
     {
       /* Record old information of basic block BB when it is visited
 	 at the first time.  */
@@ -3003,7 +3003,7 @@ should_hoist_expr_to_dom (basic_block expr_bb, struct expr *expr,
      is exhausted.  */
   if (distance > 0)
     {
-      if (flag_ira_hoist_pressure)
+      if (GCC_OPTION (flag_ira_hoist_pressure))
 	{
 	  /* Prefer to hoist EXPR if register pressure is decreased.  */
 	  if (decreased_pressure > *nregs)
@@ -3068,7 +3068,7 @@ should_hoist_expr_to_dom (basic_block expr_bb, struct expr *expr,
     {
       /* If EXPR can be hoisted to expr_bb, record basic blocks through
 	 which EXPR is hoisted in hoisted_bbs.  */
-      if (flag_ira_hoist_pressure && !pred)
+      if (GCC_OPTION (flag_ira_hoist_pressure) && !pred)
 	{
 	  /* Record the basic block from which EXPR is hoisted.  */
 	  bitmap_set_bit (visited, bb->index);
@@ -3194,7 +3194,7 @@ hoist_code (void)
 		  == ENTRY_BLOCK_PTR_FOR_FN (cfun)->next_bb));
 
   from_bbs = BITMAP_ALLOC (NULL);
-  if (flag_ira_hoist_pressure)
+  if (GCC_OPTION (flag_ira_hoist_pressure))
     hoisted_bbs = BITMAP_ALLOC (NULL);
 
   dom_tree_walk = get_all_dominated_blocks (CDI_DOMINATORS,
@@ -3331,7 +3331,7 @@ hoist_code (void)
 		/* Punt, no point hoisting a single occurrence.  */
 		occrs_to_hoist.release ();
 
-	      if (flag_ira_hoist_pressure
+	      if (GCC_OPTION (flag_ira_hoist_pressure)
 		  && !occrs_to_hoist.is_empty ())
 		{
 		  /* Increase register pressure of basic blocks to which
@@ -3345,7 +3345,7 @@ hoist_code (void)
 		      data->max_reg_pressure[pressure_class] += nregs;
 		    }
 		}
-	      else if (flag_ira_hoist_pressure)
+	      else if (GCC_OPTION (flag_ira_hoist_pressure))
 		{
 		  /* Restore register pressure and live_in info for basic
 		     blocks recorded in hoisted_bbs when expr will not be
@@ -3359,7 +3359,7 @@ hoist_code (void)
 		    }
 		}
 
-	      if (flag_ira_hoist_pressure)
+	      if (GCC_OPTION (flag_ira_hoist_pressure))
 		bitmap_clear (hoisted_bbs);
 
 	      insn_inserted_p = 0;
@@ -3411,7 +3411,7 @@ hoist_code (void)
 
   dom_tree_walk.release ();
   BITMAP_FREE (from_bbs);
-  if (flag_ira_hoist_pressure)
+  if (GCC_OPTION (flag_ira_hoist_pressure))
     BITMAP_FREE (hoisted_bbs);
 
   free (bb_size);
@@ -3603,7 +3603,7 @@ one_code_hoisting_pass (void)
   doing_code_hoisting_p = true;
 
   /* Calculate register pressure for each basic block.  */
-  if (flag_ira_hoist_pressure)
+  if (GCC_OPTION (flag_ira_hoist_pressure))
     {
       regstat_init_n_sets_and_refs ();
       ira_set_pseudo_classes (false, dump_file);
@@ -3633,7 +3633,7 @@ one_code_hoisting_pass (void)
       free_code_hoist_mem ();
     }
 
-  if (flag_ira_hoist_pressure)
+  if (GCC_OPTION (flag_ira_hoist_pressure))
     {
       free_aux_for_blocks ();
       free_reg_info ();
@@ -3832,7 +3832,7 @@ simple_mem (const_rtx x)
   if (reg_mentioned_p (stack_pointer_rtx, x))
     return 0;
 
-  if (flag_float_store && FLOAT_MODE_P (GET_MODE (x)))
+  if (GCC_OPTION (flag_float_store) && FLOAT_MODE_P (GET_MODE (x)))
     return 0;
 
   return 1;
@@ -4112,7 +4112,7 @@ is_too_expensive (const char *pass)
 static bool
 gate_rtl_pre (void)
 {
-  return optimize > 0 && flag_gcse
+  return GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_gcse)
     && !cfun->calls_setjmp
     && optimize_function_for_speed_p (cfun)
     && dbg_cnt (pre);
@@ -4134,7 +4134,7 @@ execute_rtl_pre (void)
 static bool
 gate_rtl_hoist (void)
 {
-  return optimize > 0 && flag_gcse
+  return GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_gcse)
     && !cfun->calls_setjmp
     /* It does not make sense to run code hoisting unless we are optimizing
        for code size -- it rarely makes programs faster, and can make then
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c
index ccc87ea..55b71c5 100644
--- a/gcc/ggc-page.c
+++ b/gcc/ggc-page.c
@@ -2055,7 +2055,7 @@ ggc_collect (void)
     return;
 
   timevar_push (TV_GC);
-  if (!quiet_flag)
+  if (!GCC_OPTION (quiet_flag))
     fprintf (stderr, " {GC %luk -> ", (unsigned long) G.allocated / 1024);
   if (GGC_DEBUG_LEVEL >= 2)
     fprintf (G.debug_file, "BEGIN COLLECTING\n");
@@ -2089,7 +2089,7 @@ ggc_collect (void)
 
   timevar_pop (TV_GC);
 
-  if (!quiet_flag)
+  if (!GCC_OPTION (quiet_flag))
     fprintf (stderr, "%luk}", (unsigned long) G.allocated / 1024);
   if (GGC_DEBUG_LEVEL >= 2)
     fprintf (G.debug_file, "END COLLECTING\n");
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index 267c1fd..4657aba 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -106,7 +106,7 @@ can_refer_decl_in_current_unit_p (tree decl, tree from_decl)
   if (!from_decl
       || TREE_CODE (from_decl) != VAR_DECL
       || !DECL_EXTERNAL (from_decl)
-      || (flag_ltrans
+      || (GCC_OPTION (flag_ltrans)
 	  && symtab_get_node (from_decl)->in_other_partition))
     return true;
   /* We are folding reference from external vtable.  The vtable may reffer
@@ -133,7 +133,7 @@ can_refer_decl_in_current_unit_p (tree decl, tree from_decl)
      units where they are used and when the other unit was compiled with LTO
      it is possible that vtable was kept public while the function itself
      was privatized. */
-  if (!flag_ltrans && (!DECL_COMDAT (decl) || !cgraph_function_flags_ready))
+  if (!GCC_OPTION (flag_ltrans) && (!DECL_COMDAT (decl) || !cgraph_function_flags_ready))
     return true;
 
   /* OK we are seeing either COMDAT or static variable.  In this case we must
@@ -381,7 +381,7 @@ fold_gimple_assign (gimple_stmt_iterator *si)
 	    tree val = OBJ_TYPE_REF_EXPR (rhs);
 	    if (is_gimple_min_invariant (val))
 	      return val;
-	    else if (flag_devirtualize && virtual_method_call_p (val))
+	    else if (GCC_OPTION (flag_devirtualize) && virtual_method_call_p (val))
 	      {
 		bool final;
 		vec <cgraph_node *>targets
@@ -1119,7 +1119,7 @@ gimple_fold_call (gimple_stmt_iterator *gsi, bool inplace)
 	  gimple_call_set_fn (stmt, OBJ_TYPE_REF_EXPR (callee));
 	  changed = true;
 	}
-      else if (flag_devirtualize && !inplace && virtual_method_call_p (callee))
+      else if (GCC_OPTION (flag_devirtualize) && !inplace && virtual_method_call_p (callee))
 	{
 	  bool final;
 	  vec <cgraph_node *>targets
@@ -3212,7 +3212,7 @@ gimple_get_virt_method_for_vtable (HOST_WIDE_INT token,
   if (TREE_CODE (v) != VAR_DECL
       || !DECL_VIRTUAL_P (v))
     {
-      gcc_assert (in_lto_p);
+      gcc_assert (GCC_OPTION (in_lto_p));
       /* Pass down that we lost track of the target.  */
       if (can_refer)
 	*can_refer = false;
@@ -3228,7 +3228,7 @@ gimple_get_virt_method_for_vtable (HOST_WIDE_INT token,
   gcc_assert (init);
   if (init == error_mark_node)
     {
-      gcc_assert (in_lto_p);
+      gcc_assert (GCC_OPTION (in_lto_p));
       /* Pass down that we lost track of the target.  */
       if (can_refer)
 	*can_refer = false;
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index 80fd786..2eb1cd9 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -337,7 +337,7 @@ lower_stmt (gimple_stmt_iterator *gsi, struct lower_data *data)
 		return;
 	      }
 	    else if (DECL_FUNCTION_CODE (decl) == BUILT_IN_POSIX_MEMALIGN
-		     && flag_tree_bit_ccp)
+		     && GCC_OPTION (flag_tree_bit_ccp))
 	      {
 		lower_builtin_posix_memalign (gsi);
 		return;
@@ -650,7 +650,7 @@ lower_gimple_return (gimple_stmt_iterator *gsi, struct lower_data *data)
   /* Generate a goto statement and remove the return statement.  */
  found:
   /* When not optimizing, make sure user returns are preserved.  */
-  if (!optimize && gimple_has_location (stmt))
+  if (!GCC_OPTION (optimize) && gimple_has_location (stmt))
     DECL_ARTIFICIAL (tmp_rs.label) = 0;
   t = gimple_build_goto (tmp_rs.label);
   gimple_set_location (t, gimple_location (stmt));
diff --git a/gcc/gimple-ssa-isolate-paths.c b/gcc/gimple-ssa-isolate-paths.c
index 56fcfc8..d133aef 100644
--- a/gcc/gimple-ssa-isolate-paths.c
+++ b/gcc/gimple-ssa-isolate-paths.c
@@ -276,8 +276,8 @@ find_implicit_erroneous_behaviour (void)
 		    continue;
 
 		  if (infer_nonnull_range (use_stmt, lhs,
-					   flag_isolate_erroneous_paths_dereference,
-					   flag_isolate_erroneous_paths_attribute))
+					   GCC_OPTION (flag_isolate_erroneous_paths_dereference),
+					   GCC_OPTION (flag_isolate_erroneous_paths_attribute)))
 
 		    {
 		      duplicate = isolate_path (bb, duplicate,
@@ -329,8 +329,8 @@ find_explicit_erroneous_behaviour (void)
 	     to detect explicit NULL pointer dereferences and other uses
 	     where a non-NULL value is required.  */
 	  if (infer_nonnull_range (stmt, null_pointer_node,
-				   flag_isolate_erroneous_paths_dereference,
-				   flag_isolate_erroneous_paths_attribute))
+				   GCC_OPTION (flag_isolate_erroneous_paths_dereference),
+				   GCC_OPTION (flag_isolate_erroneous_paths_attribute)))
 	    {
 	      insert_trap_and_remove_trailing_statements (&si,
 							  null_pointer_node);
@@ -419,8 +419,8 @@ gate_isolate_erroneous_paths (void)
 {
   /* If we do not have a suitable builtin function for the trap statement,
      then do not perform the optimization.  */
-  return (flag_isolate_erroneous_paths_dereference != 0
-	  || flag_isolate_erroneous_paths_attribute != 0);
+  return (GCC_OPTION (flag_isolate_erroneous_paths_dereference) != 0
+	  || GCC_OPTION (flag_isolate_erroneous_paths_attribute) != 0);
 }
 
 namespace {
diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c
index 9320b51..1c160aa 100644
--- a/gcc/gimple-ssa-strength-reduction.c
+++ b/gcc/gimple-ssa-strength-reduction.c
@@ -568,7 +568,7 @@ find_basis_for_candidate (slsr_cand_t c)
 	}
     }
 
-  if (flag_expensive_optimizations && !basis && c->kind == CAND_REF)
+  if (GCC_OPTION (flag_expensive_optimizations) && !basis && c->kind == CAND_REF)
     {
       tree alt_base_expr = get_alternative_base (c->base_expr);
       if (alt_base_expr)
@@ -653,7 +653,7 @@ alloc_cand_and_find_basis (enum cand_kind kind, gimple gs, tree base,
     c->basis = find_basis_for_candidate (c);
 
   record_potential_basis (c, base);
-  if (flag_expensive_optimizations && kind == CAND_REF)
+  if (GCC_OPTION (flag_expensive_optimizations) && kind == CAND_REF)
     {
       tree alt_base = get_alternative_base (base);
       if (alt_base)
@@ -3649,7 +3649,7 @@ execute_strength_reduction (void)
 static bool
 gate_strength_reduction (void)
 {
-  return flag_tree_slsr;
+  return GCC_OPTION (flag_tree_slsr);
 }
 
 namespace {
diff --git a/gcc/gimple.c b/gcc/gimple.c
index e9851ca..9a6686a 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -2532,7 +2532,7 @@ infer_nonnull_range (gimple stmt, tree op, bool dereference, bool attribute)
 {
   /* We can only assume that a pointer dereference will yield
      non-NULL if -fdelete-null-pointer-checks is enabled.  */
-  if (!flag_delete_null_pointer_checks
+  if (!GCC_OPTION (flag_delete_null_pointer_checks)
       || !POINTER_TYPE_P (TREE_TYPE (op))
       || gimple_code (stmt) == GIMPLE_ASM)
     return false;
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index ad2178d..7138c23 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -475,7 +475,7 @@ lookup_tmp_var (tree val, bool is_formal)
      block, which means it will go into memory, causing much extra
      work in reload and final and poorer code generation, outweighing
      the extra memory allocation here.  */
-  if (!optimize || !is_formal || TREE_SIDE_EFFECTS (val))
+  if (!GCC_OPTION (optimize) || !is_formal || TREE_SIDE_EFFECTS (val))
     ret = create_tmp_from_val (val, is_formal);
   else
     {
@@ -1104,7 +1104,7 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p)
 	  /* Only care for variables that have to be in memory.  Others
 	     will be rewritten into SSA names, hence moved to the top-level.  */
 	  && !is_gimple_reg (t)
-	  && flag_stack_reuse != SR_NONE)
+	  && GCC_OPTION (flag_stack_reuse) != SR_NONE)
 	{
 	  tree clobber = build_constructor (TREE_TYPE (t),
 					    NULL);
@@ -1337,7 +1337,7 @@ gimplify_decl_expr (tree *stmt_p, gimple_seq *seq_p)
 
       if (TREE_CODE (DECL_SIZE_UNIT (decl)) != INTEGER_CST
 	  || (!TREE_STATIC (decl)
-	      && flag_stack_check == GENERIC_STACK_CHECK
+	      && GCC_OPTION (flag_stack_check) == GENERIC_STACK_CHECK
 	      && compare_tree_int (DECL_SIZE_UNIT (decl),
 				   STACK_CHECK_MAX_VAR_SIZE) > 0))
 	gimplify_vla_decl (decl, seq_p);
@@ -3015,7 +3015,7 @@ gimplify_cond_expr (tree *expr_p, gimple_seq *pre_p, fallback_t fallback)
       /* For -O0 avoid this optimization if the COND_EXPR and GOTO_EXPR
 	 have different locations, otherwise we end up with incorrect
 	 location information on the branches.  */
-      && (optimize
+      && (GCC_OPTION (optimize)
 	  || !EXPR_HAS_LOCATION (expr)
 	  || !EXPR_HAS_LOCATION (TREE_OPERAND (expr, 1))
 	  || EXPR_LOCATION (expr) == EXPR_LOCATION (TREE_OPERAND (expr, 1))))
@@ -3033,7 +3033,7 @@ gimplify_cond_expr (tree *expr_p, gimple_seq *pre_p, fallback_t fallback)
       /* For -O0 avoid this optimization if the COND_EXPR and GOTO_EXPR
 	 have different locations, otherwise we end up with incorrect
 	 location information on the branches.  */
-      && (optimize
+      && (GCC_OPTION (optimize)
 	  || !EXPR_HAS_LOCATION (expr)
 	  || !EXPR_HAS_LOCATION (TREE_OPERAND (expr, 2))
 	  || EXPR_LOCATION (expr) == EXPR_LOCATION (TREE_OPERAND (expr, 2))))
@@ -3722,7 +3722,7 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
 	    && num_nonzero_elements > 1
 	    && TREE_READONLY (object)
 	    && TREE_CODE (object) == VAR_DECL
-	    && (flag_merge_constants >= 2 || !TREE_ADDRESSABLE (object)))
+	    && (GCC_OPTION (flag_merge_constants) >= 2 || !TREE_ADDRESSABLE (object)))
 	  {
 	    if (notify_temp_creation)
 	      return GS_ERROR;
@@ -5308,7 +5308,7 @@ gimplify_target_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
 	 gimplify_bind_expr.  */
       if (gimplify_ctxp->in_cleanup_point_expr
 	  && needs_to_live_in_memory (temp)
-	  && flag_stack_reuse == SR_ALL)
+	  && GCC_OPTION (flag_stack_reuse) == SR_ALL)
 	{
 	  tree clobber = build_constructor (TREE_TYPE (temp),
 					    NULL);
@@ -8537,7 +8537,7 @@ gimplify_body (tree fndecl, bool do_parms)
   gcc_assert (gimplify_ctxp == NULL);
   push_gimplify_context ();
 
-  if (flag_openmp)
+  if (GCC_OPTION (flag_openmp))
     {
       gcc_assert (gimplify_omp_ctxp == NULL);
       if (lookup_attribute ("omp declare target", DECL_ATTRIBUTES (fndecl)))
@@ -8621,7 +8621,7 @@ gimplify_body (tree fndecl, bool do_parms)
       nonlocal_vlas = NULL;
     }
 
-  if ((flag_openmp || flag_openmp_simd) && gimplify_omp_ctxp)
+  if ((GCC_OPTION (flag_openmp) || GCC_OPTION (flag_openmp_simd)) && gimplify_omp_ctxp)
     {
       delete_omp_context (gimplify_omp_ctxp);
       gimplify_omp_ctxp = NULL;
@@ -8650,7 +8650,7 @@ flag_instrument_functions_exclude_p (tree fndecl)
 {
   vec<char_p> *v;
 
-  v = (vec<char_p> *) flag_instrument_functions_exclude_functions;
+  v = (vec<char_p> *) GCC_OPTION (flag_instrument_functions_exclude_functions);
   if (v && v->length () > 0)
     {
       const char *name;
@@ -8663,7 +8663,7 @@ flag_instrument_functions_exclude_p (tree fndecl)
 	  return true;
     }
 
-  v = (vec<char_p> *) flag_instrument_functions_exclude_files;
+  v = (vec<char_p> *) GCC_OPTION (flag_instrument_functions_exclude_files);
   if (v && v->length () > 0)
     {
       const char *name;
@@ -8729,7 +8729,7 @@ gimplify_function_tree (tree fndecl)
      the entry hook and wrap the whole function in a TRY_FINALLY_EXPR to
      catch the exit hook.  */
   /* ??? Add some way to ignore exceptions for this TFE.  */
-  if (flag_instrument_function_entry_exit
+  if (GCC_OPTION (flag_instrument_function_entry_exit)
       && !DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (fndecl)
       && !flag_instrument_functions_exclude_p (fndecl))
     {
diff --git a/gcc/go/go-backend.c b/gcc/go/go-backend.c
index de33601..78cc1a4 100644
--- a/gcc/go/go-backend.c
+++ b/gcc/go/go-backend.c
@@ -89,7 +89,7 @@ go_trampoline_info (unsigned int *size, unsigned int *alignment)
 void
 go_imported_unsafe (void)
 {
-  flag_strict_aliasing = false;
+  GCC_OPTION (flag_strict_aliasing) = false;
 
   /* Let the backend know that the options have changed.  */
   targetm.override_options_after_change ();
diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c
index c0f2f1f..a92dd70 100644
--- a/gcc/go/go-lang.c
+++ b/gcc/go/go-lang.c
@@ -267,8 +267,8 @@ go_langhook_post_options (const char **pfilename ATTRIBUTE_UNUSED)
     go_add_search_path (dir);
   go_search_dirs.release ();
 
-  if (flag_excess_precision_cmdline == EXCESS_PRECISION_DEFAULT)
-    flag_excess_precision_cmdline = EXCESS_PRECISION_STANDARD;
+  if (GCC_OPTION (flag_excess_precision_cmdline) == EXCESS_PRECISION_DEFAULT)
+    GCC_OPTION (flag_excess_precision_cmdline) = EXCESS_PRECISION_STANDARD;
 
   /* Tail call optimizations can confuse uses of runtime.Callers.  */
   if (!global_options_set.x_flag_optimize_sibling_calls)
@@ -281,8 +281,8 @@ go_langhook_post_options (const char **pfilename ATTRIBUTE_UNUSED)
 static void
 go_langhook_parse_file (void)
 {
-  go_parse_input_files (in_fnames, num_in_fnames, flag_syntax_only,
-			go_require_return_statement);
+  go_parse_input_files (in_fnames, num_in_fnames, GCC_OPTION (flag_syntax_only),
+			GCC_OPTION (go_require_return_statement));
 }
 
 static tree
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc
index 6ac18f5..4106728 100644
--- a/gcc/go/gofrontend/expressions.cc
+++ b/gcc/go/gofrontend/expressions.cc
@@ -5583,7 +5583,7 @@ Binary_expression::do_flatten(Gogo*, Named_object*,
   // defined in gcc/go/lang.opt.  These should be defined in go_create_gogo
   // and accessed from the Gogo* passed to do_flatten.
   if (is_shift_op
-      || (is_idiv_op && (go_check_divide_zero || go_check_divide_overflow)))
+      || (is_idiv_op && (GCC_OPTION (go_check_divide_zero) || GCC_OPTION (go_check_divide_overflow))))
     {
       if (!this->left_->is_variable())
         {
@@ -6163,7 +6163,7 @@ Binary_expression::do_get_tree(Translate_context* context)
   // Add checks for division by zero and division overflow as needed.
   if (is_idiv_op)
     {
-      if (go_check_divide_zero)
+      if (GCC_OPTION (go_check_divide_zero))
 	{
 	  // right == 0
           Bexpression* zero_expr =
@@ -6182,7 +6182,7 @@ Binary_expression::do_get_tree(Translate_context* context)
                                                         crash_expr, ret, loc);
 	}
 
-      if (go_check_divide_overflow)
+      if (GCC_OPTION (go_check_divide_overflow))
 	{
 	  // right == -1
 	  // FIXME: It would be nice to say that this test is expected
@@ -9849,7 +9849,7 @@ Call_expression::do_get_tree(Translate_context* context)
 
   // This is to support builtin math functions when using 80387 math.
   tree excess_type = NULL_TREE;
-  if (optimize
+  if (GCC_OPTION (optimize)
       && TREE_CODE(fndecl) == FUNCTION_DECL
       && DECL_IS_BUILTIN(fndecl)
       && DECL_BUILT_IN_CLASS(fndecl) == BUILT_IN_NORMAL
diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c
index fc60845..5ebbcd2 100644
--- a/gcc/graphite-clast-to-gimple.c
+++ b/gcc/graphite-clast-to-gimple.c
@@ -1196,7 +1196,7 @@ translate_clast_for_loop (loop_p context_loop, struct clast_for *stmt,
   isl_set *domain = isl_set_from_cloog_domain (stmt->domain);
   int scheduling_dim = isl_set_n_dim (domain);
 
-  if (flag_loop_parallelize_all
+  if (GCC_OPTION (flag_loop_parallelize_all)
       && loop_is_parallel_p (loop, bb_pbb_mapping, scheduling_dim))
     loop->can_be_parallel = true;
 
@@ -1399,11 +1399,11 @@ static FILE *
 init_cloog_input_file (int scop_number)
 {
   FILE *graphite_out_file;
-  int len = strlen (dump_base_name);
+  int len = strlen (GCC_OPTION (dump_base_name));
   char *dumpname = XNEWVEC (char, len + 25);
   char *s_scop_number = XNEWVEC (char, 15);
 
-  memcpy (dumpname, dump_base_name, len + 1);
+  memcpy (dumpname, GCC_OPTION (dump_base_name), len + 1);
   strip_off_ending (dumpname, len);
   sprintf (s_scop_number, ".%d", scop_number);
   strcat (dumpname, s_scop_number);
diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c
index 4ca62f9..259d55a 100644
--- a/gcc/graphite-poly.c
+++ b/gcc/graphite-poly.c
@@ -236,26 +236,26 @@ apply_poly_transforms (scop_p scop)
      transformation: GIMPLE -> GRAPHITE -> GIMPLE
      Keep in mind that CLooG optimizes in control, so the loop structure
      may change, even if we only use -fgraphite-identity.  */
-  if (flag_graphite_identity)
+  if (GCC_OPTION (flag_graphite_identity))
     transform_done = true;
 
-  if (flag_loop_parallelize_all)
+  if (GCC_OPTION (flag_loop_parallelize_all))
     transform_done = true;
 
-  if (flag_loop_block)
+  if (GCC_OPTION (flag_loop_block))
     transform_done |= scop_do_block (scop);
   else
     {
-      if (flag_loop_strip_mine)
+      if (GCC_OPTION (flag_loop_strip_mine))
 	transform_done |= scop_do_strip_mine (scop, 0);
 
-      if (flag_loop_interchange)
+      if (GCC_OPTION (flag_loop_interchange))
 	transform_done |= scop_do_interchange (scop);
     }
 
   /* This pass needs to be run at the final stage, as it does not
      update the lst.  */
-  if (flag_loop_optimize_isl)
+  if (GCC_OPTION (flag_loop_optimize_isl))
     transform_done |= optimize_isl (scop);
 
   return transform_done;
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index d4a1bb2..77dd68c 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -1857,7 +1857,7 @@ dump_alias_graphs (vec<data_reference_p> drs)
   file_dimacs = fopen ("/tmp/dr_alias_graph_dimacs", "ab");
   if (file_dimacs)
     {
-      snprintf (comment, sizeof (comment), "%s %s", main_input_filename,
+      snprintf (comment, sizeof (comment), "%s %s", GCC_OPTION (main_input_filename),
 		current_function_name ());
       write_alias_graph_to_ascii_dimacs (file_dimacs, comment, drs);
       fclose (file_dimacs);
@@ -1866,7 +1866,7 @@ dump_alias_graphs (vec<data_reference_p> drs)
   file_ecc = fopen ("/tmp/dr_alias_graph_ecc", "ab");
   if (file_ecc)
     {
-      snprintf (comment, sizeof (comment), "%s %s", main_input_filename,
+      snprintf (comment, sizeof (comment), "%s %s", GCC_OPTION (main_input_filename),
 		current_function_name ());
       write_alias_graph_to_ascii_ecc (file_ecc, comment, drs);
       fclose (file_ecc);
@@ -1875,7 +1875,7 @@ dump_alias_graphs (vec<data_reference_p> drs)
   file_dot = fopen ("/tmp/dr_alias_graph_dot", "ab");
   if (file_dot)
     {
-      snprintf (comment, sizeof (comment), "%s %s", main_input_filename,
+      snprintf (comment, sizeof (comment), "%s %s", GCC_OPTION (main_input_filename),
 		current_function_name ());
       write_alias_graph_to_ascii_dot (file_dot, comment, drs);
       fclose (file_dot);
@@ -2607,7 +2607,7 @@ is_reduction_operation_p (gimple stmt)
   gcc_assert (is_gimple_assign (stmt));
   code = gimple_assign_rhs_code (stmt);
 
-  return flag_associative_math
+  return GCC_OPTION (flag_associative_math)
     && commutative_tree_code (code)
     && associative_tree_code (code);
 }
@@ -3145,7 +3145,7 @@ build_poly_scop (scop_p scop)
   if (!scop_ivs_can_be_represented (scop))
     return;
 
-  if (flag_associative_math)
+  if (GCC_OPTION (flag_associative_math))
     rewrite_commutative_reductions_out_of_ssa (scop);
 
   build_sese_loop_nests (region);
diff --git a/gcc/graphite.c b/gcc/graphite.c
index 311b7e3..f90b1bd 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -339,15 +339,15 @@ gate_graphite_transforms (void)
 {
   /* Enable -fgraphite pass if any one of the graphite optimization flags
      is turned on.  */
-  if (flag_loop_block
-      || flag_loop_interchange
-      || flag_loop_strip_mine
-      || flag_graphite_identity
-      || flag_loop_parallelize_all
-      || flag_loop_optimize_isl)
-    flag_graphite = 1;
-
-  return flag_graphite != 0;
+  if (GCC_OPTION (flag_loop_block)
+      || GCC_OPTION (flag_loop_interchange)
+      || GCC_OPTION (flag_loop_strip_mine)
+      || GCC_OPTION (flag_graphite_identity)
+      || GCC_OPTION (flag_loop_parallelize_all)
+      || GCC_OPTION (flag_loop_optimize_isl))
+    GCC_OPTION (flag_graphite) = 1;
+
+  return GCC_OPTION (flag_graphite) != 0;
 }
 
 namespace {
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index e0d4674..be9f6f3 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -2567,7 +2567,7 @@ rank_for_schedule (const void *x, const void *y)
     }
 
   /* The insn in a schedule group should be issued the first.  */
-  if (flag_sched_group_heuristic &&
+  if (GCC_OPTION (flag_sched_group_heuristic) &&
       SCHED_GROUP_P (tmp) != SCHED_GROUP_P (tmp2))
     return SCHED_GROUP_P (tmp2) ? 1 : -1;
 
@@ -2609,11 +2609,11 @@ rank_for_schedule (const void *x, const void *y)
   /* Prefer insn with higher priority.  */
   priority_val = INSN_PRIORITY (tmp2) - INSN_PRIORITY (tmp);
 
-  if (flag_sched_critical_path_heuristic && priority_val)
+  if (GCC_OPTION (flag_sched_critical_path_heuristic) && priority_val)
     return priority_val;
 
   /* Prefer speculative insn with greater dependencies weakness.  */
-  if (flag_sched_spec_insn_heuristic && spec_info)
+  if (GCC_OPTION (flag_sched_spec_insn_heuristic) && spec_info)
     {
       ds_t ds1, ds2;
       dw_t dw1, dw2;
@@ -2637,12 +2637,12 @@ rank_for_schedule (const void *x, const void *y)
     }
 
   info_val = (*current_sched_info->rank) (tmp, tmp2);
-  if (flag_sched_rank_heuristic && info_val)
+  if (GCC_OPTION (flag_sched_rank_heuristic) && info_val)
     return info_val;
 
   /* Compare insns based on their relation to the last scheduled
      non-debug insn.  */
-  if (flag_sched_last_insn_heuristic && last_nondebug_scheduled_insn)
+  if (GCC_OPTION (flag_sched_last_insn_heuristic) && last_nondebug_scheduled_insn)
     {
       dep_t dep1;
       dep_t dep2;
@@ -2694,7 +2694,7 @@ rank_for_schedule (const void *x, const void *y)
   val = (dep_list_size (tmp2, SD_LIST_FORW)
 	 - dep_list_size (tmp, SD_LIST_FORW));
 
-  if (flag_sched_dep_count_heuristic && val != 0)
+  if (GCC_OPTION (flag_sched_dep_count_heuristic) && val != 0)
     return val;
 
   /* If insns are equally good, sort by INSN_LUID (original insn order),
@@ -3863,7 +3863,7 @@ schedule_insn (rtx insn)
   if (INSN_TICK (insn) > clock_var)
     /* INSN has been prematurely moved from the queue to the ready list.
        This is possible only if following flag is set.  */
-    gcc_assert (flag_sched_stalled_insns);
+    gcc_assert (GCC_OPTION (flag_sched_stalled_insns));
 
   /* ??? Probably, if INSN is scheduled prematurely, we should leave
      INSN_TICK untouched.  This is a machine-dependent issue, actually.  */
@@ -4961,7 +4961,7 @@ ok_for_early_queue_removal (rtx insn)
       rtx prev_insn;
       int n_cycles;
       int i = scheduled_insns.length ();
-      for (n_cycles = flag_sched_stalled_insns_dep; n_cycles; n_cycles--)
+      for (n_cycles = GCC_OPTION (flag_sched_stalled_insns_dep); n_cycles; n_cycles--)
 	{
 	  while (i-- > 0)
 	    {
@@ -4980,7 +4980,7 @@ ok_for_early_queue_removal (rtx insn)
 		      cost = dep_cost (dep);
 
 		      if (targetm.sched.is_costly_dependence (dep, cost,
-				flag_sched_stalled_insns_dep - n_cycles))
+				GCC_OPTION (flag_sched_stalled_insns_dep) - n_cycles))
 			return false;
 		    }
 		}
@@ -5028,7 +5028,7 @@ early_queue_to_ready (state_t state, struct ready_list *ready)
          (flag_sched_stalled_insns = 0)
   */
 
-  if (! flag_sched_stalled_insns)
+  if (! GCC_OPTION (flag_sched_stalled_insns))
     return 0;
 
   for (stalls = 0; stalls <= max_insn_queue_index; stalls++)
@@ -5079,7 +5079,7 @@ early_queue_to_ready (state_t state, struct ready_list *ready)
 				 (*current_sched_info->print_insn) (insn, 0));
 
 		      insns_removed++;
-		      if (insns_removed == flag_sched_stalled_insns)
+		      if (insns_removed == GCC_OPTION (flag_sched_stalled_insns))
 			/* Remove no more than flag_sched_stalled_insns insns
 			   from Q at a time.  */
 			return insns_removed;
@@ -6546,10 +6546,10 @@ set_priorities (rtx head, rtx tail)
 void
 setup_sched_dump (void)
 {
-  sched_verbose = sched_verbose_param;
-  if (sched_verbose_param == 0 && dump_file)
+  sched_verbose = GCC_OPTION (sched_verbose_param);
+  if (GCC_OPTION (sched_verbose_param) == 0 && dump_file)
     sched_verbose = 1;
-  sched_dump = ((sched_verbose_param >= 10 || !dump_file)
+  sched_dump = ((GCC_OPTION (sched_verbose_param) >= 10 || !dump_file)
 		? stderr : dump_file);
 }
 
@@ -6610,7 +6610,7 @@ sched_init (void)
 {
   /* Disable speculative loads in their presence if cc0 defined.  */
 #ifdef HAVE_cc0
-  flag_schedule_speculative_load = 0;
+  GCC_OPTION (flag_schedule_speculative_load) = 0;
 #endif
 
   if (targetm.sched.dispatch (NULL_RTX, IS_DISPATCH_ON))
@@ -6618,7 +6618,7 @@ sched_init (void)
 
   if (live_range_shrinkage_p)
     sched_pressure = SCHED_PRESSURE_WEIGHTED;
-  else if (flag_sched_pressure
+  else if (GCC_OPTION (flag_sched_pressure)
 	   && !reload_completed
 	   && common_sched_info->sched_pass_id == SCHED_RGN_PASS)
     sched_pressure = ((enum sched_pressure_algorithm)
@@ -7648,7 +7648,7 @@ sched_create_recovery_edges (basic_block first_bb, basic_block rec,
     /* Partition type is the same, if it is "unpartitioned".  */
     {
       /* Rewritten from cfgrtl.c.  */
-      if (flag_reorder_blocks_and_partition
+      if (GCC_OPTION (flag_reorder_blocks_and_partition)
 	  && targetm_common.have_named_sections)
 	{
 	  /* We don't need the same note for the check because
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 79aa2f3..f63abce 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -4233,7 +4233,7 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb,
 	 register used to pass function parameters, which then must be
 	 saved in caller-saved regs.  A caller-saved reg requires the
 	 prologue, killing a shrink-wrap opportunity.  */
-      if ((flag_shrink_wrap && HAVE_simple_return && !epilogue_completed)
+      if ((GCC_OPTION (flag_shrink_wrap) && HAVE_simple_return && !epilogue_completed)
 	  && ENTRY_BLOCK_PTR_FOR_FN (cfun)->next_bb == test_bb
 	  && single_succ_p (new_dest)
 	  && single_succ (new_dest) == EXIT_BLOCK_PTR_FOR_FN (cfun)
@@ -4405,7 +4405,7 @@ if_convert (bool after_combine)
   basic_block bb;
   int pass;
 
-  if (optimize == 1)
+  if (GCC_OPTION (optimize) == 1)
     {
       df_live_add_problem ();
       df_live_set_all_dirty ();
@@ -4489,7 +4489,7 @@ if_convert (bool after_combine)
 	       num_true_changes);
     }
 
-  if (optimize == 1)
+  if (GCC_OPTION (optimize) == 1)
     df_remove_problem (df_live);
 
 #ifdef ENABLE_CHECKING
@@ -4500,7 +4500,7 @@ if_convert (bool after_combine)
 static bool
 gate_handle_if_conversion (void)
 {
-  return (optimize > 0)
+  return (GCC_OPTION (optimize) > 0)
     && dbg_cnt (if_conversion);
 }
 
@@ -4508,7 +4508,7 @@ gate_handle_if_conversion (void)
 static unsigned int
 rest_of_handle_if_conversion (void)
 {
-  if (flag_if_conversion)
+  if (GCC_OPTION (flag_if_conversion))
     {
       if (dump_file)
 	{
@@ -4564,7 +4564,7 @@ make_pass_rtl_ifcvt (gcc::context *ctxt)
 static bool
 gate_handle_if_after_combine (void)
 {
-  return optimize > 0 && flag_if_conversion
+  return GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_if_conversion)
     && dbg_cnt (if_after_combine);
 }
 
@@ -4620,7 +4620,7 @@ make_pass_if_after_combine (gcc::context *ctxt)
 static bool
 gate_handle_if_after_reload (void)
 {
-  return optimize > 0 && flag_if_conversion2
+  return GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_if_conversion2)
     && dbg_cnt (if_after_reload);
 }
 
diff --git a/gcc/incpath.c b/gcc/incpath.c
index f495c0a..cb88fce 100644
--- a/gcc/incpath.c
+++ b/gcc/incpath.c
@@ -153,13 +153,13 @@ add_standard_paths (const char *sysroot, const char *iprefix,
 				    imultilib, NULL);
 		  else if (p->multilib == 2)
 		    {
-		      if (!imultiarch)
+		      if (!GCC_OPTION (imultiarch))
 			{
 			  free (str);
 			  continue;
 			}
 		      str = reconcat (str, str, dir_separator_str,
-				      imultiarch, NULL);
+				      GCC_OPTION (imultiarch), NULL);
 		    }
 		  add_path (str, SYSTEM, p->cxx_aware, false);
 		}
@@ -219,12 +219,12 @@ add_standard_paths (const char *sysroot, const char *iprefix,
 	    str = reconcat (str, str, dir_separator_str, imultilib, NULL);
 	  else if (p->multilib == 2)
 	    {
-	      if (!imultiarch)
+	      if (!GCC_OPTION (imultiarch))
 		{
 		  free (str);
 		  continue;
 		}
-	      str = reconcat (str, str, dir_separator_str, imultiarch, NULL);
+	      str = reconcat (str, str, dir_separator_str, GCC_OPTION (imultiarch), NULL);
 	    }
 
 	  add_path (str, SYSTEM, p->cxx_aware, false);
diff --git a/gcc/init-regs.c b/gcc/init-regs.c
index fcc6e2c..b4af057 100644
--- a/gcc/init-regs.c
+++ b/gcc/init-regs.c
@@ -51,7 +51,7 @@ initialize_uninitialized_regs (void)
   basic_block bb;
   bitmap already_genned = BITMAP_ALLOC (NULL);
 
-  if (optimize == 1)
+  if (GCC_OPTION (optimize) == 1)
     {
       df_live_add_problem ();
       df_live_set_all_dirty ();
@@ -115,7 +115,7 @@ initialize_uninitialized_regs (void)
 	}
     }
 
-  if (optimize == 1)
+  if (GCC_OPTION (optimize) == 1)
     {
       if (dump_file)
 	df_dump (dump_file);
@@ -128,7 +128,7 @@ initialize_uninitialized_regs (void)
 static bool
 gate_initialize_regs (void)
 {
-  return optimize > 0;
+  return GCC_OPTION (optimize) > 0;
 }
 
 static unsigned int
diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c
index 9926ec2..cf9b8f1 100644
--- a/gcc/internal-fn.c
+++ b/gcc/internal-fn.c
@@ -870,7 +870,7 @@ static void
 expand_BUILTIN_EXPECT (gimple stmt)
 {
   /* When guessing was done, the hints should be already stripped away.  */
-  gcc_assert (!flag_guess_branch_prob || optimize == 0 || seen_error ());
+  gcc_assert (!GCC_OPTION (flag_guess_branch_prob) || GCC_OPTION (optimize) == 0 || seen_error ());
 
   rtx target;
   tree lhs = gimple_call_lhs (stmt);
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index b71048a..84f042a 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -514,7 +514,7 @@ ipcp_cloning_candidate_p (struct cgraph_node *node)
 
   gcc_checking_assert (cgraph_function_with_gimple_body_p (node));
 
-  if (!flag_ipa_cp_clone)
+  if (!GCC_OPTION (flag_ipa_cp_clone))
     {
       if (dump_file)
         fprintf (dump_file, "Not considering %s for cloning; "
@@ -838,7 +838,7 @@ ipa_value_from_jfunc (struct ipa_node_params *info, struct ipa_jump_func *jfunc)
 
 	  if (!info->lattices)
 	    {
-	      gcc_checking_assert (!flag_ipa_cp);
+	      gcc_checking_assert (!GCC_OPTION (flag_ipa_cp));
 	      return NULL_TREE;
 	    }
 	  lat = ipa_get_scalar_lat (info, idx);
@@ -1534,7 +1534,7 @@ ipa_get_indirect_edge_target_1 (struct cgraph_edge *ie,
 	return NULL_TREE;
     }
 
-  if (!flag_devirtualize)
+  if (!GCC_OPTION (flag_devirtualize))
     return NULL_TREE;
 
   gcc_assert (!ie->indirect_info->agg_contents);
@@ -1731,7 +1731,7 @@ good_cloning_opportunity_p (struct cgraph_node *node, int time_benefit,
 			    int freq_sum, gcov_type count_sum, int size_cost)
 {
   if (time_benefit == 0
-      || !flag_ipa_cp_clone
+      || !GCC_OPTION (flag_ipa_cp_clone)
       || !optimize_function_for_speed_p (DECL_STRUCT_FUNCTION (node->decl)))
     return false;
 
@@ -2296,7 +2296,7 @@ ipcp_propagate_stage (struct topo_info *topo)
   if (dump_file)
     fprintf (dump_file, "\n Propagating constants:\n\n");
 
-  if (in_lto_p)
+  if (GCC_OPTION (in_lto_p))
     ipa_update_after_lto_read ();
 
 
@@ -3763,7 +3763,7 @@ cgraph_gate_cp (void)
 {
   /* FIXME: We should remove the optimize check after we ensure we never run
      IPA passes when not optimizing.  */
-  return flag_ipa_cp && optimize;
+  return GCC_OPTION (flag_ipa_cp) && GCC_OPTION (optimize);
 }
 
 namespace {
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index 2f84f17..fb29d48 100644
--- a/gcc/ipa-devirt.c
+++ b/gcc/ipa-devirt.c
@@ -200,7 +200,7 @@ hash_type_name (tree t)
 
   /* If not in LTO, all main variants are unique, so we can do
      pointer hash.  */
-  if (!in_lto_p)
+  if (!GCC_OPTION (in_lto_p))
     return htab_hash_pointer (t);
 
   /* Anonymous types are unique.  */
@@ -247,7 +247,7 @@ odr_hasher::equal (const value_type *t1, const compare_type *ct2)
   gcc_checking_assert (TYPE_MAIN_VARIANT (ct2) == ct2);
   if (t1->type == t2)
     return true;
-  if (!in_lto_p)
+  if (!GCC_OPTION (in_lto_p))
     return false;
   return types_same_for_odr (t1->type, t2);
 }
@@ -292,7 +292,7 @@ add_type_duplicate (odr_type val, tree type)
     {
       bool merge = true;
       bool base_mismatch = false;
-      gcc_assert (in_lto_p);
+      gcc_assert (GCC_OPTION (in_lto_p));
       vec_safe_push (val->types, type);
       unsigned int i,j;
 
@@ -367,7 +367,7 @@ add_type_duplicate (odr_type val, tree type)
 	 merged LTO unit.  For this reason we absolutely need to remove
 	 them and replace by internal variants. Not doing so will lead
          to incomplete answers from possible_polymorphic_call_targets.  */
-      if (!flag_ltrans && merge)
+      if (!GCC_OPTION (flag_ltrans) && merge)
 	{
 	  tree master_binfo = TYPE_BINFO (val->type);
 	  tree v1 = BINFO_VTABLE (master_binfo);
@@ -617,7 +617,7 @@ maybe_record_node (vec <cgraph_node *> &nodes,
     {
       /* The only case when method of anonymous namespace becomes unreferable
 	 is when we completely optimized it out.  */
-      if (flag_ltrans
+      if (GCC_OPTION (flag_ltrans)
 	  || !target 
           || !type_in_anonymous_namespace_p (DECL_CONTEXT (target)))
 	*completep = false;
@@ -721,7 +721,7 @@ record_target_from_binfo (vec <cgraph_node *> &nodes,
 	}
       /* For types in anonymous namespace first check if the respective vtable
 	 is alive. If not, we know the type can't be called.  */
-      if (!flag_ltrans && anonymous)
+      if (!GCC_OPTION (flag_ltrans) && anonymous)
 	{
 	  tree vtable = BINFO_VTABLE (inner_binfo);
 	  varpool_node *vnode;
@@ -1530,7 +1530,7 @@ possible_polymorphic_call_targets (tree otr_type,
     {
       /* For anonymous namespace types we can attempt to build full type.
 	 All derivations must be in this unit (unless we see partial unit).  */
-      if (!type->anonymous_namespace || flag_ltrans)
+      if (!type->anonymous_namespace || GCC_OPTION (flag_ltrans))
 	complete = false;
       for (i = 0; i < outer_type->derived_types.length(); i++)
 	possible_polymorphic_call_targets_1 (nodes, inserted,
@@ -1603,10 +1603,10 @@ dump_possible_polymorphic_call_targets (FILE *f,
 	fprintf (f, "\n     If the type is in construction,"
 		 " then additional tarets are:\n"
 		 "      ");
-      if (in_lto_p)
+      if (GCC_OPTION (in_lto_p))
 	name = cplus_demangle_v3 (targets[i]->asm_name (), 0);
       fprintf (f, " %s/%i", name ? name : targets[i]->name (), targets[i]->order);
-      if (in_lto_p)
+      if (GCC_OPTION (in_lto_p))
 	free (name);
       if (!targets[i]->definition)
 	fprintf (f, " (no definition%s)",
@@ -1885,9 +1885,9 @@ ipa_devirt (void)
 static bool
 gate_ipa_devirt (void)
 {
-  return (flag_devirtualize
-	  && flag_devirtualize_speculatively
-	  && optimize);
+  return (GCC_OPTION (flag_devirtualize)
+	  && GCC_OPTION (flag_devirtualize_speculatively)
+	  && GCC_OPTION (optimize));
 }
 
 namespace {
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index 98f42ef..9cf6866 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -1568,7 +1568,7 @@ eliminated_by_inlining_prob (gimple stmt)
   enum gimple_code code = gimple_code (stmt);
   enum tree_code rhs_code;
 
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     return 0;
 
   switch (code)
@@ -2433,7 +2433,7 @@ estimate_function_body_sizes (struct cgraph_node *node, bool early)
   info->conds = NULL;
   info->entry = NULL;
 
-  if (optimize && !early)
+  if (GCC_OPTION (optimize) && !early)
     {
       calculate_dominance_info (CDI_DOMINATORS);
       loop_optimizer_init (LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS);
@@ -2774,7 +2774,7 @@ estimate_function_body_sizes (struct cgraph_node *node, bool early)
   inline_summary (node)->self_time = time;
   inline_summary (node)->self_size = size;
   nonconstant_names.release ();
-  if (optimize && !early)
+  if (GCC_OPTION (optimize) && !early)
     {
       loop_optimizer_finalize ();
       free_dominance_info (CDI_DOMINATORS);
@@ -2825,13 +2825,13 @@ compute_inline_parameters (struct cgraph_node *node, bool early)
   push_cfun (DECL_STRUCT_FUNCTION (node->decl));
 
   /* Estimate the stack size for the function if we're optimizing.  */
-  self_stack_size = optimize ? estimated_stack_frame_size (node) : 0;
+  self_stack_size = GCC_OPTION (optimize) ? estimated_stack_frame_size (node) : 0;
   info->estimated_self_stack_size = self_stack_size;
   info->estimated_stack_size = self_stack_size;
   info->stack_frame_offset = 0;
 
   /* Can this function be inlined at all?  */
-  if (!optimize && !lookup_attribute ("always_inline",
+  if (!GCC_OPTION (optimize) && !lookup_attribute ("always_inline",
 				      DECL_ATTRIBUTES (node->decl)))
     info->inlinable = false;
   else
@@ -2948,7 +2948,7 @@ estimate_edge_devirt_benefit (struct cgraph_edge *ie,
 
   if (!known_vals.exists () && !known_binfos.exists ())
     return false;
-  if (!flag_indirect_inlining)
+  if (!GCC_OPTION (flag_indirect_inlining))
     return false;
 
   target = ipa_get_indirect_edge_target (ie, known_vals, known_binfos,
@@ -3851,10 +3851,10 @@ inline_analyze_function (struct cgraph_node *node)
   if (dump_file)
     fprintf (dump_file, "\nAnalyzing function: %s/%u\n",
 	     node->name (), node->order);
-  if (optimize && !node->thunk.thunk_p)
+  if (GCC_OPTION (optimize) && !node->thunk.thunk_p)
     inline_indirect_intraprocedural_analysis (node);
   compute_inline_parameters (node, false);
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     {
       struct cgraph_edge *e;
       for (e = node->callees; e; e = e->next_callee)
@@ -3893,7 +3893,7 @@ inline_generate_summary (void)
 
   /* When not optimizing, do not bother to analyze.  Inlining is still done
      because edge redirection needs to happen there.  */
-  if (!optimize && !flag_lto && !flag_wpa)
+  if (!GCC_OPTION (optimize) && !GCC_OPTION (flag_lto) && !GCC_OPTION (flag_wpa))
     return;
 
   function_insertion_hook_holder =
@@ -4075,10 +4075,10 @@ inline_read_summary (void)
 	   unit, so this should never happen.  */
 	fatal_error ("ipa inline summary is missing in input file");
     }
-  if (optimize)
+  if (GCC_OPTION (optimize))
     {
       ipa_register_cgraph_hooks ();
-      if (!flag_ipa_cp)
+      if (!GCC_OPTION (flag_ipa_cp))
 	ipa_prop_read_jump_functions ();
     }
   function_insertion_hook_holder =
@@ -4198,7 +4198,7 @@ inline_write_summary (void)
   produce_asm (ob, NULL);
   destroy_output_block (ob);
 
-  if (optimize && !flag_ipa_cp)
+  if (GCC_OPTION (optimize) && !GCC_OPTION (flag_ipa_cp))
     ipa_prop_write_jump_functions ();
 }
 
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c
index b2e0285..a5ba5fe 100644
--- a/gcc/ipa-inline-transform.c
+++ b/gcc/ipa-inline-transform.c
@@ -273,7 +273,7 @@ inline_call (struct cgraph_edge *e, bool update_original,
 
   old_size = inline_summary (to)->size;
   inline_merge_summary (e);
-  if (optimize)
+  if (GCC_OPTION (optimize))
     new_edges_found = ipa_propagate_indirect_call_infos (curr, new_edges);
   if (update_overall_summary)
    inline_update_overall_summary (to);
@@ -449,7 +449,7 @@ inline_transform (struct cgraph_node *node)
   ipa_remove_all_references (&node->ref_list);
 
   timevar_push (TV_INTEGRATION);
-  if (node->callees && optimize)
+  if (node->callees && GCC_OPTION (optimize))
     todo = optimize_inline_calls (current_function_decl);
   timevar_pop (TV_INTEGRATION);
 
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index f6f97f8..4982a44 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -240,7 +240,7 @@ static bool
 sanitize_attrs_match_for_inline_p (const_tree caller, const_tree callee)
 {
   /* Don't care if sanitizer is disabled */
-  if (!(flag_sanitize & SANITIZE_ADDRESS))
+  if (!(GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS))
     return true;
 
   if (!caller || !callee)
@@ -450,7 +450,7 @@ want_early_inline_function_p (struct cgraph_edge *e)
   if (DECL_DISREGARD_INLINE_LIMITS (callee->decl))
     ;
   else if (!DECL_DECLARED_INLINE_P (callee->decl)
-	   && !flag_inline_small_functions)
+	   && !GCC_OPTION (flag_inline_small_functions))
     {
       e->inline_failed = CIF_FUNCTION_NOT_INLINE_CANDIDATE;
       report_inline_failed_reason (e);
@@ -568,7 +568,7 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
   if (DECL_DISREGARD_INLINE_LIMITS (callee->decl))
     ;
   else if (!DECL_DECLARED_INLINE_P (callee->decl)
-	   && !flag_inline_small_functions)
+	   && !GCC_OPTION (flag_inline_small_functions))
     {
       e->inline_failed = CIF_FUNCTION_NOT_INLINE_CANDIDATE;
       want_inline = false;
@@ -631,7 +631,7 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
 		&& estimate_growth (callee) <= 0)
 	;
       else if (!DECL_DECLARED_INLINE_P (callee->decl)
-	       && !flag_inline_functions)
+	       && !GCC_OPTION (flag_inline_functions))
 	{
           e->inline_failed = CIF_NOT_DECLARED_INLINED;
 	  want_inline = false;
@@ -991,7 +991,7 @@ edge_badness (struct cgraph_edge *edge, bool dump)
 
      compensated by the inline hints.
   */
-  else if (flag_guess_branch_prob)
+  else if (GCC_OPTION (flag_guess_branch_prob))
     {
       badness = (relative_time_benefit (callee_info, edge, edge_time)
 		 * (INT_MIN / 16 / RELATIVE_TIME_BENEFIT_RANGE));
@@ -1568,7 +1568,7 @@ inline_small_functions (void)
   struct cgraph_node **order = XCNEWVEC (struct cgraph_node *, cgraph_n_nodes);
   struct cgraph_edge_hook_list *edge_removal_hook_holder;
 
-  if (flag_indirect_inlining)
+  if (GCC_OPTION (flag_indirect_inlining))
     new_indirect_edges.create (8);
 
   edge_removal_hook_holder
@@ -1669,9 +1669,9 @@ inline_small_functions (void)
 	}
     }
 
-  gcc_assert (in_lto_p
+  gcc_assert (GCC_OPTION (in_lto_p)
 	      || !max_count
-	      || (profile_info && flag_branch_probabilities));
+	      || (profile_info && GCC_OPTION (flag_branch_probabilities)));
 
   while (!fibheap_empty (edge_heap))
     {
@@ -1726,9 +1726,9 @@ inline_small_functions (void)
 		   " Estimated growth after inlined into all is %+i insns.\n"
 		   " Estimated badness is %i, frequency %.2f.\n",
 		   edge->caller->name (), edge->caller->order,
-		   flag_wpa ? "unknown"
+		   GCC_OPTION (flag_wpa) ? "unknown"
 		   : gimple_filename ((const_gimple) edge->call_stmt),
-		   flag_wpa ? -1
+		   GCC_OPTION (flag_wpa) ? -1
 		   : gimple_lineno ((const_gimple) edge->call_stmt),
 		   estimate_growth (callee),
 		   badness,
@@ -1765,7 +1765,7 @@ inline_small_functions (void)
 	  if (where->global.inlined_to)
 	    where = where->global.inlined_to;
 	  if (!recursive_inlining (edge,
-				   flag_indirect_inlining
+				   GCC_OPTION (flag_indirect_inlining)
 				   ? &new_indirect_edges : NULL))
 	    {
 	      edge->inline_failed = CIF_RECURSIVE_INLINING;
@@ -1775,7 +1775,7 @@ inline_small_functions (void)
 	  reset_edge_caches (where);
 	  /* Recursive inliner inlines all recursive calls of the function
 	     at once. Consequently we need to update all callee keys.  */
-	  if (flag_indirect_inlining)
+	  if (GCC_OPTION (flag_indirect_inlining))
 	    add_new_edges_to_heap (edge_heap, new_indirect_edges);
           update_callee_keys (edge_heap, where, updated_nodes);
 	  bitmap_clear (updated_nodes);
@@ -1813,7 +1813,7 @@ inline_small_functions (void)
 
 	  gcc_checking_assert (!callee->global.inlined_to);
 	  inline_call (edge, true, &new_indirect_edges, &overall_size, true);
-	  if (flag_indirect_inlining)
+	  if (GCC_OPTION (flag_indirect_inlining))
 	    add_new_edges_to_heap (edge_heap, new_indirect_edges);
 
 	  reset_edge_caches (edge->callee);
@@ -2013,12 +2013,12 @@ ipa_inline (void)
   int cold;
   bool remove_functions = false;
 
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     return 0;
 
   order = XCNEWVEC (struct cgraph_node *, cgraph_n_nodes);
 
-  if (in_lto_p && optimize)
+  if (GCC_OPTION (in_lto_p) && GCC_OPTION (optimize))
     ipa_update_after_lto_read ();
 
   if (dump_file)
@@ -2108,7 +2108,7 @@ ipa_inline (void)
 	      reset_edge_caches (where);
 	      inline_update_overall_summary (where);
 	    }
-	  if (flag_inline_functions_called_once
+	  if (GCC_OPTION (flag_inline_functions_called_once)
 	      && want_inline_function_to_all_callers_p (node, cold))
 	    {
 	      int num_calls = 0;
@@ -2122,7 +2122,7 @@ ipa_inline (void)
     }
 
   /* Free ipa-prop structures if they are no longer needed.  */
-  if (optimize)
+  if (GCC_OPTION (optimize))
     ipa_free_all_structures_after_iinln ();
 
   if (dump_file)
@@ -2133,7 +2133,7 @@ ipa_inline (void)
   if (dump_file)
     dump_inline_summaries (dump_file);
   /* In WPA we use inline summaries for partitioning process.  */
-  if (!flag_wpa)
+  if (!GCC_OPTION (flag_wpa))
     inline_free_summary ();
   return remove_functions ? TODO_remove_functions : 0;
 }
@@ -2203,8 +2203,8 @@ early_inline_small_functions (struct cgraph_node *node)
 
       /* Do not consider functions not declared inline.  */
       if (!DECL_DECLARED_INLINE_P (callee->decl)
-	  && !flag_inline_small_functions
-	  && !flag_inline_functions)
+	  && !GCC_OPTION (flag_inline_small_functions)
+	  && !GCC_OPTION (flag_inline_functions))
 	continue;
 
       if (dump_file)
@@ -2268,9 +2268,9 @@ early_inliner (void)
      functions.  */
   inlined = inline_always_inline_functions (node);
 
-  if (!optimize
-      || flag_no_inline
-      || !flag_early_inlining
+  if (!GCC_OPTION (optimize)
+      || GCC_OPTION (flag_no_inline)
+      || !GCC_OPTION (flag_early_inlining)
       /* Never inline regular functions into always-inline functions
 	 during incremental inlining.  This sucks as functions calling
 	 always inline functions will get less optimized, but at the
diff --git a/gcc/ipa-profile.c b/gcc/ipa-profile.c
index 17de687..096abb3 100644
--- a/gcc/ipa-profile.c
+++ b/gcc/ipa-profile.c
@@ -339,7 +339,7 @@ ipa_propagate_frequency_1 (struct cgraph_node *node, void *data)
 	 errors can make us to push function into unlikely section even when
 	 it is executed by the train run.  Transfer the function only if all
 	 callers are unlikely executed.  */
-      if (profile_info && flag_branch_probabilities
+      if (profile_info && GCC_OPTION (flag_branch_probabilities)
 	  && (edge->caller->frequency != NODE_FREQUENCY_UNLIKELY_EXECUTED
 	      || (edge->caller->global.inlined_to
 		  && edge->caller->global.inlined_to->frequency
@@ -406,7 +406,7 @@ ipa_propagate_frequency (struct cgraph_node *node)
      nor about virtuals.  */
   if (!node->local.local
       || node->alias
-      || (flag_devirtualize && DECL_VIRTUAL_P (node->decl)))
+      || (GCC_OPTION (flag_devirtualize) && DECL_VIRTUAL_P (node->decl)))
     return false;
   gcc_assert (node->analyzed);
   if (dump_file && (dump_flags & TDF_DETAILS))
@@ -558,7 +558,7 @@ ipa_profile (void)
 		   cumulated_size * 100.0 / overall_size);
 	}
       if (threshold > get_hot_bb_threshold ()
-	  || in_lto_p)
+	  || GCC_OPTION (in_lto_p))
 	{
 	  if (dump_file)
 	    fprintf (dump_file, "Threshold updated.\n");
@@ -714,7 +714,7 @@ ipa_profile (void)
 static bool
 gate_ipa_profile (void)
 {
-  return flag_ipa_profile;
+  return GCC_OPTION (flag_ipa_profile);
 }
 
 namespace {
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 9f144fa..4ea92d2 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -395,7 +395,7 @@ ipa_set_jf_known_type (struct ipa_jump_func *jfunc, HOST_WIDE_INT offset,
 {
   gcc_assert (TREE_CODE (component_type) == RECORD_TYPE
 	      && TYPE_BINFO (component_type));
-  if (!flag_devirtualize)
+  if (!GCC_OPTION (flag_devirtualize))
     return;
   gcc_assert (BINFO_VTABLE (TYPE_BINFO (component_type)));
   jfunc->type = IPA_JF_KNOWN_TYPE;
@@ -482,7 +482,7 @@ ipa_set_ancestor_jf (struct ipa_jump_func *jfunc, HOST_WIDE_INT offset,
 		     tree type, int formal_id, bool agg_preserved,
 		     bool type_preserved)
 {
-  if (!flag_devirtualize)
+  if (!GCC_OPTION (flag_devirtualize))
     type_preserved = false;
   gcc_assert (!type_preserved
 	      || (TREE_CODE (type) == RECORD_TYPE
@@ -580,7 +580,7 @@ stmt_may_be_vtbl_ptr_store (gimple stmt)
 
       if (!AGGREGATE_TYPE_P (TREE_TYPE (lhs)))
 	{
-	  if (flag_strict_aliasing
+	  if (GCC_OPTION (flag_strict_aliasing)
 	      && !POINTER_TYPE_P (TREE_TYPE (lhs)))
 	    return false;
 
@@ -690,7 +690,7 @@ detect_type_change (tree arg, tree base, tree comp_type, gimple call,
 		       || handled_component_p (arg));
   /* Const calls cannot call virtual methods through VMT and so type changes do
      not matter.  */
-  if (!flag_devirtualize || !gimple_vuse (call)
+  if (!GCC_OPTION (flag_devirtualize) || !gimple_vuse (call)
       /* Be sure expected_type is polymorphic.  */
       || !comp_type
       || TREE_CODE (comp_type) != RECORD_TYPE
@@ -747,7 +747,7 @@ detect_type_change_ssa (tree arg, tree comp_type,
 			gimple call, struct ipa_jump_func *jfunc)
 {
   gcc_checking_assert (TREE_CODE (arg) == SSA_NAME);
-  if (!flag_devirtualize
+  if (!GCC_OPTION (flag_devirtualize)
       || !POINTER_TYPE_P (TREE_TYPE (arg)))
     return false;
 
@@ -1264,7 +1264,7 @@ compute_known_type_jump_func (tree op, struct ipa_jump_func *jfunc,
   HOST_WIDE_INT offset, size, max_size;
   tree base;
 
-  if (!flag_devirtualize
+  if (!GCC_OPTION (flag_devirtualize)
       || TREE_CODE (op) != ADDR_EXPR
       || TREE_CODE (TREE_TYPE (TREE_TYPE (op))) != RECORD_TYPE
       /* Be sure expected_type is polymorphic.  */
@@ -1706,7 +1706,7 @@ ipa_compute_jump_functions (struct cgraph_node *node,
 								  NULL);
       /* We do not need to bother analyzing calls to unknown
 	 functions unless they may become known during lto/whopr.  */
-      if (!callee->definition && !flag_lto)
+      if (!callee->definition && !GCC_OPTION (flag_lto))
 	continue;
       ipa_compute_jump_functions_for_edge (parms_ainfo, cs);
     }
@@ -2011,7 +2011,7 @@ ipa_analyze_virtual_call_uses (struct cgraph_node *node,
   int index;
   HOST_WIDE_INT anc_offset;
 
-  if (!flag_devirtualize)
+  if (!GCC_OPTION (flag_devirtualize))
     return;
 
   if (TREE_CODE (obj) != SSA_NAME)
@@ -2714,7 +2714,7 @@ try_make_edge_direct_virtual_call (struct cgraph_edge *ie,
 {
   tree binfo, target;
 
-  if (!flag_devirtualize)
+  if (!GCC_OPTION (flag_devirtualize))
     return NULL;
 
   /* First try to do lookup via known virtual table pointer value.  */
@@ -2844,7 +2844,7 @@ update_indirect_edges_after_inlining (struct cgraph_edge *cs,
       param_index = ici->param_index;
       jfunc = ipa_get_ith_jump_func (top, param_index);
 
-      if (!flag_indirect_inlining)
+      if (!GCC_OPTION (flag_indirect_inlining))
 	new_direct_edge = NULL;
       else if (ici->polymorphic)
 	new_direct_edge = try_make_edge_direct_virtual_call (ie, jfunc,
@@ -3374,7 +3374,7 @@ ipa_unregister_cgraph_hooks (void)
 void
 ipa_free_all_structures_after_ipa_cp (void)
 {
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     {
       ipa_free_all_edge_args ();
       ipa_free_all_node_params ();
@@ -3460,7 +3460,7 @@ ipa_get_vector_of_formal_parms (tree fndecl)
   int count;
   tree parm;
 
-  gcc_assert (!flag_wpa);
+  gcc_assert (!GCC_OPTION (flag_wpa));
   count = count_formal_params (fndecl);
   args.create (count);
   for (parm = DECL_ARGUMENTS (fndecl); parm; parm = DECL_CHAIN (parm))
diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h
index 8fdd92c..c88bc57 100644
--- a/gcc/ipa-prop.h
+++ b/gcc/ipa-prop.h
@@ -403,7 +403,7 @@ ipa_get_param_count (struct ipa_node_params *info)
 static inline tree
 ipa_get_param (struct ipa_node_params *info, int i)
 {
-  gcc_checking_assert (!flag_wpa);
+  gcc_checking_assert (!GCC_OPTION (flag_wpa));
   return info->descriptors[i].decl;
 }
 
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index 296f9c0..9f4a3e2 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -579,7 +579,7 @@ check_call (funct_state local, gimple call, bool ipa)
       state_from_flags (&call_state, &call_looping, flags,
 			((flags & (ECF_NORETURN | ECF_NOTHROW))
 			 == (ECF_NORETURN | ECF_NOTHROW))
-			|| (!flag_exceptions && (flags & ECF_NORETURN)));
+			|| (!GCC_OPTION (flag_exceptions) && (flags & ECF_NORETURN)));
       worse_state (&local->pure_const_state, &local->looping,
 		   call_state, call_looping);
     }
@@ -1493,7 +1493,7 @@ propagate (void)
 static bool
 gate_pure_const (void)
 {
-  return (flag_ipa_pure_const
+  return (GCC_OPTION (flag_ipa_pure_const)
 	  /* Don't bother doing anything if the program has errors.  */
 	  && !seen_error ());
 }
@@ -1582,8 +1582,8 @@ local_pure_const (void)
 
   node = cgraph_get_node (current_function_decl);
   skip = skip_function_for_local_pure_const (node);
-  if (!warn_suggest_attribute_const
-      && !warn_suggest_attribute_pure
+  if (!GCC_OPTION (warn_suggest_attribute_const)
+      && !GCC_OPTION (warn_suggest_attribute_pure)
       && skip)
     return 0;
 
@@ -1735,7 +1735,7 @@ execute_warn_function_noreturn (void)
 static bool
 gate_warn_function_noreturn (void)
 {
-  return warn_suggest_attribute_noreturn;
+  return GCC_OPTION (warn_suggest_attribute_noreturn);
 }
 
 namespace {
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c
index dbe32e4..6f7c305 100644
--- a/gcc/ipa-reference.c
+++ b/gcc/ipa-reference.c
@@ -1151,7 +1151,7 @@ ipa_reference_read_optimization_summary (void)
 static bool
 gate_reference (void)
 {
-  return (flag_ipa_reference
+  return (GCC_OPTION (flag_ipa_reference)
 	  /* Don't bother doing anything if the program has errors.  */
 	  && !seen_error ());
 }
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index 38bd883..7522aff 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -1571,7 +1571,7 @@ execute_split_functions (void)
        /* Local functions called once will be completely inlined most of time.  */
        || (!node->callers->next_caller && node->local.local))
       && !node->address_taken
-      && (!flag_lto || !node->externally_visible))
+      && (!GCC_OPTION (flag_lto) || !node->externally_visible))
     {
       if (dump_file)
 	fprintf (dump_file, "Not splitting: not called directly "
@@ -1580,7 +1580,7 @@ execute_split_functions (void)
     }
 
   /* FIXME: We can actually split if splitting reduces call overhead.  */
-  if (!flag_inline_small_functions
+  if (!GCC_OPTION (flag_inline_small_functions)
       && !DECL_DECLARED_INLINE_P (current_function_decl))
     {
       if (dump_file)
@@ -1653,8 +1653,8 @@ execute_split_functions (void)
 static bool
 gate_split_functions (void)
 {
-  return (flag_partial_inlining
-	  && !profile_arc_flag && !flag_branch_probabilities);
+  return (GCC_OPTION (flag_partial_inlining)
+	  && !GCC_OPTION (profile_arc_flag) && !GCC_OPTION (flag_branch_probabilities));
 }
 
 namespace {
@@ -1702,8 +1702,8 @@ make_pass_split_functions (gcc::context *ctxt)
 static bool
 gate_feedback_split_functions (void)
 {
-  return (flag_partial_inlining
-	  && flag_branch_probabilities);
+  return (GCC_OPTION (flag_partial_inlining)
+	  && GCC_OPTION (flag_branch_probabilities));
 }
 
 /* Execute function splitting pass.  */
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 572dba1..6d675be 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -144,7 +144,7 @@ process_references (struct ipa_ref_list *list,
 		     constant folding.  Keep references alive so partitioning
 		     knows about potential references.  */
 		  || (TREE_CODE (node->decl) == VAR_DECL
-		      && flag_wpa
+		      && GCC_OPTION (flag_wpa)
 		      && ctor_for_folding (node->decl)
 		         != error_mark_node))))
 	pointer_set_insert (reachable, node);
@@ -301,7 +301,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
 #ifdef ENABLE_CHECKING
   verify_symtab ();
 #endif
-  if (optimize && flag_devirtualize)
+  if (GCC_OPTION (optimize) && GCC_OPTION (flag_devirtualize))
     build_type_inheritance_graph ();
   if (file)
     fprintf (file, "\nReclaiming functions:");
@@ -389,7 +389,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
 	    {
 	      struct cgraph_edge *e;
 	      /* Keep alive possible targets for devirtualization.  */
-	      if (optimize && flag_devirtualize)
+	      if (GCC_OPTION (optimize) && GCC_OPTION (flag_devirtualize))
 		{
 		  struct cgraph_edge *next;
 		  for (e = cnode->indirect_calls; e; e = next)
@@ -479,7 +479,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
 	  if (!pointer_set_contains (body_needed_for_clonning, node->decl))
 	    cgraph_release_function_body (node);
 	  else if (!node->clone_of)
-	    gcc_assert (in_lto_p || DECL_RESULT (node->decl));
+	    gcc_assert (GCC_OPTION (in_lto_p) || DECL_RESULT (node->decl));
 	  if (node->definition)
 	    {
 	      if (file)
@@ -498,7 +498,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
 	}
       else
 	gcc_assert (node->clone_of || !cgraph_function_with_gimple_body_p (node)
-		    || in_lto_p || DECL_RESULT (node->decl));
+		    || GCC_OPTION (in_lto_p) || DECL_RESULT (node->decl));
     }
 
   /* Inline clones might be kept around so their materializing allows further
@@ -526,7 +526,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
 	  /* For can_refer_decl_in_current_unit_p we want to track for
 	     all external variables if they are defined in other partition
 	     or not.  */
-	  && (!flag_ltrans || !DECL_EXTERNAL (vnode->decl)))
+	  && (!GCC_OPTION (flag_ltrans) || !DECL_EXTERNAL (vnode->decl)))
 	{
 	  if (file)
 	    fprintf (file, " %s", vnode->name ());
@@ -590,7 +590,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
 #endif
 
   /* If we removed something, perhaps profile could be improved.  */
-  if (changed && optimize && inline_edge_summary_vec.exists ())
+  if (changed && GCC_OPTION (optimize) && inline_edge_summary_vec.exists ())
     FOR_EACH_DEFINED_FUNCTION (node)
       ipa_propagate_frequency (node);
 
@@ -702,7 +702,7 @@ comdat_can_be_unshared_p_1 (symtab_node *node)
   if (node->forced_by_abi
       && TREE_PUBLIC (node->decl)
       && (node->resolution != LDPR_PREVAILING_DEF_IRONLY
-          && !flag_whole_program))
+          && !GCC_OPTION (flag_whole_program)))
     return false;
 
   /* Non-readonly and volatile variables can not be duplicated.  */
@@ -780,13 +780,13 @@ cgraph_externally_visible_p (struct cgraph_node *node,
      This improves code quality and we know we will duplicate them at most twice
      (in the case that we are not using plugin and link with object file
       implementing same COMDAT)  */
-  if ((in_lto_p || whole_program)
+  if ((GCC_OPTION (in_lto_p) || whole_program)
       && DECL_COMDAT (node->decl)
       && comdat_can_be_unshared_p (node))
     return false;
 
   /* When doing link time optimizations, hidden symbols become local.  */
-  if (in_lto_p
+  if (GCC_OPTION (in_lto_p)
       && (DECL_VISIBILITY (node->decl) == VISIBILITY_HIDDEN
 	  || DECL_VISIBILITY (node->decl) == VISIBILITY_INTERNAL)
       /* Be sure that node is defined in IR file, not in other object
@@ -845,20 +845,20 @@ varpool_externally_visible_p (varpool_node *vnode)
      so this does not enable more optimization, but referring static var
      is faster for dynamic linking.  Also this match logic hidding vtables
      from LTO symbol tables.  */
-  if ((in_lto_p || flag_whole_program)
+  if ((GCC_OPTION (in_lto_p) || GCC_OPTION (flag_whole_program))
       && DECL_COMDAT (vnode->decl)
       && comdat_can_be_unshared_p (vnode))
     return false;
 
   /* When doing link time optimizations, hidden symbols become local.  */
-  if (in_lto_p
+  if (GCC_OPTION (in_lto_p)
       && (DECL_VISIBILITY (vnode->decl) == VISIBILITY_HIDDEN
 	  || DECL_VISIBILITY (vnode->decl) == VISIBILITY_INTERNAL)
       /* Be sure that node is defined in IR file, not in other object
 	 file.  In that case we don't set used_from_other_object_file.  */
       && vnode->definition)
     ;
-  else if (!flag_whole_program)
+  else if (!GCC_OPTION (flag_whole_program))
     return true;
 
   /* Do not attempt to privatize COMDATS by default.
@@ -909,7 +909,7 @@ function_and_variable_visibility (bool whole_program)
       int flags = flags_from_decl_or_type (node->decl);
 
       /* Optimize away PURE and CONST constructors and destructors.  */
-      if (optimize
+      if (GCC_OPTION (optimize)
 	  && (flags & (ECF_CONST | ECF_PURE))
 	  && !(flags & ECF_LOOPING_CONST_OR_PURE))
 	{
@@ -968,7 +968,7 @@ function_and_variable_visibility (bool whole_program)
 	  && node->definition && !node->weakref
 	  && !DECL_EXTERNAL (node->decl))
 	{
-	  gcc_assert (whole_program || in_lto_p
+	  gcc_assert (whole_program || GCC_OPTION (in_lto_p)
 		      || !TREE_PUBLIC (node->decl));
 	  node->unique_name = ((node->resolution == LDPR_PREVAILING_DEF_IRONLY
 				|| node->unique_name
@@ -1130,7 +1130,7 @@ function_and_variable_visibility (bool whole_program)
       if (!vnode->externally_visible
 	  && !vnode->weakref)
 	{
-	  gcc_assert (in_lto_p || whole_program || !TREE_PUBLIC (vnode->decl));
+	  gcc_assert (GCC_OPTION (in_lto_p) || whole_program || !TREE_PUBLIC (vnode->decl));
 	  vnode->unique_name = ((vnode->resolution == LDPR_PREVAILING_DEF_IRONLY
 				       || vnode->resolution == LDPR_PREVAILING_DEF_IRONLY_EXP)
 				       && TREE_PUBLIC (vnode->decl));
@@ -1169,7 +1169,7 @@ function_and_variable_visibility (bool whole_program)
 static unsigned int
 local_function_and_variable_visibility (void)
 {
-  return function_and_variable_visibility (flag_whole_program && !flag_lto);
+  return function_and_variable_visibility (GCC_OPTION (flag_whole_program) && !GCC_OPTION (flag_lto));
 }
 
 namespace {
@@ -1263,7 +1263,7 @@ make_pass_ipa_free_inline_summary (gcc::context *ctxt)
 static bool
 gate_whole_program_function_and_variable_visibility (void)
 {
-  return !flag_ltrans;
+  return !GCC_OPTION (flag_ltrans);
 }
 
 /* Bring functionss local at LTO time with -fwhole-program.  */
@@ -1271,8 +1271,8 @@ gate_whole_program_function_and_variable_visibility (void)
 static unsigned int
 whole_program_function_and_variable_visibility (void)
 {
-  function_and_variable_visibility (flag_whole_program);
-  if (optimize)
+  function_and_variable_visibility (GCC_OPTION (flag_whole_program));
+  if (GCC_OPTION (optimize))
     ipa_discover_readonly_nonaddressable_vars ();
   return 0;
 }
@@ -1567,14 +1567,14 @@ build_cdtor_fns (void)
 {
   if (!static_ctors.is_empty ())
     {
-      gcc_assert (!targetm.have_ctors_dtors || in_lto_p);
+      gcc_assert (!targetm.have_ctors_dtors || GCC_OPTION (in_lto_p));
       static_ctors.qsort (compare_ctor);
       build_cdtor (/*ctor_p=*/true, static_ctors);
     }
 
   if (!static_dtors.is_empty ())
     {
-      gcc_assert (!targetm.have_ctors_dtors || in_lto_p);
+      gcc_assert (!targetm.have_ctors_dtors || GCC_OPTION (in_lto_p));
       static_dtors.qsort (compare_dtor);
       build_cdtor (/*ctor_p=*/false, static_dtors);
     }
@@ -1607,7 +1607,7 @@ ipa_cdtor_merge (void)
 static bool
 gate_ipa_cdtor_merge (void)
 {
-  return !targetm.have_ctors_dtors || (optimize && in_lto_p);
+  return !targetm.have_ctors_dtors || (GCC_OPTION (optimize) && GCC_OPTION (in_lto_p));
 }
 
 namespace {
diff --git a/gcc/ira-build.c b/gcc/ira-build.c
index 0396f37..980d049 100644
--- a/gcc/ira-build.c
+++ b/gcc/ira-build.c
@@ -2024,8 +2024,8 @@ propagate_allocno_info (void)
   ira_loop_tree_node_t parent;
   enum reg_class aclass;
 
-  if (flag_ira_region != IRA_REGION_ALL
-      && flag_ira_region != IRA_REGION_MIXED)
+  if (GCC_OPTION (flag_ira_region) != IRA_REGION_ALL
+      && GCC_OPTION (flag_ira_region) != IRA_REGION_MIXED)
     return;
   for (i = max_reg_num () - 1; i >= FIRST_PSEUDO_REGISTER; i--)
     for (a = ira_regno_allocno_map[i];
@@ -2074,7 +2074,7 @@ create_allocnos (void)
      next_regno_allocno.  */
   ira_traverse_loop_tree (true, ira_loop_tree_root,
 			  create_loop_tree_node_allocnos, NULL);
-  if (optimize)
+  if (GCC_OPTION (optimize))
     ira_traverse_loop_tree (false, ira_loop_tree_root, NULL,
 			    propagate_modified_regnos);
 }
diff --git a/gcc/ira-color.c b/gcc/ira-color.c
index c20aaf7..6f05bf4 100644
--- a/gcc/ira-color.c
+++ b/gcc/ira-color.c
@@ -2975,7 +2975,7 @@ color_allocnos (void)
 	    ira_remove_pref (pref);
 	}
     }
-  if (flag_ira_algorithm == IRA_ALGORITHM_PRIORITY)
+  if (GCC_OPTION (flag_ira_algorithm) == IRA_ALGORITHM_PRIORITY)
     {
       n = 0;
       EXECUTE_IF_SET_IN_BITMAP (coloring_allocno_bitmap, 0, i, bi)
@@ -3176,8 +3176,8 @@ color_pass (ira_loop_tree_node_t loop_tree_node)
   /* Color all mentioned allocnos including transparent ones.  */
   color_allocnos ();
   /* Process caps.  They are processed just once.  */
-  if (flag_ira_region == IRA_REGION_MIXED
-      || flag_ira_region == IRA_REGION_ALL)
+  if (GCC_OPTION (flag_ira_region) == IRA_REGION_MIXED
+      || GCC_OPTION (flag_ira_region) == IRA_REGION_ALL)
     EXECUTE_IF_SET_IN_BITMAP (loop_tree_node->all_allocnos, 0, j, bi)
       {
 	a = ira_allocnos[j];
@@ -3187,7 +3187,7 @@ color_pass (ira_loop_tree_node_t loop_tree_node)
 	bitmap_clear_bit (consideration_allocno_bitmap, j);
 	rclass = ALLOCNO_CLASS (a);
 	pclass = ira_pressure_class_translate[rclass];
-	if (flag_ira_region == IRA_REGION_MIXED
+	if (GCC_OPTION (flag_ira_region) == IRA_REGION_MIXED
 	    && (loop_tree_node->reg_pressure[pclass]
 		<= ira_class_hard_regs_num[pclass]))
 	  {
@@ -3240,7 +3240,7 @@ color_pass (ira_loop_tree_node_t loop_tree_node)
 	  ira_assert (ALLOCNO_CLASS (subloop_allocno) == rclass);
 	  ira_assert (bitmap_bit_p (subloop_node->all_allocnos,
 				    ALLOCNO_NUM (subloop_allocno)));
-	  if ((flag_ira_region == IRA_REGION_MIXED)
+	  if ((GCC_OPTION (flag_ira_region) == IRA_REGION_MIXED)
 	      && (loop_tree_node->reg_pressure[pclass]
 		  <= ira_class_hard_regs_num[pclass]))
 	    {
@@ -4107,7 +4107,7 @@ ira_sort_regnos_for_alter_reg (int *pseudo_regnos, int n,
      sets.  */
   num = collect_spilled_coalesced_allocnos (pseudo_regnos, n,
 					    spilled_coalesced_allocnos);
-  if (flag_ira_share_spill_slots
+  if (GCC_OPTION (flag_ira_share_spill_slots)
       && coalesce_spill_slots (spilled_coalesced_allocnos, num))
     {
       setup_coalesced_allocno_costs_and_nums (pseudo_regnos, n);
@@ -4247,7 +4247,7 @@ allocno_reload_assign (ira_allocno_t a, HARD_REG_SET forbidden_regs)
       ira_object_t obj = ALLOCNO_OBJECT (a, i);
       COPY_HARD_REG_SET (saved[i], OBJECT_TOTAL_CONFLICT_HARD_REGS (obj));
       IOR_HARD_REG_SET (OBJECT_TOTAL_CONFLICT_HARD_REGS (obj), forbidden_regs);
-      if (! flag_caller_saves && ALLOCNO_CALLS_CROSSED_NUM (a) != 0)
+      if (! GCC_OPTION (flag_caller_saves) && ALLOCNO_CALLS_CROSSED_NUM (a) != 0)
 	IOR_HARD_REG_SET (OBJECT_TOTAL_CONFLICT_HARD_REGS (obj),
 			  call_used_reg_set);
     }
@@ -4272,7 +4272,7 @@ allocno_reload_assign (ira_allocno_t a, HARD_REG_SET forbidden_regs)
 	  && ira_hard_reg_set_intersection_p (hard_regno, ALLOCNO_MODE (a),
 					      call_used_reg_set))
 	{
-	  ira_assert (flag_caller_saves);
+	  ira_assert (GCC_OPTION (flag_caller_saves));
 	  caller_save_needed = 1;
 	}
     }
@@ -4420,7 +4420,7 @@ ira_reuse_stack_slot (int regno, unsigned int inherent_size,
   ira_assert (inherent_size == PSEUDO_REGNO_BYTES (regno)
 	      && inherent_size <= total_size
 	      && ALLOCNO_HARD_REGNO (allocno) < 0);
-  if (! flag_ira_share_spill_slots)
+  if (! GCC_OPTION (flag_ira_share_spill_slots))
     return NULL_RTX;
   slot_num = -ALLOCNO_HARD_REGNO (allocno) - 2;
   if (slot_num != -1)
diff --git a/gcc/ira-conflicts.c b/gcc/ira-conflicts.c
index c0b4f04..eac21d2 100644
--- a/gcc/ira-conflicts.c
+++ b/gcc/ira-conflicts.c
@@ -716,8 +716,8 @@ ira_build_conflicts (void)
 	  build_conflicts ();
 	  ira_traverse_loop_tree (true, ira_loop_tree_root, add_copies, NULL);
 	  /* We need finished conflict table for the subsequent call.  */
-	  if (flag_ira_region == IRA_REGION_ALL
-	      || flag_ira_region == IRA_REGION_MIXED)
+	  if (GCC_OPTION (flag_ira_region) == IRA_REGION_ALL
+	      || GCC_OPTION (flag_ira_region) == IRA_REGION_MIXED)
 	    propagate_copies ();
 
 	  /* Now we can free memory for the conflict table (see function
@@ -748,12 +748,12 @@ ira_build_conflicts (void)
 	  ira_object_t obj = ALLOCNO_OBJECT (a, i);
 	  rtx allocno_reg = regno_reg_rtx [ALLOCNO_REGNO (a)];
 
-	  if ((! flag_caller_saves && ALLOCNO_CALLS_CROSSED_NUM (a) != 0)
+	  if ((! GCC_OPTION (flag_caller_saves) && ALLOCNO_CALLS_CROSSED_NUM (a) != 0)
 	      /* For debugging purposes don't put user defined variables in
 		 callee-clobbered registers.  However, do allow parameters
 		 in callee-clobbered registers to improve debugging.  This
 		 is a bit of a fragile hack.  */
-	      || (optimize == 0
+	      || (GCC_OPTION (optimize) == 0
 		  && REG_USERVAR_P (allocno_reg)
 		  && ! reg_is_parm_p (allocno_reg)))
 	    {
@@ -792,7 +792,7 @@ ira_build_conflicts (void)
 	    }
 	}
     }
-  if (optimize && ira_conflicts_p
+  if (GCC_OPTION (optimize) && ira_conflicts_p
       && internal_flag_ira_verbose > 2 && ira_dump_file != NULL)
     print_conflicts (ira_dump_file, false);
 }
diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c
index 648806b..8aed211 100644
--- a/gcc/ira-costs.c
+++ b/gcc/ira-costs.c
@@ -677,7 +677,7 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
 
 		case 'i':
 		  if (CONSTANT_P (op)
-		      && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (op)))
+		      && (! GCC_OPTION (flag_pic) || LEGITIMATE_PIC_OPERAND_P (op)))
 		    win = 1;
 		  break;
 
@@ -706,7 +706,7 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
 		case 'g':
 		  if (MEM_P (op)
 		      || (CONSTANT_P (op)
-			  && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (op))))
+			  && (! GCC_OPTION (flag_pic) || LEGITIMATE_PIC_OPERAND_P (op))))
 		    win = 1;
 		  insn_allows_mem[i] = allows_mem[i] = 1;
 		case 'r':
@@ -1423,14 +1423,14 @@ print_allocno_costs (FILE *f)
 	    {
 	      fprintf (f, " %s:%d", reg_class_names[rclass],
 		       COSTS (costs, i)->cost[k]);
-	      if (flag_ira_region == IRA_REGION_ALL
-		  || flag_ira_region == IRA_REGION_MIXED)
+	      if (GCC_OPTION (flag_ira_region) == IRA_REGION_ALL
+		  || GCC_OPTION (flag_ira_region) == IRA_REGION_MIXED)
 		fprintf (f, ",%d", COSTS (total_allocno_costs, i)->cost[k]);
 	    }
 	}
       fprintf (f, " MEM:%i", COSTS (costs, i)->mem_cost);
-      if (flag_ira_region == IRA_REGION_ALL
-	  || flag_ira_region == IRA_REGION_MIXED)
+      if (GCC_OPTION (flag_ira_region) == IRA_REGION_ALL
+	  || GCC_OPTION (flag_ira_region) == IRA_REGION_MIXED)
 	fprintf (f, ",%d", COSTS (total_allocno_costs, i)->mem_cost);
       fprintf (f, "\n");
     }
@@ -1513,7 +1513,7 @@ find_costs_and_classes (FILE *dump_file)
   for (i = max_reg_num () - 1; i >= FIRST_PSEUDO_REGISTER; i--)
     regno_best_class[i] = NO_REGS;
   if (!resize_reg_info () && allocno_p
-      && pseudo_classes_defined_p && flag_expensive_optimizations)
+      && pseudo_classes_defined_p && GCC_OPTION (flag_expensive_optimizations))
     {
       ira_allocno_t a;
       ira_allocno_iterator ai;
@@ -1549,7 +1549,7 @@ find_costs_and_classes (FILE *dump_file)
      use for each allocno.  However, if -fexpensive-optimizations are
      on, we do so twice, the second time using the tentative best
      classes to guide the selection.  */
-  for (pass = start; pass <= flag_expensive_optimizations; pass++)
+  for (pass = start; pass <= GCC_OPTION (flag_expensive_optimizations); pass++)
     {
       if ((!allocno_p || internal_flag_ira_verbose > 0) && dump_file)
 	fprintf (dump_file,
@@ -1629,8 +1629,8 @@ find_costs_and_classes (FILE *dump_file)
 		  int *a_costs, *p_costs;
 		      
 		  a_num = ALLOCNO_NUM (a);
-		  if ((flag_ira_region == IRA_REGION_ALL
-		       || flag_ira_region == IRA_REGION_MIXED)
+		  if ((GCC_OPTION (flag_ira_region) == IRA_REGION_ALL
+		       || GCC_OPTION (flag_ira_region) == IRA_REGION_MIXED)
 		      && (parent = ALLOCNO_LOOP_TREE_NODE (a)->parent) != NULL
 		      && (parent_a = parent->regno_allocno_map[i]) != NULL
 		      /* There are no caps yet.  */
@@ -1715,7 +1715,7 @@ find_costs_and_classes (FILE *dump_file)
 		}
 	      else if (i_costs[k] == best_cost)
 		best = ira_reg_class_subunion[best][rclass];
-	      if (pass == flag_expensive_optimizations
+	      if (pass == GCC_OPTION (flag_expensive_optimizations)
 		  /* We still prefer registers to memory even at this
 		     stage if their costs are the same.  We will make
 		     a final decision during assigning hard registers
@@ -1740,7 +1740,7 @@ find_costs_and_classes (FILE *dump_file)
 	      ira_assert (regno_aclass[i] != NO_REGS
 			  && ira_reg_allocno_class_p[regno_aclass[i]]);
 	    }
-	  if (pass == flag_expensive_optimizations)
+	  if (pass == GCC_OPTION (flag_expensive_optimizations))
 	    {
 	      if (best_cost > i_mem_cost)
 		best = alt_class = NO_REGS;
@@ -1819,7 +1819,7 @@ find_costs_and_classes (FILE *dump_file)
 			   reg_class_names[aclass]);
 		}
 	      pref[a_num] = best;
-	      if (pass == flag_expensive_optimizations && best != aclass
+	      if (pass == GCC_OPTION (flag_expensive_optimizations) && best != aclass
 		  && ira_class_hard_regs_num[best] > 0
 		  && (ira_reg_class_max_nregs[best][ALLOCNO_MODE (a)]
 		      >= ira_class_hard_regs_num[best]))
@@ -1963,7 +1963,7 @@ setup_allocno_class_and_costs (void)
       ira_set_allocno_class (a, aclass);
       if (aclass == NO_REGS)
 	continue;
-      if (optimize && ALLOCNO_CLASS (a) != pref[i])
+      if (GCC_OPTION (optimize) && ALLOCNO_CLASS (a) != pref[i])
 	{
 	  n = ira_class_hard_regs_num[aclass];
 	  ALLOCNO_HARD_REG_COSTS (a)
@@ -1987,7 +1987,7 @@ setup_allocno_class_and_costs (void)
 	    }
 	}
     }
-  if (optimize)
+  if (GCC_OPTION (optimize))
     ira_traverse_loop_tree (true, ira_loop_tree_root,
 			    process_bb_node_for_hard_reg_moves, NULL);
 }
@@ -2113,7 +2113,7 @@ void
 ira_set_pseudo_classes (bool define_pseudo_classes, FILE *dump_file)
 {
   allocno_p = false;
-  internal_flag_ira_verbose = flag_ira_verbose;
+  internal_flag_ira_verbose = GCC_OPTION (flag_ira_verbose);
   cost_elements_num = max_reg_num ();
   init_costs ();
   initiate_regno_cost_classes ();
diff --git a/gcc/ira-int.h b/gcc/ira-int.h
index e36bb92..7c70b08 100644
--- a/gcc/ira-int.h
+++ b/gcc/ira-int.h
@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3.  If not see
    executed, frequency is always equivalent.  Otherwise rescale the
    edge frequency.  */
 #define REG_FREQ_FROM_EDGE_FREQ(freq)					   \
-  (optimize_size || (flag_branch_probabilities				   \
+  (GCC_OPTION (optimize_size) || (GCC_OPTION (flag_branch_probabilities)				   \
 		     && !ENTRY_BLOCK_PTR_FOR_FN (cfun)->count)		   \
    ? REG_FREQ_MAX : (freq * REG_FREQ_MAX / BB_FREQ_MAX)		   \
    ? (freq * REG_FREQ_MAX / BB_FREQ_MAX) : 1)
diff --git a/gcc/ira.c b/gcc/ira.c
index 7c49b7f..3253d0b 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -1707,7 +1707,7 @@ ira_init (void)
 {
   free_register_move_costs ();
   setup_reg_mode_hard_regset ();
-  setup_alloc_regs (flag_omit_frame_pointer != 0);
+  setup_alloc_regs (GCC_OPTION (flag_omit_frame_pointer) != 0);
   setup_class_subset_and_memory_move_costs ();
   setup_reg_class_nregs ();
   setup_prohibited_class_mode_regs ();
@@ -2131,7 +2131,7 @@ decrease_live_ranges_number (void)
   rtx insn, set, src, dest, dest_death, p, q, note;
   int sregno, dregno;
 
-  if (! flag_expensive_optimizations)
+  if (! GCC_OPTION (flag_expensive_optimizations))
     return;
 
   if (ira_dump_file)
@@ -2396,16 +2396,16 @@ ira_setup_eliminable_regset (void)
      case.  At some point, we should improve this by emitting the
      sp-adjusting insns for this case.  */
   frame_pointer_needed
-    = (! flag_omit_frame_pointer
+    = (! GCC_OPTION (flag_omit_frame_pointer)
        || (cfun->calls_alloca && EXIT_IGNORE_STACK)
        /* We need the frame pointer to catch stack overflow exceptions
 	  if the stack pointer is moving.  */
-       || (flag_stack_check && STACK_CHECK_MOVING_SP)
+       || (GCC_OPTION (flag_stack_check) && STACK_CHECK_MOVING_SP)
        || crtl->accesses_prior_frames
        || (SUPPORTS_STACK_ALIGNMENT && crtl->stack_realign_needed)
        /* We need a frame pointer for all Cilk Plus functions that use
 	  Cilk keywords.  */
-       || (flag_cilkplus && cfun->is_cilk_function)
+       || (GCC_OPTION (flag_cilkplus) && cfun->is_cilk_function)
        || targetm.frame_pointer_required ());
 
     /* The chance that FRAME_POINTER_NEEDED is changed from inspecting
@@ -2523,7 +2523,7 @@ setup_reg_renumber (void)
 	      && ira_hard_reg_set_intersection_p (hard_regno, ALLOCNO_MODE (a),
 						  call_used_reg_set))
 	    {
-	      ira_assert (!optimize || flag_caller_saves
+	      ira_assert (!GCC_OPTION (optimize) || GCC_OPTION (flag_caller_saves)
 			  || (ALLOCNO_CALLS_CROSSED_NUM (a)
 			      == ALLOCNO_CHEAP_CALLS_CROSSED_NUM (a))
 			  || regno >= ira_reg_equiv_len
@@ -3554,7 +3554,7 @@ update_equiv_regs (void)
 		 replacements.  */
 	    }
 
-	  if (!optimize)
+	  if (!GCC_OPTION (optimize))
 	    continue;
 
 	  /* We only handle the case of a pseudo register being set
@@ -3675,7 +3675,7 @@ update_equiv_regs (void)
 	      reg_equiv[regno].loop_depth = loop_depth;
 
 	      /* Don't mess with things live during setjmp.  */
-	      if (REG_LIVE_LENGTH (regno) >= 0 && optimize)
+	      if (REG_LIVE_LENGTH (regno) >= 0 && GCC_OPTION (optimize))
 		{
 		  /* Note that the statement below does not affect the priority
 		     in local-alloc!  */
@@ -3701,7 +3701,7 @@ update_equiv_regs (void)
 	}
     }
 
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     goto out;
 
   /* A second pass, to gather additional equivalences with memory.  This needs
@@ -3807,8 +3807,8 @@ update_equiv_regs (void)
 			 scheduling were done because it will not
 			 improve allocation but worsen insn schedule
 			 with a big probability.  */
-		      || flag_live_range_shrinkage
-		      || (flag_sched_pressure && flag_schedule_insns))
+		      || GCC_OPTION (flag_live_range_shrinkage)
+		      || (GCC_OPTION (flag_sched_pressure) && GCC_OPTION (flag_schedule_insns)))
 		    continue;
 
 		  /* reg_equiv[REGNO].replace gets set only when
@@ -3993,7 +3993,7 @@ setup_reg_equiv (void)
 		x = SET_DEST (set);
 	      }
 	    if (! function_invariant_p (x)
-		|| ! flag_pic
+		|| ! GCC_OPTION (flag_pic)
 		/* A function invariant is often CONSTANT_P but may
 		   include a register.  We promise to only pass
 		   CONSTANT_P objects to LEGITIMATE_PIC_OPERAND_P.  */
@@ -4916,7 +4916,7 @@ split_live_ranges_for_shrink_wrap (void)
   bitmap_head need_new, reachable;
   vec<basic_block> queue;
 
-  if (!flag_shrink_wrap)
+  if (!GCC_OPTION (flag_shrink_wrap))
     return false;
 
   bitmap_initialize (&need_new, 0);
@@ -5182,10 +5182,10 @@ ira (FILE *f)
   bool loops_p;
   int ira_max_point_before_emit;
   int rebuild_p;
-  bool saved_flag_caller_saves = flag_caller_saves;
-  enum ira_region saved_flag_ira_region = flag_ira_region;
+  bool saved_flag_caller_saves = GCC_OPTION (flag_caller_saves);
+  enum ira_region saved_flag_ira_region = GCC_OPTION (flag_ira_region);
 
-  ira_conflicts_p = optimize > 0;
+  ira_conflicts_p = GCC_OPTION (optimize) > 0;
 
   ira_use_lra_p = targetm.lra_p ();
   /* If there are too many pseudos and/or basic blocks (e.g. 10K
@@ -5197,10 +5197,10 @@ ira (FILE *f)
   if (lra_simple_p)
     {
       /* It permits to skip live range splitting in LRA.  */
-      flag_caller_saves = false;
+      GCC_OPTION (flag_caller_saves) = false;
       /* There is no sense to do regional allocation when we use
 	 simplified LRA.  */
-      flag_ira_region = IRA_REGION_ONE;
+      GCC_OPTION (flag_ira_region) = IRA_REGION_ONE;
       ira_conflicts_p = false;
     }
 
@@ -5209,17 +5209,17 @@ ira (FILE *f)
 #endif
   bitmap_obstack_initialize (&ira_bitmap_obstack);
 
-  if (flag_caller_saves)
+  if (GCC_OPTION (flag_caller_saves))
     init_caller_save ();
 
-  if (flag_ira_verbose < 10)
+  if (GCC_OPTION (flag_ira_verbose) < 10)
     {
-      internal_flag_ira_verbose = flag_ira_verbose;
+      internal_flag_ira_verbose = GCC_OPTION (flag_ira_verbose);
       ira_dump_file = f;
     }
   else
     {
-      internal_flag_ira_verbose = flag_ira_verbose - 10;
+      internal_flag_ira_verbose = GCC_OPTION (flag_ira_verbose) - 10;
       ira_dump_file = stderr;
     }
 
@@ -5232,7 +5232,7 @@ ira (FILE *f)
      interpretation of the DF_LR problem.  See PR38711.
      Remove the problem, so that we don't spend time updating it in
      any of the df_analyze() calls during IRA/LRA.  */
-  if (optimize > 1)
+  if (GCC_OPTION (optimize) > 1)
     df_remove_problem (df_live);
   gcc_checking_assert (df_live == NULL);
 
@@ -5260,7 +5260,7 @@ ira (FILE *f)
   /* If we are not optimizing, then this is the only place before
      register allocation where dataflow is done.  And that is needed
      to generate these warnings.  */
-  if (warn_clobbered)
+  if (GCC_OPTION (warn_clobbered))
     generate_setjmp_warnings ();
 
   /* Determine if the current function is a leaf before running IRA
@@ -5268,14 +5268,14 @@ ira (FILE *f)
      epilogue thus changing register elimination offsets.  */
   crtl->is_leaf = leaf_function_p ();
 
-  if (resize_reg_info () && flag_ira_loop_pressure)
+  if (resize_reg_info () && GCC_OPTION (flag_ira_loop_pressure))
     ira_set_pseudo_classes (true, ira_dump_file);
 
   rebuild_p = update_equiv_regs ();
   setup_reg_equiv ();
   setup_reg_equiv_init ();
 
-  if (optimize && rebuild_p)
+  if (GCC_OPTION (optimize) && rebuild_p)
     {
       timevar_push (TV_JUMP);
       rebuild_jump_labels (get_insns ());
@@ -5303,7 +5303,7 @@ ira (FILE *f)
   ira_move_loops_num = ira_additional_jumps_num = 0;
 
   ira_assert (current_loops == NULL);
-  if (flag_ira_region == IRA_REGION_ALL || flag_ira_region == IRA_REGION_MIXED)
+  if (GCC_OPTION (flag_ira_region) == IRA_REGION_ALL || GCC_OPTION (flag_ira_region) == IRA_REGION_MIXED)
     loop_optimizer_init (AVOID_CFG_MODIFICATIONS | LOOPS_HAVE_RECORDED_EXITS);
 
   if (internal_flag_ira_verbose > 0 && ira_dump_file != NULL)
@@ -5312,14 +5312,14 @@ ira (FILE *f)
 
   ira_assert (ira_conflicts_p || !loops_p);
 
-  saved_flag_ira_share_spill_slots = flag_ira_share_spill_slots;
+  saved_flag_ira_share_spill_slots = GCC_OPTION (flag_ira_share_spill_slots);
   if (too_high_register_pressure_p () || cfun->calls_setjmp)
     /* It is just wasting compiler's time to pack spilled pseudos into
        stack slots in this case -- prohibit it.  We also do this if
        there is setjmp call because a variable not modified between
        setjmp and longjmp the compiler is required to preserve its
        value and sharing slots does not guarantee it.  */
-    flag_ira_share_spill_slots = FALSE;
+    GCC_OPTION (flag_ira_share_spill_slots) = FALSE;
 
   ira_color ();
 
@@ -5423,8 +5423,8 @@ ira (FILE *f)
   /* Restore original values.  */
   if (lra_simple_p)
     {
-      flag_caller_saves = saved_flag_caller_saves;
-      flag_ira_region = saved_flag_ira_region;
+      GCC_OPTION (flag_caller_saves) = saved_flag_caller_saves;
+      GCC_OPTION (flag_ira_region) = saved_flag_ira_region;
     }
 }
 
@@ -5434,7 +5434,7 @@ do_reload (void)
   basic_block bb;
   bool need_dce;
 
-  if (flag_ira_verbose < 10)
+  if (GCC_OPTION (flag_ira_verbose) < 10)
     ira_dump_file = dump_file;
 
   timevar_push (TV_RELOAD);
@@ -5484,7 +5484,7 @@ do_reload (void)
       && overall_cost_before != ira_overall_cost)
     fprintf (ira_dump_file, "+++Overall after reload %d\n", ira_overall_cost);
 
-  flag_ira_share_spill_slots = saved_flag_ira_share_spill_slots;
+  GCC_OPTION (flag_ira_share_spill_slots) = saved_flag_ira_share_spill_slots;
 
   if (! ira_use_lra_p)
     {
@@ -5502,7 +5502,7 @@ do_reload (void)
       regstat_free_n_sets_and_refs ();
     }
 
-  if (optimize)
+  if (GCC_OPTION (optimize))
     cleanup_cfg (CLEANUP_EXPENSIVE);
 
   finish_reg_equiv ();
@@ -5520,16 +5520,16 @@ do_reload (void)
   df_scan_alloc (NULL);
   df_scan_blocks ();
 
-  if (optimize > 1)
+  if (GCC_OPTION (optimize) > 1)
     {
       df_live_add_problem ();
       df_live_set_all_dirty ();
     }
 
-  if (optimize)
+  if (GCC_OPTION (optimize))
     df_analyze ();
 
-  if (need_dce && optimize)
+  if (need_dce && GCC_OPTION (optimize))
     run_fast_dce ();
 
   /* Diagnose uses of the hard frame pointer when it is used as a global
diff --git a/gcc/java/boehm.c b/gcc/java/boehm.c
index ddc424b..52238cf 100644
--- a/gcc/java/boehm.c
+++ b/gcc/java/boehm.c
@@ -142,7 +142,7 @@ get_boehm_type_descriptor (tree type)
   mask = double_int_zero;
 
   /* If the GC wasn't requested, just use a null pointer.  */
-  if (! flag_use_boehm_gc)
+  if (! GCC_OPTION (flag_use_boehm_gc))
     return null_pointer_node;
 
   value_type = java_type_for_mode (ptr_mode, 1);
@@ -178,7 +178,7 @@ get_boehm_type_descriptor (tree type)
   /* If the object is all pointers, or if the part with pointers fits
      in our bitmap, then we are ok.  Otherwise we have to allocate it
      a different way.  */
-  if (all_bits_set != -1 || (pointer_after_end && flag_reduced_reflection))
+  if (all_bits_set != -1 || (pointer_after_end && GCC_OPTION (flag_reduced_reflection)))
     {
       /* In this case the initial part of the object is all reference
 	 fields, and the end of the object is all non-reference
@@ -227,11 +227,11 @@ uses_jv_markobj_p (tree dtable)
 {
   tree v;
   /* FIXME: what do we return if !flag_use_boehm_gc ? */
-  gcc_assert (flag_use_boehm_gc);
+  gcc_assert (GCC_OPTION (flag_use_boehm_gc));
   /* FIXME: this is wrong if TARGET_VTABLE_USES_DESCRIPTORS.  However,
      this function is only used with flag_reduced_reflection.  No
      point in asserting unless we hit the bad case.  */
-  gcc_assert (!flag_reduced_reflection || TARGET_VTABLE_USES_DESCRIPTORS == 0);
+  gcc_assert (!GCC_OPTION (flag_reduced_reflection) || TARGET_VTABLE_USES_DESCRIPTORS == 0);
   v = (*CONSTRUCTOR_ELTS (dtable))[3].value;
   return (PROCEDURE_OBJECT_DESCRIPTOR == TREE_INT_CST_LOW (v));
 }
diff --git a/gcc/java/builtins.c b/gcc/java/builtins.c
index 1ce9ce5..ee2c274 100644
--- a/gcc/java/builtins.c
+++ b/gcc/java/builtins.c
@@ -309,7 +309,7 @@ putObject_builtin (tree method_return_type ATTRIBUTE_UNUSED,
   addr = build_addr_sum (value_type, obj_arg, offset_arg);
   stmt = fold_build2 (MODIFY_EXPR, value_type,
 		      build_java_indirect_ref (value_type, addr,
-					       flag_check_references),
+					       GCC_OPTION (flag_check_references)),
 		      value_arg);
 
   return build_check_this (stmt, this_arg);
@@ -320,7 +320,7 @@ compareAndSwapInt_builtin (tree method_return_type ATTRIBUTE_UNUSED,
 			   tree orig_call)
 {
   enum machine_mode mode = TYPE_MODE (int_type_node);
-  if (can_compare_and_swap_p (mode, flag_use_atomic_builtins))
+  if (can_compare_and_swap_p (mode, GCC_OPTION (flag_use_atomic_builtins)))
     {
       tree addr, stmt;
       enum built_in_function fncode = BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_4;
@@ -345,7 +345,7 @@ compareAndSwapLong_builtin (tree method_return_type ATTRIBUTE_UNUSED,
      Some machines such as ARM have atomic libfuncs but not the multi-word
      versions.  */
   if (can_compare_and_swap_p (mode,
-			      (flag_use_atomic_builtins
+			      (GCC_OPTION (flag_use_atomic_builtins)
 			       && GET_MODE_SIZE (mode) <= UNITS_PER_WORD)))
     {
       tree addr, stmt;
@@ -366,7 +366,7 @@ compareAndSwapObject_builtin (tree method_return_type ATTRIBUTE_UNUSED,
 			      tree orig_call)
 {
   enum machine_mode mode = TYPE_MODE (ptr_type_node);
-  if (can_compare_and_swap_p (mode, flag_use_atomic_builtins))
+  if (can_compare_and_swap_p (mode, GCC_OPTION (flag_use_atomic_builtins)))
   {
     tree addr, stmt;
     enum built_in_function builtin;
@@ -400,7 +400,7 @@ putVolatile_builtin (tree method_return_type ATTRIBUTE_UNUSED,
   stmt = build_call_expr (builtin_decl_explicit (BUILT_IN_SYNC_SYNCHRONIZE), 0);
   modify_stmt = fold_build2 (MODIFY_EXPR, value_type,
 			     build_java_indirect_ref (value_type, addr,
-						      flag_check_references),
+						      GCC_OPTION (flag_check_references)),
 			     value_arg);
   stmt = build2 (COMPOUND_EXPR, TREE_TYPE (modify_stmt), 
 		 stmt, modify_stmt);
@@ -430,7 +430,7 @@ getVolatile_builtin (tree method_return_type ATTRIBUTE_UNUSED,
   modify_stmt = fold_build2 (MODIFY_EXPR, method_return_type,
 			     tmp,
 			     build_java_indirect_ref (method_return_type, addr,
-						      flag_check_references));
+						      GCC_OPTION (flag_check_references)));
 
   stmt = build2 (COMPOUND_EXPR, void_type_node, modify_stmt, stmt);
   stmt = build2 (COMPOUND_EXPR, method_return_type, stmt, tmp);
@@ -592,7 +592,7 @@ initialize_builtins (void)
 tree
 check_for_builtin (tree method, tree call)
 {
-  if (optimize && TREE_CODE (call) == CALL_EXPR)
+  if (GCC_OPTION (optimize) && TREE_CODE (call) == CALL_EXPR)
     {
       int i;
       tree method_class = DECL_NAME (TYPE_NAME (DECL_CONTEXT (method)));
@@ -615,7 +615,7 @@ check_for_builtin (tree method, tree call)
 
 	      /* Builtin functions emit a direct call which is incompatible
 	         with the BC-ABI.  */
-	      if (flag_indirect_dispatch)
+	      if (GCC_OPTION (flag_indirect_dispatch))
 	        return call;
 	      fn = builtin_decl_explicit (java_builtins[i].builtin_code);
 	      if (fn == NULL_TREE)
diff --git a/gcc/java/class.c b/gcc/java/class.c
index bbe7c86..d2946b8 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -208,7 +208,7 @@ add_assume_compiled (const char *ident, int excludep)
 
 /* The default value returned by enable_assertions. */
 
-#define DEFAULT_ENABLE_ASSERT (optimize == 0)
+#define DEFAULT_ENABLE_ASSERT (GCC_OPTION (optimize) == 0)
 
 /* Enter IDENT (a class or package name) into the enable-assertions table.
    VALUE is true to enable and false to disable. */
@@ -470,7 +470,7 @@ gen_indirect_dispatch_tables (tree type)
     pushdecl (TYPE_CTABLE_DECL (type));  
   }
 
-  if (flag_indirect_dispatch)
+  if (GCC_OPTION (flag_indirect_dispatch))
     {
       GEN_TABLE (ATABLE, _atable, atable_type, type);
       GEN_TABLE (OTABLE, _otable, otable_type, type);
@@ -872,7 +872,7 @@ add_field (tree klass, tree name, tree field_type, int flags)
 	 that native methods can always access the field.  */
       TREE_PUBLIC (field) = 1;
       /* Hide everything that shouldn't be visible outside a DSO.  */
-      if (flag_indirect_classes
+      if (GCC_OPTION (flag_indirect_classes)
 	  || (FIELD_PRIVATE (field)))
 	java_hide_decl (field);
       /* Considered external unless we are compiling it into this
@@ -985,7 +985,7 @@ build_utf8_ref (tree name)
       int decl_size;
       /* Ensure decl_size is a multiple of utf8const_type's alignment. */
       decl_size = name_len + 4 + name_pad;
-      if (flag_merge_constants && decl_size < 256)
+      if (GCC_OPTION (flag_merge_constants) && decl_size < 256)
 	{
 	  char buf[32];
 	  int flags = (SECTION_OVERRIDE
@@ -1033,7 +1033,7 @@ build_static_class_ref (tree type)
     {
       decl = build_decl (input_location, VAR_DECL, decl_name, class_type_node);
       TREE_STATIC (decl) = 1;
-      if (! flag_indirect_classes)
+      if (! GCC_OPTION (flag_indirect_classes))
 	{
 	  TREE_PUBLIC (decl) = 1;
 	  if (CLASS_PRIVATE (TYPE_NAME (type)))
@@ -1094,10 +1094,10 @@ build_classdollar_field (tree type)
 void
 cache_this_class_ref (tree fndecl)
 {
-  if (optimize)
+  if (GCC_OPTION (optimize))
     {
       tree classdollar_field;
-      if (flag_indirect_classes)
+      if (GCC_OPTION (flag_indirect_classes))
 	classdollar_field = build_classdollar_field (output_class);
       else
 	classdollar_field = build_static_class_ref (output_class);
@@ -1149,12 +1149,12 @@ build_class_ref (tree type)
       if (TREE_CODE (type) == POINTER_TYPE)
 	type = TREE_TYPE (type);
 
-      if (flag_indirect_dispatch
+      if (GCC_OPTION (flag_indirect_dispatch)
 	  && type != output_class
 	  && TREE_CODE (type) == RECORD_TYPE)
 	return build_indirect_class_ref (type);
 
-      if (type == output_class && flag_indirect_classes)
+      if (type == output_class && GCC_OPTION (flag_indirect_classes))
 	{
 	  /* This can be NULL if we see a JNI stub before we see any
 	     other method.  */
@@ -1234,7 +1234,7 @@ build_static_field_ref (tree fdecl)
      -findirect-dispatch, we simply never do this folding if compiling
      from .class; in the .class file constants will be referred to via
      the constant pool.  */
-  if (!flag_indirect_dispatch
+  if (!GCC_OPTION (flag_indirect_dispatch)
       && (is_compiled
 	  || (FIELD_FINAL (fdecl) && DECL_INITIAL (fdecl) != NULL_TREE
 	      && (JSTRING_TYPE_P (TREE_TYPE (fdecl))
@@ -1406,7 +1406,7 @@ make_local_function_alias (tree method)
   DECL_INITIAL (alias) = error_mark_node;
   TREE_ADDRESSABLE (alias) = 1;
   TREE_USED (alias) = 1;
-  if (!flag_syntax_only)
+  if (!GCC_OPTION (flag_syntax_only))
     assemble_alias (alias, DECL_ASSEMBLER_NAME (method));
   return alias;
 #else
@@ -1422,7 +1422,7 @@ make_field_value (tree fdecl)
   tree finit;
   int flags;
   tree type = TREE_TYPE (fdecl);
-  int resolved = is_compiled_class (type) && ! flag_indirect_dispatch;
+  int resolved = is_compiled_class (type) && ! GCC_OPTION (flag_indirect_dispatch);
   vec<constructor_elt, va_gc> *v = NULL;
 
   START_RECORD_CONSTRUCTOR (v, field_type_node);
@@ -1449,7 +1449,7 @@ make_field_value (tree fdecl)
   {
     tree field_address = integer_zero_node;
     tree index, value;
-    if ((DECL_INITIAL (fdecl) || ! flag_indirect_classes) 
+    if ((DECL_INITIAL (fdecl) || ! GCC_OPTION (flag_indirect_classes)) 
 	&& FIELD_STATIC (fdecl))
       field_address = build_address_of (fdecl);
 
@@ -1488,7 +1488,7 @@ make_method_value (tree mdecl)
   if (CLASS_INTERFACE (TYPE_NAME (class_decl)))
     index = build_int_cst (NULL_TREE,
 			   get_interface_method_index (mdecl, class_decl));
-  else if (!flag_indirect_dispatch && get_method_index (mdecl) != NULL_TREE)
+  else if (!GCC_OPTION (flag_indirect_dispatch) && get_method_index (mdecl) != NULL_TREE)
     index = get_method_index (mdecl);
   else
     index = integer_minus_one_node;
@@ -1798,7 +1798,7 @@ make_class_data (tree type)
   decl = TREE_OPERAND (this_class_addr, 0);
 
   if (supers_all_compiled (type) && ! CLASS_INTERFACE (type_decl)
-      && !flag_indirect_dispatch)
+      && !GCC_OPTION (flag_indirect_dispatch))
     {
       tree dtable = get_dispatch_table (type, this_class_addr);
       uses_jv_markobj = uses_jv_markobj_p (dtable);
@@ -1823,7 +1823,7 @@ make_class_data (tree type)
 	 table for java.lang.Class.  */
       if (DECL_NAME (type_decl) != id_class)
 	java_hide_decl (dtable_decl);
-      if (! flag_indirect_classes)
+      if (! GCC_OPTION (flag_indirect_classes))
 	rest_of_decl_compilation (dtable_decl, 1, 0);
       /* Maybe we're compiling Class as the first class.  If so, set
 	 class_dtable_decl to the decl we just made.  */
@@ -1846,7 +1846,7 @@ make_class_data (tree type)
 	{
 	  if (FIELD_STATIC (field))
 	    static_field_count++;
-	  else if (uses_jv_markobj || !flag_reduced_reflection)
+	  else if (uses_jv_markobj || !GCC_OPTION (flag_reduced_reflection))
 	    instance_field_count++;
 	}
     }
@@ -1876,7 +1876,7 @@ make_class_data (tree type)
 	  field_index = 0;
 	  if (FIELD_STATIC (field))
 	    field_index = static_count++;
-	  else if (uses_jv_markobj || !flag_reduced_reflection)
+	  else if (uses_jv_markobj || !GCC_OPTION (flag_reduced_reflection))
 	    field_index = instance_count++;
 	  else
 	    continue;
@@ -1905,7 +1905,7 @@ make_class_data (tree type)
 	      rest_of_decl_compilation (field, 1, 1);
 	      DECL_INITIAL (field) = initial;
 	    }
-	  else if (uses_jv_markobj || !flag_reduced_reflection)
+	  else if (uses_jv_markobj || !GCC_OPTION (flag_reduced_reflection))
 	    {
               tree init = make_field_value (field);
               CONSTRUCTOR_APPEND_ELT (instance_fields, NULL_TREE, init);
@@ -1939,8 +1939,8 @@ make_class_data (tree type)
     {
       tree init;
       if (METHOD_PRIVATE (method)
-	  && ! flag_keep_inline_functions
-	  && optimize)
+	  && ! GCC_OPTION (flag_keep_inline_functions)
+	  && GCC_OPTION (optimize))
 	continue;
       /* Even if we have a decl, we don't necessarily have the code.
 	 This can happen if we inherit a method from a superclass for
@@ -1965,7 +1965,7 @@ make_class_data (tree type)
           - public not static -- It is potentially part of an
             interface.  The runtime uses reflection data to build
             interface dispatch tables.  */
-      if (!flag_reduced_reflection
+      if (!GCC_OPTION (flag_reduced_reflection)
           || DECL_CLINIT_P (method)
           || DECL_NAME (type_decl) == id_class
           || DECL_NAME (method) == id_main
@@ -2002,7 +2002,7 @@ make_class_data (tree type)
   super = CLASSTYPE_SUPER (type);
   if (super == NULL_TREE)
     super = null_pointer_node;
-  else if (! flag_indirect_dispatch
+  else if (! GCC_OPTION (flag_indirect_dispatch)
 	   && assume_compiled (IDENTIFIER_POINTER (DECL_NAME (type_decl)))
 	   && assume_compiled (IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (super)))))
     super = build_class_ref (super);
@@ -2033,7 +2033,7 @@ make_class_data (tree type)
 	  tree child = BINFO_BASE_BINFO (TYPE_BINFO (type), i);
 	  tree iclass = BINFO_TYPE (child);
 	  tree index;
-	  if (! flag_indirect_dispatch
+	  if (! GCC_OPTION (flag_indirect_dispatch)
 	      && (assume_compiled 
 		  (IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (iclass))))))
 	    index = build_class_ref (iclass);
@@ -2054,7 +2054,7 @@ make_class_data (tree type)
 
   constant_pool_constructor = build_constants_constructor ();
 
-  if (flag_indirect_dispatch)
+  if (GCC_OPTION (flag_indirect_dispatch))
     {
       TYPE_OTABLE_DECL (type) 
 	= emit_symbol_table 
@@ -2079,13 +2079,13 @@ make_class_data (tree type)
 
   START_RECORD_CONSTRUCTOR (v1, object_type_node);
   PUSH_FIELD_VALUE (v1, "vtable",
-		    (flag_indirect_classes 
+		    (GCC_OPTION (flag_indirect_classes) 
 		     ? null_pointer_node
 		     : fold_build_pointer_plus
 			 (build1 (ADDR_EXPR, dtable_ptr_type,
 				  class_dtable_decl),
 			  dtable_start_offset)));
-  if (! flag_hash_synchronization)
+  if (! GCC_OPTION (flag_hash_synchronization))
     PUSH_FIELD_VALUE (v1, "sync_info", null_pointer_node);
   FINISH_RECORD_CONSTRUCTOR (temp, v1, object_type_node);
   START_RECORD_CONSTRUCTOR (v2, class_type_node);
@@ -2106,7 +2106,7 @@ make_class_data (tree type)
 		    build_int_cst (NULL_TREE, method_count));
 
   PUSH_FIELD_VALUE (v2, "vtable_method_count",
-                    (flag_indirect_dispatch
+                    (GCC_OPTION (flag_indirect_dispatch)
                      ? integer_minus_one_node
                      : TYPE_NVIRTUALS (type)));
     
@@ -2116,7 +2116,7 @@ make_class_data (tree type)
   /* If we're using the binary compatibility ABI we don't know the
      size until load time.  */
   PUSH_FIELD_VALUE (v2, "size_in_bytes", 
-		    (flag_indirect_dispatch 
+		    (GCC_OPTION (flag_indirect_dispatch) 
 		     ? integer_minus_one_node 
 		     : size_in_bytes (type)));
   PUSH_FIELD_VALUE (v2, "field_count", 
@@ -2125,7 +2125,7 @@ make_class_data (tree type)
 		    build_int_cst (NULL_TREE, static_field_count));
 
   PUSH_FIELD_VALUE (v2, "vtable",
-                    (flag_indirect_dispatch || dtable_decl == NULL_TREE
+                    (GCC_OPTION (flag_indirect_dispatch) || dtable_decl == NULL_TREE
                      ? null_pointer_node
                      : fold_build_pointer_plus
 			 (build1 (ADDR_EXPR, dtable_ptr_type,
@@ -2225,10 +2225,10 @@ make_class_data (tree type)
   DECL_INITIAL (decl) = cons;
   
   /* Hash synchronization requires at least 64-bit alignment. */
-  if (flag_hash_synchronization && POINTER_SIZE < 64)
+  if (GCC_OPTION (flag_hash_synchronization) && POINTER_SIZE < 64)
     DECL_ALIGN (decl) = 64; 
   
-  if (flag_indirect_classes)
+  if (GCC_OPTION (flag_indirect_classes))
     {
       TREE_READONLY (decl) = 1;
       TREE_CONSTANT (DECL_INITIAL (decl)) = 1;
@@ -2238,7 +2238,7 @@ make_class_data (tree type)
   
   {
     tree classdollar_field = build_classdollar_field (type);
-    if (!flag_indirect_classes)
+    if (!GCC_OPTION (flag_indirect_classes))
       DECL_INITIAL (classdollar_field) = build_static_class_ref (type);
     rest_of_decl_compilation (classdollar_field, 1, 0);
   }
@@ -2592,7 +2592,7 @@ layout_class_methods (tree this_class)
     dtable_count = integer_zero_node;
 
   type_name = TYPE_NAME (this_class);
-  if (!flag_indirect_dispatch
+  if (!GCC_OPTION (flag_indirect_dispatch)
       && (CLASS_ABSTRACT (type_name) || CLASS_INTERFACE (type_name)))
     {
       /* An abstract class can have methods which are declared only in
@@ -2642,7 +2642,7 @@ layout_class_method (tree this_class, tree super_class,
 
   TREE_PUBLIC (method_decl) = 1;
 
-  if (flag_indirect_classes
+  if (GCC_OPTION (flag_indirect_classes)
       || (METHOD_PRIVATE (method_decl) && METHOD_STATIC (method_decl)
 	  && ! METHOD_NATIVE (method_decl)
 	  && ! special_method_p (method_decl)))
@@ -2693,7 +2693,7 @@ layout_class_method (tree this_class, tree super_class,
 	  tree method_index = get_method_index (super_method);
 	  set_method_index (method_decl, method_index);
 	  if (method_index == NULL_TREE 
-	      && ! flag_indirect_dispatch
+	      && ! GCC_OPTION (flag_indirect_dispatch)
 	      && ! DECL_ARTIFICIAL (super_method))
 	    error ("non-static method %q+D overrides static method",
                    method_decl);
@@ -2728,7 +2728,7 @@ register_class (void)
   if (!registered_class)
     vec_alloc (registered_class, 8);
 
-  if (flag_indirect_classes)
+  if (GCC_OPTION (flag_indirect_classes))
     node = current_class;
   else
     node = TREE_OPERAND (build_class_ref (current_class), 0);
@@ -2872,7 +2872,7 @@ emit_register_classes (tree *list_p)
     return;
 
   /* By default, generate instances of Class at runtime.  */
-  if (flag_indirect_classes)
+  if (GCC_OPTION (flag_indirect_classes))
     emit_indirect_register_classes (list_p);
   /* TARGET_USE_JCR_SECTION defaults to 1 if SUPPORTS_WEAK and
      TARGET_ASM_NAMED_SECTION, else 0.  Some targets meet those conditions
diff --git a/gcc/java/constants.c b/gcc/java/constants.c
index 7e9cf2e..cd9580c 100644
--- a/gcc/java/constants.c
+++ b/gcc/java/constants.c
@@ -486,7 +486,7 @@ build_ref_from_constant_pool (int index)
   tree d = TYPE_CPOOL_DATA_REF (output_class);
 
   if (d == NULL_TREE)
-    d = build_constant_data_ref (flag_indirect_classes);
+    d = build_constant_data_ref (GCC_OPTION (flag_indirect_classes));
 
   i = build_int_cst (NULL_TREE, index);
   d = build4 (ARRAY_REF, TREE_TYPE (TREE_TYPE (d)), d, i,
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index 53d6f89..8da917e 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -535,7 +535,7 @@ parse_version (void)
       ++p;
     }
 
-  if (flag_indirect_dispatch)
+  if (GCC_OPTION (flag_indirect_dispatch))
     {
       abi_version = GCJ_CURRENT_BC_ABI_VERSION;
       abi_version |= FLAG_BINARYCOMPAT_ABI;
@@ -547,7 +547,7 @@ parse_version (void)
 	 4.0.1).  */
       abi_version = 100000 * major + 1000 * minor;
     }
-  if (flag_bootstrap_classes)
+  if (GCC_OPTION (flag_bootstrap_classes))
     abi_version |= FLAG_BOOTSTRAP_LOADER;
 
   gcj_abi_version = build_int_cstu (ptr_type_node, abi_version);
@@ -802,7 +802,7 @@ java_init_decl_processing (void)
   /* This isn't exactly true, but it is what we have in the source.
      There is an unresolved issue here, which is whether the vtable
      should be marked by the GC.  */
-  if (! flag_hash_synchronization)
+  if (! GCC_OPTION (flag_hash_synchronization))
     PUSH_FIELD (input_location, object_type_node, field, "sync_info",
 		build_pointer_type (object_type_node));
   for (t = TYPE_FIELDS (object_type_node); t != NULL_TREE; t = DECL_CHAIN (t))
@@ -1626,7 +1626,7 @@ force_poplevels (int start_pc)
 {
   while (current_binding_level->start_pc > start_pc)
     {
-      if (pedantic && current_binding_level->start_pc > start_pc)
+      if (GCC_OPTION (pedantic) && current_binding_level->start_pc > start_pc)
 	warning (0, "In %+D: overlapped variable and exception ranges at %d",
                  current_function_decl,
 		 current_binding_level->start_pc);
@@ -1962,7 +1962,7 @@ java_mark_class_local (tree klass)
   for (t = TYPE_METHODS (klass); t ; t = DECL_CHAIN (t))
     if (!METHOD_ABSTRACT (t))
       {
-	if (METHOD_NATIVE (t) && !flag_jni)
+	if (METHOD_NATIVE (t) && !GCC_OPTION (flag_jni))
 	  java_mark_cni_decl_local (t);
         else
 	  java_mark_decl_local (t);
diff --git a/gcc/java/except.c b/gcc/java/except.c
index 47c76e8..d0f53aa 100644
--- a/gcc/java/except.c
+++ b/gcc/java/except.c
@@ -388,7 +388,7 @@ prepare_eh_table_type (tree type)
   if (*slot != NULL)
     return TREE_VALUE (*slot);
 
-  if (is_compiled_class (type) && !flag_indirect_dispatch)
+  if (is_compiled_class (type) && !GCC_OPTION (flag_indirect_dispatch))
     {
       name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
       buf = (char *) alloca (strlen (name) + 5);
@@ -576,7 +576,7 @@ check_start_handlers (struct eh_range *range, int pc)
 static inline int
 doing_eh (void)
 {
-  if (! flag_exceptions)
+  if (! GCC_OPTION (flag_exceptions))
     {
       static int warned = 0;
       if (! warned)
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 69f6819..3ae664f 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -351,7 +351,7 @@ pop_type_0 (tree type, char **messagep)
       return type;
     }
 
-  if (! flag_verify_invocations && flag_indirect_dispatch
+  if (! flag_verify_invocations && GCC_OPTION (flag_indirect_dispatch)
       && t == object_ptr_type_node)
     {
       if (type != ptr_type_node)
@@ -502,7 +502,7 @@ can_widen_reference_to (tree source_type, tree target_type)
       add_type_assertion (current_class, JV_ASSERT_TYPES_COMPATIBLE, 
 			  source_type, target_type);
 
-      if (!quiet_flag)
+      if (!GCC_OPTION (quiet_flag))
        warning (0, "assert: %s is assign compatible with %s", 
 		xstrdup (lang_printable_name (target_type, 0)),
 		xstrdup (lang_printable_name (source_type, 0)));
@@ -549,7 +549,7 @@ can_widen_reference_to (tree source_type, tree target_type)
 
 	  if (TYPE_DUMMY (source_type) || TYPE_DUMMY (target_type))
 	    {
-	      if (! quiet_flag)
+	      if (! GCC_OPTION (quiet_flag))
 		warning (0, "assert: %s is assign compatible with %s", 
 			 xstrdup (lang_printable_name (target_type, 0)),
 			 xstrdup (lang_printable_name (source_type, 0)));
@@ -830,7 +830,7 @@ build_java_array_length_access (tree node)
 
   node = build3 (COMPONENT_REF, int_type_node,
 		 build_java_indirect_ref (array_type, node,
-					  flag_check_references),
+					  GCC_OPTION (flag_check_references)),
 		 lookup_field (&array_type, get_identifier ("length")),
 		 NULL_TREE);
   IS_ARRAY_LENGTH_ACCESS (node) = 1;
@@ -844,7 +844,7 @@ build_java_array_length_access (tree node)
 tree 
 java_check_reference (tree expr, int check)
 {
-  if (!flag_syntax_only && check)
+  if (!GCC_OPTION (flag_syntax_only) && check)
     {
       expr = save_expr (expr);
       expr = build3 (COND_EXPR, TREE_TYPE (expr),
@@ -891,7 +891,7 @@ build_java_arrayaccess (tree array, tree type, tree index)
       array_type = build_java_array_type (type, -1);
     }
 
-  if (flag_bounds_check)
+  if (GCC_OPTION (flag_bounds_check))
     {
       /* Generate:
        * (unsigned jint) INDEX >= (unsigned jint) LEN
@@ -923,7 +923,7 @@ build_java_arrayaccess (tree array, tree type, tree index)
 
   ref = build3 (COMPONENT_REF, TREE_TYPE (data_field),    
 		build_java_indirect_ref (array_type, array, 
-					 flag_check_references),
+					 GCC_OPTION (flag_check_references)),
 		data_field, NULL_TREE);
 
   /* Take the address of the data field and convert it to a pointer to
@@ -976,7 +976,7 @@ build_java_arraystore_check (tree array, tree object)
   gcc_assert (TREE_CODE (element_type) == TYPE_DECL
 	      && TREE_CODE (object_type) == TYPE_DECL);
 
-  if (!flag_store_check)
+  if (!GCC_OPTION (flag_store_check))
     return build1 (NOP_EXPR, array_type_p, array);
 
   /* No check is needed if the element type is final.  Also check that
@@ -985,7 +985,7 @@ build_java_arraystore_check (tree array, tree object)
      the array rather than its declared type.  However, if we're doing
      indirect dispatch, we can't do the `final' optimization.  */
   if (element_type == object_type
-      && ! flag_indirect_dispatch
+      && ! GCC_OPTION (flag_indirect_dispatch)
       && CLASS_FINAL (element_type))
     return build1 (NOP_EXPR, array_type_p, array);
   
@@ -1372,7 +1372,7 @@ build_get_class (tree value)
 				    get_identifier ("vtable"));
   tree tmp = build3 (COMPONENT_REF, dtable_ptr_type,
 		     build_java_indirect_ref (object_type_node, value,
-					      flag_check_references),
+					      GCC_OPTION (flag_check_references)),
 		     vtable_field, NULL_TREE);
   return build3 (COMPONENT_REF, class_ptr_type,
 		 build1 (INDIRECT_REF, dtable_type, tmp),
@@ -1586,8 +1586,8 @@ build_java_binop (enum tree_code op, tree type, tree arg1, tree arg2)
 	}
       
       if (TREE_CODE (type) == INTEGER_TYPE
-	  && flag_use_divide_subroutine
-	  && ! flag_syntax_only)
+	  && GCC_OPTION (flag_use_divide_subroutine)
+	  && ! GCC_OPTION (flag_syntax_only))
 	return build_java_soft_divmod (op, type, arg1, arg2);
       
       break;
@@ -1711,8 +1711,8 @@ build_field_ref (tree self_value, tree self_class, tree name)
 	 memory may be allocated from any other page, so only field
 	 offsets < pagesize are guaranteed to trap.  We also assume
 	 the smallest page size we'll encounter is 4k bytes.  */
-      if (! flag_syntax_only && check && ! flag_check_references 
-	  && ! flag_indirect_dispatch)
+      if (! GCC_OPTION (flag_syntax_only) && check && ! GCC_OPTION (flag_check_references) 
+	  && ! GCC_OPTION (flag_indirect_dispatch))
 	{
 	  tree field_offset = byte_position (field_decl);
 	  if (! page_size)
@@ -1722,7 +1722,7 @@ build_field_ref (tree self_value, tree self_class, tree name)
 
       if (base_type != TREE_TYPE (self_value))
 	self_value = fold_build1 (NOP_EXPR, base_type, self_value);
-      if (! flag_syntax_only && flag_indirect_dispatch)
+      if (! GCC_OPTION (flag_syntax_only) && GCC_OPTION (flag_indirect_dispatch))
 	{
 	  tree otable_index
 	    = build_int_cst (NULL_TREE, get_symbol_table_index 
@@ -2195,7 +2195,7 @@ build_known_method_ref (tree method, tree method_type ATTRIBUTE_UNUSED,
 	 publicly visible methods or gcc will use PLT indirections
 	 to reach them.  We also have to use indirect dispatch for all
 	 external methods.  */
-      if (! flag_indirect_dispatch 
+      if (! GCC_OPTION (flag_indirect_dispatch) 
 	  || (! DECL_EXTERNAL (method) && ! TREE_PUBLIC (method)))
 	{
 	  func = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (method)),
@@ -2279,7 +2279,7 @@ invoke_build_dtable (int is_invoke_interface, vec<tree, va_gc> *arg_list)
   if (dtable_ident == NULL_TREE)
     dtable_ident = get_identifier ("vtable");
   dtable = build_java_indirect_ref (object_type_node, objectref, 
-				    flag_check_references);
+				    GCC_OPTION (flag_check_references));
   dtable = build3 (COMPONENT_REF, dtable_ptr_type, dtable,
 		   lookup_field (&object_type_node, dtable_ident), NULL_TREE);
 
@@ -2318,7 +2318,7 @@ build_invokevirtual (tree dtable, tree method, tree special)
   tree method_index;
   tree otable_index;
 
-  if (flag_indirect_dispatch)
+  if (GCC_OPTION (flag_indirect_dispatch))
     {
       gcc_assert (! CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (method))));
 
@@ -2370,7 +2370,7 @@ build_invokeinterface (tree dtable, tree method)
     class_ident = get_identifier ("class");
 
   dtable = build_java_indirect_ref (dtable_type, dtable,
-				    flag_check_references);
+				    GCC_OPTION (flag_check_references));
   dtable = build3 (COMPONENT_REF, class_ptr_type, dtable,
 		   lookup_field (&dtable_type, class_ident), NULL_TREE);
 
@@ -2378,7 +2378,7 @@ build_invokeinterface (tree dtable, tree method)
   gcc_assert (CLASS_INTERFACE (TYPE_NAME (interface)));
   layout_class_methods (interface);
   
-  if (flag_indirect_dispatch)
+  if (GCC_OPTION (flag_indirect_dispatch))
     {
       int itable_index 
 	= 2 * (get_symbol_table_index 
@@ -2478,7 +2478,7 @@ expand_invoke (int opcode, int method_ref_index, int nargs ATTRIBUTE_UNUSED)
 
   if (method == NULL_TREE)
     {
-      if (flag_verify_invocations || ! flag_indirect_dispatch)
+      if (flag_verify_invocations || ! GCC_OPTION (flag_indirect_dispatch))
 	{
 	  error ("class '%s' has no method named '%s' matching signature '%s'",
 		 self_name,
@@ -2629,7 +2629,7 @@ build_jni_stub (tree method)
   tree klass = DECL_CONTEXT (method);
   klass = build_class_ref (klass);
 
-  gcc_assert (METHOD_NATIVE (method) && flag_jni);
+  gcc_assert (METHOD_NATIVE (method) && GCC_OPTION (flag_jni));
 
   DECL_ARTIFICIAL (method) = 1;
   DECL_EXTERNAL (method) = 0;
@@ -2904,7 +2904,7 @@ expand_java_field_op (int is_static, int is_putting, int field_ref_index)
 
   field_ref = build_field_ref (field_ref, self_type, field_name);
   if (is_static
-      && ! flag_indirect_dispatch)
+      && ! GCC_OPTION (flag_indirect_dispatch))
     {
       tree context = DECL_CONTEXT (field_ref);
       if (context != self_type && CLASS_INTERFACE (TYPE_NAME (context)))
@@ -3195,7 +3195,7 @@ expand_byte_code (JCF *jcf, tree method)
 	  if (dead_code_index != -1)
 	    {
               /* We've just reached the end of a region of dead code.  */
-	      if (extra_warnings)
+	      if (GCC_OPTION (extra_warnings))
 		warning (0, "unreachable bytecode from %d to before %d",
 			 dead_code_index, PC);
               dead_code_index = -1;
@@ -3237,7 +3237,7 @@ expand_byte_code (JCF *jcf, tree method)
   if (dead_code_index != -1)
     {
       /* We've just reached the end of a region of dead code.  */
-      if (extra_warnings)
+      if (GCC_OPTION (extra_warnings))
 	warning (0, "unreachable bytecode from %d to the end of the method", 
 		 dead_code_index);
     }
@@ -3727,10 +3727,10 @@ promote_arguments (void)
 static void
 cache_cpool_data_ref (void)
 {
-  if (optimize)
+  if (GCC_OPTION (optimize))
     {
       tree cpool;
-      tree d = build_constant_data_ref (flag_indirect_classes);
+      tree d = build_constant_data_ref (GCC_OPTION (flag_indirect_classes));
       tree cpool_ptr = build_decl (input_location, VAR_DECL, NULL_TREE, 
 				   build_pointer_type (TREE_TYPE (d)));
       java_add_local_var (cpool_ptr);
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h
index 806d2d7..6712e48 100644
--- a/gcc/java/java-tree.h
+++ b/gcc/java/java-tree.h
@@ -1483,7 +1483,7 @@ extern tree *type_map;
 
 /* True when we can perform static class initialization optimization */
 #define STATIC_CLASS_INIT_OPT_P() \
-  (flag_optimize_sci && (optimize >= 2))
+  (GCC_OPTION (flag_optimize_sci) && (GCC_OPTION (optimize) >= 2))
 
 /* These are the possible values for the `state' field of the class
    structure.  This must be kept in sync with libgcj.  */
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index afe35f0..2664c5d 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -356,7 +356,7 @@ set_source_filename (JCF *jcf, int index)
       
   sfname = find_sourcefile (sfname);
   ORDINARY_MAP_FILE_NAME (LINEMAPS_LAST_ORDINARY_MAP (line_table)) = sfname;
-  if (current_class == main_class) main_input_filename = sfname;
+  if (current_class == main_class) GCC_OPTION (main_input_filename) = sfname;
 }
 
 
@@ -1200,8 +1200,8 @@ give_name_to_class (JCF *jcf, int i)
       input_location = linemap_line_start (line_table, 0, 1);
       file_start_location = input_location;
       DECL_SOURCE_LOCATION (TYPE_NAME (this_class)) = input_location;
-      if (main_input_filename == NULL && jcf == main_jcf)
-	main_input_filename = sfname;
+      if (GCC_OPTION (main_input_filename) == NULL && jcf == main_jcf)
+	GCC_OPTION (main_input_filename) = sfname;
       }
 
       jcf->cpool.data[i].t = this_class;
@@ -1391,7 +1391,7 @@ load_class (tree class_or_name, int verbose)
   
   if (!class_loaded)
     {
-      if (flag_verify_invocations || ! flag_indirect_dispatch)
+      if (flag_verify_invocations || ! GCC_OPTION (flag_indirect_dispatch))
 	{
 	  if (verbose)
 	    error ("cannot find file for class %s", IDENTIFIER_POINTER (saved));
@@ -1399,7 +1399,7 @@ load_class (tree class_or_name, int verbose)
       else if (verbose)
 	{
 	  /* This is just a diagnostic during testing, not a real problem.  */
-	  if (!quiet_flag)
+	  if (!GCC_OPTION (quiet_flag))
 	    warning (0, "cannot find file for class %s", 
 		     IDENTIFIER_POINTER (saved));
 	  
@@ -1436,7 +1436,7 @@ jcf_parse (JCF* jcf)
   jcf_parse_class (jcf);
   if (main_class == NULL_TREE)
     main_class = current_class;
-  if (! quiet_flag && TYPE_NAME (current_class))
+  if (! GCC_OPTION (quiet_flag) && TYPE_NAME (current_class))
     fprintf (stderr, " %s %s",
 	     (jcf->access_flags & ACC_INTERFACE) ? "interface" : "class", 
 	     IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class))));
@@ -1581,7 +1581,7 @@ parse_class_file (void)
 	  tree arg;
 	  int  decl_max_locals;
 
-	  if (! flag_jni)
+	  if (! GCC_OPTION (flag_jni))
 	    continue;
 	  /* We need to compute the DECL_MAX_LOCALS. We need to take
              the wide types into account too. */
@@ -1746,10 +1746,10 @@ java_parse_file (void)
   bitmap_obstack_initialize (&bit_obstack);
   field_offsets = BITMAP_ALLOC (&bit_obstack);
 
-  if (flag_filelist_file)
+  if (GCC_OPTION (flag_filelist_file))
     {
       int avail = 2000;
-      finput = fopen (main_input_filename, "r");
+      finput = fopen (GCC_OPTION (main_input_filename), "r");
       if (finput == NULL)
 	fatal_error ("can%'t open %s: %m", LOCATION_FILE (input_location));
       list = XNEWVEC (char, avail);
@@ -1783,14 +1783,14 @@ java_parse_file (void)
       file_list = list;
     }
   else
-    list = CONST_CAST (char *, main_input_filename);
+    list = CONST_CAST (char *, GCC_OPTION (main_input_filename));
 
   while (list)
     {
       for (next = list; ; )
 	{
 	  char ch = *next;
-	  if (flag_filelist_file && ! in_quotes
+	  if (GCC_OPTION (flag_filelist_file) && ! in_quotes
 	      && (ch == '\n' || ch == '\r' || ch == '\t' || ch == ' '
 		  || ch == '&') /* FIXME */)
 	    {
@@ -1806,7 +1806,7 @@ java_parse_file (void)
 		  break;
 		}
 	    }
-	  if (flag_filelist_file && ch == '"')
+	  if (GCC_OPTION (flag_filelist_file) && ch == '"')
 	    {
 	      in_quotes = ! in_quotes;
 	      *next++ = '\0';
@@ -1885,7 +1885,7 @@ java_parse_file (void)
 
       /* Close previous descriptor, if any */
       if (finput && fclose (finput))
-	fatal_error ("can%'t close input file %s: %m", main_input_filename);
+	fatal_error ("can%'t close input file %s: %m", GCC_OPTION (main_input_filename));
       
       finput = fopen (filename, "rb");
       if (finput == NULL)
@@ -1962,7 +1962,7 @@ java_parse_file (void)
 	  /* FIXME: These two flags really should be independent.  We
 	     should be able to compile fully binary compatible, but
 	     with flag_verify_invocations on.  */
-	  flag_verify_invocations = ! flag_indirect_dispatch;
+	  flag_verify_invocations = ! GCC_OPTION (flag_indirect_dispatch);
 	  output_class = current_class = TREE_TYPE (node);
 
 	  current_jcf = TYPE_JCF (current_class);
diff --git a/gcc/java/jcf.h b/gcc/java/jcf.h
index 8aa077e..913a891 100644
--- a/gcc/java/jcf.h
+++ b/gcc/java/jcf.h
@@ -292,7 +292,7 @@ extern const char *jcf_write_base_directory;
 #ifdef VERBOSE_SKELETON
 #undef SOURCE_FRONTEND_DEBUG
 #define SOURCE_FRONTEND_DEBUG(X)				\
-  {if (!quiet_flag) {printf ("* "); printf X; putchar ('\n');} }
+  {if (!GCC_OPTION (quiet_flag)) {printf ("* "); printf X; putchar ('\n');} }
 #else
 #define SOURCE_FRONTEND_DEBUG(X)
 #endif
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index 8a68691..da68fc7 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -231,7 +231,7 @@ java_handle_option (size_t scode, const char *arg, int value,
       flag_wall = value;
       /* When -Wall given, enable -Wunused.  We do this because the C
 	 compiler does it, and people expect it.  */
-      warn_unused = value;
+      GCC_OPTION (warn_unused) = value;
       break;
 
     case OPT_fenable_assertions_:
@@ -313,11 +313,11 @@ java_init (void)
 {
   /* FIXME: Indirect dispatch isn't yet compatible with static class
      init optimization.  */
-  if (flag_indirect_dispatch)
+  if (GCC_OPTION (flag_indirect_dispatch))
     always_initialize_class_p = true;
 
-  if (!flag_indirect_dispatch)
-    flag_indirect_classes = false;
+  if (!GCC_OPTION (flag_indirect_dispatch))
+    GCC_OPTION (flag_indirect_classes) = false;
 
   jcf_path_seal (v_flag);
 
@@ -579,22 +579,22 @@ java_post_options (const char **pfilename)
 
   /* Excess precision other than "fast" requires front-end
      support.  */
-  if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD
+  if (GCC_OPTION (flag_excess_precision_cmdline) == EXCESS_PRECISION_STANDARD
       && TARGET_FLT_EVAL_METHOD_NON_DEFAULT)
     sorry ("-fexcess-precision=standard for Java");
-  flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
+  GCC_OPTION (flag_excess_precision_cmdline) = EXCESS_PRECISION_FAST;
 
   /* An absolute requirement: if we're not using indirect dispatch, we
      must always verify everything.  */
-  if (! flag_indirect_dispatch)
+  if (! GCC_OPTION (flag_indirect_dispatch))
     flag_verify_invocations = true;
 
-  if (flag_reduced_reflection)
+  if (GCC_OPTION (flag_reduced_reflection))
     {
-      if (flag_indirect_dispatch)
+      if (GCC_OPTION (flag_indirect_dispatch))
         error ("-findirect-dispatch is incompatible "
                "with -freduced-reflection");
-      if (flag_jni)
+      if (GCC_OPTION (flag_jni))
         error ("-fjni is incompatible with -freduced-reflection");
     }
 
diff --git a/gcc/java/parse.h b/gcc/java/parse.h
index 2bd03ea..f3c9276 100644
--- a/gcc/java/parse.h
+++ b/gcc/java/parse.h
@@ -31,7 +31,7 @@ extern struct obstack temporary_obstack;
 #ifdef VERBOSE_SKELETON
 #undef SOURCE_FRONTEND_DEBUG
 #define SOURCE_FRONTEND_DEBUG(X)				\
-  {if (!quiet_flag) {printf ("* "); printf X; putchar ('\n');} }
+  {if (!GCC_OPTION (quiet_flag)) {printf ("* "); printf X; putchar ('\n');} }
 #else
 #define SOURCE_FRONTEND_DEBUG(X)
 #endif
diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c
index 574029a..96d58ed 100644
--- a/gcc/java/typeck.c
+++ b/gcc/java/typeck.c
@@ -129,7 +129,7 @@ convert (tree type, tree expr)
     {
       if (type == char_type_node || type == promoted_char_type_node)
 	return fold_convert (type, expr);
-      if ((really_constant_p (expr) || ! flag_unsafe_math_optimizations)
+      if ((really_constant_p (expr) || ! GCC_OPTION (flag_unsafe_math_optimizations))
 	  && TREE_CODE (TREE_TYPE (expr)) == REAL_TYPE)
 	return convert_ieee_real_to_integer (type, expr);
       else
diff --git a/gcc/java/verify-glue.c b/gcc/java/verify-glue.c
index f0e1e4f..09025b2 100644
--- a/gcc/java/verify-glue.c
+++ b/gcc/java/verify-glue.c
@@ -223,7 +223,7 @@ vfy_is_assignable_from (vfy_jclass target, vfy_jclass source)
     return true;
 
   /* For the C++ ABI, perform this test statically. */
-  if (! flag_indirect_dispatch)
+  if (! GCC_OPTION (flag_indirect_dispatch))
     return can_widen_reference_to (source, target);
 
   /* For the BC-ABI, we assume at compile time that reference types are always 
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index d00ebd8..8d61015 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -110,7 +110,7 @@ lhd_post_options (const char ** ARG_UNUSED (pfilename))
 {
   /* Excess precision other than "fast" requires front-end
      support.  */
-  flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
+  GCC_OPTION (flag_excess_precision_cmdline) = EXCESS_PRECISION_FAST;
   return false;
 }
 
diff --git a/gcc/loop-init.c b/gcc/loop-init.c
index 2c2c269..b0c3fd4 100644
--- a/gcc/loop-init.c
+++ b/gcc/loop-init.c
@@ -293,13 +293,13 @@ fix_loop_structure (bitmap changed_bbs)
 static bool
 gate_handle_loop2 (void)
 {
-  if (optimize > 0
-      && (flag_move_loop_invariants
-	  || flag_unswitch_loops
-	  || flag_peel_loops
-	  || flag_unroll_loops
+  if (GCC_OPTION (optimize) > 0
+      && (GCC_OPTION (flag_move_loop_invariants)
+	  || GCC_OPTION (flag_unswitch_loops)
+	  || GCC_OPTION (flag_peel_loops)
+	  || GCC_OPTION (flag_unroll_loops)
 #ifdef HAVE_doloop_end
-	  || (flag_branch_on_count_reg && HAVE_doloop_end)
+	  || (GCC_OPTION (flag_branch_on_count_reg) && HAVE_doloop_end)
 #endif
 	 ))
     return true;
@@ -467,7 +467,7 @@ make_pass_rtl_loop_done (gcc::context *ctxt)
 static bool
 gate_rtl_move_loop_invariants (void)
 {
-  return flag_move_loop_invariants;
+  return GCC_OPTION (flag_move_loop_invariants);
 }
 
 static unsigned int
@@ -522,7 +522,7 @@ make_pass_rtl_move_loop_invariants (gcc::context *ctxt)
 static bool
 gate_rtl_unswitch (void)
 {
-  return flag_unswitch_loops;
+  return GCC_OPTION (flag_unswitch_loops);
 }
 
 static unsigned int
@@ -576,7 +576,7 @@ make_pass_rtl_unswitch (gcc::context *ctxt)
 static bool
 gate_rtl_unroll_and_peel_loops (void)
 {
-  return (flag_peel_loops || flag_unroll_loops || flag_unroll_all_loops);
+  return (GCC_OPTION (flag_peel_loops) || GCC_OPTION (flag_unroll_loops) || GCC_OPTION (flag_unroll_all_loops));
 }
 
 static unsigned int
@@ -588,11 +588,11 @@ rtl_unroll_and_peel_loops (void)
       if (dump_file)
 	df_dump (dump_file);
 
-      if (flag_peel_loops)
+      if (GCC_OPTION (flag_peel_loops))
 	flags |= UAP_PEEL;
-      if (flag_unroll_loops)
+      if (GCC_OPTION (flag_unroll_loops))
 	flags |= UAP_UNROLL;
-      if (flag_unroll_all_loops)
+      if (GCC_OPTION (flag_unroll_all_loops))
 	flags |= UAP_UNROLL_ALL;
 
       unroll_and_peel_loops (flags);
@@ -644,7 +644,7 @@ static bool
 gate_rtl_doloop (void)
 {
 #ifdef HAVE_doloop_end
-  return (flag_branch_on_count_reg && HAVE_doloop_end);
+  return (GCC_OPTION (flag_branch_on_count_reg) && HAVE_doloop_end);
 #else
   return 0;
 #endif
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
index 100a2c1..b007ce1 100644
--- a/gcc/loop-invariant.c
+++ b/gcc/loop-invariant.c
@@ -1073,7 +1073,7 @@ get_inv_cost (struct invariant *inv, int *comp_cost, unsigned *regs_needed)
   inv = invariants[inv->eqto];
 
   *comp_cost = 0;
-  if (! flag_ira_loop_pressure)
+  if (! GCC_OPTION (flag_ira_loop_pressure))
     regs_needed[0] = 0;
   else
     {
@@ -1086,7 +1086,7 @@ get_inv_cost (struct invariant *inv, int *comp_cost, unsigned *regs_needed)
     return;
   inv->stamp = actual_stamp;
 
-  if (! flag_ira_loop_pressure)
+  if (! GCC_OPTION (flag_ira_loop_pressure))
     regs_needed[0]++;
   else
     {
@@ -1124,7 +1124,7 @@ get_inv_cost (struct invariant *inv, int *comp_cost, unsigned *regs_needed)
 	&& IS_STACK_MODE (GET_MODE (SET_SRC (set)))
 	&& constant_pool_constant_p (SET_SRC (set)))
       {
-	if (flag_ira_loop_pressure)
+	if (GCC_OPTION (flag_ira_loop_pressure))
 	  regs_needed[ira_stack_reg_pressure_class] += 2;
 	else
 	  regs_needed[0] += 2;
@@ -1140,7 +1140,7 @@ get_inv_cost (struct invariant *inv, int *comp_cost, unsigned *regs_needed)
 
       get_inv_cost (dep, &acomp_cost, aregs_needed);
 
-      if (! flag_ira_loop_pressure)
+      if (! GCC_OPTION (flag_ira_loop_pressure))
 	check_p = aregs_needed[0] != 0;
       else
 	{
@@ -1159,7 +1159,7 @@ get_inv_cost (struct invariant *inv, int *comp_cost, unsigned *regs_needed)
 	{
 	  /* If this is a single use, after moving the dependency we will not
 	     need a new register.  */
-	  if (! flag_ira_loop_pressure)
+	  if (! GCC_OPTION (flag_ira_loop_pressure))
 	    aregs_needed[0]--;
 	  else
 	    {
@@ -1171,7 +1171,7 @@ get_inv_cost (struct invariant *inv, int *comp_cost, unsigned *regs_needed)
 	    }
 	}
 
-      if (! flag_ira_loop_pressure)
+      if (! GCC_OPTION (flag_ira_loop_pressure))
 	regs_needed[0] += aregs_needed[0];
       else
 	{
@@ -1200,7 +1200,7 @@ gain_for_invariant (struct invariant *inv, unsigned *regs_needed,
 
   get_inv_cost (inv, &comp_cost, regs_needed);
 
-  if (! flag_ira_loop_pressure)
+  if (! GCC_OPTION (flag_ira_loop_pressure))
     {
       size_cost = (estimate_reg_pressure_cost (new_regs[0] + regs_needed[0],
 					       regs_used, speed, call_p)
@@ -1282,7 +1282,7 @@ best_gain_for_invariant (struct invariant **best, unsigned *regs_needed,
 	{
 	  gain = again;
 	  *best = inv;
-	  if (! flag_ira_loop_pressure)
+	  if (! GCC_OPTION (flag_ira_loop_pressure))
 	    regs_needed[0] = aregs_needed[0];
 	  else
 	    {
@@ -1339,7 +1339,7 @@ find_invariants_to_move (bool speed, bool call_p)
   if (!invariants.length ())
     return;
 
-  if (flag_ira_loop_pressure)
+  if (GCC_OPTION (flag_ira_loop_pressure))
     /* REGS_USED is actually never used when the flag is on.  */
     regs_used = 0;
   else
@@ -1361,7 +1361,7 @@ find_invariants_to_move (bool speed, bool call_p)
 	}
     }
 
-  if (! flag_ira_loop_pressure)
+  if (! GCC_OPTION (flag_ira_loop_pressure))
     new_regs[0] = regs_needed[0] = 0;
   else
     {
@@ -1373,7 +1373,7 @@ find_invariants_to_move (bool speed, bool call_p)
 					  speed, call_p)) > 0)
     {
       set_move_mark (inv->invno, gain);
-      if (! flag_ira_loop_pressure)
+      if (! GCC_OPTION (flag_ira_loop_pressure))
 	new_regs[0] += regs_needed[0];
       else
 	{
@@ -1523,7 +1523,7 @@ move_invariants (struct loop *loop)
 
   FOR_EACH_VEC_ELT (invariants, i, inv)
     move_invariant_reg (loop, i);
-  if (flag_ira_loop_pressure && resize_reg_info ())
+  if (GCC_OPTION (flag_ira_loop_pressure) && resize_reg_info ())
     {
       FOR_EACH_VEC_ELT (invariants, i, inv)
 	if (inv->reg != NULL_RTX)
@@ -1872,8 +1872,8 @@ calculate_loop_reg_pressure (void)
 	}
     }
   bitmap_clear (&curr_regs_live);
-  if (flag_ira_region == IRA_REGION_MIXED
-      || flag_ira_region == IRA_REGION_ALL)
+  if (GCC_OPTION (flag_ira_region) == IRA_REGION_MIXED
+      || GCC_OPTION (flag_ira_region) == IRA_REGION_ALL)
     FOR_EACH_LOOP (loop, 0)
       {
 	EXECUTE_IF_SET_IN_BITMAP (&LOOP_DATA (loop)->regs_live, 0, j, bi)
@@ -1924,7 +1924,7 @@ move_loop_invariants (void)
 {
   struct loop *loop;
 
-  if (flag_ira_loop_pressure)
+  if (GCC_OPTION (flag_ira_loop_pressure))
     {
       df_analyze ();
       regstat_init_n_sets_and_refs ();
@@ -1948,7 +1948,7 @@ move_loop_invariants (void)
       free_loop_data (loop);
     }
 
-  if (flag_ira_loop_pressure)
+  if (GCC_OPTION (flag_ira_loop_pressure))
     /* There is no sense to keep this info because it was most
        probably outdated by subsequent passes.  */
     free_reg_info ();
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c
index 9091220..8d6144b 100644
--- a/gcc/loop-iv.c
+++ b/gcc/loop-iv.c
@@ -3032,12 +3032,12 @@ get_simple_loop_desc (struct loop *loop)
 
       /* Assume that no overflow happens and that the loop is finite.
 	 We already warned at the tree level if we ran optimizations there.  */
-      if (!flag_tree_loop_optimize && warn_unsafe_loop_optimizations)
+      if (!GCC_OPTION (flag_tree_loop_optimize) && GCC_OPTION (warn_unsafe_loop_optimizations))
 	{
 	  if (desc->infinite)
 	    {
 	      wording =
-		flag_unsafe_loop_optimizations
+		GCC_OPTION (flag_unsafe_loop_optimizations)
 		? N_("assuming that the loop is not infinite")
 		: N_("cannot optimize possibly infinite loops");
 	      warning (OPT_Wunsafe_loop_optimizations, "%s",
@@ -3046,7 +3046,7 @@ get_simple_loop_desc (struct loop *loop)
 	  if (desc->assumptions)
 	    {
 	      wording =
-		flag_unsafe_loop_optimizations
+		GCC_OPTION (flag_unsafe_loop_optimizations)
 		? N_("assuming that the loop counter does not overflow")
 		: N_("cannot optimize loop, the loop counter may overflow");
 	      warning (OPT_Wunsafe_loop_optimizations, "%s",
@@ -3054,7 +3054,7 @@ get_simple_loop_desc (struct loop *loop)
 	    }
 	}
 
-      if (flag_unsafe_loop_optimizations)
+      if (GCC_OPTION (flag_unsafe_loop_optimizations))
 	{
 	  desc->assumptions = NULL_RTX;
 	  desc->infinite = NULL_RTX;
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c
index 4561ce8..8e19c68 100644
--- a/gcc/loop-unroll.c
+++ b/gcc/loop-unroll.c
@@ -595,7 +595,7 @@ peel_loop_completely (struct loop *loop)
 	bitmap_clear_bit (wont_exit, 1);
 
       auto_vec<edge> remove_edges;
-      if (flag_split_ivs_in_unroller)
+      if (GCC_OPTION (flag_split_ivs_in_unroller))
         opt_info = analyze_insns_in_loop (loop);
 
       opt_info_start_duplication (opt_info);
@@ -778,8 +778,8 @@ unroll_loop_constant_iterations (struct loop *loop)
   bitmap_ones (wont_exit);
 
   auto_vec<edge> remove_edges;
-  if (flag_split_ivs_in_unroller
-      || flag_variable_expansion_in_unroller)
+  if (GCC_OPTION (flag_split_ivs_in_unroller)
+      || GCC_OPTION (flag_variable_expansion_in_unroller))
     opt_info = analyze_insns_in_loop (loop);
 
   if (!exit_at_end)
@@ -1108,8 +1108,8 @@ unroll_loop_runtime_iterations (struct loop *loop)
   struct opt_info *opt_info = NULL;
   bool ok;
 
-  if (flag_split_ivs_in_unroller
-      || flag_variable_expansion_in_unroller)
+  if (GCC_OPTION (flag_split_ivs_in_unroller)
+      || GCC_OPTION (flag_variable_expansion_in_unroller))
     opt_info = analyze_insns_in_loop (loop);
 
   /* Remember blocks whose dominators will have to be updated.  */
@@ -1441,7 +1441,7 @@ peel_loop_simple (struct loop *loop)
   struct opt_info *opt_info = NULL;
   bool ok;
 
-  if (flag_split_ivs_in_unroller && npeel > 1)
+  if (GCC_OPTION (flag_split_ivs_in_unroller) && npeel > 1)
     opt_info = analyze_insns_in_loop (loop);
 
   wont_exit = sbitmap_alloc (npeel + 1);
@@ -1593,8 +1593,8 @@ unroll_loop_stupid (struct loop *loop)
   struct opt_info *opt_info = NULL;
   bool ok;
 
-  if (flag_split_ivs_in_unroller
-      || flag_variable_expansion_in_unroller)
+  if (GCC_OPTION (flag_split_ivs_in_unroller)
+      || GCC_OPTION (flag_variable_expansion_in_unroller))
     opt_info = analyze_insns_in_loop (loop);
 
 
@@ -1738,10 +1738,10 @@ analyze_insn_to_expand_var (struct loop *loop, rtx insn)
 
   if (FLOAT_MODE_P (GET_MODE (dest)))
     {
-      if (!flag_associative_math)
+      if (!GCC_OPTION (flag_associative_math))
         return NULL;
       /* In the case of FMA, we're also changing the rounding.  */
-      if (code == FMA && !flag_unsafe_math_optimizations)
+      if (code == FMA && !GCC_OPTION (flag_unsafe_math_optimizations))
 	return NULL;
     }
 
@@ -1929,7 +1929,7 @@ analyze_insns_in_loop (struct loop *loop)
 
   body = get_loop_body (loop);
 
-  if (flag_split_ivs_in_unroller)
+  if (GCC_OPTION (flag_split_ivs_in_unroller))
     {
       opt_info->insns_to_split.create (5 * loop->num_nodes);
       opt_info->iv_to_split_head = NULL;
@@ -1949,7 +1949,7 @@ analyze_insns_in_loop (struct loop *loop)
 	}
     }
 
-  if (flag_variable_expansion_in_unroller
+  if (GCC_OPTION (flag_variable_expansion_in_unroller)
       && can_apply)
     {
       opt_info->insns_with_var_to_expand.create (5 * loop->num_nodes);
diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c
index a1331c0..3b4a845 100644
--- a/gcc/lower-subreg.c
+++ b/gcc/lower-subreg.c
@@ -1692,7 +1692,7 @@ decompose_multiword_subregs (bool decompose_copies)
 static bool
 gate_handle_lower_subreg (void)
 {
-  return flag_split_wide_types != 0;
+  return GCC_OPTION (flag_split_wide_types) != 0;
 }
 
 /* Implement first lower subreg pass.  */
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index ba4d489..cbf295c 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -1461,7 +1461,7 @@ spilled_pseudo_p (rtx op)
 static inline bool
 general_constant_p (rtx x)
 {
-  return CONSTANT_P (x) && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (x));
+  return CONSTANT_P (x) && (! GCC_OPTION (flag_pic) || LEGITIMATE_PIC_OPERAND_P (x));
 }
 
 static bool
diff --git a/gcc/lra-spills.c b/gcc/lra-spills.c
index 50f63fc..c922a25 100644
--- a/gcc/lra-spills.c
+++ b/gcc/lra-spills.c
@@ -382,7 +382,7 @@ assign_stack_slot_num_and_sort_pseudos (int *pseudo_regnos, int n)
   for (i = 0; i < n; i++)
     {
       regno = pseudo_regnos[i];
-      if (! flag_ira_share_spill_slots)
+      if (! GCC_OPTION (flag_ira_share_spill_slots))
 	j = slots_num;
       else
 	{
diff --git a/gcc/lra.c b/gcc/lra.c
index 77074e2..bda8910 100644
--- a/gcc/lra.c
+++ b/gcc/lra.c
@@ -2092,7 +2092,7 @@ has_nonexceptional_receiver (void)
   basic_block *tos, *worklist, bb;
 
   /* If we're not optimizing, then just err on the safe side.  */
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     return true;
 
   /* First determine which blocks can reach exit via normal paths.  */
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index ef3890d..10ff2da 100644
--- a/gcc/lto-cgraph.c
+++ b/gcc/lto-cgraph.c
@@ -666,7 +666,7 @@ output_profile_summary (struct lto_simple_output_block *ob)
          }
       /* IPA-profile computes hot bb threshold based on cumulated
 	 whole program profile.  We need to stream it down to ltrans.  */
-       if (flag_wpa)
+       if (GCC_OPTION (flag_wpa))
          streamer_write_gcov_count_stream (ob->main_stream,
 					   get_hot_bb_threshold ());
     }
@@ -846,7 +846,7 @@ compute_ltrans_boundary (lto_symtab_encoder_t in_encoder)
 	    }
 	}
       /* Add all possible targets for late devirtualization.  */
-      if (flag_devirtualize)
+      if (GCC_OPTION (flag_devirtualize))
 	for (edge = node->indirect_calls; edge; edge = edge->next_callee)
 	  if (edge->indirect_info->polymorphic)
 	    {
@@ -892,7 +892,7 @@ output_symtab (void)
   int i, n_nodes;
   lto_symtab_encoder_t encoder;
 
-  if (flag_wpa)
+  if (GCC_OPTION (flag_wpa))
     output_cgraph_opt_summary ();
 
   ob = lto_create_simple_output_block (LTO_section_symtab_nodes);
@@ -1406,7 +1406,7 @@ input_profile_summary (struct lto_input_block *ib,
         }
       /* IPA-profile computes hot bb threshold based on cumulated
 	 whole program profile.  We need to stream it down to ltrans.  */
-      if (flag_ltrans)
+      if (GCC_OPTION (flag_ltrans))
 	set_hot_bb_threshold (streamer_read_gcov_count (ib));
     }
 
@@ -1511,7 +1511,7 @@ merge_profile_summaries (struct lto_file_decl_data **file_data_vec)
     lto_gcov_summary.sum_max = max_runs;
 
   /* If merging already happent at WPA time, we are done.  */
-  if (flag_ltrans)
+  if (GCC_OPTION (flag_ltrans))
     return;
 
   /* Now compute count_materialization_scale of each node.
@@ -1574,7 +1574,7 @@ input_symtab (void)
       input_refs (ib, nodes);
       lto_destroy_simple_input_block (file_data, LTO_section_refs,
 				      ib, data, len);
-      if (flag_ltrans)
+      if (GCC_OPTION (flag_ltrans))
 	input_cgraph_opt_summary (nodes);
       nodes.release ();
     }
diff --git a/gcc/lto-compress.c b/gcc/lto-compress.c
index 4d718d5..ec2c57d 100644
--- a/gcc/lto-compress.c
+++ b/gcc/lto-compress.c
@@ -83,7 +83,7 @@ lto_zfree (void *opaque, void *address)
 static int
 lto_normalized_zlib_level (void)
 {
-  int level = flag_lto_compression_level;
+  int level = GCC_OPTION (flag_lto_compression_level);
 
   if (level != Z_DEFAULT_COMPRESSION)
     {
diff --git a/gcc/lto-section-in.c b/gcc/lto-section-in.c
index 9aa7639..d951df9 100644
--- a/gcc/lto-section-in.c
+++ b/gcc/lto-section-in.c
@@ -153,7 +153,7 @@ lto_get_section_data (struct lto_file_decl_data *file_data,
 
   /* FIXME lto: WPA mode does not write compressed sections, so for now
      suppress uncompression if flag_ltrans.  */
-  if (!flag_ltrans)
+  if (!GCC_OPTION (flag_ltrans))
     {
       /* Create a mapping header containing the underlying data and length,
 	 and prepend this to the uncompression buffer.  The uncompressed data
@@ -200,7 +200,7 @@ lto_free_section_data (struct lto_file_decl_data *file_data,
 
   /* FIXME lto: WPA mode does not write compressed sections, so for now
      suppress uncompression mapping if flag_ltrans.  */
-  if (flag_ltrans)
+  if (GCC_OPTION (flag_ltrans))
     {
       (free_section_f) (file_data, section_type, name, data, len);
       return;
diff --git a/gcc/lto-section-out.c b/gcc/lto-section-out.c
index 9d6926c..677687c 100644
--- a/gcc/lto-section-out.c
+++ b/gcc/lto-section-out.c
@@ -342,7 +342,7 @@ lto_destroy_simple_output_block (struct lto_simple_output_block *ob)
   struct lto_output_stream *header_stream;
 
   section_name = lto_get_section_name (ob->section_type, NULL, NULL);
-  lto_begin_section (section_name, !flag_wpa);
+  lto_begin_section (section_name, !GCC_OPTION (flag_wpa));
   free (section_name);
 
   /* Write the header which says how to decode the pieces of the
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c
index 3238ab8..1fca364 100644
--- a/gcc/lto-streamer-in.c
+++ b/gcc/lto-streamer-in.c
@@ -477,7 +477,7 @@ lto_init_eh (void)
      it.  Since this happens much later than the call to init_eh in
      lang_dependent_init, we have to set flag_exceptions and call
      init_eh again to initialize the EH tables.  */
-  flag_exceptions = 1;
+  GCC_OPTION (flag_exceptions) = 1;
   init_eh ();
 
   eh_initialized_p = true;
@@ -988,7 +988,7 @@ input_function (tree fn_decl, struct data_in *data_in,
 	     We can't remove them earlier because this would cause uid
 	     mismatches in fixups, but we can do it at this point, as
 	     long as debug stmts don't require fixups.  */
-	  if (!MAY_HAVE_DEBUG_STMTS && !flag_wpa && is_gimple_debug (stmt))
+	  if (!MAY_HAVE_DEBUG_STMTS && !GCC_OPTION (flag_wpa) && is_gimple_debug (stmt))
 	    {
 	      gimple_stmt_iterator gsi = bsi;
 	      gsi_next (&bsi);
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 0f37f1c..9812760 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -79,7 +79,7 @@ create_output_block (enum lto_section_type section_type)
   ob->decl_state = lto_get_out_decl_state ();
   ob->main_stream = XCNEW (struct lto_output_stream);
   ob->string_stream = XCNEW (struct lto_output_stream);
-  ob->writer_cache = streamer_tree_cache_create (!flag_wpa, true);
+  ob->writer_cache = streamer_tree_cache_create (!GCC_OPTION (flag_wpa), true);
 
   if (section_type == LTO_section_function_body)
     ob->cfg_stream = XCNEW (struct lto_output_stream);
@@ -875,7 +875,7 @@ hash_tree (struct streamer_tree_cache_d *cache, tree t)
       v = iterative_hash_host_wide_int (TYPE_PRECISION (t), v);
       v = iterative_hash_host_wide_int (TYPE_ALIGN (t), v);
       v = iterative_hash_host_wide_int ((TYPE_ALIAS_SET (t) == 0
-					 || (!in_lto_p
+					 || (!GCC_OPTION (in_lto_p)
 					     && get_alias_set (t) == 0))
 					? 0 : -1, v);
     }
@@ -1237,7 +1237,7 @@ DFS_write_tree (struct output_block *ob, sccs *from_state,
 	     any merging there.  */
 	  hashval_t scc_hash = 0;
 	  unsigned scc_entry_len = 0;
-	  if (!flag_wpa)
+	  if (!GCC_OPTION (flag_wpa))
 	    {
 	      scc_hash = hash_scc (ob->writer_cache, first, size);
 
@@ -1722,7 +1722,7 @@ produce_asm (struct output_block *ob, tree fn)
   else
     section_name = lto_get_section_name (section_type, NULL, NULL);
 
-  lto_begin_section (section_name, !flag_wpa);
+  lto_begin_section (section_name, !GCC_OPTION (flag_wpa));
   free (section_name);
 
   /* The entire header is stream computed here.  */
@@ -1938,7 +1938,7 @@ lto_output_toplevel_asms (void)
   streamer_write_string_cst (ob, ob->main_stream, NULL_TREE);
 
   section_name = lto_get_section_name (LTO_section_asm, NULL, NULL);
-  lto_begin_section (section_name, !flag_wpa);
+  lto_begin_section (section_name, !GCC_OPTION (flag_wpa));
   free (section_name);
 
   /* The entire header stream is computed here.  */
@@ -1984,7 +1984,7 @@ copy_function (struct cgraph_node *node)
   struct lto_in_decl_state *in_state;
   struct lto_out_decl_state *out_state = lto_get_out_decl_state ();
 
-  lto_begin_section (section_name, !flag_wpa);
+  lto_begin_section (section_name, !GCC_OPTION (flag_wpa));
   free (section_name);
 
   /* We may have renamed the declaration, e.g., a static function.  */
@@ -2056,7 +2056,7 @@ lto_output (void)
 #endif
 	  decl_state = lto_new_out_decl_state ();
 	  lto_push_out_decl_state (decl_state);
-	  if (gimple_has_body_p (node->decl) || !flag_wpa)
+	  if (gimple_has_body_p (node->decl) || !GCC_OPTION (flag_wpa))
 	    output_function (node);
 	  else
 	    copy_function (node);
@@ -2415,7 +2415,7 @@ produce_asm_for_decls (void)
   memset (&header, 0, sizeof (struct lto_decl_header));
 
   section_name = lto_get_section_name (LTO_section_decls, NULL, NULL);
-  lto_begin_section (section_name, !flag_wpa);
+  lto_begin_section (section_name, !GCC_OPTION (flag_wpa));
   free (section_name);
 
   /* Make string 0 be a NULL string.  */
@@ -2483,7 +2483,7 @@ produce_asm_for_decls (void)
 
   /* Write the symbol table.  It is used by linker to determine dependencies
      and thus we can skip it for WPA.  */
-  if (!flag_wpa)
+  if (!GCC_OPTION (flag_wpa))
     produce_symtab (ob);
 
   /* Write command line opts.  */
diff --git a/gcc/lto-streamer.c b/gcc/lto-streamer.c
index e94b787..375584f 100644
--- a/gcc/lto-streamer.c
+++ b/gcc/lto-streamer.c
@@ -204,7 +204,7 @@ print_lto_report (const char *s)
 	       HOST_WIDE_INT_PRINT_UNSIGNED "\n", s,
 	       get_tree_code_name ((enum tree_code) i), lto_stats.num_trees[i]);
 
-  if (flag_lto)
+  if (GCC_OPTION (flag_lto))
     {
       fprintf (stderr, "[%s] Compression: "
 	       HOST_WIDE_INT_PRINT_UNSIGNED " output bytes, "
@@ -220,7 +220,7 @@ print_lto_report (const char *s)
       fprintf (stderr, "\n");
     }
 
-  if (flag_wpa)
+  if (GCC_OPTION (flag_wpa))
     {
       fprintf (stderr, "[%s] # of output files: "
 	       HOST_WIDE_INT_PRINT_UNSIGNED "\n", s,
@@ -314,7 +314,7 @@ lto_streamer_init (void)
 bool
 gate_lto_out (void)
 {
-  return ((flag_generate_lto || in_lto_p)
+  return ((GCC_OPTION (flag_generate_lto) || GCC_OPTION (in_lto_p))
 	  /* Don't bother doing anything if the program has errors.  */
 	  && !seen_error ());
 }
diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c
index f60d212..525c8d6 100644
--- a/gcc/lto/lto-lang.c
+++ b/gcc/lto/lto-lang.c
@@ -578,8 +578,8 @@ def_builtin_1 (enum built_in_function fncode, const char *name,
 			       fnattrs);
 
   if (both_p
-      && !flag_no_builtin
-      && !(nonansi_p && flag_no_nonansi_builtin))
+      && !GCC_OPTION (flag_no_builtin)
+      && !(nonansi_p && GCC_OPTION (flag_no_nonansi_builtin)))
     add_builtin_function (libname, libtype, fncode, fnclass,
 			  NULL, fnattrs);
 
@@ -746,11 +746,11 @@ lto_handle_option (size_t scode, const char *arg,
       break;
 
     case OPT_Wabi:
-      warn_psabi = value;
+      GCC_OPTION (warn_psabi) = value;
       break;
 
     case OPT_fwpa:
-      flag_wpa = value ? "" : NULL;
+      GCC_OPTION (flag_wpa) = value ? "" : NULL;
       break;
 
     default:
@@ -768,24 +768,24 @@ static bool
 lto_post_options (const char **pfilename ATTRIBUTE_UNUSED)
 {
   /* -fltrans and -fwpa are mutually exclusive.  Check for that here.  */
-  if (flag_wpa && flag_ltrans)
+  if (GCC_OPTION (flag_wpa) && GCC_OPTION (flag_ltrans))
     error ("-fwpa and -fltrans are mutually exclusive");
 
-  if (flag_ltrans)
+  if (GCC_OPTION (flag_ltrans))
     {
-      flag_generate_lto = 0;
+      GCC_OPTION (flag_generate_lto) = 0;
 
       /* During LTRANS, we are not looking at the whole program, only
 	 a subset of the whole callgraph.  */
-      flag_whole_program = 0;
+      GCC_OPTION (flag_whole_program) = 0;
     }
 
-  if (flag_wpa)
-    flag_generate_lto = 1;
+  if (GCC_OPTION (flag_wpa))
+    GCC_OPTION (flag_generate_lto) = 1;
 
   /* Excess precision other than "fast" requires front-end
      support.  */
-  flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
+  GCC_OPTION (flag_excess_precision_cmdline) = EXCESS_PRECISION_FAST;
 
   /* Initialize the compiler back end.  */
   return false;
@@ -1079,7 +1079,7 @@ lto_getdecls (void)
 static void
 lto_write_globals (void)
 {
-  if (flag_wpa)
+  if (GCC_OPTION (flag_wpa))
     return;
 
   /* Output debug info for global variables.  */  
@@ -1155,10 +1155,10 @@ static bool
 lto_init (void)
 {
   /* We need to generate LTO if running in WPA mode.  */
-  flag_generate_lto = (flag_wpa != NULL);
+  GCC_OPTION (flag_generate_lto) = (GCC_OPTION (flag_wpa) != NULL);
 
   /* Create the basic integer types.  */
-  build_common_tree_nodes (flag_signed_char, flag_short_double);
+  build_common_tree_nodes (GCC_OPTION (flag_signed_char), GCC_OPTION (flag_short_double));
 
   /* The global tree for the main identifier is filled in by
      language-specific front-end initialization that is not run in the
@@ -1190,7 +1190,7 @@ lto_init (void)
 			   build_reference_type (va_list_type_node));
     }
   
-  if (flag_cilkplus)
+  if (GCC_OPTION (flag_cilkplus))
     cilk_init_builtins ();
 
   targetm.init_builtins ();
@@ -1230,7 +1230,7 @@ lto_init (void)
 #undef NAME_TYPE
 
   /* Initialize LTO-specific data structures.  */
-  in_lto_p = true;
+  GCC_OPTION (in_lto_p) = true;
 
   return true;
 }
diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c
index 1ee5fbb..3dac576 100644
--- a/gcc/lto/lto-partition.c
+++ b/gcc/lto/lto-partition.c
@@ -350,7 +350,7 @@ node_cmp (const void *pa, const void *pb)
      of a function. All functions with profile are placed in ascending
      order at the beginning.  */
 
-  if (flag_profile_reorder_functions)
+  if (GCC_OPTION (flag_profile_reorder_functions))
   {
     /* Functions with time profile are sorted in ascending order.  */
     if (a->tp_first_run && b->tp_first_run)
@@ -456,7 +456,7 @@ lto_balanced_map (void)
     for(i = 0; i < n_nodes; i++)
       fprintf (cgraph_dump_file, "Balanced map symbol order:%s:%u\n", order[i]->name (), order[i]->tp_first_run);
 
-  if (!flag_toplevel_reorder)
+  if (!GCC_OPTION (flag_toplevel_reorder))
     {
       FOR_EACH_VARIABLE (vnode)
 	if (symtab_get_symbol_partitioning_class (vnode) == SYMBOL_PARTITION)
@@ -488,7 +488,7 @@ lto_balanced_map (void)
 
       current_order = order[i]->order;
 
-      if (!flag_toplevel_reorder)
+      if (!GCC_OPTION (flag_toplevel_reorder))
 	while (varpool_pos < n_varpool_nodes
 	       && varpool_order[varpool_pos]->order < current_order)
 	  {
@@ -584,7 +584,7 @@ lto_balanced_map (void)
 		vnode = ipa_ref_varpool_node (ref);
 		if (!vnode->definition)
 		  continue;
-		if (!symbol_partitioned_p (vnode) && flag_toplevel_reorder
+		if (!symbol_partitioned_p (vnode) && GCC_OPTION (flag_toplevel_reorder)
 		    && symtab_get_symbol_partitioning_class (vnode) == SYMBOL_PARTITION)
 		  add_symbol_to_partition (partition, vnode);
 		index = lto_symtab_encoder_lookup (partition->encoder,
@@ -620,7 +620,7 @@ lto_balanced_map (void)
 		/* It is better to couple variables with their users, because it allows them
 		   to be removed.  Coupling with objects they refer to only helps to reduce
 		   number of symbols promoted to hidden.  */
-		if (!symbol_partitioned_p (vnode) && flag_toplevel_reorder
+		if (!symbol_partitioned_p (vnode) && GCC_OPTION (flag_toplevel_reorder)
 		    && !varpool_can_remove_if_no_refs (vnode)
 		    && symtab_get_symbol_partitioning_class (vnode) == SYMBOL_PARTITION)
 		  add_symbol_to_partition (partition, vnode);
@@ -712,7 +712,7 @@ lto_balanced_map (void)
     }
 
   /* Varables that are not reachable from the code go into last partition.  */
-  if (flag_toplevel_reorder)
+  if (GCC_OPTION (flag_toplevel_reorder))
     {
       FOR_EACH_VARIABLE (vnode)
         if (symtab_get_symbol_partitioning_class (vnode) == SYMBOL_PARTITION
@@ -893,7 +893,7 @@ lto_promote_cross_file_statics (void)
 {
   unsigned i, n_sets;
 
-  gcc_assert (flag_wpa);
+  gcc_assert (GCC_OPTION (flag_wpa));
 
   /* First compute boundaries.  */
   n_sets = ltrans_partitions.length ();
diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c
index 71242c8..12a0bb8 100644
--- a/gcc/lto/lto-symtab.c
+++ b/gcc/lto/lto-symtab.c
@@ -243,7 +243,7 @@ lto_symtab_resolve_replaceable_p (symtab_node *e)
 
   if (TREE_CODE (e->decl) == VAR_DECL)
     return (DECL_COMMON (e->decl)
-	    || (!flag_no_common && !DECL_INITIAL (e->decl)));
+	    || (!GCC_OPTION (flag_no_common) && !DECL_INITIAL (e->decl)));
 
   return false;
 }
@@ -584,7 +584,7 @@ lto_symtab_merge_symbols (void)
 {
   symtab_node *node;
 
-  if (!flag_ltrans)
+  if (!GCC_OPTION (flag_ltrans))
     {
       symtab_initialize_asm_name_hash ();
 
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index df9f031..94e1b6a 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -1896,7 +1896,7 @@ lto_read_decls (struct lto_file_decl_data *decl_data, const void *data,
 	    continue;
 
 	  /* Try to unify the SCC with already existing ones.  */
-	  if (!flag_ltrans
+	  if (!GCC_OPTION (flag_ltrans)
 	      && unify_scc (data_in->reader_cache, from,
 			    len, scc_entry_len, scc_hash))
 	    continue;
@@ -1934,10 +1934,10 @@ lto_read_decls (struct lto_file_decl_data *decl_data, const void *data,
 			(t, NULL_TREE, TREE_VALUE (attr), 0);
 		}
 	      /* Register TYPE_DECLs with the debuginfo machinery.  */
-	      if (!flag_wpa
+	      if (!GCC_OPTION (flag_wpa)
 		  && TREE_CODE (t) == TYPE_DECL)
 		debug_hooks->type_decl (t, !DECL_FILE_SCOPE_P (t));
-	      if (!flag_ltrans)
+	      if (!GCC_OPTION (flag_ltrans))
 		{
 		  /* Register variables and functions with the
 		     symbol table.  */
@@ -2560,7 +2560,7 @@ lto_wpa_write_files (void)
   size_t blen;
 
   /* Open the LTRANS output list.  */
-  if (!ltrans_output_list)
+  if (!GCC_OPTION (ltrans_output_list))
     fatal_error ("no LTRANS output list filename provided");
 
   timevar_push (TV_WHOPR_WPA);
@@ -2573,9 +2573,9 @@ lto_wpa_write_files (void)
   timevar_push (TV_WHOPR_WPA_IO);
 
   /* Generate a prefix for the LTRANS unit files.  */
-  blen = strlen (ltrans_output_list);
+  blen = strlen (GCC_OPTION (ltrans_output_list));
   temp_filename = (char *) xmalloc (blen + sizeof ("2147483648.o"));
-  strcpy (temp_filename, ltrans_output_list);
+  strcpy (temp_filename, GCC_OPTION (ltrans_output_list));
   if (blen > sizeof (".out")
       && strcmp (temp_filename + blen - sizeof (".out") + 1,
 		 ".out") == 0)
@@ -2588,8 +2588,8 @@ lto_wpa_write_files (void)
      FIXME: Even when not reordering we may want to output one list for parallel make
      and other for final link command.  */
 
-  if (!flag_profile_reorder_functions || !flag_profile_use)
-    ltrans_partitions.qsort (flag_toplevel_reorder
+  if (!GCC_OPTION (flag_profile_reorder_functions) || !GCC_OPTION (flag_profile_use))
+    ltrans_partitions.qsort (GCC_OPTION (flag_toplevel_reorder)
 			   ? cmp_partitions_size
 			   : cmp_partitions_order);
 
@@ -2600,7 +2600,7 @@ lto_wpa_write_files (void)
       /* Write all the nodes in SET.  */
       sprintf (temp_filename + blen, "%u.o", i);
 
-      if (!quiet_flag)
+      if (!GCC_OPTION (quiet_flag))
 	fprintf (stderr, " %s (%s %i insns)", temp_filename, part->name, part->insns);
       if (cgraph_dump_file)
 	{
@@ -2646,16 +2646,16 @@ lto_wpa_write_files (void)
 
       temp_filenames.safe_push (xstrdup (temp_filename));
     }
-  ltrans_output_list_stream = fopen (ltrans_output_list, "w");
+  ltrans_output_list_stream = fopen (GCC_OPTION (ltrans_output_list), "w");
   if (ltrans_output_list_stream == NULL)
-    fatal_error ("opening LTRANS output list %s: %m", ltrans_output_list);
+    fatal_error ("opening LTRANS output list %s: %m", GCC_OPTION (ltrans_output_list));
   for (i = 0; i < n_sets; i++)
     {
       unsigned int len = strlen (temp_filenames[i]);
       if (fwrite (temp_filenames[i], 1, len, ltrans_output_list_stream) < len
 	  || fwrite ("\n", 1, 1, ltrans_output_list_stream) < 1)
 	fatal_error ("writing to LTRANS output list %s: %m",
-		     ltrans_output_list);
+		     GCC_OPTION (ltrans_output_list));
      free (temp_filenames[i]);
     }
   temp_filenames.release();
@@ -2664,7 +2664,7 @@ lto_wpa_write_files (void)
 
   /* Close the LTRANS output list.  */
   if (fclose (ltrans_output_list_stream))
-    fatal_error ("closing LTRANS output list %s: %m", ltrans_output_list);
+    fatal_error ("closing LTRANS output list %s: %m", GCC_OPTION (ltrans_output_list));
 
   free_ltrans_partitions();
   free (temp_filename);
@@ -2947,14 +2947,14 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
   for (i = 0; i < TI_MAX; ++i)
     lto_register_canonical_types (global_trees[i], false);
 
-  if (!quiet_flag)
+  if (!GCC_OPTION (quiet_flag))
     fprintf (stderr, "Reading object files:");
 
   /* Read all of the object files specified on the command line.  */
   for (i = 0, last_file_ix = 0; i < nfiles; ++i)
     {
       struct lto_file_decl_data *file_data = NULL;
-      if (!quiet_flag)
+      if (!GCC_OPTION (quiet_flag))
 	{
 	  fprintf (stderr, " %s", fnames[i]);
 	  fflush (stderr);
@@ -2989,7 +2989,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
     fclose (resolution);
 
   /* Show the LTO report before launching LTRANS.  */
-  if (flag_lto_report || (flag_wpa && flag_lto_report_wpa))
+  if (GCC_OPTION (flag_lto_report) || (GCC_OPTION (flag_wpa) && GCC_OPTION (flag_lto_report_wpa)))
     print_lto_report_1 ();
 
   /* Free gimple type merging datastructures.  */
@@ -3006,7 +3006,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
 
   timevar_pop (TV_IPA_LTO_DECL_IN);
 
-  if (!quiet_flag)
+  if (!GCC_OPTION (quiet_flag))
     fprintf (stderr, "\nReading the callgraph\n");
 
   timevar_push (TV_IPA_LTO_CGRAPH_IO);
@@ -3032,7 +3032,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
   
   timevar_pop (TV_IPA_LTO_CGRAPH_IO);
 
-  if (!quiet_flag)
+  if (!GCC_OPTION (quiet_flag))
     fprintf (stderr, "Merging declarations\n");
 
   timevar_push (TV_IPA_LTO_DECL_MERGE);
@@ -3040,7 +3040,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
      need to care about resolving symbols again, we only need to replace
      duplicated declarations read from the callgraph and from function
      sections.  */
-  if (!flag_ltrans)
+  if (!GCC_OPTION (flag_ltrans))
     {
       lto_symtab_merge_decls ();
 
@@ -3060,11 +3060,11 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
   timevar_pop (TV_IPA_LTO_DECL_MERGE);
   /* Each pass will set the appropriate timer.  */
 
-  if (!quiet_flag)
+  if (!GCC_OPTION (quiet_flag))
     fprintf (stderr, "Reading summaries\n");
 
   /* Read the IPA summary data.  */
-  if (flag_ltrans)
+  if (GCC_OPTION (flag_ltrans))
     ipa_read_optimization_summaries ();
   else
     ipa_read_summaries ();
@@ -3111,9 +3111,9 @@ materialize_cgraph (void)
   struct cgraph_node *node; 
   timevar_id_t lto_timer;
 
-  if (!quiet_flag)
+  if (!GCC_OPTION (quiet_flag))
     fprintf (stderr,
-	     flag_wpa ? "Materializing decls:" : "Reading function bodies:");
+	     GCC_OPTION (flag_wpa) ? "Materializing decls:" : "Reading function bodies:");
 
   /* Now that we have input the cgraph, we need to clear all of the aux
      nodes and read the functions if we are not running in WPA mode.  */
@@ -3132,15 +3132,15 @@ materialize_cgraph (void)
 
   /* Start the appropriate timer depending on the mode that we are
      operating in.  */
-  lto_timer = (flag_wpa) ? TV_WHOPR_WPA
-	      : (flag_ltrans) ? TV_WHOPR_LTRANS
+  lto_timer = (GCC_OPTION (flag_wpa)) ? TV_WHOPR_WPA
+	      : (GCC_OPTION (flag_ltrans)) ? TV_WHOPR_LTRANS
 	      : TV_LTO;
   timevar_push (lto_timer);
 
   current_function_decl = NULL;
   set_cfun (NULL);
 
-  if (!quiet_flag)
+  if (!GCC_OPTION (quiet_flag))
     fprintf (stderr, "\n");
 
   timevar_pop (lto_timer);
@@ -3151,13 +3151,13 @@ materialize_cgraph (void)
 static void
 print_lto_report_1 (void)
 {
-  const char *pfx = (flag_lto) ? "LTO" : (flag_wpa) ? "WPA" : "LTRANS";
+  const char *pfx = (GCC_OPTION (flag_lto)) ? "LTO" : (GCC_OPTION (flag_wpa)) ? "WPA" : "LTRANS";
   fprintf (stderr, "%s statistics\n", pfx);
 
   fprintf (stderr, "[%s] read %lu SCCs of average size %f\n",
 	   pfx, num_sccs_read, total_scc_size / (double)num_sccs_read);
   fprintf (stderr, "[%s] %lu tree bodies read in total\n", pfx, total_scc_size);
-  if (flag_wpa && tree_scc_hash.is_created ())
+  if (GCC_OPTION (flag_wpa) && tree_scc_hash.is_created ())
     {
       fprintf (stderr, "[%s] tree SCC table: size %ld, %ld elements, "
 	       "collision ratio: %f\n", pfx,
@@ -3217,11 +3217,11 @@ do_whole_program_analysis (void)
   lto_parallelism = 1;
 
   /* TODO: jobserver communicatoin is not supported, yet.  */
-  if (!strcmp (flag_wpa, "jobserver"))
+  if (!strcmp (GCC_OPTION (flag_wpa), "jobserver"))
     lto_parallelism = -1;
   else
     {
-      lto_parallelism = atoi (flag_wpa);
+      lto_parallelism = atoi (GCC_OPTION (flag_wpa));
       if (lto_parallelism <= 0)
 	lto_parallelism = 0;
     }
@@ -3236,7 +3236,7 @@ do_whole_program_analysis (void)
   /* Reading in the cgraph uses different timers, start timing WPA now.  */
   timevar_push (TV_WHOPR_WPA);
 
-  if (pre_ipa_mem_report)
+  if (GCC_OPTION (pre_ipa_mem_report))
     {
       fprintf (stderr, "Memory consumption before IPA\n");
       dump_memory_report (false);
@@ -3266,9 +3266,9 @@ do_whole_program_analysis (void)
   timevar_pop (TV_WHOPR_WPA);
 
   timevar_push (TV_WHOPR_PARTITIONING);
-  if (flag_lto_partition_1to1)
+  if (GCC_OPTION (flag_lto_partition_1to1))
     lto_1_to_1_map ();
-  else if (flag_lto_partition_max)
+  else if (GCC_OPTION (flag_lto_partition_max))
     lto_max_map ();
   else
     lto_balanced_map ();
@@ -3294,26 +3294,26 @@ do_whole_program_analysis (void)
   ggc_collect ();
 
   timevar_start (TV_PHASE_STREAM_OUT);
-  if (!quiet_flag)
+  if (!GCC_OPTION (quiet_flag))
     {
       fprintf (stderr, "\nStreaming out");
       fflush (stderr);
     }
   lto_wpa_write_files ();
-  if (!quiet_flag)
+  if (!GCC_OPTION (quiet_flag))
     fprintf (stderr, "\n");
   timevar_stop (TV_PHASE_STREAM_OUT);
 
-  if (post_ipa_mem_report)
+  if (GCC_OPTION (post_ipa_mem_report))
     {
       fprintf (stderr, "Memory consumption after IPA\n");
       dump_memory_report (false);
     }
 
   /* Show the LTO report before launching LTRANS.  */
-  if (flag_lto_report || (flag_wpa && flag_lto_report_wpa))
+  if (GCC_OPTION (flag_lto_report) || (GCC_OPTION (flag_wpa) && GCC_OPTION (flag_lto_report_wpa)))
     print_lto_report_1 ();
-  if (mem_report_wpa)
+  if (GCC_OPTION (mem_report_wpa))
     dump_memory_report (true);
 }
 
@@ -3344,11 +3344,11 @@ lto_eh_personality (void)
 static void 
 lto_process_name (void)
 {
-  if (flag_lto)
+  if (GCC_OPTION (flag_lto))
     setproctitle ("lto1-lto");
-  if (flag_wpa)
+  if (GCC_OPTION (flag_wpa))
     setproctitle ("lto1-wpa");
-  if (flag_ltrans)
+  if (GCC_OPTION (flag_ltrans))
     setproctitle ("lto1-ltrans");
 }
 
@@ -3418,14 +3418,14 @@ lto_main (void)
       /* If WPA is enabled analyze the whole call graph and create an
 	 optimization plan.  Otherwise, read in all the function
 	 bodies and continue with optimization.  */
-      if (flag_wpa)
+      if (GCC_OPTION (flag_wpa))
 	do_whole_program_analysis ();
       else
 	{
 	  timevar_start (TV_PHASE_OPT_GEN);
 
 	  materialize_cgraph ();
-	  if (!flag_ltrans)
+	  if (!GCC_OPTION (flag_ltrans))
 	    lto_promote_statics_nonwpa ();
 
 	  /* Let the middle end know that we have read and merged all of
@@ -3439,7 +3439,7 @@ lto_main (void)
 	     print_lto_report before launching LTRANS.  If LTRANS was
 	     launched directly by the driver we would not need to do
 	     this.  */
-	  if (flag_lto_report || (flag_wpa && flag_lto_report_wpa))
+	  if (GCC_OPTION (flag_lto_report) || (GCC_OPTION (flag_wpa) && GCC_OPTION (flag_lto_report_wpa)))
 	    print_lto_report_1 ();
 	}
     }
diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c
index 88543b2..c100d12 100644
--- a/gcc/mode-switching.c
+++ b/gcc/mode-switching.c
@@ -295,7 +295,7 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
 			return_copy_pat = PATTERN (return_copy);
 			if (GET_CODE (return_copy_pat) != CLOBBER)
 			  break;
-			else if (!optimize)
+			else if (!GCC_OPTION (optimize))
 			  {
 			    /* This might be (clobber (reg [<result>]))
 			       when not optimizing.  Then check if
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
index 7ba3ddb..0e1cff4 100644
--- a/gcc/modulo-sched.c
+++ b/gcc/modulo-sched.c
@@ -1166,7 +1166,7 @@ generate_prolog_epilog (partial_schedule_ptr ps, struct loop *loop,
   /* Put the prolog on the entry edge.  */
   e = loop_preheader_edge (loop);
   split_edge_and_insert (e, get_insns ());
-  if (!flag_resched_modulo_sched)
+  if (!GCC_OPTION (flag_resched_modulo_sched))
     e->dest->flags |= BB_DISABLE_SCHEDULE;
 
   end_sequence ();
@@ -1181,7 +1181,7 @@ generate_prolog_epilog (partial_schedule_ptr ps, struct loop *loop,
   gcc_assert (single_exit (loop));
   e = single_exit (loop);
   split_edge_and_insert (e, get_insns ());
-  if (!flag_resched_modulo_sched)
+  if (!GCC_OPTION (flag_resched_modulo_sched))
     e->dest->flags |= BB_DISABLE_SCHEDULE;
 
   end_sequence ();
@@ -1447,7 +1447,7 @@ sms_schedule (void)
 	    {
 	      dump_insn_location (tail);
 	      fprintf (dump_file, "\nSMS single-bb-loop\n");
-	      if (profile_info && flag_branch_probabilities)
+	      if (profile_info && GCC_OPTION (flag_branch_probabilities))
 	    	{
 	      	  fprintf (dump_file, "SMS loop-count ");
 	      	  fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
@@ -1568,7 +1568,7 @@ sms_schedule (void)
 	{
 	  dump_insn_location (tail);
 	  fprintf (dump_file, "\nSMS single-bb-loop\n");
-	  if (profile_info && flag_branch_probabilities)
+	  if (profile_info && GCC_OPTION (flag_branch_probabilities))
 	    {
 	      fprintf (dump_file, "SMS loop-count ");
 	      fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
@@ -1656,7 +1656,7 @@ sms_schedule (void)
 	     we let the scheduling passes do the job in this case.  */
 	  if (stage_count < PARAM_VALUE (PARAM_SMS_MIN_SC)
 	      || (count_init && (loop_count <= stage_count))
-	      || (flag_branch_probabilities && (trip_count <= stage_count)))
+	      || (GCC_OPTION (flag_branch_probabilities) && (trip_count <= stage_count)))
 	    {
 	      if (dump_file)
 		{
@@ -1739,7 +1739,7 @@ sms_schedule (void)
 
           /* Mark this loop as software pipelined so the later
 	     scheduling passes don't touch it.  */
-	  if (! flag_resched_modulo_sched)
+	  if (! GCC_OPTION (flag_resched_modulo_sched))
 	    mark_loop_unsched (loop);
 	  
 	  /* The life-info is not valid any more.  */
@@ -3326,7 +3326,7 @@ rotate_partial_schedule (partial_schedule_ptr ps, int start_cycle)
 static bool
 gate_handle_sms (void)
 {
-  return (optimize > 0 && flag_modulo_sched);
+  return (GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_modulo_sched));
 }
 
 
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index cb0b5ac..806d314 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -374,7 +374,7 @@ objc_init (void)
      immediately (producing no file), and the second time it compiles
      an empty file.  This checks, as a side effect, that compiling an
      empty file produces no assembler output.  */
-  if (print_struct_values && !flag_compare_debug)
+  if (print_struct_values && !GCC_OPTION (flag_compare_debug))
     generate_struct_by_value_array ();
 
   /* Set up stuff used by FE parser and all runtimes.  */
@@ -383,9 +383,9 @@ objc_init (void)
   hash_init ();
   objc_encoding_init ();
   /* ... and then check flags and set-up for the selected runtime ... */
-  if (flag_next_runtime && flag_objc_abi >= 2)
+  if (GCC_OPTION (flag_next_runtime) && GCC_OPTION (flag_objc_abi) >= 2)
     ok = objc_next_runtime_abi_02_init (&runtime);
-  else if (flag_next_runtime)
+  else if (GCC_OPTION (flag_next_runtime))
     ok = objc_next_runtime_abi_01_init (&runtime);
   else
     ok = objc_gnu_runtime_abi_01_init (&runtime);
@@ -416,7 +416,7 @@ objc_write_global_declarations (void)
       objc_implementation_context = NULL_TREE;
     }
 
-  if (warn_selector)
+  if (GCC_OPTION (warn_selector))
     {
       objc_map_iterator_t i;
 
@@ -436,14 +436,14 @@ objc_write_global_declarations (void)
 
   /* Finalize Objective-C runtime data.  No need to generate tables
      and code if only checking syntax, or if generating a PCH file.  */
-  if (!flag_syntax_only && !pch_file)
+  if (!GCC_OPTION (flag_syntax_only) && !pch_file)
     {
       location_t saved_location;
 
       /* If gen_declaration desired, open the output file.  */
-      if (flag_gen_declaration)
+      if (GCC_OPTION (flag_gen_declaration))
 	{
-	  char * const dumpname = concat (dump_base_name, ".decl", NULL);
+	  char * const dumpname = concat (GCC_OPTION (dump_base_name), ".decl", NULL);
 	  gen_declaration_file = fopen (dumpname, "w");
 	  if (gen_declaration_file == 0)
 	    fatal_error ("can%'t open %s: %m", dumpname);
@@ -562,7 +562,7 @@ void
 objc_start_class_interface (tree klass, tree super_class,
 			    tree protos, tree attributes)
 {
-  if (flag_objc1_only && attributes)
+  if (GCC_OPTION (flag_objc1_only) && attributes)
     error_at (input_location, "class attributes are not available in Objective-C 1.0");
 
   objc_interface_context
@@ -577,7 +577,7 @@ objc_start_category_interface (tree klass, tree categ,
 {
   if (attributes)
     {
-      if (flag_objc1_only)
+      if (GCC_OPTION (flag_objc1_only))
 	error_at (input_location, "category attributes are not available in Objective-C 1.0");
       else
 	warning_at (input_location, OPT_Wattributes,
@@ -586,7 +586,7 @@ objc_start_category_interface (tree klass, tree categ,
     }
   if (categ == NULL_TREE)
     {
-      if (flag_objc1_only)
+      if (GCC_OPTION (flag_objc1_only))
 	error_at (input_location, "class extensions are not available in Objective-C 1.0");
       else
 	{
@@ -615,7 +615,7 @@ objc_start_category_interface (tree klass, tree categ,
 void
 objc_start_protocol (tree name, tree protos, tree attributes)
 {
-  if (flag_objc1_only && attributes)
+  if (GCC_OPTION (flag_objc1_only) && attributes)
     error_at (input_location, "protocol attributes are not available in Objective-C 1.0");
 
   objc_interface_context
@@ -670,7 +670,7 @@ void
 objc_finish_implementation (void)
 {
 #ifdef OBJCPLUS
-  if (flag_objc_call_cxx_cdtors)
+  if (GCC_OPTION (flag_objc_call_cxx_cdtors))
     objc_generate_cxx_cdtors ();
 #endif
 
@@ -689,7 +689,7 @@ objc_set_visibility (objc_ivar_visibility_kind visibility)
 {
   if (visibility == OBJC_IVAR_VIS_PACKAGE)
     {
-      if (flag_objc1_only)
+      if (GCC_OPTION (flag_objc1_only))
 	error ("%<@package%> is not available in Objective-C 1.0");
       else
 	warning (0, "%<@package%> presently has the same effect as %<@public%>");
@@ -700,7 +700,7 @@ objc_set_visibility (objc_ivar_visibility_kind visibility)
 void
 objc_set_method_opt (bool optional)
 {
-  if (flag_objc1_only)
+  if (GCC_OPTION (flag_objc1_only))
     {
       if (optional)
 	error_at (input_location, "%<@optional%> is not available in Objective-C 1.0");
@@ -821,7 +821,7 @@ objc_add_property_declaration (location_t location, tree decl,
   objc_property_assign_semantics property_assign_semantics = OBJC_PROPERTY_ASSIGN;
   bool property_extension_in_class_extension = false;
 
-  if (flag_objc1_only)
+  if (GCC_OPTION (flag_objc1_only))
     error_at (input_location, "%<@property%> is not available in Objective-C 1.0");
 
   if (parsed_property_readonly && parsed_property_readwrite)
@@ -922,7 +922,7 @@ objc_add_property_declaration (location_t location, tree decl,
      "POD".  */
 
   /* Implement -Wproperty-assign-default (which is enabled by default).  */
-  if (warn_property_assign_default
+  if (GCC_OPTION (warn_property_assign_default)
       /* If garbage collection is not being used, then 'assign' is
 	 valid for objects (and typically used for delegates) but it
 	 is wrong in most cases (since most objects need to be
@@ -932,7 +932,7 @@ objc_add_property_declaration (location_t location, tree decl,
       /* Read-only properties are never assigned, so the assignment
 	 semantics do not matter in that case.  */
       && !property_readonly
-      && !flag_objc_gc)
+      && !GCC_OPTION (flag_objc_gc))
     {
       /* Please note that it would make sense to default to 'assign'
 	 for non-{Objective-C objects}, and to 'retain' for
@@ -1351,7 +1351,7 @@ objc_maybe_build_component_ref (tree object, tree property_ident)
 
   /* If we are in Objective-C 1.0 mode, dot-syntax and properties are
      not available.  */
-  if (flag_objc1_only)
+  if (GCC_OPTION (flag_objc1_only))
     return NULL_TREE;
 
   /* Try to determine if 'object' is an Objective-C object or not.  If
@@ -1633,7 +1633,7 @@ objc_build_class_component_ref (tree class_name, tree property_ident)
   tree x = NULL_TREE;
   tree object, rtype;
 
-  if (flag_objc1_only)
+  if (GCC_OPTION (flag_objc1_only))
     error_at (input_location, "the dot syntax is not available in Objective-C 1.0");
 
   if (class_name == NULL_TREE || class_name == error_mark_node
@@ -2002,7 +2002,7 @@ objc_add_method_declaration (bool is_class_method, tree decl, tree attributes)
       fatal_error ("method declaration not in @interface context");
     }
 
-  if (flag_objc1_only && attributes)
+  if (GCC_OPTION (flag_objc1_only) && attributes)
     error_at (input_location, "method attributes are not available in Objective-C 1.0");
 
   objc_decl_method_attributes (&decl, attributes, 0);
@@ -2905,12 +2905,12 @@ static void
 synth_module_prologue (void)
 {
   tree type;
-  enum debug_info_type save_write_symbols = write_symbols;
+  enum debug_info_type save_write_symbols = GCC_OPTION (write_symbols);
   const struct gcc_debug_hooks *const save_hooks = debug_hooks;
 
   /* Suppress outputting debug symbols, because
      dbxout_init hasn't been called yet.  */
-  write_symbols = NO_DEBUG;
+  GCC_OPTION (write_symbols) = NO_DEBUG;
   debug_hooks = &do_nothing_debug_hooks;
 
 #ifdef OBJCPLUS
@@ -2999,7 +2999,7 @@ synth_module_prologue (void)
   pop_lang_context ();
 #endif
 
-  write_symbols = save_write_symbols;
+  GCC_OPTION (write_symbols) = save_write_symbols;
   debug_hooks = save_hooks;
 }
 
@@ -3136,7 +3136,7 @@ objc_build_string_object (tree string)
      literal.  On Darwin (Mac OS X), for example, we may wish to obtain a
      constant CFString reference instead.
      At present, this is only supported for the NeXT runtime.  */
-  if (flag_next_runtime
+  if (GCC_OPTION (flag_next_runtime)
       && targetcm.objc_construct_string_object)
     {
       tree constructor = (*targetcm.objc_construct_string_object) (string);
@@ -3540,7 +3540,7 @@ objc_build_ivar_assignment (tree outervar, tree lhs, tree rhs)
     = objc_substitute_decl
       (lhs, outervar, convert (TREE_TYPE (outervar), integer_zero_node));
   tree func
-    = (flag_objc_direct_dispatch
+    = (GCC_OPTION (flag_objc_direct_dispatch)
        ? objc_assign_ivar_fast_decl
        : objc_assign_ivar_decl);
 
@@ -3627,7 +3627,7 @@ objc_generate_write_barrier (tree lhs, enum tree_code modifycode, tree rhs)
 
   /* This function is currently only used with the next runtime with
      garbage collection enabled (-fobjc-gc).  */
-  gcc_assert (flag_next_runtime);
+  gcc_assert (GCC_OPTION (flag_next_runtime));
 
   /* See if we have any lhs casts, and strip them out.  NB: The lvalue casts
      will have been transformed to the form '*(type *)&expr'.  */
@@ -3663,7 +3663,7 @@ objc_generate_write_barrier (tree lhs, enum tree_code modifycode, tree rhs)
       if (modifycode != NOP_EXPR)
         goto invalid_pointer_arithmetic;
 
-      if (warn_assign_intercept)
+      if (GCC_OPTION (warn_assign_intercept))
 	warning (0, "strong-cast assignment has been intercepted");
 
       result = objc_build_strong_cast_assignment (lhs, rhs);
@@ -3705,7 +3705,7 @@ objc_generate_write_barrier (tree lhs, enum tree_code modifycode, tree rhs)
 	 suggest_cast:
 	  if (modifycode == NOP_EXPR)
 	    {
-	      if (warn_assign_intercept)
+	      if (GCC_OPTION (warn_assign_intercept))
 		warning (0, "strong-cast may possibly be needed");
 	    }
 
@@ -3715,7 +3715,7 @@ objc_generate_write_barrier (tree lhs, enum tree_code modifycode, tree rhs)
       if (modifycode != NOP_EXPR)
         goto invalid_pointer_arithmetic;
 
-      if (warn_assign_intercept)
+      if (GCC_OPTION (warn_assign_intercept))
 	warning (0, "instance variable assignment has been intercepted");
 
       result = objc_build_ivar_assignment (outer, lhs, rhs);
@@ -3740,7 +3740,7 @@ objc_generate_write_barrier (tree lhs, enum tree_code modifycode, tree rhs)
 	  goto exit_point;
 	}
 
-      if (warn_assign_intercept)
+      if (GCC_OPTION (warn_assign_intercept))
 	warning (0, "global/static variable assignment has been intercepted");
 
       result = objc_build_global_assignment (lhs, rhs);
@@ -4098,7 +4098,7 @@ objc_maybe_warn_exceptions (location_t loc)
      explicitly.  On other platforms, at the moment -fobjc-exceptions
      triggers -fexceptions which again is required for exceptions to
      work.  */
-  if (!flag_objc_exceptions)
+  if (!GCC_OPTION (flag_objc_exceptions))
     {
       /* Warn only once per compilation unit.  */
       static bool warned = false;
@@ -4129,7 +4129,7 @@ objc_begin_try_stmt (location_t try_locus, tree body)
   /* Collect the list of local variables.  We'll mark them as volatile
      at the end of compilation of this function to prevent them being
      clobbered by setjmp/longjmp.  */
-  if (flag_objc_sjlj_exceptions)
+  if (GCC_OPTION (flag_objc_sjlj_exceptions))
     objc_mark_locals_volatile (NULL);
 }
 
@@ -4413,7 +4413,7 @@ build_private_template (tree klass)
 
       /* Set the TREE_USED bit for this struct, so that stab generator
 	 can emit stabs for this struct type.  */
-      if (flag_debug_only_used_symbols && TYPE_STUB_DECL (record))
+      if (GCC_OPTION (flag_debug_only_used_symbols) && TYPE_STUB_DECL (record))
 	TREE_USED (TYPE_STUB_DECL (record)) = 1;
 
       /* Copy the attributes from the class to the type.  */
@@ -4701,7 +4701,7 @@ objc_build_keyword_decl (tree key_name, tree arg_type,
 {
   tree keyword_decl;
 
-  if (flag_objc1_only && attributes)
+  if (GCC_OPTION (flag_objc1_only) && attributes)
     error_at (input_location, "method argument attributes are not available in Objective-C 1.0");
 
   /* If no type is specified, default to "id".  */
@@ -5070,7 +5070,7 @@ check_duplicates (tree method, int methods, int is_class)
      -Wno-strict-selector-match is specified, we shall not complain if
      the differences are solely among types with identical size and
      alignment.  */
-  if (!warn_strict_selector_match)
+  if (!GCC_OPTION (warn_strict_selector_match))
     {
       for (i = 0; i < (size_t) TREE_VEC_LENGTH (method); i++)
 	if (!comp_proto_with_proto (first_method, TREE_VEC_ELT (method, i), 0))
@@ -5708,7 +5708,7 @@ objc_build_selector_expr (location_t loc, tree selnamelist)
 
   /* If we are required to check @selector() expressions as they
      are found, check that the selector has been declared.  */
-  if (warn_undeclared_selector)
+  if (GCC_OPTION (warn_undeclared_selector))
     {
       /* Look the selector up in the list of all known class and
          instance methods (up to this line) to check that the selector
@@ -6244,7 +6244,7 @@ add_instance_variable (tree klass, objc_ivar_visibility_kind visibility,
     {
       tree type_name = OBJC_TYPE_NAME (field_type);
 
-      if (flag_objc_call_cxx_cdtors)
+      if (GCC_OPTION (flag_objc_call_cxx_cdtors))
         {
 	  /* Since the ObjC runtime will be calling the constructors and
 	     destructors for us, the only thing we can't handle is the lack
@@ -6695,7 +6695,7 @@ check_protocol (tree p, const char *type, tree name)
       int f1, f2;
 
       /* Ensure that all protocols have bodies!  */
-      if (warn_protocol)
+      if (GCC_OPTION (warn_protocol))
 	{
 	  f1 = check_methods (PROTOCOL_CLS_METHODS (p),
 			      objc_implementation_context,
@@ -7700,7 +7700,7 @@ objc_add_synthesize_declaration (location_t location, tree property_and_ivar_lis
 {
   tree interface, chain;
 
-  if (flag_objc1_only)
+  if (GCC_OPTION (flag_objc1_only))
     error_at (input_location, "%<@synthesize%> is not available in Objective-C 1.0");
 
   if (property_and_ivar_list == error_mark_node)
@@ -7809,7 +7809,7 @@ objc_add_dynamic_declaration (location_t location, tree property_list)
 {
   tree interface, chain;
 
-  if (flag_objc1_only)
+  if (GCC_OPTION (flag_objc1_only))
     error_at (input_location, "%<@dynamic%> is not available in Objective-C 1.0");
 
   if (property_list == error_mark_node)
@@ -9666,7 +9666,7 @@ objc_finish_foreach_loop (location_t location, tree object_expression, tree coll
   tree t;
   int i;
 
-  if (flag_objc1_only)
+  if (GCC_OPTION (flag_objc1_only))
     error_at (location, "fast enumeration is not available in Objective-C 1.0");
 
   if (object_expression == error_mark_node)
diff --git a/gcc/objc/objc-encoding.c b/gcc/objc/objc-encoding.c
index 70c2a68..14911d5 100644
--- a/gcc/objc/objc-encoding.c
+++ b/gcc/objc/objc-encoding.c
@@ -256,7 +256,7 @@ encode_pointer (tree type, int curtype, int format)
 {
   tree pointer_to = TREE_TYPE (type);
 
-  if (flag_next_runtime)
+  if (GCC_OPTION (flag_next_runtime))
     {
       /* This code is used to be compatible with gcc-3.3.  */
       /* For historical/compatibility reasons, the read-only qualifier
@@ -324,7 +324,7 @@ encode_pointer (tree type, int curtype, int format)
 	 other pointers to char are encoded as *.   */
       if (strcmp (IDENTIFIER_POINTER (pname), "BOOL"))
 	{
-	  if (!flag_next_runtime)
+	  if (!GCC_OPTION (flag_next_runtime))
 	    {
 	      /* The NeXT runtime adds the 'r' before getting here.  */
 
@@ -491,7 +491,7 @@ encode_aggregate_within (tree type, int curtype, int format, int left,
   bool inline_contents = false;
   bool pointed_to = false;
 
-  if (flag_next_runtime)
+  if (GCC_OPTION (flag_next_runtime))
     {
       if (ob_size > 0  &&  *(obstack_next_free (&util_obstack) - 1) == '^')
 	pointed_to = true;
@@ -603,7 +603,7 @@ encode_type (tree type, int curtype, int format)
   if (type == error_mark_node)
     return;
 
-  if (!flag_next_runtime)
+  if (!GCC_OPTION (flag_next_runtime))
     {
       if (TYPE_READONLY (type))
 	obstack_1grow (&util_obstack, 'r');
@@ -612,7 +612,7 @@ encode_type (tree type, int curtype, int format)
   switch (code)
     {
     case ENUMERAL_TYPE:
-      if (flag_next_runtime)
+      if (GCC_OPTION (flag_next_runtime))
 	{
 	  /* Kludge for backwards-compatibility with gcc-3.3: enums
 	     are always encoded as 'i' no matter what type they
@@ -632,7 +632,7 @@ encode_type (tree type, int curtype, int format)
 	  case 32:
 	    {
 	      tree int_type = type;
-	      if (flag_next_runtime)
+	      if (GCC_OPTION (flag_next_runtime))
 		{
 		  /* Another legacy kludge for compatibility with
 		     gcc-3.3: 32-bit longs are encoded as 'l' or 'L',
@@ -723,7 +723,7 @@ encode_type (tree type, int curtype, int format)
       break;
     }
 
-  if (flag_next_runtime)
+  if (GCC_OPTION (flag_next_runtime))
     {
       /* Super-kludge.  Some ObjC qualifier and type combinations need
 	 to be rearranged for compatibility with gcc-3.3.  */
@@ -824,7 +824,7 @@ encode_field (tree field_decl, int curtype, int format)
     {
       int size = tree_to_uhwi (DECL_SIZE (field_decl));
 
-      if (flag_next_runtime)
+      if (GCC_OPTION (flag_next_runtime))
 	encode_next_bitfield (size);
       else
 	encode_gnu_bitfield (int_bit_position (field_decl),
diff --git a/gcc/objc/objc-gnu-runtime-abi-01.c b/gcc/objc/objc-gnu-runtime-abi-01.c
index 8cfa1f8..44e7258 100644
--- a/gcc/objc/objc-gnu-runtime-abi-01.c
+++ b/gcc/objc/objc-gnu-runtime-abi-01.c
@@ -127,18 +127,18 @@ bool
 objc_gnu_runtime_abi_01_init (objc_runtime_hooks *rthooks)
 {
   /* GNU runtime does not need the compiler to change code in order to do GC. */
-  if (flag_objc_gc)
+  if (GCC_OPTION (flag_objc_gc))
     {
       warning_at (0, 0, "%<-fobjc-gc%> is ignored for %<-fgnu-runtime%>");
-      flag_objc_gc = 0;
+      GCC_OPTION (flag_objc_gc) = 0;
     }
 
   /* Although I guess we could, we don't currently support SJLJ exceptions for the
      GNU runtime.  */
-  if (flag_objc_sjlj_exceptions)
+  if (GCC_OPTION (flag_objc_sjlj_exceptions))
     {
       inform (UNKNOWN_LOCATION, "%<-fobjc-sjlj-exceptions%> is ignored for %<-fgnu-runtime%>");
-      flag_objc_sjlj_exceptions = 0;
+      GCC_OPTION (flag_objc_sjlj_exceptions) = 0;
     }
 
   /* TODO: Complain if -fobjc-abi-version=N was used.  */
@@ -660,7 +660,7 @@ build_objc_method_call (location_t loc, int super_flag, tree method_prototype,
 			tree method_params)
 {
   tree sender = (super_flag ? umsg_super_decl
-			    : (flag_objc_direct_dispatch ? umsg_fast_decl
+			    : (GCC_OPTION (flag_objc_direct_dispatch) ? umsg_fast_decl
 							 : umsg_decl));
   tree rcv_p = (super_flag ? objc_super_type : objc_object_type);
   vec<tree, va_gc> *parms;
@@ -1537,7 +1537,7 @@ build_shared_structure_initializer (tree type, tree isa, tree super,
     }
 
   /* FIXME: Remove NeXT runtime code.  */
-  if (flag_next_runtime)
+  if (GCC_OPTION (flag_next_runtime))
     {
       ltyp = build_pointer_type (xref_tag (RECORD_TYPE,
 					   get_identifier ("objc_cache")));
@@ -1569,7 +1569,7 @@ build_shared_structure_initializer (tree type, tree isa, tree super,
     }
 
   /* FIXME: Remove NeXT runtime code.  */
-  if (flag_next_runtime)
+  if (GCC_OPTION (flag_next_runtime))
     /* sel_id = NULL */
     CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, build_int_cst (NULL_TREE, 0));
 
@@ -1817,7 +1817,7 @@ build_gnu_selector_translation_table (void)
   for (chain = sel_ref_chain; chain; chain = TREE_CHAIN (chain))
     {
       tree encoding;
-      if (warn_selector)
+      if (GCC_OPTION (warn_selector))
 	{
 	  /* TODO: improve on the location for the diagnostic.  */
 	  location_t loc = input_location;
@@ -1861,7 +1861,7 @@ generate_static_references (void)
   vec<constructor_elt, va_gc> *decls = NULL;
 
   /* FIXME: Remove NeXT runtime code.  */
-  if (flag_next_runtime)
+  if (GCC_OPTION (flag_next_runtime))
     gcc_unreachable ();
 
   for (cl_chain = objc_static_instances, num_class = 0;
@@ -2078,7 +2078,7 @@ objc_generate_v1_gnu_metadata (void)
       /* If -gen-decls is present, Dump the @interface of each class.
 	 TODO: Dump the classes in the  order they were found, rather than in
 	 reverse order as we are doing now.  */
-      if (flag_gen_declaration)
+      if (GCC_OPTION (flag_gen_declaration))
 	dump_interface (gen_declaration_file, impent->imp_context);
 
       /* all of the following reference the string pool...  */
diff --git a/gcc/objc/objc-next-runtime-abi-01.c b/gcc/objc/objc-next-runtime-abi-01.c
index 1879d10..5280dfc 100644
--- a/gcc/objc/objc-next-runtime-abi-01.c
+++ b/gcc/objc/objc-next-runtime-abi-01.c
@@ -90,7 +90,7 @@ along with GCC; see the file COPYING3.  If not see
 /* The version identifies which language generation and runtime the
    module (file) was compiled for, and is recorded in the module
    descriptor.  */
-#define OBJC_VERSION			(flag_objc_abi >= 1 ? 7 : 6)
+#define OBJC_VERSION			(GCC_OPTION (flag_objc_abi) >= 1 ? 7 : 6)
 
 #define UTAG_CLASS_EXT			"_objc_class_ext"
 #define UTAG_PROPERTY_LIST		"_prop_list_t"
@@ -145,8 +145,8 @@ static tree finish_try_stmt (struct objc_try_context **);
 bool
 objc_next_runtime_abi_01_init (objc_runtime_hooks *rthooks)
 {
-  if (flag_objc_exceptions
-      && !flag_objc_sjlj_exceptions)
+  if (GCC_OPTION (flag_objc_exceptions)
+      && !GCC_OPTION (flag_objc_sjlj_exceptions))
     {
       warning_at (UNKNOWN_LOCATION, OPT_Wall,
 		"%<-fobjc-sjlj-exceptions%> is the only supported exceptions "
@@ -266,7 +266,7 @@ static void next_runtime_01_initialize (void)
      will be placed in the correct sections.  */
   next_runtime_abi_01_init_metadata_attributes ();
 
-  if (flag_objc_abi >= 1)
+  if (GCC_OPTION (flag_objc_abi) >= 1)
     objc_prop_list_ptr = build_pointer_type (xref_tag (RECORD_TYPE,
 					     get_identifier ("_prop_list_t")));
 
@@ -384,7 +384,7 @@ static void next_runtime_01_initialize (void)
   objc_setPropertyStruct_decl = NULL_TREE;
 
   build_next_objc_exception_stuff ();
-  if (flag_objc_exceptions && !flag_objc_sjlj_exceptions)
+  if (GCC_OPTION (flag_objc_exceptions) && !GCC_OPTION (flag_objc_sjlj_exceptions))
     using_eh_for_cleanups ();
   lang_hooks.eh_runtime_type = objc_eh_runtime_type;
   lang_hooks.eh_personality = objc_eh_personality;
@@ -461,7 +461,7 @@ build_v1_class_template (void)
 					 get_identifier (UTAG_PROTOCOL))));
   add_field_decl (ptype, "protocol_list", &chain);
 
-  if (flag_objc_abi >= 1)
+  if (GCC_OPTION (flag_objc_abi) >= 1)
     {
       /* const char *ivar_layout; */
       add_field_decl (const_string_type_node, "ivar_layout", &chain);
@@ -519,7 +519,7 @@ build_v1_category_template (void)
   ptype = build_pointer_type (build_pointer_type (objc_protocol_template));
   add_field_decl (ptype, "protocol_list", &chain);
 
-  if (flag_objc_abi >= 1)
+  if (GCC_OPTION (flag_objc_abi) >= 1)
     {
       add_field_decl (integer_type_node, "size", &chain);
 
@@ -557,7 +557,7 @@ build_v1_protocol_template (void)
 
   objc_protocol_template = objc_start_struct (get_identifier (UTAG_PROTOCOL));
 
-  if (flag_objc_abi >= 1)
+  if (GCC_OPTION (flag_objc_abi) >= 1)
     /* struct _objc_protocol_extension *isa; */
     ptype = build_pointer_type (xref_tag (RECORD_TYPE,
 					  get_identifier (UTAG_PROTOCOL_EXT)));
@@ -690,7 +690,7 @@ build_class_reference_decl (void)
 static tree
 next_runtime_abi_01_get_class_reference (tree ident)
 {
-  if (!flag_zero_link)
+  if (!GCC_OPTION (flag_zero_link))
     {
       tree *chain;
       tree decl;
@@ -860,11 +860,11 @@ build_objc_method_call (location_t loc, int super_flag, tree method_prototype,
 	  || TREE_CODE (ret_type) == UNION_TYPE)
       && targetm.calls.return_in_memory (ret_type, 0))
     sender = (super_flag ? umsg_super_stret_decl
-			 : flag_nil_receivers ? umsg_stret_decl
+			 : GCC_OPTION (flag_nil_receivers) ? umsg_stret_decl
 					      : umsg_nonnil_stret_decl);
   else
     sender = (super_flag ? umsg_super_decl
-			 : (flag_nil_receivers  ? (flag_objc_direct_dispatch
+			 : (GCC_OPTION (flag_nil_receivers)  ? (GCC_OPTION (flag_objc_direct_dispatch)
 							? umsg_fast_decl
 							: umsg_decl)
 						: umsg_nonnil_decl));
@@ -956,7 +956,7 @@ next_runtime_abi_01_get_category_super_ref (location_t loc ATTRIBUTE_UNUSED,
   tree super_name = CLASS_SUPER_NAME (imp->imp_template);
   tree super_class;
 
-  if (!flag_zero_link)
+  if (!GCC_OPTION (flag_zero_link))
     {
       super_class = objc_get_class_reference (super_name);
 
@@ -1625,7 +1625,7 @@ generate_v1_protocols (void)
       else
         refs_expr = convert (refs_type, null_pointer_node);
 
-      if (flag_objc_abi < 1)
+      if (GCC_OPTION (flag_objc_abi) < 1)
 	{
 	  /* Original ABI.  */
 	  initlist =
@@ -1722,7 +1722,7 @@ build_v1_category_initializer (tree type, tree cat_name, tree class_name,
     expr = convert (ltyp, null_pointer_node);
   CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, expr);
 
-  if (flag_objc_abi >= 1)
+  if (GCC_OPTION (flag_objc_abi) >= 1)
     {
       int val = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (objc_category_template));
       expr = build_int_cst (NULL_TREE, val);
@@ -1767,7 +1767,7 @@ generate_v1_category (struct imp_entry *impent)
   else
     protocol_decl = 0;
 
-  if (flag_objc_abi >= 1)
+  if (GCC_OPTION (flag_objc_abi) >= 1)
     V1_Property_decl = generate_v1_property_table (NULL_TREE, cat);
   else
     V1_Property_decl = NULL_TREE;
@@ -1936,7 +1936,7 @@ build_v1_shared_structure_initializer (tree type, tree isa, tree super,
     expr = convert (ltyp, null_pointer_node);
   CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, expr);
 
-  if (flag_objc_abi >= 1)
+  if (GCC_OPTION (flag_objc_abi) >= 1)
     {
       /* TODO: figure out the ivar_layout stuff.  */
       expr = convert (const_string_type_node, null_pointer_node);
@@ -2017,7 +2017,7 @@ generate_v1_class_structs (struct imp_entry *impent)
 
   loc = DECL_SOURCE_LOCATION (impent->class_decl);
 
-  if (flag_objc_abi >= 1)
+  if (GCC_OPTION (flag_objc_abi) >= 1)
     {
       /* ABI=1 additions.  */
       props = generate_v1_property_table (NULL_TREE, impent->imp_context);
@@ -2358,7 +2358,7 @@ objc_generate_v1_next_metadata (void)
       /* If -gen-decls is present, Dump the @interface of each class.
 	 TODO: Dump the classes in the  order they were found, rather than in
 	 reverse order as we are doing now.  */
-      if (flag_gen_declaration)
+      if (GCC_OPTION (flag_gen_declaration))
 	dump_interface (gen_declaration_file, impent->imp_context);
 
       /* all of the following reference the string pool...  */
@@ -2879,7 +2879,7 @@ build_throw_stmt (location_t loc, tree throw_expr, bool rethrown ATTRIBUTE_UNUSE
 static tree
 objc_build_exc_ptr (struct objc_try_context **cur_try_context)
 {
-  if (flag_objc_sjlj_exceptions)
+  if (GCC_OPTION (flag_objc_sjlj_exceptions))
     {
       tree var = (*cur_try_context)->caught_decl;
       if (!var)
@@ -2927,7 +2927,7 @@ finish_try_stmt (struct objc_try_context **cur_try_context)
   tree stmt;
   struct objc_try_context *c = *cur_try_context;
   /* If we're doing Darwin setjmp exceptions, build the big nasty.  */
-  if (flag_objc_sjlj_exceptions)
+  if (GCC_OPTION (flag_objc_sjlj_exceptions))
     {
       bool save = in_late_binary_op;
       in_late_binary_op = true;
diff --git a/gcc/objc/objc-next-runtime-abi-02.c b/gcc/objc/objc-next-runtime-abi-02.c
index ee43d2d..fd61d44 100644
--- a/gcc/objc/objc-next-runtime-abi-02.c
+++ b/gcc/objc/objc-next-runtime-abi-02.c
@@ -240,11 +240,11 @@ objc_next_runtime_abi_02_init (objc_runtime_hooks *rthooks)
 {
   extern_names = ggc_alloc_cleared_vec_hash (SIZEHASHTABLE);
 
-  if (flag_objc_exceptions && flag_objc_sjlj_exceptions)
+  if (GCC_OPTION (flag_objc_exceptions) && GCC_OPTION (flag_objc_sjlj_exceptions))
     {
       inform (UNKNOWN_LOCATION, "%<-fobjc-sjlj-exceptions%> is ignored for "
 				"%<-fnext-runtime%> when %<-fobjc-abi-version%> >= 2");
-      flag_objc_sjlj_exceptions = 0;
+      GCC_OPTION (flag_objc_sjlj_exceptions) = 0;
     }
 
   rthooks->initialize = next_runtime_02_initialize;
@@ -479,7 +479,7 @@ static void next_runtime_02_initialize (void)
   objc_getPropertyStruct_decl = NULL_TREE;
   objc_setPropertyStruct_decl = NULL_TREE;
 
-  gcc_assert (!flag_objc_sjlj_exceptions);
+  gcc_assert (!GCC_OPTION (flag_objc_sjlj_exceptions));
 
   /* Although we warn that fobjc-exceptions is required for exceptions
      code, we carry on and create it anyway.  */
@@ -1074,7 +1074,7 @@ objc_v2_get_class_reference (tree ident)
 static tree
 next_runtime_abi_02_get_class_reference (tree ident)
 {
-  if (!flag_zero_link)
+  if (!GCC_OPTION (flag_zero_link))
     return objc_v2_get_class_reference (ident);
   else
     {
@@ -1490,7 +1490,7 @@ next_runtime_abi_02_get_category_super_ref (location_t loc ATTRIBUTE_UNUSED,
   tree super_name = CLASS_SUPER_NAME (imp->imp_template);
   tree super_class;
 
-  if (!flag_zero_link)
+  if (!GCC_OPTION (flag_zero_link))
     {
       super_class = objc_get_class_reference (CLASS_NAME (imp->imp_template));
 
@@ -1666,7 +1666,7 @@ next_runtime_abi_02_build_objc_method_call (location_t loc,
 {
   tree ret_type, selector;
   tree message_func_decl;
-  bool check_for_nil = flag_objc_nilcheck;
+  bool check_for_nil = GCC_OPTION (flag_objc_nilcheck);
 
   ret_type = method_prototype
 	     ? TREE_VALUE (TREE_TYPE (method_prototype))
@@ -3350,7 +3350,7 @@ objc_generate_v2_next_metadata (void)
       /* If -gen-decls is present, Dump the @interface of each class.
 	 TODO: Dump the classes in the order they were found, rather
 	 than in reverse order as we are doing now.  */
-      if (flag_gen_declaration)
+      if (GCC_OPTION (flag_gen_declaration))
 	dump_interface (gen_declaration_file, impent->imp_context);
 
       /* all of the following reference the string pool...  */
diff --git a/gcc/objc/objc-runtime-shared-support.c b/gcc/objc/objc-runtime-shared-support.c
index bfdbb4d..accb05f 100644
--- a/gcc/objc/objc-runtime-shared-support.c
+++ b/gcc/objc/objc-runtime-shared-support.c
@@ -506,7 +506,7 @@ build_module_descriptor (long vers, tree attr)
 				       /* FIXME - why the conditional
 					  if the symbol is the
 					  same.  */
-				       flag_next_runtime ? "_OBJC_Module" :  "_OBJC_Module");
+				       GCC_OPTION (flag_next_runtime) ? "_OBJC_Module" :  "_OBJC_Module");
 
   /* This is the root of the metadata for defined classes and categories, it
      is referenced by the runtime and, therefore, needed.  */
@@ -626,7 +626,7 @@ build_next_selector_translation_table (void)
     {
       tree expr;
       tree decl = TREE_PURPOSE (chain);
-      if (warn_selector)
+      if (GCC_OPTION (warn_selector))
 	{
 	  location_t loc;
 	  if (decl)
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 7cc398e..9e678e2 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -1961,7 +1961,7 @@ scan_omp_parallel (gimple_stmt_iterator *gsi, omp_context *outer_ctx)
 
   /* Ignore parallel directives with empty bodies, unless there
      are copyin clauses.  */
-  if (optimize > 0
+  if (GCC_OPTION (optimize) > 0
       && empty_body_p (gimple_omp_body (stmt))
       && find_omp_clause (gimple_omp_parallel_clauses (stmt),
 			  OMP_CLAUSE_COPYIN) == NULL)
@@ -2042,7 +2042,7 @@ scan_omp_task (gimple_stmt_iterator *gsi, omp_context *outer_ctx)
   location_t loc = gimple_location (stmt);
 
   /* Ignore task directives with empty bodies.  */
-  if (optimize > 0
+  if (GCC_OPTION (optimize) > 0
       && empty_body_p (gimple_omp_body (stmt)))
     {
       gsi_replace (gsi, gimple_build_nop (), false);
@@ -2927,10 +2927,10 @@ omp_clause_aligned_alignment (tree clause)
 static int
 omp_max_vf (void)
 {
-  if (!optimize
-      || optimize_debug
-      || !flag_tree_loop_optimize
-      || (!flag_tree_loop_vectorize
+  if (!GCC_OPTION (optimize)
+      || GCC_OPTION (optimize_debug)
+      || !GCC_OPTION (flag_tree_loop_optimize)
+      || (!GCC_OPTION (flag_tree_loop_vectorize)
 	  && (global_options_set.x_flag_tree_loop_vectorize
               || global_options_set.x_flag_tree_vectorize)))
     return 1;
@@ -4387,7 +4387,7 @@ maybe_catch_exception (gimple_seq body)
   gimple g;
   tree decl;
 
-  if (!flag_exceptions)
+  if (!GCC_OPTION (flag_exceptions))
     return body;
 
   if (lang_hooks.eh_protect_cleanup_actions != NULL)
@@ -4579,7 +4579,7 @@ optimize_omp_library_calls (gimple entry_stmt)
 		|| gimple_call_num_args (call) != 0)
 	      continue;
 
-	    if (flag_exceptions && !TREE_NOTHROW (decl))
+	    if (GCC_OPTION (flag_exceptions) && !TREE_NOTHROW (decl))
 	      continue;
 
 	    if (TREE_CODE (TREE_TYPE (decl)) != FUNCTION_TYPE
@@ -4839,7 +4839,7 @@ expand_omp_taskreg (struct omp_region *region)
       /* Fix the callgraph edges for child_cfun.  Those for cfun will be
 	 fixed in a following pass.  */
       push_cfun (child_cfun);
-      if (optimize)
+      if (GCC_OPTION (optimize))
 	optimize_omp_library_calls (entry_stmt);
       rebuild_cgraph_edges ();
 
@@ -4847,7 +4847,7 @@ expand_omp_taskreg (struct omp_region *region)
 	 pass_cleanup_cfg isn't the first pass to happen with the
 	 new child, these dead EH edges might cause problems.
 	 Clean them up now.  */
-      if (flag_exceptions)
+      if (GCC_OPTION (flag_exceptions))
 	{
 	  basic_block bb;
 	  bool changed = false;
@@ -6837,10 +6837,10 @@ expand_omp_simd (struct omp_region *region, struct omp_for_data *fd)
 	}
       /* If not -fno-tree-loop-vectorize, hint that we want to vectorize
 	 the loop.  */
-      if ((flag_tree_loop_vectorize
+      if ((GCC_OPTION (flag_tree_loop_vectorize)
 	   || (!global_options_set.x_flag_tree_loop_vectorize
                && !global_options_set.x_flag_tree_vectorize))
-	  && flag_tree_loop_optimize
+	  && GCC_OPTION (flag_tree_loop_optimize)
 	  && loop->safelen > 1)
 	{
 	  loop->force_vect = true;
@@ -7947,7 +7947,7 @@ expand_omp_target (struct omp_region *region)
 	 pass_cleanup_cfg isn't the first pass to happen with the
 	 new child, these dead EH edges might cause problems.
 	 Clean them up now.  */
-      if (flag_exceptions)
+      if (GCC_OPTION (flag_exceptions))
 	{
 	  basic_block bb;
 	  bool changed = false;
@@ -8329,8 +8329,8 @@ execute_expand_omp (void)
 static bool
 gate_expand_omp (void)
 {
-  return ((flag_openmp != 0 || flag_openmp_simd != 0
-	   || flag_cilkplus != 0) && !seen_error ());
+  return ((GCC_OPTION (flag_openmp) != 0 || GCC_OPTION (flag_openmp_simd) != 0
+	   || GCC_OPTION (flag_cilkplus) != 0) && !seen_error ());
 }
 
 namespace {
@@ -10153,7 +10153,7 @@ execute_lower_omp (void)
 
   /* This pass always runs, to provide PROP_gimple_lomp.
      But there is nothing to do unless -fopenmp is given.  */
-  if (flag_openmp == 0 && flag_openmp_simd == 0 && flag_cilkplus == 0)
+  if (GCC_OPTION (flag_openmp) == 0 && GCC_OPTION (flag_openmp_simd) == 0 && GCC_OPTION (flag_cilkplus) == 0)
     return 0;
 
   all_contexts = splay_tree_new (splay_tree_compare_pointers, 0,
@@ -10272,7 +10272,7 @@ diagnose_sb_0 (gimple_stmt_iterator *gsi_p,
 #endif
 
   bool cilkplus_block = false;
-  if (flag_cilkplus)
+  if (GCC_OPTION (flag_cilkplus))
     {
       if ((branch_ctx
 	   && gimple_code (branch_ctx) == GIMPLE_OMP_FOR
@@ -10609,7 +10609,7 @@ diagnose_omp_structured_block_errors (void)
 static bool
 gate_diagnose_omp_blocks (void)
 {
-  return flag_openmp || flag_cilkplus;
+  return GCC_OPTION (flag_openmp) || GCC_OPTION (flag_cilkplus);
 }
 
 namespace {
@@ -10719,7 +10719,7 @@ simd_clone_clauses_extract (struct cgraph_node *node, tree clauses,
      be cloned have a distinctive artificial label in addition to "omp
      declare simd".  */
   bool cilk_clone
-    = (flag_cilkplus
+    = (GCC_OPTION (flag_cilkplus)
        && lookup_attribute ("cilk simd function",
 			    DECL_ATTRIBUTES (node->decl)));
 
@@ -11802,8 +11802,8 @@ public:
   {}
 
   /* opt_pass methods: */
-  bool gate () { return ((flag_openmp || flag_openmp_simd
-			  || flag_cilkplus || (in_lto_p && !flag_wpa))
+  bool gate () { return ((GCC_OPTION (flag_openmp) || GCC_OPTION (flag_openmp_simd)
+			  || GCC_OPTION (flag_cilkplus) || (GCC_OPTION (in_lto_p) && !GCC_OPTION (flag_wpa)))
 			 && (targetm.simd_clone.compute_vecsize_and_simdlen
 			     != NULL)); }
   unsigned int execute () { return ipa_omp_simd_clone (); }
diff --git a/gcc/optabs.c b/gcc/optabs.c
index cec25a4..86cc038 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -1362,7 +1362,7 @@ avoid_expensive_constant (enum machine_mode mode, optab binoptab,
   bool speed = optimize_insn_for_speed_p ();
 
   if (mode != VOIDmode
-      && optimize
+      && GCC_OPTION (optimize)
       && CONSTANT_P (x)
       && (rtx_cost (x, optab_to_code (binoptab), opn, speed)
 	  > set_src_cost (x, speed)))
@@ -3384,7 +3384,7 @@ expand_abs_nojump (enum machine_mode mode, rtx op0, rtx target,
 {
   rtx temp;
 
-  if (! flag_trapv)
+  if (! GCC_OPTION (flag_trapv))
     result_unsignedp = 1;
 
   /* First try to do it with a special abs instruction.  */
@@ -3449,7 +3449,7 @@ expand_abs (enum machine_mode mode, rtx op0, rtx target,
 {
   rtx temp, op1;
 
-  if (! flag_trapv)
+  if (! GCC_OPTION (flag_trapv))
     result_unsignedp = 1;
 
   temp = expand_abs_nojump (mode, op0, target, result_unsignedp);
@@ -4045,12 +4045,12 @@ prepare_cmp_insn (rtx x, rtx y, enum rtx_code comparison, rtx size,
 	      || methods == OPTAB_LIB_WIDEN);
 
   /* If we are optimizing, force expensive constants into a register.  */
-  if (CONSTANT_P (x) && optimize
+  if (CONSTANT_P (x) && GCC_OPTION (optimize)
       && (rtx_cost (x, COMPARE, 0, optimize_insn_for_speed_p ())
           > COSTS_N_INSNS (1)))
     x = force_reg (mode, x);
 
-  if (CONSTANT_P (y) && optimize
+  if (CONSTANT_P (y) && GCC_OPTION (optimize)
       && (rtx_cost (y, COMPARE, 1, optimize_insn_for_speed_p ())
           > COSTS_N_INSNS (1)))
     y = force_reg (mode, y);
@@ -6284,7 +6284,7 @@ init_sync_libfuncs_1 (optab tab, const char *base, int max)
 void
 init_sync_libfuncs (int max)
 {
-  if (!flag_sync_libcalls)
+  if (!GCC_OPTION (flag_sync_libcalls))
     return;
 
   init_sync_libfuncs_1 (sync_compare_and_swap_optab,
diff --git a/gcc/opts-global.c b/gcc/opts-global.c
index 111884b..612a1c0 100644
--- a/gcc/opts-global.c
+++ b/gcc/opts-global.c
@@ -321,15 +321,15 @@ handle_common_deferred_options (void)
   cl_deferred_option *opt;
   vec<cl_deferred_option> v;
 
-  if (common_deferred_options)
-    v = *((vec<cl_deferred_option> *) common_deferred_options);
+  if (GCC_OPTION (common_deferred_options))
+    v = *((vec<cl_deferred_option> *) GCC_OPTION (common_deferred_options));
   else
     v = vNULL;
 
-  if (flag_dump_all_passed)
+  if (GCC_OPTION (flag_dump_all_passed))
     enable_rtl_dump_file ();
 
-  if (flag_opt_info)
+  if (GCC_OPTION (flag_opt_info))
     opt_info_switch_p (NULL);
 
   FOR_EACH_VEC_ELT (v, i, opt)
diff --git a/gcc/opts.c b/gcc/opts.c
index fdc903f..9a8829c 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1493,9 +1493,9 @@ common_handle_option (struct gcc_options *opts,
 		{
 		  /* Handle both -fsanitize and -fno-sanitize cases.  */
 		  if (value)
-		    flag_sanitize |= spec[i].flag;
+		    GCC_OPTION (flag_sanitize) |= spec[i].flag;
 		  else
-		    flag_sanitize &= ~spec[i].flag;
+		    GCC_OPTION (flag_sanitize) &= ~spec[i].flag;
 		  found = true;
 		  break;
 		}
@@ -1512,7 +1512,7 @@ common_handle_option (struct gcc_options *opts,
 
 	/* When instrumenting the pointers, we don't want to remove
 	   the null pointer checks.  */
-	if (flag_sanitize & SANITIZE_NULL)
+	if (GCC_OPTION (flag_sanitize) & SANITIZE_NULL)
 	  opts->x_flag_delete_null_pointer_checks = 0;
 	break;
       }
diff --git a/gcc/passes.c b/gcc/passes.c
index 60fb135..f050dec 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -191,7 +191,7 @@ rest_of_decl_compilation (tree decl,
 
   /* We deferred calling assemble_alias so that we could collect
      other attributes such as visibility.  Emit the alias now.  */
-  if (!in_lto_p)
+  if (!GCC_OPTION (in_lto_p))
   {
     tree alias;
     alias = lookup_attribute ("alias", DECL_ATTRIBUTES (decl));
@@ -235,7 +235,7 @@ rest_of_decl_compilation (tree decl,
 	{
 	  /* When reading LTO unit, we also read varpool, so do not
 	     rebuild it.  */
-	  if (in_lto_p && !at_end)
+	  if (GCC_OPTION (in_lto_p) && !at_end)
 	    ;
 	  else if (finalize && TREE_CODE (decl) != FUNCTION_DECL)
 	    varpool_finalize_decl (decl);
@@ -262,7 +262,7 @@ rest_of_decl_compilation (tree decl,
     }
 
   /* Let cgraph know about the existence of variables.  */
-  if (in_lto_p && !at_end)
+  if (GCC_OPTION (in_lto_p) && !at_end)
     ;
   else if (TREE_CODE (decl) == VAR_DECL && !DECL_EXTERNAL (decl)
 	   && TREE_STATIC (decl))
@@ -296,14 +296,14 @@ finish_optimization_passes (void)
   gcc::dump_manager *dumps = m_ctxt->get_dumps ();
 
   timevar_push (TV_DUMP);
-  if (profile_arc_flag || flag_test_coverage || flag_branch_probabilities)
+  if (GCC_OPTION (profile_arc_flag) || GCC_OPTION (flag_test_coverage) || GCC_OPTION (flag_branch_probabilities))
     {
       dumps->dump_start (pass_profile_1->static_pass_number, NULL);
       end_branch_prob ();
       dumps->dump_finish (pass_profile_1->static_pass_number);
     }
 
-  if (optimize > 0)
+  if (GCC_OPTION (optimize) > 0)
     {
       dumps->dump_start (pass_profile_1->static_pass_number, NULL);
       print_combine_total_stats ();
@@ -343,7 +343,7 @@ static bool
 gate_all_early_local_passes (void)
 {
 	  /* Don't bother doing anything if the program has errors.  */
-  return (!seen_error () && !in_lto_p);
+  return (!seen_error () && !GCC_OPTION (in_lto_p));
 }
 
 namespace {
@@ -389,7 +389,7 @@ make_pass_early_local_passes (gcc::context *ctxt)
 static bool
 gate_all_early_optimizations (void)
 {
-  return (optimize >= 1
+  return (GCC_OPTION (optimize) >= 1
 	  /* Don't bother doing anything if the program has errors.  */
 	  && !seen_error ());
 }
@@ -436,7 +436,7 @@ make_pass_all_early_optimizations (gcc::context *ctxt)
 static bool
 gate_all_optimizations (void)
 {
-  return optimize >= 1 && !optimize_debug;
+  return GCC_OPTION (optimize) >= 1 && !GCC_OPTION (optimize_debug);
 }
 
 namespace {
@@ -481,7 +481,7 @@ make_pass_all_optimizations (gcc::context *ctxt)
 static bool
 gate_all_optimizations_g (void)
 {
-  return optimize >= 1 && optimize_debug;
+  return GCC_OPTION (optimize) >= 1 && GCC_OPTION (optimize_debug);
 }
 
 namespace {
@@ -526,7 +526,7 @@ gate_rest_of_compilation (void)
 {
   /* Early return if there were errors.  We can run afoul of our
      consistency checks, and there's not really much point in fixing them.  */
-  return !(rtl_dump_and_exit || flag_syntax_only || seen_error ());
+  return !(GCC_OPTION (rtl_dump_and_exit) || GCC_OPTION (flag_syntax_only) || seen_error ());
 }
 
 namespace {
@@ -835,7 +835,7 @@ passes_pass_traverse (pass_registry **p, void *data ATTRIBUTE_UNUSED)
 static void
 create_pass_tab (void)
 {
-  if (!flag_dump_passes)
+  if (!GCC_OPTION (flag_dump_passes))
     return;
 
   pass_tab.safe_grow_cleared (g->get_passes ()->passes_by_id_size + 1);
@@ -1581,7 +1581,7 @@ do_per_function (void (*callback) (void *data), void *data)
 	  {
 	    push_cfun (DECL_STRUCT_FUNCTION (node->decl));
 	    callback (data);
-	    if (!flag_wpa)
+	    if (!GCC_OPTION (flag_wpa))
 	      {
 	        free_dominance_info (CDI_DOMINATORS);
 	        free_dominance_info (CDI_POST_DOMINATORS);
@@ -1827,10 +1827,10 @@ execute_function_todo (void *data)
       cfun->last_verified &= ~TODO_verify_ssa;
     }
 
-  if (flag_tree_pta && (flags & TODO_rebuild_alias))
+  if (GCC_OPTION (flag_tree_pta) && (flags & TODO_rebuild_alias))
     compute_may_aliases ();
 
-  if (optimize && (flags & TODO_update_address_taken))
+  if (GCC_OPTION (optimize) && (flags & TODO_update_address_taken))
     execute_update_addresses_taken ();
 
   if (flags & TODO_remove_unused_locals)
@@ -2069,13 +2069,13 @@ execute_one_ipa_transform_pass (struct cgraph_node *node,
   if (pass->tv_id != TV_NONE)
     timevar_pop (pass->tv_id);
 
-  if (profile_report && cfun && (cfun->curr_properties & PROP_cfg))
+  if (GCC_OPTION (profile_report) && cfun && (cfun->curr_properties & PROP_cfg))
     check_profile_consistency (pass->static_pass_number, 0, true);
 
   /* Run post-pass cleanup and verification.  */
   execute_todo (todo_after);
   verify_interpass_invariants ();
-  if (profile_report && cfun && (cfun->curr_properties & PROP_cfg))
+  if (GCC_OPTION (profile_report) && cfun && (cfun->curr_properties & PROP_cfg))
     check_profile_consistency (pass->static_pass_number, 1, true);
 
   if (dump_file)
@@ -2177,7 +2177,7 @@ execute_one_pass (opt_pass *pass)
     {
       /* Run so passes selectively disabling themselves on a given function
 	 are not miscounted.  */
-      if (profile_report && cfun && (cfun->curr_properties & PROP_cfg))
+      if (GCC_OPTION (profile_report) && cfun && (cfun->curr_properties & PROP_cfg))
 	{
           check_profile_consistency (pass->static_pass_number, 0, false);
           check_profile_consistency (pass->static_pass_number, 1, false);
@@ -2202,7 +2202,7 @@ execute_one_pass (opt_pass *pass)
       current_pass = pass;
     }
 
-  if (!quiet_flag && !cfun)
+  if (!GCC_OPTION (quiet_flag) && !cfun)
     fprintf (stderr, " <%s>", pass->name ? pass->name : "");
 
   /* Note that the folders should only create gimple expressions.
@@ -2236,12 +2236,12 @@ execute_one_pass (opt_pass *pass)
 
   do_per_function (update_properties_after_pass, pass);
 
-  if (profile_report && cfun && (cfun->curr_properties & PROP_cfg))
+  if (GCC_OPTION (profile_report) && cfun && (cfun->curr_properties & PROP_cfg))
     check_profile_consistency (pass->static_pass_number, 0, true);
 
   /* Run post-pass cleanup and verification.  */
   execute_todo (todo_after | pass->todo_flags_finish);
-  if (profile_report && cfun && (cfun->curr_properties & PROP_cfg))
+  if (GCC_OPTION (profile_report) && cfun && (cfun->curr_properties & PROP_cfg))
     check_profile_consistency (pass->static_pass_number, 1, true);
 
   verify_interpass_invariants ();
@@ -2350,7 +2350,7 @@ ipa_write_summaries_1 (lto_symtab_encoder_t encoder)
 
   lto_push_out_decl_state (state);
 
-  gcc_assert (!flag_wpa);
+  gcc_assert (!GCC_OPTION (flag_wpa));
   ipa_write_summaries_2 (passes->all_regular_ipa_passes, state);
 
   write_lto ();
@@ -2371,7 +2371,7 @@ ipa_write_summaries (void)
   struct cgraph_node *node;
   struct cgraph_node **order;
 
-  if (!flag_generate_lto || seen_error ())
+  if (!GCC_OPTION (flag_generate_lto) || seen_error ())
     return;
 
   encoder = lto_symtab_encoder_new (false);
@@ -2484,7 +2484,7 @@ ipa_write_optimization_summaries (lto_symtab_encoder_t encoder)
 	}
     }
 
-  gcc_assert (flag_wpa);
+  gcc_assert (GCC_OPTION (flag_wpa));
   pass_manager *passes = g->get_passes ();
   ipa_write_optimization_summaries_1 (passes->all_regular_ipa_passes, state);
 
diff --git a/gcc/plugin.c b/gcc/plugin.c
index 88c1780..7deddf8 100644
--- a/gcc/plugin.c
+++ b/gcc/plugin.c
@@ -885,7 +885,7 @@ get_event_last (void)
 const char*
 default_plugin_dir_name (void)
 {
-  if (!plugindir_string)
+  if (!GCC_OPTION (plugindir_string))
     fatal_error ("-iplugindir <dir> option not passed from the gcc driver");
-  return plugindir_string;
+  return GCC_OPTION (plugindir_string);
 }
diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c
index 5555794..f2704ca 100644
--- a/gcc/postreload-gcse.c
+++ b/gcc/postreload-gcse.c
@@ -806,7 +806,7 @@ hash_scan_set (rtx insn)
 	  /* As above for STACK_REGS.  */
 	  && (REGNO (src) < FIRST_STACK_REG || REGNO (src) > LAST_STACK_REG)
 #endif
-	  && ! (flag_float_store && FLOAT_MODE_P (GET_MODE (dest)))
+	  && ! (GCC_OPTION (flag_float_store) && FLOAT_MODE_P (GET_MODE (dest)))
 	  /* Check if the memory expression is killed after insn.  */
 	  && ! load_killed_in_block_p (INSN_CUID (insn) + 1, dest, true)
 	  && oprs_unchanged_p (XEXP (dest, 0), insn, true))
@@ -1066,7 +1066,7 @@ eliminate_partially_redundant_load (basic_block bb, rtx insn,
       || (optimize_bb_for_size_p (bb) && npred_ok > 1)
       /* If we don't have profile information we cannot tell if splitting
          a critical edge is profitable or not so don't do it.  */
-      || ((! profile_info || ! flag_branch_probabilities
+      || ((! profile_info || ! GCC_OPTION (flag_branch_probabilities)
 	   || targetm.cannot_modify_jumps_p ())
 	  && critical_edge_split))
     goto cleanup;
@@ -1311,7 +1311,7 @@ gcse_after_reload_main (rtx f ATTRIBUTE_UNUSED)
 static bool
 gate_handle_gcse2 (void)
 {
-  return (optimize > 0 && flag_gcse_after_reload
+  return (GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_gcse_after_reload)
 	  && optimize_function_for_speed_p (cfun));
 }
 
diff --git a/gcc/postreload.c b/gcc/postreload.c
index 9bfffe5..520fbe2 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -68,7 +68,7 @@ reload_cse_regs (rtx first ATTRIBUTE_UNUSED)
   reload_cse_regs_1 ();
   reload_combine ();
   moves_converted = reload_cse_move2add (first);
-  if (flag_expensive_optimizations)
+  if (GCC_OPTION (flag_expensive_optimizations))
     {
       if (moves_converted)
 	reload_combine ();
@@ -2318,7 +2318,7 @@ move2add_note_store (rtx dst, const_rtx set, void *data)
 static bool
 gate_handle_postreload (void)
 {
-  return (optimize > 0 && reload_completed);
+  return (GCC_OPTION (optimize) > 0 && reload_completed);
 }
 
 
diff --git a/gcc/predict.c b/gcc/predict.c
index 249433f..cbfb9c0 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -114,7 +114,7 @@ static inline bool
 maybe_hot_frequency_p (struct function *fun, int freq)
 {
   struct cgraph_node *node = cgraph_get_node (fun->decl);
-  if (!profile_info || !flag_branch_probabilities)
+  if (!profile_info || !GCC_OPTION (flag_branch_probabilities))
     {
       if (node->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED)
         return false;
@@ -189,7 +189,7 @@ maybe_hot_bb_p (struct function *fun, const_basic_block bb)
 bool
 cgraph_maybe_hot_edge_p (struct cgraph_edge *edge)
 {
-  if (profile_info && flag_branch_probabilities
+  if (profile_info && GCC_OPTION (flag_branch_probabilities)
       && !maybe_hot_count_p (NULL,
                              edge->count))
     return false;
@@ -201,14 +201,14 @@ cgraph_maybe_hot_edge_p (struct cgraph_edge *edge)
       && (edge->callee
 	  && edge->callee->frequency <= NODE_FREQUENCY_EXECUTED_ONCE))
     return false;
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     return false;
   if (edge->caller->frequency == NODE_FREQUENCY_HOT)
     return true;
   if (edge->caller->frequency == NODE_FREQUENCY_EXECUTED_ONCE
       && edge->frequency < CGRAPH_FREQ_BASE * 3 / 2)
     return false;
-  if (flag_guess_branch_prob)
+  if (GCC_OPTION (flag_guess_branch_prob))
     {
       if (PARAM_VALUE (HOT_BB_FREQUENCY_FRACTION) == 0
 	  || edge->frequency <= (CGRAPH_FREQ_BASE
@@ -274,7 +274,7 @@ probably_never_executed (struct function *fun,
 	}
       return true;
     }
-  if ((!profile_info || !flag_branch_probabilities)
+  if ((!profile_info || !GCC_OPTION (flag_branch_probabilities))
       && (cgraph_get_node (fun->decl)->frequency
 	  == NODE_FREQUENCY_UNLIKELY_EXECUTED))
     return true;
@@ -304,7 +304,7 @@ probably_never_executed_edge_p (struct function *fun, edge e)
 bool
 cgraph_optimize_for_size_p (struct cgraph_node *node)
 {
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     return true;
   if (node && (node->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED))
     return true;
@@ -317,7 +317,7 @@ cgraph_optimize_for_size_p (struct cgraph_node *node)
 bool
 optimize_function_for_size_p (struct function *fun)
 {
-  if (optimize_size)
+  if (GCC_OPTION (optimize_size))
     return true;
   if (!fun || !fun->decl)
     return false;
@@ -563,7 +563,7 @@ static void
 predict_insn (rtx insn, enum br_predictor predictor, int probability)
 {
   gcc_assert (any_condjump_p (insn));
-  if (!flag_guess_branch_prob)
+  if (!GCC_OPTION (flag_guess_branch_prob))
     return;
 
   add_reg_note (insn, REG_BR_PRED,
@@ -613,7 +613,7 @@ gimple_predict_edge (edge e, enum br_predictor predictor, int probability)
   gcc_assert (profile_status_for_fn (cfun) != PROFILE_GUESSED);
   if ((e->src != ENTRY_BLOCK_PTR_FOR_FN (cfun) && EDGE_COUNT (e->src->succs) >
        1)
-      && flag_guess_branch_prob && optimize)
+      && GCC_OPTION (flag_guess_branch_prob) && GCC_OPTION (optimize))
     {
       struct edge_prediction *i = XNEW (struct edge_prediction);
       void **preds = pointer_map_insert (bb_predictions, e->src);
@@ -2846,7 +2846,7 @@ drop_profile (struct cgraph_node *node, gcov_type call_count)
   if (!DECL_COMDAT (node->decl) && !DECL_EXTERNAL (node->decl)
       && call_count > profile_info->runs)
     {
-      if (flag_profile_correction)
+      if (GCC_OPTION (flag_profile_correction))
         {
           if (dump_file)
             fprintf (dump_file,
@@ -2859,7 +2859,7 @@ drop_profile (struct cgraph_node *node, gcov_type call_count)
     }
 
   profile_status_for_fn (fn)
-      = (flag_guess_branch_prob ? PROFILE_GUESSED : PROFILE_ABSENT);
+      = (GCC_OPTION (flag_guess_branch_prob) ? PROFILE_GUESSED : PROFILE_ABSENT);
   node->frequency
       = hot ? NODE_FREQUENCY_HOT : NODE_FREQUENCY_NORMAL;
 }
@@ -3134,7 +3134,7 @@ compute_function_frequency (void)
 static bool
 gate_estimate_probability (void)
 {
-  return flag_guess_branch_prob;
+  return GCC_OPTION (flag_guess_branch_prob);
 }
 
 /* Build PREDICT_EXPR.  */
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index 09ac387..b77cd99 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -240,7 +240,7 @@ print_rtx (const_rtx in_rtx)
 	      {
 	      case NOTE_INSN_EH_REGION_BEG:
 	      case NOTE_INSN_EH_REGION_END:
-		if (flag_dump_unnumbered)
+		if (GCC_OPTION (flag_dump_unnumbered))
 		  fprintf (outfile, " #");
 		else
 		  fprintf (outfile, " %d", NOTE_EH_HANDLER (in_rtx));
@@ -485,7 +485,7 @@ print_rtx (const_rtx in_rtx)
 	      }
 	    else
 #endif
-	      if (flag_dump_unnumbered
+	      if (GCC_OPTION (flag_dump_unnumbered)
 		     && (is_insn || NOTE_P (in_rtx)))
 	      fputc ('#', outfile);
 	    else
@@ -533,7 +533,7 @@ print_rtx (const_rtx in_rtx)
 		if (subc == NOTE
 		    && NOTE_KIND (sub) == NOTE_INSN_DELETED_LABEL)
 		  {
-		    if (flag_dump_unnumbered)
+		    if (GCC_OPTION (flag_dump_unnumbered))
 		      fprintf (outfile, " [# deleted]");
 		    else
 		      fprintf (outfile, " [%d deleted]", INSN_UID (sub));
@@ -545,8 +545,8 @@ print_rtx (const_rtx in_rtx)
 		  goto do_e;
 	      }
 
-	    if (flag_dump_unnumbered
-		|| (flag_dump_unnumbered_links && (i == 1 || i == 2)
+	    if (GCC_OPTION (flag_dump_unnumbered)
+		|| (GCC_OPTION (flag_dump_unnumbered_links) && (i == 1 || i == 2)
 		    && (INSN_P (in_rtx) || NOTE_P (in_rtx)
 			|| LABEL_P (in_rtx) || BARRIER_P (in_rtx))))
 	      fputs (" #", outfile);
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index 91b696c..fa4d299 100644
--- a/gcc/print-tree.c
+++ b/gcc/print-tree.c
@@ -53,7 +53,7 @@ static struct bucket **table;
 void
 dump_addr (FILE *file, const char *prefix, const void *addr)
 {
-  if (flag_dump_noaddr || flag_dump_unnumbered)
+  if (GCC_OPTION (flag_dump_noaddr) || GCC_OPTION (flag_dump_unnumbered))
     fprintf (file, "%s#", prefix);
   else
     fprintf (file, "%s" HOST_PTR_PRINTF, prefix, addr);
diff --git a/gcc/profile.c b/gcc/profile.c
index 83cbc07..f2c3b43 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -447,7 +447,7 @@ read_profile_edge_counts (gcov_type *exec_counts)
 		e->count = exec_counts[exec_counts_pos++];
 		if (e->count > profile_info->sum_max)
 		  {
-		    if (flag_profile_correction)
+		    if (GCC_OPTION (flag_profile_correction))
 		      {
 			static bool informed = 0;
 			if (dump_enabled_p () && !informed)
@@ -702,7 +702,7 @@ compute_branch_probabilities (unsigned cfg_checksum, unsigned lineno_checksum)
 
   if (inconsistent)
    {
-     if (flag_profile_correction)
+     if (GCC_OPTION (flag_profile_correction))
        {
          /* Inconsistency detected. Make it flow-consistent. */
          static int informed = 0;
@@ -1293,20 +1293,20 @@ branch_prob (void)
 	}
     }
 
-  if (flag_profile_values)
+  if (GCC_OPTION (flag_profile_values))
     gimple_find_values_to_profile (&values);
 
-  if (flag_branch_probabilities)
+  if (GCC_OPTION (flag_branch_probabilities))
     {
       compute_branch_probabilities (cfg_checksum, lineno_checksum);
-      if (flag_profile_values)
+      if (GCC_OPTION (flag_profile_values))
 	compute_value_histograms (values, cfg_checksum, lineno_checksum);
     }
 
   remove_fake_edges ();
 
   /* For each edge not on the spanning tree, add counting code.  */
-  if (profile_arc_flag
+  if (GCC_OPTION (profile_arc_flag)
       && coverage_counter_alloc (GCOV_COUNTER_ARCS, num_instrumented))
     {
       unsigned n_instrumented;
@@ -1317,7 +1317,7 @@ branch_prob (void)
 
       gcc_assert (n_instrumented == num_instrumented);
 
-      if (flag_profile_values)
+      if (GCC_OPTION (flag_profile_values))
 	instrument_values (values);
 
       /* Commit changes done by instrumentation.  */
diff --git a/gcc/real.h b/gcc/real.h
index ff0c523..213dde8 100644
--- a/gcc/real.h
+++ b/gcc/real.h
@@ -198,25 +198,25 @@ extern const struct real_format *
    disabled for modes with NaNs.  The user can ask for them to be
    done anyway using the -funsafe-math-optimizations switch.  */
 #define HONOR_NANS(MODE) \
-  (MODE_HAS_NANS (MODE) && !flag_finite_math_only)
+  (MODE_HAS_NANS (MODE) && !GCC_OPTION (flag_finite_math_only))
 
 /* Like HONOR_NANs, but true if we honor signaling NaNs (or sNaNs).  */
-#define HONOR_SNANS(MODE) (flag_signaling_nans && HONOR_NANS (MODE))
+#define HONOR_SNANS(MODE) (GCC_OPTION (flag_signaling_nans) && HONOR_NANS (MODE))
 
 /* As for HONOR_NANS, but true if the mode can represent infinity and
    the treatment of infinite values is important.  */
 #define HONOR_INFINITIES(MODE) \
-  (MODE_HAS_INFINITIES (MODE) && !flag_finite_math_only)
+  (MODE_HAS_INFINITIES (MODE) && !GCC_OPTION (flag_finite_math_only))
 
 /* Like HONOR_NANS, but true if the given mode distinguishes between
    positive and negative zero, and the sign of zero is important.  */
 #define HONOR_SIGNED_ZEROS(MODE) \
-  (MODE_HAS_SIGNED_ZEROS (MODE) && flag_signed_zeros)
+  (MODE_HAS_SIGNED_ZEROS (MODE) && GCC_OPTION (flag_signed_zeros))
 
 /* Like HONOR_NANS, but true if given mode supports sign-dependent rounding,
    and the rounding mode is important.  */
 #define HONOR_SIGN_DEPENDENT_ROUNDING(MODE) \
-  (MODE_HAS_SIGN_DEPENDENT_ROUNDING (MODE) && flag_rounding_math)
+  (MODE_HAS_SIGN_DEPENDENT_ROUNDING (MODE) && GCC_OPTION (flag_rounding_math))
 
 /* Declare functions in real.c.  */
 
diff --git a/gcc/recog.c b/gcc/recog.c
index f9040dc..ec5c678 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -989,7 +989,7 @@ general_operand (rtx op, enum machine_mode mode)
   if (CONSTANT_P (op))
     return ((GET_MODE (op) == VOIDmode || GET_MODE (op) == mode
 	     || mode == VOIDmode)
-	    && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (op))
+	    && (! GCC_OPTION (flag_pic) || LEGITIMATE_PIC_OPERAND_P (op))
 	    && targetm.legitimate_constant_p (mode == VOIDmode
 					      ? GET_MODE (op)
 					      : mode, op));
@@ -1178,7 +1178,7 @@ immediate_operand (rtx op, enum machine_mode mode)
   return (CONSTANT_P (op)
 	  && (GET_MODE (op) == mode || mode == VOIDmode
 	      || GET_MODE (op) == VOIDmode)
-	  && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (op))
+	  && (! GCC_OPTION (flag_pic) || LEGITIMATE_PIC_OPERAND_P (op))
 	  && targetm.legitimate_constant_p (mode == VOIDmode
 					    ? GET_MODE (op)
 					    : mode, op));
@@ -1828,7 +1828,7 @@ asm_operand_ok (rtx op, const char *constraint, const char **constraints)
 	  /* Fall through.  */
 
 	case 'i':
-	  if (CONSTANT_P (op) && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (op)))
+	  if (CONSTANT_P (op) && (! GCC_OPTION (flag_pic) || LEGITIMATE_PIC_OPERAND_P (op)))
 	    result = 1;
 	  break;
 
@@ -3852,7 +3852,7 @@ if_test_bypass_p (rtx out_insn, rtx in_insn)
 static bool
 gate_handle_peephole2 (void)
 {
-  return (optimize > 0 && flag_peephole2);
+  return (GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_peephole2));
 }
 
 static unsigned int
@@ -3957,7 +3957,7 @@ rest_of_handle_split_after_reload (void)
 {
   /* If optimizing, then go ahead and split insns now.  */
 #ifndef STACK_REGS
-  if (optimize > 0)
+  if (GCC_OPTION (optimize) > 0)
 #endif
     split_all_insns ();
   return 0;
@@ -4009,9 +4009,9 @@ gate_handle_split_before_regstack (void)
      split until final which doesn't allow splitting
      if HAVE_ATTR_length.  */
 # ifdef INSN_SCHEDULING
-  return (optimize && !flag_schedule_insns_after_reload);
+  return (GCC_OPTION (optimize) && !GCC_OPTION (flag_schedule_insns_after_reload));
 # else
-  return (optimize);
+  return (GCC_OPTION (optimize));
 # endif
 #else
   return 0;
@@ -4069,7 +4069,7 @@ static bool
 gate_handle_split_before_sched2 (void)
 {
 #ifdef INSN_SCHEDULING
-  return optimize > 0 && flag_schedule_insns_after_reload;
+  return GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_schedule_insns_after_reload);
 #else
   return 0;
 #endif
diff --git a/gcc/ree.c b/gcc/ree.c
index fcde9a0..49dbc79 100644
--- a/gcc/ree.c
+++ b/gcc/ree.c
@@ -1098,7 +1098,7 @@ rest_of_handle_ree (void)
 static bool
 gate_handle_ree (void)
 {
-  return (optimize > 0 && flag_ree);
+  return (GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_ree));
 }
 
 namespace {
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index a92830b..7fed2af 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -435,7 +435,7 @@ get_true_reg (rtx *pat)
 	return pat;
 
       case FLOAT_TRUNCATE:
-	if (!flag_unsafe_math_optimizations)
+	if (!GCC_OPTION (flag_unsafe_math_optimizations))
 	  return pat;
 	pat = & XEXP (*pat, 0);
 	break;
@@ -3260,8 +3260,8 @@ reg_to_stack (void)
      the PIC register hasn't been set up.  In that case, fall back
      on zero, which we can get from `fldz'.  */
 
-  if ((flag_pic && !TARGET_64BIT)
-      || ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
+  if ((GCC_OPTION (flag_pic) && !TARGET_64BIT)
+      || GCC_OPTION (ix86_cmodel) == CM_LARGE || GCC_OPTION (ix86_cmodel) == CM_LARGE_PIC)
     not_a_num = CONST0_RTX (SFmode);
   else
     {
diff --git a/gcc/regcprop.c b/gcc/regcprop.c
index 101de76..a7d621d 100644
--- a/gcc/regcprop.c
+++ b/gcc/regcprop.c
@@ -1250,7 +1250,7 @@ validate_value_data (struct value_data *vd)
 static bool
 gate_handle_cprop (void)
 {
-  return (optimize > 0 && (flag_cprop_registers));
+  return (GCC_OPTION (optimize) > 0 && (GCC_OPTION (flag_cprop_registers)));
 }
 
 
diff --git a/gcc/regrename.c b/gcc/regrename.c
index 6517f4e..30d990c 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -1839,7 +1839,7 @@ regrename_optimize (void)
 static bool
 gate_handle_regrename (void)
 {
-  return (optimize > 0 && (flag_rename_registers));
+  return (GCC_OPTION (optimize) > 0 && (GCC_OPTION (flag_rename_registers)));
 }
 
 namespace {
diff --git a/gcc/regs.h b/gcc/regs.h
index 006caca..1171ca5 100644
--- a/gcc/regs.h
+++ b/gcc/regs.h
@@ -135,8 +135,8 @@ extern size_t reg_info_p_size;
    or profile driven feedback is available and the function is never executed,
    frequency is always equivalent.  Otherwise rescale the basic block
    frequency.  */
-#define REG_FREQ_FROM_BB(bb) (optimize_size				      \
-			      || (flag_branch_probabilities		      \
+#define REG_FREQ_FROM_BB(bb) (GCC_OPTION (optimize_size)				      \
+			      || (GCC_OPTION (flag_branch_probabilities)		      \
 				  && !ENTRY_BLOCK_PTR_FOR_FN (cfun)->count)   \
 			      ? REG_FREQ_MAX				      \
 			      : ((bb)->frequency * REG_FREQ_MAX / BB_FREQ_MAX)\
diff --git a/gcc/reload.c b/gcc/reload.c
index 851daf3..ae53db5 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -3444,7 +3444,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
 		      break;
 		  case 'i':
 		    if (CONSTANT_P (operand)
-			&& (! flag_pic || LEGITIMATE_PIC_OPERAND_P (operand)))
+			&& (! GCC_OPTION (flag_pic) || LEGITIMATE_PIC_OPERAND_P (operand)))
 		      win = 1;
 		    break;
 
@@ -3479,7 +3479,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
 			/* A SCRATCH is not a valid operand.  */
 			&& GET_CODE (operand) != SCRATCH
 			&& (! CONSTANT_P (operand)
-			    || ! flag_pic
+			    || ! GCC_OPTION (flag_pic)
 			    || LEGITIMATE_PIC_OPERAND_P (operand))
 			&& (GENERAL_REGS == ALL_REGS
 			    || !REG_P (operand)
@@ -4146,7 +4146,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
     else if (goal_alternative_matched[i] < 0
 	     && goal_alternative_matches[i] < 0
 	     && address_operand_reloaded[i] != 1
-	     && optimize)
+	     && GCC_OPTION (optimize))
       {
 	/* For each non-matching operand that's a MEM or a pseudo-register
 	   that didn't get a hard register, make an optional reload.
@@ -4224,7 +4224,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
 	     && modified[i] == RELOAD_READ
 	     && modified[goal_alternative_matches[i]] == RELOAD_WRITE
 	     && ! no_input_reloads && ! no_output_reloads
-	     && optimize)
+	     && GCC_OPTION (optimize))
       {
 	/* Similarly, make an optional reload for a pair of matching
 	   objects that are in MEM or a pseudo that didn't get a hard reg.  */
@@ -6749,7 +6749,7 @@ find_equiv_reg (rtx goal, rtx insn, enum reg_class rclass, int other,
       enum rtx_code code = GET_CODE (XEXP (goal, 0));
       if (MEM_VOLATILE_P (goal))
 	return 0;
-      if (flag_float_store && SCALAR_FLOAT_MODE_P (GET_MODE (goal)))
+      if (GCC_OPTION (flag_float_store) && SCALAR_FLOAT_MODE_P (GET_MODE (goal)))
 	return 0;
       /* An address with side effects must be reexecuted.  */
       switch (code)
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 3d735ee..6f98f26 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -607,7 +607,7 @@ has_nonexceptional_receiver (void)
   basic_block *tos, *worklist, bb;
 
   /* If we're not optimizing, then just err on the safe side.  */
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     return true;
 
   /* First determine which blocks can reach exit via normal paths.  */
@@ -1239,7 +1239,7 @@ reload (rtx first, int global)
 
   /* If we are doing generic stack checking, give a warning if this
      function's frame size is larger than we expect.  */
-  if (flag_stack_check == GENERIC_STACK_CHECK)
+  if (GCC_OPTION (flag_stack_check) == GENERIC_STACK_CHECK)
     {
       HOST_WIDE_INT size = get_frame_size () + STACK_CHECK_FIXED_FRAME_SIZE;
       static int verbose_warned = 0;
@@ -1509,7 +1509,7 @@ calculate_needs_all_insns (int global)
 	     We only do this when expensive_optimizations is enabled,
 	     since this complements reload inheritance / output
 	     reload deletion, and it can make debugging harder.  */
-	  if (flag_expensive_optimizations && n_reloads > 1)
+	  if (GCC_OPTION (flag_expensive_optimizations) && n_reloads > 1)
 	    {
 	      rtx set = single_set (insn);
 	      if (set
@@ -4176,7 +4176,7 @@ init_eliminable_invariants (rtx first, bool do_subregs)
 
 	  /* If flag_pic and we have constant, verify it's legitimate.  */
 	  if (!CONSTANT_P (x)
-	      || !flag_pic || LEGITIMATE_PIC_OPERAND_P (x))
+	      || !GCC_OPTION (flag_pic) || LEGITIMATE_PIC_OPERAND_P (x))
 	    {
 	      /* It can happen that a REG_EQUIV note contains a MEM
 		 that is not a legitimate memory operand.  As later
@@ -6476,7 +6476,7 @@ choose_reload_regs (struct insn_chain *chain)
      with fp on the 68k: fp numbers (not NaNs) fail to be equal to themselves
      because one side of the comparison might be inherited.  */
   win = 0;
-  for (inheritance = optimize > 0; inheritance >= 0; inheritance--)
+  for (inheritance = GCC_OPTION (optimize) > 0; inheritance >= 0; inheritance--)
     {
       choose_reload_regs_init (chain, save_reload_reg_rtx);
 
@@ -7010,7 +7010,7 @@ choose_reload_regs (struct insn_chain *chain)
   /* If doing expensive optimizations, do one preliminary pass that doesn't
      cancel any inheritance, but removes reloads that have been needed only
      for reloads that we know can be inherited.  */
-  for (pass = flag_expensive_optimizations; pass >= 0; pass--)
+  for (pass = GCC_OPTION (flag_expensive_optimizations); pass >= 0; pass--)
     {
       for (j = 0; j < n_reloads; j++)
 	{
@@ -7262,7 +7262,7 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
      with an output-reload, see if we can prove there was
      actually no need to store the old value in it.  */
 
-  if (optimize && REG_P (oldequiv)
+  if (GCC_OPTION (optimize) && REG_P (oldequiv)
       && REGNO (oldequiv) < FIRST_PSEUDO_REGISTER
       && spill_reg_store[REGNO (oldequiv)]
       && REG_P (old)
@@ -7339,7 +7339,7 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
      insn, see if we can get rid of that pseudo-register entirely
      by redirecting the previous insn into our reload register.  */
 
-  else if (optimize && REG_P (old)
+  else if (GCC_OPTION (optimize) && REG_P (old)
 	   && REGNO (old) >= FIRST_PSEUDO_REGISTER
 	   && dead_or_set_p (insn, old)
 	   /* This is unsafe if some other reload
@@ -7798,7 +7798,7 @@ emit_output_reload_insns (struct insn_chain *chain, struct reload *rl,
 
       /* Don't output the last reload if OLD is not the dest of
 	 INSN and is in the src and is clobbered by INSN.  */
-      if (! flag_expensive_optimizations
+      if (! GCC_OPTION (flag_expensive_optimizations)
 	  || !REG_P (old)
 	  || !(set = single_set (insn))
 	  || rtx_equal_p (old, SET_DEST (set))
@@ -7957,7 +7957,7 @@ do_input_reload (struct insn_chain *chain, struct reload *rl, int j)
   /* When inheriting a wider reload, we have a MEM in rl->in,
      e.g. inheriting a SImode output reload for
      (mem:HI (plus:SI (reg:SI 14 fp) (const_int 10)))  */
-  if (optimize && reload_inherited[j] && rl->in
+  if (GCC_OPTION (optimize) && reload_inherited[j] && rl->in
       && MEM_P (rl->in)
       && MEM_P (rl->in_reg)
       && reload_spill_index[j] >= 0
@@ -7968,7 +7968,7 @@ do_input_reload (struct insn_chain *chain, struct reload *rl, int j)
      output-reload, see if we can prove there was
      actually no need to store the old value in it.  */
 
-  if (optimize
+  if (GCC_OPTION (optimize)
       && (reload_inherited[j] || reload_override_in[j])
       && reg_rtx
       && REG_P (reg_rtx)
@@ -8026,7 +8026,7 @@ do_output_reload (struct insn_chain *chain, struct reload *rl, int j)
   reload_reg_rtx_for_output[j] = reg_rtx;
 
   if (pseudo
-      && optimize
+      && GCC_OPTION (optimize)
       && REG_P (pseudo)
       && ! rtx_equal_p (rl->in_reg, pseudo)
       && REGNO (pseudo) >= FIRST_PSEUDO_REGISTER
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 054304a..bb3a61a 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -2719,7 +2719,7 @@ fill_slots_from_thread (rtx insn, rtx condition, rtx thread,
       if ((GET_CODE (src) == PLUS || GET_CODE (src) == MINUS)
 	  && rtx_equal_p (XEXP (src, 0), dest)
 	  && (!FLOAT_MODE_P (GET_MODE (src))
-	      || flag_unsafe_math_optimizations)
+	      || GCC_OPTION (flag_unsafe_math_optimizations))
 	  && ! reg_overlap_mentioned_p (dest, XEXP (src, 1))
 	  && ! side_effects_p (pat))
 	{
@@ -3868,7 +3868,7 @@ gate_handle_delay_slots (void)
 {
 #ifdef DELAY_SLOTS
   /* At -O0 dataflow info isn't updated after RA.  */
-  return optimize > 0 && flag_delayed_branch && !crtl->dbr_scheduled_p;
+  return GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_delayed_branch) && !crtl->dbr_scheduled_p;
 #else
   return 0;
 #endif
diff --git a/gcc/rtl.h b/gcc/rtl.h
index f1cda4c..f8560f0 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -457,7 +457,7 @@ struct GTY((variable_size)) rtvec_def {
 #define NONDEBUG_INSN_P(X) (INSN_P (X) && !DEBUG_INSN_P (X))
 
 /* Nonzero if DEBUG_INSN_P may possibly hold.  */
-#define MAY_HAVE_DEBUG_INSNS (flag_var_tracking_assignments)
+#define MAY_HAVE_DEBUG_INSNS (GCC_OPTION (flag_var_tracking_assignments))
 
 /* Predicate yielding nonzero iff X is a real insn.  */
 #define INSN_P(X) \
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 7a9efec..632f858 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -2376,7 +2376,7 @@ may_trap_p_1 (const_rtx x, unsigned flags)
       /* Memory ref can trap unless it's a static var or a stack slot.  */
     case MEM:
       /* Recognize specific pattern of stack checking probes.  */
-      if (flag_stack_check
+      if (GCC_OPTION (flag_stack_check)
 	  && MEM_VOLATILE_P (x)
 	  && XEXP (x, 0) == stack_pointer_rtx)
 	return 1;
@@ -2401,7 +2401,7 @@ may_trap_p_1 (const_rtx x, unsigned flags)
       if (HONOR_SNANS (GET_MODE (x)))
 	return 1;
       if (SCALAR_FLOAT_MODE_P (GET_MODE (x)))
-	return flag_trapping_math;
+	return GCC_OPTION (flag_trapping_math);
       if (!CONSTANT_P (XEXP (x, 1)) || (XEXP (x, 1) == const0_rtx))
 	return 1;
       break;
@@ -2418,7 +2418,7 @@ may_trap_p_1 (const_rtx x, unsigned flags)
     case LTGT:
     case COMPARE:
       /* Some floating point comparisons may trap.  */
-      if (!flag_trapping_math)
+      if (!GCC_OPTION (flag_trapping_math))
 	break;
       /* ??? There is no machine independent way to check for tests that trap
 	 when COMPARE is used, though many targets do make this distinction.
@@ -2445,7 +2445,7 @@ may_trap_p_1 (const_rtx x, unsigned flags)
 
     case FIX:
       /* Conversion of floating point might trap.  */
-      if (flag_trapping_math && HONOR_NANS (GET_MODE (XEXP (x, 0))))
+      if (GCC_OPTION (flag_trapping_math) && HONOR_NANS (GET_MODE (XEXP (x, 0))))
 	return 1;
       break;
 
@@ -2457,7 +2457,7 @@ may_trap_p_1 (const_rtx x, unsigned flags)
 
     default:
       /* Any floating arithmetic may trap.  */
-      if (SCALAR_FLOAT_MODE_P (GET_MODE (x)) && flag_trapping_math)
+      if (SCALAR_FLOAT_MODE_P (GET_MODE (x)) && GCC_OPTION (flag_trapping_math))
 	return 1;
     }
 
diff --git a/gcc/sched-ebb.c b/gcc/sched-ebb.c
index ce17214..c5eb95d 100644
--- a/gcc/sched-ebb.c
+++ b/gcc/sched-ebb.c
@@ -410,7 +410,7 @@ add_deps_for_risky_insns (rtx head, rtx tail)
 	  switch (classification)
 	    {
 	    case PFREE_CANDIDATE:
-	      if (flag_schedule_speculative_load)
+	      if (GCC_OPTION (flag_schedule_speculative_load))
 		{
 		  bb = earliest_block_with_similiar_load (last_block, insn);
 		  if (bb)
@@ -628,7 +628,7 @@ schedule_ebbs (void)
   if (n_basic_blocks_for_fn (cfun) == NUM_FIXED_BLOCKS)
     return;
 
-  if (profile_info && flag_branch_probabilities)
+  if (profile_info && GCC_OPTION (flag_branch_probabilities))
     probability_cutoff = PARAM_VALUE (TRACER_MIN_BRANCH_PROBABILITY_FEEDBACK);
   else
     probability_cutoff = PARAM_VALUE (TRACER_MIN_BRANCH_PROBABILITY);
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index dc6fa16..d41cb95 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -476,7 +476,7 @@ find_single_block_region (bool ebbs_p)
 
   if (ebbs_p) {
     int probability_cutoff;
-    if (profile_info && flag_branch_probabilities)
+    if (profile_info && GCC_OPTION (flag_branch_probabilities))
       probability_cutoff = PARAM_VALUE (TRACER_MIN_BRANCH_PROBABILITY_FEEDBACK);
     else
       probability_cutoff = PARAM_VALUE (TRACER_MIN_BRANCH_PROBABILITY);
@@ -1083,7 +1083,7 @@ haifa_find_rgns (void)
 static void
 find_rgns (void)
 {
-  if (sel_sched_p () && flag_sel_sched_pipelining)
+  if (sel_sched_p () && GCC_OPTION (flag_sel_sched_pipelining))
     sel_find_rgns ();
   else
     haifa_find_rgns ();
@@ -1539,7 +1539,7 @@ compute_trg_info (int trg)
 	{
 	  split_edges (i, trg, &el);
 	  sp->is_speculative = (el.nr_members) ? 1 : 0;
-	  if (sp->is_speculative && !flag_schedule_speculative)
+	  if (sp->is_speculative && !GCC_OPTION (flag_schedule_speculative))
 	    sp->is_valid = 0;
 	}
 
@@ -2044,7 +2044,7 @@ is_exception_free (rtx insn, int bb_src, int bb_trg)
     }
 
   /* Handle loads.  */
-  if (!flag_schedule_speculative_load)
+  if (!GCC_OPTION (flag_schedule_speculative_load))
     return 0;
   IS_LOAD_INSN (insn) = 1;
   switch (insn_class)
@@ -2058,14 +2058,14 @@ is_exception_free (rtx insn, int bb_src, int bb_trg)
 	return 1;
       /* Don't 'break' here: PFREE-candidate is also PRISKY-candidate.  */
     case PRISKY_CANDIDATE:
-      if (!flag_schedule_speculative_load_dangerous
+      if (!GCC_OPTION (flag_schedule_speculative_load_dangerous)
 	  || is_prisky (insn, bb_src, bb_trg))
 	return 0;
       break;
     default:;
     }
 
-  return flag_schedule_speculative_load_dangerous;
+  return GCC_OPTION (flag_schedule_speculative_load_dangerous);
 }
 
 /* The number of insns from the current block scheduled so far.  */
@@ -3067,7 +3067,7 @@ schedule_region (int rgn)
 
       target_bb = bb;
 
-      gcc_assert (flag_schedule_interblock || current_nr_blocks == 1);
+      gcc_assert (GCC_OPTION (flag_schedule_interblock) || current_nr_blocks == 1);
       current_sched_info->queue_must_finish_empty = current_nr_blocks == 1;
 
       curr_bb = first_bb;
@@ -3138,7 +3138,7 @@ sched_rgn_init (bool single_blocks_p)
   /* Compute regions for scheduling.  */
   if (single_blocks_p
       || n_basic_blocks_for_fn (cfun) == NUM_FIXED_BLOCKS + 1
-      || !flag_schedule_interblock
+      || !GCC_OPTION (flag_schedule_interblock)
       || is_cfg_nonregular ())
     {
       find_single_block_region (sel_sched_p ());
@@ -3182,7 +3182,7 @@ sched_rgn_finish (void)
   if (sched_verbose)
     {
       if (reload_completed == 0
-	  && flag_schedule_interblock)
+	  && GCC_OPTION (flag_schedule_interblock))
 	{
 	  fprintf (sched_dump,
 		   "\n;; Procedure interblock/speculative motions == %d/%d \n",
@@ -3595,7 +3595,7 @@ static bool
 gate_handle_live_range_shrinkage (void)
 {
 #ifdef INSN_SCHEDULING
-  return flag_live_range_shrinkage;
+  return GCC_OPTION (flag_live_range_shrinkage);
 #else
   return 0;
 #endif
@@ -3609,10 +3609,10 @@ rest_of_handle_live_range_shrinkage (void)
   int saved;
 
   initialize_live_range_shrinkage ();
-  saved = flag_schedule_interblock;
-  flag_schedule_interblock = false;
+  saved = GCC_OPTION (flag_schedule_interblock);
+  GCC_OPTION (flag_schedule_interblock) = false;
   schedule_insns ();
-  flag_schedule_interblock = saved;
+  GCC_OPTION (flag_schedule_interblock) = saved;
   finish_live_range_shrinkage ();
 #endif
   return 0;
@@ -3622,7 +3622,7 @@ static bool
 gate_handle_sched (void)
 {
 #ifdef INSN_SCHEDULING
-  return optimize > 0 && flag_schedule_insns && dbg_cnt (sched_func);
+  return GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_schedule_insns) && dbg_cnt (sched_func);
 #else
   return 0;
 #endif
@@ -3633,7 +3633,7 @@ static unsigned int
 rest_of_handle_sched (void)
 {
 #ifdef INSN_SCHEDULING
-  if (flag_selective_scheduling
+  if (GCC_OPTION (flag_selective_scheduling)
       && ! maybe_skip_selective_scheduling ())
     run_selective_scheduling ();
   else
@@ -3646,7 +3646,7 @@ static bool
 gate_handle_sched2 (void)
 {
 #ifdef INSN_SCHEDULING
-  return optimize > 0 && flag_schedule_insns_after_reload
+  return GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_schedule_insns_after_reload)
     && !targetm.delay_sched2 && dbg_cnt (sched2_func);
 #else
   return 0;
@@ -3658,14 +3658,14 @@ static unsigned int
 rest_of_handle_sched2 (void)
 {
 #ifdef INSN_SCHEDULING
-  if (flag_selective_scheduling2
+  if (GCC_OPTION (flag_selective_scheduling2)
       && ! maybe_skip_selective_scheduling ())
     run_selective_scheduling ();
   else
     {
       /* Do control and data sched analysis again,
 	 and write some more of the results to dump file.  */
-      if (flag_sched2_use_superblocks)
+      if (GCC_OPTION (flag_sched2_use_superblocks))
 	schedule_ebbs ();
       else
 	schedule_insns ();
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index b07824b..4866bda 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -1482,7 +1482,7 @@ sdbout_begin_block (unsigned int line, unsigned int n)
     }
   /* If -g1, suppress all the internal symbols of functions
      except for arguments.  */
-  if (debug_info_level != DINFO_LEVEL_TERSE)
+  if (GCC_OPTION (debug_info_level) != DINFO_LEVEL_TERSE)
     {
       do_block = n;
       sdbout_block (DECL_INITIAL (decl));
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index f5a4ee0..ec6cbbd 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -608,7 +608,7 @@ init_fences (insn_t old_fence)
       if (first)
         first = false;
       else
-        gcc_assert (flag_sel_sched_pipelining_outer_loops);
+        gcc_assert (GCC_OPTION (flag_sel_sched_pipelining_outer_loops));
 
       flist_add (&fences, succ,
 		 state_create (),
@@ -4031,7 +4031,7 @@ get_seqno_for_a_jump (insn_t insn)
           succ_iterator si;
           bool first = true;
 
-	  gcc_assert (flag_sel_sched_pipelining_outer_loops
+	  gcc_assert (GCC_OPTION (flag_sel_sched_pipelining_outer_loops)
 		      && current_loop_nest);
           FOR_EACH_SUCC_1 (succ, si, insn,
                            SUCCS_NORMAL | SUCCS_SKIP_TO_LOOP_EXITS)
@@ -4789,7 +4789,7 @@ cfg_preds_1 (basic_block bb, insn_t **preds, int *n, int *size)
 
       if (!in_current_region_p (pred_bb))
 	{
-	  gcc_assert (flag_sel_sched_pipelining_outer_loops
+	  gcc_assert (GCC_OPTION (flag_sel_sched_pipelining_outer_loops)
 		      && current_loop_nest);
 	  continue;
 	}
@@ -4806,7 +4806,7 @@ cfg_preds_1 (basic_block bb, insn_t **preds, int *n, int *size)
     }
 
   gcc_assert (*n != 0
-	      || (flag_sel_sched_pipelining_outer_loops
+	      || (GCC_OPTION (flag_sel_sched_pipelining_outer_loops)
 		  && current_loop_nest));
 }
 
@@ -5046,7 +5046,7 @@ find_place_to_insert_bb (basic_block bb, int rgn)
 
   /* Recompute the top order -- needed when we have > 1 pred
      and in case we don't have preds outside.  */
-  if (flag_sel_sched_pipelining_outer_loops
+  if (GCC_OPTION (flag_sel_sched_pipelining_outer_loops)
       && (has_preds_outside_rgn || EDGE_COUNT (bb->preds) > 1))
     {
       int i, bbi = bb->index, cur_bbi;
@@ -5337,7 +5337,7 @@ sel_create_basic_block (void *headp, void *endp, basic_block after)
   basic_block new_bb;
   insn_t new_bb_note;
 
-  gcc_assert (flag_sel_sched_pipelining_outer_loops
+  gcc_assert (GCC_OPTION (flag_sel_sched_pipelining_outer_loops)
               || !last_added_blocks.exists ());
 
   new_bb_note = get_bb_note_from_pool ();
@@ -5473,7 +5473,7 @@ sel_split_edge (edge e)
   prev_max_uid = get_max_uid ();
   new_bb = split_edge (e);
 
-  if (flag_sel_sched_pipelining_outer_loops
+  if (GCC_OPTION (flag_sel_sched_pipelining_outer_loops)
       && current_loop_nest)
     {
       int i;
@@ -6233,7 +6233,7 @@ sel_find_rgns (void)
     {
       loop_p loop;
 
-      FOR_EACH_LOOP (loop, (flag_sel_sched_pipelining_outer_loops
+      FOR_EACH_LOOP (loop, (GCC_OPTION (flag_sel_sched_pipelining_outer_loops)
 			    ? LI_FROM_INNERMOST
 			    : LI_ONLY_INNERMOST))
 	make_regions_from_loop_nest (loop);
diff --git a/gcc/sel-sched-ir.h b/gcc/sel-sched-ir.h
index f63d571..098c6ca 100644
--- a/gcc/sel-sched-ir.h
+++ b/gcc/sel-sched-ir.h
@@ -1269,7 +1269,7 @@ _succ_iter_cond (succ_iterator *ip, rtx *succp, rtx insn,
 
               /* Consider bb as a possible loop header.  */
               if ((ip->flags & SUCCS_SKIP_TO_LOOP_EXITS)
-                  && flag_sel_sched_pipelining_outer_loops
+                  && GCC_OPTION (flag_sel_sched_pipelining_outer_loops)
 		  && (!in_current_region_p (bb)
 		      || BLOCK_TO_BB (ip->bb->index)
 			 < BLOCK_TO_BB (bb->index)))
@@ -1414,7 +1414,7 @@ _eligible_successor_edge_p (edge e1, succ_iterator *ip)
         {
           /* We are skipping to loop exits here.  */
           gcc_assert (!src_outside_rgn
-                      || flag_sel_sched_pipelining_outer_loops);
+                      || GCC_OPTION (flag_sel_sched_pipelining_outer_loops));
           return !!(flags & SUCCS_NORMAL);
         }
 
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index 241bdad..4486386 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -6889,7 +6889,7 @@ sel_setup_region_sched_flags (void)
   enable_schedule_as_rhs_p = 1;
   bookkeeping_p = 1;
   pipelining_p = (bookkeeping_p
-                  && (flag_sel_sched_pipelining != 0)
+                  && (GCC_OPTION (flag_sel_sched_pipelining) != 0)
 		  && current_loop_nest != NULL
 		  && loop_has_exit_edges (current_loop_nest));
   max_insns_to_rename = PARAM_VALUE (PARAM_SELSCHED_INSNS_TO_RENAME);
@@ -6965,7 +6965,7 @@ sel_region_init (int rgn)
 
   sel_init_bbs (bbs);
 
-  if (flag_sel_sched_pipelining)
+  if (GCC_OPTION (flag_sel_sched_pipelining))
     setup_current_loop_nest (rgn, &bbs);
 
   sel_setup_region_sched_flags ();
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 04af01e..bfc5773 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -1127,7 +1127,7 @@ simplify_unary_operation_1 (enum rtx_code code, enum machine_mode mode, rtx op)
          (float_truncate:DF (float_extend:XF foo:SF))
          = (float_extend:SF foo:DF).  */
       if ((GET_CODE (op) == FLOAT_TRUNCATE
-	   && flag_unsafe_math_optimizations)
+	   && GCC_OPTION (flag_unsafe_math_optimizations))
 	  || GET_CODE (op) == FLOAT_EXTEND)
 	return simplify_gen_unary (GET_MODE_SIZE (GET_MODE (XEXP (op,
 							    0)))
@@ -1138,7 +1138,7 @@ simplify_unary_operation_1 (enum rtx_code code, enum machine_mode mode, rtx op)
 
       /*  (float_truncate (float x)) is (float x)  */
       if (GET_CODE (op) == FLOAT
-	  && (flag_unsafe_math_optimizations
+	  && (GCC_OPTION (flag_unsafe_math_optimizations)
 	      || (SCALAR_FLOAT_MODE_P (GET_MODE (op))
 		  && ((unsigned)significand_size (GET_MODE (op))
 		      >= (GET_MODE_PRECISION (GET_MODE (XEXP (op, 0)))
@@ -2374,7 +2374,7 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode,
       /* Reassociate floating point addition only when the user
 	 specifies associative math operations.  */
       if (FLOAT_MODE_P (mode)
-	  && flag_associative_math)
+	  && GCC_OPTION (flag_associative_math))
 	{
 	  tem = simplify_associative_operation (code, mode, op0, op1);
 	  if (tem)
@@ -2704,7 +2704,7 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode,
       /* Reassociate multiplication, but for floating point MULTs
 	 only when the user specifies unsafe math optimizations.  */
       if (! FLOAT_MODE_P (mode)
-	  || flag_unsafe_math_optimizations)
+	  || GCC_OPTION (flag_unsafe_math_optimizations))
 	{
 	  tem = simplify_associative_operation (code, mode, op0, op1);
 	  if (tem)
@@ -3249,7 +3249,7 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode,
 
 	      /* Change FP division by a constant into multiplication.
 		 Only do this with -freciprocal-math.  */
-	      if (flag_reciprocal_math
+	      if (GCC_OPTION (flag_reciprocal_math)
 		  && !REAL_VALUES_EQUAL (d, dconst0))
 		{
 		  REAL_ARITHMETIC (d, RDIV_EXPR, dconst1, d);
@@ -3896,11 +3896,11 @@ simplify_const_binary_operation (enum rtx_code code, enum machine_mode mode,
 
 	  if (code == DIV
 	      && REAL_VALUES_EQUAL (f1, dconst0)
-	      && (flag_trapping_math || ! MODE_HAS_INFINITIES (mode)))
+	      && (GCC_OPTION (flag_trapping_math) || ! MODE_HAS_INFINITIES (mode)))
 	    return 0;
 
 	  if (MODE_HAS_INFINITIES (mode) && HONOR_NANS (mode)
-	      && flag_trapping_math
+	      && GCC_OPTION (flag_trapping_math)
 	      && REAL_VALUE_ISINF (f0) && REAL_VALUE_ISINF (f1))
 	    {
 	      int s0 = REAL_VALUE_NEGATIVE (f0);
@@ -3927,7 +3927,7 @@ simplify_const_binary_operation (enum rtx_code code, enum machine_mode mode,
 	    }
 
 	  if (code == MULT && MODE_HAS_INFINITIES (mode) && HONOR_NANS (mode)
-	      && flag_trapping_math
+	      && GCC_OPTION (flag_trapping_math)
 	      && ((REAL_VALUE_ISINF (f0) && REAL_VALUES_EQUAL (f1, dconst0))
 		  || (REAL_VALUE_ISINF (f1)
 		      && REAL_VALUES_EQUAL (f0, dconst0))))
@@ -3941,7 +3941,7 @@ simplify_const_binary_operation (enum rtx_code code, enum machine_mode mode,
 	  /* Don't constant fold this floating point operation if
 	     the result has overflowed and flag_trapping_math.  */
 
-	  if (flag_trapping_math
+	  if (GCC_OPTION (flag_trapping_math)
 	      && MODE_HAS_INFINITIES (mode)
 	      && REAL_VALUE_ISINF (result)
 	      && !REAL_VALUE_ISINF (f0)
@@ -3954,8 +3954,8 @@ simplify_const_binary_operation (enum rtx_code code, enum machine_mode mode,
 	     flag_rounding_math is set, or if GCC's software emulation
 	     is unable to accurately represent the result.  */
 
-	  if ((flag_rounding_math
-	       || (MODE_COMPOSITE_P (mode) && !flag_unsafe_math_optimizations))
+	  if ((GCC_OPTION (flag_rounding_math)
+	       || (MODE_COMPOSITE_P (mode) && !GCC_OPTION (flag_unsafe_math_optimizations)))
 	      && (inexact || !real_identical (&result, &value)))
 	    return NULL_RTX;
 
@@ -4773,7 +4773,7 @@ simplify_relational_operation_1 (enum rtx_code code, enum machine_mode mode,
       && (op0code == PLUS || op0code == MINUS)
       && CONSTANT_P (op1)
       && CONSTANT_P (XEXP (op0, 1))
-      && (INTEGRAL_MODE_P (cmp_mode) || flag_unsafe_math_optimizations))
+      && (INTEGRAL_MODE_P (cmp_mode) || GCC_OPTION (flag_unsafe_math_optimizations)))
     {
       rtx x = XEXP (op0, 0);
       rtx c = XEXP (op0, 1);
@@ -5301,7 +5301,7 @@ simplify_const_relational_operation (enum rtx_code code,
 	  /* Optimize abs(x) < 0.0.  */
 	  if (!HONOR_SNANS (mode)
 	      && (!INTEGRAL_MODE_P (mode)
-		  || (!flag_wrapv && !flag_trapv && flag_strict_overflow)))
+		  || (!GCC_OPTION (flag_wrapv) && !GCC_OPTION (flag_trapv) && GCC_OPTION (flag_strict_overflow))))
 	    {
 	      if (INTEGRAL_MODE_P (mode)
 		  && (issue_strict_overflow_warning
@@ -5317,7 +5317,7 @@ simplify_const_relational_operation (enum rtx_code code,
 	  /* Optimize abs(x) >= 0.0.  */
 	  if (!HONOR_NANS (mode)
 	      && (!INTEGRAL_MODE_P (mode)
-		  || (!flag_wrapv && !flag_trapv && flag_strict_overflow)))
+		  || (!GCC_OPTION (flag_wrapv) && !GCC_OPTION (flag_trapv) && GCC_OPTION (flag_strict_overflow))))
 	    {
 	      if (INTEGRAL_MODE_P (mode)
 	          && (issue_strict_overflow_warning
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 5d68edb..6d2bc8e 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -835,10 +835,10 @@ expand_switch_as_decision_tree_p (tree range,
      over-ruled us, we really have no choice.  */
   if (!HAVE_casesi && !HAVE_tablejump)
     return true;
-  if (!flag_jump_tables)
+  if (!GCC_OPTION (flag_jump_tables))
     return true;
 #ifndef ASM_OUTPUT_ADDR_DIFF_ELT
-  if (flag_pic)
+  if (GCC_OPTION (flag_pic))
     return true;
 #endif
 
@@ -1101,7 +1101,7 @@ emit_case_dispatch_table (tree index_expr, tree index_type,
   /* Output the table.  */
   emit_label (table_label);
 
-  if (CASE_VECTOR_PC_RELATIVE || flag_pic)
+  if (CASE_VECTOR_PC_RELATIVE || GCC_OPTION (flag_pic))
     emit_jump_table_data (gen_rtx_ADDR_DIFF_VEC (CASE_VECTOR_MODE,
 						 gen_rtx_LABEL_REF (Pmode,
 								    table_label),
@@ -1321,7 +1321,7 @@ expand_sjlj_dispatch_table (rtx dispatch_index,
      way" with decrement chain or dispatch table.  */
   if (dispatch_table.length () <= 5
       || (!HAVE_casesi && !HAVE_tablejump)
-      || !flag_jump_tables)
+      || !GCC_OPTION (flag_jump_tables))
     {
       /* Expand the dispatch as a decrement chain:
 
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 084d195..c46c29a 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -664,7 +664,7 @@ layout_decl (tree decl, unsigned int known_align)
 	}
 
       if (zero_bitfield)
-        mfa = initial_max_fld_align * BITS_PER_UNIT;
+        mfa = GCC_OPTION (initial_max_fld_align) * BITS_PER_UNIT;
       else
 	mfa = maximum_field_alignment;
       /* Should this be controlled by DECL_USER_ALIGN, too?  */
@@ -680,14 +680,14 @@ layout_decl (tree decl, unsigned int known_align)
     DECL_SIZE_UNIT (decl) = variable_size (DECL_SIZE_UNIT (decl));
 
   /* If requested, warn about definitions of large data objects.  */
-  if (warn_larger_than
+  if (GCC_OPTION (warn_larger_than)
       && (code == VAR_DECL || code == PARM_DECL)
       && ! DECL_EXTERNAL (decl))
     {
       tree size = DECL_SIZE_UNIT (decl);
 
       if (size != 0 && TREE_CODE (size) == INTEGER_CST
-	  && compare_tree_int (size, larger_than_size) > 0)
+	  && compare_tree_int (size, GCC_OPTION (larger_than_size)) > 0)
 	{
 	  int size_as_int = TREE_INT_CST_LOW (size);
 
@@ -695,7 +695,7 @@ layout_decl (tree decl, unsigned int known_align)
 	    warning (OPT_Wlarger_than_, "size of %q+D is %d bytes", decl, size_as_int);
 	  else
 	    warning (OPT_Wlarger_than_, "size of %q+D is larger than %wd bytes",
-                     decl, larger_than_size);
+                     decl, GCC_OPTION (larger_than_size));
 	}
     }
 
@@ -980,9 +980,9 @@ update_alignment_for_field (record_layout_info rli, tree field,
 	     or packed attributes.  */
 	  if (integer_zerop (DECL_SIZE (field)))
 	    {
-	      if (initial_max_fld_align)
+	      if (GCC_OPTION (initial_max_fld_align))
 	        type_align = MIN (type_align,
-				  initial_max_fld_align * BITS_PER_UNIT);
+				  GCC_OPTION (initial_max_fld_align) * BITS_PER_UNIT);
 	    }
 	  else if (maximum_field_alignment != 0)
 	    type_align = MIN (type_align, maximum_field_alignment);
@@ -997,7 +997,7 @@ update_alignment_for_field (record_layout_info rli, tree field,
 	  rli->record_align = MAX (rli->record_align, desired_align);
 	  rli->record_align = MAX (rli->record_align, type_align);
 
-	  if (warn_packed)
+	  if (GCC_OPTION (warn_packed))
 	    rli->unpacked_align = MAX (rli->unpacked_align, TYPE_ALIGN (type));
 	  user_align |= TYPE_USER_ALIGN (type);
 	}
@@ -1128,7 +1128,7 @@ place_field (record_layout_info rli, tree field)
   if (known_align == 0)
     known_align = MAX (BIGGEST_ALIGNMENT, rli->record_align);
 
-  if (warn_packed && DECL_PACKED (field))
+  if (GCC_OPTION (warn_packed) && DECL_PACKED (field))
     {
       if (known_align >= TYPE_ALIGN (type))
 	{
@@ -1215,7 +1215,7 @@ place_field (record_layout_info rli, tree field)
 	{
 	  if (DECL_PACKED (field))
 	    {
-	      if (warn_packed_bitfield_compat == 1)
+	      if (GCC_OPTION (warn_packed_bitfield_compat) == 1)
 		inform
 		  (input_location,
 		   "offset of packed bit-field %qD has changed in GCC 4.4",
@@ -1526,7 +1526,7 @@ finalize_record_size (record_layout_info rli)
       && input_location != BUILTINS_LOCATION)
     warning (OPT_Wpadded, "padding struct size to alignment boundary");
 
-  if (warn_packed && TREE_CODE (rli->t) == RECORD_TYPE
+  if (GCC_OPTION (warn_packed) && TREE_CODE (rli->t) == RECORD_TYPE
       && TYPE_PACKED (rli->t) && ! rli->packed_maybe_necessary
       && TREE_CONSTANT (unpadded_size))
     {
diff --git a/gcc/store-motion.c b/gcc/store-motion.c
index f383ca5..498f808 100644
--- a/gcc/store-motion.c
+++ b/gcc/store-motion.c
@@ -1226,7 +1226,7 @@ one_store_motion_pass (void)
 static bool
 gate_rtl_store_motion (void)
 {
-  return optimize > 0 && flag_gcse_sm
+  return GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_gcse_sm)
     && !cfun->calls_setjmp
     && optimize_function_for_speed_p (cfun)
     && dbg_cnt (store_motion);
diff --git a/gcc/symtab.c b/gcc/symtab.c
index 2d6f665..ef548eb 100644
--- a/gcc/symtab.c
+++ b/gcc/symtab.c
@@ -360,7 +360,7 @@ symtab_unregister_node (symtab_node *node)
 
   /* During LTO symtab merging we temporarily corrupt decl to symtab node
      hash.  */
-  gcc_assert ((slot && *slot) || in_lto_p);
+  gcc_assert ((slot && *slot) || GCC_OPTION (in_lto_p));
   if (slot && *slot && *slot == node)
     {
       symtab_node *replacement_node = NULL;
@@ -390,7 +390,7 @@ symtab_get_node (const_tree decl)
   gcc_checking_assert (TREE_CODE (decl) == FUNCTION_DECL
 		       || (TREE_CODE (decl) == VAR_DECL
 			   && (TREE_STATIC (decl) || DECL_EXTERNAL (decl)
-			       || in_lto_p)));
+			       || GCC_OPTION (in_lto_p))));
 #endif
 
   if (!symtab_hash)
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 79491c7..ee017c1 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -107,7 +107,7 @@ default_unspec_may_trap_p (const_rtx x, unsigned flags)
   int i;
 
   /* Any floating arithmetic may trap.  */
-  if ((SCALAR_FLOAT_MODE_P (GET_MODE (x)) && flag_trapping_math))
+  if ((SCALAR_FLOAT_MODE_P (GET_MODE (x)) && GCC_OPTION (flag_trapping_math)))
     return 1;
 
   for (i = 0; i < XVECLEN (x, 0); ++i)
@@ -721,7 +721,7 @@ default_hidden_stack_protect_fail (void)
 #else
   tree t = stack_chk_fail_decl;
 
-  if (!flag_pic)
+  if (!GCC_OPTION (flag_pic))
     return default_external_stack_protect_fail ();
 
   if (t == NULL_TREE)
@@ -980,7 +980,7 @@ default_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED,
 int
 default_reloc_rw_mask (void)
 {
-  return flag_pic ? 3 : 0;
+  return GCC_OPTION (flag_pic) ? 3 : 0;
 }
 
 /* By default, do no modification. */
@@ -1431,7 +1431,7 @@ default_debug_unwind_info (void)
 
   /* Otherwise, only turn it on if dwarf2 debugging is enabled.  */
 #ifdef DWARF2_DEBUGGING_INFO
-  if (write_symbols == DWARF2_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == DWARF2_DEBUG || GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     return UI_DWARF2;
 #endif
 
@@ -1458,7 +1458,7 @@ option_affects_pch_p (int option, struct cl_option_state *state)
     return false;
   if ((cl_options[option].flags & CL_PCH_IGNORE) != 0)
     return false;
-  if (option_flag_var (option, &global_options) == &target_flags)
+  if (option_flag_var (option, &global_options) == &GCC_OPTION (target_flags))
     if (targetm.check_pch_target_flags)
       return false;
   return get_option_state (&global_options, option, state);
@@ -1477,19 +1477,19 @@ default_get_pch_validity (size_t *sz)
 
   *sz = 2;
   if (targetm.check_pch_target_flags)
-    *sz += sizeof (target_flags);
+    *sz += sizeof (GCC_OPTION (target_flags));
   for (i = 0; i < cl_options_count; i++)
     if (option_affects_pch_p (i, &state))
       *sz += state.size;
 
   result = r = XNEWVEC (char, *sz);
-  r[0] = flag_pic;
-  r[1] = flag_pie;
+  r[0] = GCC_OPTION (flag_pic);
+  r[1] = GCC_OPTION (flag_pie);
   r += 2;
   if (targetm.check_pch_target_flags)
     {
-      memcpy (r, &target_flags, sizeof (target_flags));
-      r += sizeof (target_flags);
+      memcpy (r, &GCC_OPTION (target_flags), sizeof (GCC_OPTION (target_flags)));
+      r += sizeof (GCC_OPTION (target_flags));
     }
 
   for (i = 0; i < cl_options_count; i++)
@@ -1526,9 +1526,9 @@ default_pch_valid_p (const void *data_p, size_t len)
   size_t i;
 
   /* -fpic and -fpie also usually make a PCH invalid.  */
-  if (data[0] != flag_pic)
+  if (data[0] != GCC_OPTION (flag_pic))
     return _("created and used with different settings of -fpic");
-  if (data[1] != flag_pie)
+  if (data[1] != GCC_OPTION (flag_pie))
     return _("created and used with different settings of -fpie");
   data += 2;
 
@@ -1538,9 +1538,9 @@ default_pch_valid_p (const void *data_p, size_t len)
       int tf;
       const char *r;
 
-      memcpy (&tf, data, sizeof (target_flags));
-      data += sizeof (target_flags);
-      len -= sizeof (target_flags);
+      memcpy (&tf, data, sizeof (GCC_OPTION (target_flags)));
+      data += sizeof (GCC_OPTION (target_flags));
+      len -= sizeof (GCC_OPTION (target_flags));
       r = targetm.check_pch_target_flags (tf);
       if (r != NULL)
 	return r;
diff --git a/gcc/toplev.c b/gcc/toplev.c
index c652522..1542618 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -223,9 +223,9 @@ get_src_pwd (void)
 void
 announce_function (tree decl)
 {
-  if (!quiet_flag)
+  if (!GCC_OPTION (quiet_flag))
     {
-      if (rtl_dump_and_exit)
+      if (GCC_OPTION (rtl_dump_and_exit))
 	fprintf (stderr, "%s ",
 		 identifier_to_locale (IDENTIFIER_POINTER (DECL_NAME (decl))));
       else
@@ -395,7 +395,7 @@ wrapup_global_declaration_2 (tree decl)
       bool needed = true;
       node = varpool_get_node (decl);
 
-      if (!node && flag_ltrans)
+      if (!node && GCC_OPTION (flag_ltrans))
 	needed = false;
       else if (node && node->definition)
 	needed = false;
@@ -410,7 +410,7 @@ wrapup_global_declaration_2 (tree decl)
       else if (DECL_COMDAT (decl))
 	needed = false;
       else if (TREE_READONLY (decl) && !TREE_PUBLIC (decl)
-	       && (optimize || !flag_keep_static_consts
+	       && (GCC_OPTION (optimize) || !GCC_OPTION (flag_keep_static_consts)
 		   || DECL_ARTIFICIAL (decl)))
 	needed = false;
 
@@ -469,7 +469,7 @@ check_global_declaration_1 (tree decl)
       && ! DECL_ARTIFICIAL (decl)
       && ! TREE_NO_WARNING (decl)
       && ! TREE_PUBLIC (decl)
-      && (warn_unused_function
+      && (GCC_OPTION (warn_unused_function)
 	  || TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))))
     {
       if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
@@ -481,10 +481,10 @@ check_global_declaration_1 (tree decl)
     }
 
   /* Warn about static fns or vars defined but not used.  */
-  if (((warn_unused_function && TREE_CODE (decl) == FUNCTION_DECL)
+  if (((GCC_OPTION (warn_unused_function) && TREE_CODE (decl) == FUNCTION_DECL)
        /* We don't warn about "static const" variables because the
 	  "rcs_id" idiom uses that construction.  */
-       || (warn_unused_variable
+       || (GCC_OPTION (warn_unused_variable)
 	   && TREE_CODE (decl) == VAR_DECL && ! TREE_READONLY (decl)))
       && ! DECL_IN_SYSTEM_HEADER (decl)
       && ! TREE_USED (decl)
@@ -553,7 +553,7 @@ compile_file (void)
   /* Compilation is now finished except for writing
      what's left of the symbol table output.  */
 
-  if (flag_syntax_only || flag_wpa)
+  if (GCC_OPTION (flag_syntax_only) || GCC_OPTION (flag_wpa))
     return;
 
   ggc_protect_identifiers = false;
@@ -568,13 +568,13 @@ compile_file (void)
 
   /* Compilation unit is finalized.  When producing non-fat LTO object, we are
      basically finished.  */
-  if (in_lto_p || !flag_lto || flag_fat_lto_objects)
+  if (GCC_OPTION (in_lto_p) || !GCC_OPTION (flag_lto) || GCC_OPTION (flag_fat_lto_objects))
     {
       /* File-scope initialization for AddressSanitizer.  */
-      if (flag_sanitize & SANITIZE_ADDRESS)
+      if (GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
         asan_finish_file ();
 
-      if (flag_sanitize & SANITIZE_THREAD)
+      if (GCC_OPTION (flag_sanitize) & SANITIZE_THREAD)
 	tsan_finish_file ();
 
       output_shared_constant_pool ();
@@ -596,7 +596,7 @@ compile_file (void)
 	dwarf2out_frame_finish ();
     #endif
 
-      (*debug_hooks->finish) (main_input_filename);
+      (*debug_hooks->finish) (GCC_OPTION (main_input_filename));
       timevar_pop (TV_SYMOUT);
 
       /* Output some stuff at end of file if nec.  */
@@ -612,7 +612,7 @@ compile_file (void)
      We used to emit an undefined reference here, but this produces
      link errors if an object file with IL is stored into a shared
      library without invoking lto1.  */
-  if (flag_generate_lto)
+  if (GCC_OPTION (flag_generate_lto))
     {
 #if defined ASM_OUTPUT_ALIGNED_DECL_COMMON
       ASM_OUTPUT_ALIGNED_DECL_COMMON (asm_out_file, NULL_TREE,
@@ -628,7 +628,7 @@ compile_file (void)
 #endif
       /* Let linker plugin know that this is a slim object and must be LTOed
          even when user did not ask for it.  */
-      if (!flag_fat_lto_objects)
+      if (!GCC_OPTION (flag_fat_lto_objects))
         {
 #if defined ASM_OUTPUT_ALIGNED_DECL_COMMON
 	  ASM_OUTPUT_ALIGNED_DECL_COMMON (asm_out_file, NULL_TREE,
@@ -648,7 +648,7 @@ compile_file (void)
   /* Attach a special .ident directive to the end of the file to identify
      the version of GCC which compiled this code.  The format of the .ident
      string is patterned after the ones produced by native SVR4 compilers.  */
-  if (!flag_no_ident)
+  if (!GCC_OPTION (flag_no_ident))
     {
       const char *pkg_version = "(GNU) ";
       char *ident_str;
@@ -898,33 +898,33 @@ print_switch_values (print_switch_fn_type print_fn)
 static void
 init_asm_output (const char *name)
 {
-  if (name == NULL && asm_file_name == 0)
+  if (name == NULL && GCC_OPTION (asm_file_name) == 0)
     asm_out_file = stdout;
   else
     {
-      if (asm_file_name == 0)
+      if (GCC_OPTION (asm_file_name) == 0)
 	{
-	  int len = strlen (dump_base_name);
+	  int len = strlen (GCC_OPTION (dump_base_name));
 	  char *dumpname = XNEWVEC (char, len + 6);
 
-	  memcpy (dumpname, dump_base_name, len + 1);
+	  memcpy (dumpname, GCC_OPTION (dump_base_name), len + 1);
 	  strip_off_ending (dumpname, len);
 	  strcat (dumpname, ".s");
-	  asm_file_name = dumpname;
+	  GCC_OPTION (asm_file_name) = dumpname;
 	}
-      if (!strcmp (asm_file_name, "-"))
+      if (!strcmp (GCC_OPTION (asm_file_name), "-"))
 	asm_out_file = stdout;
       else
-	asm_out_file = fopen (asm_file_name, "w");
+	asm_out_file = fopen (GCC_OPTION (asm_file_name), "w");
       if (asm_out_file == 0)
-	fatal_error ("can%'t open %s for writing: %m", asm_file_name);
+	fatal_error ("can%'t open %s for writing: %m", GCC_OPTION (asm_file_name));
     }
 
-  if (!flag_syntax_only)
+  if (!GCC_OPTION (flag_syntax_only))
     {
       targetm.asm_out.file_start ();
 
-      if (flag_record_gcc_switches)
+      if (GCC_OPTION (flag_record_gcc_switches))
 	{
 	  if (targetm.asm_out.record_gcc_switches)
 	    {
@@ -941,7 +941,7 @@ init_asm_output (const char *name)
 	    inform (input_location, "-frecord-gcc-switches is not supported by the current target");
 	}
 
-      if (flag_verbose_asm)
+      if (GCC_OPTION (flag_verbose_asm))
 	{
 	  /* Print the list of switches in effect
 	     into the assembler file as comments.  */
@@ -1013,7 +1013,7 @@ output_stack_usage (void)
       stack_usage += current_function_dynamic_stack_size;
     }
 
-  if (flag_stack_usage)
+  if (GCC_OPTION (flag_stack_usage))
     {
       expanded_location loc
 	= expand_location (DECL_SOURCE_LOCATION (current_function_decl));
@@ -1050,11 +1050,11 @@ output_stack_usage (void)
 	       stack_usage_kind_str[stack_usage_kind]);
     }
 
-  if (warn_stack_usage >= 0)
+  if (GCC_OPTION (warn_stack_usage) >= 0)
     {
       if (stack_usage_kind == DYNAMIC)
 	warning (OPT_Wstack_usage_, "stack usage might be unbounded");
-      else if (stack_usage > warn_stack_usage)
+      else if (stack_usage > GCC_OPTION (warn_stack_usage))
 	{
 	  if (stack_usage_kind == DYNAMIC_BOUNDED)
 	    warning (OPT_Wstack_usage_, "stack usage might be %wd bytes",
@@ -1073,7 +1073,7 @@ open_auxiliary_file (const char *ext)
   char *filename;
   FILE *file;
 
-  filename = concat (aux_base_name, ".", ext, NULL);
+  filename = concat (GCC_OPTION (aux_base_name), ".", ext, NULL);
   file = fopen (filename, "w");
   if (!file)
     fatal_error ("can%'t open %s for writing: %m", filename);
@@ -1199,24 +1199,24 @@ target_supports_section_anchors_p (void)
 static void
 init_alignments (void)
 {
-  if (align_loops <= 0)
-    align_loops = 1;
-  if (align_loops_max_skip > align_loops)
-    align_loops_max_skip = align_loops - 1;
-  align_loops_log = floor_log2 (align_loops * 2 - 1);
-  if (align_jumps <= 0)
-    align_jumps = 1;
-  if (align_jumps_max_skip > align_jumps)
-    align_jumps_max_skip = align_jumps - 1;
-  align_jumps_log = floor_log2 (align_jumps * 2 - 1);
-  if (align_labels <= 0)
-    align_labels = 1;
-  align_labels_log = floor_log2 (align_labels * 2 - 1);
-  if (align_labels_max_skip > align_labels)
-    align_labels_max_skip = align_labels - 1;
-  if (align_functions <= 0)
-    align_functions = 1;
-  align_functions_log = floor_log2 (align_functions * 2 - 1);
+  if (GCC_OPTION (align_loops) <= 0)
+    GCC_OPTION (align_loops) = 1;
+  if (align_loops_max_skip > GCC_OPTION (align_loops))
+    align_loops_max_skip = GCC_OPTION (align_loops) - 1;
+  align_loops_log = floor_log2 (GCC_OPTION (align_loops) * 2 - 1);
+  if (GCC_OPTION (align_jumps) <= 0)
+    GCC_OPTION (align_jumps) = 1;
+  if (align_jumps_max_skip > GCC_OPTION (align_jumps))
+    align_jumps_max_skip = GCC_OPTION (align_jumps) - 1;
+  align_jumps_log = floor_log2 (GCC_OPTION (align_jumps) * 2 - 1);
+  if (GCC_OPTION (align_labels) <= 0)
+    GCC_OPTION (align_labels) = 1;
+  align_labels_log = floor_log2 (GCC_OPTION (align_labels) * 2 - 1);
+  if (align_labels_max_skip > GCC_OPTION (align_labels))
+    align_labels_max_skip = GCC_OPTION (align_labels) - 1;
+  if (GCC_OPTION (align_functions) <= 0)
+    GCC_OPTION (align_functions) = 1;
+  align_functions_log = floor_log2 (GCC_OPTION (align_functions) * 2 - 1);
 }
 
 /* Process the options that have been parsed.  */
@@ -1227,7 +1227,7 @@ process_options (void)
      This can happen with incorrect pre-processed input. */
   debug_hooks = &do_nothing_debug_hooks;
 
-  maximum_field_alignment = initial_max_fld_align * BITS_PER_UNIT;
+  maximum_field_alignment = GCC_OPTION (initial_max_fld_align) * BITS_PER_UNIT;
 
   /* Default to -fdiagnostics-color=auto if GCC_COLORS is in the environment,
      otherwise default to -fdiagnostics-color=never.  */
@@ -1240,45 +1240,45 @@ process_options (void)
      initialization based on the command line options.  This hook also
      sets the original filename if appropriate (e.g. foo.i -> foo.c)
      so we can correctly initialize debug output.  */
-  no_backend = lang_hooks.post_options (&main_input_filename);
+  no_backend = lang_hooks.post_options (&GCC_OPTION (main_input_filename));
 
   /* Some machines may reject certain combinations of options.  */
   targetm.target_option.override ();
 
   /* Avoid any informative notes in the second run of -fcompare-debug.  */
-  if (flag_compare_debug) 
+  if (GCC_OPTION (flag_compare_debug)) 
     diagnostic_inhibit_notes (global_dc);
 
-  if (flag_section_anchors && !target_supports_section_anchors_p ())
+  if (GCC_OPTION (flag_section_anchors) && !target_supports_section_anchors_p ())
     {
       warning (OPT_fsection_anchors,
 	       "this target does not support %qs", "-fsection-anchors");
-      flag_section_anchors = 0;
+      GCC_OPTION (flag_section_anchors) = 0;
     }
 
-  if (flag_short_enums == 2)
-    flag_short_enums = targetm.default_short_enums ();
+  if (GCC_OPTION (flag_short_enums) == 2)
+    GCC_OPTION (flag_short_enums) = targetm.default_short_enums ();
 
   /* Set aux_base_name if not already set.  */
-  if (aux_base_name)
+  if (GCC_OPTION (aux_base_name))
     ;
-  else if (main_input_filename)
+  else if (GCC_OPTION (main_input_filename))
     {
-      char *name = xstrdup (lbasename (main_input_filename));
+      char *name = xstrdup (lbasename (GCC_OPTION (main_input_filename)));
 
       strip_off_ending (name, strlen (name));
-      aux_base_name = name;
+      GCC_OPTION (aux_base_name) = name;
     }
   else
-    aux_base_name = "gccaux";
+    GCC_OPTION (aux_base_name) = "gccaux";
 
 #ifndef HAVE_cloog
-  if (flag_graphite
-      || flag_graphite_identity
-      || flag_loop_block
-      || flag_loop_interchange
-      || flag_loop_strip_mine
-      || flag_loop_parallelize_all)
+  if (GCC_OPTION (flag_graphite)
+      || GCC_OPTION (flag_graphite_identity)
+      || GCC_OPTION (flag_loop_block)
+      || GCC_OPTION (flag_loop_interchange)
+      || GCC_OPTION (flag_loop_strip_mine)
+      || GCC_OPTION (flag_loop_parallelize_all))
     sorry ("Graphite loop optimizations cannot be used (-fgraphite, "
 	   "-fgraphite-identity, -floop-block, "
 	   "-floop-interchange, -floop-strip-mine, -floop-parallelize-all, "
@@ -1286,284 +1286,284 @@ process_options (void)
 #endif
 
   /* One region RA really helps to decrease the code size.  */
-  if (flag_ira_region == IRA_REGION_AUTODETECT)
-    flag_ira_region
-      = optimize_size || !optimize ? IRA_REGION_ONE : IRA_REGION_MIXED;
+  if (GCC_OPTION (flag_ira_region) == IRA_REGION_AUTODETECT)
+    GCC_OPTION (flag_ira_region)
+      = GCC_OPTION (optimize_size) || !GCC_OPTION (optimize) ? IRA_REGION_ONE : IRA_REGION_MIXED;
 
-  if (flag_strict_volatile_bitfields > 0 && !abi_version_at_least (2))
+  if (GCC_OPTION (flag_strict_volatile_bitfields) > 0 && !abi_version_at_least (2))
     {
       warning (0, "-fstrict-volatile-bitfields disabled; "
 	       "it is incompatible with ABI versions < 2");
-      flag_strict_volatile_bitfields = 0;
+      GCC_OPTION (flag_strict_volatile_bitfields) = 0;
     }
 
   /* Unrolling all loops implies that standard loop unrolling must also
      be done.  */
-  if (flag_unroll_all_loops)
-    flag_unroll_loops = 1;
+  if (GCC_OPTION (flag_unroll_all_loops))
+    GCC_OPTION (flag_unroll_loops) = 1;
 
   /* web and rename-registers help when run after loop unrolling.  */
-  if (flag_web == AUTODETECT_VALUE)
-    flag_web = flag_unroll_loops || flag_peel_loops;
+  if (GCC_OPTION (flag_web) == AUTODETECT_VALUE)
+    GCC_OPTION (flag_web) = GCC_OPTION (flag_unroll_loops) || GCC_OPTION (flag_peel_loops);
 
-  if (flag_rename_registers == AUTODETECT_VALUE)
-    flag_rename_registers = flag_unroll_loops || flag_peel_loops;
+  if (GCC_OPTION (flag_rename_registers) == AUTODETECT_VALUE)
+    GCC_OPTION (flag_rename_registers) = GCC_OPTION (flag_unroll_loops) || GCC_OPTION (flag_peel_loops);
 
-  if (flag_non_call_exceptions)
-    flag_asynchronous_unwind_tables = 1;
-  if (flag_asynchronous_unwind_tables)
-    flag_unwind_tables = 1;
+  if (GCC_OPTION (flag_non_call_exceptions))
+    GCC_OPTION (flag_asynchronous_unwind_tables) = 1;
+  if (GCC_OPTION (flag_asynchronous_unwind_tables))
+    GCC_OPTION (flag_unwind_tables) = 1;
 
-  if (flag_value_profile_transformations)
-    flag_profile_values = 1;
+  if (GCC_OPTION (flag_value_profile_transformations))
+    GCC_OPTION (flag_profile_values) = 1;
 
   /* Warn about options that are not supported on this machine.  */
 #ifndef INSN_SCHEDULING
-  if (flag_schedule_insns || flag_schedule_insns_after_reload)
+  if (GCC_OPTION (flag_schedule_insns) || GCC_OPTION (flag_schedule_insns_after_reload))
     warning (0, "instruction scheduling not supported on this target machine");
 #endif
 #ifndef DELAY_SLOTS
-  if (flag_delayed_branch)
+  if (GCC_OPTION (flag_delayed_branch))
     warning (0, "this target machine does not have delayed branches");
 #endif
 
   user_label_prefix = USER_LABEL_PREFIX;
-  if (flag_leading_underscore != -1)
+  if (GCC_OPTION (flag_leading_underscore) != -1)
     {
       /* If the default prefix is more complicated than "" or "_",
 	 issue a warning and ignore this option.  */
       if (user_label_prefix[0] == 0 ||
 	  (user_label_prefix[0] == '_' && user_label_prefix[1] == 0))
 	{
-	  user_label_prefix = flag_leading_underscore ? "_" : "";
+	  user_label_prefix = GCC_OPTION (flag_leading_underscore) ? "_" : "";
 	}
       else
 	warning (0, "-f%sleading-underscore not supported on this target machine",
-		 flag_leading_underscore ? "" : "no-");
+		 GCC_OPTION (flag_leading_underscore) ? "" : "no-");
     }
 
   /* If we are in verbose mode, write out the version and maybe all the
      option flags in use.  */
-  if (version_flag)
+  if (GCC_OPTION (version_flag))
     {
       print_version (stderr, "");
-      if (! quiet_flag)
+      if (! GCC_OPTION (quiet_flag))
 	print_switch_values (print_to_stderr);
     }
 
-  if (flag_syntax_only)
+  if (GCC_OPTION (flag_syntax_only))
     {
-      write_symbols = NO_DEBUG;
-      profile_flag = 0;
+      GCC_OPTION (write_symbols) = NO_DEBUG;
+      GCC_OPTION (profile_flag) = 0;
     }
 
-  if (flag_gtoggle)
+  if (GCC_OPTION (flag_gtoggle))
     {
-      if (debug_info_level == DINFO_LEVEL_NONE)
+      if (GCC_OPTION (debug_info_level) == DINFO_LEVEL_NONE)
 	{
-	  debug_info_level = DINFO_LEVEL_NORMAL;
+	  GCC_OPTION (debug_info_level) = DINFO_LEVEL_NORMAL;
 
-	  if (write_symbols == NO_DEBUG)
-	    write_symbols = PREFERRED_DEBUGGING_TYPE;
+	  if (GCC_OPTION (write_symbols) == NO_DEBUG)
+	    GCC_OPTION (write_symbols) = PREFERRED_DEBUGGING_TYPE;
 	}
       else
-	debug_info_level = DINFO_LEVEL_NONE;
+	GCC_OPTION (debug_info_level) = DINFO_LEVEL_NONE;
     }
 
-  if (flag_dump_final_insns && !flag_syntax_only && !no_backend)
+  if (GCC_OPTION (flag_dump_final_insns) && !GCC_OPTION (flag_syntax_only) && !no_backend)
     {
-      FILE *final_output = fopen (flag_dump_final_insns, "w");
+      FILE *final_output = fopen (GCC_OPTION (flag_dump_final_insns), "w");
       if (!final_output)
 	{
 	  error ("could not open final insn dump file %qs: %m",
-		 flag_dump_final_insns);
-	  flag_dump_final_insns = NULL;
+		 GCC_OPTION (flag_dump_final_insns));
+	  GCC_OPTION (flag_dump_final_insns) = NULL;
 	}
       else if (fclose (final_output))
 	{
 	  error ("could not close zeroed insn dump file %qs: %m",
-		 flag_dump_final_insns);
-	  flag_dump_final_insns = NULL;
+		 GCC_OPTION (flag_dump_final_insns));
+	  GCC_OPTION (flag_dump_final_insns) = NULL;
 	}
     }
 
   /* A lot of code assumes write_symbols == NO_DEBUG if the debugging
      level is 0.  */
-  if (debug_info_level == DINFO_LEVEL_NONE)
-    write_symbols = NO_DEBUG;
+  if (GCC_OPTION (debug_info_level) == DINFO_LEVEL_NONE)
+    GCC_OPTION (write_symbols) = NO_DEBUG;
 
-  if (write_symbols == NO_DEBUG)
+  if (GCC_OPTION (write_symbols) == NO_DEBUG)
     ;
 #if defined(DBX_DEBUGGING_INFO)
-  else if (write_symbols == DBX_DEBUG)
+  else if (GCC_OPTION (write_symbols) == DBX_DEBUG)
     debug_hooks = &dbx_debug_hooks;
 #endif
 #if defined(XCOFF_DEBUGGING_INFO)
-  else if (write_symbols == XCOFF_DEBUG)
+  else if (GCC_OPTION (write_symbols) == XCOFF_DEBUG)
     debug_hooks = &xcoff_debug_hooks;
 #endif
 #ifdef SDB_DEBUGGING_INFO
-  else if (write_symbols == SDB_DEBUG)
+  else if (GCC_OPTION (write_symbols) == SDB_DEBUG)
     debug_hooks = &sdb_debug_hooks;
 #endif
 #ifdef DWARF2_DEBUGGING_INFO
-  else if (write_symbols == DWARF2_DEBUG)
+  else if (GCC_OPTION (write_symbols) == DWARF2_DEBUG)
     debug_hooks = &dwarf2_debug_hooks;
 #endif
 #ifdef VMS_DEBUGGING_INFO
-  else if (write_symbols == VMS_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG)
+  else if (GCC_OPTION (write_symbols) == VMS_DEBUG || GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     debug_hooks = &vmsdbg_debug_hooks;
 #endif
   else
     error ("target system does not support the \"%s\" debug format",
-	   debug_type_names[write_symbols]);
+	   debug_type_names[GCC_OPTION (write_symbols)]);
 
   /* We know which debug output will be used so we can set flag_var_tracking
      and flag_var_tracking_uninit if the user has not specified them.  */
-  if (debug_info_level < DINFO_LEVEL_NORMAL
+  if (GCC_OPTION (debug_info_level) < DINFO_LEVEL_NORMAL
       || debug_hooks->var_location == do_nothing_debug_hooks.var_location)
     {
-      if (flag_var_tracking == 1
-	  || flag_var_tracking_uninit == 1)
+      if (GCC_OPTION (flag_var_tracking) == 1
+	  || GCC_OPTION (flag_var_tracking_uninit) == 1)
         {
-	  if (debug_info_level < DINFO_LEVEL_NORMAL)
+	  if (GCC_OPTION (debug_info_level) < DINFO_LEVEL_NORMAL)
 	    warning (0, "variable tracking requested, but useless unless "
 		     "producing debug info");
 	  else
 	    warning (0, "variable tracking requested, but not supported "
 		     "by this debug format");
 	}
-      flag_var_tracking = 0;
-      flag_var_tracking_uninit = 0;
+      GCC_OPTION (flag_var_tracking) = 0;
+      GCC_OPTION (flag_var_tracking_uninit) = 0;
     }
 
   /* The debug hooks are used to implement -fdump-go-spec because it
      gives a simple and stable API for all the information we need to
      dump.  */
-  if (flag_dump_go_spec != NULL)
-    debug_hooks = dump_go_spec_init (flag_dump_go_spec, debug_hooks);
+  if (GCC_OPTION (flag_dump_go_spec) != NULL)
+    debug_hooks = dump_go_spec_init (GCC_OPTION (flag_dump_go_spec), debug_hooks);
 
   /* If the user specifically requested variable tracking with tagging
      uninitialized variables, we need to turn on variable tracking.
      (We already determined above that variable tracking is feasible.)  */
-  if (flag_var_tracking_uninit == 1)
-    flag_var_tracking = 1;
+  if (GCC_OPTION (flag_var_tracking_uninit) == 1)
+    GCC_OPTION (flag_var_tracking) = 1;
 
-  if (flag_var_tracking == AUTODETECT_VALUE)
-    flag_var_tracking = optimize >= 1;
+  if (GCC_OPTION (flag_var_tracking) == AUTODETECT_VALUE)
+    GCC_OPTION (flag_var_tracking) = GCC_OPTION (optimize) >= 1;
 
-  if (flag_var_tracking_uninit == AUTODETECT_VALUE)
-    flag_var_tracking_uninit = flag_var_tracking;
+  if (GCC_OPTION (flag_var_tracking_uninit) == AUTODETECT_VALUE)
+    GCC_OPTION (flag_var_tracking_uninit) = GCC_OPTION (flag_var_tracking);
 
-  if (flag_var_tracking_assignments == AUTODETECT_VALUE)
-    flag_var_tracking_assignments = flag_var_tracking
-      && !(flag_selective_scheduling || flag_selective_scheduling2);
+  if (GCC_OPTION (flag_var_tracking_assignments) == AUTODETECT_VALUE)
+    GCC_OPTION (flag_var_tracking_assignments) = GCC_OPTION (flag_var_tracking)
+      && !(GCC_OPTION (flag_selective_scheduling) || GCC_OPTION (flag_selective_scheduling2));
 
-  if (flag_var_tracking_assignments_toggle)
-    flag_var_tracking_assignments = !flag_var_tracking_assignments;
+  if (GCC_OPTION (flag_var_tracking_assignments_toggle))
+    GCC_OPTION (flag_var_tracking_assignments) = !GCC_OPTION (flag_var_tracking_assignments);
 
-  if (flag_var_tracking_assignments && !flag_var_tracking)
-    flag_var_tracking = flag_var_tracking_assignments = -1;
+  if (GCC_OPTION (flag_var_tracking_assignments) && !GCC_OPTION (flag_var_tracking))
+    GCC_OPTION (flag_var_tracking) = GCC_OPTION (flag_var_tracking_assignments) = -1;
 
-  if (flag_var_tracking_assignments
-      && (flag_selective_scheduling || flag_selective_scheduling2))
+  if (GCC_OPTION (flag_var_tracking_assignments)
+      && (GCC_OPTION (flag_selective_scheduling) || GCC_OPTION (flag_selective_scheduling2)))
     warning (0, "var-tracking-assignments changes selective scheduling");
 
-  if (flag_tree_cselim == AUTODETECT_VALUE)
+  if (GCC_OPTION (flag_tree_cselim) == AUTODETECT_VALUE)
 #ifdef HAVE_conditional_move
-    flag_tree_cselim = 1;
+    GCC_OPTION (flag_tree_cselim) = 1;
 #else
-    flag_tree_cselim = 0;
+    GCC_OPTION (flag_tree_cselim) = 0;
 #endif
 
   /* If auxiliary info generation is desired, open the output file.
      This goes in the same directory as the source file--unlike
      all the other output files.  */
-  if (flag_gen_aux_info)
+  if (GCC_OPTION (flag_gen_aux_info))
     {
-      aux_info_file = fopen (aux_info_file_name, "w");
+      aux_info_file = fopen (GCC_OPTION (aux_info_file_name), "w");
       if (aux_info_file == 0)
-	fatal_error ("can%'t open %s: %m", aux_info_file_name);
+	fatal_error ("can%'t open %s: %m", GCC_OPTION (aux_info_file_name));
     }
 
   if (!targetm_common.have_named_sections)
     {
-      if (flag_function_sections)
+      if (GCC_OPTION (flag_function_sections))
 	{
 	  warning (0, "-ffunction-sections not supported for this target");
-	  flag_function_sections = 0;
+	  GCC_OPTION (flag_function_sections) = 0;
 	}
-      if (flag_data_sections)
+      if (GCC_OPTION (flag_data_sections))
 	{
 	  warning (0, "-fdata-sections not supported for this target");
-	  flag_data_sections = 0;
+	  GCC_OPTION (flag_data_sections) = 0;
 	}
     }
 
 #ifndef HAVE_prefetch
-  if (flag_prefetch_loop_arrays > 0)
+  if (GCC_OPTION (flag_prefetch_loop_arrays) > 0)
     {
       warning (0, "-fprefetch-loop-arrays not supported for this target");
-      flag_prefetch_loop_arrays = 0;
+      GCC_OPTION (flag_prefetch_loop_arrays) = 0;
     }
 #else
-  if (flag_prefetch_loop_arrays > 0 && !HAVE_prefetch)
+  if (GCC_OPTION (flag_prefetch_loop_arrays) > 0 && !HAVE_prefetch)
     {
       warning (0, "-fprefetch-loop-arrays not supported for this target (try -march switches)");
-      flag_prefetch_loop_arrays = 0;
+      GCC_OPTION (flag_prefetch_loop_arrays) = 0;
     }
 #endif
 
   /* This combination of options isn't handled for i386 targets and doesn't
      make much sense anyway, so don't allow it.  */
-  if (flag_prefetch_loop_arrays > 0 && optimize_size)
+  if (GCC_OPTION (flag_prefetch_loop_arrays) > 0 && GCC_OPTION (optimize_size))
     {
       warning (0, "-fprefetch-loop-arrays is not supported with -Os");
-      flag_prefetch_loop_arrays = 0;
+      GCC_OPTION (flag_prefetch_loop_arrays) = 0;
     }
 
   /* The presence of IEEE signaling NaNs, implies all math can trap.  */
-  if (flag_signaling_nans)
-    flag_trapping_math = 1;
+  if (GCC_OPTION (flag_signaling_nans))
+    GCC_OPTION (flag_trapping_math) = 1;
 
   /* We cannot reassociate if we want traps or signed zeros.  */
-  if (flag_associative_math && (flag_trapping_math || flag_signed_zeros))
+  if (GCC_OPTION (flag_associative_math) && (GCC_OPTION (flag_trapping_math) || GCC_OPTION (flag_signed_zeros)))
     {
       warning (0, "-fassociative-math disabled; other options take precedence");
-      flag_associative_math = 0;
+      GCC_OPTION (flag_associative_math) = 0;
     }
 
   /* With -fcx-limited-range, we do cheap and quick complex arithmetic.  */
-  if (flag_cx_limited_range)
-    flag_complex_method = 0;
+  if (GCC_OPTION (flag_cx_limited_range))
+    GCC_OPTION (flag_complex_method) = 0;
 
   /* With -fcx-fortran-rules, we do something in-between cheap and C99.  */
-  if (flag_cx_fortran_rules)
-    flag_complex_method = 1;
+  if (GCC_OPTION (flag_cx_fortran_rules))
+    GCC_OPTION (flag_complex_method) = 1;
 
   /* Targets must be able to place spill slots at lower addresses.  If the
      target already uses a soft frame pointer, the transition is trivial.  */
-  if (!FRAME_GROWS_DOWNWARD && flag_stack_protect)
+  if (!FRAME_GROWS_DOWNWARD && GCC_OPTION (flag_stack_protect))
     {
       warning (0, "-fstack-protector not supported for this target");
-      flag_stack_protect = 0;
+      GCC_OPTION (flag_stack_protect) = 0;
     }
-  if (!flag_stack_protect)
-    warn_stack_protect = 0;
+  if (!GCC_OPTION (flag_stack_protect))
+    GCC_OPTION (warn_stack_protect) = 0;
 
   /* Address Sanitizer needs porting to each target architecture.  */
-  if ((flag_sanitize & SANITIZE_ADDRESS)
+  if ((GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
       && (targetm.asan_shadow_offset == NULL
 	  || !FRAME_GROWS_DOWNWARD))
     {
       warning (0, "-fsanitize=address not supported for this target");
-      flag_sanitize &= ~SANITIZE_ADDRESS;
+      GCC_OPTION (flag_sanitize) &= ~SANITIZE_ADDRESS;
     }
 
   /* Enable -Werror=coverage-mismatch when -Werror and -Wno-error
      have not been set.  */
   if (!global_options_set.x_warnings_are_errors
-      && warn_coverage_mismatch
+      && GCC_OPTION (warn_coverage_mismatch)
       && (global_dc->classify_diagnostic[OPT_Wcoverage_mismatch] ==
           DK_UNSPECIFIED))
     diagnostic_classify_diagnostic (global_dc, OPT_Wcoverage_mismatch,
@@ -1642,9 +1642,9 @@ init_excess_precision (void)
      the front end cannot handle it, flag_excess_precision_cmdline
      will already have been set accordingly in the post_options
      hook.  */
-  gcc_assert (flag_excess_precision_cmdline != EXCESS_PRECISION_DEFAULT);
-  flag_excess_precision = flag_excess_precision_cmdline;
-  if (flag_unsafe_math_optimizations)
+  gcc_assert (GCC_OPTION (flag_excess_precision_cmdline) != EXCESS_PRECISION_DEFAULT);
+  flag_excess_precision = GCC_OPTION (flag_excess_precision_cmdline);
+  if (GCC_OPTION (flag_unsafe_math_optimizations))
     flag_excess_precision = EXCESS_PRECISION_FAST;
   if (flag_excess_precision == EXCESS_PRECISION_STANDARD)
     {
@@ -1704,8 +1704,8 @@ static int
 lang_dependent_init (const char *name)
 {
   location_t save_loc = input_location;
-  if (dump_base_name == 0)
-    dump_base_name = name && name[0] ? name : "gccdump";
+  if (GCC_OPTION (dump_base_name) == 0)
+    GCC_OPTION (dump_base_name) = name && name[0] ? name : "gccdump";
 
   /* Other front-end initialization.  */
   input_location = BUILTINS_LOCATION;
@@ -1713,12 +1713,12 @@ lang_dependent_init (const char *name)
     return 0;
   input_location = save_loc;
 
-  if (!flag_wpa)
+  if (!GCC_OPTION (flag_wpa))
     {
       init_asm_output (name);
 
       /* If stack usage information is desired, open the output file.  */
-      if (flag_stack_usage)
+      if (GCC_OPTION (flag_stack_usage))
 	stack_usage_file = open_auxiliary_file ("su");
     }
 
@@ -1729,7 +1729,7 @@ lang_dependent_init (const char *name)
   /* Do the target-specific parts of the initialization.  */
   lang_dependent_init_target ();
 
-  if (!flag_wpa)
+  if (!GCC_OPTION (flag_wpa))
     {
       /* If dbx symbol table desired, initialize writing it and output the
 	 predefined types.  */
@@ -1829,11 +1829,11 @@ static void
 finalize (bool no_backend)
 {
   /* Close the dump files.  */
-  if (flag_gen_aux_info)
+  if (GCC_OPTION (flag_gen_aux_info))
     {
       fclose (aux_info_file);
       if (seen_error ())
-	unlink (aux_info_file_name);
+	unlink (GCC_OPTION (aux_info_file_name));
     }
 
   /* Close non-debugging input and output files.  Take special care to note
@@ -1843,9 +1843,9 @@ finalize (bool no_backend)
   if (asm_out_file)
     {
       if (ferror (asm_out_file) != 0)
-	fatal_error ("error writing to %s: %m", asm_file_name);
+	fatal_error ("error writing to %s: %m", GCC_OPTION (asm_file_name));
       if (fclose (asm_out_file) != 0)
-	fatal_error ("error closing %s: %m", asm_file_name);
+	fatal_error ("error closing %s: %m", GCC_OPTION (asm_file_name));
     }
 
   if (stack_usage_file)
@@ -1860,10 +1860,10 @@ finalize (bool no_backend)
       ira_finish_once ();
     }
 
-  if (mem_report)
+  if (GCC_OPTION (mem_report))
     dump_memory_report (true);
 
-  if (profile_report)
+  if (GCC_OPTION (profile_report))
     dump_profile_report ();
 
   /* Language-specific end of compilation actions.  */
@@ -1876,7 +1876,7 @@ do_compile (void)
 {
   /* Initialize timing first.  The C front ends read the main file in
      the post_options hook, and C++ does file timings.  */
-  if (time_report || !quiet_flag  || flag_detailed_statistics)
+  if (GCC_OPTION (time_report) || !GCC_OPTION (quiet_flag)  || GCC_OPTION (flag_detailed_statistics))
     timevar_init ();
   timevar_start (TV_TOTAL);
 
@@ -1897,15 +1897,15 @@ do_compile (void)
 	backend_init ();
 
       /* Language-dependent initialization.  Returns true on success.  */
-      if (lang_dependent_init (main_input_filename))
+      if (lang_dependent_init (GCC_OPTION (main_input_filename)))
         {
           /* Initialize yet another pass.  */
 
           ggc_protect_identifiers = true;
 
           init_cgraph ();
-          init_final (main_input_filename);
-          coverage_init (aux_base_name);
+          init_final (GCC_OPTION (main_input_filename));
+          coverage_init (GCC_OPTION (aux_base_name));
           statistics_init ();
           invoke_plugin_callbacks (PLUGIN_START_UNIT, NULL);
 
@@ -1979,14 +1979,14 @@ toplev_main (int argc, char **argv)
 
   initialize_plugins ();
 
-  if (version_flag)
+  if (GCC_OPTION (version_flag))
     print_version (stderr, "");
 
-  if (help_flag)
+  if (GCC_OPTION (help_flag))
     print_plugins_help (stderr, "");
 
   /* Exit early if we can (e.g. -help).  */
-  if (!exit_after_options)
+  if (!GCC_OPTION (exit_after_options))
     do_compile ();
 
   if (warningcount || errorcount || werrorcount)
diff --git a/gcc/tracer.c b/gcc/tracer.c
index f036c19..eca631a 100644
--- a/gcc/tracer.c
+++ b/gcc/tracer.c
@@ -247,7 +247,7 @@ tail_duplicate (void)
   bitmap_clear (bb_seen);
   initialize_original_copy_tables ();
 
-  if (profile_info && flag_branch_probabilities)
+  if (profile_info && GCC_OPTION (flag_branch_probabilities))
     probability_cutoff = PARAM_VALUE (TRACER_MIN_BRANCH_PROBABILITY_FEEDBACK);
   else
     probability_cutoff = PARAM_VALUE (TRACER_MIN_BRANCH_PROBABILITY);
@@ -268,7 +268,7 @@ tail_duplicate (void)
       weighted_insns += n * bb->frequency;
     }
 
-  if (profile_info && flag_branch_probabilities)
+  if (profile_info && GCC_OPTION (flag_branch_probabilities))
     cover_insns = PARAM_VALUE (TRACER_DYNAMIC_COVERAGE_FEEDBACK);
   else
     cover_insns = PARAM_VALUE (TRACER_DYNAMIC_COVERAGE);
@@ -401,7 +401,7 @@ tracer (void)
 static bool
 gate_tracer (void)
 {
-  return (optimize > 0 && flag_tracer && flag_reorder_blocks);
+  return (GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_tracer) && GCC_OPTION (flag_reorder_blocks));
 }
 
 namespace {
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index fe6dc28..22e0472 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -250,7 +250,7 @@ is_tm_irrevocable (tree x)
 bool
 is_tm_safe (const_tree x)
 {
-  if (flag_tm)
+  if (GCC_OPTION (flag_tm))
     {
       tree attrs = get_attrs_for (x);
       if (attrs)
@@ -462,7 +462,7 @@ build_tm_abort_call (location_t loc, bool is_outer)
 static bool
 gate_tm (void)
 {
-  return flag_tm;
+  return GCC_OPTION (flag_tm);
 }
 
 /* Map for aribtrary function replacement under TM, as created
@@ -1639,7 +1639,7 @@ lower_transaction (gimple_stmt_iterator *gsi, struct walk_stmt_info *wi)
   /* Wrap the body of the transaction in a try-finally node so that
      the commit call is always properly called.  */
   g = gimple_build_call (builtin_decl_explicit (BUILT_IN_TM_COMMIT), 0);
-  if (flag_exceptions)
+  if (GCC_OPTION (flag_exceptions))
     {
       tree ptr;
       gimple_seq n_seq, e_seq;
@@ -2004,7 +2004,7 @@ tm_region_init (struct tm_region *region)
 static bool
 gate_tm_init (void)
 {
-  if (!flag_tm)
+  if (!GCC_OPTION (flag_tm))
     return false;
 
   calculate_dominance_info (CDI_DOMINATORS);
@@ -3937,7 +3937,7 @@ execute_tm_memopt (void)
 static bool
 gate_tm_memopt (void)
 {
-  return flag_tm && optimize > 0;
+  return GCC_OPTION (flag_tm) && GCC_OPTION (optimize) > 0;
 }
 
 namespace {
diff --git a/gcc/tree-call-cdce.c b/gcc/tree-call-cdce.c
index 4b2ad87..2337af0 100644
--- a/gcc/tree-call-cdce.c
+++ b/gcc/tree-call-cdce.c
@@ -923,7 +923,7 @@ gate_call_cdce (void)
   /* The limit constants used in the implementation
      assume IEEE floating point format.  Other formats
      can be supported in the future if needed.  */
-  return flag_tree_builtin_call_dce != 0 && optimize_function_for_speed_p (cfun);
+  return GCC_OPTION (flag_tree_builtin_call_dce) != 0 && optimize_function_for_speed_p (cfun);
 }
 
 namespace {
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 56b6c35..8a051fc 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -1626,7 +1626,7 @@ gimple_can_merge_blocks_p (basic_block a, basic_block b)
       lab = gimple_label_label (stmt);
 
       /* Do not remove user forced labels or for -O0 any user labels.  */
-      if (!DECL_ARTIFICIAL (lab) && (!optimize || FORCED_LABEL (lab)))
+      if (!DECL_ARTIFICIAL (lab) && (!GCC_OPTION (optimize) || FORCED_LABEL (lab)))
 	return false;
     }
 
@@ -1646,7 +1646,7 @@ gimple_can_merge_blocks_p (basic_block a, basic_block b)
     }
 
   /* When not optimizing, don't merge if we'd lose goto_locus.  */
-  if (!optimize
+  if (!GCC_OPTION (optimize)
       && single_succ_edge (a)->goto_locus != UNKNOWN_LOCATION)
     {
       location_t goto_locus = single_succ_edge (a)->goto_locus;
@@ -4007,7 +4007,7 @@ verify_gimple_assign_single (gimple stmt)
 	   gimple hygiene asks for this check.  In LTO we can end up
 	   combining incompatible units and thus end up with addresses
 	   of globals that change their type to a common one.  */
-	if (!in_lto_p
+	if (!GCC_OPTION (in_lto_p)
 	    && !types_compatible_p (TREE_TYPE (op),
 				    TREE_TYPE (TREE_TYPE (rhs1)))
 	    && !one_pointer_to_useless_type_conversion_p (TREE_TYPE (rhs1),
@@ -8188,7 +8188,7 @@ execute_warn_function_return (void)
 
   /* If we see "return;" in some basic block, then we do reach the end
      without returning a value.  */
-  else if (warn_return_type
+  else if (GCC_OPTION (warn_return_type)
 	   && !TREE_NO_WARNING (cfun->decl)
 	   && EDGE_COUNT (EXIT_BLOCK_PTR_FOR_FN (cfun)->preds) > 0
 	   && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (cfun->decl))))
@@ -8349,7 +8349,7 @@ run_warn_unused_result (void)
 static bool
 gate_warn_unused_result (void)
 {
-  return flag_warn_unused_result;
+  return GCC_OPTION (flag_warn_unused_result);
 }
 
 namespace {
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index 08401dd..55bfd36 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -276,7 +276,7 @@ tree_forwarder_block_p (basic_block bb, bool phi_wanted)
 	return false;
       /* If goto_locus of any of the edges differs, prevent removing
 	 the forwarder block for -O0.  */
-      else if (optimize == 0 && e->goto_locus != locus)
+      else if (GCC_OPTION (optimize) == 0 && e->goto_locus != locus)
 	return false;
   }
 
@@ -291,7 +291,7 @@ tree_forwarder_block_p (basic_block bb, bool phi_wanted)
 	case GIMPLE_LABEL:
 	  if (DECL_NONLOCAL (gimple_label_label (stmt)))
 	    return false;
-	  if (optimize == 0 && gimple_location (stmt) != locus)
+	  if (GCC_OPTION (optimize) == 0 && gimple_location (stmt) != locus)
 	    return false;
 	  break;
 
@@ -1097,32 +1097,32 @@ execute_cleanup_cfg_post_optimizing (void)
   maybe_remove_unreachable_handlers ();
   cleanup_dead_labels ();
   group_case_labels ();
-  if ((flag_compare_debug_opt || flag_compare_debug)
-      && flag_dump_final_insns)
+  if ((GCC_OPTION (flag_compare_debug_opt) || GCC_OPTION (flag_compare_debug))
+      && GCC_OPTION (flag_dump_final_insns))
     {
-      FILE *final_output = fopen (flag_dump_final_insns, "a");
+      FILE *final_output = fopen (GCC_OPTION (flag_dump_final_insns), "a");
 
       if (!final_output)
 	{
 	  error ("could not open final insn dump file %qs: %m",
-		 flag_dump_final_insns);
-	  flag_dump_final_insns = NULL;
+		 GCC_OPTION (flag_dump_final_insns));
+	  GCC_OPTION (flag_dump_final_insns) = NULL;
 	}
       else
 	{
-	  int save_unnumbered = flag_dump_unnumbered;
-	  int save_noaddr = flag_dump_noaddr;
+	  int save_unnumbered = GCC_OPTION (flag_dump_unnumbered);
+	  int save_noaddr = GCC_OPTION (flag_dump_noaddr);
 
-	  flag_dump_noaddr = flag_dump_unnumbered = 1;
+	  GCC_OPTION (flag_dump_noaddr) = GCC_OPTION (flag_dump_unnumbered) = 1;
 	  fprintf (final_output, "\n");
 	  dump_enumerated_decls (final_output, dump_flags | TDF_NOUID);
-	  flag_dump_noaddr = save_noaddr;
-	  flag_dump_unnumbered = save_unnumbered;
+	  GCC_OPTION (flag_dump_noaddr) = save_noaddr;
+	  GCC_OPTION (flag_dump_unnumbered) = save_unnumbered;
 	  if (fclose (final_output))
 	    {
 	      error ("could not close final insn dump file %qs: %m",
-		     flag_dump_final_insns);
-	      flag_dump_final_insns = NULL;
+		     GCC_OPTION (flag_dump_final_insns));
+	      GCC_OPTION (flag_dump_final_insns) = NULL;
 	    }
 	}
     }
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index 4a657c0..29462a6 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -115,7 +115,7 @@ some_nonzerop (tree t)
   /* Operations with real or imaginary part of a complex number zero
      cannot be treated the same as operations with a real or imaginary
      operand if we care about the signs of zeros in the result.  */
-  if (TREE_CODE (t) == REAL_CST && !flag_signed_zeros)
+  if (TREE_CODE (t) == REAL_CST && !GCC_OPTION (flag_signed_zeros))
     zerop = REAL_VALUES_IDENTICAL (TREE_REAL_CST (t), dconst0);
   else if (TREE_CODE (t) == FIXED_CST)
     zerop = fixed_zerop (t);
@@ -1038,7 +1038,7 @@ expand_complex_multiplication (gimple_stmt_iterator *gsi, tree inner_type,
       break;
 
     case PAIR (VARYING, VARYING):
-      if (flag_complex_method == 2 && SCALAR_FLOAT_TYPE_P (inner_type))
+      if (GCC_OPTION (flag_complex_method) == 2 && SCALAR_FLOAT_TYPE_P (inner_type))
 	{
 	  expand_complex_libcall (gsi, ar, ai, br, bi, MULT_EXPR);
 	  return;
@@ -1308,7 +1308,7 @@ expand_complex_division (gimple_stmt_iterator *gsi, tree inner_type,
     case PAIR (ONLY_REAL, VARYING):
     case PAIR (ONLY_IMAG, VARYING):
     case PAIR (VARYING, VARYING):
-      switch (flag_complex_method)
+      switch (GCC_OPTION (flag_complex_method))
 	{
 	case 0:
 	  /* straightforward implementation of complex divide acceptable.  */
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index 01d0a7a..bb43068 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -4195,7 +4195,7 @@ compute_affine_dependence (struct data_dependence_relation *ddr,
 	{
 	  subscript_dependence_tester (ddr, loop_nest);
 
-	  if (flag_check_data_deps)
+	  if (GCC_OPTION (flag_check_data_deps))
 	    {
 	      /* Dump the dependences from the first algorithm.  */
 	      if (dump_file && (dump_flags & TDF_DETAILS))
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index 14ed52a..551437b 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -1593,7 +1593,7 @@ decide_copy_try_finally (int ndests, bool may_throw, gimple_seq finally)
       finally = gimple_eh_else_n_body (eh_else);
     }
 
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     {
       gimple_stmt_iterator gsi;
 
@@ -1621,7 +1621,7 @@ decide_copy_try_finally (int ndests, bool may_throw, gimple_seq finally)
     return f_estimate < sw_estimate;
 
   /* ??? These numbers are completely made up so far.  */
-  if (optimize > 1)
+  if (GCC_OPTION (optimize) > 1)
     return f_estimate < 100 || f_estimate < sw_estimate * 2;
   else
     return f_estimate < 40 || f_estimate * 2 < sw_estimate * 3;
@@ -1765,7 +1765,7 @@ lower_catch (struct leh_state *state, gimple tp)
   gimple x;
   location_t try_catch_loc = gimple_location (tp);
 
-  if (flag_exceptions)
+  if (GCC_OPTION (flag_exceptions))
     {
       try_region = gen_eh_region_try (state->cur_region);
       this_state.cur_region = try_region;
@@ -1836,7 +1836,7 @@ lower_eh_filter (struct leh_state *state, gimple tp)
 
   inner = gimple_seq_first_stmt (gimple_try_cleanup (tp));
 
-  if (flag_exceptions)
+  if (GCC_OPTION (flag_exceptions))
     {
       this_region = gen_eh_region_allowed (state->cur_region,
 				           gimple_eh_filter_types (inner));
@@ -1876,7 +1876,7 @@ lower_eh_must_not_throw (struct leh_state *state, gimple tp)
 {
   struct leh_state this_state = *state;
 
-  if (flag_exceptions)
+  if (GCC_OPTION (flag_exceptions))
     {
       gimple inner = gimple_seq_first_stmt (gimple_try_cleanup (tp));
       eh_region this_region;
@@ -1912,7 +1912,7 @@ lower_cleanup (struct leh_state *state, gimple tp)
   gimple_seq result;
   bool cleanup_dead = cleanup_is_dead_in (state->cur_region);
 
-  if (flag_exceptions && !cleanup_dead)
+  if (GCC_OPTION (flag_exceptions) && !cleanup_dead)
     {
       this_region = gen_eh_region_cleanup (state->cur_region);
       this_state.cur_region = this_region;
@@ -2427,7 +2427,7 @@ operation_could_trap_helper_p (enum tree_code op,
       if (honor_snans || honor_trapv)
 	return true;
       if (fp_operation)
-	return flag_trapping_math;
+	return GCC_OPTION (flag_trapping_math);
       if (!TREE_CONSTANT (divisor) || integer_zerop (divisor))
         return true;
       return false;
@@ -2468,7 +2468,7 @@ operation_could_trap_helper_p (enum tree_code op,
     case MINUS_EXPR:
     case MULT_EXPR:
       /* Any floating arithmetic may trap.  */
-      if (fp_operation && flag_trapping_math)
+      if (fp_operation && GCC_OPTION (flag_trapping_math))
 	return true;
       if (honor_trapv)
 	return true;
@@ -2481,7 +2481,7 @@ operation_could_trap_helper_p (enum tree_code op,
 
     default:
       /* Any floating arithmetic may trap.  */
-      if (fp_operation && flag_trapping_math)
+      if (fp_operation && GCC_OPTION (flag_trapping_math))
 	return true;
 
       *handled = false;
@@ -2498,9 +2498,9 @@ bool
 operation_could_trap_p (enum tree_code op, bool fp_operation, bool honor_trapv,
 			tree divisor)
 {
-  bool honor_nans = (fp_operation && flag_trapping_math
-		     && !flag_finite_math_only);
-  bool honor_snans = fp_operation && flag_signaling_nans != 0;
+  bool honor_nans = (fp_operation && GCC_OPTION (flag_trapping_math)
+		     && !GCC_OPTION (flag_finite_math_only));
+  bool honor_snans = fp_operation && GCC_OPTION (flag_signaling_nans) != 0;
   bool handled;
 
   if (TREE_CODE_CLASS (op) != tcc_comparison
@@ -2748,8 +2748,8 @@ stmt_could_throw_1_p (gimple stmt)
       fp_operation = FLOAT_TYPE_P (t);
       if (fp_operation)
 	{
-	  honor_nans = flag_trapping_math && !flag_finite_math_only;
-	  honor_snans = flag_signaling_nans != 0;
+	  honor_nans = GCC_OPTION (flag_trapping_math) && !GCC_OPTION (flag_finite_math_only);
+	  honor_snans = GCC_OPTION (flag_signaling_nans) != 0;
 	}
       else if (INTEGRAL_TYPE_P (t) && TYPE_OVERFLOW_TRAPS (t))
 	honor_trapv = true;
@@ -2778,7 +2778,7 @@ stmt_could_throw_1_p (gimple stmt)
 bool
 stmt_could_throw_p (gimple stmt)
 {
-  if (!flag_exceptions)
+  if (!GCC_OPTION (flag_exceptions))
     return false;
 
   /* The only statements that can throw an exception are assignments,
@@ -2813,7 +2813,7 @@ stmt_could_throw_p (gimple stmt)
 bool
 tree_could_throw_p (tree t)
 {
-  if (!flag_exceptions)
+  if (!GCC_OPTION (flag_exceptions))
     return false;
   if (TREE_CODE (t) == MODIFY_EXPR)
     {
@@ -3119,7 +3119,7 @@ refactor_eh (void)
 static bool
 gate_refactor_eh (void)
 {
-  return flag_exceptions != 0;
+  return GCC_OPTION (flag_exceptions) != 0;
 }
 
 namespace {
@@ -3346,7 +3346,7 @@ execute_lower_resx (void)
 static bool
 gate_lower_resx (void)
 {
-  return flag_exceptions != 0;
+  return GCC_OPTION (flag_exceptions) != 0;
 }
 
 namespace {
@@ -4561,7 +4561,7 @@ execute_cleanup_eh_1 (void)
     {
       bool changed = false;
 
-      if (optimize)
+      if (GCC_OPTION (optimize))
 	changed |= unsplit_all_eh ();
       changed |= cleanup_all_empty_eh ();
 
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index 0dc340f..19013d3 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -501,7 +501,7 @@ if_convertible_phi_p (struct loop *loop, basic_block bb, gimple phi,
       return false;
     }
 
-  if (flag_tree_loop_if_convert_stores || any_mask_load_store)
+  if (GCC_OPTION (flag_tree_loop_if_convert_stores) || any_mask_load_store)
     return true;
 
   /* When the flag_tree_loop_if_convert_stores is not set, check
@@ -728,7 +728,7 @@ ifcvt_can_use_mask_load_store (gimple stmt)
   basic_block bb = gimple_bb (stmt);
   bool is_load;
 
-  if (!(flag_tree_loop_vectorize || bb->loop_father->force_vect)
+  if (!(GCC_OPTION (flag_tree_loop_vectorize) || bb->loop_father->force_vect)
       || bb->loop_father->dont_vectorize
       || !gimple_assign_single_p (stmt)
       || gimple_has_volatile_ops (stmt))
@@ -808,7 +808,7 @@ if_convertible_gimple_assign_stmt_p (gimple stmt,
      we can perform loop versioning.  */
   gimple_set_plf (stmt, GF_PLF_2, false);
 
-  if (flag_tree_loop_if_convert_stores)
+  if (GCC_OPTION (flag_tree_loop_if_convert_stores))
     {
       if (ifcvt_could_trap_p (stmt, refs))
 	{
@@ -1216,7 +1216,7 @@ if_convertible_loop_p_1 (struct loop *loop,
 	  }
     }
 
-  if (flag_tree_loop_if_convert_stores)
+  if (GCC_OPTION (flag_tree_loop_if_convert_stores))
     {
       data_reference_p dr;
 
@@ -1242,7 +1242,7 @@ if_convertible_loop_p_1 (struct loop *loop,
 	    return false;
     }
 
-  if (flag_tree_loop_if_convert_stores)
+  if (GCC_OPTION (flag_tree_loop_if_convert_stores))
     for (i = 0; i < loop->num_nodes; i++)
       free_bb_predicate (ifc_bbs[i]);
 
@@ -1318,7 +1318,7 @@ if_convertible_loop_p (struct loop *loop, bool *any_mask_load_store)
   res = if_convertible_loop_p_1 (loop, &loop_nest, &refs, &ddrs,
 				 any_mask_load_store);
 
-  if (flag_tree_loop_if_convert_stores)
+  if (GCC_OPTION (flag_tree_loop_if_convert_stores))
     {
       data_reference_p dr;
       unsigned int i;
@@ -1523,7 +1523,7 @@ insert_gimplified_predicates (loop_p loop, bool any_mask_load_store)
       stmts = bb_predicate_gimplified_stmts (bb);
       if (stmts)
 	{
-	  if (flag_tree_loop_if_convert_stores
+	  if (GCC_OPTION (flag_tree_loop_if_convert_stores)
 	      || any_mask_load_store)
 	    {
 	      /* Insert the predicate of the BB just after the label,
@@ -1808,7 +1808,7 @@ combine_blocks (struct loop *loop, bool any_mask_load_store)
   insert_gimplified_predicates (loop, any_mask_load_store);
   predicate_all_scalar_phis (loop);
 
-  if (flag_tree_loop_if_convert_stores || any_mask_load_store)
+  if (GCC_OPTION (flag_tree_loop_if_convert_stores) || any_mask_load_store)
     predicate_mem_writes (loop);
 
   /* Merge basic blocks: first remove all the edges in the loop,
@@ -1950,7 +1950,7 @@ tree_if_conversion (struct loop *loop)
     goto cleanup;
 
   if (any_mask_load_store
-      && ((!flag_tree_loop_vectorize && !loop->force_vect)
+      && ((!GCC_OPTION (flag_tree_loop_vectorize) && !loop->force_vect)
 	  || loop->dont_vectorize))
     goto cleanup;
 
@@ -1963,7 +1963,7 @@ tree_if_conversion (struct loop *loop)
   combine_blocks (loop, any_mask_load_store);
 
   todo |= TODO_cleanup_cfg;
-  if (flag_tree_loop_if_convert_stores || any_mask_load_store)
+  if (GCC_OPTION (flag_tree_loop_if_convert_stores) || any_mask_load_store)
     {
       mark_virtual_operands_for_renaming (cfun);
       todo |= TODO_update_ssa_only_virtuals;
@@ -1996,9 +1996,9 @@ main_tree_if_conversion (void)
     return 0;
 
   FOR_EACH_LOOP (loop, 0)
-    if (flag_tree_loop_if_convert == 1
-	|| flag_tree_loop_if_convert_stores == 1
-	|| ((flag_tree_loop_vectorize || loop->force_vect)
+    if (GCC_OPTION (flag_tree_loop_if_convert) == 1
+	|| GCC_OPTION (flag_tree_loop_if_convert_stores) == 1
+	|| ((GCC_OPTION (flag_tree_loop_vectorize) || loop->force_vect)
 	    && !loop->dont_vectorize))
       todo |= tree_if_conversion (loop);
 
@@ -2018,10 +2018,10 @@ main_tree_if_conversion (void)
 static bool
 gate_tree_if_conversion (void)
 {
-  return (((flag_tree_loop_vectorize || cfun->has_force_vect_loops)
-	   && flag_tree_loop_if_convert != 0)
-	  || flag_tree_loop_if_convert == 1
-	  || flag_tree_loop_if_convert_stores == 1);
+  return (((GCC_OPTION (flag_tree_loop_vectorize) || cfun->has_force_vect_loops)
+	   && GCC_OPTION (flag_tree_loop_if_convert) != 0)
+	  || GCC_OPTION (flag_tree_loop_if_convert) == 1
+	  || GCC_OPTION (flag_tree_loop_if_convert_stores) == 1);
 }
 
 namespace {
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index fc83097..1b15e74 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -570,7 +570,7 @@ remap_decls (tree decls, vec<tree, va_gc> **nonlocalized_list,
 	  if (TREE_CODE (old_var) == VAR_DECL
 	      && ! DECL_EXTERNAL (old_var))
 	    add_local_decl (cfun, old_var);
-	  if ((!optimize || debug_info_level > DINFO_LEVEL_TERSE)
+	  if ((!GCC_OPTION (optimize) || GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
 	      && !DECL_IGNORED_P (old_var)
 	      && nonlocalized_list)
 	    vec_safe_push (*nonlocalized_list, old_var);
@@ -588,7 +588,7 @@ remap_decls (tree decls, vec<tree, va_gc> **nonlocalized_list,
 	;
       else if (!new_var)
         {
-	  if ((!optimize || debug_info_level > DINFO_LEVEL_TERSE)
+	  if ((!GCC_OPTION (optimize) || GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
 	      && !DECL_IGNORED_P (old_var)
 	      && nonlocalized_list)
 	    vec_safe_push (*nonlocalized_list, old_var);
@@ -2935,7 +2935,7 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
      This is important for builtin_constant_p and other construct requiring
      constant argument to be visible in inlined function body.  */
   if (gimple_in_ssa_p (cfun) && rhs && def && is_gimple_reg (p)
-      && (optimize
+      && (GCC_OPTION (optimize)
           || (TREE_READONLY (p)
 	      && is_gimple_min_invariant (rhs)))
       && (TREE_CODE (rhs) == SSA_NAME
@@ -2948,7 +2948,7 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
 
   /* If the value of argument is never used, don't care about initializing
      it.  */
-  if (optimize && gimple_in_ssa_p (cfun) && !def && is_gimple_reg (p))
+  if (GCC_OPTION (optimize) && gimple_in_ssa_p (cfun) && !def && is_gimple_reg (p))
     {
       gcc_assert (!value || !TREE_SIDE_EFFECTS (value));
       return insert_init_debug_bind (id, bb, var, rhs, NULL);
@@ -2978,7 +2978,7 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
 	      SSA_NAME_IS_DEFAULT_DEF (def) = 0;
 	      set_ssa_default_def (cfun, var, NULL);
 	    }
-	  else if (!optimize)
+	  else if (!GCC_OPTION (optimize))
 	    {
 	      def = make_ssa_name (var, NULL);
 	      init_stmt = gimple_build_assign (def, rhs);
@@ -3522,14 +3522,14 @@ tree_inlinable_function_p (tree fn)
     return false;
 
   /* We only warn for functions declared `inline' by the user.  */
-  do_warning = (warn_inline
+  do_warning = (GCC_OPTION (warn_inline)
 		&& DECL_DECLARED_INLINE_P (fn)
 		&& !DECL_NO_INLINE_WARNING_P (fn)
 		&& !DECL_IN_SYSTEM_HEADER (fn));
 
   always_inline = lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn));
 
-  if (flag_no_inline
+  if (GCC_OPTION (flag_no_inline)
       && always_inline == NULL)
     {
       if (do_warning)
@@ -3591,7 +3591,7 @@ estimate_move_cost (tree type)
 
   size = int_size_in_bytes (type);
 
-  if (size < 0 || size > MOVE_MAX_PIECES * MOVE_RATIO (!optimize_size))
+  if (size < 0 || size > MOVE_MAX_PIECES * MOVE_RATIO (!GCC_OPTION (optimize_size)))
     /* Cost of a memcpy call, 3 arguments and the call.  */
     return 4;
   else
@@ -4142,16 +4142,16 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id)
 	  /* During early inline pass, report only when optimization is
 	     not turned on.  */
 	  && (cgraph_global_info_ready
-	      || !optimize
+	      || !GCC_OPTION (optimize)
 	      || cgraph_inline_failed_type (reason) == CIF_FINAL_ERROR)
 	  /* PR 20090218-1_0.c. Body can be provided by another module. */
-	  && (reason != CIF_BODY_NOT_AVAILABLE || !flag_generate_lto))
+	  && (reason != CIF_BODY_NOT_AVAILABLE || !GCC_OPTION (flag_generate_lto)))
 	{
 	  error ("inlining failed in call to always_inline %q+F: %s", fn,
 		 cgraph_inline_failed_string (reason));
 	  error ("called from here");
 	}
-      else if (warn_inline
+      else if (GCC_OPTION (warn_inline)
 	       && DECL_DECLARED_INLINE_P (fn)
 	       && !DECL_NO_INLINE_WARNING_P (fn)
 	       && !DECL_IN_SYSTEM_HEADER (fn)
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 9db92db..bee6aa3 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -1016,7 +1016,7 @@ classify_partition (loop_p loop, struct graph *rdg, partition_t partition)
 
   /* Perform general partition disqualification for builtins.  */
   if (volatiles_p
-      || !flag_tree_loop_distribute_patterns)
+      || !GCC_OPTION (flag_tree_loop_distribute_patterns))
     return;
 
   /* Detect memset and memcpy.  */
@@ -1448,7 +1448,7 @@ distribute_loop (struct loop *loop, vec<gimple> stmts,
 
   /* If we are only distributing patterns but did not detect any,
      simply bail out.  */
-  if (!flag_tree_loop_distribution
+  if (!GCC_OPTION (flag_tree_loop_distribution)
       && !any_builtin)
     {
       nbp = 0;
@@ -1460,7 +1460,7 @@ distribute_loop (struct loop *loop, vec<gimple> stmts,
      a loop into pieces, separated by builtin calls.  That is, we
      only want no or a single loop body remaining.  */
   partition_t into;
-  if (!flag_tree_loop_distribution)
+  if (!GCC_OPTION (flag_tree_loop_distribution))
     {
       for (i = 0; partitions.iterate (i, &into); ++i)
 	if (!partition_builtin_p (into))
@@ -1793,8 +1793,8 @@ out:
 static bool
 gate_tree_loop_distribution (void)
 {
-  return flag_tree_loop_distribution
-    || flag_tree_loop_distribute_patterns;
+  return GCC_OPTION (flag_tree_loop_distribution)
+    || GCC_OPTION (flag_tree_loop_distribute_patterns);
 }
 
 namespace {
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
index df6923f..d048163 100644
--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -892,7 +892,7 @@ get_nonlocal_debug_decl (struct nesting_info *info, tree decl)
   DECL_CHAIN (new_decl) = info->debug_var_chain;
   info->debug_var_chain = new_decl;
 
-  if (!optimize
+  if (!GCC_OPTION (optimize)
       && info->context != target_context
       && variably_modified_type_p (TREE_TYPE (decl), NULL))
     note_nonlocal_vla_type (info, TREE_TYPE (decl));
@@ -1328,7 +1328,7 @@ convert_nonlocal_reference_stmt (gimple_stmt_iterator *gsi, bool *handled_ops_p,
       break;
 
     case GIMPLE_BIND:
-      if (!optimize && gimple_bind_block (stmt))
+      if (!GCC_OPTION (optimize) && gimple_bind_block (stmt))
 	note_nonlocal_block_vlas (info, gimple_bind_block (stmt));
 
       for (tree var = gimple_bind_vars (stmt); var; var = DECL_CHAIN (var))
@@ -2428,12 +2428,12 @@ finalize_nesting_tree_1 (struct nesting_info *root)
     {
       /* In some cases the frame type will trigger the -Wpadded warning.
 	 This is not helpful; suppress it. */
-      int save_warn_padded = warn_padded;
+      int save_warn_padded = GCC_OPTION (warn_padded);
       tree *adjust;
 
-      warn_padded = 0;
+      GCC_OPTION (warn_padded) = 0;
       layout_type (root->frame_type);
-      warn_padded = save_warn_padded;
+      GCC_OPTION (warn_padded) = save_warn_padded;
       layout_decl (root->frame_decl, 0);
 
       /* Remove root->frame_decl from root->new_local_var_chain, so
diff --git a/gcc/tree-nrv.c b/gcc/tree-nrv.c
index b443388..56641ed 100644
--- a/gcc/tree-nrv.c
+++ b/gcc/tree-nrv.c
@@ -275,7 +275,7 @@ tree_nrv (void)
 static bool
 gate_pass_return_slot (void)
 {
-  return optimize > 0;
+  return GCC_OPTION (optimize) > 0;
 }
 
 namespace {
diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c
index d5a635b..7029ecf 100644
--- a/gcc/tree-outof-ssa.c
+++ b/gcc/tree-outof-ssa.c
@@ -87,7 +87,7 @@ ssa_is_replaceable_p (gimple stmt)
     return false;
 
   /* Float expressions must go through memory if float-store is on.  */
-  if (flag_float_store
+  if (GCC_OPTION (flag_float_store)
       && FLOAT_TYPE_P (gimple_expr_type (stmt)))
     return false;
 
@@ -1217,7 +1217,7 @@ rewrite_out_of_ssa (struct ssaexpand *sa)
   if (dump_file && (dump_flags & TDF_DETAILS))
     gimple_dump_cfg (dump_file, dump_flags & ~TDF_DETAILS);
 
-  remove_ssa_form (flag_tree_ter, sa);
+  remove_ssa_form (GCC_OPTION (flag_tree_ter), sa);
 
   if (dump_file && (dump_flags & TDF_DETAILS))
     gimple_dump_cfg (dump_file, dump_flags & ~TDF_DETAILS);
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index 47179a9..9c90a1a 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -2143,7 +2143,7 @@ try_create_reduction_list (loop_p loop,
 bool
 parallelize_loops (void)
 {
-  unsigned n_threads = flag_tree_parallelize_loops;
+  unsigned n_threads = GCC_OPTION (flag_tree_parallelize_loops);
   bool changed = false;
   struct loop *loop;
   struct tree_niter_desc niter_desc;
@@ -2176,7 +2176,7 @@ parallelize_loops (void)
 
       /* If we use autopar in graphite pass, we use its marked dependency
       checking results.  */
-      if (flag_loop_parallelize_all && !loop->can_be_parallel)
+      if (GCC_OPTION (flag_loop_parallelize_all) && !loop->can_be_parallel)
       {
         if (dump_file && (dump_flags & TDF_DETAILS))
 	   fprintf (dump_file, "loop is not parallel according to graphite\n");
@@ -2205,7 +2205,7 @@ parallelize_loops (void)
 	estimated = max_stmt_executions_int (loop);
       /* FIXME: Bypass this check as graphite doesn't update the
 	 count and frequency correctly now.  */
-      if (!flag_loop_parallelize_all
+      if (!GCC_OPTION (flag_loop_parallelize_all)
 	  && ((estimated != -1
 	       && estimated <= (HOST_WIDE_INT) n_threads * MIN_PER_THREAD)
 	      /* Do not bother with loops in cold areas.  */
@@ -2218,7 +2218,7 @@ parallelize_loops (void)
       if (!try_create_reduction_list (loop, reduction_list))
 	continue;
 
-      if (!flag_loop_parallelize_all
+      if (!GCC_OPTION (flag_loop_parallelize_all)
 	  && !loop_parallel_p (loop, &parloop_obstack))
 	continue;
 
@@ -2256,7 +2256,7 @@ parallelize_loops (void)
 static bool
 gate_tree_parallelize_loops (void)
 {
-  return flag_tree_parallelize_loops > 1;
+  return GCC_OPTION (flag_tree_parallelize_loops) > 1;
 }
 
 static unsigned
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index 730bad4..5d968fb 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -1976,7 +1976,7 @@ static bool
 may_reassociate_p (tree type, enum tree_code code)
 {
   if (FLOAT_TYPE_P (type)
-      && !flag_unsafe_math_optimizations)
+      && !GCC_OPTION (flag_unsafe_math_optimizations))
     return false;
 
   return (commutative_tree_code (code)
@@ -2576,7 +2576,7 @@ run_tree_predictive_commoning (void)
 static bool
 gate_tree_predictive_commoning (void)
 {
-  return flag_predictive_commoning != 0;
+  return GCC_OPTION (flag_predictive_commoning) != 0;
 }
 
 namespace {
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 02e9ff2..b960107 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -86,7 +86,7 @@ init_ic_make_global_vars (void)
   ptr_void = build_pointer_type (void_type_node);
 
   /* Workaround for binutils bug 14342.  Once it is fixed, remove lto path.  */
-  if (flag_lto)
+  if (GCC_OPTION (flag_lto))
     {
       ic_void_ptr_var
 	= build_decl (UNKNOWN_LOCATION, VAR_DECL,
@@ -117,7 +117,7 @@ init_ic_make_global_vars (void)
 
   gcov_type_ptr = build_pointer_type (get_gcov_type ());
   /* Workaround for binutils bug 14342.  Once it is fixed, remove lto path.  */
-  if (flag_lto)
+  if (GCC_OPTION (flag_lto))
     {
       ic_gcov_type_ptr_var
 	= build_decl (UNKNOWN_LOCATION, VAR_DECL,
@@ -207,7 +207,7 @@ gimple_init_edge_profiler (void)
       init_ic_make_global_vars ();
 
       /* Workaround for binutils bug 14342.  Once it is fixed, remove lto path.  */
-      if (flag_lto)
+      if (GCC_OPTION (flag_lto))
         {
 	  /* void (*) (gcov_type, void *)  */
 	  ic_profiler_fn_type
@@ -455,7 +455,7 @@ gimple_gen_ic_func_profiler (void)
   tree_uid = build_int_cst
 	      (gcov_type_node, cgraph_get_node (current_function_decl)->profile_id);
   /* Workaround for binutils bug 14342.  Once it is fixed, remove lto path.  */
-  if (flag_lto)
+  if (GCC_OPTION (flag_lto))
     {
       tree counter_ptr, ptr_var;
       counter_ptr = force_gimple_operand_gsi (&gsi, ic_gcov_type_ptr_var,
@@ -588,13 +588,13 @@ tree_profiling (void)
 
       branch_prob ();
 
-      if (! flag_branch_probabilities
-	  && flag_profile_values)
+      if (! GCC_OPTION (flag_branch_probabilities)
+	  && GCC_OPTION (flag_profile_values))
 	gimple_gen_ic_func_profiler ();
 
-      if (flag_branch_probabilities
-	  && flag_profile_values
-	  && flag_value_profile_transformations)
+      if (GCC_OPTION (flag_branch_probabilities)
+	  && GCC_OPTION (flag_profile_values)
+	  && GCC_OPTION (flag_value_profile_transformations))
 	gimple_value_profile_transformations ();
 
       /* The above could hose dominator info.  Currently there is
@@ -668,9 +668,9 @@ tree_profiling (void)
 static bool
 gate_tree_profile_ipa (void)
 {
-  return (!in_lto_p
-	  && (flag_branch_probabilities || flag_test_coverage
-	      || profile_arc_flag));
+  return (!GCC_OPTION (in_lto_p)
+	  && (GCC_OPTION (flag_branch_probabilities) || GCC_OPTION (flag_test_coverage)
+	      || GCC_OPTION (profile_arc_flag)));
 }
 
 namespace {
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 284d544..c9a8ae2 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -3482,7 +3482,7 @@ late_intra_sra (void)
 static bool
 gate_intra_sra (void)
 {
-  return flag_tree_sra != 0 && dbg_cnt (tree_sra);
+  return GCC_OPTION (flag_tree_sra) != 0 && dbg_cnt (tree_sra);
 }
 
 
@@ -5033,7 +5033,7 @@ ipa_early_sra (void)
 static bool
 ipa_early_sra_gate (void)
 {
-  return flag_ipa_sra && dbg_cnt (eipa_sra);
+  return GCC_OPTION (flag_ipa_sra) && dbg_cnt (eipa_sra);
 }
 
 namespace {
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index e706275..33b3eca 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -943,7 +943,7 @@ indirect_ref_may_alias_decl_p (tree ref1 ATTRIBUTE_UNUSED, tree base1,
     return false;
 
   /* Disambiguations that rely on strict aliasing rules follow.  */
-  if (!flag_strict_aliasing || !tbaa_p)
+  if (!GCC_OPTION (flag_strict_aliasing) || !tbaa_p)
     return true;
 
   ptrtype1 = TREE_TYPE (TREE_OPERAND (base1, 1));
@@ -1110,7 +1110,7 @@ indirect_refs_may_alias_p (tree ref1 ATTRIBUTE_UNUSED, tree base1,
     return false;
 
   /* Disambiguations that rely on strict aliasing rules follow.  */
-  if (!flag_strict_aliasing || !tbaa_p)
+  if (!GCC_OPTION (flag_strict_aliasing) || !tbaa_p)
     return true;
 
   ptrtype1 = TREE_TYPE (TREE_OPERAND (base1, 1));
@@ -1254,7 +1254,7 @@ refs_may_alias_p_1 (ao_ref *ref1, ao_ref *ref2, bool tbaa_p)
 
   /* First defer to TBAA if possible.  */
   if (tbaa_p
-      && flag_strict_aliasing
+      && GCC_OPTION (flag_strict_aliasing)
       && !alias_sets_conflict_p (ao_ref_alias_set (ref1),
 				 ao_ref_alias_set (ref2)))
     return false;
@@ -1830,7 +1830,7 @@ call_may_clobber_ref_p_1 (gimple call, ao_ref *ref)
 	case BUILT_IN_STRDUP:
 	case BUILT_IN_STRNDUP:
 	  /* Unix98 specifies that errno is set on allocation failure.  */
-	  if (flag_errno_math
+	  if (GCC_OPTION (flag_errno_math)
 	      && targetm.ref_may_alias_errno (ref))
 	    return true;
 	  return false;
@@ -1848,7 +1848,7 @@ call_may_clobber_ref_p_1 (gimple call, ao_ref *ref)
 	    ao_ref_init_from_ptr_and_size (&dref, ptrptr,
 					   TYPE_SIZE_UNIT (ptr_type_node));
 	    return (refs_may_alias_p_1 (&dref, ref, false)
-		    || (flag_errno_math
+		    || (GCC_OPTION (flag_errno_math)
 			&& targetm.ref_may_alias_errno (ref)));
 	  }
 	/* Freeing memory kills the pointed-to memory.  More importantly
@@ -1870,7 +1870,7 @@ call_may_clobber_ref_p_1 (gimple call, ao_ref *ref)
 	    tree out = gimple_call_arg (call, 1);
 	    if (ptr_deref_may_alias_ref_p_1 (out, ref))
 	      return true;
-	    if (flag_errno_math)
+	    if (GCC_OPTION (flag_errno_math))
 	      break;
 	    return false;
 	  }
@@ -1891,7 +1891,7 @@ call_may_clobber_ref_p_1 (gimple call, ao_ref *ref)
 	    tree out = gimple_call_arg (call, 2);
 	    if (ptr_deref_may_alias_ref_p_1 (out, ref))
 	      return true;
-	    if (flag_errno_math)
+	    if (GCC_OPTION (flag_errno_math))
 	      break;
 	    return false;
 	  }
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index eeefeaf..48a56ab 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -270,7 +270,7 @@ get_default_value (tree var)
 	{
 	  val.lattice_val = VARYING;
 	  val.mask = double_int_minus_one;
-	  if (flag_tree_bit_ccp)
+	  if (GCC_OPTION (flag_tree_bit_ccp))
 	    {
 	      double_int nonzero_bits = get_nonzero_bits (var);
 	      double_int mask
@@ -1665,7 +1665,7 @@ evaluate_stmt (gimple stmt)
     }
 
   /* Resort to simplification for bitwise tracking.  */
-  if (flag_tree_bit_ccp
+  if (GCC_OPTION (flag_tree_bit_ccp)
       && (likelyvalue == CONSTANT || is_gimple_call (stmt))
       && !is_constant)
     {
@@ -1783,7 +1783,7 @@ evaluate_stmt (gimple stmt)
       is_constant = (val.lattice_val == CONSTANT);
     }
 
-  if (flag_tree_bit_ccp
+  if (GCC_OPTION (flag_tree_bit_ccp)
       && ((is_constant && TREE_CODE (val.value) == INTEGER_CST)
 	  || (!is_constant && likelyvalue != UNDEFINED))
       && gimple_get_lhs (stmt)
@@ -2290,7 +2290,7 @@ do_ssa_ccp (void)
 static bool
 gate_ccp (void)
 {
-  return flag_tree_ccp != 0;
+  return GCC_OPTION (flag_tree_ccp) != 0;
 }
 
 
diff --git a/gcc/tree-ssa-coalesce.c b/gcc/tree-ssa-coalesce.c
index 9a1ac67..2ccc876 100644
--- a/gcc/tree-ssa-coalesce.c
+++ b/gcc/tree-ssa-coalesce.c
@@ -1265,7 +1265,7 @@ coalesce_ssa_name (void)
 
   /* If optimization is disabled, we need to coalesce all the names originating
      from the same SSA_NAME_VAR so debug info remains undisturbed.  */
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     {
       hash_table <ssa_name_var_hash> ssa_name_hash;
 
@@ -1294,7 +1294,7 @@ coalesce_ssa_name (void)
 		     originally with optimizations and only the link
 		     performed at -O0, so we can't actually require it.  */
 		  const int cost
-		    = (TREE_CODE (SSA_NAME_VAR (a)) == VAR_DECL || in_lto_p)
+		    = (TREE_CODE (SSA_NAME_VAR (a)) == VAR_DECL || GCC_OPTION (in_lto_p))
 		      ? MUST_COALESCE_COST - 1 : MUST_COALESCE_COST;
 		  add_coalesce (cl, SSA_NAME_VERSION (a),
 				SSA_NAME_VERSION (*slot), cost);
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c
index 02f4743..a18ca53 100644
--- a/gcc/tree-ssa-copy.c
+++ b/gcc/tree-ssa-copy.c
@@ -647,7 +647,7 @@ execute_copy_prop (void)
 static bool
 gate_copy_prop (void)
 {
-  return flag_tree_copy_prop != 0;
+  return GCC_OPTION (flag_tree_copy_prop) != 0;
 }
 
 namespace {
diff --git a/gcc/tree-ssa-copyrename.c b/gcc/tree-ssa-copyrename.c
index bc947b6..400ffda 100644
--- a/gcc/tree-ssa-copyrename.c
+++ b/gcc/tree-ssa-copyrename.c
@@ -206,11 +206,11 @@ copy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug)
   /* Refrain from coalescing user variables, if requested.  */
   if (!ign1 && !ign2)
     {
-      if (flag_ssa_coalesce_vars && DECL_FROM_INLINE (root2))
+      if (GCC_OPTION (flag_ssa_coalesce_vars) && DECL_FROM_INLINE (root2))
 	ign2 = true;
-      else if (flag_ssa_coalesce_vars && DECL_FROM_INLINE (root1))
+      else if (GCC_OPTION (flag_ssa_coalesce_vars) && DECL_FROM_INLINE (root1))
 	ign1 = true;
-      else if (flag_ssa_coalesce_vars != 2)
+      else if (GCC_OPTION (flag_ssa_coalesce_vars) != 2)
 	{
 	  if (debug)
 	    fprintf (debug, " : 2 different USER vars. No coalesce.\n");
@@ -440,7 +440,7 @@ rename_ssa_copies (void)
 static bool
 gate_copyrename (void)
 {
-  return flag_tree_copyrename != 0;
+  return GCC_OPTION (flag_tree_copyrename) != 0;
 }
 
 namespace {
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c
index 13a71ce..384900a 100644
--- a/gcc/tree-ssa-dce.c
+++ b/gcc/tree-ssa-dce.c
@@ -1501,13 +1501,13 @@ tree_ssa_dce_loop (void)
 static unsigned int
 tree_ssa_cd_dce (void)
 {
-  return perform_tree_ssa_dce (/*aggressive=*/optimize >= 2);
+  return perform_tree_ssa_dce (/*aggressive=*/GCC_OPTION (optimize) >= 2);
 }
 
 static bool
 gate_dce (void)
 {
-  return flag_tree_dce != 0;
+  return GCC_OPTION (flag_tree_dce) != 0;
 }
 
 namespace {
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 91253dc..2f821b0 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -955,7 +955,7 @@ tree_ssa_dominator_optimize (void)
 static bool
 gate_dominator (void)
 {
-  return flag_tree_dom != 0;
+  return GCC_OPTION (flag_tree_dom) != 0;
 }
 
 namespace {
diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c
index 2c2f3f7..c88df78 100644
--- a/gcc/tree-ssa-dse.c
+++ b/gcc/tree-ssa-dse.c
@@ -366,7 +366,7 @@ tree_ssa_dse (void)
 static bool
 gate_dse (void)
 {
-  return flag_tree_dse != 0;
+  return GCC_OPTION (flag_tree_dse) != 0;
 }
 
 namespace {
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index b229429..7f7df51 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -3840,7 +3840,7 @@ ssa_forward_propagate_and_combine (void)
 static bool
 gate_forwprop (void)
 {
-  return flag_tree_forwprop;
+  return GCC_OPTION (flag_tree_forwprop);
 }
 
 namespace {
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c
index 3cd3613..7dbfd3f 100644
--- a/gcc/tree-ssa-live.c
+++ b/gcc/tree-ssa-live.c
@@ -556,8 +556,8 @@ remove_unused_scope_block_p (tree scope)
 	 information is being generated.  */
 
       else if (TREE_CODE (*t) == TYPE_DECL
-	       || debug_info_level == DINFO_LEVEL_NORMAL
-	       || debug_info_level == DINFO_LEVEL_VERBOSE)
+	       || GCC_OPTION (debug_info_level) == DINFO_LEVEL_NORMAL
+	       || GCC_OPTION (debug_info_level) == DINFO_LEVEL_VERBOSE)
 	;
       else
 	{
@@ -607,7 +607,7 @@ remove_unused_scope_block_p (tree scope)
      ;
    /* When not generating debug info we can eliminate info on unused
       variables.  */
-   else if (debug_info_level == DINFO_LEVEL_NONE)
+   else if (GCC_OPTION (debug_info_level) == DINFO_LEVEL_NONE)
      {
        /* Even for -g0 don't prune outer scopes from artificial
 	  functions, otherwise diagnostics using tree_nonartificial_location
@@ -782,7 +782,7 @@ remove_unused_locals (void)
   /* Removing declarations from lexical blocks when not optimizing is
      not only a waste of time, it actually causes differences in stack
      layout.  */
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     return;
 
   timevar_push (TV_REMOVE_UNUSED);
diff --git a/gcc/tree-ssa-loop-ch.c b/gcc/tree-ssa-loop-ch.c
index 0a6b1c1..9d0f8f9 100644
--- a/gcc/tree-ssa-loop-ch.c
+++ b/gcc/tree-ssa-loop-ch.c
@@ -218,7 +218,7 @@ copy_loop_headers (void)
 	 about that case for -Wstrict-overflow, because in general we
 	 don't warn about overflow involving loops.  Prevent the
 	 warning by setting the no_warning flag in the condition.  */
-      if (warn_strict_overflow > 0)
+      if (GCC_OPTION (warn_strict_overflow) > 0)
 	{
 	  unsigned int i;
 
@@ -260,7 +260,7 @@ copy_loop_headers (void)
 static bool
 gate_ch (void)
 {
-  return flag_tree_ch != 0;
+  return GCC_OPTION (flag_tree_ch) != 0;
 }
 
 namespace {
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index c75f257..525b6d4 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -285,7 +285,7 @@ movement_possibility (gimple stmt)
   tree lhs;
   enum move_pos ret = MOVE_POSSIBLE;
 
-  if (flag_unswitch_loops
+  if (GCC_OPTION (flag_unswitch_loops)
       && gimple_code (stmt) == GIMPLE_COND)
     {
       /* If we perform unswitching, force the operands of the invariant
@@ -350,7 +350,7 @@ movement_possibility (gimple stmt)
   /* Non local loads in a transaction cannot be hoisted out.  Well,
      unless the load happens on every path out of the loop, but we
      don't take this into account yet.  */
-  if (flag_tm
+  if (GCC_OPTION (flag_tm)
       && gimple_in_transaction (stmt)
       && gimple_assign_single_p (stmt))
     {
@@ -1083,8 +1083,8 @@ invariantness_dom_walker::before_dom_children (basic_block bb)
 	     to be hoisted out of loop, saving expensive divide.  */
 	  if (pos == MOVE_POSSIBLE
 	      && gimple_assign_rhs_code (stmt) == RDIV_EXPR
-	      && flag_unsafe_math_optimizations
-	      && !flag_trapping_math
+	      && GCC_OPTION (flag_unsafe_math_optimizations)
+	      && !GCC_OPTION (flag_trapping_math)
 	      && ol1 != NULL
 	      && outermost_invariant_loop (op0, ol1) == NULL)
 	    stmt = rewrite_reciprocal (&bsi);
@@ -1619,7 +1619,7 @@ mem_refs_may_alias_p (mem_ref_p mem1, mem_ref_p mem2,
 
   /* The expansion of addresses may be a bit expensive, thus we only do
      the check at -O2 and higher optimization levels.  */
-  if (optimize < 2)
+  if (GCC_OPTION (optimize) < 2)
     return true;
 
   get_inner_reference_aff (mem1->mem.ref, &off1, &size1);
@@ -2422,7 +2422,7 @@ tree_ssa_lim_initialize (void)
   gcc_obstack_init (&mem_ref_obstack);
   lim_aux_data_map = pointer_map_create ();
 
-  if (flag_tm)
+  if (GCC_OPTION (flag_tm))
     compute_transaction_bits ();
 
   alloc_aux_for_edges (0);
@@ -2541,7 +2541,7 @@ tree_ssa_loop_im (void)
 static bool
 gate_tree_ssa_loop_im (void)
 {
-  return flag_tree_loop_im != 0;
+  return GCC_OPTION (flag_tree_loop_im) != 0;
 }
 
 namespace {
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index b475b06..bddbdfc 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -1146,7 +1146,7 @@ tree_unroll_loops_completely_1 (bool may_increase_size, bool unroll_outer,
     ul = UL_NO_GROWTH;
 
   if (canonicalize_loop_induction_variables
-        (loop, false, ul, !flag_tree_loop_ivcanon))
+        (loop, false, ul, !GCC_OPTION (flag_tree_loop_ivcanon)))
     {
       /* If we'll continue unrolling, we need to propagate constants
 	 within the new basic blocks to fold away induction variable
@@ -1268,7 +1268,7 @@ tree_ssa_loop_ivcanon (void)
 static bool
 gate_tree_ssa_loop_ivcanon (void)
 {
-  return flag_tree_loop_ivcanon != 0;
+  return GCC_OPTION (flag_tree_loop_ivcanon) != 0;
 }
 
 namespace {
@@ -1317,9 +1317,9 @@ tree_complete_unroll (void)
   if (number_of_loops (cfun) <= 1)
     return 0;
 
-  return tree_unroll_loops_completely (flag_unroll_loops
-				       || flag_peel_loops
-				       || optimize >= 3, true);
+  return tree_unroll_loops_completely (GCC_OPTION (flag_unroll_loops)
+				       || GCC_OPTION (flag_peel_loops)
+				       || GCC_OPTION (optimize) >= 3, true);
 }
 
 static bool
@@ -1378,7 +1378,7 @@ tree_complete_unroll_inner (void)
   if (number_of_loops (cfun) > 1)
     {
       scev_initialize ();
-      ret = tree_unroll_loops_completely (optimize >= 3, false);
+      ret = tree_unroll_loops_completely (GCC_OPTION (optimize) >= 3, false);
       free_numbers_of_iterations_estimates ();
       scev_finalize ();
     }
@@ -1390,7 +1390,7 @@ tree_complete_unroll_inner (void)
 static bool
 gate_tree_complete_unroll_inner (void)
 {
-  return optimize >= 2;
+  return GCC_OPTION (optimize) >= 2;
 }
 
 namespace {
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index 7628363..bd3d740 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -1983,7 +1983,7 @@ number_of_iterations_exit (struct loop *loop, edge exit,
       return false;
     }
 
-  if (optimize >= 3)
+  if (GCC_OPTION (optimize) >= 3)
     {
       niter->assumptions = simplify_using_outer_evolutions (loop,
 							    niter->assumptions);
@@ -2014,7 +2014,7 @@ number_of_iterations_exit (struct loop *loop, edge exit,
   if (integer_zerop (niter->assumptions) || !single_exit (loop))
     return false;
 
-  if (flag_unsafe_loop_optimizations)
+  if (GCC_OPTION (flag_unsafe_loop_optimizations))
     niter->assumptions = boolean_true_node;
 
   if (warn)
@@ -2029,12 +2029,12 @@ number_of_iterations_exit (struct loop *loop, edge exit,
 	     && (integer_onep (iv1.step) || integer_all_onesp (iv1.step)))
 	  : (integer_onep (iv0.step) || integer_all_onesp (iv0.step)))
         wording =
-          flag_unsafe_loop_optimizations
+          GCC_OPTION (flag_unsafe_loop_optimizations)
           ? N_("assuming that the loop is not infinite")
           : N_("cannot optimize possibly infinite loops");
       else
 	wording =
-	  flag_unsafe_loop_optimizations
+	  GCC_OPTION (flag_unsafe_loop_optimizations)
 	  ? N_("assuming that the loop counter does not overflow")
 	  : N_("cannot optimize loop, the loop counter may overflow");
 
@@ -2042,7 +2042,7 @@ number_of_iterations_exit (struct loop *loop, edge exit,
 		  OPT_Wunsafe_loop_optimizations, "%s", gettext (wording));
     }
 
-  return flag_unsafe_loop_optimizations;
+  return GCC_OPTION (flag_unsafe_loop_optimizations);
 }
 
 /* Try to determine the number of iterations of LOOP.  If we succeed,
@@ -2118,7 +2118,7 @@ finite_loop_p (struct loop *loop)
   double_int nit;
   int flags;
 
-  if (flag_unsafe_loop_optimizations)
+  if (GCC_OPTION (flag_unsafe_loop_optimizations))
     return true;
   flags = flags_from_decl_or_type (current_function_decl);
   if ((flags & (ECF_CONST|ECF_PURE)) && !(flags & ECF_LOOPING_CONST_OR_PURE))
@@ -2396,7 +2396,7 @@ find_loop_niter_by_eval (struct loop *loop, edge *exit)
   *exit = NULL;
 
   /* Loops with multiple exits are expensive to handle and less important.  */
-  if (!flag_expensive_optimizations
+  if (!GCC_OPTION (flag_expensive_optimizations)
       && exits.length () > 1)
     {
       exits.release ();
@@ -2610,7 +2610,7 @@ do_warn_aggressive_loop_optimizations (struct loop *loop,
   /* Don't warn if the loop doesn't have known constant bound.  */
   if (!loop->nb_iterations
       || TREE_CODE (loop->nb_iterations) != INTEGER_CST
-      || !warn_aggressive_loop_optimizations
+      || !GCC_OPTION (warn_aggressive_loop_optimizations)
       /* To avoid warning multiple times for the same loop,
 	 only start warning when we preserve loops.  */
       || (cfun->curr_properties & PROP_loops) == 0
@@ -2974,7 +2974,7 @@ infer_loop_bounds_from_pointer_arith (struct loop *loop, gimple stmt)
      NULL pointer since that would mean wrapping, which we assume here not to
      happen.  So, we can exclude NULL from the valid range of pointer
      arithmetic.  */
-  if (flag_delete_null_pointer_checks && int_cst_value (low) == 0)
+  if (GCC_OPTION (flag_delete_null_pointer_checks) && int_cst_value (low) == 0)
     low = build_int_cstu (TREE_TYPE (low), TYPE_ALIGN_UNIT (TREE_TYPE (type)));
 
   record_nonwrapping_iv (loop, base, step, stmt, low, high, false, true);
@@ -3437,7 +3437,7 @@ estimate_numbers_of_iterations_loop (struct loop *loop)
     }
   exits.release ();
 
-  if (flag_aggressive_loop_optimizations)
+  if (GCC_OPTION (flag_aggressive_loop_optimizations))
     infer_loop_bounds_from_undefined (loop);
 
   discover_iteration_bound_by_body_walk (loop);
diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c
index c0968c8..333fcaf 100644
--- a/gcc/tree-ssa-loop-prefetch.c
+++ b/gcc/tree-ssa-loop-prefetch.c
@@ -2016,7 +2016,7 @@ tree_ssa_loop_prefetch (void)
 static bool
 gate_tree_ssa_loop_prefetch (void)
 {
-  return flag_prefetch_loop_arrays > 0;
+  return GCC_OPTION (flag_prefetch_loop_arrays) > 0;
 }
 
 namespace {
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index 5031378..55027e4 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -414,7 +414,7 @@ tree_ssa_loop_unswitch (void)
 static bool
 gate_tree_ssa_loop_unswitch (void)
 {
-  return flag_unswitch_loops != 0;
+  return GCC_OPTION (flag_unswitch_loops) != 0;
 }
 
 namespace {
diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
index e71519a..7048309 100644
--- a/gcc/tree-ssa-loop.c
+++ b/gcc/tree-ssa-loop.c
@@ -47,7 +47,7 @@ along with GCC; see the file COPYING3.  If not see
 static bool
 gate_tree_loop (void)
 {
-  return flag_tree_loop_optimize != 0;
+  return GCC_OPTION (flag_tree_loop_optimize) != 0;
 }
 
 namespace {
@@ -157,7 +157,7 @@ tree_loop_vectorize (void)
 static bool
 gate_tree_loop_vectorize (void)
 {
-  return flag_tree_loop_vectorize || cfun->has_force_vect_loops;
+  return GCC_OPTION (flag_tree_loop_vectorize) || cfun->has_force_vect_loops;
 }
 
 namespace {
@@ -213,7 +213,7 @@ check_data_deps (void)
 static bool
 gate_check_data_deps (void)
 {
-  return flag_check_data_deps != 0;
+  return GCC_OPTION (flag_check_data_deps) != 0;
 }
 
 namespace {
@@ -259,7 +259,7 @@ make_pass_check_data_deps (gcc::context *ctxt)
 static bool
 gate_scev_const_prop (void)
 {
-  return flag_tree_scev_cprop;
+  return GCC_OPTION (flag_tree_scev_cprop);
 }
 
 namespace {
@@ -366,7 +366,7 @@ tree_ssa_loop_ivopts (void)
 static bool
 gate_tree_ssa_loop_ivopts (void)
 {
-  return flag_ivopts != 0;
+  return GCC_OPTION (flag_ivopts) != 0;
 }
 
 namespace {
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index 9ff857c..e451974 100644
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -316,7 +316,7 @@ compute_merit (struct occurrence *occ)
       if (occ_child->children)
         compute_merit (occ_child);
 
-      if (flag_exceptions)
+      if (GCC_OPTION (flag_exceptions))
 	bb = single_noncomplex_succ (dom);
       else
 	bb = dom;
@@ -359,7 +359,7 @@ insert_reciprocals (gimple_stmt_iterator *def_gsi, struct occurrence *occ,
   struct occurrence *occ_child;
 
   if (!recip_def
-      && (occ->bb_has_division || !flag_trapping_math)
+      && (occ->bb_has_division || !GCC_OPTION (flag_trapping_math))
       && occ->num_divisions >= threshold)
     {
       /* Make a variable with the replacement and substitute it.  */
@@ -507,7 +507,7 @@ execute_cse_reciprocals_1 (gimple_stmt_iterator *def_gsi, tree def)
 static bool
 gate_cse_reciprocals (void)
 {
-  return optimize && flag_reciprocal_math;
+  return GCC_OPTION (optimize) && GCC_OPTION (flag_reciprocal_math);
 }
 
 /* Go through all the floating-point SSA_NAMEs, and call
@@ -1161,7 +1161,7 @@ gimple_expand_builtin_pow (gimple_stmt_iterator *gsi, location_t loc,
 
   if (c_is_int
       && ((n >= -1 && n <= 2)
-	  || (flag_unsafe_math_optimizations
+	  || (GCC_OPTION (flag_unsafe_math_optimizations)
 	      && optimize_insn_for_speed_p ()
 	      && powi_cost (n) <= POWI_MAX_MULTS)))
     return gimple_expand_builtin_powi (gsi, loc, arg0, n);
@@ -1187,7 +1187,7 @@ gimple_expand_builtin_pow (gimple_stmt_iterator *gsi, location_t loc,
   SET_REAL_EXP (&dconst1_4, REAL_EXP (&dconst1_4) - 2);
   hw_sqrt_exists = optab_handler (sqrt_optab, mode) != CODE_FOR_nothing;
 
-  if (flag_unsafe_math_optimizations
+  if (GCC_OPTION (flag_unsafe_math_optimizations)
       && sqrtfn
       && REAL_VALUES_EQUAL (c, dconst1_4)
       && hw_sqrt_exists)
@@ -1205,7 +1205,7 @@ gimple_expand_builtin_pow (gimple_stmt_iterator *gsi, location_t loc,
   real_from_integer (&dconst3_4, VOIDmode, 3, 0, 0);
   SET_REAL_EXP (&dconst3_4, REAL_EXP (&dconst3_4) - 2);
 
-  if (flag_unsafe_math_optimizations
+  if (GCC_OPTION (flag_unsafe_math_optimizations)
       && sqrtfn
       && optimize_function_for_speed_p (cfun)
       && REAL_VALUES_EQUAL (c, dconst3_4)
@@ -1231,7 +1231,7 @@ gimple_expand_builtin_pow (gimple_stmt_iterator *gsi, location_t loc,
   cbrtfn = mathfn_built_in (type, BUILT_IN_CBRT);
   dconst1_3 = real_value_truncate (mode, dconst_third ());
 
-  if (flag_unsafe_math_optimizations
+  if (GCC_OPTION (flag_unsafe_math_optimizations)
       && cbrtfn
       && (gimple_val_nonnegative_real_p (arg0) || !HONOR_NANS (mode))
       && REAL_VALUES_EQUAL (c, dconst1_3))
@@ -1242,7 +1242,7 @@ gimple_expand_builtin_pow (gimple_stmt_iterator *gsi, location_t loc,
   dconst1_6 = dconst1_3;
   SET_REAL_EXP (&dconst1_6, REAL_EXP (&dconst1_6) - 1);
 
-  if (flag_unsafe_math_optimizations
+  if (GCC_OPTION (flag_unsafe_math_optimizations)
       && sqrtfn
       && cbrtfn
       && (gimple_val_nonnegative_real_p (arg0) || !HONOR_NANS (mode))
@@ -1269,7 +1269,7 @@ gimple_expand_builtin_pow (gimple_stmt_iterator *gsi, location_t loc,
   real_from_integer (&cint, VOIDmode, n, n < 0 ? -1 : 0, 0);
   c2_is_int = real_identical (&c2, &cint);
 
-  if (flag_unsafe_math_optimizations
+  if (GCC_OPTION (flag_unsafe_math_optimizations)
       && sqrtfn
       && c2_is_int
       && !c_is_int
@@ -1322,7 +1322,7 @@ gimple_expand_builtin_pow (gimple_stmt_iterator *gsi, location_t loc,
   real_arithmetic (&c2, RDIV_EXPR, &cint, &dconst3);
   real_convert (&c2, mode, &c2);
 
-  if (flag_unsafe_math_optimizations
+  if (GCC_OPTION (flag_unsafe_math_optimizations)
       && cbrtfn
       && (gimple_val_nonnegative_real_p (arg0) || !HONOR_NANS (mode))
       && real_identical (&c2, &c)
@@ -1386,7 +1386,7 @@ gimple_expand_builtin_cabs (gimple_stmt_iterator *gsi, location_t loc, tree arg)
   tree sqrtfn = mathfn_built_in (type, BUILT_IN_SQRT);
   enum machine_mode mode = TYPE_MODE (type);
 
-  if (!flag_unsafe_math_optimizations
+  if (!GCC_OPTION (flag_unsafe_math_optimizations)
       || !optimize_bb_for_speed_p (gimple_bb (gsi_stmt (*gsi)))
       || !sqrtfn
       || optab_handler (sqrt_optab, mode) == CODE_FOR_nothing)
@@ -1568,7 +1568,7 @@ gate_cse_sincos (void)
 {
   /* We no longer require either sincos or cexp, since powi expansion
      piggybacks on this pass.  */
-  return optimize;
+  return GCC_OPTION (optimize);
 }
 
 namespace {
@@ -2070,7 +2070,7 @@ execute_optimize_bswap (void)
 static bool
 gate_optimize_bswap (void)
 {
-  return flag_expensive_optimizations && optimize;
+  return GCC_OPTION (flag_expensive_optimizations) && GCC_OPTION (optimize);
 }
 
 namespace {
@@ -2592,7 +2592,7 @@ convert_mult_to_fma (gimple mul_stmt, tree op1, tree op2)
   imm_use_iterator imm_iter;
 
   if (FLOAT_TYPE_P (type)
-      && flag_fp_contract_mode == FP_CONTRACT_OFF)
+      && GCC_OPTION (flag_fp_contract_mode) == FP_CONTRACT_OFF)
     return false;
 
   /* We don't want to do bitfield reduction ops.  */
@@ -2880,7 +2880,7 @@ execute_optimize_widening_mul (void)
 static bool
 gate_optimize_widening_mul (void)
 {
-  return flag_expensive_optimizations && optimize;
+  return GCC_OPTION (flag_expensive_optimizations) && GCC_OPTION (optimize);
 }
 
 namespace {
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index 352ccca..8170efa 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -477,7 +477,7 @@ append_use (tree *use_p)
 static inline void
 append_vdef (tree var)
 {
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     return;
 
   gcc_assert ((build_vdef == NULL_TREE
@@ -495,7 +495,7 @@ append_vdef (tree var)
 static inline void
 append_vuse (tree var)
 {
-  if (!optimize)
+  if (!GCC_OPTION (optimize))
     return;
 
   gcc_assert (build_vuse == NULL_TREE
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index 95cf4d4..3514cb4 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -349,11 +349,11 @@ tree_ssa_phiopt_worker (bool do_store_elim, bool do_hoist_loads)
   bool replace_conditional_negation = false;
   if (!do_store_elim)
     replace_conditional_negation
-      = ((!optimize_size && optimize >= 2)
-	 || (((flag_tree_loop_vectorize || cfun->has_force_vect_loops)
-	      && flag_tree_loop_if_convert != 0)
-	     || flag_tree_loop_if_convert == 1
-	     || flag_tree_loop_if_convert_stores == 1));
+      = ((!GCC_OPTION (optimize_size) && GCC_OPTION (optimize) >= 2)
+	 || (((GCC_OPTION (flag_tree_loop_vectorize) || cfun->has_force_vect_loops)
+	      && GCC_OPTION (flag_tree_loop_if_convert) != 0)
+	     || GCC_OPTION (flag_tree_loop_if_convert) == 1
+	     || GCC_OPTION (flag_tree_loop_if_convert_stores) == 1));
 
   /* Search every basic block for COND_EXPR we may be able to optimize.
 
@@ -2195,7 +2195,7 @@ hoist_adjacent_loads (basic_block bb0, basic_block bb1,
 static bool
 gate_hoist_loads (void)
 {
-  return (flag_hoist_adjacent_loads == 1
+  return (GCC_OPTION (flag_hoist_adjacent_loads) == 1
 	  && PARAM_VALUE (PARAM_L1_CACHE_LINE_SIZE)
 	  && HAVE_conditional_move);
 }
@@ -2251,7 +2251,7 @@ make_pass_phiopt (gcc::context *ctxt)
 static bool
 gate_cselim (void)
 {
-  return flag_tree_cselim;
+  return GCC_OPTION (flag_tree_cselim);
 }
 
 namespace {
diff --git a/gcc/tree-ssa-phiprop.c b/gcc/tree-ssa-phiprop.c
index 4d66c12..e1059e7 100644
--- a/gcc/tree-ssa-phiprop.c
+++ b/gcc/tree-ssa-phiprop.c
@@ -412,7 +412,7 @@ tree_ssa_phiprop (void)
 static bool
 gate_phiprop (void)
 {
-  return flag_tree_phiprop;
+  return GCC_OPTION (flag_tree_phiprop);
 }
 
 namespace {
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 1e55356..6e7d8d7 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -3027,7 +3027,7 @@ inhibit_phi_insertion (basic_block bb, pre_expr expr)
   unsigned i;
 
   /* If we aren't going to vectorize we don't inhibit anything.  */
-  if (!flag_tree_loop_vectorize)
+  if (!GCC_OPTION (flag_tree_loop_vectorize))
     return false;
 
   /* Otherwise we inhibit the insertion when the address of the
@@ -4709,7 +4709,7 @@ do_pre (void)
   unsigned int todo = 0;
 
   do_partial_partial =
-    flag_tree_partial_pre && optimize_function_for_speed_p (cfun);
+    GCC_OPTION (flag_tree_partial_pre) && optimize_function_for_speed_p (cfun);
 
   /* This has to happen before SCCVN runs because
      loop_optimizer_init may create new phis, etc.  */
@@ -4785,7 +4785,7 @@ do_pre (void)
 static bool
 gate_pre (void)
 {
-  return flag_tree_pre != 0;
+  return GCC_OPTION (flag_tree_pre) != 0;
 }
 
 namespace {
@@ -4857,7 +4857,7 @@ execute_fre (void)
 static bool
 gate_fre (void)
 {
-  return flag_tree_fre != 0;
+  return GCC_OPTION (flag_tree_fre) != 0;
 }
 
 namespace {
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index e9e29e5..0df0e58 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -3649,7 +3649,7 @@ acceptable_pow_call (gimple stmt, tree *base, HOST_WIDE_INT *exponent)
   REAL_VALUE_TYPE c, cint;
 
   if (!first_pass_instance
-      || !flag_unsafe_math_optimizations
+      || !GCC_OPTION (flag_unsafe_math_optimizations)
       || !is_gimple_call (stmt)
       || !has_single_use (gimple_call_lhs (stmt)))
     return false;
@@ -3925,7 +3925,7 @@ can_reassociate_p (tree op)
   tree type = TREE_TYPE (op);
   if ((INTEGRAL_TYPE_P (type) && TYPE_OVERFLOW_WRAPS (type))
       || NON_SAT_FIXED_POINT_TYPE_P (type)
-      || (flag_associative_math && FLOAT_TYPE_P (type)))
+      || (GCC_OPTION (flag_associative_math) && FLOAT_TYPE_P (type)))
     return true;
   return false;
 }
@@ -4473,7 +4473,7 @@ reassociate_bb (basic_block bb)
 
 	      if (first_pass_instance
 		  && rhs_code == MULT_EXPR
-		  && flag_unsafe_math_optimizations)
+		  && GCC_OPTION (flag_unsafe_math_optimizations))
 		powi_result = attempt_builtin_powi (stmt, &ops);
 
 	      /* If the operand vector is now empty, all operands were 
@@ -4668,7 +4668,7 @@ execute_reassoc (void)
 static bool
 gate_tree_ssa_reassoc (void)
 {
-  return flag_tree_reassoc != 0;
+  return GCC_OPTION (flag_tree_reassoc) != 0;
 }
 
 namespace {
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index f7ec8b6..e2038f6 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -4239,8 +4239,8 @@ vn_nary_may_trap (vn_nary_op_t nary)
       fp_operation = FLOAT_TYPE_P (type);
       if (fp_operation)
 	{
-	  honor_nans = flag_trapping_math && !flag_finite_math_only;
-	  honor_snans = flag_signaling_nans != 0;
+	  honor_nans = GCC_OPTION (flag_trapping_math) && !GCC_OPTION (flag_finite_math_only);
+	  honor_snans = GCC_OPTION (flag_signaling_nans) != 0;
 	}
       else if (INTEGRAL_TYPE_P (type)
 	       && TYPE_OVERFLOW_TRAPS (type))
diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c
index 6d02975..9564e50 100644
--- a/gcc/tree-ssa-sink.c
+++ b/gcc/tree-ssa-sink.c
@@ -591,7 +591,7 @@ do_sink (void)
 static bool
 gate_sink (void)
 {
-  return flag_tree_sink != 0;
+  return GCC_OPTION (flag_tree_sink) != 0;
 }
 
 namespace {
diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c
index f55b7ee..6f7aecd 100644
--- a/gcc/tree-ssa-strlen.c
+++ b/gcc/tree-ssa-strlen.c
@@ -2092,7 +2092,7 @@ tree_ssa_strlen (void)
 static bool
 gate_strlen (void)
 {
-  return flag_optimize_strlen != 0;
+  return GCC_OPTION (flag_optimize_strlen) != 0;
 }
 
 namespace {
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 8201cb4..8ea1780 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -3372,7 +3372,7 @@ get_constraint_for_1 (tree t, vec<ce_s> *results, bool address_p,
       || (TREE_CODE (t) == CONSTRUCTOR
 	  && CONSTRUCTOR_NELTS (t) == 0))
     {
-      if (flag_delete_null_pointer_checks)
+      if (GCC_OPTION (flag_delete_null_pointer_checks))
 	temp.var = nothing_id;
       else
 	temp.var = nonlocal_id;
@@ -4224,7 +4224,7 @@ find_func_aliases_for_builtin_call (gimple t)
 	    }
 	  get_constraint_for_ptr_offset (dest, NULL_TREE, &lhsc);
 	  do_deref (&lhsc);
-	  if (flag_delete_null_pointer_checks
+	  if (GCC_OPTION (flag_delete_null_pointer_checks)
 	      && integer_zerop (gimple_call_arg (t, 1)))
 	    {
 	      ac.type = ADDRESSOF;
@@ -6992,7 +6992,7 @@ compute_may_aliases (void)
 static bool
 gate_tree_pta (void)
 {
-  return flag_tree_pta;
+  return GCC_OPTION (flag_tree_pta);
 }
 
 /* A dummy pass to cause points-to information to be computed via
@@ -7080,8 +7080,8 @@ make_pass_build_ealias (gcc::context *ctxt)
 static bool
 gate_ipa_pta (void)
 {
-  return (optimize
-	  && flag_ipa_pta
+  return (GCC_OPTION (optimize)
+	  && GCC_OPTION (flag_ipa_pta)
 	  /* Don't bother doing anything if the program has errors.  */
 	  && !seen_error ());
 }
diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c
index f6b1ba0..12bfdd3 100644
--- a/gcc/tree-ssa-tail-merge.c
+++ b/gcc/tree-ssa-tail-merge.c
@@ -1655,7 +1655,7 @@ tail_merge_optimize (unsigned int todo)
   int iteration_nr = 0;
   int max_iterations = PARAM_VALUE (PARAM_MAX_TAIL_MERGE_ITERATIONS);
 
-  if (!flag_tree_tail_merge
+  if (!GCC_OPTION (flag_tree_tail_merge)
       || max_iterations == 0
       /* We try to be conservative with respect to loop structure, since:
 	 - the cases where tail-merging could both affect loop structure and be
diff --git a/gcc/tree-ssa-ter.c b/gcc/tree-ssa-ter.c
index 09dc313..8c7e0f9 100644
--- a/gcc/tree-ssa-ter.c
+++ b/gcc/tree-ssa-ter.c
@@ -436,13 +436,13 @@ ter_is_replaceable_p (gimple stmt)
       block2 = LOCATION_BLOCK (locus2);
       locus2 = LOCATION_LOCUS (locus2);
 
-      if ((!optimize || optimize_debug)
+      if ((!GCC_OPTION (optimize) || GCC_OPTION (optimize_debug))
 	  && ((locus1 != UNKNOWN_LOCATION && locus1 != locus2)
 	      || (block1 != NULL_TREE && block1 != block2)))
 	return false;
 
       /* Without alias info we can't move around loads.  */
-      if (!optimize && gimple_assign_single_p (stmt)
+      if (!GCC_OPTION (optimize) && gimple_assign_single_p (stmt)
 	  && !is_gimple_val (gimple_assign_rhs1 (stmt)))
 	return false;
 
diff --git a/gcc/tree-ssa-uncprop.c b/gcc/tree-ssa-uncprop.c
index a43dd1a..45a0eaa 100644
--- a/gcc/tree-ssa-uncprop.c
+++ b/gcc/tree-ssa-uncprop.c
@@ -584,7 +584,7 @@ uncprop_dom_walker::before_dom_children (basic_block bb)
 static bool
 gate_uncprop (void)
 {
-  return flag_tree_dom != 0;
+  return GCC_OPTION (flag_tree_dom) != 0;
 }
 
 namespace {
diff --git a/gcc/tree-ssa-uninit.c b/gcc/tree-ssa-uninit.c
index eee83f7..ed9374a 100644
--- a/gcc/tree-ssa-uninit.c
+++ b/gcc/tree-ssa-uninit.c
@@ -2355,7 +2355,7 @@ execute_late_warn_uninitialized (void)
 static bool
 gate_warn_uninitialized (void)
 {
-  return warn_uninitialized || warn_maybe_uninitialized;
+  return GCC_OPTION (warn_uninitialized) || GCC_OPTION (warn_maybe_uninitialized);
 }
 
 namespace {
@@ -2408,7 +2408,7 @@ execute_early_warn_uninitialized (void)
      optimization we need to warn here about "may be uninitialized".  */
   calculate_dominance_info (CDI_POST_DOMINATORS);
 
-  warn_uninitialized_vars (/*warn_possibly_uninitialized=*/!optimize);
+  warn_uninitialized_vars (/*warn_possibly_uninitialized=*/!GCC_OPTION (optimize));
 
   /* Post-dominator information can not be reliably updated. Free it
      after the use.  */
diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c
index 646fba5..d9dc766 100644
--- a/gcc/tree-streamer-out.c
+++ b/gcc/tree-streamer-out.c
@@ -320,7 +320,7 @@ pack_ts_type_common_value_fields (struct bitpack_d *bp, tree expr)
   /* Make sure to preserve the fact whether the frontend would assign
      alias-set zero to this type.  */
   bp_pack_var_len_int (bp, (TYPE_ALIAS_SET (expr) == 0
-			    || (!in_lto_p
+			    || (!GCC_OPTION (in_lto_p)
 				&& get_alias_set (expr) == 0)) ? 0 : -1);
 }
 
diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
index 547ac9e..cabaf7e 100644
--- a/gcc/tree-switch-conversion.c
+++ b/gcc/tree-switch-conversion.c
@@ -775,8 +775,8 @@ check_final_bb (struct switch_conv_info *info)
 		  return false; /* Non-invariant argument.  */
 		}
 	      reloc = initializer_constant_valid_p (val, TREE_TYPE (val));
-	      if ((flag_pic && reloc != null_pointer_node)
-		  || (!flag_pic && reloc == NULL_TREE))
+	      if ((GCC_OPTION (flag_pic) && reloc != null_pointer_node)
+		  || (!GCC_OPTION (flag_pic) && reloc == NULL_TREE))
 		{
 		  if (reloc)
 		    info->reason
@@ -1471,7 +1471,7 @@ do_switchconv (void)
 static bool
 switchconv_gate (void)
 {
-  return flag_tree_switch_conversion != 0;
+  return GCC_OPTION (flag_tree_switch_conversion) != 0;
 }
 
 namespace {
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index 3488c2f..f79b53b 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -314,7 +314,7 @@ process_assignment (gimple stmt, gimple_stmt_iterator call, tree *m,
   /* Accumulator optimizations will reverse the order of operations.
      We can only do that for floating-point types if we're assuming
      that addition and multiplication are associative.  */
-  if (!flag_associative_math)
+  if (!GCC_OPTION (flag_associative_math))
     if (FLOAT_TYPE_P (TREE_TYPE (DECL_RESULT (current_function_decl))))
       return false;
 
@@ -1074,7 +1074,7 @@ execute_tail_recursion (void)
 static bool
 gate_tail_calls (void)
 {
-  return flag_optimize_sibling_calls != 0 && dbg_cnt (tail_call);
+  return GCC_OPTION (flag_optimize_sibling_calls) != 0 && dbg_cnt (tail_call);
 }
 
 static unsigned int
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index fbc35a3..7e5923f 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -719,7 +719,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
 	 RTL for other functions.  Most global variables should
 	 have been aligned during the IPA increase_alignment pass.  */
       if (!vect_can_force_dr_alignment_p (base, TYPE_ALIGN (vectype))
-	  || (TREE_STATIC (base) && flag_section_anchors))
+	  || (TREE_STATIC (base) && GCC_OPTION (flag_section_anchors)))
 	{
 	  if (dump_enabled_p ())
 	    {
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index d00a4b4..d002e7e 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -969,7 +969,7 @@ expand_vector_operation (gimple_stmt_iterator *gsi, tree type, tree compute_type
 	  tree rhs2 = gimple_assign_rhs2 (assign);
 	  tree ret;
 
-	  if (!optimize
+	  if (!GCC_OPTION (optimize)
 	      || !VECTOR_INTEGER_TYPE_P (type)
 	      || TREE_CODE (rhs2) != VECTOR_CST)
 	    break;
@@ -1371,7 +1371,7 @@ expand_vector_operations_1 (gimple_stmt_iterator *gsi)
       && TREE_CODE (lhs) == SSA_NAME
       && VECTOR_MODE_P (TYPE_MODE (TREE_TYPE (lhs)))
       && !gimple_clobber_p (stmt)
-      && optimize)
+      && GCC_OPTION (optimize))
     {
       optimize_vector_constructor (gsi);
       return;
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index df6ab6f..4f36452 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -596,9 +596,9 @@ vect_is_simple_iv_evolution (unsigned loop_nb, tree access_fn, tree * init,
 	      && flow_bb_inside_loop_p (get_loop (cfun, loop_nb), bb))
 	  || (!INTEGRAL_TYPE_P (TREE_TYPE (step_expr))
 	      && (!SCALAR_FLOAT_TYPE_P (TREE_TYPE (step_expr))
-		  || !flag_associative_math)))
+		  || !GCC_OPTION (flag_associative_math))))
       && (TREE_CODE (step_expr) != REAL_CST
-	  || !flag_associative_math))
+	  || !GCC_OPTION (flag_associative_math)))
     {
       if (dump_enabled_p ())
         dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
@@ -2437,7 +2437,7 @@ vect_is_simple_reduction_1 (loop_vec_info loop_info, gimple phi,
      outer-loop vectorization is safe.  */
 
   /* CHECKME: check for !flag_finite_math_only too?  */
-  if (SCALAR_FLOAT_TYPE_P (type) && !flag_associative_math
+  if (SCALAR_FLOAT_TYPE_P (type) && !GCC_OPTION (flag_associative_math)
       && check_reduction)
     {
       /* Changing the order of operations changes the semantics.  */
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index a051dce..97b61d9 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -415,7 +415,7 @@ vectorize_loops (void)
   FOR_EACH_LOOP (loop, 0)
     if (loop->dont_vectorize)
       any_ifcvt_loops = true;
-    else if ((flag_tree_loop_vectorize
+    else if ((GCC_OPTION (flag_tree_loop_vectorize)
 	      && optimize_loop_nest_for_speed_p (loop))
 	     || loop->force_vect)
       {
@@ -616,7 +616,7 @@ execute_vect_slp (void)
 static bool
 gate_vect_slp (void)
 {
-  return flag_tree_slp_vectorize != 0;
+  return GCC_OPTION (flag_tree_slp_vectorize) != 0;
 }
 
 namespace {
@@ -706,7 +706,7 @@ increase_alignment (void)
 static bool
 gate_increase_alignment (void)
 {
-  return flag_section_anchors && flag_tree_loop_vectorize;
+  return GCC_OPTION (flag_section_anchors) && GCC_OPTION (flag_tree_loop_vectorize);
 }
 
 
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index f8efe47..a971986 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -953,9 +953,9 @@ static inline bool
 unlimited_cost_model (loop_p loop)
 {
   if (loop != NULL && loop->force_vect
-      && flag_simd_cost_model != VECT_COST_MODEL_DEFAULT)
-    return flag_simd_cost_model == VECT_COST_MODEL_UNLIMITED;
-  return (flag_vect_cost_model == VECT_COST_MODEL_UNLIMITED);
+      && GCC_OPTION (flag_simd_cost_model) != VECT_COST_MODEL_DEFAULT)
+    return GCC_OPTION (flag_simd_cost_model) == VECT_COST_MODEL_UNLIMITED;
+  return (GCC_OPTION (flag_vect_cost_model) == VECT_COST_MODEL_UNLIMITED);
 }
 
 /* Source location */
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 3060210..ade3359 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -1079,11 +1079,11 @@ gimple_stmt_nonzero_warnv_p (gimple stmt, bool *strict_overflow_p)
       {
 	tree fndecl = gimple_call_fndecl (stmt);
 	if (!fndecl) return false;
-	if (flag_delete_null_pointer_checks && !flag_check_new
+	if (GCC_OPTION (flag_delete_null_pointer_checks) && !GCC_OPTION (flag_check_new)
 	    && DECL_IS_OPERATOR_NEW (fndecl)
 	    && !TREE_NOTHROW (fndecl))
 	  return true;
-	if (flag_delete_null_pointer_checks && 
+	if (GCC_OPTION (flag_delete_null_pointer_checks) && 
 	    lookup_attribute ("returns_nonnull",
 			      TYPE_ATTRIBUTES (gimple_call_fntype (stmt))))
 	  return true;
@@ -2822,11 +2822,11 @@ extract_range_from_binary_expr_1 (value_range_t *vr,
 	      vr1p.max = vr1p.min;
 	      /* We have to use a wrapping multiply though as signed overflow
 		 on lshifts is implementation defined in C89.  */
-	      saved_flag_wrapv = flag_wrapv;
-	      flag_wrapv = 1;
+	      saved_flag_wrapv = GCC_OPTION (flag_wrapv);
+	      GCC_OPTION (flag_wrapv) = 1;
 	      extract_range_from_binary_expr_1 (vr, MULT_EXPR, expr_type,
 						&vr0, &vr1p);
-	      flag_wrapv = saved_flag_wrapv;
+	      GCC_OPTION (flag_wrapv) = saved_flag_wrapv;
 	      return;
 	    }
 	  else if (code == LSHIFT_EXPR
@@ -3777,15 +3777,15 @@ extract_range_basic (value_range_t *vr, gimple stmt)
 	}
       if (subcode != ERROR_MARK)
 	{
-	  bool saved_flag_wrapv = flag_wrapv;
+	  bool saved_flag_wrapv = GCC_OPTION (flag_wrapv);
 	  /* Pretend the arithmetics is wrapping.  If there is
 	     any overflow, we'll complain, but will actually do
 	     wrapping operation.  */
-	  flag_wrapv = 1;
+	  GCC_OPTION (flag_wrapv) = 1;
 	  extract_range_from_binary_expr (vr, subcode, type,
 					  gimple_call_arg (stmt, 0),
 					  gimple_call_arg (stmt, 1));
-	  flag_wrapv = saved_flag_wrapv;
+	  GCC_OPTION (flag_wrapv) = saved_flag_wrapv;
 
 	  /* If for both arguments vrp_valueize returned non-NULL,
 	     this should have been already folded and if not, it
@@ -7155,7 +7155,7 @@ vrp_evaluate_conditional (enum tree_code code, tree op0, tree op1, gimple stmt)
 	}
     }
 
-  if (warn_type_limits
+  if (GCC_OPTION (warn_type_limits)
       && ret && only_ranges
       && TREE_CODE_CLASS (code) == tcc_comparison
       && TREE_CODE (op0) == SSA_NAME)
@@ -9697,7 +9697,7 @@ vrp_finalize (void)
   substitute_and_fold (op_with_constant_singleton_value_range,
 		       vrp_fold_stmt, false);
 
-  if (warn_array_bounds)
+  if (GCC_OPTION (warn_array_bounds))
     check_all_array_refs ();
 
   /* We must identify jump threading opportunities before we release
@@ -9870,7 +9870,7 @@ execute_vrp (void)
 static bool
 gate_vrp (void)
 {
-  return flag_tree_vrp != 0;
+  return GCC_OPTION (flag_tree_vrp) != 0;
 }
 
 namespace {
diff --git a/gcc/tree.c b/gcc/tree.c
index efee5e6..5162481 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4693,7 +4693,7 @@ attribute_value_equal (const_tree attr1, const_tree attr2)
     return (simple_cst_list_equal (TREE_VALUE (attr1),
 				   TREE_VALUE (attr2)) == 1);
 
-  if ((flag_openmp || flag_openmp_simd)
+  if ((GCC_OPTION (flag_openmp) || GCC_OPTION (flag_openmp_simd))
       && TREE_VALUE (attr1) && TREE_VALUE (attr2)
       && TREE_CODE (TREE_VALUE (attr1)) == OMP_CLAUSE
       && TREE_CODE (TREE_VALUE (attr2)) == OMP_CLAUSE)
@@ -5107,7 +5107,7 @@ save_debug_info_for_decl (tree t)
 {
   /*struct saved_debug_info_d *sdi;*/
 
-  gcc_assert (debug_info_level > DINFO_LEVEL_TERSE && t && DECL_P (t));
+  gcc_assert (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE && t && DECL_P (t));
 
   /* FIXME.  Partial implementation for saving debug info removed.  */
 }
@@ -5121,7 +5121,7 @@ save_debug_info_for_type (tree t)
 {
   /*struct saved_debug_info_d *sdi;*/
 
-  gcc_assert (debug_info_level > DINFO_LEVEL_TERSE && t && TYPE_P (t));
+  gcc_assert (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE && t && TYPE_P (t));
 
   /* FIXME.  Partial implementation for saving debug info removed.  */
 }
@@ -5136,13 +5136,13 @@ add_tree_to_fld_list (tree t, struct free_lang_data_d *fld)
   if (DECL_P (t))
     {
       fld->decls.safe_push (t);
-      if (debug_info_level > DINFO_LEVEL_TERSE)
+      if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
 	save_debug_info_for_decl (t);
     }
   else if (TYPE_P (t))
     {
       fld->types.safe_push (t);
-      if (debug_info_level > DINFO_LEVEL_TERSE)
+      if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
 	save_debug_info_for_type (t);
     }
   else
@@ -5582,8 +5582,8 @@ free_lang_data (void)
   unsigned i;
 
   /* If we are the LTO frontend we have freed lang-specific data already.  */
-  if (in_lto_p
-      || !flag_generate_lto)
+  if (GCC_OPTION (in_lto_p)
+      || !GCC_OPTION (flag_generate_lto))
     return 0;
 
   /* Allocate and assign alias sets to the standard integer types
@@ -6037,7 +6037,7 @@ handle_dll_attribute (tree * pnode, tree name, tree args, int flags,
     }
   else if (TREE_CODE (node) == FUNCTION_DECL
 	   && DECL_DECLARED_INLINE_P (node)
-	   && flag_keep_inline_dllexport)
+	   && GCC_OPTION (flag_keep_inline_dllexport))
     /* An exported function, even if inline, must be emitted.  */
     DECL_EXTERNAL (node) = 0;
 
@@ -9102,7 +9102,7 @@ get_file_function_name (const char *type)
 	   || (strncmp (type, "sub_", 4) == 0
 	       && (type[4] == 'I' || type[4] == 'D')))
     {
-      const char *file = main_input_filename;
+      const char *file = GCC_OPTION (main_input_filename);
       if (! file)
 	file = LOCATION_FILE (input_location);
       /* Just use the file's basename, because the full pathname
@@ -9116,7 +9116,7 @@ get_file_function_name (const char *type)
 	 unit, so use what we do have and throw in some randomness.  */
       unsigned len;
       const char *name = weak_global_object_name;
-      const char *file = main_input_filename;
+      const char *file = GCC_OPTION (main_input_filename);
 
       if (! name)
 	name = "";
@@ -9850,7 +9850,7 @@ set_call_expr_flags (tree decl, int flags)
   if (flags & ECF_LEAF)
     DECL_ATTRIBUTES (decl) = tree_cons (get_identifier ("leaf"),
 					NULL, DECL_ATTRIBUTES (decl));
-  if ((flags & ECF_TM_PURE) && flag_tm)
+  if ((flags & ECF_TM_PURE) && GCC_OPTION (flag_tm))
     apply_tm_attr (decl, get_identifier ("transaction_pure"));
   /* Looping const or pure is implied by noreturn.
      There is currently no way to declare looping const or looping pure alone.  */
@@ -9941,7 +9941,7 @@ build_common_builtin_nodes (void)
 			ECF_MALLOC | ECF_NOTHROW | ECF_LEAF);
 
   /* If we're checking the stack, `alloca' can throw.  */
-  if (flag_stack_check)
+  if (GCC_OPTION (flag_stack_check))
     {
       TREE_NOTHROW (builtin_decl_explicit (BUILT_IN_ALLOCA)) = 0;
       TREE_NOTHROW (builtin_decl_explicit (BUILT_IN_ALLOCA_WITH_ALIGN)) = 0;
@@ -11846,7 +11846,7 @@ types_same_for_odr (tree type1, tree type2)
     return true;
 
 #ifndef ENABLE_CHECKING
-  if (!in_lto_p)
+  if (!GCC_OPTION (in_lto_p))
     return false;
 #endif
 
@@ -11895,7 +11895,7 @@ types_same_for_odr (tree type1, tree type2)
   if (!same_for_odr (TYPE_CONTEXT (type1), TYPE_CONTEXT (type2)))
     return false;
   /* When not in LTO the MAIN_VARIANT check should be the same.  */
-  gcc_assert (in_lto_p);
+  gcc_assert (GCC_OPTION (in_lto_p));
     
   return true;
 }
@@ -12055,7 +12055,7 @@ warn_deprecated_use (tree node, tree attr)
 {
   const char *msg;
 
-  if (node == 0 || !warn_deprecated_decl)
+  if (node == 0 || !GCC_OPTION (warn_deprecated_decl))
     return;
 
   if (!attr)
diff --git a/gcc/tree.h b/gcc/tree.h
index 71d6832..aba8a99 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -741,7 +741,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
 /* True if overflow wraps around for the given integral type.  That
    is, TYPE_MAX + 1 == TYPE_MIN.  */
 #define TYPE_OVERFLOW_WRAPS(TYPE) \
-  (TYPE_UNSIGNED (TYPE) || flag_wrapv)
+  (TYPE_UNSIGNED (TYPE) || GCC_OPTION (flag_wrapv))
 
 /* True if overflow is undefined for the given integral type.  We may
    optimize on the assumption that values in the type never overflow.
@@ -752,15 +752,15 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
    other cases it will be appropriate to simply set a flag and let the
    caller decide whether a warning is appropriate or not.  */
 #define TYPE_OVERFLOW_UNDEFINED(TYPE) \
-  (!TYPE_UNSIGNED (TYPE) && !flag_wrapv && !flag_trapv && flag_strict_overflow)
+  (!TYPE_UNSIGNED (TYPE) && !GCC_OPTION (flag_wrapv) && !GCC_OPTION (flag_trapv) && GCC_OPTION (flag_strict_overflow))
 
 /* True if overflow for the given integral type should issue a
    trap.  */
 #define TYPE_OVERFLOW_TRAPS(TYPE) \
-  (!TYPE_UNSIGNED (TYPE) && flag_trapv)
+  (!TYPE_UNSIGNED (TYPE) && GCC_OPTION (flag_trapv))
 
 /* True if pointer types have undefined overflow.  */
-#define POINTER_TYPE_OVERFLOW_UNDEFINED (flag_strict_overflow)
+#define POINTER_TYPE_OVERFLOW_UNDEFINED (GCC_OPTION (flag_strict_overflow))
 
 /* Nonzero in a VAR_DECL or STRING_CST means assembler code has been written.
    Nonzero in a FUNCTION_DECL means that the function has been compiled.
@@ -1011,7 +1011,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
   ((int)TREE_INT_CST_LOW (VL_EXP_CHECK (NODE)->exp.operands[0]))
 
 /* Nonzero if is_gimple_debug() may possibly hold.  */
-#define MAY_HAVE_DEBUG_STMTS    (flag_var_tracking_assignments)
+#define MAY_HAVE_DEBUG_STMTS    (GCC_OPTION (flag_var_tracking_assignments))
 
 /* In a LOOP_EXPR node.  */
 #define LOOP_EXPR_BODY(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_EXPR, 0)
diff --git a/gcc/tsan.c b/gcc/tsan.c
index 2e32cd2..afc66b70 100644
--- a/gcc/tsan.c
+++ b/gcc/tsan.c
@@ -130,7 +130,7 @@ instrument_expr (gimple_stmt_iterator gsi, tree expr, bool is_write)
       struct pt_solution pt;
       memset (&pt, 0, sizeof (pt));
       pt.escaped = 1;
-      pt.ipa_escaped = flag_ipa_pta != 0;
+      pt.ipa_escaped = GCC_OPTION (flag_ipa_pta) != 0;
       pt.nonlocal = 1;
       if (!pt_solution_includes (&pt, base))
 	return false;
@@ -720,7 +720,7 @@ tsan_pass (void)
 static bool
 tsan_gate (void)
 {
-  return (flag_sanitize & SANITIZE_THREAD) != 0;
+  return (GCC_OPTION (flag_sanitize) & SANITIZE_THREAD) != 0;
 }
 
 /* Inserts __tsan_init () into the list of CTORs.  */
@@ -782,7 +782,7 @@ make_pass_tsan (gcc::context *ctxt)
 static bool
 tsan_gate_O0 (void)
 {
-  return (flag_sanitize & SANITIZE_THREAD) != 0 && !optimize;
+  return (GCC_OPTION (flag_sanitize) & SANITIZE_THREAD) != 0 && !GCC_OPTION (optimize);
 }
 
 namespace {
diff --git a/gcc/ubsan.c b/gcc/ubsan.c
index 22470da..ccad366 100644
--- a/gcc/ubsan.c
+++ b/gcc/ubsan.c
@@ -754,13 +754,13 @@ instrument_bool_enum_load (gimple_stmt_iterator *gsi)
   tree type = TREE_TYPE (rhs);
   tree minv = NULL_TREE, maxv = NULL_TREE;
 
-  if (TREE_CODE (type) == BOOLEAN_TYPE && (flag_sanitize & SANITIZE_BOOL))
+  if (TREE_CODE (type) == BOOLEAN_TYPE && (GCC_OPTION (flag_sanitize) & SANITIZE_BOOL))
     {
       minv = boolean_false_node;
       maxv = boolean_true_node;
     }
   else if (TREE_CODE (type) == ENUMERAL_TYPE
-	   && (flag_sanitize & SANITIZE_ENUM)
+	   && (GCC_OPTION (flag_sanitize) & SANITIZE_ENUM)
 	   && TREE_TYPE (type) != NULL_TREE
 	   && TREE_CODE (TREE_TYPE (type)) == INTEGER_TYPE
 	   && (TYPE_PRECISION (TREE_TYPE (type))
@@ -861,11 +861,11 @@ ubsan_pass (void)
 	      continue;
 	    }
 
-	  if ((flag_sanitize & SANITIZE_SI_OVERFLOW)
+	  if ((GCC_OPTION (flag_sanitize) & SANITIZE_SI_OVERFLOW)
 	      && is_gimple_assign (stmt))
 	    instrument_si_overflow (gsi);
 
-	  if (flag_sanitize & SANITIZE_NULL)
+	  if (GCC_OPTION (flag_sanitize) & SANITIZE_NULL)
 	    {
 	      if (gimple_store_p (stmt))
 		instrument_null (gsi, true);
@@ -873,7 +873,7 @@ ubsan_pass (void)
 		instrument_null (gsi, false);
 	    }
 
-	  if (flag_sanitize & (SANITIZE_BOOL | SANITIZE_ENUM)
+	  if (GCC_OPTION (flag_sanitize) & (SANITIZE_BOOL | SANITIZE_ENUM)
 	      && gimple_assign_load_p (stmt))
 	    instrument_bool_enum_load (&gsi);
 
@@ -886,7 +886,7 @@ ubsan_pass (void)
 static bool
 gate_ubsan (void)
 {
-  return flag_sanitize & (SANITIZE_NULL | SANITIZE_SI_OVERFLOW
+  return GCC_OPTION (flag_sanitize) & (SANITIZE_NULL | SANITIZE_SI_OVERFLOW
 			  | SANITIZE_BOOL | SANITIZE_ENUM);
 }
 
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index 2890093..aba2ad2 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -610,7 +610,7 @@ check_counter (gimple stmt, const char * name,
       locus = (stmt != NULL)
               ? gimple_location (stmt)
               : DECL_SOURCE_LOCATION (current_function_decl);
-      if (flag_profile_correction)
+      if (GCC_OPTION (flag_profile_correction))
         {
           if (dump_enabled_p ())
             dump_printf_loc (MSG_MISSED_OPTIMIZATION, locus,
@@ -1156,7 +1156,7 @@ gimple_mod_subtract_transform (gimple_stmt_iterator *si)
       return false;
     }
 
-  if (flag_profile_correction && count1 + count2 > all)
+  if (GCC_OPTION (flag_profile_correction) && count1 + count2 > all)
       all = count1 + count2;
 
   gcc_assert (count1 + count2 <= all);
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index 65d8285..3889c3c 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -1737,7 +1737,7 @@ unshare_variable (dataflow_set *set, variable_def **slot, variable var,
   new_var->onepart = var->onepart;
   new_var->in_changed_variables = false;
 
-  if (! flag_var_tracking_uninit)
+  if (! GCC_OPTION (flag_var_tracking_uninit))
     initialized = VAR_INIT_STATUS_INITIALIZED;
 
   for (i = 0; i < var->n_var_parts; i++)
@@ -1876,7 +1876,7 @@ get_init_value (dataflow_set *set, rtx loc, decl_or_value dv)
   int i;
   enum var_init_status ret_val = VAR_INIT_STATUS_UNKNOWN;
 
-  if (! flag_var_tracking_uninit)
+  if (! GCC_OPTION (flag_var_tracking_uninit))
     return VAR_INIT_STATUS_INITIALIZED;
 
   var = shared_hash_find (set->vars, dv);
@@ -3088,7 +3088,7 @@ variable_union (variable src, dataflow_set *set)
       dst->var_part[k].cur_loc = NULL;
     }
 
-  if (flag_var_tracking_uninit)
+  if (GCC_OPTION (flag_var_tracking_uninit))
     for (i = 0; i < src->n_var_parts && i < dst->n_var_parts; i++)
       {
 	location_chain node, node2;
@@ -6567,7 +6567,7 @@ find_src_status (dataflow_set *in, rtx src)
   tree decl = NULL_TREE;
   enum var_init_status status = VAR_INIT_STATUS_UNINITIALIZED;
 
-  if (! flag_var_tracking_uninit)
+  if (! GCC_OPTION (flag_var_tracking_uninit))
     status = VAR_INIT_STATUS_INITIALIZED;
 
   if (src && REG_P (src))
@@ -6805,7 +6805,7 @@ compute_bb_dataflow (basic_block bb)
 
 		      if (copied_p)
 			{
-			  if (flag_var_tracking_uninit)
+			  if (GCC_OPTION (flag_var_tracking_uninit))
 			    {
 			      status = find_src_status (in, src);
 
@@ -6874,7 +6874,7 @@ compute_bb_dataflow (basic_block bb)
 		  loc = SET_DEST (loc);
 		}
 
-	      if (! flag_var_tracking_uninit)
+	      if (! GCC_OPTION (flag_var_tracking_uninit))
 		src_status = VAR_INIT_STATUS_INITIALIZED;
 	      else
 		{
@@ -7518,7 +7518,7 @@ set_slot_part (dataflow_set *set, rtx loc, variable_def **slot,
   gcc_checking_assert (offset == 0 || !onepart);
   gcc_checking_assert (loc != dv_as_opaque (dv));
 
-  if (! flag_var_tracking_uninit)
+  if (! GCC_OPTION (flag_var_tracking_uninit))
     initialized = VAR_INIT_STATUS_INITIALIZED;
 
   if (!var)
@@ -7792,7 +7792,7 @@ clobber_slot_part (dataflow_set *set, rtx loc, variable_def **slot,
 	{
 	  next = node->next;
 	  if (node->loc != loc
-	      && (!flag_var_tracking_uninit
+	      && (!GCC_OPTION (flag_var_tracking_uninit)
 		  || !set_src
 		  || MEM_P (set_src)
 		  || !rtx_equal_p (set_src, node->set_src)))
@@ -8726,7 +8726,7 @@ emit_note_insn_var_location (variable_def **varp, emit_note_data *data)
   if ((unsigned HOST_WIDE_INT) last_limit < TREE_INT_CST_LOW (type_size_unit))
     complete = false;
 
-  if (! flag_var_tracking_uninit)
+  if (! GCC_OPTION (flag_var_tracking_uninit))
     initialized = VAR_INIT_STATUS_INITIALIZED;
 
   note_vl = NULL_RTX;
@@ -10270,7 +10270,7 @@ variable_tracking_main_1 (void)
 {
   bool success;
 
-  if (flag_var_tracking_assignments < 0)
+  if (GCC_OPTION (flag_var_tracking_assignments) < 0)
     {
       delete_debug_insns ();
       return 0;
@@ -10293,14 +10293,14 @@ variable_tracking_main_1 (void)
 
   success = vt_find_locations ();
 
-  if (!success && flag_var_tracking_assignments > 0)
+  if (!success && GCC_OPTION (flag_var_tracking_assignments) > 0)
     {
       vt_finalize ();
 
       delete_debug_insns ();
 
       /* This is later restored by our caller.  */
-      flag_var_tracking_assignments = 0;
+      GCC_OPTION (flag_var_tracking_assignments) = 0;
 
       success = vt_initialize ();
       gcc_assert (success);
@@ -10335,11 +10335,11 @@ unsigned int
 variable_tracking_main (void)
 {
   unsigned int ret;
-  int save = flag_var_tracking_assignments;
+  int save = GCC_OPTION (flag_var_tracking_assignments);
 
   ret = variable_tracking_main_1 ();
 
-  flag_var_tracking_assignments = save;
+  GCC_OPTION (flag_var_tracking_assignments) = save;
 
   return ret;
 }
@@ -10347,7 +10347,7 @@ variable_tracking_main (void)
 static bool
 gate_handle_var_tracking (void)
 {
-  return (flag_var_tracking && !targetm.delay_vartrack);
+  return (GCC_OPTION (flag_var_tracking) && !targetm.delay_vartrack);
 }
 
 
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 295c27d..5e1db40 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -340,7 +340,7 @@ get_section (const char *name, unsigned int flags, tree decl)
 static bool
 use_object_blocks_p (void)
 {
-  return flag_section_anchors;
+  return GCC_OPTION (flag_section_anchors);
 }
 
 /* Return the object_block structure for section SECT.  Create a new
@@ -545,7 +545,7 @@ default_function_section (tree decl, enum node_frequency freq,
     return NULL;
 #endif
 
-  if (!flag_reorder_functions
+  if (!GCC_OPTION (flag_reorder_functions)
       || !targetm_common.have_named_sections)
     return NULL;
   /* Startup code should go to startup subsection unless it is
@@ -555,7 +555,7 @@ default_function_section (tree decl, enum node_frequency freq,
   {
     /* If we do have a profile or(and) LTO phase is executed, we do not need
        these ELF section.  */
-    if (!in_lto_p || !flag_profile_values)
+    if (!GCC_OPTION (in_lto_p) || !GCC_OPTION (flag_profile_values))
       return get_named_text_section (decl, ".text.startup", NULL);
     else
       return NULL;
@@ -573,7 +573,7 @@ default_function_section (tree decl, enum node_frequency freq,
       case NODE_FREQUENCY_HOT:
         /* If we do have a profile or(and) LTO phase is executed, we do not need
            these ELF section.  */
-        if (!in_lto_p || !flag_profile_values)
+        if (!GCC_OPTION (in_lto_p) || !GCC_OPTION (flag_profile_values))
           return get_named_text_section (decl, ".text.hot", NULL);
       default:
 	return NULL;
@@ -715,7 +715,7 @@ default_function_rodata_section (tree decl)
 	  return get_section (rname, SECTION_LINKONCE, decl);
 	}
       /* For .text.foo we want to use .rodata.foo.  */
-      else if (flag_function_sections && flag_data_sections
+      else if (GCC_OPTION (flag_function_sections) && GCC_OPTION (flag_data_sections)
 	       && strncmp (name, ".text.", 6) == 0)
 	{
 	  size_t len = strlen (name) + 1;
@@ -749,7 +749,7 @@ mergeable_string_section (tree decl ATTRIBUTE_UNUSED,
 {
   HOST_WIDE_INT len;
 
-  if (HAVE_GAS_SHF_MERGE && flag_merge_constants
+  if (HAVE_GAS_SHF_MERGE && GCC_OPTION (flag_merge_constants)
       && TREE_CODE (decl) == STRING_CST
       && TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE
       && align <= 256
@@ -806,7 +806,7 @@ mergeable_constant_section (enum machine_mode mode ATTRIBUTE_UNUSED,
 {
   unsigned int modesize = GET_MODE_BITSIZE (mode);
 
-  if (HAVE_GAS_SHF_MERGE && flag_merge_constants
+  if (HAVE_GAS_SHF_MERGE && GCC_OPTION (flag_merge_constants)
       && mode != VOIDmode
       && mode != BLKmode
       && modesize <= align
@@ -948,7 +948,7 @@ bss_initializer_p (const_tree decl)
 {
   return (DECL_INITIAL (decl) == NULL
 	  || DECL_INITIAL (decl) == error_mark_node
-	  || (flag_zero_initialized_in_bss
+	  || (GCC_OPTION (flag_zero_initialized_in_bss)
 	      /* Leave constant zeroes in .rodata so they
 		 can be shared.  */
 	      && !TREE_READONLY (decl)
@@ -1106,7 +1106,7 @@ get_variable_section (tree decl, bool prefer_noswitch_p)
   else
     reloc = 0;
 
-  resolve_unique_section (decl, reloc, flag_data_sections);
+  resolve_unique_section (decl, reloc, GCC_OPTION (flag_data_sections));
   if (IN_NAMED_SECTION (decl))
     return get_named_section (decl, NULL, reloc);
 
@@ -1116,7 +1116,7 @@ get_variable_section (tree decl, bool prefer_noswitch_p)
       && bss_initializer_p (decl))
     {
       if (!TREE_PUBLIC (decl)
-	  && !((flag_sanitize & SANITIZE_ADDRESS)
+	  && !((GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
 	       && asan_protect_global (decl)))
 	return lcomm_section;
       if (bss_noswitch_section)
@@ -1417,15 +1417,15 @@ make_decl_rtl_for_debug (tree decl)
      numbers off in the comparison dumps.  So... clearing
      flag_strict_aliasing will keep new_alias_set() from creating a
      new set.  */
-  save_aliasing_flag = flag_strict_aliasing;
-  flag_strict_aliasing = 0;
+  save_aliasing_flag = GCC_OPTION (flag_strict_aliasing);
+  GCC_OPTION (flag_strict_aliasing) = 0;
 
   rtl = DECL_RTL (decl);
   /* Reset DECL_RTL back, as various parts of the compiler expects
      DECL_RTL set meaning it is actually going to be output.  */
   SET_DECL_RTL (decl, NULL);
 
-  flag_strict_aliasing = save_aliasing_flag;
+  GCC_OPTION (flag_strict_aliasing) = save_aliasing_flag;
   return rtl;
 }
 
@@ -1550,7 +1550,7 @@ notice_global_symbol (tree decl)
 
   /* We win when global object is found, but it is useful to know about weak
      symbol as well so we can produce nicer unique names.  */
-  if (DECL_WEAK (decl) || DECL_ONE_ONLY (decl) || flag_shlib)
+  if (DECL_WEAK (decl) || DECL_ONE_ONLY (decl) || GCC_OPTION (flag_shlib))
     type = &weak_global_object_name;
 
   if (!*type)
@@ -1576,7 +1576,7 @@ decide_function_section (tree decl)
 {
   first_function_block_is_cold = false;
 
-  if (flag_reorder_blocks_and_partition)
+  if (GCC_OPTION (flag_reorder_blocks_and_partition))
     /* We will decide in assemble_start_function.  */
     return;
 
@@ -1605,7 +1605,7 @@ assemble_start_function (tree decl, const char *fnname)
   char tmp_label[100];
   bool hot_label_written = false;
 
-  if (flag_reorder_blocks_and_partition)
+  if (GCC_OPTION (flag_reorder_blocks_and_partition))
     {
       ASM_GENERATE_INTERNAL_LABEL (tmp_label, "LHOTB", const_labelno);
       crtl->subsections.hot_section_label = ggc_strdup (tmp_label);
@@ -1637,7 +1637,7 @@ assemble_start_function (tree decl, const char *fnname)
      has both hot and cold sections, because we don't want to re-set
      the alignment when the section switch happens mid-function.  */
 
-  if (flag_reorder_blocks_and_partition)
+  if (GCC_OPTION (flag_reorder_blocks_and_partition))
     {
       first_function_block_is_cold = false;
 
@@ -1664,7 +1664,7 @@ assemble_start_function (tree decl, const char *fnname)
   /* Switch to the correct text section for the start of the function.  */
 
   switch_to_section (function_section (decl));
-  if (flag_reorder_blocks_and_partition
+  if (GCC_OPTION (flag_reorder_blocks_and_partition)
       && !hot_label_written)
     ASM_OUTPUT_LABEL (asm_out_file, crtl->subsections.hot_section_label);
 
@@ -1684,7 +1684,7 @@ assemble_start_function (tree decl, const char *fnname)
     {
 #ifdef ASM_OUTPUT_MAX_SKIP_ALIGN
       ASM_OUTPUT_MAX_SKIP_ALIGN (asm_out_file,
-				 align_functions_log, align_functions - 1);
+				 align_functions_log, GCC_OPTION (align_functions) - 1);
 #else
       ASM_OUTPUT_ALIGN (asm_out_file, align_functions_log);
 #endif
@@ -1731,7 +1731,7 @@ assemble_end_function (tree decl, const char *fnname ATTRIBUTE_UNUSED)
 {
 #ifdef ASM_DECLARE_FUNCTION_SIZE
   /* We could have switched section in the middle of the function.  */
-  if (flag_reorder_blocks_and_partition)
+  if (GCC_OPTION (flag_reorder_blocks_and_partition))
     switch_to_section (function_section (decl));
   ASM_DECLARE_FUNCTION_SIZE (asm_out_file, fnname, decl);
 #endif
@@ -1742,7 +1742,7 @@ assemble_end_function (tree decl, const char *fnname ATTRIBUTE_UNUSED)
     }
   /* Output labels for end of hot/cold text sections (to be used by
      debug info.)  */
-  if (flag_reorder_blocks_and_partition)
+  if (GCC_OPTION (flag_reorder_blocks_and_partition))
     {
       section *save_text_section;
 
@@ -1764,7 +1764,7 @@ void
 assemble_zeros (unsigned HOST_WIDE_INT size)
 {
   /* Do no output if -fsyntax-only.  */
-  if (flag_syntax_only)
+  if (GCC_OPTION (flag_syntax_only))
     return;
 
 #ifdef ASM_NO_SKIP_IN_TEXT
@@ -1906,7 +1906,7 @@ assemble_noswitch_variable (tree decl, const char *name, section *sect,
   size = tree_to_uhwi (DECL_SIZE_UNIT (decl));
   rounded = size;
 
-  if ((flag_sanitize & SANITIZE_ADDRESS) && asan_protect_global (decl))
+  if ((GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS) && asan_protect_global (decl))
     size += asan_red_zone_size (size);
 
   /* Don't allocate zero bytes of common,
@@ -2031,7 +2031,7 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED,
   TREE_ASM_WRITTEN (decl) = 1;
 
   /* Do no output if -fsyntax-only.  */
-  if (flag_syntax_only)
+  if (GCC_OPTION (flag_syntax_only))
     return;
 
   if (! dont_output_data
@@ -2065,7 +2065,7 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED,
 
   align_variable (decl, dont_output_data);
 
-  if ((flag_sanitize & SANITIZE_ADDRESS)
+  if ((GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
       && asan_protect_global (decl))
     {
       asan_protected = true;
@@ -3315,7 +3315,7 @@ maybe_output_constant_def_contents (struct constant_descriptor_tree *desc,
   rtx symbol = XEXP (desc->rtl, 0);
   tree exp = desc->value;
 
-  if (flag_syntax_only)
+  if (GCC_OPTION (flag_syntax_only))
     return;
 
   if (TREE_ASM_WRITTEN (exp))
@@ -3374,7 +3374,7 @@ output_constant_def_contents (rtx symbol)
   /* We are no longer deferring this constant.  */
   TREE_ASM_WRITTEN (decl) = TREE_ASM_WRITTEN (exp) = 1;
 
-  if ((flag_sanitize & SANITIZE_ADDRESS)
+  if ((GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
       && TREE_CODE (exp) == STRING_CST
       && asan_protect_global (exp))
     {
@@ -4608,7 +4608,7 @@ output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align)
   enum tree_code code;
   unsigned HOST_WIDE_INT thissize;
 
-  if (size == 0 || flag_syntax_only)
+  if (size == 0 || GCC_OPTION (flag_syntax_only))
     return size;
 
   /* See if we're trying to initialize a pointer in a non-default mode
@@ -5204,7 +5204,7 @@ output_constructor (tree exp, unsigned HOST_WIDE_INT size,
       else if (TREE_CODE (local.type) == ARRAY_TYPE)
 	local.index = ce->index;
 
-      if (local.field && flag_verbose_asm)
+      if (local.field && GCC_OPTION (flag_verbose_asm))
 	fprintf (asm_out_file, "%s %s:\n",
 		 ASM_COMMENT_START,
 		 DECL_NAME (local.field)
@@ -6029,7 +6029,7 @@ decl_default_tls_model (const_tree decl)
   bool is_local;
 
   is_local = targetm.binds_local_p (decl);
-  if (!flag_shlib)
+  if (!GCC_OPTION (flag_shlib))
     {
       if (is_local)
 	kind = TLS_MODEL_LOCAL_EXEC;
@@ -6039,12 +6039,12 @@ decl_default_tls_model (const_tree decl)
 
   /* Local dynamic is inefficient when we're not combining the
      parts of the address.  */
-  else if (optimize && is_local)
+  else if (GCC_OPTION (optimize) && is_local)
     kind = TLS_MODEL_LOCAL_DYNAMIC;
   else
     kind = TLS_MODEL_GLOBAL_DYNAMIC;
-  if (kind < flag_tls_default)
-    kind = flag_tls_default;
+  if (kind < GCC_OPTION (flag_tls_default))
+    kind = GCC_OPTION (flag_tls_default);
 
   return kind;
 }
@@ -6266,7 +6266,7 @@ default_select_section (tree decl, int reloc,
     }
   else if (TREE_CODE (decl) == CONSTRUCTOR)
     {
-      if (! ((flag_pic && reloc)
+      if (! ((GCC_OPTION (flag_pic) && reloc)
 	     || !TREE_READONLY (decl)
 	     || TREE_SIDE_EFFECTS (decl)
 	     || !TREE_CONSTANT (decl)))
@@ -6274,7 +6274,7 @@ default_select_section (tree decl, int reloc,
     }
   else if (TREE_CODE (decl) == STRING_CST)
     return readonly_data_section;
-  else if (! (flag_pic && reloc))
+  else if (! (GCC_OPTION (flag_pic) && reloc))
     return readonly_data_section;
 
   return data_section;
@@ -6289,7 +6289,7 @@ categorize_decl_for_section (const_tree decl, int reloc)
     return SECCAT_TEXT;
   else if (TREE_CODE (decl) == STRING_CST)
     {
-      if ((flag_sanitize & SANITIZE_ADDRESS)
+      if ((GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
 	  && asan_protect_global (CONST_CAST_TREE (decl)))
       /* or !flag_merge_constants */
         return SECCAT_RODATA;
@@ -6315,8 +6315,8 @@ categorize_decl_for_section (const_tree decl, int reloc)
 	}
       else if (reloc & targetm.asm_out.reloc_rw_mask ())
 	ret = reloc == 1 ? SECCAT_DATA_REL_RO_LOCAL : SECCAT_DATA_REL_RO;
-      else if (reloc || flag_merge_constants < 2
-	       || ((flag_sanitize & SANITIZE_ADDRESS)
+      else if (reloc || GCC_OPTION (flag_merge_constants) < 2
+	       || ((GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
 		   && asan_protect_global (CONST_CAST_TREE (decl))))
 	/* C and C++ don't allow different variables to share the same
 	   location.  -fmerge-all-constants allows even that (at the
@@ -6345,7 +6345,7 @@ categorize_decl_for_section (const_tree decl, int reloc)
       /* Note that this would be *just* SECCAT_BSS, except that there's
 	 no concept of a read-only thread-local-data section.  */
       if (ret == SECCAT_BSS
-	       || (flag_zero_initialized_in_bss
+	       || (GCC_OPTION (flag_zero_initialized_in_bss)
 		   && initializer_zerop (DECL_INITIAL (decl))))
 	ret = SECCAT_TBSS;
       else
@@ -6721,7 +6721,7 @@ resolution_local_p (enum ld_plugin_symbol_resolution resolution)
 bool
 default_binds_local_p (const_tree exp)
 {
-  return default_binds_local_p_1 (exp, flag_shlib);
+  return default_binds_local_p_1 (exp, GCC_OPTION (flag_shlib));
 }
 
 bool
@@ -6958,11 +6958,11 @@ void
 default_file_start (void)
 {
   if (targetm.asm_file_start_app_off
-      && !(flag_verbose_asm || flag_debug_asm || flag_dump_rtl_in_asm))
+      && !(GCC_OPTION (flag_verbose_asm) || GCC_OPTION (flag_debug_asm) || GCC_OPTION (flag_dump_rtl_in_asm)))
     fputs (ASM_APP_OFF, asm_out_file);
 
   if (targetm.asm_file_start_file_directive)
-    output_file_directive (asm_out_file, main_input_filename);
+    output_file_directive (asm_out_file, GCC_OPTION (main_input_filename));
 }
 
 /* This is a generic routine suitable for use as TARGET_ASM_FILE_END
@@ -6994,7 +6994,7 @@ file_end_indicate_exec_stack (void)
 void
 file_end_indicate_split_stack (void)
 {
-  if (flag_split_stack)
+  if (GCC_OPTION (flag_split_stack))
     {
       switch_to_section (get_section (".note.GNU-split-stack", SECTION_DEBUG,
 				      NULL));
@@ -7075,7 +7075,7 @@ place_block_symbol (rtx symbol)
       decl = SYMBOL_REF_DECL (symbol);
       alignment = DECL_ALIGN (decl);
       size = get_constant_size (DECL_INITIAL (decl));
-      if ((flag_sanitize & SANITIZE_ADDRESS)
+      if ((GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
 	  && TREE_CODE (DECL_INITIAL (decl)) == STRING_CST
 	  && asan_protect_global (DECL_INITIAL (decl)))
 	size += asan_red_zone_size (size);
@@ -7085,7 +7085,7 @@ place_block_symbol (rtx symbol)
       decl = SYMBOL_REF_DECL (symbol);
       alignment = get_variable_align (decl);
       size = tree_to_uhwi (DECL_SIZE_UNIT (decl));
-      if ((flag_sanitize & SANITIZE_ADDRESS)
+      if ((GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
 	  && asan_protect_global (decl))
 	{
 	  size += asan_red_zone_size (size);
@@ -7236,7 +7236,7 @@ output_object_block (struct object_block *block)
 				      DECL_ALIGN (decl));
 	  size = get_constant_size (DECL_INITIAL (decl));
 	  offset += size;
-	  if ((flag_sanitize & SANITIZE_ADDRESS)
+	  if ((GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
 	      && TREE_CODE (DECL_INITIAL (decl)) == STRING_CST
 	      && asan_protect_global (DECL_INITIAL (decl)))
 	    {
@@ -7252,7 +7252,7 @@ output_object_block (struct object_block *block)
 	  assemble_variable_contents (decl, XSTR (symbol, 0), false);
 	  size = tree_to_uhwi (DECL_SIZE_UNIT (decl));
 	  offset += size;
-	  if ((flag_sanitize & SANITIZE_ADDRESS)
+	  if ((GCC_OPTION (flag_sanitize) & SANITIZE_ADDRESS)
 	      && asan_protect_global (decl))
 	    {
 	      size = asan_red_zone_size (size);
diff --git a/gcc/varpool.c b/gcc/varpool.c
index acb5221..e76cacd 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -182,7 +182,7 @@ varpool_remove_initializer (varpool_node *node)
       /* Keep vtables for BINFO folding.  */
       && !DECL_VIRTUAL_P (node->decl)
       /* FIXME: http://gcc.gnu.org/PR55395 */
-      && debug_info_level == DINFO_LEVEL_NONE
+      && GCC_OPTION (debug_info_level) == DINFO_LEVEL_NONE
       /* When doing declaration merging we have duplicate
 	 entries for given decl.  Do not attempt to remove
 	 the boides, or we will end up remiving
@@ -386,7 +386,7 @@ varpool_analyze_node (varpool_node *node)
      We however don't want to re-analyze already analyzed nodes.  */
   if (!node->analyzed)
     {
-      gcc_assert (!in_lto_p || cgraph_function_flags_ready);
+      gcc_assert (!GCC_OPTION (in_lto_p) || cgraph_function_flags_ready);
       /* Compute the alignment early so function body expanders are
 	 already informed about increased alignment.  */
       align_variable (decl, 0);
diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c
index 3ee44bf..27b3a54 100644
--- a/gcc/vmsdbgout.c
+++ b/gcc/vmsdbgout.c
@@ -399,14 +399,14 @@ write_debug_header (DST_HEADER *header, const char *comment, int dosizeonly)
       ASM_OUTPUT_DEBUG_DATA2 (asm_out_file,
 			      header->dst__header_length.dst_w_length);
 
-      if (flag_verbose_asm)
+      if (GCC_OPTION (flag_verbose_asm))
 	fprintf (asm_out_file, "\t%s record length", ASM_COMMENT_START);
       fputc ('\n', asm_out_file);
 
       ASM_OUTPUT_DEBUG_DATA2 (asm_out_file,
 			      header->dst__header_type.dst_w_type);
 
-      if (flag_verbose_asm)
+      if (GCC_OPTION (flag_verbose_asm))
 	fprintf (asm_out_file, "\t%s record type (%s)", ASM_COMMENT_START,
 		 comment);
 
@@ -426,7 +426,7 @@ write_debug_addr (const char *symbol, const char *comment, int dosizeonly)
   if (!dosizeonly)
     {
       ASM_OUTPUT_DEBUG_ADDR (asm_out_file, symbol);
-      if (flag_verbose_asm)
+      if (GCC_OPTION (flag_verbose_asm))
 	fprintf (asm_out_file, "\t%s %s", ASM_COMMENT_START, comment);
       fputc ('\n', asm_out_file);
     }
@@ -444,7 +444,7 @@ write_debug_data1 (unsigned int data1, const char *comment, int dosizeonly)
   if (!dosizeonly)
     {
       ASM_OUTPUT_DEBUG_DATA1 (asm_out_file, data1);
-      if (flag_verbose_asm)
+      if (GCC_OPTION (flag_verbose_asm))
 	fprintf (asm_out_file, "\t%s %s", ASM_COMMENT_START, comment);
       fputc ('\n', asm_out_file);
     }
@@ -462,7 +462,7 @@ write_debug_data2 (unsigned int data2, const char *comment, int dosizeonly)
   if (!dosizeonly)
     {
       ASM_OUTPUT_DEBUG_DATA2 (asm_out_file, data2);
-      if (flag_verbose_asm)
+      if (GCC_OPTION (flag_verbose_asm))
 	fprintf (asm_out_file, "\t%s %s", ASM_COMMENT_START, comment);
       fputc ('\n', asm_out_file);
     }
@@ -479,7 +479,7 @@ write_debug_data4 (unsigned long data4, const char *comment, int dosizeonly)
   if (!dosizeonly)
     {
       ASM_OUTPUT_DEBUG_DATA4 (asm_out_file, data4);
-      if (flag_verbose_asm)
+      if (GCC_OPTION (flag_verbose_asm))
 	fprintf (asm_out_file, "\t%s %s", ASM_COMMENT_START, comment);
       fputc ('\n', asm_out_file);
     }
@@ -497,7 +497,7 @@ write_debug_data8 (unsigned long long data8, const char *comment,
   if (!dosizeonly)
     {
       ASM_OUTPUT_DEBUG_DATA8 (asm_out_file, data8);
-      if (flag_verbose_asm)
+      if (GCC_OPTION (flag_verbose_asm))
 	fprintf (asm_out_file, "\t%s %s", ASM_COMMENT_START, comment);
       fputc ('\n', asm_out_file);
     }
@@ -516,7 +516,7 @@ write_debug_delta4 (const char *label1, const char *label2,
   if (!dosizeonly)
     {
       ASM_OUTPUT_DEBUG_DELTA4 (asm_out_file, label1, label2);
-      if (flag_verbose_asm)
+      if (GCC_OPTION (flag_verbose_asm))
 	fprintf (asm_out_file, "\t%s %s", ASM_COMMENT_START, comment);
       fputc ('\n', asm_out_file);
     }
@@ -534,7 +534,7 @@ write_debug_string (const char *string, const char *comment, int dosizeonly)
   if (!dosizeonly)
     {
       ASM_OUTPUT_DEBUG_STRING (asm_out_file, string);
-      if (flag_verbose_asm)
+      if (GCC_OPTION (flag_verbose_asm))
 	fprintf (asm_out_file, "\t%s %s", ASM_COMMENT_START, comment);
       fputc ('\n', asm_out_file);
     }
@@ -700,7 +700,7 @@ write_rtnbeg (int rtnnum, int dosizeonly)
 
   free (rtnentryname);
 
-  if (debug_info_level > DINFO_LEVEL_TERSE)
+  if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
     {
       prolog.dst_a_prolog_header.dst__header_length.dst_w_length
 	= DST_K_PROLOG_SIZE - 1;
@@ -809,7 +809,7 @@ write_pclines (int dosizeonly)
   else
     {
       ASM_OUTPUT_DEBUG_ADDR (asm_out_file, TEXT_SECTION_ASM_OP);
-      if (flag_verbose_asm)
+      if (GCC_OPTION (flag_verbose_asm))
 	fprintf (asm_out_file, "\t%s line_num", ASM_COMMENT_START);
       fputc ('\n', asm_out_file);
     }
@@ -1112,10 +1112,10 @@ vmsdbgout_begin_prologue (unsigned int line, const char *file)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.begin_prologue) (line, file);
 
-  if (debug_info_level > DINFO_LEVEL_NONE)
+  if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_NONE)
     {
       ASM_GENERATE_INTERNAL_LABEL (label, FUNC_BEGIN_LABEL,
 				   current_function_funcdef_no);
@@ -1131,10 +1131,10 @@ vmsdbgout_end_prologue (unsigned int line, const char *file)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.end_prologue) (line, file);
 
-  if (debug_info_level > DINFO_LEVEL_TERSE)
+  if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
     {
       ASM_GENERATE_INTERNAL_LABEL (label, FUNC_PROLOG_LABEL,
 				   current_function_funcdef_no);
@@ -1150,7 +1150,7 @@ vmsdbgout_end_prologue (unsigned int line, const char *file)
 static void
 vmsdbgout_end_function (unsigned int line)
 {
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.end_function) (line);
 }
 
@@ -1163,10 +1163,10 @@ vmsdbgout_begin_epilogue (unsigned int line, const char *file)
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
   static int save_current_function_funcdef_no = -1;
 
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.begin_epilogue) (line, file);
 
-  if (debug_info_level > DINFO_LEVEL_NONE)
+  if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_NONE)
     {
       if (save_current_function_funcdef_no != current_function_funcdef_no)
 	{
@@ -1195,10 +1195,10 @@ vmsdbgout_end_epilogue (unsigned int line, const char *file)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.end_epilogue) (line, file);
 
-  if (debug_info_level > DINFO_LEVEL_NONE)
+  if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_NONE)
     {
       /* Output a label to mark the endpoint of the code generated for this
          function.  */
@@ -1217,10 +1217,10 @@ vmsdbgout_end_epilogue (unsigned int line, const char *file)
 static void
 vmsdbgout_begin_block (register unsigned line, register unsigned blocknum)
 {
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.begin_block) (line, blocknum);
 
-  if (debug_info_level > DINFO_LEVEL_TERSE)
+  if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
     targetm.asm_out.internal_label (asm_out_file, BLOCK_BEGIN_LABEL, blocknum);
 }
 
@@ -1230,10 +1230,10 @@ vmsdbgout_begin_block (register unsigned line, register unsigned blocknum)
 static void
 vmsdbgout_end_block (register unsigned line, register unsigned blocknum)
 {
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.end_block) (line, blocknum);
 
-  if (debug_info_level > DINFO_LEVEL_TERSE)
+  if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
     targetm.asm_out.internal_label (asm_out_file, BLOCK_END_LABEL, blocknum);
 }
 
@@ -1244,7 +1244,7 @@ vmsdbgout_ignore_block (const_tree block)
 {
   bool retval = 0;
 
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     retval = (*dwarf2_debug_hooks.ignore_block) (block);
 
   return retval;
@@ -1257,7 +1257,7 @@ vmsdbgout_begin_function (tree decl)
 {
   const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0);
 
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.begin_function) (decl);
 
   /* Add the new entry to the end of the function name table.  */
@@ -1394,10 +1394,10 @@ static void
 vmsdbgout_source_line (register unsigned line, register const char *filename,
                        int discriminator, bool is_stmt)
 {
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.source_line) (line, filename, discriminator, is_stmt);
 
-  if (debug_info_level >= DINFO_LEVEL_TERSE)
+  if (GCC_OPTION (debug_info_level) >= DINFO_LEVEL_TERSE)
     vmsdbgout_write_source_line (line, filename, discriminator, is_stmt);
 }
 
@@ -1407,7 +1407,7 @@ vmsdbgout_source_line (register unsigned line, register const char *filename,
 static void
 vmsdbgout_start_source_file (unsigned int lineno, const char *filename)
 {
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.start_source_file) (lineno, filename);
 }
 
@@ -1417,7 +1417,7 @@ vmsdbgout_start_source_file (unsigned int lineno, const char *filename)
 static void
 vmsdbgout_end_source_file (unsigned int lineno ATTRIBUTE_UNUSED)
 {
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.end_source_file) (lineno);
 }
 
@@ -1428,10 +1428,10 @@ vmsdbgout_init (const char *filename)
 {
   const char *language_string = lang_hooks.name;
 
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.init) (filename);
 
-  if (debug_info_level == DINFO_LEVEL_NONE)
+  if (GCC_OPTION (debug_info_level) == DINFO_LEVEL_NONE)
     return;
 
   /* Remember the name of the primary input file.  */
@@ -1476,7 +1476,7 @@ vmsdbgout_init (const char *filename)
 static void
 vmsdbgout_assembly_start (void)
 {
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.assembly_start) ();
 }
 
@@ -1485,7 +1485,7 @@ vmsdbgout_assembly_start (void)
 static void
 vmsdbgout_define (unsigned int lineno, const char *buffer)
 {
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.define) (lineno, buffer);
 }
 
@@ -1494,7 +1494,7 @@ vmsdbgout_define (unsigned int lineno, const char *buffer)
 static void
 vmsdbgout_undef (unsigned int lineno, const char *buffer)
 {
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.undef) (lineno, buffer);
 }
 
@@ -1503,7 +1503,7 @@ vmsdbgout_undef (unsigned int lineno, const char *buffer)
 static void
 vmsdbgout_decl (tree decl)
 {
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.function_decl) (decl);
 }
 
@@ -1512,7 +1512,7 @@ vmsdbgout_decl (tree decl)
 static void
 vmsdbgout_global_decl (tree decl)
 {
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.global_decl) (decl);
 }
 
@@ -1521,7 +1521,7 @@ vmsdbgout_global_decl (tree decl)
 static void
 vmsdbgout_type_decl (tree decl, int local)
 {
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.type_decl) (decl, local);
 }
 
@@ -1530,7 +1530,7 @@ vmsdbgout_type_decl (tree decl, int local)
 static void
 vmsdbgout_abstract_function (tree decl)
 {
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.outlining_inline_function) (decl);
 }
 
@@ -1543,10 +1543,10 @@ vmsdbgout_finish (const char *filename ATTRIBUTE_UNUSED)
   unsigned int i, ifunc;
   int totsize;
 
-  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+  if (GCC_OPTION (write_symbols) == VMS_AND_DWARF2_DEBUG)
     (*dwarf2_debug_hooks.finish) (filename);
 
-  if (debug_info_level == DINFO_LEVEL_NONE)
+  if (GCC_OPTION (debug_info_level) == DINFO_LEVEL_NONE)
     return;
 
   /* Output a terminator label for the .text section.  */
@@ -1575,7 +1575,7 @@ vmsdbgout_finish (const char *filename ATTRIBUTE_UNUSED)
     }
   write_pclines (0);
 
-  if (debug_info_level > DINFO_LEVEL_TERSE)
+  if (GCC_OPTION (debug_info_level) > DINFO_LEVEL_TERSE)
     {
       totsize = write_srccorrs (1);
       write_srccorrs (0);
diff --git a/gcc/vtable-verify.c b/gcc/vtable-verify.c
index 4e4c21a..60b51b2 100644
--- a/gcc/vtable-verify.c
+++ b/gcc/vtable-verify.c
@@ -653,7 +653,7 @@ verify_bb_vtables (basic_block bb)
 
                   /* Call different routines if we are interested in
                      trace information to debug problems.  */
-                  if (flag_vtv_debug)
+                  if (GCC_OPTION (flag_vtv_debug))
                     {
                       int len1 = IDENTIFIER_LENGTH
                                                  (DECL_NAME (vtbl_var_decl));
@@ -745,7 +745,7 @@ vtable_verify_main (void)
 static bool
 gate_tree_vtable_verify (void)
 {
-  return (flag_vtable_verify);
+  return (GCC_OPTION (flag_vtable_verify));
 }
 
 /* Definition of this optimization pass.  */
diff --git a/gcc/web.c b/gcc/web.c
index d67151c..7a8fddc 100644
--- a/gcc/web.c
+++ b/gcc/web.c
@@ -328,7 +328,7 @@ replace_ref (df_ref ref, rtx reg)
 static bool
 gate_handle_web (void)
 {
-  return (optimize > 0 && flag_web);
+  return (GCC_OPTION (optimize) > 0 && GCC_OPTION (flag_web));
 }
 
 /* Main entry point.  */
diff --git a/gcc/xcoffout.c b/gcc/xcoffout.c
index 77589aa..d072790 100644
--- a/gcc/xcoffout.c
+++ b/gcc/xcoffout.c
@@ -104,7 +104,7 @@ const char *xcoff_lastfile;
     }						\
   xcoff_current_function_file			\
     = (xcoff_current_include_file		\
-       ? xcoff_current_include_file : main_input_filename); \
+       ? xcoff_current_include_file : GCC_OPTION (main_input_filename)); \
 }
 
 #define ASM_OUTPUT_LFE(FILE,LINENUM)		\
@@ -316,7 +316,7 @@ xcoffout_source_file (FILE *file, const char *filename, int inline_p)
 	  xcoff_current_include_file = NULL;
 	}
       xcoff_inlining = inline_p;
-      if (strcmp (main_input_filename, filename) || inline_p)
+      if (strcmp (GCC_OPTION (main_input_filename), filename) || inline_p)
 	{
 	  fprintf (file, "\t.bi\t");
 	  output_quoted_string (file, remap_debug_filename (filename));
@@ -361,7 +361,7 @@ xcoffout_block (tree block, int depth, tree args)
 	  if (BLOCK_NUMBER (block) == do_block)
 	    {
 	      /* Output the syms of the block.  */
-	      if (debug_info_level != DINFO_LEVEL_TERSE || depth == 0)
+	      if (GCC_OPTION (debug_info_level) != DINFO_LEVEL_TERSE || depth == 0)
 		dbxout_syms (BLOCK_VARS (block));
 	      if (args)
 		dbxout_reg_parms (args);
-- 
1.8.5.3

