summaryrefslogtreecommitdiff
path: root/gcc/common.opt
Commit message (Collapse)AuthorAgeFilesLines
* Enable -fsanitize-recover for KASan.ygribov2014-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2014-10-28 Yury Gribov <y.gribov@samsung.com> gcc/ * asan.c (report_error_func): Add noabort path. (check_func): Ditto. Formatting. (asan_expand_check_ifn): Handle noabort path. * common.opt (flag_sanitize_recover): Add SANITIZE_KERNEL_ADDRESS to default value. * doc/invoke.texi (-fsanitize-recover=): Mention KASan. * opts.c (finish_options): Reword comment. * sanitizer.def: Add noabort ASan builtins. gcc/testsuite/ * c-c++-common/asan/kasan-recover-1.c: New test. * c-c++-common/asan/kasan-recover-2.c: New test. * c-c++-common/asan/instrument-with-calls-1.c: Get rid of -save-temps. * c-c++-common/asan/instrument-with-calls-2.c: Likewise. * c-c++-common/asan/instrument-with-calls-3.c: Likewise. * c-c++-common/asan/kasan-recover-1.c: Likewise. * c-c++-common/asan/kasan-recover-2.c: Likewise. * c-c++-common/asan/no-asan-globals.c: Likewise. * c-c++-common/asan/no-instrument-reads.c: Likewise. * c-c++-common/asan/no-instrument-writes.c: Likewise. * c-c++-common/asan/no-use-after-return.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216778 138bc75d-0d04-0410-961f-82ee72b054a4
* Allow to override Asan shadow offset.ygribov2014-10-281-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | 2014-10-28 Yury Gribov <y.gribov@samsung.com> gcc/ * asan.c (set_asan_shadow_offset): New function. (asan_shadow_offset): Likewise. (asan_emit_stack_protection): Call asan_shadow_offset. (build_shadow_mem_access): Likewise. * asan.h (set_asan_shadow_offset): Declare. * common.opt (fasan-shadow-offset): New option. (frandom-seed): Fixed parameter name. * doc/invoke.texi (fasan-shadow-offset): Describe new option. (frandom-seed): Fixed parameter name. * opts-global.c (handle_common_deferred_options): Handle -fasan-shadow-offset. * opts.c (common_handle_option): Likewise. gcc/testsuite/ * c-c++-common/asan/shadow-offset-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216773 138bc75d-0d04-0410-961f-82ee72b054a4
* New syntax for -fsanitize-recover.ygribov2014-10-221-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2014-10-22 Jakub Jelinek <jakub@redhat.com> Yury Gribov <y.gribov@samsung.com> gcc/ * common.opt (flag_sanitize_recover): New variable. (fsanitize-recover): Remove Var/Init, deprecate. (fsanitize-recover=): New option. * doc/invoke.texi (fsanitize-recover): Update docs. * opts.c (finish_options): Use opts->x_flag_sanitize instead of flag_sanitize. Prohibit -fsanitize-recover for anything besides UBSan. Formatting. (common_handle_option): Handle OPT_fsanitize_recover_ and OPT_fsanitize_recover. Use opts->x_flag_sanitize instead of flag_sanitize. * asan.c (pass_sanopt::execute): Fix up formatting. * ubsan.c (ubsan_expand_bounds_ifn, ubsan_expand_null_ifn, ubsan_expand_objsize_ifn, ubsan_build_overflow_builtin, instrument_bool_enum_load, ubsan_instrument_float_cast, instrument_nonnull_arg, instrument_nonnull_return): Check bits in flag_sanitize_recover bitmask instead of flag_sanitize_recover as bool flag. gcc/c-family/ * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift, ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask instead of flag_sanitize_recover as bool flag. gcc/testsuite/ * c-c++-common/ubsan/align-1.c: Update cmdline options. * c-c++-common/ubsan/align-3.c: Likewise. * c-c++-common/ubsan/bounds-1.c: Likewise. * c-c++-common/ubsan/div-by-zero-7.c: Likewise. * c-c++-common/ubsan/float-cast-overflow-10.c: Likewise. * c-c++-common/ubsan/float-cast-overflow-7.c: Likewise. * c-c++-common/ubsan/float-cast-overflow-8.c: Likewise. * c-c++-common/ubsan/float-cast-overflow-9.c: Likewise. * c-c++-common/ubsan/nonnull-2.c: Likewise. * c-c++-common/ubsan/nonnull-3.c: Likewise. * c-c++-common/ubsan/object-size-3.c: Likewise. * c-c++-common/ubsan/overflow-1.c: Likewise. * c-c++-common/ubsan/overflow-add-1.c: Likewise. * c-c++-common/ubsan/overflow-add-3.c: Likewise. * c-c++-common/ubsan/overflow-mul-1.c: Likewise. * c-c++-common/ubsan/overflow-mul-3.c: Likewise. * c-c++-common/ubsan/overflow-negate-2.c: Likewise. * c-c++-common/ubsan/overflow-sub-1.c: Likewise. * c-c++-common/ubsan/pr59503.c: Likewise. * c-c++-common/ubsan/pr60613-1.c: Likewise. * c-c++-common/ubsan/save-expr-1.c: Likewise. * c-c++-common/ubsan/shift-3.c: Likewise. * c-c++-common/ubsan/shift-6.c: Likewise. * c-c++-common/ubsan/undefined-1.c: Likewise. * c-c++-common/ubsan/vla-2.c: Likewise. * c-c++-common/ubsan/vla-3.c: Likewise. * c-c++-common/ubsan/vla-4.c: Likewise. * g++.dg/ubsan/cxx11-shift-1.C: Likewise. * g++.dg/ubsan/return-2.C: Likewise. * c-c++-common/ubsan/recovery-1.c: New test. * c-c++-common/ubsan/recovery-2.c: New test. * c-c++-common/ubsan/recovery-3.c: New test. * c-c++-common/ubsan/recovery-common.inc: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216552 138bc75d-0d04-0410-961f-82ee72b054a4
* Add AutoFDO.dehao2014-10-211-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc/ChangeLog: 2014-10-21 Dehao Chen <dehao@google.com> * auto-profile.c: New file. * auto-profile.h: New file. * basic-block.h (maybe_hot_count_p): New export func. (add_working_set): New export func. * gcov-io.h (GCOV_TAG_AFDO_FILE_NAMES): New tag. (GCOV_TAG_AFDO_FUNCTION): Likewise. (GCOV_TAG_AFDO_WORKING_SET): Likewise. * opts.c (enable_fdo_optimizations): New func. (common_handle_option): Handle -fauto-profile flag. * ipa-inline.c (want_early_inline_function_p): Iterative-einline. (class pass_early_inline): Export early_inliner. (early_inliner): Likewise. (pass_early_inline::execute): Likewise. * ipa-inline.h (early_inliner): Likewise. * predict.c (maybe_hot_count_p): New export func. (counts_to_freqs): AutoFDO logic. (rebuild_frequencies): Likewise. * tree-profile.c (pass_ipa_tree_profile::gate): Likewise. * profile.c (add_working_set): New func. * Makefile.in (auto-profile.o): New object file. * passes.def (pass_ipa_auto_profile): New pass. * tree-ssa-live.c (remove_unused_scope_block_p): AutoFDO logic. * tree-pass.h (make_pass_ipa_auto_profile): New pass. * toplev.c (compile_file): AutoFDO logic. * doc/invoke.texi (-fauto-profile): New doc. * coverage.c (coverage_init): AutoFDO logic. * common.opt (-fauto-profile): New flag. * timevar.def (TV_IPA_AUTOFDO): New tag. * value-prof.c (gimple_alloc_histogram_value): New export func. (check_ic_target): Likewise. * value-prof.h (gimple_alloc_histogram_value): Likewise. (check_ic_target): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216523 138bc75d-0d04-0410-961f-82ee72b054a4
* IPA ICF pass, part 3/5marxin2014-10-161-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in: New object files included. * cgraph.c (cgraph_node::dump): New cgraph_node flag icf_merged is printed. (verify_edge_corresponds_to_fndecl): More sensitive verification of nodes that are merged by IPA ICF. * cgraph.h (cgraph_node::num_references): New function. * cgraphunit.c (cgraph_node::expand_thunk): White space fixed. * common.opt: New options ipa-icf, ipa-icf-functions and ipa-icf-variables introduced. * doc/invoke.texi: Documentation of new options introduced. * ipa-icf-gimple.c: New file. * ipa-icf-gimple.h: New file. * ipa-icf.c: New file. * ipa-icf.h: New file. * lto-cgraph.c (lto_output_node): Streaming of icf_merged flag added. (input_overwrite_node): Likewise. * lto-section-in.c: New icf section added. * lto-streamer.h (enum lto_section_type): Likewise. * opts.c (common_handle_option): New option added. * passes.def: New pass included. * timevar.def: Time variable for IPA ICF added. * tree-pass.h: New IPA ICF pass entry point added. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216305 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/chefmax2014-09-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | 2014-09-26 Jakub Jelinek <jakub@redhat.com> Max Ostapenko <m.ostapenko@partner.samsung.com> * common.opt: New option. * doc/invoke.texi: Describe new option. * gcc.c (execute): Don't free first string early, but at the end of the function. Call retry_ice if compiler exited with ICE_EXIT_CODE. (main): Factor out common code. (print_configuration): New function. (files_equal_p): Likewise. (check_repro): Likewise. (run_attempt): Likewise. (do_report_bug): Likewise. (append_text): Likewise. (try_generate_repro): Likewise git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215633 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt (flto-odr-type-merging): New flag.hubicka2014-09-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | * ipa-deivrt.c (hash_type_name): Use ODR names for hasing if availale. (types_same_for_odr): Likewise. (odr_subtypes_equivalent_p): Likewise. (add_type_duplicate): Do not walk type variants. (register_odr_type): New function. * ipa-utils.h (register_odr_type): Declare. (odr_type_p): New function. * langhooks.c (lhd_set_decl_assembler_name): Do not compute TYPE_DECLs * doc/invoke.texi (-flto-odr-type-merging): Document. * tree.c (need_assembler_name_p): Compute ODR names when asked for it. * tree.h (DECL_ASSEMBLER_NAME): Update comment. * lto.c (lto_read_decls): Register ODR types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215196 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/ChangeLog:manu2014-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org> * doc/options.texi: Document that Var and Init are required if CPP is given. * optc-gen.awk: Require Var and Init if CPP is given. * common.opt (Wpedantic): Use Init. libcpp/ChangeLog: 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org> * macro.c (replace_args): Use cpp_pedwarning, cpp_warning and CPP_W flags. * include/cpplib.h: Add CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC. * init.c (cpp_create_reader): Do not init to -1 here. * expr.c (num_binary_op): Use cpp_pedwarning. gcc/c-family/ChangeLog: 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org> * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels, Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic, (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var and Init. * c-opts.c (c_common_handle_option): Do not handle here. (sanitize_cpp_opts): Likewise. * c-common.c (struct reason_option_codes_t): Handle CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC. gcc/testsuite/ChangeLog: 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org> * gcc.dg/cpp/endif-pedantic2.c: More general options do not override specific ones, but specific ones do. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214904 138bc75d-0d04-0410-961f-82ee72b054a4
* [gcc/]romangareev2014-08-161-1/+1
| | | | | | | | * common.opt: Make the ISL AST generator to be the main code generator of Graphite. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214069 138bc75d-0d04-0410-961f-82ee72b054a4
* * doc/invoke.texi (Wsuggest-final-types, Wsuggest-final-methods): Document.hubicka2014-08-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | * ipa-devirt.c: Include hash-map.h (struct polymorphic_call_target_d): Add type_warning and decl_warning. (clear_speculation): Break out of ... (get_class_context): ... here; speed up handling obviously useless speculations. (odr_type_warn_count, decl_warn_count): New structures. (final_warning_record): New structure. (final_warning_records): New static variable. (possible_polymorphic_call_targets): Cleanup handling of speculative info; do not build speculation when user do not care; record info about warnings when asked for. (add_decl_warning): New function. (type_warning_cmp): New function. (decl_warning_cmp): New function. (ipa_devirt): Handle -Wsuggest-final-methods and -Wsuggest-final-types. (gate): Enable pass when warnings are requested. * common.opt (Wsuggest-final-types, Wsuggest-final-methods): New options. * g++.dg/warn/Wsuggest-final.C: New testcase. * g++.dg/ipa/devirt-34.C: Fix. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213518 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-07-31 Marc Glisse <marc.glisse@inria.fr>glisse2014-07-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | PR c++/60517 gcc/c/ * c-typeck.c (c_finish_return): Return 0 instead of the address of a local variable. gcc/cp/ * typeck.c (maybe_warn_about_returning_address_of_local): Return whether it is returning the address of a local variable. (check_return_expr): Return 0 instead of the address of a local variable. gcc/c-family/ * c.opt (-Wreturn-local-addr): Move to common.opt. gcc/ * common.opt (-Wreturn-local-addr): Moved from c.opt. * gimple-ssa-isolate-paths.c: Include diagnostic-core.h and intl.h. (isolate_path): New argument to avoid inserting a trap. (find_implicit_erroneous_behaviour): Handle returning the address of a local variable. (find_explicit_erroneous_behaviour): Likewise. gcc/testsuite/ * c-c++-common/addrtmp.c: New file. * c-c++-common/uninit-G.c: Adapt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213323 138bc75d-0d04-0410-961f-82ee72b054a4
* * g++.dg/ipa/devirt-34.C: New testcase.hubicka2014-07-301-1/+1
| | | | | | | | | | | | | * ipa-devirt.c (polymorphic_call_target_d): Rename nonconstruction_targets to speculative_targets (get_class_context): Fix handling of contextes without outer type; avoid matching non-polymorphic types in LTO. (possible_polymorphic_call_targets): Trun nonconstruction_targetsp parameter to speculative_targetsp; handle speculation. (dump_possible_polymorphic_call_targets): Update dumping. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213232 138bc75d-0d04-0410-961f-82ee72b054a4
* PR middle-end/61913mpolacek2014-07-281-1/+1
| | | | | | | * common.opt (Wodr): Add Var. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213115 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.c (type_in_anonymous_namespace_p): Ignore TREE_PUBLIChubicka2014-07-121-0/+4
| | | | | | | | | | | | | | | on builtin types. * ipa-devirt.c: Include stor-layout.h and intl.h (odr_subtypes_equivalent_p): New function. (warn_odr): New function. (warn_type_mismatch): New function. (odr_types_equivalent_p): New function. (add_type_duplicate): Use it. * common.opt (Wodr): New flag. * doc/invoke.texi (Wodr): Document new warning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212481 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/romangareev2014-06-291-0/+13
| | | | | | | | | | | | | | | | | | | | * Makefile.in: Add the compilation of graphite-isl-ast-to-gimple.o. * common.opt: Add new switch fgraphite-code-generator=[isl|cloog]. * flag-types.h: Add new enum fgraphite_generator. * graphite-isl-ast-to-gimple.c: New. * graphite-isl-ast-to-gimple.h: New. * graphite.c (graphite_transform_loops): Add choice of Graphite code generator, which depends on flag_graphite_code_gen. gcc/testsuite/gcc.dg/graphite/isl-codegen-loop-dumping.c: New testcase that checks that the dump is generated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212124 138bc75d-0d04-0410-961f-82ee72b054a4
* Support compressed debug sectionsro2014-06-271-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (gcc_cv_as_compress_debug): Check for assembler compressed debug support. (gcc_cv_ld_compress_debug): Check for linker compressed debug support. * configure: Regenerate. * config.in: Regenerate. * common.opt (compressed_debug_sections): New enum. (gz, gz=): New options. * gcc.c (LINK_COMPRESS_DEBUG_SPEC, ASM_COMPRESS_DEBUG_SPEC): Define. (LINK_COMMAND_SPEC): Invoke LINK_COMPRESS_DEBUG_SPEC. (asm_options): Invoke ASM_COMPRESS_DEBUG_SPEC. * config/darwin.h (LINK_COMMAND_SPEC_A): Invoke LINK_COMPRESS_DEBUG_SPEC. * config/i386/djgpp.h (LINK_COMMAND_SPEC): Likewise. * opts.c (common_handle_option): Handle OPT_gz, OPT_gz_. * doc/invoke.texi (Option Summary, Debugging Options): Add -gz[=type]. (Debugging Options): Document -gz[=type]. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212072 138bc75d-0d04-0410-961f-82ee72b054a4
* * doc/invoke.texi (-fsemantic-interposition): Document.hubicka2014-06-261-0/+4
| | | | | | | | | * common.opt (fsemantic-interposition): New flag. * varasm.c (decl_replaceable_p): Use it. * gcc.dg/tree-ssa/interposition.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212049 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-06-18 Richard Biener <rguenther@suse.de>rguenth2014-06-181-0/+4
| | | | | | | | | | | * common.opt (fssa-phiopt): New option. * opts.c (default_options_table): Enable -fssa-phiopt with -O1+ but not with -Og. * tree-ssa-phiopt.c (pass_phiopt): Add gate method. * doc/invoke.texi (-fssa-phiopt): Document. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211772 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt (fabi-version): Change default to 0.jason2014-06-121-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211593 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/jason2014-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | * toplev.c (process_options): Reject -fabi-version=1. gcc/cp/ * call.c (build_operator_new_call): Remove -fabi-version=1 support. * class.c (walk_subobject_offsets, include_empty_classes): Likewise. (layout_nonempty_base_or_field, end_of_class): Likewise. (layout_empty_base, build_base_field, layout_class_type): Likewise. (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise. (layout_virtual_bases): Likewise. * decl.c (compute_array_index_type): Likewise. * mangle.c (write_mangled_name, write_prefix): Likewise. (write_template_prefix, write_integer_cst, write_expression): Likewise. (write_template_arg, write_array_type): Likewise. * method.c (lazily_declare_fn): Likewise. * rtti.c (get_pseudo_ti_index): Likewise. * typeck.c (comp_array_types): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211592 138bc75d-0d04-0410-961f-82ee72b054a4
* -fuse-caller-save - Add command line optionvries2014-04-241-0/+4
| | | | | | | | | 2014-04-24 Radovan Obradovic <robradovic@mips.com> Tom de Vries <tom@codesourcery.com> * common.opt (fuse-caller-save): New option. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209743 138bc75d-0d04-0410-961f-82ee72b054a4
* PR sanitizer/60275jakub2014-04-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common.opt (fsanitize-recover, fsanitize-undefined-trap-on-error): New options. * gcc.c (sanitize_spec_function): Don't return "" for "undefined" if flag_sanitize_undefined_trap_on_error. * sanitizer.def (BUILT_IN_UBSAN_HANDLE_DIVREM_OVERFLOW_ABORT, BUILT_IN_UBSAN_HANDLE_SHIFT_OUT_OF_BOUNDS_ABORT, BUILT_IN_UBSAN_HANDLE_VLA_BOUND_NOT_POSITIVE_ABORT, BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT, BUILT_IN_UBSAN_HANDLE_ADD_OVERFLOW_ABORT, BUILT_IN_UBSAN_HANDLE_SUB_OVERFLOW_ABORT, BUILT_IN_UBSAN_HANDLE_MUL_OVERFLOW_ABORT, BUILT_IN_UBSAN_HANDLE_NEGATE_OVERFLOW_ABORT, BUILT_IN_UBSAN_HANDLE_LOAD_INVALID_VALUE_ABORT): New builtins. * ubsan.c (ubsan_instrument_unreachable): Return __builtin_trap () if flag_sanitize_undefined_trap_on_error. (ubsan_expand_null_ifn): Emit __builtin_trap () if flag_sanitize_undefined_trap_on_error and __ubsan_handle_type_mismatch_abort if !flag_sanitize_recover. (ubsan_expand_null_ifn, ubsan_build_overflow_builtin, instrument_bool_enum_load): Emit __builtin_trap () if flag_sanitize_undefined_trap_on_error and __builtin_handle_*_abort () if !flag_sanitize_recover. * doc/invoke.texi (-fsanitize-recover, -fsanitize-undefined-trap-on-error): Document. c-family/ * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap () if flag_sanitize_undefined_trap_on_error. (ubsan_instrument_division, ubsan_instrument_shift, ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort () if !flag_sanitize_recover. testsuite/ * g++.dg/ubsan/return-2.C: Revert 2014-03-24 changes, add -fno-sanitize-recover to dg-options. * g++.dg/ubsan/cxx11-shift-1.C: Remove c++11 target restriction, add -std=c++11 to dg-options. * g++.dg/ubsan/cxx11-shift-2.C: Likewise. * g++.dg/ubsan/cxx1y-vla.C: Remove c++1y target restriction, add -std=c++1y to dg-options. * c-c++-common/ubsan/undefined-1.c: Revert 2014-03-24 changes, add -fno-sanitize-recover to dg-options. * c-c++-common/ubsan/overflow-sub-1.c: Likewise. * c-c++-common/ubsan/vla-4.c: Likewise. * c-c++-common/ubsan/pr59503.c: Likewise. * c-c++-common/ubsan/vla-3.c: Likewise. * c-c++-common/ubsan/save-expr-1.c: Likewise. * c-c++-common/ubsan/overflow-add-1.c: Likewise. * c-c++-common/ubsan/shift-3.c: Likewise. * c-c++-common/ubsan/overflow-1.c: Likewise. * c-c++-common/ubsan/overflow-negate-2.c: Likewise. * c-c++-common/ubsan/vla-2.c: Likewise. * c-c++-common/ubsan/overflow-mul-1.c: Likewise. * c-c++-common/ubsan/pr60613-1.c: Likewise. * c-c++-common/ubsan/shift-6.c: Likewise. * c-c++-common/ubsan/overflow-mul-3.c: Likewise. * c-c++-common/ubsan/overflow-add-3.c: New test. * c-c++-common/ubsan/overflow-add-4.c: New test. * c-c++-common/ubsan/div-by-zero-6.c: New test. * c-c++-common/ubsan/div-by-zero-7.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209672 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-04-15 Richard Biener <rguenther@suse.de>rguenth2014-04-151-12/+18
| | | | | | | | | | | | | | | | | | | | | * common.opt (lto_partition_model): New enum. (flto-partition=): Merge separate options with a single with argument, add -flto-partition=one support. * flag-types.h (enum lto_partition_model): Declare. * opts.c (finish_options): Remove duplicate -flto-partition= option check. * lto-wrapper.c (run_gcc): Adjust. lto/ * lto.c: Include params.h. (do_whole_program_analysis): Switch on flag_lto_partition value, add support for LTO_PARTITION_ONE. * lto-partition.h (lto_balanced_map): Adjust. * lto-partition.c (lto_balanced_map): Get number of desired partitions as argument to support -flto-partition=one. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209416 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/60731jason2014-04-071-0/+4
| | | | | | | * common.opt (-fno-gnu-unique): Add. * config/elfos.h (USE_GNU_UNIQUE_OBJECT): Check it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209186 138bc75d-0d04-0410-961f-82ee72b054a4
* PR middle-end/60484mpolacek2014-03-141-0/+4
| | | | | | | | | | * common.opt (dump_base_name_prefixed): New Variable. * opts.c (finish_options): Don't prepend directory to x_dump_base_name if x_dump_base_name_prefixed is already set, set it at the end. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208571 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-03-14 Richard Biener <rguenther@suse.de>rguenth2014-03-141-4/+0
| | | | | | | | * common.opt: Revert unintented changes from r205065. * opts.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208568 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-03-07 Paulo Matos <paulo@matos-sorge.com>pmatos2014-03-071-1/+1
| | | | | | | | * common.opt (fira-loop-pressure): Mark as optimization. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208395 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-01-17 Richard Biener <rguenther@suse.de>rguenth2014-01-171-3/+3
| | | | | | | | | | | | | PR tree-optimization/46590 * opts.c (default_options_table): Add entries for OPT_fbranch_count_reg, OPT_fmove_loop_invariants and OPT_ftree_pta, all enabled at -O1 but not for -Og. * common.opt (fbranch-count-reg): Remove Init(1). (fmove-loop-invariants): Likewise. (ftree-pta): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206714 138bc75d-0d04-0410-961f-82ee72b054a4
* Update copyright years in gcc/rsandifo2014-01-021-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206289 138bc75d-0d04-0410-961f-82ee72b054a4
* Improve -fuse-ld=[bfd|gold] checkhjl2013-12-191-2/+2
| | | | | | | | | | | | | | | PR driver/59321 * collect2.c (main): Check -fuse-ld=[bfd|gold] when DEFAULT_LINKER is defined. * common.opt (fuse-ld=bfd): Add Driver. (fuse-ld=gold): Likewise. * gcc.c (use_ld): New variable. (driver_handle_option): Set use_ld for OPT_fuse_ld_bfd and OPT_fuse_ld_gold. (main): Check -fuse-ld=[bfd|gold] for -print-prog-name=ld. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206129 138bc75d-0d04-0410-961f-82ee72b054a4
* Time profile-based function reordering (phase 2).marxin2013-12-171-0/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206070 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt: Split up -fisolate-erroneous-paths intolaw2013-12-051-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | -fisolate-erroneous-paths-dereference and -fisolate-erroneous-paths-attribute. * invoke.texi: Corresponding changes. * gimple.c (infer_nonnull_range): Add and use new arguments to control what kind of statements can be used to infer a non-null range. * gimple.h (infer_nonnull_range): Update prototype. * tree-vrp.c (infer_value_range): Corresponding changes. * opts.c (default_options_table): Update due to option split. * gimple-ssa-isolate-paths.c: Fix trailing whitespace. (find_implicit_erroneous_behaviour): Pass additional arguments to infer_nonnull_range. (find_explicit_erroneous_behaviour): Similarly. (gate_isolate_erroneous_paths): Check both of the new options. testsuite/ * gcc.dg/pr38984.c: Use -fno-isolate-erroneous-paths-dereference. * gcc.dg/tree-ssa/isolate-2.c: Explicitly turn on -fisolate-erroneous-paths-attribute. * gcc.dg/tree-ssa/isolate-4.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205689 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/kyukhin2013-11-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | * common.opt: Introduced a new option -fsimd-cost-model. * doc/invoke.texi: Introduced a new openmp-simd warning and a new -fsimd-cost-model option. * tree-vectorizer.h (unlimited_cost_model): Interface updated to rely on the particular loop info. * tree-vect-data-refs.c (vect_peeling_hash_insert): Ditto. (vect_peeling_hash_choose_best_peeling): Ditto. (vect_enhance_data_refs_alignment): Ditto. * tree-vect-slp.c (vect_slp_analyze_bb_1): Ditto. * tree-vect-loop.c (vect_estimate_min_profitable_iters): Ditto plus added openmp-simd warining. gcc/c-family/ * c.opt (Wopenmp-simd): New. gcc/fortran/ * lang.opt (Wopenmp-simd): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205475 138bc75d-0d04-0410-961f-82ee72b054a4
* PR sanitizer/59061jakub2013-11-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common.opt (static-liblsan): Add. * config/gnu-user.h (STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Define. * flag-types.h (enum sanitize_code): Add SANITIZE_LEAK. Renumber SANITIZE_SHIFT, SANITIZE_DIVIDE, SANITIZE_UNREACHABLE, SANITIZE_VLA, SANITIZE_RETURN. * opts.c (common_handle_option): Handle -fsanitize=leak. * gcc.c (ADD_STATIC_LIBLSAN_LIBS, LIBLSAN_SPEC): Define. (LIBUBSAN_SPEC): Don't test LIBUBSAN_EARLY_SPEC. (LIBUBSAN_EARLY_SPEC): Remove. (SANITIZER_EARLY_SPEC): Don't do anything for libubsan. (SANITIZER_SPEC): Add -fsanitize=leak handling. (sanitize_spec_function): Handle %sanitize(leak). * doc/invoke.texi (-static-liblsan, -fsanitize=leak): Document. * c-c++-common/asan/no-redundant-instrumentation-7.c: Fix cleanup-tree-dump directive. * configure.tgt: Set LSAN_SUPPORTED=yes for x86_64-linux. * configure.ac (LSAN_SUPPORTED): New AM_CONDITIONAL. * configure: Regenerated. * lsan/Makefile.am (toolexeclib_LTLIBRARIES, lsan_files, liblsan_la_SOURCES, liblsan_la_LIBADD, liblsan_la_LDFLAGS): Add. * lsan/Makefile.in: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205290 138bc75d-0d04-0410-961f-82ee72b054a4
* * opts.c (finish_options): Imply -ffat-lto-objects with -fno-use-linker-plugin.hubicka2013-11-201-1/+1
| | | | | | | * common.opt (fuse-linker-plugin): Add var. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205110 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt (ffat-lto-objects): Disable by default.hubicka2013-11-191-1/+5
| | | | | | | | * doc/invoke.texi (fat-lto-objects): Update documentation. * opts.c: Enable fat-lto-objects on lto plugin disable setups. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205065 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt (fcheck-pointer-bounds): Move to ...kyukhin2013-11-081-5/+0
| | | | | | | | | | | | * c-family/c.opt: ... here. * langhooks-def.h (LANG_HOOKS_CHKP_SUPPORTED): Remove. (LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_CHKP_SUPPORTED. * langhooks.h (lang_hooks): Remove chkp_supported field. * toplev.c (process_options): Remove chkp_supported check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204563 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-11-06 Vladimir Makarov <vmakarov@redhat.com>vmakarov2013-11-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tree-pass.h (make_pass_live_range_shrinkage): New external. * timevar.def (TV_LIVE_RANGE_SHRINKAGE): New. * sched-rgn.c (gate_handle_live_range_shrinkage): New. (rest_of_handle_live_range_shrinkage): Ditto (class pass_live_range_shrinkage): Ditto. (pass_data_live_range_shrinkage): Ditto. (make_pass_live_range_shrinkage): Ditto. * sched-int.h (initialize_live_range_shrinkage): New prototype. (finish_live_range_shrinkage): Ditto. * sched-deps.c (create_insn_reg_set): Make void return value. * passes.def: Add pass_live_range_shrinkage. * ira.c (update_equiv_regs): Don't move if flag_live_range_shrinkage. * haifa-sched.c (live_range_shrinkage_p): New. (initialize_live_range_shrinkage, finish_live_range_shrinkage): New functions. (rank_for_schedule): Add code for pressure relief through live range shrinkage. (schedule_insn): Print more debug info. (sched_init): Setup SCHED_PRESSURE_WEIGHTED for pressure relief through live range shrinkage. * doc/invoke.texi (-flive-range-shrinkage): New. * common.opt (flive-range-shrinkage): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204465 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (OBJS): Add gimple-ssa-isolate-paths.olaw2013-11-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common.opt (-fisolate-erroneous-paths): Add option and documentation. * gimple-ssa-isolate-paths.c: New file. * gimple.c (check_loadstore): New function. (infer_nonnull_range): Moved into gimple.c from tree-vrp.c Verify OP is in the argument list and the argument corresponding to OP is a pointer type. Use operand_equal_p rather than pointer equality when testing if OP is on the nonnull list. Use check_loadstore rather than count_ptr_derefs. Handle GIMPLE_RETURN statements. * tree-vrp.c (infer_nonnull_range): Remove. * gimple.h (infer_nonnull_range): Declare. * opts.c (default_options_table): Add * OPT_fisolate_erroneous_paths. * passes.def: Add pass_isolate_erroneous_paths. * timevar.def (TV_ISOLATE_ERRONEOUS_PATHS): New timevar. * tree-pass.h (make_pass_isolate_erroneous_paths): Declare. * tree-ssa.c (struct count_ptr_d): Remove. (count_ptr_derefs, count_uses_and_derefs): Remove. * tree-ssa.h (count_uses_and_derefs): Remove. * gcc.dg/pr38984.c: Add -fno-isolate-erroneous-paths. * gcc.dg/tree-ssa/isolate-1.c: New test. * gcc.dg/tree-ssa/isolate-2.c: New test. * gcc.dg/tree-ssa/isolate-3.c: New test. * gcc.dg/tree-ssa/isolate-4.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204414 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-30 Sharad Singhai <singhai@google.com>singhai2013-10-311-2/+2
| | | | | | | | | | | | | | | | PR middle-end/58134 * opts.c (common_handle_option): Remove deprecated option -ftree-vectorizer-verbose. * doc/invoke.texi (Debugging Options): Ditto. * opts-global.c (handle_common_deferred_options): Ditto. (dump_remap_tree_vectorizer_verbose): Delete. * common.opt: Set -ftree-vectorizer-verbose as an ignored option. ada/ChangeLog * gnat_ugn.texi: Remove option description for PR middle-end/58134. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204244 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-30 Vladimir Makarov <vmakarov@redhat.com>vmakarov2013-10-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * regmove.c: Remove. * tree-pass.h (make_pass_regmove): Remove. * timevar.def (TV_REGMOVE): Remove. * passes.def (pass_regmove): Remove. * opts.c (default_options_table): Remove entry for regmove. * doc/passes.texi: Remove regmove pass description. * doc/invoke.texi (-foptimize-register-move, -fregmove): Remove options. (-fdump-rtl-regmove): Ditto. * common.opt (foptimize-register-move, fregmove): Ignore. * Makefile.in (OBJS): Remove regmove.o. * regmove.c: Remove. * ira-int.h (struct ira_allocno_pref, ira_pref_t): New structure and type. (struct ira_allocno) New member allocno_prefs. (ALLOCNO_PREFS): New macro. (ira_prefs, ira_prefs_num): New external vars. (ira_setup_alts, ira_get_dup_out_num, ira_debug_pref): New prototypes. (ira_debug_prefs, ira_debug_allocno_prefs, ira_create_pref): Ditto. (ira_add_allocno_pref, ira_remove_pref, ira_remove_allocno_prefs): Ditto. (ira_add_allocno_copy_to_list): Remove prototype. (ira_swap_allocno_copy_ends_if_necessary): Ditto. (ira_pref_iterator): New type. (ira_pref_iter_init, ira_pref_iter_cond): New functions. (FOR_EACH_PREF): New macro. * ira.c (commutative_constraint_p): Move from ira-conflicts.c. (ira_get_dup_out_num): Ditto. Rename from get_dup_num. Modify the code. (ira_setup_alts): New function. (decrease_live_ranges_number): New function. (ira): Call the above function. * ira-build.c (ira_prefs, ira_prefs_num): New global vars. (ira_create_allocno): Initialize allocno prefs. (pref_pool, pref_vec): New static vars. (initiate_prefs, find_allocno_pref, ira_create_pref): New functions. (add_allocno_pref_to_list, ira_add_allocno_pref, print_pref): Ditto. (ira_debug_pref, print_prefs, ira_debug_prefs): Ditto. (print_allocno_prefs, ira_debug_allocno_prefs, finish_pref): Ditto. (ira_remove_pref, ira_remove_allocno_prefs, finish_prefs): Ditto. (ira_add_allocno_copy_to_list): Make static. Rename to add_allocno_copy_to_list. (ira_swap_allocno_copy_ends_if_necessary): Make static. Rename to swap_allocno_copy_ends_if_necessary. (remove_unnecessary_allocnos, remove_low_level_allocnos): Call ira_remove_allocno_prefs. (ira_flattening): Ditto. (ira_build): Call initiate_prefs, print_prefs. (ira_destroy): Call finish_prefs. * ira-color.c (struct update_cost_record): New. (struct allocno_color_data): Add new member update_cost_records. (update_cost_record_pool): New static var. (init_update_cost_records, get_update_cost_record): New functions. (free_update_cost_record_list, finish_update_cost_records): Ditto. (struct update_cost_queue_elem): Add member from. (initiate_cost_update): Call init_update_cost_records. (finish_cost_update): Call finish_update_cost_records. (queue_update_cost, get_next_update_cost): Add new param from. (Update_allocno_cost, update_costs_from_allocno): New functions. (update_costs_from_prefs): Ditto. (update_copy_costs): Rename to update_costs_from_copies. (restore_costs_from_copies): New function. (update_conflict_hard_regno_costs): Don't go back. (assign_hard_reg): Call restore_costs_from_copies. Add printing more debug info. (pop_allocnos): Add priniting more debug info. (color_allocnos): Remove prefs for conflicting hard regs. Call update_costs_from_prefs. * ira-conflicts.c (commutative_constraint_p): Move to ira.c (get_dup_num): Rename, modify, and move to ira.c (process_regs_for_copy): Add prefs. (add_insn_allocno_copies): Put src as first arg of process_regs_for_copy. Remove dead code. Call ira_setup_alts. * ira-costs.c (record_reg_classes): Modify and move code into record_operands_costs. (find_costs_and_classes): Create prefs for the hard reg of small reg class. (process_bb_node_for_hard_reg_moves): Add prefs. 2013-10-30 Vladimir Makarov <vmakarov@redhat.com> * gcc.target/i386/fma_double_3.c: Use pattern for scan-assembler-times instead of just one insn name. * gcc.target/i386/fma_double_5.c: Ditto. * gcc.target/i386/fma_float_3.c: Ditto. * gcc.target/i386/fma_float_5.c: Ditto. * gcc.target/i386/l_fma_double_1.c: Ditto. * gcc.target/i386/l_fma_double_2.c: Ditto. * gcc.target/i386/l_fma_double_3.c: Ditto. * gcc.target/i386/l_fma_double_4.c: Ditto. * gcc.target/i386/l_fma_double_5.c: Ditto. * gcc.target/i386/l_fma_double_6.c: Ditto. * gcc.target/i386/l_fma_float_1.c: Ditto. * gcc.target/i386/l_fma_float_2.c: Ditto. * gcc.target/i386/l_fma_float_3.c: Ditto. * gcc.target/i386/l_fma_float_4.c: Ditto. * gcc.target/i386/l_fma_float_5.c: Ditto. * gcc.target/i386/l_fma_float_6.c: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204212 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtin-types.def (BT_FN_VOID_CONST_PTR): New.kyukhin2013-10-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (BT_FN_PTR_CONST_PTR): New. (BT_FN_CONST_PTR_CONST_PTR): New. (BT_FN_PTR_CONST_PTR_SIZE): New. (BT_FN_PTR_CONST_PTR_CONST_PTR): New. (BT_FN_VOID_PTRPTR_CONST_PTR): New. (BT_FN_VOID_CONST_PTR_SIZE): New. (BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE): New. * chkp-builtins.def: New. * builtins.def: include chkp-builtins.def. (DEF_CHKP_BUILTIN): New. * builtins.c (expand_builtin): Support BUILT_IN_CHKP_INIT_PTR_BOUNDS, BUILT_IN_CHKP_NULL_PTR_BOUNDS, BUILT_IN_CHKP_COPY_PTR_BOUNDS, BUILT_IN_CHKP_CHECK_PTR_LBOUNDS, BUILT_IN_CHKP_CHECK_PTR_UBOUNDS, BUILT_IN_CHKP_CHECK_PTR_BOUNDS, BUILT_IN_CHKP_SET_PTR_BOUNDS, BUILT_IN_CHKP_NARROW_PTR_BOUNDS, BUILT_IN_CHKP_STORE_PTR_BOUNDS, BUILT_IN_CHKP_GET_PTR_LBOUND, BUILT_IN_CHKP_GET_PTR_UBOUND, BUILT_IN_CHKP_BNDMK, BUILT_IN_CHKP_BNDSTX, BUILT_IN_CHKP_BNDCL, BUILT_IN_CHKP_BNDCU, BUILT_IN_CHKP_BNDLDX, BUILT_IN_CHKP_BNDRET, BUILT_IN_CHKP_INTERSECT, BUILT_IN_CHKP_ARG_BND, BUILT_IN_CHKP_NARROW, BUILT_IN_CHKP_EXTRACT_LOWER, BUILT_IN_CHKP_EXTRACT_UPPER. * common.opt (fcheck-pointer-bounds): New. * toplev.c (process_options): Check Pointer Bounds Checker is supported. * doc/extend.texi: Document Pointer Bounds Checker built-in functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204196 138bc75d-0d04-0410-961f-82ee72b054a4
* Add new option -ggnu-pubnames.sterling2013-10-221-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | 2013-10-22 Sterling Augustine <saugustine@google.com> * doc/invoke.texi: Document -ggnu-pubnames. * common.opt: Add new option -ggnu-pubnames and modify -gpubnames logic. * dwarf2out.c: Include gdb/gdb-index.h. (DEBUG_PUBNAMES_SECTION, DEBUG_PUBTYPES_SECTION): Handle debug_generate_pub_sections. (is_java, output_pubtables, output_pubname): New functions. (include_pubname_in_output): Handle debug_generate_pub_sections at level 2. (size_of_pubnames): Use new local space_for_flags based on debug_generate_pub_sections. (output_pubnames): Unify pubnames and pubtypes output logic. Genericize comments. Call output_pubname. (dwarf2out_finish): Move logic to output_pubnames and call it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203936 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-03 Marc Glisse <marc.glisse@inria.fr>glisse2013-10-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | PR c++/19476 gcc/c-family/ * c.opt (fcheck-new): Move to common.opt. gcc/ * common.opt (fcheck-new): Moved from c.opt. Make it 'Common'. * calls.c (alloca_call_p): Use get_callee_fndecl. * fold-const.c (tree_expr_nonzero_warnv_p): Handle operator new. * tree-vrp.c (gimple_stmt_nonzero_warnv_p, stmt_interesting_for_vrp): Likewise. (vrp_visit_stmt): Remove duplicated code. gcc/testsuite/ * g++.dg/tree-ssa/pr19476-1.C: New file. * g++.dg/tree-ssa/pr19476-2.C: Likewise. * g++.dg/tree-ssa/pr19476-3.C: Likewise. * g++.dg/tree-ssa/pr19476-4.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203163 138bc75d-0d04-0410-961f-82ee72b054a4
* vectorizer cost model enhancementdavidxl2013-09-271-4/+24
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202980 138bc75d-0d04-0410-961f-82ee72b054a4
* Introduce -ftree-loop-vectorize optiondavidxl2013-09-161-2/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202636 138bc75d-0d04-0410-961f-82ee72b054a4
* Correct previous commit to the final version of patch.hubicka2013-09-011-4/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202146 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt (fdevirtualize-speculatively): New function.hubicka2013-09-011-1/+5
| | | | | | | | | | | | | | | | | | | | * invoke.texi (fdevirtualize-speculatively): Document. * ipa-devirt.c: Include ipa-inline.h (likely_target_p): New function. (ipa_devirt): New function. (gate_ipa_devirt): New function. (pass_data_ipa_devirt): New static var. (pass_ipa_devirt): Likewise. (make_pass_ipa_devirt): New function. * opts.c (default_options): Add OPT_fdevirtualize_speculatively. (common_handle_option): Disable devirtualization when value range profiling is available. * passes.def (pass_ipa_devirt): Add. * timever.def (TV_IPA_DEVIRT): New timevar. * tree-pass.h (make_pass_ipa_devirt): git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202145 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge ubsan into trunk.mpolacek2013-08-301-7/+10
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202113 138bc75d-0d04-0410-961f-82ee72b054a4
* Commit the vtable verification feature. This feature is designed toctice2013-08-071-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | detect, at run time, if/when the vtable pointer in a C++ object has been corrupted, before allowing virtual calls through that pointer. If pointer corruption is detected, execution of the program is halted. libstdc++-v3 ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * fragment.am: Add XTEMPLATE_FLAGS. * configure.ac: Add definitions for --enable-vtable-verify. * acinclude.m4: Add --enable-vtable-verify and --disable-vtable-verify; define --enable-vtable-verify; define VTV_CXXFLAGS, VTV_PCH_CXXFLAGS and VTV_CXXLINKFLAGS. * config/abi/pre/gnu.ver: Export symbols for vtable verification. * libsupc++/Makefile.am: Define vtv_sources and add it to libsupc___la_SOURCES and libsupc__convenience_la_SOURCES. * libsupc++/vtv_stubs.cc: New file. * include/Makefile.am: Add VTV_PCH_CXXFLAGS to PCHFLAGS. * src/Makefile.am: Add VTV_CXXFLAGS to AM_CXXFLAGS; add VTV_CXXLINKFLAGS to CXXLINK. * src/c++98/Makefile.am: Comment out XTEMPLATE_FLAGS; add VTV_CXXFLAGS to AM_CXXFLAGS; add VTV_CXXXLINKFLAGS to CXXLINK. * src/C++11/Makefile.am: Ditto. * doc/xml/manual/configure.xml: Add entry for --enable-vtable-verify. * scripts/testsuite_flags.in: Add cxxvtvflags to Usage; cause cxxvtvflags to use VTV_CXXFLAGS and VTV_CXXLINKFLAGS. * testsuite/lib/libstdc++.exp: Add cxxvtvflags; add code to locate libvtv if --enable-vtable-verify was used; set cxxvtvflags; add cxxvtvflags to cxx_final. * testsuite/18_support/bad_exception/23591_thread-1.c: Add -fvtable-verify=none to compiler flags. * testsuite/17_intro/freestanding.cc: Add -fvtable-verify=none to compiler flags. * configure: Regenerated. * Makefile.in: Regenerated. * python/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * libsupc++/Makefile.in: Regenerated. * config.h.in: Regenerated. * po/Makefile.in: Regenerated. * src/Makefile.in: Regenerated. * src/c++98/Makefile.in: Regenerated. * src/c++11/Makefile.in: Regenerated. * doc/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. top level ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * configure.ac: Add target-libvtv to target_libraries; disable libvtv on non-linux systems; add target-libvtv to noconfigdirs; add libsupc++/.libs to C++ library search paths. * configure: Regenerated. * Makefile.def: Add libvtv to target_modules; make libvtv depend on libstdc++ and libgcc. * Makefile.in: Regenerated. include/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * vtv-change-permission.h: New file. contrib/ChangeLog: 2013-08-06 Caroline Tice4 <cmtice@google.com> * gcc_update: Add libvtv files. libgcc/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> config.host (extra_parts): Add vtv_start.o, vtv_end.o vtv_start_preinit.o and vtv_end_preinit.o. configure.ac: Add code to check/set enable_vtable_verify. Makefile.in: Add rules to build vtv_*.o, if enable_vtable_verify is true. vtv_start_preinit.c: New file. vtv_end_preinit.c: New file. vtv_start.c: New file. vtv_end.c: New file. configure: Regenerated. gcc/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * gcc.c (VTABLE_VERIFICATION_SPEC): New definition. (LINK_COMMAND_SPEC): Add VTABLE_VERIFICATION_SPEC. * tree-pass.h: Add pass_vtable_verify. * varasm.c (assemble_variable): Add code to properly set the comdat section and name for the .vtable_map_vars section. (assemble_vtyv_preinit_initializer): New function. (default_sectin_type_flags): Make sure .vtable_map_vars section has LINK_ONCE flag. * output.h: Add function decl for assemble_vtv_preinit_initializer. * vtable-verify.c: New file. * vtable-verify.h: New file. * flag-types.h (enum vtv_priority): Defintions for flag_vtable_verify initialiation levels. * timevar.def (TV_VTABLE_VERIFICATION): New definition. * passes.def: Insert pass_vtable_verify. * aclocal.m4: Reorder includes. * doc/invoke.texi: Add documentation for the flags -fvtable-verify=, -fvtv-debug and -fvtv-counts. * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add vtv_start*.o, as appropriate, if -fvtable-verify=... is used. (GNU_USER_TARGET_ENDFILE_SPEC): Add vtv_end*.o as appropriate, if -fvtable-verify=... is used. * Makefile.in (OBJS): Add vtable-verify.o to list. (vtable-verify.o): Add new build rule. (GTFILES): Add vtable-verify.c to list. * common.opt (fvtable-verify=): New flag. (vtv_priority): Values for fvtable-verify= flag. (fvtv-counts): New flag. (fvtv-debug): New flag. * tree.h (save_vtable_map_decl): New extern function decl. gcc/cp/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * Make-lang.in (*CXX_AND_OBJCXX_OBJS): Add vtable-class-hierarchy.o to list. (vtable-class-hierarchy.o): Add build rule. * cp-tree.h (vtv_start_verification_constructor_init_function): New extern function decl. (vtv_finish_verification_constructor_init_function): New extern function decl. (build_vtbl_address): New extern function decl. (get_mangled_vtable_map_var_name): New extern function decl. (vtv_compute_class_hierarchy_transitive_closure): New extern function decl. (vtv_generate_init_routine): New extern function decl. (vtv_save_class_info): New extern function decl. (vtv_recover_class_info): New extern function decl. (vtv_build_vtable_verify_fndecl): New extern function decl. * class.c (finish_struct_1): Add call to vtv_save_class_info if flag_vtable_verify is true. * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list. * vtable-class-hierarchy.c: New file. * mangle.c (get_mangled_vtable_map_var_name): New function. * decl2.c (start_objects): Update function comment. (cp_write_global_declarations): Call vtv_recover_class_info, vtv_compute_class_hierarchy_transitive_closure and vtv_build_vtable_verify_fndecl, before calling finalize_compilation_unit, and call vtv_generate_init_rount after, IFF flag_vtable_verify is true. (vtv_start_verification_constructor_init_function): New function. (vtv_finish_verification_constructor_init_function): New function. * init.c (build_vtbl_address): Remove static qualifier from function. libvtv/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> Initial check-in of new vtable verification feature. * configure.ac : New file. * acinclude.m4 : New file. * Makefile.am : New file. * aclocal.m4 : New file. * configure.tgt : New file. * configure: New file (generated). * Makefile.in: New file (generated). * vtv_set.h : New file. * vtv_utils.cc : New file. * vtv_utils.h : New file. * vtv_malloc.cc : New file. * vtv_rts.cc : New file. * vtv_malloc.h : New file. * vtv_rts.h : New file. * vtv_fail.cc : New file. * vtv_fail.h : New file. * vtv_map.h : New file. * scripts/run-testsuite.sh : New file. * scripts/sum-vtv-counts.c : New file. * testsuite/parts-test-main.h : New file. * testusite/dataentry.cc : New file. * testsuite/temp_deriv.cc : New file. * testsuite/register_pair.cc : New file. * testsuite/virtual_inheritance.cc : New file. * testsuite/field-test.cc : New file. * testsuite/nested_vcall_test.cc : New file. * testsuite/template-list-iostream.cc : New file. * testsuite/register_pair_inserts.cc : New file. * testsuite/register_pair_inserts_mt.cc : New file. * testsuite/event.list : New file. * testsuite/parts-test-extra-parts-views.cc : New file. * testsuite/parts-test-extra-parts-views.h : New file. * testsuite/environment-fail-32.s : New file. * testsuite/parts-test-extra-parts.h : New file. * testsuite/temp_deriv2.cc : New file. * testsuite/dlopen_mt.cc : New file. * testsuite/event.h : New file. * testsuite/template-list.cc : New file. * testsuite/replace-fail.cc : New file. * testsuite/Makefile.am : New file. * testsuite/Makefile.in: New file (generated). * testsuite/mempool_negative.c : New file. * testsuite/parts-test-main.cc : New file. * testsuite/event-private.cc : New file. * testsuite/thunk.cc : New file. * testsuite/event-defintiions.cc : New file. * testsuite/event-private.h : New file. * testsuite/parts-test.list : New file. * testusite/register_pair_mt.cc : New file. * testsuite/povray-derived.cc : New file. * testsuite/event-main.cc : New file. * testsuite/environment.cc : New file. * testsuite/template-list2.cc : New file. * testsuite/thunk_vtable_map_attack.cc : New file. * testsuite/parts-test-extra-parts.cc : New file. * testsuite/environment-fail-64.s : New file. * testsuite/dlopen.cc : New file. * testsuite/so.cc : New file. * testsuite/temp_deriv3.cc : New file. * testsuite/const_vtable.cc : New file. * testsuite/mempool_positive.c : New file. * testsuite/dup_name.cc : New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201555 138bc75d-0d04-0410-961f-82ee72b054a4