aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
AgeCommit message (Collapse)AuthorFilesLines
2016-10-12gcc/Jakub Jelinek1-12/+52
* 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-10-11sparc.opt (msubxc): New option.Eric Botcazou3-23/+32
* config/sparc/sparc.opt (msubxc): New option. * doc/invoke.texi (SPARC options): Document it and tidy up. * doc/tm.texi.in (Condition Codes): Adjust SPARC example. * doc/tm.texi: Regenerate. * config/sparc/sparc-modes.def (CC_NOOV): Rename into... (CCNZ): ...this. (CCX_NOOV): Rename into... (CCXNZ): ...this. (CCC): New. (CCXC): Likewise. * config/sparc/predicates.m (fcc_register_operand): Simplify. (fcc0_register_operand): Likewise. (icc_register_operand): New. (icc_or_fcc_register_operand): Simplify. (nz_comparison_operator): New. (c_comparison_operator): Likewise. (noov_compare_operator): Rename into... (icc_comparison_operator): ...this. Use above predicates. (noov_compare64_operator): Rename into... (v9_comparison_operator): ...this and tidy up. (fcc_comparison_operator): New. (icc_or_fcc_comparison_operator): Likewise. (v9_register_compare_operator): Rename info... (v9_register_comparison_operator): ...this. * config/sparc/sparc.c (TARGET_FIXED_CONDITION_CODE_REGS): Define. (sparc_option_override): Remove redundant VIS masks and add MASK_SUBXC for Niagara-7. (sparc_fixed_condition_code_regs): New function. (select_cc_mode): Remove ATTRIBUTE_UNUSED. Adjust for CCNZ/CCXNZ renaming and add support for CCC/CCXC. (output_cbranch): Likewise. (sparc_print_operand): Likewise. (gen_v9_scc): Remove obsolete assertion. (emit_scc_insn): Emit RTL directly for EQ and NE. Add direct support for EQ in DImode if TARGET_SUBXC. Remove test on TARGET_VIS3 for GEU. (output_cbcond): Remove bogus handling of CC modes. (sparc_register_move_cost): Return 100 for NO_REGS. * config/sparc/sparc.md (W): New mode iterator. (length): Adjust for noov_compare64_operator renaming. (cmpsi_sne): New instruction. (cmpdi_sne): Likewise. (seqdi_special): Delete. (seqdi_special): Likewise. (snesi<P:mode>_special): Likewise. (snedi_special): Likewise. (snedi_special_vis3): Likewise. (snesi patterns): Use W iterator. (snedi patterns): Likewise. Add TARGET_SUBXC patterns. (sltu patterns): Likewise. (sgeu patterns): Likewise. (scc splitter): Do not split GEU in DImode if TARGET_SUBXC. (normal_branch): Use icc_comparison_operator predicate. (inverted_branch): Likewise. (cbcond_sp32): Use comparison_operator predicate. (cbcond_sp64): Likewise. (normal_int_branch_sp64): Adjust for renaming (inverted_int_branch_sp64): Likewise. (mov<I:mode>_cc_reg_sp64): Likewise. (movsf_cc_reg_sp6): Likewise. (movdf_cc_reg_sp64): Likewise. (movtf_cc_reg_hq_sp64): Likewise. (movtf_cc_reg_sp64): Likewise. (mov<I:mode>_cc_v9): Use icc_or_fcc_comparison_operator predicate. (movsf_cc_v9): Likewise. (movdf_cc_v9): Likewise. (movtf_cc_hq_v9): Likewise. (movtf_cc_v9): Likewise. (adddi3): Call gen_adddi3_sp32. (adddi3_insn_sp32): Rename to... (adddi3_sp32): ...this. Accept only register_operand as operand #1 and use CCCmode for the carry. (addx_extend_sp32): Use CCCmode for the carry. (addx_extend_sp64): Delete. (adddi3_extend_sp32): Use CCCmode for the carry. (cmp_plus patterns): Use CCNZ/CCXNZ mode and add C variants. (subdi3): Call gen_subdi3_sp32. (subdi3_insn_sp32): Rename to... (subdi3_sp32): ...this and use CCmode for the carry. (subx_extend_sp32): Use CCCmode for the carry. (subx_extend_sp64): Delete. (subdi3_extend_sp32): Use CCmode for the carry. (cmp_minus patterns): Use CCNZ/CCXNZ mode and add C variants. (negdi3): Call gen_negdi3_sp32. (negdi3_sp32): Use CCCmode for the carry. (cmp_neg patterns): Use CCNZ/CCXNZ mode and add C variants. (cmp_nz_ashift_1): Use CCNZ mode. (cmp_nz_set_ashift_1): Likewise. (ctrapsi4): Use comparison_operator predicate. (ctrapdi4): Likewise. (trapsi_insn): Use icc_comparison_operator predicate. (trapdi_insn): Likewise. (edge8 patterns): Use CCNZmode. (edge16 patterns): Likewise. (edge32 patterns): Likewise. From-SVN: r240971
2016-10-10[ARC] Disable compact casesi patterns for arcv2Claudiu Zissulescu1-2/+2
gcc/ 2016-05-09 Claudiu Zissulescu <claziss@synopsys.com> * common/config/arc/arc-common.c (arc_option_optimization_table): Remove compact casesi option. * config/arc/arc.c (arc_override_options): Use compact casesi option only for pre-ARCv2 cores. * doc/invoke.texi (mcompact-casesi): Update text. From-SVN: r240916
2016-10-09ipa-cp.c (ipcp_alignment_lattice): Remove.Prathamesh Kulkarni1-0/+1
2016-10-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> * ipa-cp.c (ipcp_alignment_lattice): Remove. (ipcp_param_lattices): Remove field alignment. (print_all_lattices): Remove call to ipcp_alignment_lattice::print. (set_all_contains_variable): Remove call to ipcp_alignment_lattice::set_to_bottom. (initialize_node_lattices): Likewise. (propagate_alignment_accross_jump_function): Remove. (propagate_constants_accross_call): Remove call to propagate_alignment_accross_jump_function. (ipcp_store_alignment_results): Remove. (ipcp_driver): Remove call to ipcp_store_alignment_results. (propagate_bits_accross_jump_function): Handle ancestor jump function. * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Remove pretty-printing of alignment jump function. (ipa_set_jf_unknown): Remove assignment to jfunc->alignment.known. (ipa_compute_jump_functions_for_edge): Adjust ipa_bits jump function for alignments and remove computing ipa_alignment jump function. (ipa_node_params_t::duplicate): Remove copying of src_trans->alignments. (ipa_write_jump_functions): Remove streaming for ipa_alignment. (ipa_read_jump_function): Remove reading of ipa_alignment. (write_ipcp_transformation_info): Remove streaming for alignment propagation summary. (read_ipcp_transformation_info): Remove reading of alignment propagation summary. (ipcp_update_alignments): Remove. (ipcp_update_bits): Adjust to set alignment for parameters of pointer type. (ipcp_transform_function): Remove call to ipcp_update_alignments() and remove assignment to (*ipcp_transformations)[node->uid].alignments. * ipa-prop.h (ipa_alignment): Remove. (ipa_jump_func): Remove field alignment. (ipcp_transformation_summary): Remove field alignments. * doc/invoke.texi: Mark fipa-cp-alignment as obsolete. * opts.c (default_options_table): Remove entry for fipa-cp-alignment. (enable_fdo_optimizations): Remove checking for fipa-cp-alignment. testsuite/ * gcc.dg/ipa/propalign-1.c: Adjust scan-ipa-dump. * gcc.dg/ipa/propalign-2.c: Likewise * gcc.dg/ipa/propalign-3.c: Likewise. * gcc.dg/ipa/propalign-4.c: Likewise. * gcc.dg/ipa/propalign-5.c: Likewise. From-SVN: r240898
2016-10-08invoke.texi: Document accepting Else, fallthrough.Jakub Jelinek1-3/+3
* doc/invoke.texi: Document accepting Else, fallthrough. * lex.c (fallthrough_comment_p): Accept Else, fallthrough. * c-c++-common/Wimplicit-fallthrough-23.c (foo): Add further tests. From-SVN: r240886
2016-10-08invoke.texi (-Wimplicit-fallthrough): Document FALLTHRU comment style changes.Jakub Jelinek1-3/+5
* doc/invoke.texi (-Wimplicit-fallthrough): Document FALLTHRU comment style changes. * lex.c (fallthrough_comment_p): Extend to handle more common FALLTHRU comment styles. * c-c++-common/Wimplicit-fallthrough-23.c (foo): Add further tests. From-SVN: r240885
2016-10-08c-lex.c (c_lex_with_flags): For CPP_COMMENT token with PREV_FALLTHROUGH...Jakub Jelinek1-4/+20
* c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT token with PREV_FALLTHROUGH, skip all following CPP_PADDING and CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards. * doc/invoke.texi (-Wimplicit-fallthrough): Document the accepted FALLTHRU comment styles. * lex.c (fallthrough_comment_p): Fix off-by-one size comparison errors, cleanup. (_cpp_lex_direct): Allow arbitrary comments in between fallthrough_comment_p comment and following token. * c-c++-common/Wimplicit-fallthrough-23.c: New test. * c-c++-common/Wimplicit-fallthrough-24.c: New test. From-SVN: r240884
2016-10-06C++17 copy elision improvements.Jason Merrill1-1/+5
* call.c (build_temp, convert_like_real): Don't re-copy TARGET_EXPR. Handle packed fields. (build_x_va_arg): Wrap it in a TARGET_EXPR. (build_over_call): Add sanity check. * cvt.c (early_elide_copy): New. (ocp_convert): Use it. * except.c (build_throw): Use it. * init.c (get_nsdmi): Put back the TARGET_EXPR. (expand_default_init): Call early_elide_copy. * typeck.c (cp_build_modify_expr): Call early_elide_copy. From-SVN: r240845
2016-10-04extend.texi (Java Exceptions): Remove.Jakub Jelinek1-44/+0
* doc/extend.texi (Java Exceptions): Remove. (java_interface): Remove. cp/ * cp-tree.h (enum cp_tree_index): Remove CPTI_JAVA_*, CPTI_LANG_NAME_JAVA and CPTI_JCLASS. (java_byte_type_node, java_short_type_node, java_int_type_node, java_long_type_node, java_float_type_node, java_double_type_node, java_char_type_node, java_boolean_type_node, lang_name_java, jclass_node): Remove. (enum languages): Remove lang_java. (TYPE_FOR_JAVA): Remove. (struct lang_type_class): Remove java_interface bit-field. (TYPE_JAVA_INTERFACE): Remove. (pragma_java_exceptions): Remove. (check_java_method, build_java_class_ref): Remove prototypes. * name-lookup.c (pushtag_1): Don't set TYPE_FOR_JAVA. * decl2.c (acceptable_java_type, check_java_method): Remove. (import_export_decl): Remove TYPE_FOR_JAVA handling. (build_java_method_aliases): Remove. (c_parse_final_cleanups): Don't call build_java_method_aliases. (possibly_inlined_p): Don't test pragma_java_exceptions. * init.c (build_new_1): Remove TYPE_FOR_JAVA handling. (build_java_class_ref): Remove. * pt.c (maybe_new_partial_specialization, lookup_template_class_1, instantiate_class_template_1): Don't copy TYPE_FOR_JAVA. * except.c (eh_type_info): Remove java type handling. (decl_is_java_type, choose_personality_routine): Remove. (initialize_handler_parm): Don't call choose_personality_routine. (expand_start_catch_block): Don't handle java types. (build_throw): Likewise. * cp-lang.c (cp_eh_personality): Don't handle pragma_java_exceptions. * typeck.c (structural_comptypes): Don't compare TYPE_FOR_JAVA. * call.c (build_over_call): Don't handle TYPE_JAVA_INTERFACE. (java_iface_lookup_fn): Remove. (build_java_interface_fn_ref): Remove. * tree.c (cxx_attribute_table): Remove java_interface. (handle_java_interface_attribute): Remove. * lex.c (pragma_java_exceptions): Remove. (init_cp_pragma): Don't register GCC java_exceptions pragma. (handle_pragma_java_exceptions): Remove. (retrofit_lang_decl): Don't handle lang_name_java. * method.c (implicitly_declare_fn): Don't handle TYPE_FOR_JAVA. * error.c (language_to_string): Don't handle lang_java. * decl.c (record_builtin_java_type): Remove. (initialize_predefined_identifiers): Remove Java. (cxx_init_decl_processing): Remove java_*_type_node. (cp_finish_decl): Don't handle TYPE_FOR_JAVA. (grokfndecl): Likewise. (check_special_function_return_type): Likewise. (grokdeclarator): Don't set TYPE_FOR_JAVA. (grokparms): Don't handle TYPE_FOR_JAVA. (xref_basetypes): Likewise. (check_function_type): Likewise. (finish_constructor_body): Likewise. * mangle.c (write_builtin_type): Don't handle TYPE_FOR_JAVA and java_*_type_node. (write_bare_function_type): Don't handle TYPE_FOR_JAVA. (write_java_integer_type_codes): Remove. * class.c (add_method): Don't handle TYPE_FOR_JAVA. (add_implicitly_declared_members, determine_key_method, finish_struct_1): Likewise. (push_lang_context): Don't handle lang_name_java. testsuite/ * g++.dg/other/java3.C: Remove. * g++.dg/other/java1.C: Remove. * g++.dg/other/error12.C: Remove. * g++.dg/other/java2.C: Remove. * g++.dg/warn/Wnvdtor.C: Remove. * g++.dg/lookup/java1.C: Remove. * g++.dg/lookup/java2.C: Remove. * g++.dg/ext/pr34829.C: Remove. * g++.dg/ext/java-3.C: Remove. * g++.dg/ext/java-1.C: Remove. * g++.dg/ext/java-2.C: Remove. * g++.old-deja/g++.oliva/dwarf2.C: Remove. From-SVN: r240750
2016-10-04defaults.h (JCR_SECTION_NAME, [...]): Remove.Jakub Jelinek2-12/+0
gcc/ * defaults.h (JCR_SECTION_NAME, TARGET_USE_JCR_SECTION): Remove. * system.h (JCR_SECTION_NAME, TARGET_USE_JCR_SECTION): Poison. * doc/tm.texi.in (TARGET_USE_JCR_SECTION): Remove. * doc/tm.texi: Regenerated. * config/i386/mingw32.h (TARGET_USE_JCR_SECTION): Remove. * config/i386/cygming.h (TARGET_USE_JCR_SECTION): Remove. * config/darwin.h (JCR_SECTION_NAME): Remove. * config/pa/pa64-hpux.h (JCR_SECTION_NAME): Remove. * config/rs6000/aix71.h (TARGET_USE_JCR_SECTION): Remove. * config/rs6000/aix51.h (TARGET_USE_JCR_SECTION): Remove. * config/rs6000/aix52.h (TARGET_USE_JCR_SECTION): Remove. * config/rs6000/aix53.h (TARGET_USE_JCR_SECTION): Remove. * config/rs6000/aix61.h (TARGET_USE_JCR_SECTION): Remove. gcc/c-family/ * c-cppbuiltin.c (c_cpp_builtins): Don't define __LIBGCC_JCR_SECTION_NAME__. libgcc/ * config/i386/cygming-crtbegin.c (_Jv_RegisterClasses): Remove. (__JCR_LIST__): Remove. (__gcc_register_frame): Don't attempt to _Jv_RegisterClasses. * config/i386/cygming-crtend.c (__JCR_END__): Remove. * config/ia64/crtbegin.S (__JCR_LIST__): Remove. * config/ia64/crtend.S (__JCR_END__): Remove. * crtstuff.c: Remove __LIBGCC_JCR_SECTION_NAME__ from preprocessor conditionals. (__JCR_LIST__, __JCR_END__): Remove. (frame_dummy): Don't attempt to _Jv_RegisterClasses. (__do_global_ctors_1): Likewise. From-SVN: r240739
2016-10-03invoke.texi: Update -Wint-in-bool-context.Bernd Edlinger1-1/+2
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de> * doc/invoke.texi: Update -Wint-in-bool-context. c-family: 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de> * c-common.c (c_common_truthvalue_conversion): Warn for suspicious left shift in boolean context. cp: 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de> * parser.c (cp_parser_condition): Fix a warning. testsuite: 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de> * c-c++-common/Wint-in-bool-context.c: Update test. From-SVN: r240706
2016-10-01* doc/invoke.texi (-Wregister): Document.Jakub Jelinek1-1/+10
From-SVN: r240685
2016-09-30Enhance documentation of asan-use-after-return param.Martin Liska1-0/+4
* doc/invoke.texi: Document asan-use-after-return that it's disabled by default in runtime. From-SVN: r240648
2016-09-29objc: update documetation and add test-case ofMartin Liska1-2/+0
* doc/extend.texi: Remove limitation of Objective C for __attribute__((constructor)) and __attribute__((destructor)). * objc/execute/construct1.m: New test. From-SVN: r240618
2016-09-29[RS6000] .gnu.attributes Tag_GNU_Power_ABI_FPAlan Modra1-0/+9
Extend this attribute to cover long double ABIs, for 64-bit too. This patch also corrects an error that crept in to code setting rs6000_passes_float. See the added comment. Passing IEEE128 values in vsx regs ought to set both Tag_GNU_Power_ABI_FP and Tag_GNU_Power_ABI_Vector. Also adds a new option, default on, that disables output of .gnu_attribute assembly directives. * config/rs6000/sysv4.opt (mgnu-attribute): New option. * doc/invoke.texi: Document it. * config/rs6000/rs6000.c (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE): Define. (rs6000_passes_float): Comment. (rs6000_passes_long_double): New static var. (call_ABI_of_interest): Return false unless rs6000_gnu_attr is set. (init_cumulative_args): Set up to emit fp .gnu_attribute for ELF 64-bit ABIs as well as 32-bit ELF. Correct rs6000_passes_float to include fp values returned in vectors. Set rs6000_passes_long_double. (rs6000_function_arg_advance_1): Likewise for function args. (rs6000_elf_file_end): Emit fp .gnu_attribute for ELF 64-bit ABIs, and SPE. Emit long double tag value too. (rs6000_opt_vars): Add gnu-attr. * configure.ac (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE): New ppc32 test. * configure: Regenerate. * config.in: Regenerate. From-SVN: r240601
2016-09-27MIPS/GCC/doc: Fix `d' constraint descriptionMaciej W. Rozycki1-2/+2
Revert a part of the `d' constraint documentation update made with commit 111868 ("Use define_constraint for MIPS"), <https://gcc.gnu.org/ml/gcc-patches/2006-03/msg00460.html>, <https://gcc.gnu.org/ml/gcc-patches/2006-03/msg00541.html>, which inadvertently made the registers covered to be referred to as "address" rather than "general-purpose" registers, and then further clarify the set of registers allowed with MIPS16 code. * config/mips/constraints.md (d): Fix documentation. * doc/md.texi (Machine Constraints): Update accordingly. From-SVN: r240546
2016-09-27gcov: dump in a static dtor instead of in an atexit handlerMartin Liska1-0/+4
PR gcov-profile/7970 PR gcov-profile/16855 PR gcov-profile/44779 * g++.dg/gcov/pr16855.C: New test. * coverage.c (build_gcov_exit_decl): New function. (coverage_obj_init): Call the function and generate __gcov_exit destructor. * doc/gcov.texi: Document when __gcov_exit function is called. * libgcov-driver.c (__gcov_init): Do not register a atexit handler. (__gcov_exit): Rename from gcov_exit. * libgcov.h (__gcov_exit): Declare. From-SVN: r240529
2016-09-26Fix documentation of gcov toolMartin Liska1-7/+9
* doc/gcov.texi: Update program output of gcov tool. From-SVN: r240494
2016-09-26Fix handling of -fsanitize-recover* options.Martin Liska1-5/+9
* 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-26target.def (elf_flags_numeric): Change documentation to present tense.Andre Vieira1-4/+4
2016-09-26 Andre Vieira <andre.simoesdiasvieira@arm.com> * target.def(elf_flags_numeric): Change documentation to present tense. * doc/tm.texi: Regenerate. From-SVN: r240490
2016-09-26Implement -Wimplicit-fallthrough.Marek Polacek2-7/+146
Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r240485
2016-09-24re PR c/77490 (bit-not (~) on boolean should be warned about)Marek Polacek1-2/+14
PR c/77490 * c.opt (Wbool-operation): New. * c-typeck.c (build_unary_op): Warn about bit not on expressions that have boolean value. Warn about ++/-- on booleans. * typeck.c (cp_build_unary_op): Warn about bit not on expressions that have boolean value. * doc/invoke.texi: Document -Wbool-operation. * c-c++-common/Wbool-operation-1.c: New test. * gcc.dg/Wbool-operation-1.c: New test. From-SVN: r240462
2016-09-23[PATCH 3/17][Testsuite] Add ARM support for ARMv8.2-A with FP16 arithmetic ↵Matthew Wahab1-0/+40
instructions. gcc/ 2016-09-23 Matthew Wahab <matthew.wahab@arm.com> * doc/sourcebuild.texi (ARM-specific attributes): Add anchor for arm_v8_1a_neon_ok. Add entries for arm_v8_2a_fp16_scalar_ok, arm_v8_2a_fp16_scalar_hw, arm_v8_2a_fp16_neon_ok and arm_v8_2a_fp16_neon_hw. (Add options): Add entries for arm_v8_1a_neon, arm_v8_2a_scalar, arm_v8_2a_neon. testsuite/ 2016-09-23 Matthew Wahab <matthew.wahab@arm.com> * lib/target-supports.exp (add_options_for_arm_v8_2a_fp16_scalar): New. (add_options_for_arm_v8_2a_fp16_neon): New. (check_effective_target_arm_arch_v8_2a_ok): Auto-generate. (add_options_for_arm_arch_v8_2a): Auto-generate. (check_effective_target_arm_arch_v8_2a_multilib): Auto-generate. (check_effective_target_arm_v8_2a_fp16_scalar_ok_nocache): New. (check_effective_target_arm_v8_2a_fp16_scalar_ok): New. (check_effective_target_arm_v8_2a_fp16_neon_ok_nocache): New. (check_effective_target_arm_v8_2a_fp16_neon_ok): New. (check_effective_target_arm_v8_2a_fp16_scalar_hw): New. (check_effective_target_arm_v8_2a_fp16_neon_hw): New. From-SVN: r240401
2016-09-23[PATCH 2/17][Testsuite] Add a selector for ARM FP16 alternative format support.Matthew Wahab1-0/+7
2016-09-23 Matthew Wahab <matthew.wahab@arm.com> * doc/sourcebuild.texi (ARM-specific attributes): Add entries for arm_fp16_alternative_ok and arm_fp16_none_ok. testsuite/ 2016-09-23 Matthew Wahab <matthew.wahab@arm.com> * g++.dg/ext/arm-fp16/arm-fp16-ops-3.C: Use arm_fp16_alternative_ok. * g++.dg/ext/arm-fp16/arm-fp16-ops-4.C: Likewise. * gcc.dg/torture/arm-fp16-int-convert-alt.c: Likewise. * gcc/testsuite/gcc.dg/torture/arm-fp16-ops-3.c: Likewise. * gcc/testsuite/gcc.dg/torture/arm-fp16-ops-4.c: Likewise. * gcc.target/arm/fp16-compile-alt-1.c: Likewise. * gcc.target/arm/fp16-compile-alt-10.c: Likewise. * gcc.target/arm/fp16-compile-alt-11.c: Likewise. * gcc.target/arm/fp16-compile-alt-12.c: Likewise. * gcc.target/arm/fp16-compile-alt-2.c: Likewise. * gcc.target/arm/fp16-compile-alt-3.c: Likewise. * gcc.target/arm/fp16-compile-alt-4.c: Likewise. * gcc.target/arm/fp16-compile-alt-5.c: Likewise. * gcc.target/arm/fp16-compile-alt-6.c: Likewise. * gcc.target/arm/fp16-compile-alt-7.c: Likewise. * gcc.target/arm/fp16-compile-alt-8.c: Likewise. * gcc.target/arm/fp16-compile-alt-9.c: Likewise. * gcc.target/arm/fp16-compile-none-1.c: Use arm_fp16_none_ok. * gcc.target/arm/fp16-compile-none-2.c: Likewise. * gcc.target/arm/fp16-rounding-alt-1.c: Use arm_fp16_alternative_ok. * lib/target-supports.exp (check_effective_target_arm_fp16_alternative_ok_nocache): New. (check_effective_target_arm_fp16_alternative_ok): New. (check_effective_target_arm_fp16_none_ok_nocache): New. (check_effective_target_arm_fp16_none_ok): New. From-SVN: r240400
2016-09-23[PATCH 1/17][ARM] Add ARMv8.2-A command line option and profile.Matthew Wahab1-0/+13
2016-09-23 Matthew Wahab <matthew.wahab@arm.com> * config/arm/arm-arches.def ("armv8.1-a"): Add FL_CRC32. ("armv8.2-a"): New. ("armv8.2-a+fp16"): New. * config/arm/arm-protos.h (FL2_ARCH8_2): New. (FL2_FP16INST): New. (FL2_FOR_ARCH8_2A): New. * config/arm/arm-tables.opt: Regenerate. * config/arm/arm.c (arm_arch8_2): New. (arm_fp16_inst): New. (arm_option_override): Set arm_arch8_2 and arm_fp16_inst. Check for incompatible fp16-format settings. * config/arm/arm.h (TARGET_VFP_FP16INST): New. (TARGET_NEON_FP16INST): New. (arm_arch8_2): Declare. (arm_fp16_inst): Declare. * config/arm/bpabi.h (BE8_LINK_SPEC): Add entries for march=armv8.2-a and march=armv8.2-a+fp16. * config/arm/t-aprofile (Arch Matches): Add entries for armv8.2-a and armv8.2-a+fp16. * doc/invoke.texi (ARM Options): Add "-march=armv8.1-a", "-march=armv8.2-a" and "-march=armv8.2-a+fp16". From-SVN: r240398
2016-09-23Remove fused-madd from documentationMartin Liska1-5/+0
* doc/extend.texi: Remove fused-madd from i386 target options. From-SVN: r240395
2016-09-22[ARM] Add support for -mpure-code optionAndre Vieira3-1/+24
gcc/ChangeLog: 2016-09-22 Andre Vieira <andre.simoesdiasvieira@arm.com> Terry Guo <terry.guo@arm.com> * target.def (elf_flags_numeric): New target hook. * targhooks.h (default_asm_elf_flags_numeric): New. * varasm.c (default_asm_elf_flags_numeric): New. (default_elf_asm_named_section): Use new target hook. * config/arm/arm.opt (mpure-code): New. * config/arm/arm.h (SECTION_ARM_PURECODE): New. * config/arm/arm.c (arm_asm_init_sections): Add section attribute to default text section if -mpure-code. (arm_option_check_internal): Diagnose use of option with non supported targets and/or options. (arm_asm_elf_flags_numeric): New. (arm_function_section): New. (arm_elf_section_type_flags): New. * config/arm/elf.h (JUMP_TABLES_IN_TEXT_SECTION): Disable for -mpure-code. * gcc/doc/texi (TARGET_ASM_ELF_FLAGS_NUMERIC): New. * gcc/doc/texi.in (TARGET_ASM_ELF_FLAGS_NUMERIC): Likewise. gcc/testsuite/ChangeLog: 2016-09-22 Andre Vieira <andre.simoesdiasvieira@arm.com> Terry Guo <terry.guo@arm.com> * gcc.target/arm/pure-code/ffunction-sections.c: New. * gcc.target/arm/pure-code/no-literal-pool.c: New. * gcc.target/arm/pure-code/pure-code.exp: New. Co-Authored-By: Terry Guo <terry.guo@arm.com> From-SVN: r240379
2016-09-21Fix JUMP_LABEL documentationSegher Boessenkool1-2/+2
* doc/rtl.texi (JUMP_LABEL): Document RETURN and SIMPLE_RETURN values. From-SVN: r240325
2016-09-20PR middle-end/49905 - Better sanity checking on sprintf src & dest toMartin Sebor3-2/+115
gcc/ChangeLog: PR middle-end/49905 * Makefile.in (OBJS): Add gimple-ssa-sprintf.o. * config/linux.h (TARGET_PRINTF_POINTER_FORMAT): Redefine. * config/linux.c (gnu_libc_printf_pointer_format): New function. * config/sol2.h (TARGET_PRINTF_POINTER_FORMAT): Same. * config/sol2.c (solaris_printf_pointer_format): New function. * doc/invoke.texi (-Wformat-length, -fprintf-return-value): New options. * doc/tm.texi.in (TARGET_PRINTF_POINTER_FORMAT): Document. * doc/tm.texi: Regenerate. * gimple-fold.h (get_range_strlen): New function. (get_maxval_strlen): Declare existing function. * gimple-fold.c (get_range_strlen): Add arguments and compute both maximum and minimum. (get_range_strlen): Define overload. (get_maxval_strlen): Adjust. * gimple-ssa-sprintf.c: New file and pass. * passes.def (pass_sprintf_length): Add new pass. * targhooks.h (default_printf_pointer_format): Declare new function. (gnu_libc_printf_pointer_format): Same. (solaris_libc_printf_pointer_format): Same. * targhooks.c (default_printf_pointer_format): Define new function. * tree-pass.h (make_pass_sprintf_length): Declare new function. * print-tree.c: Increase buffer size. gcc/c-family/ChangeLog: PR middle-end/49905 * c.opt: Add -Wformat-length and -fprintf-return-value. gcc/testsuite/ChangeLog: PR middle-end/49905 * gcc.dg/builtin-stringop-chk-1.c: Adjust. * gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: New test. * gcc.dg/tree-ssa/builtin-sprintf-warn-2.c: New test. * gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: New test. * gcc.dg/tree-ssa/builtin-sprintf-warn-4.c: New test. * gcc.dg/tree-ssa/builtin-sprintf.c: New test. * gcc.dg/tree-ssa/builtin-sprintf-2.c: New test. From-SVN: r240298
2016-09-20Add Early VRPKugan Vivekanandarajah1-0/+5
gcc/ChangeLog: 2016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org> * doc/invoke.texi: Document -fdump-tree-evrp. * passes.def: Define new pass_early_vrp. * timevar.def: Define new TV_TREE_EARLY_VRP. * tree-pass.h (make_pass_early_vrp): New. * tree-ssa-propagate.c: Make replace_uses_in non static. * tree-ssa-propagate.h: Export replace_uses_in. * tree-vrp.c (extract_range_for_var_from_comparison_expr): New. (extract_range_from_assert): Factor out extract_range_for_var_from_comparison_expr. (vrp_initialize_lattice): New. (vrp_initialize): Factor out vrp_initialize_lattice. (vrp_valueize): Fix it to reject complex value ranges. (vrp_free_lattice): New. (evrp_dom_walker::before_dom_children): Likewise. (evrp_dom_walker::after_dom_children): Likewise. (evrp_dom_walker::push_value_range): Likewise. (evrp_dom_walker::pop_value_range): Likewise. (execute_early_vrp): Likewise. (execute_vrp): Call vrp_initialize_lattice and vrp_free_lattice. (make_pass_early_vrp): New. gcc/testsuite/ChangeLog: 2016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org> * g++.dg/tree-ssa/pr31146-2.C: Run with -fno-tree-evrp as evrp also does the same transformation. * g++.dg/warn/pr33738.C: XFAIL as optimization now happens in ccp. * gcc.dg/tree-ssa/evrp1.c: New test. * gcc.dg/tree-ssa/evrp2.c: New test. * gcc.dg/tree-ssa/evrp3.c: New test. * gcc.dg/tree-ssa/pr20657.c: Check for the pattern in evrp dump. * gcc.dg/tree-ssa/pr22117.c: Likewise. * gcc.dg/tree-ssa/pr61839_2.c: Likewise. * gcc.dg/tree-ssa/pr64130.c: Likewise. * gcc.dg/tree-ssa/pr37508.c: Change the pattern to be checked as foling now happens early. * gcc.dg/tree-ssa/vrp04.c: Likewise. * gcc.dg/tree-ssa/vrp06.c: Likewise. * gcc.dg/tree-ssa/vrp16.c: Likewise. * gcc.dg/tree-ssa/vrp25.c: Likewise. * gcc.dg/tree-ssa/vrp67.c: Likewise. From-SVN: r240291
2016-09-20invoke.texi (Warning Options): Simplify language.Gerald Pfeifer1-5/+5
* doc/invoke.texi (Warning Options): Simplify language. (Optimize Options): Complete sentence. From-SVN: r240274
2016-09-19re PR c++/77434 (warn about suspicious precedence of ternary operator (?:))Bernd Edlinger1-1/+10
gcc: 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c++/77434 * doc/invoke.texi: Document -Wint-in-bool-context. c-family: 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c++/77434 * c.opt (Wcond-in-bool-context): New warning. * c-common.c (c_common_truthvalue_conversion): Warn on integer constants in boolean context. cp: 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c++/77434 * cvt.c (cp_convert_and_check): Suppress Wint-in-bool-context here. testsuite: 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c++/77434 * c-c++-common/Wint-in-bool-context.c: New test. From-SVN: r240251
2016-09-19Fix lra_p textSegher Boessenkool1-1/+1
* target.def (lra_p): Wordsmithing. * doc/tm.texi: Regenerate. From-SVN: r240236
2016-09-16Fix documentation for overflow-checking builtinsJonathan Wakely1-6/+6
* doc/extend.texi (Integer Overflow Builtins): Fix type of out parameters for functions taking long long arguments. From-SVN: r240200
2016-09-15dwarf2asm.h (dw2_asm_output_offset): Add overload with extra offset argument.Richard Biener2-6/+8
2016-09-15 Richard Biener <rguenther@suse.de> * dwarf2asm.h (dw2_asm_output_offset): Add overload with extra offset argument. * dwarf2asm.c (dw2_asm_output_offset): Implement that. * doc/tm.texi.in (ASM_OUTPUT_DWARF_OFFSET): Adjust documentation to reflect new offset parameter. * doc/tm.texi: Regenerate. * config/darwin.h (ASM_OUTPUT_DWARF_OFFSET): Adjust. * config/darwin-protos.h (darwin_asm_output_dwarf_delta): Add offset argument. (darwin_asm_output_dwarf_offset): Likewise. * config/darwin.c (darwin_asm_output_dwarf_delta): Add offset argument. (darwin_asm_output_dwarf_offset): Pass offset argument through. * config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): Adjust. * config/i386/cygmin.h (ASM_OUTPUT_DWARF_OFFSET): Likewise. From-SVN: r240158
2016-09-14Fix TARGET_LRA_P descriptionSegher Boessenkool1-1/+1
2016-09-14 Segher Boessenkool <segher@kernel.crashing.org> * target.def (lra_p): Change commentary (for the manual) for the new default. * doc/tm.texi: Regenerate. From-SVN: r240133
2016-09-12extend.texi: Use lowercase "boolean".Marek Polacek4-8/+8
* doc/extend.texi: Use lowercase "boolean". * doc/invoke.texi: Likewise. * doc/md.texi: Likewise. * target.def: Likewise. * doc/tm.texi: Regenerated. From-SVN: r240091
2016-09-09tm.texi.in (INITIAL_FRAME_POINTER_OFFSET): Remove.Bernd Edlinger2-49/+16
2016-09-10 Bernd Edlinger <bernd.edlinger@hotmail.de> * doc/tm.texi.in (INITIAL_FRAME_POINTER_OFFSET): Remove. (ELIMINABLE_REGS, TARGET_CAN_ELIMINATE, INITIAL_ELIMINATION_OFFSET) : Update documentation. * target.def (frame_pointer_required, can_eliminate): Likewise. * doc/tm.texi: Regenerated. * builtins.c (expand_builtin_setjmp_receiver): Remove #ifdef ELIMINABLE_REGS. * df-scan.c (df_hard_reg_init): Likewise. * ira.c (ira_setup_eliminable_regset): Likewise. * lra-eliminations.c (reg_eliminate_1, (update_reg_eliminate, init_elim_table): Likewise. * reload1.c (reg_eliminate_1, verify_initial_elim_offsets, set_initial_elim_offsets, update_eliminables, init_elim_table): Likewise. * rtlanal.c (get_initial_register_offset): Likewise. * config/ft32/ft32.h (INITIAL_FRAME_POINTER_OFFSET): Remove. * config/m32r/m32r.h (INITIAL_FRAME_POINTER_OFFSET): Likewise. * config/moxie/moxie.h (INITIAL_FRAME_POINTER_OFFSET): Likewise. * config/vax/vax.h (INITIAL_FRAME_POINTER_OFFSET): Likewise. * config/fr30/fr30.h: Fix comment. * config/frv/frv.c: Likewise. * config/frv/frv.h: Likewise. * config/ft32/ft32.h: Likewise. * config/visium/visium.h: Likewise. * config/pa/pa64-linux.h: Likewise. * config/v850/v850.h: Likewise. * config/cris/cris.c: Likewise. * config/ia64/ia64.h: Likewise. * config/moxie/moxie.h: Likewise. * config/m32r/m32r.h: Likewise. From-SVN: r240058
2016-09-09Implement P0035R4, C++17 new of over-aligned types.Jason Merrill1-1/+22
gcc/cp/ * cp-tree.h (enum cp_tree_index): Add CPTI_ALIGN_TYPE. (align_type_node): New macro. * call.c (build_operator_new_call): Handle C++17 aligned new. (second_parm_is_size_t, build_op_delete_call): Likewise. (non_placement_deallocation_fn_p): Likewise. Rename to usual_deallocation_fn_p. (aligned_allocation_fn_p, aligned_deallocation_fn_p): New. * decl.c (cxx_init_decl_processing): Add aligned new support. * init.c (type_has_new_extended_alignment): New. (build_new_1): Handle aligned new. * tree.c (vec_copy_and_insert): New. gcc/c-family/ * c.opt: Add -faligned-new and -Waligned-new. * c-common.c (max_align_t_align): Split out from... (cxx_fundamental_alignment_p): ...here. * c-common.h: Declare it. * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new. libstdc++-v3/ * libsupc++/new: Declare aligned new/delete operators. * config/abi/pre/gnu.ver: Export them. * configure.ac: Check for aligned_alloc, posix_memalign, memalign, _aligned_malloc. * libsupc++/new_opa.cc: New. * libsupc++/new_opant.cc: New. * libsupc++/new_opva.cc: New. * libsupc++/new_opva.cc: New. * libsupc++/del_opa.cc: New. * libsupc++/del_opant.cc: New. * libsupc++/del_opsa.cc: New. * libsupc++/del_opva.cc: New. * libsupc++/del_opvant.cc: New. * libsupc++/del_opvsa.cc: New. * libsupc++/Makefile.am: Build them. From-SVN: r240056
2016-09-09cpp.texi (__*_WIDTH__): Small wording fixes.Bernd Edlinger1-2/+2
2016-09-09 Bernd Edlinger <bernd.edlinger@hotmail.de> * doc/cpp.texi (__*_WIDTH__): Small wording fixes. From-SVN: r240051
2016-09-09Define TS 18661-1 type width macros in <limits.h> and <stdint.h>.Joseph Myers1-0/+27
TS 18661-1 defines <limits.h> and <stdint.h> macros for widths of standard integer types and the typedefs defined in, or whose limits are defined in, <stdint.h>. (The connection to the main floating-point subject matter of TS 18661-1 is that these are intended to be used with the fromfp functions to convert from floating point to integer types of any width in any rounding direction, though these macros may be of more general use.) This patch implements support for these macros in GCC's <limits.h> and <stdint.h>. To avoid needing to implement fixincludes for system headers where GCC wraps the system libc's <stdint.h> in hosted mode, the test for the <stdint.h> macros uses -ffreestanding (I'll add the macros to glibc's headers separately) - but as usual for new features in these headers, platforms (primarily OpenBSD) that use USER_H to avoid using GCC's headers at all will have failures until the system headers have the feature added or appropriate fixincludes are implemented. The header macros are implemented using appropriate new predefined macros, with the code avoiding defining more such macros than necessary (so one predefined macro suffices for corresponding signed and unsigned types, while no such predefined macros are needed for the exact-width types such as int8_t). Bootstrapped with no regressions on x86_64-pc-linux-gnu. gcc: * doc/cpp.texi (__SCHAR_WIDTH__, __SHRT_WIDTH__, __INT_WIDTH__) (__LONG_WIDTH__, __LONG_LONG_WIDTH__, __PTRDIFF_WIDTH__) (__SIG_ATOMIC_WIDTH__, __SIZE_WIDTH__, __WCHAR_WIDTH__) (__WINT_WIDTH__, __INT_LEAST8_WIDTH__, __INT_LEAST16_WIDTH__) (__INT_LEAST32_WIDTH__, __INT_LEAST64_WIDTH__) (__INT_FAST8_WIDTH__, __INT_FAST16_WIDTH__, __INT_FAST32_WIDTH__) (__INT_FAST64_WIDTH__, __INTPTR_WIDTH__, __INTMAX_WIDTH__): Document. * ginclude/stdint-gcc.h [__STDC_WANT_IEC_60559_BFP_EXT__]: Define width macros from TS 18661-1. * glimits.h [__STDC_WANT_IEC_60559_BFP_EXT__]: Likewise. gcc/c-family: * c-cppbuiltin.c (builtin_define_type_width): New function. (builtin_define_stdint_macros, c_cpp_builtins): Define type width macros. gcc/testsuite: * gcc.dg/limits-width-1.c, gcc.dg/stdint-width-1.c: New tests. From-SVN: r240048
2016-09-05invoke.texi (SPU Options): nops -> NOPs.Gerald Pfeifer1-5/+5
* doc/invoke.texi (SPU Options): nops -> NOPs. (x86 Options): Ditto. From-SVN: r239995
2016-09-05re PR c/77423 (-Wlogical-not-parentheses false positive for bitwise ↵Marek Polacek1-2/+2
expression with _Bool operands) PR c/77423 * doc/invoke.texi: Update -Wlogical-not-parentheses documentation. * c-common.c (bool_promoted_to_int_p): New function. (expr_has_boolean_operands_p): New function. (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p. (maybe_warn_bool_compare): Use bool_promoted_to_int_p. * c-c++-common/Wlogical-not-parentheses-3.c: New test. From-SVN: r239988
2016-09-02Add -fdiagnostics-generate-patchDavid Malcolm1-1/+22
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-09-02Introduce class edit_contextDavid Malcolm1-1/+19
gcc/ChangeLog: * Makefile.in (OBJS-libcommon): Add edit-context.o. * diagnostic-color.c (color_dict): Add "diff-filename", "diff-hunk", "diff-delete", and "diff-insert". (parse_gcc_colors): Update default value of GCC_COLORS in comment to reflect above changes. * doc/invoke.texi (-fdiagnostics-color): Update description of default GCC_COLORS, and of the supported capabilities. * edit-context.c: New file. * edit-context.h: New file. * input.c (struct fcache): Add field "missing_trailing_newline". (diagnostics_file_cache_forcibly_evict_file): Initialize it to true. (add_file_to_cache_tab): Likewise. (fcache::fcache): Likewise. (get_next_line): Update c->missing_trailing_newline. (location_missing_trailing_newline): New function. * input.h (location_missing_trailing_newline): New decl. * selftest-run-tests.c (selftest::run_tests): Call edit_context_c_tests. * selftest.h (edit_context_c_tests): New decl. libcpp/ChangeLog: * include/line-map.h (rich_location::seen_impossible_fixit_p): New accessor. From-SVN: r239963
2016-09-01PR tree-optimization/71831 - __builtin_object_size poor results with noMartin Sebor1-2/+9
PR tree-optimization/71831 - __builtin_object_size poor results with no optimization gcc/testsuite/ChangeLog: PR tree-optimization/71831 * gcc.dg/builtin-object-size-16.c: New test. * gcc.dg/builtin-object-size-17.c: New test. gcc/ChangeLog: PR tree-optimization/71831 * tree-object-size.h: Return bool instead of the size and add argument for the size. * tree-object-size.c (compute_object_offset): Update signature. (addr_object_size): Same. (compute_builtin_object_size): Return bool instead of the size and add argument for the size. Handle POINTER_PLUS_EXPR when optimization is disabled. (expr_object_size): Adjust. (plus_stmt_object_size): Adjust. (pass_object_sizes::execute): Adjust. * builtins.c (fold_builtin_object_size): Adjust. * doc/extend.texi (Object Size Checking): Update. * ubsan.c (instrument_object_size): Adjust. From-SVN: r239953
2016-08-27extend.texi (SPU Built-in Functions): Remove stale references to material ↵Gerald Pfeifer1-3/+1
formerly at IBM and Sony. * doc/extend.texi (SPU Built-in Functions): Remove stale references to material formerly at IBM and Sony. From-SVN: r239797
2016-08-26Tweak to colors of fix-it hintsDavid Malcolm1-7/+21
Previous, fix-it hints were printed using the color of the severity of the diagnostic (magenta for warnings, red for errors, cyan for notes). This patch updates fix-it hints so that replacement text is printed in green, to better distinguish the suggested improvement from the current code. For example: spellcheck-fields.cc:52:13: error: 'struct s' has no member named 'colour'; did you mean 'color'? return ptr->colour; <<< RED ^~~~~~ <<< RED color <<< GREEN It makes sense for the underlinings that indicate deletions to be printed in red, so the patch changes that also. For example: diagnostic-test-show-locus-color.c:179:9: warning: example of a removal hint int a;; <<< MAGENTA ^ <<< MAGENTA - <<< RED gcc/ChangeLog: * diagnostic-color.c (color_dict): Add "fixit-insert" and "fixit-delete". (parse_gcc_colors): Update description of default GCC_COLORS. * diagnostic-show-locus.c (colorizer::set_fixit_hint): Delete. (colorizer::set_fixit_insert): New method. (colorizer::set_fixit_delete): New method. (colorizer::get_color_by_name): New method. (colorizer::STATE_FIXIT_INSERT): New constant. (colorizer::STATE_FIXIT_DELETE): New constant. (class colorizer): Drop "_cs" suffix from fields. Delete "_ce" fields in favor of new field "m_stop_color". Add fields "m_fixit_insert" and "m_fixit_delete". (colorizer::colorizer): Update for above changes. Replace colorize_start calls with calls to get_color_by_name. (colorizer::begin_state): Handle STATE_FIXIT_INSERT and STATE_FIXIT_DELETE. Update for field renamings. (colorizer::finish_state): Simplify by using m_stop_color, rather than multiple identical "*_ce" fields. (colorizer::get_color_by_name): New method. (layout::print_any_fixits): Print insertions and replacements using the "fixit-insert" color, and deletions using the "fixit-delete" color. * doc/invoke.texi (-fdiagnostics-color): Update description of default GCC_COLORS, and of the supported capabilities. gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic-test-show-locus-color.c (test_fixit_insert): Update expected output. (test_fixit_remove): Likewise. (test_fixit_replace): Likewise. From-SVN: r239787
2016-08-26Patch for performing interprocedural bitwise constant propagation.Prathamesh Kulkarni1-1/+8
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-24fragments.texi (MULTILIB_REUSE): Mention that only options in ↵Thomas Preud'homme1-9/+10
MULTILIB_OPTIONS should be used. 2016-08-24 Thomas Preud'homme <thomas.preudhomme@arm.com> * doc/fragments.texi (MULTILIB_REUSE): Mention that only options in MULTILIB_OPTIONS should be used. Small wording fixes. * genmultilib: Memorize set of all option combinations in combination_space. Detect if RHS of MULTILIB_REUSE uses an option not found in MULTILIB_OPTIONS by checking if option set is listed in combination_space. Output new and existing error message to stderr. From-SVN: r239734