aboutsummaryrefslogtreecommitdiff
path: root/gcc/common.opt
AgeCommit message (Collapse)AuthorFilesLines
2017-01-09re PR translation/79019 (translatable string typo in cif-code.def:141)Jakub Jelinek1-1/+1
PR translation/79019 PR translation/79020 * params.def (PARAM_INLINE_MIN_SPEEDUP, PARAM_IPA_CP_SINGLE_CALL_PENALTY, PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos in descriptions. * config/avr/avr.opt (maccumulate-args): Likewise. * config/msp430/msp430.opt (mwarn-mcu): Likewise. * common.opt (freport-bug): Likewise. * cif-code.def (CIF_FINAL_ERROR): Likewise. * doc/invoke.texi (ipa-cp-single-call-penalty): Likewise. * config/s390/s390.c (s390_invalid_binary_op): Fix spelling in translatable string. * config/i386/i386.c (function_value_32): Likewise. * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise. * config/msp430/msp430.c (msp430_option_override, msp430_attr): Likewise. * config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise. * common/config/msp430/msp430-common.c (msp430_handle_option): Likewise. * symtab.c (symtab_node::verify_base): Likewise. * opts.c (set_debug_level): Likewise. * tree.c (verify_type_variant): Likewise. Fix typo in comment. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add missing whitespace to translatable strings. * config/avr/avr.md (bswapsi2): Fix typo in comment. * config/sh/superh.h: Likewise. * config/i386/xopintrin.h: Likewise. * config/i386/znver1.md: Likewise. * config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise. * ipa-inline-analysis.c (compute_inline_parameters): Likewise. * double-int.h (struct double_int): Likewise. * double-int.c (div_and_round_double): Likewise. * wide-int.cc: Likewise. * tree-ssa.c (non_rewritable_mem_ref_base): Likewise. * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise. * cfgcleanup.c (crossjumps_occured): Renamed to ... (crossjumps_occurred): ... this. (try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg): Adjust all uses. cp/ * semantics.c (finish_omp_clauses): Add missing whitespace to translatable strings. * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo. lto/ * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo. fortran/ * decl.c (attr_decl1): Fix spelling in translatable string. * intrinsic.texi: Fix spelling - invokation -> invocation. * lang.opt (faggressive-function-elimination, gfc_convert): Fix typos in descriptions. * openmp.c (resolve_omp_clauses): Add missing whitespace to translatable strings. c-family/ * c.opt (Wnormalized=): Fix typo in description. testsuite/ * c-c++-common/goacc/host_data-2.c (f): Adjust expected spelling of diagnostics. * gfortran.dg/initialization_17.f90: Likewise. From-SVN: r244245
2017-01-07[-fcompare-debug] var tracking options are not optimization optionsAlexandre Oliva1-4/+4
If we include them in the ICF hash, they may cause congruence_groups to be processed in a different order due to different hashes, which in turn causes different funcdef_nos to be assigned to functions. Since these numbers are included in -fcompare-debug dumps, they cause failures. Since these options are not optimization options, in that they do not (or should not, save for bugs like this) affect the executable code output by the compiler, they should not be marked as such. This patch replaces the Optimization flag in the var-tracking options with the newly-introduced PerFunction flag, so that it can still be controlled on a per-function basis, but that disregards it in the hash computation used by ICF. This fixes -fcompare-debug failures in numerous LTO testcases. for gcc/ChangeLog * doc/options.texi (PerFunction): New. * opt-functions.awk (switch_flags): Map both Optimization and PerFunction to CL_OPTIMIZATION. * opth-gen.awk: Test for PerFunction flag along with Optimization. * optc-save-gen.awk: Likewise. Introduce var_opt_hash and set it only when the latter is present. Skip those that don't in the hash function generator. * common.opt (fvar-tracking): Mark as PerFunction instead of Optimization. (fvar-tracking-assignments): Likewise. (fvar-tracking-assignments-toggle): Likewise. (fvar-tracking-uninit): Likewise. From-SVN: r244198
2017-01-05common.opt (fvect-cost-model): Remove RejectNegative flag...Jakub Jelinek1-5/+1
* common.opt (fvect-cost-model): Remove RejectNegative flag, use 3 argument Alias with unlimited for the negative form. (fno-vect-cost-model): Removed. From-SVN: r244106
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-12-20[Patch] Turn -fexcess-precision=fast on when in -ffast-mathJames Greenhalgh1-1/+1
* common.opt (excess_precision): Tag as SetByCombined. * opts.c (set_fast_math_flags): Also set flag_excess_precision_cmdline. (fast_math_flags_set_p): Also check flag_excess_precision_cmdline. * doc/invoke.texi (-fexcess-precision): Drop text saying the option has no effect under -ffast-math, make it clear that -ffast-math will cause -fexcess-precision=fast by default even for standards compliant modes. (-ffast-math): Document that this sets -fexcess-precision=fast. From-SVN: r243824
2016-12-15Introduce selftest::locate_fileDavid Malcolm1-3/+3
gcc/ChangeLog: * Makefile.in (SELFTEST_FLAGS): Add path argument to -fself-test. (s-selftest): Add dependency on the selftests data directory. * common.opt (fself-test): Rename to... (fself-test=): ...this, documenting the meaning of the argument. * selftest-run-tests.c (along): Likewise. * selftest-run-tests.c: Include "options.h". (selftest::run_tests): Initialize selftest::path_to_selftest_files from flag_self_test. * selftest.c (selftest::path_to_selftest_files): New global. (selftest::locate_file): New function. (selftest::test_locate_file): New function. (selftest_c_tests): Likewise. (selftest::selftest_c_tests): Call test_locate_file. * selftest.h (selftest::locate_file): New decl. (selftest::path_to_selftest_files): New decl. gcc/testsuite/ChangeLog: PR target/78213 * gcc.dg/cpp/pr71591.c: Add a fake value for the argument of -fself-test. * gcc.dg/pr78213.c: Disable this test. * selftests/example.txt: New file. From-SVN: r243681
2016-11-24common.opt (flimit-function-alignment): New.Bernd Schmidt1-0/+3
gcc/ * common.opt (flimit-function-alignment): New. * doc/invoke.texi (-flimit-function-alignment): Document. * emit-rtl.h (struct rtl_data): Add max_insn_address field. * final.c (shorten_branches): Set it. * varasm.c (assemble_start_function): Limit alignment if requested. gcc/testsuite/ * gcc.target/i386/align-limit.c: New test. From-SVN: r242836
2016-11-23[Patch 5/17] Add -fpermitted-flt-eval-methods=[c11|ts-18661-3]James Greenhalgh1-0/+15
gcc/c-family/ * c-opts.c (c_common_post_options): Add logic to handle the default case for -fpermitted-flt-eval-methods. gcc/ * common.opt (fpermitted-flt-eval-methods): New. * doc/invoke.texi (-fpermitted-flt-eval-methods): Document it. * flag_types.h (permitted_flt_eval_methods): New. gcc/testsuite/ * gcc.dg/fpermitted-flt-eval-methods_1.c: New. * gcc.dg/fpermitted-flt-eval-methods_2.c: New. From-SVN: r242775
2016-11-17common.opt (ftree-loop-if-convert-stores): Mark as preserved for backward ↵Richard Biener1-2/+2
compatibility. 2016-11-17 Richard Biener <rguenther@suse.de> * common.opt (ftree-loop-if-convert-stores): Mark as preserved for backward compatibility. * doc/invoke.texi (ftree-loop-if-convert-stores): Remove. * tree-if-conv.c (pass_if_conversion::gate): Do not test flag_tree_loop_if_convert_stores. (pass_if_conversion::execute): Likewise. From-SVN: r242542
2016-11-14Introduce -fprofile-update=prefer-atomicMartin Liska1-1/+4
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
2016-11-09common.opt (flag_evaluation_order): Remove.Richard Biener1-4/+0
2016-11-09 Richard Biener <rguenther@suse.de> * common.opt (flag_evaluation_order): Remove. * expr.c (expand_operands): Remove code guarded by flag_evaluation_order. * fold-const.c (reorder_operands_p): Remove, it always returns true. (negate_expr_p): Remove calls to reorder_operands_p. (fold_negate_expr): Likewise. (tree_swap_operands_p): Likewise. (fold_binary_loc): Likewise. From-SVN: r241998
2016-11-07Introduce -fsanitize-address-use-after-scopeMartin Liska1-0/+3
* c-warn.c (warn_for_unused_label): Save all labels used in goto or in &label. * asan.c (enum asan_check_flags): Move the enum to header file. (asan_init_shadow_ptr_types): Make type creation more generic. (shadow_mem_size): New function. (asan_emit_stack_protection): Use newly added ASAN_SHADOW_GRANULARITY. Rewritten stack unpoisoning code. (build_shadow_mem_access): Add new argument return_address. (instrument_derefs): Instrument local variables if use after scope sanitization is enabled. (asan_store_shadow_bytes): New function. (asan_expand_mark_ifn): Likewise. (asan_sanitize_stack_p): Moved from asan_sanitize_stack_p. * asan.h (enum asan_mark_flags): Moved here from asan.c (asan_protect_stack_decl): Protect all declaration that need to live in memory. (asan_sanitize_use_after_scope): New function. (asan_no_sanitize_address_p): Likewise. * cfgexpand.c (partition_stack_vars): Consider asan_sanitize_use_after_scope in condition. (expand_stack_vars): Likewise. * common.opt (-fsanitize-address-use-after-scope): New option. * doc/invoke.texi (use-after-scope-direct-emission-threshold): Explain the parameter. * flag-types.h (enum sanitize_code): Define SANITIZE_USE_AFTER_SCOPE. * gimplify.c (build_asan_poison_call_expr): New function. (asan_poison_variable): Likewise. (gimplify_bind_expr): Generate poisoning/unpoisoning for local variables that have address taken. (gimplify_decl_expr): Likewise. (gimplify_target_expr): Likewise for C++ temporaries. (sort_by_decl_uid): New function. (gimplify_expr): Unpoison all variables for a label we can jump from outside of a scope. (gimplify_switch_expr): Unpoison variables defined in the switch context. (gimplify_function_tree): Clear asan_poisoned_variables. (asan_poison_variables): New function. (warn_switch_unreachable_r): Handle IFN_ASAN_MARK. * internal-fn.c (expand_ASAN_MARK): New function. * internal-fn.def (ASAN_MARK): Declare. * opts.c (finish_options): Handle -fstack-reuse if -fsanitize-address-use-after-scope is enabled. (common_handle_option): Enable address sanitization if -fsanitize-address-use-after-scope is enabled. * params.def (PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): New parameter. * params.h: Likewise. * sancov.c (pass_sanopt::execute): Handle IFN_ASAN_MARK. * sanitizer.def: Define __asan_poison_stack_memory and __asan_unpoison_stack_memory functions. * asan.c (asan_mark_poison_p): New function. (transform_statements): Handle asan_mark_poison_p calls. * gimple.c (nonfreeing_call_p): Handle IFN_ASAN_MARK. From-SVN: r241896
2016-11-01Implement P0136R1, Rewording inheriting constructors.Jason Merrill1-1/+2
gcc/c-family/ * c.opt (-fnew-inheriting-ctors): New. * c-opts.c: Default to on for ABI 11+. gcc/cp/ * call.c (enum rejection_reason_code): Add rr_inherited_ctor. (inherited_ctor_rejection): New. (add_function_candidate): Reject inherited ctors for copying. (enforce_access): Use strip_inheriting_ctors. (print_z_candidate): Likewise. Handle rr_inherited_ctor. (convert_like_real): Avoid copying inheriting ctor parameters. (build_over_call): Likewise. A base ctor inheriting from vbase has no parms. Sorry about varargs. (joust): A local constructor beats inherited with the same convs. * class.c (add_method): Handle hiding inheriting ctors. (one_inherited_ctor): Handle new semantics. (add_implicitly_declared_members): Pass using_decl down. (build_clone): A base ctor inheriting from vbase has no parms. * cp-tree.h (DECL_INHERITED_CTOR): Store this instead of the base. (SET_DECL_INHERITED_CTOR): Likewise. (DECL_INHERITED_CTOR_BASE): Adjust. * constexpr.c: Adjust. * error.c (dump_function_decl): Decorate inheriting ctors. * init.c (emit_mem_initializers): Suppress access control in inheriting ctor. * mangle.c (write_special_name_constructor): Handle new inheriting ctor mangling. * method.c (strip_inheriting_ctors, inherited_ctor_binfo) (ctor_omit_inherited_parms, binfo_inherited_from): New. (synthesized_method_walk): Use binfo_inherited_from. Suppress access control in inheriting ctor. (deduce_inheriting_ctor): Deleted if ambiguous ctor inheritance. (maybe_explain_implicit_delete): Explain ambigous ctor inheritance. (add_one_base_init, do_build_copy_constructor): Adjust. (locate_fn_flags, explain_implicit_non_constexpr): Adjust. (implicitly_declare_fn): Adjust. (get_inherited_ctor): Remove. * name-lookup.c (do_class_using_decl): Check for indirect ctor inheritance. * optimize.c (cdtor_comdat_group): Adjust for new mangling. (maybe_clone_body): Handle omitted parms in base clone. (maybe_thunk_body): Don't thunk if base clone omits parms. * pt.c (tsubst_decl): Adjust. (instantiate_template_1): Suppress access control in inheriting ctor. (fn_type_unification): Do deduction with inherited ctor. * tree.c (special_function_p): Adjust. gcc/ * tree-inline.c (copy_tree_body_r): Only copy the taken branch of a COND_EXPR with constant condition. libiberty/ * cp-demangle.c (d_ctor_dtor_name): Handle inheriting constructor. From-SVN: r241765
2016-10-31Add -Wshadow=global -Wshadow=local and -Wshadow=compatible-local.Le-Chun Wu1-1/+19
This patch from Le-Chun Wu adds two new shadow warning flags for C and C++: -Wshadow=local which warns if a local variable shadows another local variable or parameter, -Wshadow=compatible-local which warns if a local variable shadows another local variable or parameter whose type is compatible with that of the shadowing variable. It is already on the google/main branch (Google ref 39127) and was previously submitted by Diego Novillo and reviewed on http://codereview.appspot.com/4452058 I addressed the review comments and made the following changes: - Add -Wshadow=global (the default alias for -Wshadow). - Make the documented options -Wshadow=global, -Wshadow=local and -Wshadow=compatible-local (with hidden undocumented aliases -Wshadow-local and -Wshadow-compatible-local for compatibility). - The -Wshadow=global, -Wshadow=local and -Wshadow=compatible-local relationships are expressed in common.opt instead of in opts.c and documented in invoke.texi. - The "previous declaration" warnings were turned into notes and use the (now) existing infrastructure instead of duplicating the warnings. The testcases have been adjusted to expect the notes. - The conditional change in name-lookup.c for non-locals (where we don't want to change the warnings, but just check the global ones) has been dropped. - Use warning_at in c-decl.c (warn_if_shadowing). gcc/ChangeLog: 2016-10-30 Le-Chun Wu <lcwu@google.com> Mark Wielaard <mjw@redhat.com> * doc/invoke.texi: Document Wshadow-local and Wshadow-compatible-local. * common.opt (Wshadow=global): New option. Default for -Wshadow. (Wshadow=local): New option. (Wshadow-local): Hidden alias for -Wshadow=local. (Wshadow=compatible-local): New option. (Wshadow-compatible-local): Hidden alias for -Wshadow=compatible-local. * doc/invoke.texi: Document Wshadow=global, Wshadow=local and Wshadow=compatible-local. gcc/c/ChangeLog: 2016-10-30 Le-Chun Wu <lcwu@google.com> Mark Wielaard <mjw@redhat.com> * c-decl.c (warn_if_shadowing): Use the warning code corresponding to the given -Wshadow= variant. Use warning_at. gcc/cp/ChangeLog: 2016-10-30 Le-Chun Wu <lcwu@google.com> Mark Wielaard <mjw@redhat.com> * name-lookup.c (pushdecl_maybe_friend): When emitting a shadowing warning, use the code corresponding to the given -Wshadow= variant. gcc/testsuite/ChangeLog 2016-10-30 Le-Chun Wu <lcwu@google.com> Mark Wielaard <mjw@redhat.com> * gcc.dg/Wshadow-compatible-local-1.c: New test. * gcc.dg/Wshadow-local-1.c: Likewise. * gcc.dg/Wshadow-local-2.c: Likewise. * g++.dg/warn/Wshadow-compatible-local-1.C: Likewise. * g++.dg/warn/Wshadow-local-1.C: Likewise. * g++.dg/warn/Wshadow-local-2.C: Likewise. Co-Authored-By: Mark Wielaard <mjw@redhat.com> From-SVN: r241699
2016-10-28GIMPLE store merging passKyrylo Tkachov1-0/+4
2016-10-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com> PR middle-end/22141 * Makefile.in (OBJS): Add gimple-ssa-store-merging.o. * common.opt (fstore-merging): New Optimization option. * opts.c (default_options_table): Add entry for OPT_ftree_store_merging. * fold-const.h (can_native_encode_type_p): Declare prototype. * fold-const.c (can_native_encode_type_p): Define. * params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Define. (PARAM_MAX_STORES_TO_MERGE): Likewise. * timevar.def (TV_GIMPLE_STORE_MERGING): New timevar. * passes.def: Insert pass_tree_store_merging. * tree-pass.h (make_pass_store_merging): Declare extern prototype. * gimple-ssa-store-merging.c: New file. * doc/invoke.texi (Optimization Options): Document -fstore-merging. (--param documentation): Document store-merging-allow-unaligned and max-stores-to-merge. 2016-10-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com> Jakub Jelinek <jakub@redhat.com> Andrew Pinski <pinskia@gmail.com> PR middle-end/22141 PR rtl-optimization/23684 * gcc.c-torture/execute/pr22141-1.c: New test. * gcc.c-torture/execute/pr22141-2.c: Likewise. * gcc.target/aarch64/ldp_stp_1.c: Adjust for -fstore-merging. * gcc.target/aarch64/ldp_stp_4.c: Likewise. * gcc.dg/store_merging_1.c: New test. * gcc.dg/store_merging_2.c: Likewise. * gcc.dg/store_merging_3.c: Likewise. * gcc.dg/store_merging_4.c: Likewise. * gcc.dg/store_merging_5.c: Likewise. * gcc.dg/store_merging_6.c: Likewise. * gcc.dg/store_merging_7.c: Likewise. * gcc.target/i386/pr22141.c: Likewise. * gcc.target/i386/pr34012.c: Add -fno-store-merging to dg-options. * g++.dg/init/new17.C: Likewise. Co-Authored-By: Andrew Pinski <pinskia@gmail.com> Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r241649
2016-10-25Fix 2 typos in IPA ICF passMartin Liska1-1/+1
* gcc.dg/ipa/ipa-icf-32.c: Removed one scanned pattern. Martin Liska <mliska@suse.cz> PR ipa/78099 * common.opt: Mark flag_ipa_icf_variables as Optimization flag. * ipa-icf.c (sem_function::get_hash): Add target optimization node to hash. From-SVN: r241510
2016-10-20loop splittingMichael Matz1-0/+4
(approved at https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00648.html ) * common.opt (-fsplit-loops): New flag. * passes.def (pass_loop_split): Add. * opts.c (default_options_table): Add OPT_fsplit_loops entry at -O3. (enable_fdo_optimizations): Add loop splitting. * timevar.def (TV_LOOP_SPLIT): Add. * tree-pass.h (make_pass_loop_split): Declare. * tree-ssa-loop-manip.h (rewrite_into_loop_closed_ssa_1): Declare. * tree-ssa-loop-unswitch.c: Include tree-ssa-loop-manip.h, * tree-ssa-loop-split.c: New file. * Makefile.in (OBJS): Add tree-ssa-loop-split.o. * doc/invoke.texi (fsplit-loops): Document. * doc/passes.texi (Loop optimization): Add paragraph about loop splitting. testsuite/ * gcc.dg/loop-split.c: New test. * gcc.dg/tree-ssa/ifc-9.c: Update. * gcc.dg/tree-ssa/ifc-10.c: Update. From-SVN: r241374
2016-10-16re PR ada/37139 (DEP prevents using Ada tasking)Eric Botcazou1-0/+5
PR ada/37139 PR ada/67205 * common.opt (-ftrampolines): New option. * doc/invoke.texi (Code Gen Options): Document it. * doc/tm.texi.in (Trampolines): Add TARGET_CUSTOM_FUNCTION_DESCRIPTORS. * doc/tm.texi: Regenerate. * builtins.def: Add init_descriptor and adjust_descriptor. * builtins.c (expand_builtin_init_trampoline): Do not issue a warning on platforms with descriptors. (expand_builtin_init_descriptor): New function. (expand_builtin_adjust_descriptor): Likewise. (expand_builtin) <BUILT_IN_INIT_DESCRIPTOR>: New case. <BUILT_IN_ADJUST_DESCRIPTOR>: Likewise. * calls.c (prepare_call_address): Remove SIBCALLP parameter and add FLAGS parameter. Deal with indirect calls by descriptor and adjust. Set STATIC_CHAIN_REG_P on the static chain register, if any. (call_expr_flags): Set ECF_BY_DESCRIPTOR for calls by descriptor. (expand_call): Likewise. Move around call to prepare_call_address and pass all flags to it. * cfgexpand.c (expand_call_stmt): Reinstate CALL_EXPR_BY_DESCRIPTOR. * gimple.h (enum gf_mask): New GF_CALL_BY_DESCRIPTOR value. (gimple_call_set_by_descriptor): New setter. (gimple_call_by_descriptor_p): New getter. * gimple.c (gimple_build_call_from_tree): SetCALL_EXPR_BY_DESCRIPTOR. (gimple_call_flags): Deal with GF_CALL_BY_DESCRIPTOR. * langhooks.h (struct lang_hooks): Add custom_function_descriptors. * langhooks-def.h (LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS): Define. (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS. * rtl.h (STATIC_CHAIN_REG_P): New macro. * rtlanal.c (find_first_parameter_load): Skip static chain registers. * target.def (custom_function_descriptors): New POD hook. * tree.h (FUNC_ADDR_BY_DESCRIPTOR): New flag on ADDR_EXPR. (CALL_EXPR_BY_DESCRIPTOR): New flag on CALL_EXPR. * tree-core.h (ECF_BY_DESCRIPTOR): New mask. Document FUNC_ADDR_BY_DESCRIPTOR and CALL_EXPR_BY_DESCRIPTOR. * tree.c (make_node_stat) <tcc_declaration>: Use FUNCTION_ALIGNMENT. (build_common_builtin_nodes): Initialize init_descriptor and adjust_descriptor. * tree-nested.c: Include target.h. (struct nesting_info): Add 'any_descr_created' field. (get_descriptor_type): New function. (lookup_element_for_decl): New function extracted from... (create_field_for_decl): Likewise. (lookup_tramp_for_decl): ...here. Adjust. (lookup_descr_for_decl): New function. (convert_tramp_reference_op): Deal with descriptors. (build_init_call_stmt): New function extracted from... (finalize_nesting_tree_1): ...here. Adjust and deal withdescriptors. * defaults.h (FUNCTION_ALIGNMENT): Define. (TRAMPOLINE_ALIGNMENT): Set to above instead of FUNCTION_BOUNDARY. * config/i386/i386.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define. * config/ia64/ia64.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Likewise. * config/rs6000/rs6000.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS):Likewise. * config/sparc/sparc.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Likewise. ada/ * gcc-interface/misc.c (LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS):Define. * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Access>: Deal with a zero TARGET_CUSTOM_FUNCTION_DESCRIPTORS specially for Code_Address. Otherwise, if TARGET_CUSTOM_FUNCTION_DESCRIPTORS is positive, set FUNC_ADDR_BY_DESCRIPTOR for 'Access/'Unrestricted_Access of nested subprograms if the type can use an internal representation. (call_to_gnu): Likewise, but set CALL_EXPR_BY_DESCRIPTOR on indirect calls if the type can use an internal representation. From-SVN: r241222
2016-10-12separate shrink-wrap: New command-line flag, status flag, hooks, and docSegher Boessenkool1-0/+4
This patch adds a new command-line flag "-fshrink-wrap-separate", a status flag "shrink_wrapped_separate", hooks for abstracting the target components, and documentation for all those. * common.opt (-fshrink-wrap-separate): New flag. * doc/invoke.texi: Document it. * doc/tm.texi.in (Shrink-wrapping separate components): New subsection. * doc/tm.texi: Regenerate. * emit-rtl.h (struct rtl_data): New field shrink_wrapped_separate. * target.def (shrink_wrap): New hook vector. (get_separate_components, components_for_bb, disqualify_components, emit_prologue_components, emit_epilogue_components, set_handled_components): New hooks. From-SVN: r241059
2016-10-12gcc/Jakub Jelinek1-1/+4
* common.opt (Wimplicit-fallthrough) Turn into alias to -Wimplicit-fallthrough=3. Remove EnabledBy. (Wimplicit-fallthrough=): New option. * gimplify.c (warn_implicit_fallthrough_r): Use OPT_Wimplicit_fallthrough_ instead of OPT_Wimplicit_fallthrough. * doc/invoke.texi (-Wimplicit-fallthrough): Document as alias to -Wimplicit-fallthrough=3. (-Wimplicit-fallthrough=): Document. gcc/c-family/ * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option. (Wimplicit-fallthrough=): Enable for these languages by -Wextra. * c-opts.c (sanitize_cpp_opts): Initialize cpp_opts->cpp_warn_implicit_fallthrough. gcc/testsuite/ * c-c++-common/Wimplicit-fallthrough-25.c: New test. * c-c++-common/Wimplicit-fallthrough-26.c: New test. * c-c++-common/Wimplicit-fallthrough-27.c: New test. * c-c++-common/Wimplicit-fallthrough-28.c: New test. * c-c++-common/Wimplicit-fallthrough-29.c: New test. * c-c++-common/Wimplicit-fallthrough-30.c: New test. * c-c++-common/Wimplicit-fallthrough-31.c: New test. * c-c++-common/Wimplicit-fallthrough-32.c: New test. * c-c++-common/Wimplicit-fallthrough-33.c: New test. libcpp/ * include/cpplib.h (struct cpp_options): Add cpp_warn_implicit_fallthrough. * init.c (cpp_create_reader): Initialize it to 0. * lex.c (fallthrough_comment_p): Handle different cpp_warn_implicit_fallthrough levels. Whitespace fixes. From-SVN: r241013
2016-09-30configure.ac: Split CHECKING_P into CHECKING_P and ENABLE_EXTRA_CHECKING.Bernd Edlinger1-1/+1
2016-09-30 Bernd Edlinger <bernd.edlinger@hotmail.de> * configure.ac: Split CHECKING_P into CHECKING_P and ENABLE_EXTRA_CHECKING. * configure: Regenerated. * config.in: Adjust commment of CHECKING_P. Add ENABLE_EXTRA_CHECKING. * common.opt (flag_checking): Use CHECKING_P and ENABLE_EXTRA_CHECKING. From-SVN: r240677
2016-09-26Fix handling of -fsanitize-recover* options.Martin Liska1-1/+1
* common.opt: Exclude SANITIZE_UNREACHABLE and SANITIZE_RETURN from default sanitize recover values. * doc/invoke.texi: Fix documentation related to -fsanitize=leak, -fsanitize=address, -fsanitize=thread and -fsanitize-recover. * flag-types.h: Replace couple of 1 << x to 1UL << x, make it consistent. * opts.c (finish_options): Do a generic loop over options that can be recovered. (parse_sanitizer_options): Exclude SANITIZE_UNREACHABLE and SANITIZE_RETURN. (common_handle_option): Likewise. * opts.h: Declare can_recover to sanitizer_opts_s. * c-c++-common/ubsan/sanitize-recover-1.c: New test. * c-c++-common/ubsan/sanitize-recover-2.c: New test. * c-c++-common/ubsan/sanitize-recover-3.c: New test. * c-c++-common/ubsan/sanitize-recover-4.c: New test. * c-c++-common/ubsan/sanitize-recover-5.c: New test. * c-c++-common/ubsan/sanitize-recover-6.c: New test. * c-c++-common/ubsan/sanitize-recover-7.c: New test. * c-c++-common/ubsan/sanitize-recover-8.c: New test. * c-c++-common/ubsan/sanitize-recover-9.c: New test. From-SVN: r240491
2016-09-26Implement -Wimplicit-fallthrough.Marek Polacek1-0/+4
Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r240485
2016-09-20Add IPA VRPKugan Vivekanandarajah1-0/+4
gcc/lto/ChangeLog: 2016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org> * lto-partition.c: Include tree-vrp.h. * lto.c: Likewise. gcc/testsuite/ChangeLog: 2016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org> * g++.dg/ipa/pure-const-3.C: Add -fno-ipa-vrp. Else constant arguments will be optimized away. * gcc.dg/ipa/vrp1.c: New test. * gcc.dg/ipa/vrp2.c: New test. * gcc.dg/ipa/vrp3.c: New test. gcc/ChangeLog: 2016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org> * common.opt: New option -fipa-vrp. * ipa-cp.c (ipa_get_vr_lat): New. (ipcp_vr_lattice::print): Likewise. (print_all_lattices): Call ipcp_vr_lattice::print. (ipcp_vr_lattice::meet_with): New. (ipcp_vr_lattice::meet_with_1): Likewise. (ipcp_vr_lattice::top_p): Likewise. (ipcp_vr_lattice::bottom_p): Likewsie. (ipcp_vr_lattice::set_to_bottom): Likewise. (set_all_contains_variable): Call VR set_to_bottom. (initialize_node_lattices): Init VR lattices. (propagate_vr_accross_jump_function): New. (propagate_constants_accross_call): Call propagate_vr_accross_jump_function. (ipcp_store_vr_results): New. (ipcp_driver): Handle VR. * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Handle VR. (ipa_set_jf_unknown): Likewise. (ipa_compute_jump_functions_for_edge): Likewise. (ipa_node_params_t::duplicate): Likewise. (ipa_write_jump_function): Likewise. (ipa_read_jump_function): Likewise. (write_ipcp_transformation_info): Likewise. (read_ipcp_transformation_info): Likewise. (ipcp_update_vr): New. (ipcp_transform_function): Handle VR. * ipa-prop.h (struct ipa_vr): New. * cgraph.c: Include tree-vrp.h. * cgraphunit.c: Likewise. * ipa-utils.c: Likewise. * ipa.c: Likewise. From-SVN: r240292
2016-09-02Add -fdiagnostics-generate-patchDavid Malcolm1-0/+4
gcc/ChangeLog: * common.opt (fdiagnostics-generate-patch): New option. * diagnostic.c: Include "edit-context.h". (diagnostic_initialize): Initialize context->edit_context_ptr. (diagnostic_finish): Delete context->edit_context_ptr. (diagnostic_report_diagnostic): Add fix-it hints from the diagnostic to context->edit_context_ptr, if any. * diagnostic.h (class edit_context): Add forward decl. (struct diagnostic_context): Add field "edit_context_ptr". * doc/invoke.texi (Diagnostic Message Formatting Options): Add -fdiagnostics-generate-patch. (-fdiagnostics-generate-patch): New item. * toplev.c: Include "edit-context.h". (process_options): Set global_dc->edit_context_ptr to a new edit_context if the options need one. (toplev::main): Handle -fdiagnostics-generate-patch by using global_dc->edit_context_ptr. gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic-test-show-locus-generate-patch.c: New test case. * gcc.dg/plugin/plugin.exp (plugin_test_list): Add diagnostic-test-show-locus-generate-patch.c to the sources for diagnostic_plugin_test_show_locus.c. From-SVN: r239965
2016-08-26Patch for performing interprocedural bitwise constant propagation.Prathamesh Kulkarni1-0/+4
2016-08-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> Martin Jambhor <mjambor@suse.cz> * common.opt: New option -fipa-bit-cp. * doc/invoke.texi: Document -fipa-bit-cp. * opts.c (default_options_table): Add entry for -fipa-bit-cp. (enable_fdo_optimizations): Check for flag_ipa_bit_cp. * tree-ssa-ccp.h: New header file. * tree-ssa-ccp.c: Include tree-ssa-ccp.h (bit_value_binop_1): Change to bit_value_binop_1 and export it. Replace all occurences of tree parameter by two new params: signop, int. (bit_value_unop_1): Change to bit_value_unop and export it. Replace all occurences of tree parameter by two new params: signop, int. (bit_value_binop): Change call from bit_value_binop_1 to bit_value_binop. (bit_value_assume_aligned): Likewise. (bit_value_unop): Change call from bit_value_unop_1 to bit_value_unop. (do_ssa_ccp): Pass nonzero_p || flag_ipa_cp_bit instead of nonzero_p to ccp_finalize. (ccp_finalize): Skip processing if val->mask == 0. * ipa-cp.c: Include tree-ssa-ccp.h (ipcp_bits_lattice): New class. (ipcp_param_lattice (bits_lattice): New member. (print_all_lattices): Call ipcp_bits_lattice::print. (set_all_contains_variable): Call ipcp_bits_lattice::set_to_bottom. (initialize_node_lattices): Likewise. (propagate_bits_accross_jump_function): New function. (propagate_constants_accross_call): Call propagate_bits_accross_jump_function. (ipcp_propagate_stage): Store parameter types when in_lto_p is true. (ipcp_store_bits_results): New function. (ipcp_driver): Call ipcp_store_bits_results. * ipa-prop.h (ipa_bits): New struct. (ipa_jump_func): Add new member bits of type ipa_bits. (ipa_param_descriptor): Change decl to decl_or_type. (ipa_get_param): Change decl to decl_or_type and assert on PARM_DECL. (ipa_get_type): New function. (ipcp_transformation_summary): New member bits. * ipa-prop.c (ipa_get_param_decl_index_1): s/decl/decl_or_type. (ipa_populate_param_decls): Likewise. (ipa_dump_param): Likewise. (ipa_print_node_jump_functions_for_edge): Pretty-print ipa_bits jump function. (ipa_set_jf_unknown): Set ipa_bits::known to false. (ipa_compute_jump_functions_for_edge): Compute jump function for bits propagation. (ipa_node_params_t::duplicate): Copy src->bits into dst->bits. (ipa_write_jump_function): Add streaming for ipa_bits. (ipa_read_jump_function): Add support for reading streamed ipa_bits. (write_ipcp_transformation_info): Add streaming for ipa_bits summary for ltrans. (read_ipcp_transfomration_info): Add support for reading streamed ipa_bits. (ipcp_update_bits): New function. (ipcp_transform_function): Call ipcp_update_bits. testsuite/ * gcc.dg/ipa/propbits-1.c: New test-case. * gcc.dg/ipa/propbits-2.c: Likewise. * gcc.dg/ipa/propbits-3.c: Likewise. Co-Authored-By: Martin Jambor <mjambor@suse.cz> From-SVN: r239769
2016-08-12passes.c (execute_todo): Do not push/pop TV_TODO.Richard Biener1-0/+4
2016-08-12 Richard Biener <rguenther@suse.de> * passes.c (execute_todo): Do not push/pop TV_TODO. (execute_one_ipa_transform_pass): Move timevar push/pop TODO execution. (execute_one_pass): Likewise. * common.opt (ftime-report-details): New switch. * doc/invoke.texi (ftime-report-details): Document. * timevar.h (timer::print_row): Adjust signature. (timer::all_zero): New static helper. (timer::child_map_t): New typedef. (timer::time_var_def): Add children field. * timevar.c (timer::named_items::print): Adjust. (timer::~timer): Free timevar recorded children. (timer::pop_internal): When -ftime-report-details record time spent in sub-timevars. (timer::print_row): Adjust. (timer::print): Print sub-timevar stats, use all_zero. * timevar.def (TV_TODO): Remove. From-SVN: r239406
2016-08-10Cherry-pick fprofile-generate-atomic from google/gcc-4_9Martin Liska1-0/+13
Cherry picked (and modified) from google-4_7 branch 2012-12-26 Rong Xu <xur@google.com> * common.opt (fprofile-update): Add new flag. * coretypes.h: Define enum profile_update. * doc/invoke.texi: Document -fprofile-update. * gcov-io.h: Declare GCOV_TYPE_ATOMIC_FETCH_ADD and GCOV_TYPE_ATOMIC_FETCH_ADD_FN. * tree-profile.c (gimple_init_edge_profiler): Generate also atomic profiler update. (gimple_gen_edge_profiler): Likewise. * g++.dg/gcov/gcov-threads-1.C: New test. From-SVN: r239323
2016-07-22common.opt (funsafe-loop-optimizations): Mark ignore.Bin Cheng1-2/+2
* common.opt (funsafe-loop-optimizations): Mark ignore. * doc/invoke.texi (funsafe-loop-optimizations): Remove. * loop-iv.c (get_simple_loop_desc): Remove unsafe-loop-optimizations related code. * tree-ssa-loop-niter.c (finite_loop_p): Ditto. * config/bfin/bfin.c (bfin_can_use_doloop_p): Ditto. From-SVN: r238642
2016-07-15PR c++/71814 - mangling sizeof... (sP and sZ)Jason Merrill1-0/+3
gcc/cp/ * mangle.c (write_expression): Handle sizeof... an argument pack. libiberty/ * cp-demangle.c (cplus_demangle_operators): Add sP and sZ. (d_print_comp_inner): Handle them. (d_template_args_1): Split out from d_template_args. (d_args_length): New. From-SVN: r238389
2016-07-12re PR tree-optimization/23286 (Missed code hoisting optimization)Steven Bosscher1-0/+4
2016-07-12 Steven Bosscher <steven@gcc.gnu.org> Richard Biener <rguenther@suse.de> PR tree-optimization/23286 PR tree-optimization/70159 * doc/invoke.texi: Document -fcode-hoisting. * common.opt (fcode-hoisting): New flag. * opts.c (default_options_table): Enable -fcode-hoisting at -O2+. * tree-ssa-pre.c (pre_stats): Add hoist_insert. (do_regular_insertion): Rename to ... (do_pre_regular_insertion): ... this and amend general comments on insertion strathegy. (do_partial_partial_insertion): Rename to ... (do_pre_partial_partial_insertion): ... this. (do_hoist_insertion): New function. (insert_aux): Take flags on whether to do PRE and/or hoist insertion and call do_hoist_insertion properly. (insert): Adjust. (pass_pre::gate): Enable also if -fcode-hoisting is enabled. (pass_pre::execute): Register hoist_insert stats. * gcc.dg/tree-ssa/ssa-pre-11.c: Disable code hosting. * gcc.dg/tree-ssa/ssa-pre-27.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-28.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-2.c: Likewise. * gcc.dg/tree-ssa/pr35286.c: Likewise. * gcc.dg/tree-ssa/pr35287.c: Likewise. * gcc.dg/hoist-register-pressure-1.c: Likewise. * gcc.dg/hoist-register-pressure-2.c: Likewise. * gcc.dg/hoist-register-pressure-3.c: Likewise. * gcc.dg/pr51879-12.c: Likewise. * gcc.dg/strlenopt-9.c: Likewise. * gcc.dg/tree-ssa/pr47392.c: Likewise. * gcc.dg/tree-ssa/pr68619-4.c: Likewise. * gcc.dg/tree-ssa/split-path-5.c: Likewise. * gcc.dg/tree-ssa/slsr-35.c: Likewise. * gcc.dg/tree-ssa/slsr-36.c: Likewise. * gcc.dg/tree-ssa/loadpre3.c: Adjust so hosting doesn't apply. * gcc.dg/tree-ssa/pr43491.c: Scan optimized dump for desired result. * gcc.dg/tree-ssa/ssa-pre-31.c: Adjust expected outcome for hoisting. * gcc.dg/tree-ssa/ssa-hoist-1.c: New testcase. * gcc.dg/tree-ssa/ssa-hoist-2.c: New testcase. * gcc.dg/tree-ssa/ssa-hoist-3.c: New testcase. * gcc.dg/tree-ssa/ssa-hoist-4.c: New testcase. * gcc.dg/tree-ssa/ssa-hoist-5.c: New testcase. * gcc.dg/tree-ssa/ssa-hoist-6.c: New testcase. * gfortran.dg/pr43984.f90: Adjust expected outcome. Co-Authored-By: Richard Biener <rguenther@suse.de> From-SVN: r238242
2016-06-29Mark -fstack-protect as optimization flag.Martin Liska1-4/+4
PR middle-end/71585 * common.opt (flag_stack_protect): Mark the flag as optimization flag. * ipa-inline-transform.c (inline_call): Remove unnecessary call of build_optimization_node. * gcc.dg/pr71585.c: New test. * gcc.dg/pr71585-2.c: New test. * gcc.dg/pr71585-3.c: New test. From-SVN: r237845
2016-06-22Implement -fdiagnostics-parseable-fixitsDavid Malcolm1-0/+4
gcc/ChangeLog: * common.opt (fdiagnostics-parseable-fixits): New option. * diagnostic.c: Include "selftest.h". (print_escaped_string): New function. (print_parseable_fixits): New function. (diagnostic_report_diagnostic): Call print_parseable_fixits. (selftest::assert_print_escaped_string): New function. (ASSERT_PRINT_ESCAPED_STRING_STREQ): New macro. (selftest::test_print_escaped_string): New function. (selftest::test_print_parseable_fixits_none): New function. (selftest::test_print_parseable_fixits_insert): New function. (selftest::test_print_parseable_fixits_remove): New function. (selftest::test_print_parseable_fixits_replace): New function. (selftest::diagnostic_c_tests): New function. * diagnostic.h (struct diagnostic_context): Add field "parseable_fixits_p". * doc/invoke.texi (Diagnostic Message Formatting Options): Add -fdiagnostics-parseable-fixits. (-fdiagnostics-parseable-fixits): New option. * opts.c (common_handle_option): Handle -fdiagnostics-parseable-fixits. * selftest-run-tests.c (selftest::run_tests): Call selftest::diagnostic_c_tests. * selftest.h (selftest::diagnostic_c_tests): New prototype. gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic-test-show-locus-parseable-fixits.c: New file. * gcc.dg/plugin/plugin.exp (plugin_test_list): Add diagnostic-test-show-locus-parseable-fixits.c to sources for diagnostic_plugin_test_show_locus.c. * lib/gcc-defs.exp (freeform_regexps): New global. (dg-regexp): New function. (handle-dg-regexps): New function. * lib/gcc-dg.exp (cleanup-after-saved-dg-test): Reset freeform_regexps to the empty list. * lib/prune.exp (prune_gcc_output): Call handle-dg-regexps. libcpp/ChangeLog: * include/line-map.h (fixit_hint::get_start_loc): New pure virtual function. (fixit_hint::maybe_get_end_loc): Likewise. (fixit_insert::get_start_loc): New function, implementing fixit_hint::get_start_loc. (fixit_insert::maybe_get_end_loc): New function, implementing fixit_hint::maybe_get_end_loc. (fixit_remove::get_start_loc): New function, implementing fixit_hint::get_start_loc. (fixit_remove::maybe_get_end_loc): New function, implementing fixit_hint::maybe_get_end_loc. (fixit_replace::get_start_loc): New function, implementing fixit_hint::get_start_loc. (fixit_replace::maybe_get_end_loc): New function, implementing fixit_hint::maybe_get_end_loc. From-SVN: r237712
2016-06-07re PR c++/61564 (#pragma GCC optimize ("-fno-lto") causes the compiler to crash)Richard Biener1-1/+1
2016-06-07 Richard Biener <rguenther@suse.de> PR c/61564 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION options and warn about others. * common.opt (ffast-math): Make Optimization. * gcc.dg/Wpragmas-1.c: New testcase. * gcc.dg/Wattributes-4.c: Likewise. * gcc.dg/ipa/pr70646.c: Drop optimize pragma in favor of dg-option entry. From-SVN: r237174
2016-06-06Selftest frameworkDavid Malcolm1-0/+4
gcc/ChangeLog: * Makefile.in (OBJS): Add function-tests.o, hash-map-tests.o, hash-set-tests.o, rtl-tests.o, selftest-run-tests.o. (OBJS-libcommon): Add selftest.o. (OBJS-libcommon-target): Add selftest.o. (all.internal): Add "selftest". (all.cross): Likewise. (selftest): New phony target. (s-selftest): New target. (selftest-gdb): New phony target. (COLLECT2_OBJS): Add selftest.o. * bitmap.c: Include "selftest.h". (selftest::test_gc_alloc): New function. (selftest::test_set_range): New function. (selftest::test_clear_bit_in_middle): New function. (selftest::test_copying): New function. (selftest::test_bitmap_single_bit_set_p): New function. (selftest::bitmap_c_tests): New function. * common.opt (fself-test): New. * diagnostic-show-locus.c: Include "selftest.h". (make_range): New function. (test_range_contains_point_for_single_point): New function. (test_range_contains_point_for_single_line): New function. (test_range_contains_point_for_multiple_lines): New function. (assert_eq): New function. (test_get_line_width_without_trailing_whitespace): New function. (selftest::diagnostic_show_locus_c_tests): New function. * et-forest.c: Include "selftest.h". (selftest::test_single_node): New function. (selftest::test_simple_tree): New function. (selftest::test_disconnected_nodes): New function. (selftest::et_forest_c_tests): New function. * fold-const.c: Include "selftest.h". (selftest::assert_binop_folds_to_const): New function. (selftest::assert_binop_folds_to_nonlvalue): New function. (selftest::test_arithmetic_folding): New function. (selftest::fold_const_c_tests): New function. * function-tests.c: New file. * gimple.c: Include "selftest.h". Include "gimple-pretty-print.h". (selftest::verify_gimple_pp): New function. (selftest::test_assign_single): New function. (selftest::test_assign_binop): New function. (selftest::test_nop_stmt): New function. (selftest::test_return_stmt): New function. (selftest::test_return_without_value): New function. (selftest::gimple_c_tests): New function. * hash-map-tests.c: New file. * hash-set-tests.c: New file. * input.c: Include "selftest.h". (selftest::assert_loceq): New function. (selftest::test_accessing_ordinary_linemaps): New function. (selftest::test_unknown_location): New function. (selftest::test_builtins): New function. (selftest::test_reading_source_line): New function. (selftest::input_c_tests): New function. * rtl-tests.c: New file. * selftest-run-tests.c: New file. * selftest.c: New file. * selftest.h: New file. * spellcheck.c: Include "selftest.h". (selftest::levenshtein_distance_unit_test_oneway): New function, adapted from testsuite/gcc.dg/plugin/levenshtein_plugin.c. (selftest::levenshtein_distance_unit_test): Likewise. (selftest::spellcheck_c_tests): Likewise. * toplev.c: Include selftest.h. (toplev::run_self_tests): New. (toplev::main): Handle -fself-test. * toplev.h (toplev::run_self_tests): New. * tree.c: Include "selftest.h". (selftest::test_integer_constants): New function. (selftest::test_identifiers): New function. (selftest::test_labels): New function. (selftest::tree_c_tests): New function. * tree-cfg.c: Include "selftest.h". (selftest::push_fndecl): New function. (selftest::test_linear_chain): New function. (selftest::test_diamond): New function. (selftest::test_fully_connected): New function. (selftest::tree_cfg_c_tests): New function. * vec.c: Include "selftest.h". (selftest::safe_push_range): New function. (selftest::test_quick_push): New function. (selftest::test_safe_push): New function. (selftest::test_truncate): New function. (selftest::test_safe_grow_cleared): New function. (selftest::test_pop): New function. (selftest::test_safe_insert): New function. (selftest::test_ordered_remove): New function. (selftest::test_unordered_remove): New function. (selftest::test_block_remove): New function. (selftest::reverse_cmp): New function. (selftest::test_qsort): New function. (selftest::vec_c_tests): New function.c. * wide-int.cc: Include selftest.h and wide-int-print.h. (selftest::from_int <wide_int>): New function. (selftest::from_int <offset_int>): New function. (selftest::from_int <widest_int>): New function. (selftest::assert_deceq): New function. (selftest::assert_hexeq): New function. (selftest::test_printing <VALUE_TYPE>): New function template. (selftest::test_ops <VALUE_TYPE>): New function template. (selftest::test_comparisons <VALUE_TYPE>): New function template. (selftest::run_all_wide_int_tests <VALUE_TYPE>): New function template. (selftest::wide_int_cc_tests): New function. gcc/testsuite/ChangeLog: * gcc.dg/plugin/levenshtein-test-1.c: Delete. * gcc.dg/plugin/levenshtein_plugin.c: Delete. * gcc.dg/plugin/plugin.exp (plugin_test_list): Remove the above. From-SVN: r237144
2016-06-03Add option for whether ceil etc. can raise "inexact", adjust x86 conditions.Joseph Myers1-0/+4
In ISO C99/C11, the ceil, floor, round and trunc functions may or may not raise the "inexact" exception for noninteger arguments. Under TS 18661-1:2014, the C bindings for IEEE 754-2008, these functions are prohibited from raising "inexact", in line with the general rule that "inexact" is only when the mathematical infinite precision result of a function differs from the result after rounding to the target type. GCC has no option to select TS 18661 requirements for not raising "inexact" when expanding built-in versions of these functions inline. Furthermore, even given such requirements, the conditions on the x86 insn patterns for these functions are unnecessarily restrictive. I'd like to make the out-of-line glibc versions follow the TS 18661 requirements; in the cases where this slows them down (the cases using x87 floating point), that makes it more important for inline versions to be used when the user does not care about "inexact". This patch fixes these issues. A new option -fno-fp-int-builtin-inexact is added to request TS 18661 rules for these functions; the default -ffp-int-builtin-inexact reflects that such exceptions are allowed by C99 and C11. (The intention is that if C2x incorporates TS 18661-1, then the default would change in C2x mode.) The x86 built-ins for rint (x87, SSE2 and SSE4.1) are made unconditionally available (no longer depending on -funsafe-math-optimizations or -fno-trapping-math); "inexact" is correct for noninteger arguments to rint. For floor, ceil and trunc, the x87 and SSE2 built-ins are OK if -ffp-int-builtin-inexact or -fno-trapping-math (they may raise "inexact" for noninteger arguments); the SSE4.1 built-ins are made to use ROUND_NO_EXC so that they do not raise "inexact" and so are OK unconditionally. Now, while there was no semantic reason for depending on -funsafe-math-optimizations, the insn patterns had such a dependence because of use of gen_truncxf<mode>2_i387_noop to truncate back to SFmode or DFmode after using frndint in XFmode. In this case a no-op truncation is safe because rounding to integer always produces an exactly representable value (the same reason why IEEE semantics say it shouldn't produce "inexact") - but of course that insn pattern isn't safe because it would also match cases where the truncation is not in fact a no-op. To allow frndint to be used for SFmode and DFmode without that unsafe pattern, the relevant frndint patterns are extended to SFmode and DFmode or new SFmode and DFmode patterns added, so that the frndint operation can be represented in RTL as an operation acting directly on SFmode or DFmode without the extension and the problematic truncation. A generic test of the new option is added, as well as x86-specific tests, both execution tests including the generic test with different x86 options and scan-assembler tests verifying that functions that should be inlined with different options are indeed inlined. I think other architectures are OK for TS 18661-1 semantics already. Considering those defining "ceil" patterns: aarch64, arm, rs6000, s390 use instructions that do not raise "inexact"; nvptx does not support floating-point exceptions. (This does mean the -f option in fact only affects one architecture, but I think it should still be a -f option; it's logically architecture-independent and is expected to be affected by future -std options, so is similar to e.g. -fexcess-precision=, which also does nothing on most architectures but is implied by -std options.) Bootstrapped with no regressions on x86_64-pc-linux-gnu. OK to commit? PR target/71276 PR target/71277 gcc: * common.opt (ffp-int-builtin-inexact): New option. * doc/invoke.texi (-fno-fp-int-builtin-inexact): Document. * doc/md.texi (floor@var{m}2, btrunc@var{m}2, round@var{m}2) (ceil@var{m}2): Document dependence on this option. * ipa-inline-transform.c (inline_call): Handle flag_fp_int_builtin_inexact. * ipa-inline.c (can_inline_edge_p): Likewise. * config/i386/i386.md (rintxf2): Do not test flag_unsafe_math_optimizations. (rint<mode>2_frndint): New define_insn. (rint<mode>2): Do not test flag_unsafe_math_optimizations for 387 or !flag_trapping_math for SSE. Just use gen_rint<mode>2_frndint for 387 instead of extending and truncating. (frndintxf2_<rounding>): Test flag_fp_int_builtin_inexact || !flag_trapping_math instead of flag_unsafe_math_optimizations. Change to frndint<mode>2_<rounding>. (frndintxf2_<rounding>_i387): Likewise. Change to frndint<mode>2_<rounding>_i387. (<rounding_insn>xf2): Likewise. (<rounding_insn><mode>2): Test flag_fp_int_builtin_inexact || !flag_trapping_math instead of flag_unsafe_math_optimizations for x87. Test TARGET_ROUND || !flag_trapping_math || flag_fp_int_builtin_inexact instead of !flag_trapping_math for SSE. Use ROUND_NO_EXC in constant operand of gen_sse4_1_round<mode>2. Just use gen_frndint<mode>2_<rounding> for 387 instead of extending and truncating. gcc/testsuite: * gcc.dg/torture/builtin-fp-int-inexact.c, gcc.target/i386/387-builtin-fp-int-inexact.c, gcc.target/i386/387-rint-inline-1.c, gcc.target/i386/387-rint-inline-2.c, gcc.target/i386/sse2-builtin-fp-int-inexact.c, gcc.target/i386/sse2-rint-inline-1.c, gcc.target/i386/sse2-rint-inline-2.c, gcc.target/i386/sse4_1-builtin-fp-int-inexact.c, gcc.target/i386/sse4_1-rint-inline.c: New tests. From-SVN: r237074
2016-05-23re PR c/49859 (gcc could warn about statements between "switch" and first ↵Marek Polacek1-0/+5
"case") PR c/49859 * common.opt (Wswitch-unreachable): New option. * doc/invoke.texi: Document -Wswitch-unreachable. * gimplify.c (gimplify_switch_expr): Implement the -Wswitch-unreachable warning. * c-c++-common/Wswitch-unreachable-1.c: New test. * gcc.dg/Wswitch-unreachable-1.c: New test. * c-c++-common/goacc/sb-2.c (void foo): Add dg-warning. * g++.dg/cpp0x/lambda/lambda-switch.C (main): Likewise. * g++.dg/gomp/block-10.C: Likewise. * gcc.dg/gomp/block-10.c: Likewise. * g++.dg/gomp/block-9.C: Likewise. * gcc.dg/gomp/block-9.c: Likewise. * g++.dg/gomp/target-1.C: Likewise. * g++.dg/gomp/target-2.C: Likewise. * gcc.dg/gomp/target-1.c: Likewise. * gcc.dg/gomp/target-2.c: Likewise. * g++.dg/gomp/taskgroup-1.C: Likewise. * gcc.dg/gomp/taskgroup-1.c: Likewise. * gcc.dg/gomp/teams-1.c: Likewise. * g++.dg/gomp/teams-1.C: Likewise. * g++.dg/overload/error3.C: Likewise. * g++.dg/tm/jump1.C: Likewise. * g++.dg/torture/pr40335.C: Likewise. * gcc.dg/c99-vla-jump-5.c: Likewise. * gcc.dg/switch-warn-1.c: Likewise. * gcc.dg/Wjump-misses-init-1.c: Use -Wno-switch-unreachable. * gcc.dg/nested-func-1.c: Likewise. * gcc.dg/pr67784-4.c: Likewise. From-SVN: r236597
2016-04-26re PR bootstrap/70704 (AIX bootstrap comparison failure)Jakub Jelinek1-0/+4
PR bootstrap/70704 * configure.ac (--enable-stage1-checking): For --disable-checking or implicit --enable-checking, make sure extra flag matches in between stage1 and later checking. * configure: Regenerated. gcc/ * configure.ac (--enable-checking): Document extra flag, for non-release builds default to --enable-checking=yes,extra. If misc checking and extra checking, define CHECKING_P to 2 instead of 1. * common.opt (fchecking=): Add. * doc/invoke.texi (-fchecking=): Document. * doc/install.texi: Document --enable-checking changes. * configure: Regenerated. * config.in: Regenerated. gcc/cp/ * pt.c (build_non_dependent_expr): Use flag_checking > 1 instead of just flag_checking. From-SVN: r235430
2016-03-17Properly set flag_pie and flag_picH.J. Lu1-2/+2
We can't set flag_pie to the default when flag_pic == 0, which may be set by -fno-pic or -fno-PIC, since the default value of flag_pie is non-zero when GCC is configured with --enable-default-pie. We need to initialize flag_pic to -1 so that we can tell if -fpic, -fPIC, -fno-pic or -fno-PIC is used. Since Darwin defaults to PIC (__PIC__ == 2) and the PIC setting can't be changed, skip tests of default __PIC__ and __PIE__ setting for *-*-darwin* targets. gcc/ PR driver/70192 * opts.c (finish_options): Don't set flag_pie to the default if -fpic, -fPIC, -fno-pic or -fno-PIC is used. Set flag_pic to 0 if it is -1. gcc/testsuite/ PR driver/70192 * gcc.dg/pic-1.c: New test. * gcc.dg/pic-2.c: Likewise. * gcc.dg/pic-3.c: Likewise. * gcc.dg/pic-4.c: Likewise. * gcc.dg/pie-1.c: Likewise. * gcc.dg/pie-2.c: Likewise. * gcc.dg/pie-3.c: Likewise. * gcc.dg/pie-4.c: Likewise. * gcc.dg/pie-5.c: Likewise. * gcc.dg/pie-6.c: Likewise. From-SVN: r234295
2016-03-10Add -funconstrained-commons to work around PR/69368 (and others) in SPEC2006Alan Lawrence1-0/+5
gcc/: * common.opt (funconstrained-commons, flag_unconstrained_commons): New. * tree.c (array_at_struct_end_p): Do not limit to size of decl for DECL_COMMONS if flag_unconstrained_commons is set. * tree-dfa.c (get_ref_base_and_extent): Likewise. * doc/invoke.texi (Optimize Options): Add -funconstrained-commons. (funconstrained-commons): Document. gcc/testsuite: * gfortran.dg/unconstrained_commons.f: New. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r234106
2016-02-24Add -flifetime-dse=1.Jason Merrill1-1/+4
gcc/ * common.opt (flifetime-dse): Add -flifetime-dse=1. gcc/cp/ * decl.c (start_preparsed_function): Condition ctor clobber on flag_lifetime_dse > 1. From-SVN: r233672
2016-02-23re PR c/69900 (Unhelpful diagnostic about Ignored options)Jakub Jelinek1-1/+1
PR c/69900 * common.opt (Wunreachable-code): Add Warning flag. * gcc.dg/pr69900.c: New test. From-SVN: r233630
2016-02-16re PR c/69835 (-Wnonnull diagnoses parameter comparisons with NULL even when ↵Jakub Jelinek1-0/+4
those could have changed) PR c/69835 * common.opt (Wnonnull-compare): New warning. * doc/invoke.texi (-Wnonnull): Remove text about comparison of arguments against NULL. (-Wnonnull-compare): Document. * Makefile.in (OBJS): Add gimple-ssa-nonnull-compare.o. * tree-pass.h (make_pass_warn_nonnull_compare): Declare. * passes.def (pass_warn_nonnull_compare): Add. * gimple-ssa-nonnull-compare.c: New file. c-family/ * c.opt (Wnonnull-compare): Enable for -Wall. c/ * c-typeck.c (build_binary_op): Revert 2015-09-09 change. cp/ * typeck.c (cp_build_binary_op): Revert 2015-09-09 change. testsuite/ * c-c++-common/nonnull-1.c: Use -Wnonnull-compare instead of -Wnonnull in dg-options. * c-c++-common/nonnull-2.c: New test. From-SVN: r233472
2016-01-27common.opt (fkeep-gc-roots-live): New undocumented option.Ian Lance Taylor1-0/+4
gcc/: * common.opt (fkeep-gc-roots-live): New undocumented option. * tree-ssa-loop-ivopts.c (add_candidate_1): If -fkeep-gc-roots-live, skip pointers. (add_iv_candidate_for_biv): Handle add_candidate_1 returning NULL. gcc/testsuite/: * gcc.dg/tree-ssa/ivopt_5.c: New test. From-SVN: r232888
2016-01-20common.opt (feliminate-dwarf2-dups): Replace references to "DWARF 2" with ↵Sandra Loosemore1-1/+1
just "DWARF". 2016-01-20 Sandra Loosemore <sandra@codesourcery.com> gcc/ * common.opt (feliminate-dwarf2-dups): Replace references to "DWARF 2" with just "DWARF". * config/ia64/ia64.opt (mdwarf2-asm): Likewise. * doc/extend.texi: Likewise. * doc/cpp.texi: Likewise. * doc/invoke.texi: Likewise. (Option Summary): Add -gdwarf to list of Debugging Options. (Debugging Options): Document -gdwarf. * doc/contrib.texi: Spell "DWARF" like that. From-SVN: r232647
2016-01-19Merge of HSAMartin Jambor1-0/+8
2016-01-19 Martin Jambor <mjambor@suse.cz> Martin Liska <mliska@suse.cz> Michael Matz <matz@suse.de> libgomp/ * plugin/Makefrag.am: Add HSA plugin requirements. * plugin/configfrag.ac (HSA_RUNTIME_INCLUDE): New variable. (HSA_RUNTIME_LIB): Likewise. (HSA_RUNTIME_CPPFLAGS): Likewise. (HSA_RUNTIME_INCLUDE): New substitution. (HSA_RUNTIME_LIB): Likewise. (HSA_RUNTIME_LDFLAGS): Likewise. (hsa-runtime): New configure option. (hsa-runtime-include): Likewise. (hsa-runtime-lib): Likewise. (PLUGIN_HSA): New substitution variable. Fill HSA_RUNTIME_INCLUDE and HSA_RUNTIME_LIB according to the new configure options. (PLUGIN_HSA_CPPFLAGS): Likewise. (PLUGIN_HSA_LDFLAGS): Likewise. (PLUGIN_HSA_LIBS): Likewise. Check that we have access to HSA run-time. * libgomp-plugin.h (offload_target_type): New element OFFLOAD_TARGET_TYPE_HSA. * libgomp.h (gomp_target_task): New fields firstprivate_copies and args. (bool gomp_create_target_task): Updated. (gomp_device_descr): Extra parameter of run_func and async_run_func, new field can_run_func. * libgomp_g.h (GOMP_target_ext): Update prototype. * oacc-host.c (host_run): Added a new parameter args. * target.c (calculate_firstprivate_requirements): New function. (copy_firstprivate_data): Likewise. (gomp_target_fallback_firstprivate): Use them. (gomp_target_unshare_firstprivate): New function. (gomp_get_target_fn_addr): Allow returning NULL for shared memory devices. (GOMP_target): Do host fallback for all shared memory devices. Do not pass any args to plugins. (GOMP_target_ext): Introduce device-specific argument parameter args. Allow host fallback if device shares memory. Do not remap data if device has shared memory. (gomp_target_task_fn): Likewise. Also treat shared memory devices like host fallback for mappings. (GOMP_target_data): Treat shared memory devices like host fallback. (GOMP_target_data_ext): Likewise. (GOMP_target_update): Likewise. (GOMP_target_update_ext): Likewise. Also pass NULL as args to gomp_create_target_task. (GOMP_target_enter_exit_data): Likewise. (omp_target_alloc): Treat shared memory devices like host fallback. (omp_target_free): Likewise. (omp_target_is_present): Likewise. (omp_target_memcpy): Likewise. (omp_target_memcpy_rect): Likewise. (omp_target_associate_ptr): Likewise. (gomp_load_plugin_for_device): Also load can_run. * task.c (GOMP_PLUGIN_target_task_completion): Free firstprivate_copies. (gomp_create_target_task): Accept new argument args and store it to ttask. * plugin/plugin-hsa.c: New file. gcc/ * Makefile.in (OBJS): Add new source files. (GTFILES): Add hsa.c. * common.opt (disable_hsa): New variable. (-Whsa): New warning. * config.in (ENABLE_HSA): New. * configure.ac: Treat hsa differently from other accelerators. (OFFLOAD_TARGETS): Define ENABLE_OFFLOADING according to $enable_offloading. (ENABLE_HSA): Define ENABLE_HSA according to $enable_hsa. * doc/install.texi (Configuration): Document --with-hsa-runtime, --with-hsa-runtime-include, --with-hsa-runtime-lib and --with-hsa-kmt-lib. * doc/invoke.texi (-Whsa): Document. (hsa-gen-debug-stores): Likewise. * lto-wrapper.c (compile_images_for_offload_targets): Do not attempt to invoke offload compiler for hsa acclerator. * opts.c (common_handle_option): Determine whether HSA offloading should be performed. * params.def (PARAM_HSA_GEN_DEBUG_STORES): New parameter. * builtin-types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New. (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed. (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New. * gimple-low.c (lower_stmt): Also handle GIMPLE_OMP_GRID_BODY. * gimple-pretty-print.c (dump_gimple_omp_for): Also handle GF_OMP_FOR_KIND_GRID_LOOP. (dump_gimple_omp_block): Also handle GIMPLE_OMP_GRID_BODY. (pp_gimple_stmt_1): Likewise. * gimple-walk.c (walk_gimple_stmt): Likewise. * gimple.c (gimple_build_omp_grid_body): New function. (gimple_copy): Also handle GIMPLE_OMP_GRID_BODY. * gimple.def (GIMPLE_OMP_GRID_BODY): New. * gimple.h (enum gf_mask): Added GF_OMP_PARALLEL_GRID_PHONY, GF_OMP_FOR_KIND_GRID_LOOP, GF_OMP_FOR_GRID_PHONY and GF_OMP_TEAMS_GRID_PHONY. (gimple_statement_omp_single_layout): Updated comments. (gimple_build_omp_grid_body): New function. (gimple_has_substatements): Also handle GIMPLE_OMP_GRID_BODY. (gimple_omp_for_grid_phony): New function. (gimple_omp_for_set_grid_phony): Likewise. (gimple_omp_parallel_grid_phony): Likewise. (gimple_omp_parallel_set_grid_phony): Likewise. (gimple_omp_teams_grid_phony): Likewise. (gimple_omp_teams_set_grid_phony): Likewise. (gimple_return_set_retbnd): Also handle GIMPLE_OMP_GRID_BODY. * omp-builtins.def (BUILT_IN_GOMP_OFFLOAD_REGISTER): New. (BUILT_IN_GOMP_OFFLOAD_UNREGISTER): Likewise. (BUILT_IN_GOMP_TARGET): Updated type. * omp-low.c: Include symbol-summary.h, hsa.h and params.h. (adjust_for_condition): New function. (get_omp_for_step_from_incr): Likewise. (extract_omp_for_data): Moved parts to adjust_for_condition and get_omp_for_step_from_incr. (build_outer_var_ref): Handle GIMPLE_OMP_GRID_BODY. (fixup_child_record_type): Bail out if receiver_decl is NULL. (scan_sharing_clauses): Handle OMP_CLAUSE__GRIDDIM_. (scan_omp_parallel): Do not create child functions for phony constructs. (check_omp_nesting_restrictions): Handle GIMPLE_OMP_GRID_BODY. (scan_omp_1_op): Checking assert we are not remapping to ERROR_MARK. Also also handle GIMPLE_OMP_GRID_BODY. (parallel_needs_hsa_kernel_p): New function. (expand_parallel_call): Register apprpriate parallel child functions as HSA kernels. (grid_launch_attributes_trees): New type. (grid_attr_trees): New variable. (grid_create_kernel_launch_attr_types): New function. (grid_insert_store_range_dim): Likewise. (grid_get_kernel_launch_attributes): Likewise. (get_target_argument_identifier_1): Likewise. (get_target_argument_identifier): Likewise. (get_target_argument_value): Likewise. (push_target_argument_according_to_value): Likewise. (get_target_arguments): Likewise. (expand_omp_target): Call get_target_arguments instead of looking up for teams and thread limit. (grid_expand_omp_for_loop): New function. (grid_arg_decl_map): New type. (grid_remap_kernel_arg_accesses): New function. (grid_expand_target_kernel_body): New function. (expand_omp): Call it. (lower_omp_for): Do not emit phony constructs. (lower_omp_taskreg): Do not emit phony constructs but create for them a temporary variable receiver_decl. (lower_omp_taskreg): Do not emit phony constructs. (lower_omp_teams): Likewise. (lower_omp_grid_body): New function. (lower_omp_1): Call it. (grid_reg_assignment_to_local_var_p): New function. (grid_seq_only_contains_local_assignments): Likewise. (grid_find_single_omp_among_assignments_1): Likewise. (grid_find_single_omp_among_assignments): Likewise. (grid_find_ungridifiable_statement): Likewise. (grid_target_follows_gridifiable_pattern): Likewise. (grid_remap_prebody_decls): Likewise. (grid_copy_leading_local_assignments): Likewise. (grid_process_kernel_body_copy): Likewise. (grid_attempt_target_gridification): Likewise. (grid_gridify_all_targets_stmt): Likewise. (grid_gridify_all_targets): Likewise. (execute_lower_omp): Call grid_gridify_all_targets. (make_gimple_omp_edges): Handle GIMPLE_OMP_GRID_BODY. * tree-core.h (omp_clause_code): Added OMP_CLAUSE__GRIDDIM_. (tree_omp_clause): Added union field dimension. * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__GRIDDIM_. * tree.c (omp_clause_num_ops): Added number of arguments of OMP_CLAUSE__GRIDDIM_. (omp_clause_code_name): Added name of OMP_CLAUSE__GRIDDIM_. (walk_tree_1): Handle OMP_CLAUSE__GRIDDIM_. * tree.h (OMP_CLAUSE_GRIDDIM_DIMENSION): New. (OMP_CLAUSE_SET_GRIDDIM_DIMENSION): Likewise. (OMP_CLAUSE_GRIDDIM_SIZE): Likewise. (OMP_CLAUSE_GRIDDIM_GROUP): Likewise. * passes.def: Schedule pass_ipa_hsa and pass_gen_hsail. * tree-pass.h (make_pass_gen_hsail): Declare. (make_pass_ipa_hsa): Likewise. * ipa-hsa.c: New file. * lto-section-in.c (lto_section_name): Add hsa section name. * lto-streamer.h (lto_section_type): Add hsa section. * timevar.def (TV_IPA_HSA): New. * hsa-brig-format.h: New file. * hsa-brig.c: New file. * hsa-dump.c: Likewise. * hsa-gen.c: Likewise. * hsa.c: Likewise. * hsa.h: Likewise. * toplev.c (compile_file): Call hsa_output_brig. * hsa-regalloc.c: New file. gcc/fortran/ * types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New. (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed. (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New. gcc/lto/ * lto-partition.c: Include "hsa.h" (add_symbol_to_partition_1): Put hsa implementations into the same partition as host implementations. liboffloadmic/ * plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_async_run): New unused parameter. (GOMP_OFFLOAD_run): Likewise. include/ * gomp-constants.h (GOMP_DEVICE_HSA): New macro. (GOMP_VERSION_HSA): Likewise. (GOMP_TARGET_ARG_DEVICE_MASK): Likewise. (GOMP_TARGET_ARG_DEVICE_ALL): Likewise. (GOMP_TARGET_ARG_SUBSEQUENT_PARAM): Likewise. (GOMP_TARGET_ARG_ID_MASK): Likewise. (GOMP_TARGET_ARG_NUM_TEAMS): Likewise. (GOMP_TARGET_ARG_THREAD_LIMIT): Likewise. (GOMP_TARGET_ARG_VALUE_SHIFT): Likewise. (GOMP_TARGET_ARG_HSA_KERNEL_ATTRIBUTES): Likewise. From-SVN: r232549
2016-01-11Fix docs for -frandom-seed.Yury Gribov1-1/+1
2016-01-11 Yury Gribov <y.gribov@samsung.com> PR 67425 * common.opt (frandom-seed): Fix parameter name. * doc/invoke.texi (frandom-seed): Ditto and describe parameter. From-SVN: r232209
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-12-17replace ISL with islSebastian Pop1-1/+1
From-SVN: r231784
2015-12-17Add a flag to control the balance between GNAT encodings and std. DWARFPierre-Marie de Rodat1-0/+21
In order to accomodate the debugger's support evolution for "new" DWARF constructs, we need to have an flag that controls the amount of GNAT encodings/standard DWARF information that is emitted in the debug info. Propagate this new parameter into the Ada front-end. gcc/ChangeLog: * common.opt (gnat_encodings): New variable (dwarf_gnat_encodings): New enum type. (fgnat_encodings): New option. * flag-types.h (enum dwarf_gnat_encodings): New. gcc/ada/ChangeLog: * gcc-interface/misc.c (gnat_encodings): Undefine macro and declare a global variable. (gnat_post_options): Initialize this global from options. From-SVN: r231761