+2018-08-17 Martin Liska <mliska@suse.cz>
+
+ * 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 <rguenther@suse.de>
PR middle-end/86505
+2018-08-17 Martin Liska <mliska@suse.cz>
+
+ * 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 <dmalcolm@redhat.com>
PR c++/70693
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
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
-faligned-new=<N> 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
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
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
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=
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
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++
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
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)
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)
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)
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)
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)
-ftemplate-depth=<number> 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)
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
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
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
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
Support CLWB instruction.
mpcommit
-Target Ignore Warn(%qs was deprecated)
+Target Deprecated
;; Deprecated
mfxsr
Support RTM built-in functions and code generation.
mmpx
-Target Report Deprecated
+Target Deprecated
Deprecated in GCC 9. This switch has no effect.
mmwaitx
Use the given symbol for addressing the stack-protector guard.
mmitigate-rop
-Target Ignore Warn(%qs was deprecated)
+Target Deprecated
;; Deprecated
mgeneral-regs-only
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)
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)
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)
cpp_define_formatted (pfile, "__FINITE_MATH_ONLY__=%d",
flag_finite_math_only);
-
- if (flag_check_pointer_bounds)
- cpp_define (pfile, "__CHKP__");
}
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:
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:
{
case OPT_SPECIAL_unknown:
case OPT_SPECIAL_ignore:
+ case OPT_SPECIAL_deprecated:
case OPT_SPECIAL_program_name:
case OPT_SPECIAL_input_file:
break;
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)
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;
case OPT_Ofast:
case OPT_Og:
case OPT_Os:
- case OPT_fcheck_pointer_bounds:
break;
default:
hwi_flag \
flag_init("ToLower", flags) \
flag_init("Report", flags) \
- flag_init("Deprecated", flags) \
byte_size_flag
sub(", $", "", result)
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])) {
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 "};"
{
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
{
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)
{
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)
{
case OPT_SPECIAL_unknown:
case OPT_SPECIAL_ignore:
+ case OPT_SPECIAL_deprecated:
case OPT_SPECIAL_program_name:
case OPT_SPECIAL_input_file:
goto keep;
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
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,
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);
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
#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. */
+2018-08-17 Martin Liska <mliska@suse.cz>
+
+ * 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 <rguenther@suse.de>
PR middle-end/86505
// PR middle-end/14477
// { dg-do compile }
-// { dg-options "-O2 -fno-default-inline" }
+// { dg-options "-O2" }
struct A
{
// { 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 }
// { 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.
/* { 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;
+++ /dev/null
-/* 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;
-}
-
+++ /dev/null
-// 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;
-}
+++ /dev/null
-// PR 31246
-// { dg-do compile }
-// { dg-options "-Wunreachable-code" }
-#include <new>
-
-int* get_ptr(void* ptr)
-{
- return new(ptr) int();
-}
+++ /dev/null
-// PR 31246
-// { dg-do compile }
-// { dg-options "-Wunreachable-code -D_GLIBCXX_DEBUG" }
-#include <vector>
-
-int main()
-{
- std::vector<int>::iterator a;
-}
+++ /dev/null
-/* { dg-do compile } */
-/* { dg-options "-O1 -fno-tree-salias" } */
-int foo ()
-{
- return 0;
-}
/* 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;
/* 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;
/* { dg-do compile } */
-/* { dg-options "-O2 -fipa-struct-reorg" } */
+/* { dg-options "-O2" } */
extern double log10 (double __x);
extern double ceil (double __x);
/* 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
/* { dg-do compile } */
-/* { dg-options "-O -fipa-struct-reorg -fwhole-program -g" } */
+/* { dg-options "-O -fwhole-program -g" } */
extern void *malloc(__SIZE_TYPE__);
/* { 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);
/* { dg-do compile } */
-/* { dg-options "-funsafe-loop-optimizations -ftree-vrp" } */
+/* { dg-options "-ftree-vrp" } */
typedef int FLAC__int32;
typedef int FLAC__bool;
+++ /dev/null
-/* { 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;
-}
/* { 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
/* { 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)
{
/* { 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
/* PR tree-optimization/45122 */
/* { dg-do run } */
-/* { dg-options "-O2 -funsafe-loop-optimizations" } */
+/* { dg-options "-O2" } */
extern void abort (void);
[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
/* { 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 }
/* { 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;
/* { 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)
! { dg-do compile }
-! { dg-options "-fwhole-file" }
+! { dg-options "" }
!
! PR fortran/41235
!
! { dg-do compile }
-! { dg-options "-pedantic -fwhole-file" }
!
! Tests the fix for PR25087, in which the following invalid code
! was not detected.
! { 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).
! { dg-do run }
-! { dg-options "-fwhole-file" }
!
! PR fortran/19107
! -fwhole-file flag added for PR fortran/44945
! PR fortran/47331
! { dg-do compile }
-! { dg-options "-fopenmp -fwhole-file" }
+! { dg-options "-fopenmp" }
subroutine foo
!$omp parallel
! { dg-do compile }
-! { dg-options "-O3 -fwhole-file" }
+! { dg-options "-O3" }
SUBROUTINE ZLARFG( ALPHA )
COMPLEX*16 ZLADIV
! { 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,
! { dg-do compile }
-! { dg-options "-fno-whole-file" }
!
! PR fortran/42051
! PR fortran/44064
! 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
! Compiled with pr83149.f90
! { dg-do run }
-! { dg-options "-fno-whole-file" }
! { dg-compile-aux-modules "pr83149.f90" }
! { dg-additional-sources pr83149.f90 }
!
! 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 }
!
! { 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.
! { 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.
!
! { 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.
! { 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
! { 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)
! { dg-do run }
-! { dg-options "-fwhole-file -O3" }
+! { dg-options "-O3" }
! Check that the derived types are correctly substituted when
! whole file compiling.
!
! { 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
!
! { dg-do compile }
-! { dg-options "-fwhole-file" }
!
! PR fortran/31346
!
! { dg-do compile }
-! { dg-options "-pedantic -fwhole-file" }
+! { dg-options "-pedantic" }
!
! PR fortran/30668
!
! { dg-do compile }
-! { dg-options "-fwhole-file -Wno-unused-dummy-argument" }
+! { dg-options "-Wno-unused-dummy-argument" }
!
! PR fortran/34260
!
! { 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.
!
! { dg-do compile }
-! { dg-options "-fwhole-file" }
+! { dg-options "" }
! Tests the fix for PR26227 in which the interface mismatches
! below were not detected.
!
! { 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.
! { dg-do compile }
-! { dg-options "-fwhole-file" }
+! { dg-options "" }
! Tests the fix for PR26227 in which the interface mismatches
! below were not detected.
!
! { 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.
! { 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.
! { 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.
! { dg-do compile }
-! { dg-options "-fwhole-file" }
! Test the fixes for the first two problems in PR40011
!
! Contributed by Dominique d'Humieres <dominiq@lps.ens.fr>
! { 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.
!
! { 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.
!