From: Martin Liska Date: Fri, 17 Aug 2018 09:25:56 +0000 (+0200) Subject: Merge Ignore and Deprecated in .opt files. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0c1235622280db4a55cd86daa176b08b72f1210;p=gcc.git Merge Ignore and Deprecated in .opt files. 2018-08-17 Martin Liska * common.opt: Remove Warn, Init and Report for options with Ignore/Deprecated flag. Warning is done automatically for Deprecated flags. * config/i386/i386.opt: Likewise. * config/ia64/ia64.opt: Likewise. * config/rs6000/rs6000.opt: Likewise. * cppbuiltin.c (define_builtin_macros_for_compilation_flags): Remove usage of flag_check_pointer_bounds. * lto-wrapper.c (merge_and_complain): Do not handle OPT_fcheck_pointer_bounds. (append_compiler_options): Likewise. * opt-functions.awk: Do not handle Deprecated. * optc-gen.awk: Check that Var, Report and Init are not used for an option with Ignore/Deprecated flag. * opts-common.c (decode_cmdline_option): Do not report CL_ERR_DEPRECATED. (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated options. * opts.h (struct cl_option): Remove cl_deprecated flag. (CL_ERR_DEPRECATED): Remove error enum value. 2018-08-17 Martin Liska * g++.dg/opt/mpx.C: Fix scanned pattern. * gcc.target/i386/mpx.c: Likewise. * g++.dg/warn/Wunreachable-code-1.C: Remove. * g++.dg/warn/Wunreachable-code-2.C: Likewise. * gcc.dg/torture/pr52969.c: Likewise. * g++.dg/warn/pr31246-2.C: Likewise. * g++.dg/warn/pr31246.C: Likewise. * gcc.dg/pr33092.c: Likewise. * g++.dg/opt/eh1.C: Remove a deprecated option. * g++.dg/template/inline1.C: Likewise. * g++.dg/tree-ssa/pr81408.C: Likewise. * gcc.dg/pr41837.c: Likewise. * gcc.dg/pr41841.c: Likewise. * gcc.dg/pr42250.c: Likewise. * gcc.dg/pr43084.c: Likewise. * gcc.dg/pr43317.c: Likewise. * gcc.dg/pr51879-18.c: Likewise. * gcc.dg/torture/pr36066.c: Likewise. * gcc.dg/tree-ssa/ifc-8.c: Likewise. * gcc.dg/tree-ssa/ifc-cd.c: Likewise. * gcc.dg/tree-ssa/pr19210-1.c: Likewise. * gcc.dg/tree-ssa/pr45122.c: Likewise. * gcc.target/i386/pr45352-2.c: Likewise. * gcc.target/i386/zee.c: Likewise. * gfortran.dg/auto_char_len_2.f90: Likewise. * gfortran.dg/auto_char_len_4.f90: Likewise. * gfortran.dg/c_ptr_tests_15.f90: Likewise. * gfortran.dg/char_array_structure_constructor.f90: Likewise. * gfortran.dg/gomp/pr47331.f90: Likewise. * gfortran.dg/pr40999.f: Likewise. * gfortran.dg/pr41011.f: Likewise. * gfortran.dg/pr42051.f03: Likewise. * gfortran.dg/pr46804.f90: Likewise. * gfortran.dg/pr83149_1.f90: Likewise. * gfortran.dg/pr83149_b.f90: Likewise. * gfortran.dg/whole_file_1.f90: Likewise. * gfortran.dg/whole_file_10.f90: Likewise. * gfortran.dg/whole_file_11.f90: Likewise. * gfortran.dg/whole_file_12.f90: Likewise. * gfortran.dg/whole_file_13.f90: Likewise. * gfortran.dg/whole_file_14.f90: Likewise. * gfortran.dg/whole_file_15.f90: Likewise. * gfortran.dg/whole_file_16.f90: Likewise. * gfortran.dg/whole_file_17.f90: Likewise. * gfortran.dg/whole_file_18.f90: Likewise. * gfortran.dg/whole_file_19.f90: Likewise. * gfortran.dg/whole_file_2.f90: Likewise. * gfortran.dg/whole_file_20.f03: Likewise. * gfortran.dg/whole_file_3.f90: Likewise. * gfortran.dg/whole_file_4.f90: Likewise. * gfortran.dg/whole_file_5.f90: Likewise. * gfortran.dg/whole_file_6.f90: Likewise. * gfortran.dg/whole_file_7.f90: Likewise. * gfortran.dg/whole_file_8.f90: Likewise. * gfortran.dg/whole_file_9.f90: Likewise. * gcc.dg/vect/vect.exp: Likewise. 2018-08-17 Martin Liska * c.opt: Remove Warn, Init and Report for options with Ignore/Deprecated flag. Warning is done automatically for Deprecated flags. From-SVN: r263614 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a6a8fffc422..265fa237541 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,26 @@ +2018-08-17 Martin Liska + + * common.opt: Remove Warn, Init and Report for options with + Ignore/Deprecated flag. Warning is done automatically for + Deprecated flags. + * config/i386/i386.opt: Likewise. + * config/ia64/ia64.opt: Likewise. + * config/rs6000/rs6000.opt: Likewise. + * cppbuiltin.c (define_builtin_macros_for_compilation_flags): + Remove usage of flag_check_pointer_bounds. + * lto-wrapper.c (merge_and_complain): Do not handle + OPT_fcheck_pointer_bounds. + (append_compiler_options): Likewise. + * opt-functions.awk: Do not handle Deprecated. + * optc-gen.awk: Check that Var, Report and Init are not + used for an option with Ignore/Deprecated flag. + * opts-common.c (decode_cmdline_option): Do not report + CL_ERR_DEPRECATED. + (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated + options. + * opts.h (struct cl_option): Remove cl_deprecated flag. + (CL_ERR_DEPRECATED): Remove error enum value. + 2018-08-17 Richard Biener PR middle-end/86505 diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 8cd6f4c4bc7..2ab5b4477d0 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2018-08-17 Martin Liska + + * c.opt: Remove Warn, Init and Report for options with + Ignore/Deprecated flag. Warning is done automatically for + Deprecated flags. + 2018-08-16 David Malcolm PR c++/70693 diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index d6148380710..9980bfac11c 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -413,7 +413,7 @@ C ObjC C++ ObjC++ Var(warn_char_subscripts) Warning LangEnabledBy(C ObjC C++ Obj Warn about subscripts whose type is \"char\". Wchkp -C ObjC C++ ObjC++ Var(warn_chkp) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) Deprecated +C ObjC C++ ObjC++ Warning Deprecated Deprecated in GCC 9. This switch has no effect. Wclobbered @@ -820,7 +820,7 @@ C ObjC Var(warn_missing_prototypes) Warning Warn about global functions without prototypes. Wmudflap -C ObjC C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C ObjC C++ ObjC++ Deprecated Wmultichar C ObjC C++ ObjC++ CPP(warn_multichar) CppReason(CPP_W_MULTICHAR) Var(cpp_warn_multichar) Init(0) Warning @@ -1238,14 +1238,14 @@ C++ ObjC++ Joined RejectNegative Var(aligned_new_threshold) UInteger Init(-1) -faligned-new= Use C++17 over-aligned type allocation for alignments greater than N. fall-virtual -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated fallow-parameterless-variadic-functions C ObjC Var(flag_allow_parameterless_variadic_functions) Allow variadic functions without named parameter. falt-external-templates -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated No longer supported. fasm @@ -1268,78 +1268,78 @@ C ObjC C++ ObjC++ Where shorter, use canonicalized paths to systems headers. fcheck-pointer-bounds -C ObjC C++ ObjC++ LTO Report Var(flag_check_pointer_bounds) Deprecated +C ObjC C++ ObjC++ LTO Deprecated Deprecated in GCC 9. This switch has no effect. fchkp-check-incomplete-type -C ObjC C++ ObjC++ LTO Report Var(flag_chkp_incomplete_type) Init(1) Deprecated +C ObjC C++ ObjC++ LTO Deprecated Deprecated in GCC 9. This switch has no effect. fchkp-zero-input-bounds-for-main -C ObjC C++ ObjC++ LTO Report Var(flag_chkp_zero_input_bounds_for_main) Init(0) Deprecated +C ObjC C++ ObjC++ LTO Deprecated Deprecated in GCC 9. This switch has no effect. fchkp-first-field-has-own-bounds -C ObjC C++ ObjC++ LTO RejectNegative Report Var(flag_chkp_first_field_has_own_bounds) Deprecated +C ObjC C++ ObjC++ LTO Deprecated RejectNegative Deprecated in GCC 9. This switch has no effect. fchkp-narrow-bounds -C ObjC C++ ObjC++ LTO Report Var(flag_chkp_narrow_bounds) Init(1) Deprecated +C ObjC C++ ObjC++ LTO Deprecated Deprecated in GCC 9. This switch has no effect. fchkp-narrow-to-innermost-array -C ObjC C++ ObjC++ LTO RejectNegative Report Var(flag_chkp_narrow_to_innermost_arrray) Deprecated +C ObjC C++ ObjC++ LTO Deprecated RejectNegative Deprecated in GCC 9. This switch has no effect. fchkp-flexible-struct-trailing-arrays -C ObjC C++ ObjC++ LTO Report Var(flag_chkp_flexible_struct_trailing_arrays) Deprecated +C ObjC C++ ObjC++ LTO Deprecated Deprecated in GCC 9. This switch has no effect. fchkp-optimize -C ObjC C++ ObjC++ LTO Report Var(flag_chkp_optimize) Init(-1) +C ObjC C++ ObjC++ LTO Deprecated fchkp-use-fast-string-functions -C ObjC C++ ObjC++ LTO Report Var(flag_chkp_use_fast_string_functions) Init(0) Deprecated +C ObjC C++ ObjC++ LTO Deprecated Deprecated in GCC 9. This switch has no effect. fchkp-use-nochk-string-functions -C ObjC C++ ObjC++ LTO Report Var(flag_chkp_use_nochk_string_functions) Init(0) Deprecated +C ObjC C++ ObjC++ LTO Deprecated Deprecated in GCC 9. This switch has no effect. fchkp-use-static-bounds -C ObjC C++ ObjC++ LTO Report Var(flag_chkp_use_static_bounds) Init(1) Deprecated +C ObjC C++ ObjC++ LTO Deprecated Deprecated in GCC 9. This switch has no effect. fchkp-use-static-const-bounds -C ObjC C++ ObjC++ LTO Report Var(flag_chkp_use_static_const_bounds) Init(-1) Deprecated +C ObjC C++ ObjC++ LTO Deprecated Deprecated in GCC 9. This switch has no effect. fchkp-treat-zero-dynamic-size-as-infinite -C ObjC C++ ObjC++ LTO Report Var(flag_chkp_zero_dynamic_size_as_infinite) Init(0) Deprecated +C ObjC C++ ObjC++ LTO Deprecated Deprecated in GCC 9. This switch has no effect. fchkp-check-read -C ObjC C++ ObjC++ LTO Report Var(flag_chkp_check_read) Init(1) Deprecated +C ObjC C++ ObjC++ LTO Deprecated Deprecated in GCC 9. This switch has no effect. fchkp-check-write -C ObjC C++ ObjC++ LTO Report Var(flag_chkp_check_write) Init(1) Deprecated +C ObjC C++ ObjC++ LTO Deprecated Deprecated in GCC 9. This switch has no effect. fchkp-store-bounds -C ObjC C++ ObjC++ LTO Report Var(flag_chkp_store_bounds) Init(1) Deprecated +C ObjC C++ ObjC++ LTO Deprecated Deprecated in GCC 9. This switch has no effect. fchkp-instrument-calls -C ObjC C++ ObjC++ LTO Report Var(flag_chkp_instrument_calls) Init(1) Deprecated +C ObjC C++ ObjC++ LTO Deprecated Deprecated in GCC 9. This switch has no effect. fchkp-instrument-marked-only -C ObjC C++ ObjC++ LTO Report Var(flag_chkp_instrument_marked_only) Init(0) Deprecated +C ObjC C++ ObjC++ LTO Deprecated Deprecated in GCC 9. This switch has no effect. fchkp-use-wrappers -C ObjC C++ ObjC++ LTO Report Var(flag_chkp_use_wrappers) Init(1) Deprecated +C ObjC C++ ObjC++ LTO Deprecated Deprecated in GCC 9. This switch has no effect. static-libmpx @@ -1350,8 +1350,8 @@ static-libmpxwrappers Driver Deprecated Deprecated in GCC 9. This switch has no effect. -fcilkplus Undocumented -C ObjC C++ ObjC++ LTO Report Var(flag_cilkplus) Init(0) +fcilkplus +C ObjC C++ ObjC++ LTO Undocumented Ignore Deprecated in GCC 8. This switch has no effect. fconcepts @@ -1363,7 +1363,7 @@ C ObjC C++ ObjC++ Allow the arguments of the '?' operator to have different types. fconserve-space -C++ ObjC++ Var(flag_conserve_space) +C++ ObjC++ Ignore Does nothing. Preserved for backward compatibility. fconstant-string-class= @@ -1430,7 +1430,7 @@ C++ ObjC++ Var(flag_enforce_eh_specs) Init(1) Generate code to check exception specifications. fenum-int-equiv -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated fexec-charset= C ObjC C++ ObjC++ Joined RejectNegative @@ -1449,10 +1449,10 @@ C++ ObjC++ Var(flag_extern_tls_init) Init(-1) Support dynamic initialization of thread-local variables in a different translation unit. fexternal-templates -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated ffor-scope -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated ffreestanding C ObjC C++ ObjC++ @@ -1471,20 +1471,20 @@ C ObjC Var(flag_gnu89_inline) Init(-1) Use traditional GNU semantics for inline functions. fguiding-decls -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated fhandle-exceptions C++ ObjC++ Optimization Alias(fexceptions) Warn({-fhandle-exceptions has been renamed -fexceptions (and is now on by default)}) fhonor-std -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated fhosted C ObjC Assume normal C execution environment. fhuge-objects -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated No longer supported. fimplement-inlines @@ -1504,14 +1504,14 @@ C++ ObjC++ Var(flag_new_inheriting_ctors) Init(1) Implement C++17 inheriting constructor semantics. ffriend-injection -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated fkeep-inline-dllexport C C++ ObjC ObjC++ Var(flag_keep_inline_dllexport) Init(1) Report Condition(TARGET_DLLIMPORT_DECL_ATTRIBUTES) Don't emit dllexported inline functions unless needed. flabels-ok -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated flax-vector-conversions C ObjC C++ ObjC++ Var(flag_lax_vector_conversions) @@ -1522,19 +1522,19 @@ C ObjC C++ ObjC++ Var(flag_ms_extensions) Don't warn about uses of Microsoft extensions. fmudflap -C ObjC C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C ObjC C++ ObjC++ Deprecated fmudflapth -C ObjC C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C ObjC C++ ObjC++ Deprecated fmudflapir -C ObjC C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C ObjC C++ ObjC++ Deprecated fname-mangling-version- -C++ ObjC++ Joined Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Joined Deprecated fnew-abi -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated fnew-ttp-matching C++ ObjC++ Var(flag_new_ttp) @@ -1575,7 +1575,7 @@ fnonansi-builtins C++ ObjC++ Var(flag_no_nonansi_builtin, 0) fnonnull-objects -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated fnothrow-opt C++ ObjC++ Optimization Var(flag_nothrow_opt) @@ -1710,7 +1710,7 @@ C++ ObjC++ Var(flag_sized_deallocation) Init(-1) Enable C++14 sized deallocation support. fsquangle -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated fsso-struct= C ObjC Joined RejectNegative Enum(sso_struct) Var(default_sso) Init(SSO_NATIVE) @@ -1737,7 +1737,7 @@ C++ ObjC++ Optimization Var(flag_strict_enums) Assume that values of enumeration type are always within the minimum range of that type. fstrict-prototype -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated fstrong-eval-order C++ ObjC++ Common Alias(fstrong-eval-order=, all, none) @@ -1777,7 +1777,7 @@ C++ ObjC++ Joined RejectNegative UInteger -ftemplate-depth= Specify maximum template instantiation depth. fthis-is-variable -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated fthreadsafe-statics C++ ObjC++ Optimization Var(flag_threadsafe_statics) Init(1) @@ -1808,11 +1808,11 @@ C++ ObjC++ Var(flag_visibility_ms_compat) Changes visibility to match Microsoft Visual Studio by default. fvtable-gc -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated No longer supported. fvtable-thunks -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated No longer supported. fweak @@ -1828,7 +1828,7 @@ C ObjC C++ ObjC++ Var(flag_working_directory) Init(-1) Generate a #line directive pointing at the current working directory. fxref -C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +C++ ObjC++ Deprecated No longer supported. fzero-link diff --git a/gcc/common.opt b/gcc/common.opt index 507291f4394..ebc3ef43ce2 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -1087,7 +1087,7 @@ Common Report Var(flag_caller_saves) Optimization Save registers around function calls. fcheck-data-deps -Common Report Var(flag_check_data_deps) +Common Ignore This switch is deprecated; do not use. fcheck-new @@ -2897,19 +2897,19 @@ Common Driver Var(dwarf2out_as_locview_support) Init(2) Assume assembler support for view in (DWARF2+) .loc directives gcoff -Common Driver Ignore Warn(switch %qs no longer supported) +Common Driver Deprecated Does nothing. Preserved for backward compatibility. gcoff1 -Common Driver Ignore Warn(switch %qs no longer supported) +Common Driver Deprecated Does nothing. Preserved for backward compatibility. gcoff2 -Common Driver Ignore Warn(switch %qs no longer supported) +Common Driver Deprecated Does nothing. Preserved for backward compatibility. gcoff3 -Common Driver Ignore Warn(switch %qs no longer supported) +Common Driver Deprecated Does nothing. Preserved for backward compatibility. gcolumn-info diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt index 3724994760d..e7fbf9b6f99 100644 --- a/gcc/config/i386/i386.opt +++ b/gcc/config/i386/i386.opt @@ -842,7 +842,7 @@ Target Report Mask(ISA_CLWB) Var(ix86_isa_flags) Save Support CLWB instruction. mpcommit -Target Ignore Warn(%qs was deprecated) +Target Deprecated ;; Deprecated mfxsr @@ -951,7 +951,7 @@ Target Report Mask(ISA_RTM) Var(ix86_isa_flags) Save Support RTM built-in functions and code generation. mmpx -Target Report Deprecated +Target Deprecated Deprecated in GCC 9. This switch has no effect. mmwaitx @@ -999,7 +999,7 @@ Target RejectNegative Joined Integer Var(ix86_stack_protector_guard_symbol_str) Use the given symbol for addressing the stack-protector guard. mmitigate-rop -Target Ignore Warn(%qs was deprecated) +Target Deprecated ;; Deprecated mgeneral-regs-only diff --git a/gcc/config/ia64/ia64.opt b/gcc/config/ia64/ia64.opt index 5a8b2b84472..61f2c9f1c8f 100644 --- a/gcc/config/ia64/ia64.opt +++ b/gcc/config/ia64/ia64.opt @@ -164,10 +164,10 @@ Target Report Var(mflag_sched_spec_control_ldc) Init(0) Use simple data speculation check for control speculation. msched-prefer-non-data-spec-insns -Target Ignore Warn(switch %qs is no longer supported) +Target Deprecated msched-prefer-non-control-spec-insns -Target Ignore Warn(switch %qs is no longer supported) +Target Deprecated msched-count-spec-in-critical-path Target Report Var(mflag_sched_count_spec_in_critical_path) Init(0) diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt index 25a4883b161..b07f7f7e833 100644 --- a/gcc/config/rs6000/rs6000.opt +++ b/gcc/config/rs6000/rs6000.opt @@ -177,7 +177,7 @@ mno-string Target RejectNegative Undocumented Ignore mstring -Target RejectNegative Undocumented Warn(%<-mstring%> is deprecated) +Target RejectNegative Undocumented Deprecated msoft-float Target Report RejectNegative Mask(SOFT_FLOAT) Var(rs6000_isa_flags) @@ -483,8 +483,9 @@ mcrypto Target Report Mask(CRYPTO) Var(rs6000_isa_flags) Use ISA 2.07 Category:Vector.AES and Category:Vector.SHA2 instructions. +; We can't use Ignore flag because DIRECT_MOVE mask is still used. mdirect-move -Target Undocumented Mask(DIRECT_MOVE) Var(rs6000_isa_flags) Ignore Warn(%qs is deprecated) +Target Undocumented Mask(DIRECT_MOVE) Var(rs6000_isa_flags) Warn(%qs is deprecated) mhtm Target Report Mask(HTM) Var(rs6000_isa_flags) diff --git a/gcc/cppbuiltin.c b/gcc/cppbuiltin.c index de8cd339404..7ea45c80f6a 100644 --- a/gcc/cppbuiltin.c +++ b/gcc/cppbuiltin.c @@ -110,9 +110,6 @@ define_builtin_macros_for_compilation_flags (cpp_reader *pfile) cpp_define_formatted (pfile, "__FINITE_MATH_ONLY__=%d", flag_finite_math_only); - - if (flag_check_pointer_bounds) - cpp_define (pfile, "__CHKP__"); } diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 5a74131d332..236f199afcf 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -24240,6 +24240,7 @@ gen_producer_string (void) case OPT_U: case OPT_SPECIAL_unknown: case OPT_SPECIAL_ignore: + case OPT_SPECIAL_deprecated: case OPT_SPECIAL_program_name: case OPT_SPECIAL_input_file: case OPT_grecord_gcc_switches: diff --git a/gcc/lto-opts.c b/gcc/lto-opts.c index cc5f5307756..09ec7c057e6 100644 --- a/gcc/lto-opts.c +++ b/gcc/lto-opts.c @@ -107,6 +107,7 @@ lto_write_options (void) case OPT_dumpbase: case OPT_SPECIAL_unknown: case OPT_SPECIAL_ignore: + case OPT_SPECIAL_deprecated: case OPT_SPECIAL_program_name: case OPT_SPECIAL_input_file: case OPT_dumpdir: diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index d44678694c3..9cfdfae24e1 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -245,6 +245,7 @@ merge_and_complain (struct cl_decoded_option **decoded_options, { case OPT_SPECIAL_unknown: case OPT_SPECIAL_ignore: + case OPT_SPECIAL_deprecated: case OPT_SPECIAL_program_name: case OPT_SPECIAL_input_file: break; @@ -285,7 +286,6 @@ merge_and_complain (struct cl_decoded_option **decoded_options, case OPT_fopenmp: case OPT_fopenacc: - case OPT_fcheck_pointer_bounds: /* For selected options we can merge conservatively. */ for (j = 0; j < *decoded_options_count; ++j) if ((*decoded_options)[j].opt_index == foption->opt_index) @@ -293,8 +293,7 @@ merge_and_complain (struct cl_decoded_option **decoded_options, if (j == *decoded_options_count) append_option (decoded_options, decoded_options_count, foption); /* -fopenmp > -fno-openmp, - -fopenacc > -fno-openacc, - -fcheck_pointer_bounds > -fcheck_pointer_bounds */ + -fopenacc > -fno-openacc */ else if (foption->value > (*decoded_options)[j].value) (*decoded_options)[j] = *foption; break; @@ -557,7 +556,6 @@ append_compiler_options (obstack *argv_obstack, struct cl_decoded_option *opts, case OPT_Ofast: case OPT_Og: case OPT_Os: - case OPT_fcheck_pointer_bounds: break; default: diff --git a/gcc/opt-functions.awk b/gcc/opt-functions.awk index 6611bf340b5..6f62526d1cd 100644 --- a/gcc/opt-functions.awk +++ b/gcc/opt-functions.awk @@ -156,7 +156,6 @@ function switch_bit_fields (flags) hwi_flag \ flag_init("ToLower", flags) \ flag_init("Report", flags) \ - flag_init("Deprecated", flags) \ byte_size_flag sub(", $", "", result) diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk index 7eaca62c545..9a79bb86243 100644 --- a/gcc/optc-gen.awk +++ b/gcc/optc-gen.awk @@ -323,8 +323,24 @@ for (i = 0; i < n_opts; i++) { alias_arg = opt_args("Alias", flags[i]) if (alias_arg == "") { - if (flag_set_p("Ignore", flags[i])) - alias_data = "NULL, NULL, OPT_SPECIAL_ignore" + if (flag_set_p("Ignore", flags[i])) { + alias_data = "NULL, NULL, OPT_SPECIAL_ignore" + if (warn_message != "NULL") + print "#error Ignored option with Warn" + if (var_name(flags[i]) != "") + print "#error Ignored option with Var" + if (flag_set_p("Report", flags[i])) + print "#error Ignored option with Report" + } + else if (flag_set_p("Deprecated", flags[i])) { + alias_data = "NULL, NULL, OPT_SPECIAL_deprecated" + if (warn_message != "NULL") + print "#error Deprecated option with Warn" + if (var_name(flags[i]) != "") + print "#error Deprecated option with Var" + if (flag_set_p("Report", flags[i])) + print "#error Deprecated option with Report" + } else alias_data = "NULL, NULL, N_OPTS" if (flag_set_p("Enum.*", flags[i])) { diff --git a/gcc/opth-gen.awk b/gcc/opth-gen.awk index 36f22b88502..c2390dec24a 100644 --- a/gcc/opth-gen.awk +++ b/gcc/opth-gen.awk @@ -493,6 +493,7 @@ for (i = 0; i < n_opts; i++) { print " N_OPTS," print " OPT_SPECIAL_unknown," print " OPT_SPECIAL_ignore," +print " OPT_SPECIAL_deprecated," print " OPT_SPECIAL_program_name," print " OPT_SPECIAL_input_file" print "};" diff --git a/gcc/opts-common.c b/gcc/opts-common.c index 11356442e7b..2b5f63844fb 100644 --- a/gcc/opts-common.c +++ b/gcc/opts-common.c @@ -663,13 +663,13 @@ decode_cmdline_option (const char **argv, unsigned int lang_mask, { size_t new_opt_index = option->alias_target; - if (new_opt_index == OPT_SPECIAL_ignore) + if (new_opt_index == OPT_SPECIAL_ignore + || new_opt_index == OPT_SPECIAL_deprecated) { gcc_assert (option->alias_arg == NULL); gcc_assert (option->neg_alias_arg == NULL); opt_index = new_opt_index; arg = NULL; - value = 1; } else { @@ -744,10 +744,6 @@ decode_cmdline_option (const char **argv, unsigned int lang_mask, if (!option_ok_for_language (option, lang_mask)) errors |= CL_ERR_WRONG_LANG; - /* Mark all deprecated options. */ - if (option->cl_deprecated) - errors |= CL_ERR_DEPRECATED; - /* Convert the argument to lowercase if appropriate. */ if (arg && option->cl_tolower) { @@ -823,7 +819,8 @@ decode_cmdline_option (const char **argv, unsigned int lang_mask, else decoded->canonical_option[i] = NULL; } - if (opt_index != OPT_SPECIAL_unknown && opt_index != OPT_SPECIAL_ignore) + if (opt_index != OPT_SPECIAL_unknown && opt_index != OPT_SPECIAL_ignore + && opt_index != OPT_SPECIAL_deprecated) { generate_canonical_option (opt_index, arg, value, decoded); if (separate_args > 1) @@ -1001,6 +998,7 @@ prune_options (struct cl_decoded_option **decoded_options, { case OPT_SPECIAL_unknown: case OPT_SPECIAL_ignore: + case OPT_SPECIAL_deprecated: case OPT_SPECIAL_program_name: case OPT_SPECIAL_input_file: goto keep; @@ -1324,6 +1322,14 @@ read_cmdline_option (struct gcc_options *opts, if (decoded->opt_index == OPT_SPECIAL_ignore) return; + if (decoded->opt_index == OPT_SPECIAL_deprecated) + { + /* Warn only about positive ignored options. */ + if (decoded->value) + warning_at (loc, 0, "switch %qs is no longer supported", opt); + return; + } + option = &cl_options[decoded->opt_index]; if (decoded->errors @@ -1337,12 +1343,6 @@ read_cmdline_option (struct gcc_options *opts, return; } - if (decoded->errors & CL_ERR_DEPRECATED) - { - warning_at (loc, 0, "deprecated command line option %qs", opt); - return; - } - gcc_assert (!decoded->errors); if (!handle_option (opts, opts_set, decoded, lang_mask, DK_UNSPECIFIED, @@ -1619,7 +1619,7 @@ control_warning_option (unsigned int opt_index, int kind, const char *arg, arg = cl_options[opt_index].alias_arg; opt_index = cl_options[opt_index].alias_target; } - if (opt_index == OPT_SPECIAL_ignore) + if (opt_index == OPT_SPECIAL_ignore || opt_index == OPT_SPECIAL_deprecated) return; if (dc) diagnostic_classify_diagnostic (dc, opt_index, (diagnostic_t) kind, loc); diff --git a/gcc/opts.h b/gcc/opts.h index 0091fe0e9b2..04efda5b82a 100644 --- a/gcc/opts.h +++ b/gcc/opts.h @@ -106,8 +106,6 @@ struct cl_option BOOL_BITFIELD cl_tolower : 1; /* Report argument with -fverbose-asm */ BOOL_BITFIELD cl_report : 1; - /* Deprecated option */ - BOOL_BITFIELD cl_deprecated: 1; /* Argument is an unsigned integer with an optional byte suffix. */ BOOL_BITFIELD cl_byte_size: 1; /* Offset of field for this option in struct gcc_options, or @@ -219,7 +217,6 @@ extern const unsigned int cl_enums_count; #define CL_ERR_NEGATIVE (1 << 6) /* Negative form of option not permitted (together with OPT_SPECIAL_unknown). */ -#define CL_ERR_DEPRECATED (1 << 7) /* Deprecated option. */ /* Structure describing the result of decoding an option. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 99e44a63a37..341079b8069 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,62 @@ +2018-08-17 Martin Liska + + * g++.dg/opt/mpx.C: Fix scanned pattern. + * gcc.target/i386/mpx.c: Likewise. + * g++.dg/warn/Wunreachable-code-1.C: Remove. + * g++.dg/warn/Wunreachable-code-2.C: Likewise. + * gcc.dg/torture/pr52969.c: Likewise. + * g++.dg/warn/pr31246-2.C: Likewise. + * g++.dg/warn/pr31246.C: Likewise. + * gcc.dg/pr33092.c: Likewise. + * g++.dg/opt/eh1.C: Remove a deprecated option. + * g++.dg/template/inline1.C: Likewise. + * g++.dg/tree-ssa/pr81408.C: Likewise. + * gcc.dg/pr41837.c: Likewise. + * gcc.dg/pr41841.c: Likewise. + * gcc.dg/pr42250.c: Likewise. + * gcc.dg/pr43084.c: Likewise. + * gcc.dg/pr43317.c: Likewise. + * gcc.dg/pr51879-18.c: Likewise. + * gcc.dg/torture/pr36066.c: Likewise. + * gcc.dg/tree-ssa/ifc-8.c: Likewise. + * gcc.dg/tree-ssa/ifc-cd.c: Likewise. + * gcc.dg/tree-ssa/pr19210-1.c: Likewise. + * gcc.dg/tree-ssa/pr45122.c: Likewise. + * gcc.target/i386/pr45352-2.c: Likewise. + * gcc.target/i386/zee.c: Likewise. + * gfortran.dg/auto_char_len_2.f90: Likewise. + * gfortran.dg/auto_char_len_4.f90: Likewise. + * gfortran.dg/c_ptr_tests_15.f90: Likewise. + * gfortran.dg/char_array_structure_constructor.f90: Likewise. + * gfortran.dg/gomp/pr47331.f90: Likewise. + * gfortran.dg/pr40999.f: Likewise. + * gfortran.dg/pr41011.f: Likewise. + * gfortran.dg/pr42051.f03: Likewise. + * gfortran.dg/pr46804.f90: Likewise. + * gfortran.dg/pr83149_1.f90: Likewise. + * gfortran.dg/pr83149_b.f90: Likewise. + * gfortran.dg/whole_file_1.f90: Likewise. + * gfortran.dg/whole_file_10.f90: Likewise. + * gfortran.dg/whole_file_11.f90: Likewise. + * gfortran.dg/whole_file_12.f90: Likewise. + * gfortran.dg/whole_file_13.f90: Likewise. + * gfortran.dg/whole_file_14.f90: Likewise. + * gfortran.dg/whole_file_15.f90: Likewise. + * gfortran.dg/whole_file_16.f90: Likewise. + * gfortran.dg/whole_file_17.f90: Likewise. + * gfortran.dg/whole_file_18.f90: Likewise. + * gfortran.dg/whole_file_19.f90: Likewise. + * gfortran.dg/whole_file_2.f90: Likewise. + * gfortran.dg/whole_file_20.f03: Likewise. + * gfortran.dg/whole_file_3.f90: Likewise. + * gfortran.dg/whole_file_4.f90: Likewise. + * gfortran.dg/whole_file_5.f90: Likewise. + * gfortran.dg/whole_file_6.f90: Likewise. + * gfortran.dg/whole_file_7.f90: Likewise. + * gfortran.dg/whole_file_8.f90: Likewise. + * gfortran.dg/whole_file_9.f90: Likewise. + * gcc.dg/vect/vect.exp: Likewise. + 2018-08-17 Richard Biener PR middle-end/86505 diff --git a/gcc/testsuite/g++.dg/opt/eh1.C b/gcc/testsuite/g++.dg/opt/eh1.C index 63a4d2ef35f..0c3e679fec9 100644 --- a/gcc/testsuite/g++.dg/opt/eh1.C +++ b/gcc/testsuite/g++.dg/opt/eh1.C @@ -1,6 +1,6 @@ // PR middle-end/14477 // { dg-do compile } -// { dg-options "-O2 -fno-default-inline" } +// { dg-options "-O2" } struct A { diff --git a/gcc/testsuite/g++.dg/opt/mpx.C b/gcc/testsuite/g++.dg/opt/mpx.C index 6ae0cef8790..201ee1b3818 100644 --- a/gcc/testsuite/g++.dg/opt/mpx.C +++ b/gcc/testsuite/g++.dg/opt/mpx.C @@ -1,5 +1,5 @@ // { dg-do compile } // { dg-options "-fcheck-pointer-bounds -fchkp-first-field-has-own-bounds" } -// { dg-warning "deprecated command line option .-fcheck-pointer-bounds." "" { target *-*-* } 0 } -// { dg-warning "deprecated command line option .-fchkp-first-field-has-own-bounds." "" { target *-*-* } 0 } +// { dg-warning ".-fcheck-pointer-bounds. is no longer supported" "" { target *-*-* } 0 } +// { dg-warning ".-fchkp-first-field-has-own-bounds. is no longer supported" "" { target *-*-* } 0 } diff --git a/gcc/testsuite/g++.dg/template/inline1.C b/gcc/testsuite/g++.dg/template/inline1.C index c7ae1f5cae9..f941e6c373f 100644 --- a/gcc/testsuite/g++.dg/template/inline1.C +++ b/gcc/testsuite/g++.dg/template/inline1.C @@ -1,5 +1,5 @@ // { dg-do compile } -// { dg-options "-fno-default-inline -O0" } +// { dg-options "-O0" } // { dg-final { scan-assembler-not "\n_?_ZN1X3FooIiEEvT_\[: \t\n\]" } } // Copyright (C) 2003 Free Software Foundation, Inc. diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr81408.C b/gcc/testsuite/g++.dg/tree-ssa/pr81408.C index 60e6e5277d7..89d6e550206 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/pr81408.C +++ b/gcc/testsuite/g++.dg/tree-ssa/pr81408.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -std=gnu++11 -fopt-info-loop-missed -Wunsafe-loop-optimizations" } */ +/* { dg-options "-O2 -std=gnu++11 -fopt-info-loop-missed" } */ struct p { char *ay; diff --git a/gcc/testsuite/g++.dg/warn/Wunreachable-code-1.C b/gcc/testsuite/g++.dg/warn/Wunreachable-code-1.C deleted file mode 100644 index 23fc86dfbb2..00000000000 --- a/gcc/testsuite/g++.dg/warn/Wunreachable-code-1.C +++ /dev/null @@ -1,22 +0,0 @@ -/* PR17544 Incorrect -Wunreachable-code warning - Origin: sebor@roguewave.com - - G++ appends a "return 0;" when finishing a function, but it was not - given a source location. The gimplifier thinks a return statement - needs a locus so it would add one, making the compiler generated code - visible to the unreachable code warning. */ - -/* { dg-do compile } */ -/* { dg-options "-O -Wunreachable-code" } */ - -int -main (int argc, char *argv[]) -{ - const char* const s = argc < 2 ? "" : argv [1]; - int i = 0; - do { - ++i; - } while (i < s [0]); - return i; -} - diff --git a/gcc/testsuite/g++.dg/warn/Wunreachable-code-2.C b/gcc/testsuite/g++.dg/warn/Wunreachable-code-2.C deleted file mode 100644 index d50f7fe57d7..00000000000 --- a/gcc/testsuite/g++.dg/warn/Wunreachable-code-2.C +++ /dev/null @@ -1,23 +0,0 @@ -// PR c++/21228 -/* { dg-options "-Wunreachable-code" } */ - -class testStringBase -{ -public: - char *stringPtr; -}; - -class testString : public testStringBase -{ -public: - testString(); -}; - -testString::testString() -{ - stringPtr = (char *) 9; -} - -int main(int argc, char **argv) { - testString s; -} diff --git a/gcc/testsuite/g++.dg/warn/pr31246-2.C b/gcc/testsuite/g++.dg/warn/pr31246-2.C deleted file mode 100644 index c9a4cae7e84..00000000000 --- a/gcc/testsuite/g++.dg/warn/pr31246-2.C +++ /dev/null @@ -1,9 +0,0 @@ -// PR 31246 -// { dg-do compile } -// { dg-options "-Wunreachable-code" } -#include - -int* get_ptr(void* ptr) -{ - return new(ptr) int(); -} diff --git a/gcc/testsuite/g++.dg/warn/pr31246.C b/gcc/testsuite/g++.dg/warn/pr31246.C deleted file mode 100644 index f3603af4787..00000000000 --- a/gcc/testsuite/g++.dg/warn/pr31246.C +++ /dev/null @@ -1,9 +0,0 @@ -// PR 31246 -// { dg-do compile } -// { dg-options "-Wunreachable-code -D_GLIBCXX_DEBUG" } -#include - -int main() -{ - std::vector::iterator a; -} diff --git a/gcc/testsuite/gcc.dg/pr33092.c b/gcc/testsuite/gcc.dg/pr33092.c deleted file mode 100644 index 8f48fab5dd9..00000000000 --- a/gcc/testsuite/gcc.dg/pr33092.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O1 -fno-tree-salias" } */ -int foo () -{ - return 0; -} diff --git a/gcc/testsuite/gcc.dg/pr41837.c b/gcc/testsuite/gcc.dg/pr41837.c index 1ff99155de7..de6bd06d64b 100644 --- a/gcc/testsuite/gcc.dg/pr41837.c +++ b/gcc/testsuite/gcc.dg/pr41837.c @@ -1,6 +1,6 @@ /* PR middle-end/41837 */ /* { dg-do compile } */ -/* { dg-options "-fipa-struct-reorg -O -fwhole-program -fprofile-generate" } */ +/* { dg-options "-O -fwhole-program -fprofile-generate" } */ typedef struct { int a, b; } T1; typedef struct S1 *T2; diff --git a/gcc/testsuite/gcc.dg/pr41841.c b/gcc/testsuite/gcc.dg/pr41841.c index 595bc759207..8bce4e6240b 100644 --- a/gcc/testsuite/gcc.dg/pr41841.c +++ b/gcc/testsuite/gcc.dg/pr41841.c @@ -1,6 +1,6 @@ /* PR tree-optimization/41841 */ /* { dg-do compile } */ -/* { dg-options "-O -fipa-struct-reorg -fwhole-program -fipa-cp" } */ +/* { dg-options "-O -fwhole-program -fipa-cp" } */ typedef struct S *T; typedef struct { } *U; diff --git a/gcc/testsuite/gcc.dg/pr42250.c b/gcc/testsuite/gcc.dg/pr42250.c index 3ba8e8413e7..21b29ba4e7e 100644 --- a/gcc/testsuite/gcc.dg/pr42250.c +++ b/gcc/testsuite/gcc.dg/pr42250.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fipa-struct-reorg" } */ +/* { dg-options "-O2" } */ extern double log10 (double __x); extern double ceil (double __x); diff --git a/gcc/testsuite/gcc.dg/pr43084.c b/gcc/testsuite/gcc.dg/pr43084.c index 2afc48444a1..f70ed863e16 100644 --- a/gcc/testsuite/gcc.dg/pr43084.c +++ b/gcc/testsuite/gcc.dg/pr43084.c @@ -1,6 +1,6 @@ /* PR debug/43084 */ /* { dg-do compile } */ -/* { dg-options "-O1 -fipa-struct-reorg -fwhole-program -fcompare-debug" } */ +/* { dg-options "-O1 -fwhole-program -fcompare-debug" } */ /* { dg-xfail-if "" { powerpc-ibm-aix* } } */ struct S diff --git a/gcc/testsuite/gcc.dg/pr43317.c b/gcc/testsuite/gcc.dg/pr43317.c index cc5832aee36..de81c44150c 100644 --- a/gcc/testsuite/gcc.dg/pr43317.c +++ b/gcc/testsuite/gcc.dg/pr43317.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O -fipa-struct-reorg -fwhole-program -g" } */ +/* { dg-options "-O -fwhole-program -g" } */ extern void *malloc(__SIZE_TYPE__); diff --git a/gcc/testsuite/gcc.dg/pr51879-18.c b/gcc/testsuite/gcc.dg/pr51879-18.c index 2944bea0727..16012253e3f 100644 --- a/gcc/testsuite/gcc.dg/pr51879-18.c +++ b/gcc/testsuite/gcc.dg/pr51879-18.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre -fno-tree-copy-prop -fno-tree-dominator-opts -fno-tree-copyrename" } */ +/* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre -fno-tree-copy-prop -fno-tree-dominator-opts" } */ extern int foo (void); diff --git a/gcc/testsuite/gcc.dg/torture/pr36066.c b/gcc/testsuite/gcc.dg/torture/pr36066.c index 0e1d1ce3040..547806a9531 100644 --- a/gcc/testsuite/gcc.dg/torture/pr36066.c +++ b/gcc/testsuite/gcc.dg/torture/pr36066.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-funsafe-loop-optimizations -ftree-vrp" } */ +/* { dg-options "-ftree-vrp" } */ typedef int FLAC__int32; typedef int FLAC__bool; diff --git a/gcc/testsuite/gcc.dg/torture/pr52969.c b/gcc/testsuite/gcc.dg/torture/pr52969.c deleted file mode 100644 index 05331d93f34..00000000000 --- a/gcc/testsuite/gcc.dg/torture/pr52969.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-ftree-loop-if-convert-stores" } */ - -int a, b; -float xsum[100]; -void foo (float *cluster) -{ - int j; - for (; a ; ++j) { - xsum[j] = cluster[j]; - if (xsum[j] > 0) - xsum[j] = 0; - } - if (xsum[0]) - b = 0; -} diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ifc-8.c b/gcc/testsuite/gcc.dg/tree-ssa/ifc-8.c index c2007486500..c5375804131 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ifc-8.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ifc-8.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-Ofast -fdump-tree-ifcvt-details-blocks -ftree-loop-if-convert-stores" } */ +/* { dg-options "-Ofast -fdump-tree-ifcvt-details-blocks" } */ /* { dg-require-visibility "" } */ #define LEN 4096 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ifc-cd.c b/gcc/testsuite/gcc.dg/tree-ssa/ifc-cd.c index 4932cd75a13..fce3b77f193 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ifc-cd.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ifc-cd.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -fdump-tree-ifcvt-details-blocks-details -ftree-loop-if-convert-stores" } */ +/* { dg-options "-O3 -fdump-tree-ifcvt-details-blocks-details" } */ void foo (int *x1, int *x2, int *x3, int *x4, int *y) { diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c index 0fa5600177e..9162d1569e6 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fopt-info-loop-missed -Wunsafe-loop-optimizations" } */ +/* { dg-options "-O2 -fopt-info-loop-missed" } */ extern void g(void); void diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr45122.c b/gcc/testsuite/gcc.dg/tree-ssa/pr45122.c index e979b766fea..969fe0e7150 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr45122.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr45122.c @@ -2,7 +2,7 @@ /* PR tree-optimization/45122 */ /* { dg-do run } */ -/* { dg-options "-O2 -funsafe-loop-optimizations" } */ +/* { dg-options "-O2" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/vect/vect.exp b/gcc/testsuite/gcc.dg/vect/vect.exp index 369ece755df..fc5c1b84bc3 100644 --- a/gcc/testsuite/gcc.dg/vect/vect.exp +++ b/gcc/testsuite/gcc.dg/vect/vect.exp @@ -262,13 +262,6 @@ et-dg-runtest dg-runtest [lsort \ [glob -nocomplain $srcdir/$subdir/ggc-*.\[cS\]]] \ "" $DEFAULT_VECTCFLAGS -# -ftree-loop-if-convert-stores -set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS -lappend DEFAULT_VECTCFLAGS "-ftree-loop-if-convert-stores" -et-dg-runtest dg-runtest [lsort \ - [glob -nocomplain $srcdir/$subdir/if-cvt-stores-vect-*.\[cS\]]] \ - "" $DEFAULT_VECTCFLAGS - # With -O3. # Don't allow IPA cloning, because it throws our counts out of whack. set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS diff --git a/gcc/testsuite/gcc.target/i386/mpx.c b/gcc/testsuite/gcc.target/i386/mpx.c index f152ae94ecb..2be96d45b0a 100644 --- a/gcc/testsuite/gcc.target/i386/mpx.c +++ b/gcc/testsuite/gcc.target/i386/mpx.c @@ -1,3 +1,3 @@ /* { dg-do compile } */ // { dg-options "-mmpx" } -// { dg-warning "deprecated command line option .-mmpx." "" { target *-*-* } 0 } +// { dg-warning "switch .-mmpx. is no longer supported" "" { target *-*-* } 0 } diff --git a/gcc/testsuite/gcc.target/i386/pr45352-2.c b/gcc/testsuite/gcc.target/i386/pr45352-2.c index 47e428c20b0..216c5069422 100644 --- a/gcc/testsuite/gcc.target/i386/pr45352-2.c +++ b/gcc/testsuite/gcc.target/i386/pr45352-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -mtune=amdfam10 -fexpensive-optimizations -fgcse -foptimize-register-move -freorder-blocks -fschedule-insns2 -funswitch-loops -fgcse-las -fselective-scheduling2 -fsel-sched-pipelining -funroll-all-loops" } */ +/* { dg-options "-O1 -mtune=amdfam10 -fexpensive-optimizations -fgcse -freorder-blocks -fschedule-insns2 -funswitch-loops -fgcse-las -fselective-scheduling2 -fsel-sched-pipelining -funroll-all-loops" } */ typedef char uint8_t; typedef int uint32_t; diff --git a/gcc/testsuite/gcc.target/i386/zee.c b/gcc/testsuite/gcc.target/i386/zee.c index 920e0566714..608f7c9fc37 100644 --- a/gcc/testsuite/gcc.target/i386/zee.c +++ b/gcc/testsuite/gcc.target/i386/zee.c @@ -1,5 +1,5 @@ /* { dg-do compile { target { ! ia32 } } } */ -/* { dg-options "-O2 -fzee" } */ +/* { dg-options "-O2" } */ /* { dg-final { scan-assembler-not "mov\[\\t \]+\(%\[\^,\]+\),\[\\t \]*\\1" } } */ int mask[100]; int foo(unsigned x) diff --git a/gcc/testsuite/gfortran.dg/auto_char_len_2.f90 b/gcc/testsuite/gfortran.dg/auto_char_len_2.f90 index 95825c4205a..e103b6db4a4 100644 --- a/gcc/testsuite/gfortran.dg/auto_char_len_2.f90 +++ b/gcc/testsuite/gfortran.dg/auto_char_len_2.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fwhole-file" } +! { dg-options "" } ! ! PR fortran/41235 ! diff --git a/gcc/testsuite/gfortran.dg/auto_char_len_4.f90 b/gcc/testsuite/gfortran.dg/auto_char_len_4.f90 index 72ee8450dc7..16789fafcc7 100644 --- a/gcc/testsuite/gfortran.dg/auto_char_len_4.f90 +++ b/gcc/testsuite/gfortran.dg/auto_char_len_4.f90 @@ -1,5 +1,4 @@ ! { dg-do compile } -! { dg-options "-pedantic -fwhole-file" } ! ! Tests the fix for PR25087, in which the following invalid code ! was not detected. diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests_15.f90 b/gcc/testsuite/gfortran.dg/c_ptr_tests_15.f90 index 40d1ba3fdbd..ced8c596769 100644 --- a/gcc/testsuite/gfortran.dg/c_ptr_tests_15.f90 +++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_15.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fwhole-file -fdump-tree-original" } +! { dg-options "-fdump-tree-original" } ! ! PR fortran/43042 - fix ICE with c_null_ptr when using ! -fwhole-file (or -flto, which implies -fwhole-file). diff --git a/gcc/testsuite/gfortran.dg/char_array_structure_constructor.f90 b/gcc/testsuite/gfortran.dg/char_array_structure_constructor.f90 index b67557123fa..ae567dcb6f6 100644 --- a/gcc/testsuite/gfortran.dg/char_array_structure_constructor.f90 +++ b/gcc/testsuite/gfortran.dg/char_array_structure_constructor.f90 @@ -1,5 +1,4 @@ ! { dg-do run } -! { dg-options "-fwhole-file" } ! ! PR fortran/19107 ! -fwhole-file flag added for PR fortran/44945 diff --git a/gcc/testsuite/gfortran.dg/gomp/pr47331.f90 b/gcc/testsuite/gfortran.dg/gomp/pr47331.f90 index 71713e02233..6c29356d03e 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr47331.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr47331.f90 @@ -1,6 +1,6 @@ ! PR fortran/47331 ! { dg-do compile } -! { dg-options "-fopenmp -fwhole-file" } +! { dg-options "-fopenmp" } subroutine foo !$omp parallel diff --git a/gcc/testsuite/gfortran.dg/pr40999.f b/gcc/testsuite/gfortran.dg/pr40999.f index b6fa85ad5b1..7ebb632ab2b 100644 --- a/gcc/testsuite/gfortran.dg/pr40999.f +++ b/gcc/testsuite/gfortran.dg/pr40999.f @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-O3 -fwhole-file" } +! { dg-options "-O3" } SUBROUTINE ZLARFG( ALPHA ) COMPLEX*16 ZLADIV diff --git a/gcc/testsuite/gfortran.dg/pr41011.f b/gcc/testsuite/gfortran.dg/pr41011.f index 4ad4a8fc582..83e85fb002a 100644 --- a/gcc/testsuite/gfortran.dg/pr41011.f +++ b/gcc/testsuite/gfortran.dg/pr41011.f @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-O3 -fwhole-file" } +! { dg-options "-O3" } CALL UVSET(NX,NY,NZ,HVAR,ZET,NP,DZ,DKM,UM,VM,UG,VG,TM,DCDX, ! { dg-warning "Rank mismatch" } *ITY,ISH,NSMT,F) CALL DCTDX(NX,NY,NX1,NFILT,C(MLAG),DCDX(MLAG),HELP,HELPA, diff --git a/gcc/testsuite/gfortran.dg/pr42051.f03 b/gcc/testsuite/gfortran.dg/pr42051.f03 index 7a5be635f10..8f30e328c04 100644 --- a/gcc/testsuite/gfortran.dg/pr42051.f03 +++ b/gcc/testsuite/gfortran.dg/pr42051.f03 @@ -1,5 +1,4 @@ ! { dg-do compile } -! { dg-options "-fno-whole-file" } ! ! PR fortran/42051 ! PR fortran/44064 diff --git a/gcc/testsuite/gfortran.dg/pr46804.f90 b/gcc/testsuite/gfortran.dg/pr46804.f90 index 9297b730705..38e4a7e4e53 100644 --- a/gcc/testsuite/gfortran.dg/pr46804.f90 +++ b/gcc/testsuite/gfortran.dg/pr46804.f90 @@ -1,6 +1,6 @@ ! PR rtl-optimization/46804 ! { dg-do run } -! { dg-options "-O -fPIC -fexpensive-optimizations -fgcse -foptimize-register-move -fpeel-loops -fno-tree-loop-optimize" } +! { dg-options "-O -fPIC -fexpensive-optimizations -fgcse -fpeel-loops -fno-tree-loop-optimize" } program main integer, parameter :: n1 = 2, n2 = 3, n3 = 4, slen = 3 diff --git a/gcc/testsuite/gfortran.dg/pr83149_1.f90 b/gcc/testsuite/gfortran.dg/pr83149_1.f90 index 3a8f5d55d9b..5b009963e44 100644 --- a/gcc/testsuite/gfortran.dg/pr83149_1.f90 +++ b/gcc/testsuite/gfortran.dg/pr83149_1.f90 @@ -1,6 +1,5 @@ ! Compiled with pr83149.f90 ! { dg-do run } -! { dg-options "-fno-whole-file" } ! { dg-compile-aux-modules "pr83149.f90" } ! { dg-additional-sources pr83149.f90 } ! diff --git a/gcc/testsuite/gfortran.dg/pr83149_b.f90 b/gcc/testsuite/gfortran.dg/pr83149_b.f90 index f67ffd95159..9013617fa71 100644 --- a/gcc/testsuite/gfortran.dg/pr83149_b.f90 +++ b/gcc/testsuite/gfortran.dg/pr83149_b.f90 @@ -1,6 +1,5 @@ ! Compiled with pr83149_a.f90 ! { dg-do run } -! { dg-options "-fno-whole-file" } ! { dg-compile-aux-modules "pr83149_a.f90" } ! { dg-additional-sources pr83149_a.f90 } ! diff --git a/gcc/testsuite/gfortran.dg/whole_file_1.f90 b/gcc/testsuite/gfortran.dg/whole_file_1.f90 index 598c9d3193a..bceb250970f 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_1.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_1.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fwhole-file" } +! { dg-options "" } ! Tests the fix for PR22571 in which the derived types in a, b ! c and d were not detected to be different. In e and f, they ! are the same because they are sequence types. diff --git a/gcc/testsuite/gfortran.dg/whole_file_10.f90 b/gcc/testsuite/gfortran.dg/whole_file_10.f90 index fb100bb0ed5..4d47d9ddfce 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_10.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_10.f90 @@ -1,5 +1,4 @@ ! { dg-do compile } -! { dg-options "-fwhole-file" } ! Test the fix for the fifth problem in PR40011, where the ! entries were not resolved, resulting in a segfault. ! diff --git a/gcc/testsuite/gfortran.dg/whole_file_11.f90 b/gcc/testsuite/gfortran.dg/whole_file_11.f90 index d01b2100c4b..95748493f73 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_11.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_11.f90 @@ -1,5 +1,4 @@ ! { dg-do compile } -! { dg-options "-fwhole-file" } ! ! Tests the fix PR40011 comment 16 in which the derived type lists in ! different program units were getting mixed up. diff --git a/gcc/testsuite/gfortran.dg/whole_file_12.f90 b/gcc/testsuite/gfortran.dg/whole_file_12.f90 index 150ac5f9d5d..23ea10248ec 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_12.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_12.f90 @@ -1,5 +1,4 @@ ! { dg-do compile } -! { dg-options "-fwhole-file" } ! ! Tests the fix PR40011 comment 17 in which the explicit interface was ! being ignored and the missing argument was not correctly handled, which diff --git a/gcc/testsuite/gfortran.dg/whole_file_13.f90 b/gcc/testsuite/gfortran.dg/whole_file_13.f90 index d0a954f01dd..ffa31c8faf3 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_13.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_13.f90 @@ -1,5 +1,4 @@ ! { dg-do run } -! { dg-options "-fwhole-file -O3" } ! Check that the TYPE_CANONICAL is being correctly set ! for the derived types, when whole file compiling. ! (based on import.f90) diff --git a/gcc/testsuite/gfortran.dg/whole_file_14.f90 b/gcc/testsuite/gfortran.dg/whole_file_14.f90 index 030e8cd1459..52c2e7a7a42 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_14.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_14.f90 @@ -1,5 +1,5 @@ ! { dg-do run } -! { dg-options "-fwhole-file -O3" } +! { dg-options "-O3" } ! Check that the derived types are correctly substituted when ! whole file compiling. ! diff --git a/gcc/testsuite/gfortran.dg/whole_file_15.f90 b/gcc/testsuite/gfortran.dg/whole_file_15.f90 index 9988757cb1b..fd9f62d8424 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_15.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_15.f90 @@ -1,5 +1,4 @@ ! { dg-do compile } -! { dg-options "-fwhole-file" } ! Test the fix for PR43450 in which the use of 'replica_env_type' ! caused an ICE in ep_types ! diff --git a/gcc/testsuite/gfortran.dg/whole_file_16.f90 b/gcc/testsuite/gfortran.dg/whole_file_16.f90 index 6c910f47a2c..c45251e8c3a 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_16.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_16.f90 @@ -1,5 +1,4 @@ ! { dg-do compile } -! { dg-options "-fwhole-file" } ! ! PR fortran/31346 ! diff --git a/gcc/testsuite/gfortran.dg/whole_file_17.f90 b/gcc/testsuite/gfortran.dg/whole_file_17.f90 index a2a9d151511..d0e07dddb0d 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_17.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_17.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-pedantic -fwhole-file" } +! { dg-options "-pedantic" } ! ! PR fortran/30668 ! diff --git a/gcc/testsuite/gfortran.dg/whole_file_18.f90 b/gcc/testsuite/gfortran.dg/whole_file_18.f90 index c483c7da100..9d0229afc0a 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_18.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_18.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fwhole-file -Wno-unused-dummy-argument" } +! { dg-options "-Wno-unused-dummy-argument" } ! ! PR fortran/34260 ! diff --git a/gcc/testsuite/gfortran.dg/whole_file_19.f90 b/gcc/testsuite/gfortran.dg/whole_file_19.f90 index cd69f92d427..184e028ef23 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_19.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_19.f90 @@ -1,5 +1,4 @@ ! { dg-do compile } -! { dg-options "-fwhole-file" } ! Test the fix for pr40011 comment #42, in which the subroutine ! would just get lost with -fwhole-file. ! diff --git a/gcc/testsuite/gfortran.dg/whole_file_2.f90 b/gcc/testsuite/gfortran.dg/whole_file_2.f90 index c5255a99ab9..60163f42c30 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_2.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_2.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fwhole-file" } +! { dg-options "" } ! Tests the fix for PR26227 in which the interface mismatches ! below were not detected. ! diff --git a/gcc/testsuite/gfortran.dg/whole_file_20.f03 b/gcc/testsuite/gfortran.dg/whole_file_20.f03 index b3f77e46105..fd53422481d 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_20.f03 +++ b/gcc/testsuite/gfortran.dg/whole_file_20.f03 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fwhole-file -fcoarray=single" } +! { dg-options "-fcoarray=single" } ! ! Procedures with dummy arguments that are coarrays or polymorphic ! must have an explicit interface in the calling routine. diff --git a/gcc/testsuite/gfortran.dg/whole_file_3.f90 b/gcc/testsuite/gfortran.dg/whole_file_3.f90 index 242280ccf53..9b4f5a7d31d 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_3.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_3.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fwhole-file" } +! { dg-options "" } ! Tests the fix for PR26227 in which the interface mismatches ! below were not detected. ! diff --git a/gcc/testsuite/gfortran.dg/whole_file_4.f90 b/gcc/testsuite/gfortran.dg/whole_file_4.f90 index 671bc2db5d0..2dfb33dc7ab 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_4.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_4.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fwhole-file -std=legacy" } +! { dg-options "-std=legacy" } ! Tests the fix for PR24886 in which the mismatch between the ! character lengths of the actual and formal arguments of ! 'foo' was not detected. diff --git a/gcc/testsuite/gfortran.dg/whole_file_5.f90 b/gcc/testsuite/gfortran.dg/whole_file_5.f90 index fa4f06dd0ff..61612d46f12 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_5.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_5.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-O3 -fwhole-file -fdump-tree-optimized" } +! { dg-options "-O3 -fdump-tree-optimized" } ! { dg-add-options bind_pic_locally } ! ! Check that inlining of functions declared BEFORE usage works. diff --git a/gcc/testsuite/gfortran.dg/whole_file_6.f90 b/gcc/testsuite/gfortran.dg/whole_file_6.f90 index 771215db28d..fb961f3ccab 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_6.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_6.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-O3 -fwhole-file -fdump-tree-optimized" } +! { dg-options "-O3 -fdump-tree-optimized" } ! { dg-add-options bind_pic_locally } ! ! Check that inlining of functions declared AFTER usage works. diff --git a/gcc/testsuite/gfortran.dg/whole_file_7.f90 b/gcc/testsuite/gfortran.dg/whole_file_7.f90 index 3225304397c..80609cad5af 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_7.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_7.f90 @@ -1,5 +1,4 @@ ! { dg-do compile } -! { dg-options "-fwhole-file" } ! Test the fixes for the first two problems in PR40011 ! ! Contributed by Dominique d'Humieres diff --git a/gcc/testsuite/gfortran.dg/whole_file_8.f90 b/gcc/testsuite/gfortran.dg/whole_file_8.f90 index 6ea319a9d12..db05c998ba7 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_8.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_8.f90 @@ -1,5 +1,4 @@ ! { dg-do compile } -! { dg-options "-fwhole-file" } ! Test the fix for the third problem in PR40011, where false ! type/rank mismatches were found in the main program calls. ! diff --git a/gcc/testsuite/gfortran.dg/whole_file_9.f90 b/gcc/testsuite/gfortran.dg/whole_file_9.f90 index 64dce42ee21..17e70596cba 100644 --- a/gcc/testsuite/gfortran.dg/whole_file_9.f90 +++ b/gcc/testsuite/gfortran.dg/whole_file_9.f90 @@ -1,5 +1,4 @@ ! { dg-do compile } -! { dg-options "-fwhole-file" } ! Test the fix for the fourth problem in PR40011, where the ! entries were not resolved, resulting in a segfault. !