1. 16 Jun, 2017 1 commit
    • PR c++/80560 - warn on undefined memory operations involving non-trivial types · c3684b7b
      gcc/c-family/ChangeLog:
      
      	PR c++/80560
      	* c.opt (-Wclass-memaccess): New option.
      
      gcc/cp/ChangeLog:
      
      	PR c++/80560
      	* call.c (first_non_public_field, maybe_warn_class_memaccess): New
      	functions.
      	(has_trivial_copy_assign_p, has_trivial_copy_p): Ditto.
      	(build_cxx_call): Call maybe_warn_class_memaccess.
      
      gcc/ChangeLog:
      
      	PR c++/80560
      	* dumpfile.c (dump_register): Avoid calling memset to initialize
      	a class with a default ctor.
      	* gcc.c (struct compiler): Remove const qualification.
      	* genattrtab.c (gen_insn_reserv): Replace memset with initialization.
      	* hash-table.h: Ditto.
      	* ipa-cp.c (allocate_and_init_ipcp_value): Replace memset with
      	  assignment.
      	* ipa-prop.c (ipa_free_edge_args_substructures): Ditto.
      	* omp-low.c (lower_omp_ordered_clauses): Replace memset with
      	default ctor.
      	* params.h (struct param_info): Make struct members non-const.
      	* tree-switch-conversion.c (emit_case_bit_tests): Replace memset
      	with default initialization.
      	* vec.h (vec_copy_construct, vec_default_construct): New helper
      	functions.
      	(vec<T>::copy, vec<T>::splice, vec<T>::reserve): Replace memcpy
      	with vec_copy_construct.
      	(vect<T>::quick_grow_cleared): Replace memset with default ctor.
      	(vect<T>::vec_safe_grow_cleared, vec_safe_grow_cleared): Same.
      	* doc/invoke.texi (-Wclass-memaccess): Document.
      
      libcpp/ChangeLog:
      
      	PR c++/80560
      	* line-map.c (line_maps::~line_maps): Avoid calling htab_delete
      	with a null pointer.
      	(linemap_init): Avoid calling memset on an object of a non-trivial
      	type.
      
      libitm/ChangeLog:
      
      	PR c++/80560
      	* beginend.cc (GTM::gtm_thread::rollback): Avoid calling memset
      	on an object of a non-trivial type.
      	(GTM::gtm_transaction_cp::commit): Use assignment instead of memcpy
      	to copy an object.
      	* method-ml.cc (orec_iterator::reinit): Avoid -Wclass-memaccess.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/80560
      	* g++.dg/Wclass-memaccess.C: New test.
      
      From-SVN: r249234
      Martin Sebor committed
  2. 13 Jun, 2017 1 commit
    • Implement no_sanitize function attribute · 45b2222a
      2017-06-13  Martin Liska  <mliska@suse.cz>
      
      	PR sanitize/78204
      	* c-c++-common/ubsan/attrib-2.c (float_cast2): Enhance the
      	test by adding no_sanitize attribute.
      	* gcc.dg/asan/use-after-scope-4.c: Likewise.
      2017-06-13  Martin Liska  <mliska@suse.cz>
      
      	PR sanitize/78204
      	* c-attribs.c (add_no_sanitize_value): New function.
      	(handle_no_sanitize_attribute): Likewise.
      	(handle_no_sanitize_address_attribute): Use the function.
      	(handle_no_sanitize_thread_attribute): New function.
      	(handle_no_address_safety_analysis_attribute): Use
      	add_no_sanitize_value.
      	(handle_no_sanitize_undefined_attribute): Likewise.
      	* c-common.h: Declare new functions.
      	* c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
      	(ubsan_instrument_shift): Likewise.
      	(ubsan_instrument_bounds): Likewise.
      	(ubsan_maybe_instrument_array_ref): Likewise.
      	(ubsan_maybe_instrument_reference_or_call): Likewise.
      2017-06-13  Martin Liska  <mliska@suse.cz>
      
      	PR sanitize/78204
      	* asan.c (asan_sanitize_stack_p): Use sanitize_flags_p.
      	(gate_asan): Likewise.
      	* asan.h (asan_no_sanitize_address_p): Remove the function.
      	(sanitize_flags_p): New function.
      	* builtins.def: Fix coding style.
      	* common.opt: Use renamed enum value.
      	* convert.c (convert_to_integer_1): Use sanitize_flags_p.
      	* doc/extend.texi: Document no_sanitize attribute.
      	* flag-types.h (enum sanitize_code): Rename SANITIZE_NONDEFAULT
      	to SANITIZE_UNDEFINED_NONDEFAULT.
      	* gcc.c (sanitize_spec_function): Use the renamed enum value.
      	* gimple-fold.c (optimize_atomic_compare_exchange_p):
      	Use sanitize_flags_p.
      	* gimplify.c (gimplify_function_tree): Likewise.
      	* ipa-inline.c (sanitize_attrs_match_for_inline_p): Likewise.
      	* opts.c (parse_no_sanitize_attribute): New function.
      	(common_handle_option): Use renamed enum value.
      	* opts.h (parse_no_sanitize_attribute): Declare.
      	* tree.c (sanitize_flags_p): New function.
      	* tree.h: Declared here.
      	* tsan.c: Use sanitize_flags_p.
      	* ubsan.c (ubsan_expand_null_ifn): Likewise.
      	(instrument_mem_ref): Likewise.
      	(instrument_bool_enum_load): Likewise.
      	(do_ubsan_in_current_function): Remove the function.
      	(pass_ubsan::execute): Use sanitize_flags_p.
      	* ubsan.h: Remove do_ubsan_in_current_function
      	* tree-cfg.c (print_no_sanitize_attr_value): New function.
      	(dump_function_to_file): Use it here.
      2017-06-13  Martin Liska  <mliska@suse.cz>
      
      	PR sanitize/78204
      	* class.c (build_base_path): Use sanitize_flags_p.
      	* cp-gimplify.c (cp_genericize_r): Likewise.
      	(cp_genericize_tree): Likewise.
      	(cp_genericize): Likewise.
      	* cp-ubsan.c (cp_ubsan_instrument_vptr_p): Likewise.
      	* decl.c (compute_array_index_type): Likewise.
      	(start_preparsed_function): Likewise.
      	* decl2.c (one_static_initialization_or_destruction): Likewise.
      	* init.c (finish_length_check): Likewise.
      	* lambda.c (maybe_add_lambda_conv_op): Likewise.
      	* typeck.c (cp_build_binary_op): Likewise.
      	(build_static_cast_1): Likewise.
      2017-06-13  Martin Liska  <mliska@suse.cz>
      
      	PR sanitize/78204
      	* c-convert.c (convert): Use sanitize_flags_p.
      	* c-decl.c (grokdeclarator): Likewise.
      	* c-typeck.c (convert_for_assignment): Likewise.
      	(c_finish_return): Likewise.
      	(build_binary_op): Likewise.
      
      From-SVN: r249158
      Martin Liska committed
  3. 15 May, 2017 1 commit
  4. 03 May, 2017 1 commit
    • Support escaping special characters in specs · 31c83050
      2017-05-03  Jeff Downs  <heydowns@somuchpressure.net>
      	    Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
      
      	* gcc.c (handle_braces): Support escaping in switch matching
      	text.
      	* doc/invoke.texi (Spec Files): Document it.
      	Remove superfluous @code markup in items.
      
      Co-Authored-By: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
      
      From-SVN: r247552
      Jeff Downs committed
  5. 17 Jan, 2017 1 commit
    • re PR other/79046 (g++ -print-file-name=plugin uses full version number in path) · 3c36aa6b
      	PR other/79046
      	* configure: Regenerated.
      config/
      	* acx.m4 (GCC_BASE_VER): New m4 function.
      	(ACX_TOOL_DIRS): Require GCC_BASE_VER, for
      	--with-gcc-major-version-only use just major number from BASE-VER.
      gcc/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
      	version from BASE-VER file.
      	(CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
      	(gcc.o): Depend on $(BASEVER).
      	* common.opt (dumpfullversion): New option.
      	* gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
      	* doc/invoke.texi: Document -dumpfullversion.
      	* doc/install.texi: Document --with-gcc-major-version-only.
      	* configure: Regenerated.
      libatomic/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
      	get version from BASE-VER file.
      	* testsuite/Makefile.in: Regenerated.
      	* configure: Regenerated.
      	* Makefile.in: Regenerated.
      libgomp/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
      	get version from BASE-VER file.
      	* testsuite/Makefile.in: Regenerated.
      	* configure: Regenerated.
      	* Makefile.in: Regenerated.
      libgcc/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
      	version from BASE-VER file.
      	* configure: Regenerated.
      libssp/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
      	get version from BASE-VER file.
      	* configure: Regenerated.
      	* Makefile.in: Regenerated.
      liboffloadmic/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
      	get version from BASE-VER file.
      	* aclocal.m4: Include ../config/acx.m4.
      	* configure: Regenerated.
      	* Makefile.in: Regenerated.
      libquadmath/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
      	get version from BASE-VER file.
      	* configure: Regenerated.
      	* Makefile.in: Regenerated.
      libmpx/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
      	get version from BASE-VER file.
      	* configure: Regenerated.
      	* Makefile.in: Regenerated.
      libada/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
      	version from BASE-VER file.
      	* configure: Regenerated.
      lto-plugin/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
      	get version from BASE-VER file.
      	* configure: Regenerated.
      	* Makefile.in: Regenerated.
      libitm/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
      	get version from BASE-VER file.
      	* testsuite/Makefile.in: Regenerated.
      	* configure: Regenerated.
      	* Makefile.in: Regenerated.
      fixincludes/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
      	get version from BASE-VER file.
      	* configure: Regenerated.
      libcilkrts/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
      	get version from BASE-VER file.
      	* aclocal.m4: Include ../config/acx.m4.
      	* configure: Regenerated.
      	* Makefile.in: Regenerated.
      libcc1/
      	* configure.ac: Add GCC_BASE_VER.  For --with-gcc-major-version-only
      	use just major number from BASE-VER.
      	* configure: Regenerated.
      	* Makefile.in: Regenerated.
      libobjc/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
      	get version from BASE-VER file.
      	* configure: Regenerated.
      libstdc++-v3/
      	* configure.ac: Add GCC_BASE_VER.
      	* fragment.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
      	get version from BASE-VER file.
      	* po/Makefile.in: Regenerated.
      	* libsupc++/Makefile.in: Regenerated.
      	* testsuite/Makefile.in: Regenerated.
      	* src/Makefile.in: Regenerated.
      	* configure: Regenerated.
      	* Makefile.in: Regenerated.
      	* include/Makefile.in: Regenerated.
      	* doc/Makefile.in: Regenerated.
      	* python/Makefile.in: Regenerated.
      	* src/c++11/Makefile.in: Regenerated.
      	* src/c++98/Makefile.in: Regenerated.
      	* src/filesystem/Makefile.in: Regenerated.
      libvtv/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
      	get version from BASE-VER file.
      	* testsuite/Makefile.in: Regenerated.
      	* configure: Regenerated.
      	* Makefile.in: Regenerated.
      libsanitizer/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
      	get version from BASE-VER file.
      	* libbacktrace/Makefile.in: Regenerated.
      	* interception/Makefile.in: Regenerated.
      	* asan/Makefile.in: Regenerated.
      	* ubsan/Makefile.in: Regenerated.
      	* configure: Regenerated.
      	* sanitizer_common/Makefile.in: Regenerated.
      	* lsan/Makefile.in: Regenerated.
      	* Makefile.in: Regenerated.
      	* tsan/Makefile.in: Regenerated.
      libgfortran/
      	* configure.ac: Add GCC_BASE_VER.
      	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
      	get version from BASE-VER file.
      	* configure: Regenerated.
      	* Makefile.in: Regenerated.
      
      From-SVN: r244521
      Jakub Jelinek committed
  6. 16 Jan, 2017 1 commit
    • re PR driver/49726 (-g0 file.S -g does not produce debug info) · 1c70261c
      	PR driver/49726
      	* gcc.c (debug_level_greater_than_spec_func): New function.
      	(static_spec_functions): Add debug-level-gt spec function.
      	(ASM_DEBUG_SPEC, cpp_options): Use %:debug-level-gt(0) instead of
      	!g0.
      	* config/darwin.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
      	* config/darwin9.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
      	* common.opt (g, gcoff, gdwarf, gdwarf-, ggdb, gno-pubnames,
      	gpubnames, ggnu-pubnames, gno-record-gcc-switches,
      	grecord-gcc-switches, gno-strict-dwarf, gstrict-dwarf, gstabs,
      	gstabs+, gtoggle, gvms, gxcoff, gxcoff+): Add Driver flag.
      c-family/
      	* c.opt (gen-decls): Add Driver flag.
      ada/
      	* gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
      
      From-SVN: r244505
      Jakub Jelinek committed
  7. 11 Jan, 2017 1 commit
  8. 09 Jan, 2017 1 commit
  9. 05 Jan, 2017 1 commit
  10. 01 Jan, 2017 2 commits
    • Update copyright years. · cbe34bb5
      From-SVN: r243994
      Jakub Jelinek committed
    • gcc.c (process_command): Update copyright notice dates. · c1a9c369
      gcc/
      	* gcc.c (process_command): Update copyright notice dates.
      	* gcov-dump.c (print_version): Ditto.
      	* gcov.c (print_version): Ditto.
      	* gcov-tool.c (print_version): Ditto.
      	* gengtype.c (create_file): Ditto.
      	* doc/cpp.texi: Bump @copying's copyright year.
      	* doc/cppinternals.texi: Ditto.
      	* doc/gcc.texi: Ditto.
      	* doc/gccint.texi: Ditto.
      	* doc/gcov.texi: Ditto.
      	* doc/install.texi: Ditto.
      	* doc/invoke.texi: Ditto.
      gcc/fortran/
      	* gfortranspec.c (lang_specific_driver): Update copyright notice
      	dates.
      	* gfc-internals.texi: Bump @copying's copyright year.
      	* gfortran.texi: Ditto.
      	* intrinsic.texi: Ditto.
      	* invoke.texi: Ditto.
      gcc/ada/
      	* gnat_ugn.texi: Bump @copying's copyright year.
      	* gnat_rm.texi: Likewise.
      gcc/go/
      	* gccgo.texi: Bump @copyrights-go year.
      libitm/
      	* libitm.texi: Bump @copying's copyright year.
      libgomp/
      	* libgomp.texi: Bump @copying's copyright year.
      libquadmath/
      	* libquadmath.texi: Bump @copying's copyright year.
      
      From-SVN: r243992
      Jakub Jelinek committed
  11. 21 Dec, 2016 1 commit
  12. 14 Nov, 2016 1 commit
    • Introduce -fprofile-update=prefer-atomic · 4d209853
      	PR bootstrap/78069
      	* common.opt: Add prefer-atomic as a new enum value for
      	-fprofile-update.
      	* coretypes.h: Likewise.
      	* doc/invoke.texi: Document the new option value.
      	* gcc.c: Replace atomic with prefer-atomic.  Remove warning.
      	* tree-profile.c (tree_profiling): Select default value
      	of -fprofile-update when 'prefer-atomic' is selected.
      	PR bootstrap/78069
      	* gcc.dg/no_profile_instrument_function-attr-1.c: Update test
      	to match scanned pattern.
      	* gcc.dg/tree-ssa/ssa-lim-11.c: Likewise.
      
      From-SVN: r242386
      Martin Liska committed
  13. 06 Oct, 2016 1 commit
  14. 30 Sep, 2016 1 commit
  15. 15 Aug, 2016 1 commit
  16. 04 Jul, 2016 1 commit
    • fix interaction of -S and -x {c,c++}-header · 79335075
      Irrespective of the use of -o this so far resulted in "error: output
      filename specified twice", since cc1_options already produces a -o
      option when -S was specified.
      
      gcc/
      2016-07-04  Jan Beulich  <jbeulich@suse.com>
      
      	* gcc.c (default_compilers["@c-header"]): Conditionalize "-o".
      
      gcc/cp/
      2016-07-04  Jan Beulich  <jbeulich@suse.com>
      
      	* lang-specs.h ("@c++-header"): Conditionalize "-o".
      
      gcc/testsuite/
      2016-07-04  Jan Beulich  <jbeulich@suse.com>
      
      	* g++.dg/header.c: New.
      	* gcc.dg/header.c: New.
      
      From-SVN: r237955
      Jan Beulich committed
  17. 30 Jun, 2016 1 commit
    • Fix bogus option suggestions for RejectNegative options (PR driver/71651) · 603107fb
      gcc/ChangeLog:
      	PR driver/71651
      	* gcc.c (driver::build_option_suggestions): Pass "option" to
      	add_misspelling_candidates.
      	* opts-common.c (add_misspelling_candidates): Add "option" param;
      	use it to avoid adding negated forms for options marked with
      	RejectNegative.
      	* opts.h (add_misspelling_candidates): Add "option" param.
      
      gcc/testsuite/ChangeLog:
      	PR driver/71651
      	* gcc.dg/spellcheck-options-12.c: New test case.
      
      From-SVN: r237880
      David Malcolm committed
  18. 01 Jun, 2016 1 commit
    • c-common.c (get_source_date_epoch): Rename to cb_get_source_date_epoch. · 15c98b2e
      gcc/c-family/ChangeLog:
      
      2016-05-13  Eduard Sanou  <dhole@openmailbox.org>
      
      	* c-common.c (get_source_date_epoch): Rename to
      	cb_get_source_date_epoch.
      	* c-common.c (cb_get_source_date_epoch): Use a single generic erorr
      	message when the parsing fails.  Use error_at instead of fatal_error.
      	* c-common.h (get_source_date_epoch): Rename to
      	cb_get_source_date_epoch.
      	* c-common.h (cb_get_source_date_epoch): Prototype.
      	* c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
      	* c-common.h (c_omp_region_type): Remove trailing comma.
      	* c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
      	* c-lex.c (c_lex_with_flags): Remove initialization of
      	pfile->source_date_epoch.
      
      gcc/ChangeLog:
      
      2016-05-13  Eduard Sanou  <dhole@openmailbox.org>
      
      	* doc/cppenv.texi: Note that the `%s` in `date` is a non-standard
      	extension.
      	* gcc.c (driver_handle_option): Call set_source_date_epoch_envvar.
      	* gcc.c (set_source_date_epoch_envvar): New function, sets
      	the SOURCE_DATE_EPOCH environment variable to the current time.
      
      gcc/testsuite/ChangeLog:
      
      2016-05-13  Eduard Sanou  <dhole@openmailbox.org>
      
      	* gcc.dg/cpp/source_date_epoch-1.c: New file, test the proper
      	behaviour of the macros __DATE__ and __TIME__ when SOURCE_DATE_EPOCH
      	env var is set.
      	* gcc.dg/cpp/source_date_epoch-2.c: New file, test the error output
      	when parsing the SOURCE_DATE_EPOCH env var, and make sure it is only
      	shown once.
      	* lib/gcc-dg.exp (dg-set-compiler-env-var): New function, set env vars
      	during compilation.
      	* lib/gcc-dg.exp (restore-compiler-env-var): New function, restore env
      	vars set by dg-set-compiler-env-var.
      
      libcpp/ChangeLog:
      
      2016-05-13  Eduard Sanou  <dhole@openmailbox.org>
      
      	* include/cpplib.h (cpp_callbacks): Add get_source_date_epoch
      	callback.
      	* include/cpplib.h (cpp_init_source_date_epoch): Remove prototype.
      	* init.c (cpp_init_source_date_epoch): Remove function.
      	* init.c (cpp_create_reader): Initialize pfile->source_date_epoch.
      	* internal.h (cpp_reader): Extend comment about source_date_epoch.
      	* macro.c (_cpp_builtin_macro_text): Use get_source_date_epoch
      	callback only once, read pfile->source_date_epoch on future passes.
      	Check that get_source_date_epoch callback is not NULL.
      
      From-SVN: r237001
      Eduard Sanou committed
  19. 09 May, 2016 1 commit
    • Error out on -fvtable-verify without --enable-vtable-verify · ad103b01
      	* configure.ac (enable_vtable_verify): Handle --enable-vtable-verify.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      	* gcc.c (VTABLE_VERIFICATION_SPEC) [!ENABLE_VTABLE_VERIFY]: Error
      	on -fvtable-verify.
      	* config/sol2.h [!ENABLE_VTABLE_VERIFY] (STARTFILE_VTV_SPEC): Define.
      	(ENDFILE_VTV_SPEC): Define.
      
      From-SVN: r236029
      Rainer Orth committed
  20. 19 Feb, 2016 1 commit
  21. 12 Feb, 2016 2 commits
    • PR driver/69779: fix bogus cleanup code used by libgccjit affecting s390x · 8dccd19b
      gcc/ChangeLog:
      	PR driver/69779
      	* gcc.c (driver::finalize): Fix cleanup of "specs".
      
      From-SVN: r233385
      David Malcolm committed
    • PR driver/69265 and 69453: improved suggestions for various misspelled options · 61789eed
      gcc/ChangeLog:
      	PR driver/69265
      	PR driver/69453
      	* gcc.c (driver::driver): Initialize m_option_suggestions.
      	(driver::~driver): Clean up m_option_suggestions.
      	(suggest_option): Convert to...
      	(driver::suggest_option): ...this, and split out into
      	driver::build_option_suggestions and find_closest_string.
      	(driver::build_option_suggestions): New function, from
      	first half of suggest_option.  Special-case
      	OPT_fsanitize_ and OPT_fsanitize_recover_, making use of
      	the sanitizer_opts array.  For options of enum types, add the
      	various enum values to the candidate strings.
      	(driver::handle_unrecognized_options): Remove "const".
      	* gcc.h (driver::handle_unrecognized_options): Likewise.
      	(driver::build_option_suggestions): New decl.
      	(driver::suggest_option): New decl.
      	(driver::m_option_suggestions): New field.
      	* opts-common.c (add_misspelling_candidates): New function.
      	* opts.c (sanitizer_opts): Remove decl of struct sanitizer_opts_s
      	and make non-static.
      	* opts.h (sanitizer_opts): New array decl.
      	(add_misspelling_candidates): New function decl.
      	* spellcheck.c (find_closest_string): New function.
      	* spellcheck.h (find_closest_string): New function decl.
      
      gcc/testsuite/ChangeLog:
      	PR driver/69265
      	PR driver/69453
      	* gcc.dg/spellcheck-options-3.c: New test case.
      	* gcc.dg/spellcheck-options-4.c: New test case.
      	* gcc.dg/spellcheck-options-5.c: New test case.
      	* gcc.dg/spellcheck-options-6.c: New test case.
      	* gcc.dg/spellcheck-options-7.c: New test case.
      	* gcc.dg/spellcheck-options-8.c: New test case.
      	* gcc.dg/spellcheck-options-9.c: New test case.
      	* gcc.dg/spellcheck-options-10.c: New test case.
      
      From-SVN: r233382
      David Malcolm committed
  22. 19 Jan, 2016 1 commit
    • Fix memory chunk corruption for opts_obstack (PR jit/68446) · d6874f56
      gcc/ChangeLog:
      	PR jit/68446
      	* gcc.c (driver::decode_argv): Add call to
      	init_opts_obstack before init_options_struct.
      	* opts.c (init_opts_obstack): Remove idempotency.
      	(init_options_struct): Replace call to init_opts_obstack
      	with a gcc_assert to verify that it has already been called.
      	* toplev.c (toplev::main): Add call to init_opts_obstack before
      	calls to init_options_struct.
      	(toplev::finalize): Move cleanup of opts_obstack next to
      	cleanup of save_decoded_options, clearing the latter, and
      	save_decoded_options_count.
      
      From-SVN: r232567
      David Malcolm committed
  23. 12 Jan, 2016 1 commit
  24. 04 Jan, 2016 1 commit
    • gcc.c (process_command): Update copyright notice dates. · 21fa2a29
      gcc/
      	* gcc.c (process_command): Update copyright notice dates.
      	* gcov-dump.c (print_version): Ditto.
      	* gcov.c (print_version): Ditto.
      	* gcov-tool.c (print_version): Ditto.
      	* gengtype.c (create_file): Ditto.
      	* doc/cpp.texi: Bump @copying's copyright year.
      	* doc/cppinternals.texi: Ditto.
      	* doc/gcc.texi: Ditto.
      	* doc/gccint.texi: Ditto.
      	* doc/gcov.texi: Ditto.
      	* doc/install.texi: Ditto.
      	* doc/invoke.texi: Ditto.
      gcc/ada/
      	* gnat_ugn.texi: Bump @copying's copyright year.
      	* gnat_rm.texi: Likewise.
      gcc/fortran/
      	* gfortranspec.c (lang_specific_driver): Update copyright notice
      	dates.
      	* gfc-internals.texi: Bump @copying's copyright year.
      	* gfortran.texi: Ditto.
      	* intrinsic.texi: Ditto.
      	* invoke.texi: Ditto.
      gcc/go/
      	* gccgo.texi: Bump @copyrights-go year.
      gcc/java/
      	* jcf-dump.c (version): Update copyright notice dates.
      libgomp/
      	* libgomp.texi: Bump @copying's copyright year.
      libitm/
      	* libitm.texi: Bump @copying's copyright year.
      libjava/
      	* classpath/gnu/java/rmi/registry/RegistryImpl.java (version): Update
      	copyright notice dates.
      	* classpath/tools/gnu/classpath/tools/orbd/Main.java (run): Ditto.
      	* gnu/gcj/convert/Convert.java (version): Update copyright notice
      	dates.
      	* gnu/gcj/tools/gcj_dbtool/Main.java (main): Ditto.
      libquadmath/
      	* libquadmath.texi: Bump @copying's copyright year.
      
      From-SVN: r232053
      Jakub Jelinek committed
  25. 25 Nov, 2015 1 commit
    • Port libvtv to Solaris · e5ef217c
      	libstdc++-v3:
      	* acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY) <solaris2*>: Use
      	-Wl,-R in VTV_CXXLINKFLAGS.
      	* configure: Regenerate.
      
      	* testsuite/18_support/bad_exception/23591_thread-1.c: Use
      	-fvtable-verify=none on Solaris 12+.
      
      	libgcc:
      	* Makefile.in (VTV_CFLAGS): New variable.
      	(vtv_start$(objext), vtv_end$(objext), vtv_end$(objext))
      	(vtv_start_preinit$(objext), vtv_end_preinit$(objext)): Use it.
      	* config.host (*-*-solaris2*): Add t-crtstuff-pic to tmake_file.
      	Add vtv_start.o, vtv_end.o, vtv_start_preinit.o, vtv_end_preinit.o
      	to extra_parts if $enable_vtable_verify = yes.
      
      	libvtv:
      	* configure.tgt (*-*-solaris2.[1-9]*): Declare supported.
      	* configure.ac: Call AC_USE_SYSTEM_EXTENSIONS.
      	<*-*-solaris2*>: Check for init priority support.
      	Check for getexecname, __fortify_fail, _obstack_begin.
      	(VTV_NO_OBSTACK): New conditional.
      	* configure: Regenerate.
      	* Makefile.am [VTV_NO_OBSTACK] (obstack.c): Use new condition.
      	Create empty config.h
      	* Makefile.in: Regenerate.
      
      	* vtv_rts.cc [HAVE_GETEXECNAME] (program_invocation_name): New
      	variable.
      	(read_section_offset_and_length) [HAVE_GETEXECNAME]: Set it.
      	(dl_iterate_phdr_callback) [HAVE_GETEXECNAME]: Set it.
      
      	(__fortify_fail): Wrap in HAVE___FORTIFY_FAIL
      	[!HAVE___FORTIFY_FAIL]: Provide non-Cygwin implementation.
      
      	(read_section_offset_and_length): Assert sh_size >= VTV_PAGE_SIZE.
      	(iterate_modules): Fix typo.
      	Use VTV_PAGE_SIZE.
      	(dl_iterate_phdr_callback): Fix typo.
      	Use VTV_PAGE_SIZE.
      	(__VLTChangePermission): Fix typos.
      
      	include:
      	* vtv-change-permission.h (VTV_PAGE_SIZE) [__sun__ && __svr4__ &&
      	__sparc__]: Define.
      
      	gcc:
      	* config/sol2.h (SUPPORTS_INIT_PRIORITY): Move up.
      	(STARTFILE_VTV_SPEC, ENDFILE_VTV_SPEC): Define.
      	(STARTFILE_SPEC): Use %(startfile_vtv).
      	(ENDFILE_SPEC): Use %(endfile_vtv).
      	(SUBTARGET_EXTRA_SPECS): Handle STARTFILE_VTV_SPEC,
      	ENDFILE_VTV_SPEC.
      
      	* gcc.c (LINK_COMMAND_SPEC): Move VTABLE_VERIFICATION_SPEC after %{L*}.
      
      From-SVN: r230865
      Rainer Orth committed
  26. 15 Nov, 2015 1 commit
    • always define ENABLE_OFFLOADING · 1d899da2
      gcc/cp/ChangeLog:
      
      2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
      
      	* parser.c (cp_parser_omp_declare_target): Adjust.
      
      gcc/ChangeLog:
      
      2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
      
      	* configure: Regenerate.
      	* configure.ac: Always define ENABLE_OFFLOADING.
      	* cgraph.c (cgraph_node::create): Adjust.
      	* gcc.c (process_command): Likewise.
      	* omp-low.c (create_omp_child_function): Likewise.
      	(expand_omp_target): Likewise.
      	* varpool.c (varpool_node::get_create): Likewise.
      
      gcc/c/ChangeLog:
      
      2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
      
      	* c-parser.c (c_parser_omp_declare_target): Adjust.
      
      From-SVN: r230393
      Trevor Saunders committed
  27. 13 Nov, 2015 2 commits
    • [PATCH] gcc.c: new macro POST_LINK_SPECS to be able to add additional · d9386123
      steps after linking
      
      	* gcc.c (POST_LINK_SPEC): Define if not already defined.
      	(LINK_COMMAND_SPEC): Use post_link.
      	(post_link_spec): New, initialize to POST_LINK_SPEC.
      	(post_link): Initialize new static spec.
      	* doc/tm.texi.in (POST_LINK_SPEC): Document.
      	* doc/tm.texi: Regenerated.
      
      From-SVN: r230287
      Andris Pavenis committed
    • PR driver/67613 - spell suggestions for misspelled command line options · 93ebf1fd
      gcc/ChangeLog:
      	PR driver/67613
      	* Makefile.in (GCC_OBJS): Add spellcheck.o.
      	(OBJS): Add spellcheck-tree.o.
      	* gcc.c: Include "spellcheck.h".
      	(suggest_option): New function.
      	(driver::handle_unrecognized_options): Call suggest_option to
      	provide a hint about misspelled options.
      	* spellcheck.c: Update file comment.
      	(levenshtein_distance): Convert 4-param implementation from static
      	to extern scope.  Remove note about unit tests from leading
      	comment for const char * implementation.  Move tree
      	implementation to...
      	* spellcheck-tree.c: New file.
      	* spellcheck.h (levenshtein_distance):  Add 4-param decl.
      
      gcc/testsuite/ChangeLog:
      	PR driver/67613
      	* gcc/testsuite/gcc.dg/spellcheck-options-1.c: New file.
      	* gcc/testsuite/gcc.dg/spellcheck-options-2.c: New file.
      
      From-SVN: r230285
      David Malcolm committed
  28. 12 Nov, 2015 1 commit
    • Fix big memory leak in ix86_valid_target_attribute_p · de5672fc
      	* config/i386/i386.c (ix86_valid_target_attribute_p):
      	Finalize options at the of the function.
      	* gcc.c (driver_get_configure_time_options): Call newly
      	introduced init_opts_obstack.
      	* lto-wrapper.c (main): Likewise.
      	* opts.c (init_opts_obstack): New function.
      	(init_options_struct): Call newly
      	introduced init_opts_obstack.
      	* opts.h (init_options_struct): Declare.
      
      From-SVN: r230264
      Martin Liska committed
  29. 09 Nov, 2015 1 commit
    • Fix memory leaks and use a pool_allocator · af121e82
      	* gcc.c (record_temp_file): Release name string.
      	* ifcvt.c (noce_convert_multiple_sets): Use auto_vec instead
      	of vec.
      	* lra-lives.c (free_live_range_list): Utilize
      	lra_live_range_pool for allocation and deallocation.
      	(create_live_range): Likewise.
      	(copy_live_range): Likewise.
      	(lra_merge_live_ranges): Likewise.
      	(remove_some_program_points_and_update_live_ranges): Likewise.
      	(lra_create_live_ranges_1): Release point_freq_vec that can
      	be not freed from previous iteration of the function.
      	* tree-eh.c (lower_try_finally_switch): Use auto_vec instead of
      	vec.
      	* tree-sra.c (sra_deinitialize): Release all vectors in
      	base_access_vec.
      	* tree-ssa-dom.c (free_dom_edge_info): Make the function extern.
      	* tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges):
      	Release edge_info for a removed edge.
      	(thread_through_all_blocks): Free region vector.
      	* tree-ssa.h (free_dom_edge_info): Declare function extern.
      
      From-SVN: r230027
      Martin Liska committed
  30. 21 Oct, 2015 1 commit
    • Improve --help output to generate references to option aliases. · a7b2e184
      gcc/
      	PR driver/68043
      	* opts.c (undocumented_msg, use_diagnosed_msg): New globals.
      	(print_filtered_help): Reference aliased option's name and encourage
      	readers to use it in preference to the alias if the former is not
      	documented.  Mention when using an option is diagnosed.
      	* gcc.c (display_help): End each sentence with a period.
      
      	* ada/gcc-interface/lang.opt: End each sentence that describes
      	an option with a period.
      	* c-family/c.opt: Same.
      	* common.opt: Same.
      	* config/aarch64/aarch64.opt: Same.
      	* config/alpha/alpha.opt: Same.
      	* config/arc/arc.opt: Same.
      	* config/arm/arm.opt: Same.
      	* config/avr/avr.opt: Same.
      	* config/bfin/bfin.opt: Same.
      	* config/c6x/c6x.opt: Same.
      	* config/cr16/cr16.opt: Same.
      	* config/cris/cris.opt: Same.
      	* config/cris/linux.opt: Same.
      	* config/darwin.opt: Same.
      	* config/epiphany/epiphany.opt: Same.
      	* config/fr30/fr30.opt: Same.
      	* config/frv/frv.opt: Same.
      	* config/ft32/ft32.opt: Same.
      	* config/g.opt: Same.
      	* config/h8300/h8300.opt: Same.
      	* config/i386/cygming.opt: Same.
      	* config/i386/djgpp.opt: Same.
      	* config/i386/i386.opt: Same.
      	* config/i386/interix.opt: Same.
      	* config/i386/mingw-w64.opt: Same.
      	* config/i386/mingw.opt: Same.
      	* config/ia64/ia64.opt: Same.
      	* config/ia64/ilp32.opt: Same.
      	* config/iq2000/iq2000.opt: Same.
      	* config/linux.opt: Same.
      	* config/lm32/lm32.opt: Same.
      	* config/lynx.opt: Same.
      	* config/m32c/m32c.opt: Same.
      	* config/m32r/m32r.opt: Same.
      	* config/m68k/ieee.opt: Same.
      	* config/m68k/m68k.opt: Same.
      	* config/mcore/mcore.opt: Same.
      	* config/mep/mep.opt: Same.
      	* config/microblaze/microblaze.opt: Same.
      	* config/mips/mips.opt: Same.
      	* config/mmix/mmix.opt: Same.
      	* config/mn10300/mn10300.opt: Same.
      	* config/moxie/moxie.opt: Same.
      	* config/msp430/msp430.opt: Same.
      	* config/nios2/elf.opt: Same.
      	* config/nios2/nios2.opt: Same.
      	* config/nvptx/nvptx.opt: Same.
      	* config/pa/pa-hpux.opt: Same.
      	* config/pa/pa-hpux1010.opt: Same.
      	* config/pa/pa-hpux1111.opt: Same.
      	* config/pa/pa-hpux1131.opt: Same.
      	* config/pa/pa.opt: Same.
      	* config/pa/pa64-hpux.opt: Same.
      	* config/pdp11/pdp11.opt: Same.
      	* config/rl78/rl78.opt: Same.
      	* config/rs6000/476.opt: Same.
      	* config/rs6000/aix64.opt: Same.
      	* config/rs6000/darwin.opt: Same.
      	* config/rs6000/linux64.opt: Same.
      	* config/rs6000/rs6000.opt: Same.
      	* config/rs6000/sysv4.opt: Same.
      	* config/s390/s390.opt: Same.
      	* config/s390/tpf.opt: Same.
      	* config/sh/sh.opt: Same.
      	* config/sol2.opt: Same.
      	* config/sparc/long-double-switch.opt: Same.
      	* config/sparc/sparc.opt: Same.
      	* config/spu/spu.opt: Same.
      	* config/stormy16/stormy16.opt: Same.
      	* config/tilegx/tilegx.opt: Same.
      	* config/tilepro/tilepro.opt: Same.
      	* config/v850/v850.opt: Same.
      	* config/vax/vax.opt: Same.
      	* config/visium/visium.opt: Same.
      	* config/vms/vms.opt: Same.
      	* config/vxworks.opt: Same.
      	* config/xtensa/xtensa.opt: Same.
      	* fortran/lang.opt: Same.
      
      testsuite/
      	PR driver/68043
      	* gcc.misc-tests/help.exp: Adjust.
      	* lib/options.exp (check_for_options): Add detail to output.
      
      From-SVN: r229155
      Martin Sebor committed
  31. 02 Oct, 2015 1 commit
  32. 30 Sep, 2015 1 commit
    • re PR go/66870 (split stack issues on ppc64le and ppc64) · 402565b6
      	PR target/66870
      	* config/rs6000/sysv4.h (TARGET_CAN_SPLIT_STACK_64BIT): Define.
      	* configure.ac: Define HAVE_GOLD_ALTERNATE_SPLIT_STACK on Power
      	based on gold linker version.
      	* gcc.c: Add -fuse-ld=gold to STACK_SPLIT_SPEC if
      	HAVE_GOLD_ALTERNATE_SPLIT_STACK defined.
      	* configure, config.in: Regenerate.
      go:
      	* gospec.c (lang_specific_driver): Set appropriate split stack
      	options for 64 bit compiles based on TARGET_CAN_SPLIT_STACK_64BIT.
      
      From-SVN: r228311
      Lynn Boger committed
  33. 24 Sep, 2015 1 commit
    • Support PIE on Solaris · df2a1cc4
      	gcc/testsuite:
      	* lib/target-supports.exp (check_effective_target_pie): Check for
      	PIE support on Solaris 11.x and 12.
      
      	libgcc:
      	* config.host (*-*-solaris2*): Add t-crtstuff-pic to tmake_file.
      	Add crtbeginS.o, crtendS.o to extra_parts if libgcc_cv_solaris_crts.
      	* config/sol2/gmon.c: (monstartup): Don't write trailing NUL of
      	messages.
      	(internal_mcount): Likewise.
      	* config/sol2/t-sol2 (crtp.o, crtpg.o, gmon.o): Compile with
      	crt_compile, add CRTSTUFF_T_CFLAGS_S.
      
      	gcc:
      	* configure.ac (gcc_cv_ld_pie): Check for gld >= 2.26 on Solaris.
      	Check for ld -type pie on Solaris 11.x and 12.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      
      	* gcc.c (LD_PIE_SPEC): Allow redefinition.
      
      	* config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Define.
      	(STARTFILE_SPEC): Use it.
      	(ENDFILE_CRTEND_SPEC): Define.
      	(ENDFILE_SPEC): Use it and ENDFILE_ARCH_SPEC.
      	(SUBTARGET_EXTRA_SPECS): Add STARTFILE_CRTBEGIN_SPEC,
      	ENDFILE_ARCH_SPEC, ENDFILE_CRTEND_SPEC.
      	[HAVE_LD_PIE && HAVE_SOLARIS_CRTS] (LD_PIE_SPEC): Define.
      	(!(HAVE_LD_PIE && HAVE_SOLARIS_CRTS)] (LINK_PIE_SPEC): Define.
      	* config/i386/sol2.h (ENDFILE_SPEC): Remove.
      	(ENDFILE_ARCH_SPEC): Define.
      	* config/sparc/sol2.h (ENDFILE_ARCH_SPEC): Define.
      
      From-SVN: r228078
      Rainer Orth committed
  34. 23 Sep, 2015 2 commits
  35. 31 Aug, 2015 1 commit
  36. 25 Aug, 2015 1 commit