1. 29 Jul, 2017 11 commits
    • use c++ for build_tree_list{,_vec}_stat · 623ee285
      gcc/ChangeLog:
      
      2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
      
      	* tree.c (build_tree_list_vec_stat): Remove _stat from name.
      	(build_tree_list_stat): Likewise.
      	* tree.h (build_tree_list): Remove macro.
      	(build_tree_list_vec): Likewise.
      
      From-SVN: r250706
      Trevor Saunders committed
    • use C++ for {make,build}_vector_stat · 7488a79f
      gcc/ChangeLog:
      
      2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
      
      	* tree.c (make_vector_stat): Remove _stat from name.
      	(build_vector_stat): Likewise.
      	* tree.h (make_vector_stat): Remove macro.
      	(build_vector_stat): Likewise.
      
      From-SVN: r250705
      Trevor Saunders committed
    • use c++ for tree_cons_stat · 126d0cd4
      gcc/ChangeLog:
      
      2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
      
      	* tree.c (tree_cons_stat): Remove _stat from name.
      	* tree.h (tree_cons): Remove macro.
      
      From-SVN: r250703
      Trevor Saunders committed
    • use c++ instead of build_vl_exp_stat · 7aa717c1
      gcc/ChangeLog:
      
      2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
      
      	* tree.c (build_vl_exp_stat): Remove _stat from name.
      	* tree.h (build_vl_exp): Remove macro.
      
      From-SVN: r250702
      Trevor Saunders committed
    • use c++ instead of build_decl_stat · 31b8d81f
      gcc/ChangeLog:
      
      2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
      
      	* tree.c (build_decl_stat): Remove _stat from name.
      	* tree.h (build_decl): Remove macro.
      
      From-SVN: r250701
      Trevor Saunders committed
    • use c++ instead of {make,grow}_tree_vec_stat · 9f896a45
      gcc/ChangeLog:
      
      2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
      
      	* tree.c (make_tree_vec_stat): Remove _stat from name.
      	(grow_tree_vec_stat): Likewise.
      	* tree.h (make_tree_vec_stat): Adjust prototype.
      	(grow_tree_vec_stat): Likewise.
      	(make_tree_vec): Remove macro.
      	(grow_tree_vec): Likewise.
      
      From-SVN: r250699
      Trevor Saunders committed
    • use c++ instead of buildN_stat{,_loc} · 6db60760
      gcc/ChangeLog:
      
      2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
      
      	* fold-const.c (fold_build1_stat_loc): Adjust.
      	(fold_build2_stat_loc): Likewise.
      	(fold_build3_stat_loc): Likewise.
      	* tree.c (build0_stat): Remove _stat from name.
      	(build1_stat): Likewise.
      	(build2_stat): Likewise.
      	(build3_stat): Likewise.
      	(build4_stat): Likewise.
      	(build5_stat): Likewise.
      	* tree.h (build1_loc): Remove macro, and rename _stat function
      	to this.
      	(build2_loc): Likewise.
      	(build3_loc): Likewise.
      	(build4_loc): Likewise.
      	(build5_loc): Likewise.
      
      From-SVN: r250698
      Trevor Saunders committed
    • use c++ for make_int_cst_stat · 4bd2de4b
      gcc/ChangeLog:
      
      2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
      
      	* tree.c (make_int_cst_stat): Remove _stat from name.
      	* tree.h (make_int_cst_stat): Adjust prototype.
      	(make_int_cst): Remove macro.
      
      From-SVN: r250697
      Trevor Saunders committed
    • use cxx instead of make_tree_binfo_stat · 86cbccd7
      gcc/ChangeLog:
      
      2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
      
      	* tree.c (make_tre_binfo_stat): Remove _stat from name.
      	* tree.h (make_tree_binfo_stat): Adjust prototype.
      	(make_tree_binfo): Remove.
      
      From-SVN: r250696
      Trevor Saunders committed
    • use c++ instead of _stat for copy_node_stat · 39d970d7
      gcc/cp/ChangeLog:
      
      2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
      
      	* lex.c (copy_decl): Adjust.
      	(copy_type): Likewise.
      
      gcc/ChangeLog:
      
      2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
      
      	* tree.c (copy_node_stat): Rename to copy_node.
      	(build_distinct_type_copy): Adjust.
      	* tree.h (copy_node_stat): Adjust prototype.
      	(copy_node): Remove macro.
      
      From-SVN: r250695
      Trevor Saunders committed
    • use c++ instead of make_node_stat · f719e2f1
      gcc/ChangeLog:
      
      2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
      
      	* tree.c (make_node_stat): rename to make_node.
      	(build_tree_list_stat): Adjust.
      	(build0_stat): Likewise.
      	(build2_stat): Likewise.
      	(build3_stat): Likewise.
      	(build4_stat): Likewise.
      	(build5_stat): Likewise.
      	(build_decl_stat): Likewise.
      	* tree.h (make_node_stat): Adjust prototype.
      	(make_node): remove macro.
      
      From-SVN: r250694
      Trevor Saunders committed
  2. 26 Jul, 2017 1 commit
    • re PR middle-end/70992 (Infinite recursion between fold_build2_stat_loc and… · c3d38629
      re PR middle-end/70992 (Infinite recursion between fold_build2_stat_loc and fold_binary_loc w/ -fwrapv)
      
      	PR middle-end/70992
      	* tree.c (build2_stat): Don't set TREE_CONSTANT on divisions by zero.
      
      	* gcc.dg/overflow-warn-1.c: Adjust dg-error.
      	* gcc.dg/overflow-warn-2.c: Likewise.
      	* gcc.dg/overflow-warn-3.c: Likewise.
      	* gcc.dg/overflow-warn-4.c: Likewise.
      	* gcc.dg/torture/pr70992-2.c: New test.
      	* gcc.dg/torture/pr70992.c: New test.
      
      From-SVN: r250566
      Marek Polacek committed
  3. 21 Jul, 2017 1 commit
    • Remove TYPE_METHODS. · 5aaa8fb4
      	gcc/
      	Remove TYPE_METHODS.
      	* tree.h (TYPE_METHODS): Delete.
      	* dwarf2out.c (gen_member_die): Member fns are on TYPE_FIELDS.
      	* dbxout.c (dbxout_type_fields): Ignore FUNCTION_DECLs.
      	(dbxout_type_methods): Scan TYPE_FIELDS.
      	(dbxout_type): Don't check TYPE_METHODS here.
      	* function.c (use_register_for_decl): Always ignore register for
      	class types when not optimizing.
      	* ipa-devirt.c (odr_types_equivalent_p): Delete TYPE_METHODS scan.
      	* tree.c (free_lang_data_in_type): Stitch out member functions and
      	templates from TYPE_FIELDS.
      	(build_distinct_type_copy, verify_type_variant,
      	verify_type): Member fns are on TYPE_FIELDS.
      	* tree-dump.c (dequeue_and_dump): No TYPE_METHODS.
      	* tree-pretty-print.c (dump_generic_node): Likewise.
      
      	gcc/cp/
      	Remove TYPE_METHODS.
      	* class.c (maybe_warn_about_overly_private_class,
      	finish_struct_methods, one_inheriting_sig, count_fields,
      	add_fields_to_record_type, check_field_decls, check_methods,
      	clone_function_decl, set_method_tm_attributes,
      	finalize_literal_type_property, check_bases_and_members,
      	create_vtable_ptr, determine_key_method,
      	unreverse_member_declarations, finish_struct,
      	add_vcall_offset_vtbl_entries_1): Member fns are on TYPE_FIELDS.
      	* decl.c (fixup_anonymous_aggr): Likewise.
      	* decl2.c (reset_type_linkage_2): Likewise.
      	* method.c (after_nsdmi_defaulted_late_checks,
      	lazily_declare_fn): Likewise.
      	* optimize.c (maybe_thunk_body, maybe_clone_body): Likewise.
      	* pt.c (instantiate_class_template_1, tsubst_expr,
      	do_type_instantiation, instantiate_pending_templates): Likewise.
      	* search.c (lookup_field_1): Likewise.
      	* semantics.c (finish_member_declaration,
      	finish_omp_declare_simd_methods): Likewise.
      
      	gcc/c-family/
      	Remove TYPE_METHODS.
      	* c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
      	dump_ada_template, print_ada_methods,
      	print_ada_declaration): Member fns are on TYPE_FIELDS.
      
      	gcc/objc/
      	Remove TYPE_METHODS.
      	* objc-runtime-shared-support.c (build_ivar_list_initializer):
      	Don't presume first item is a FIELD_DECL.
      
      	gcc/testsuite/
      	* g++.dg/ext/anon-struct6.C: Adjust diag.
      	* g++.old-deja/g++.other/anon4.C: Adjust diag.
      
      	libcc1/
      	Remove TYPE_METHODS.
      	* libcp1plugin.cc (plugin_build_decl): Member fns are on TYPE_FIELDS.
      
      From-SVN: r250413
      Nathan Sidwell committed
  4. 19 Jul, 2017 1 commit
    • tree.h (TYPE_MINVAL, [...]): Rename to ... · 20deef65
      	gcc/
      	* tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ...
      	(TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these.
      	* tree.c (find_decls_types_r, verify_type): Use
      	TYPE_{MIN,MAX}_VALUE_RAW.
      	* lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise.
      	(hash_tree): Likewise.
      	* tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
      	Likewise.
      	* tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
      	Likewise.
      
      	gcc/cp/
      	* cp-tree.h (PACK_EXPANSION_PARAMETER_PACKS,
      	PACK_EXPANSION_EXTRA_ARGS): Use TYPE_{MIN,MAX}_VALUE_RAW.
      
      	gcc/lto/
      	* lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
      	(compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
      
      	gcc/objc/
      	* objc-act.h (CLASS_NST_METHODS, CLASS_CLS_METHODS): Use
      	TYPE_{MIN,MAX}_VALUE_RAW.
      
      From-SVN: r250337
      Nathan Sidwell committed
  5. 14 Jul, 2017 1 commit
    • Remove Java references in source code. · ed5cd5bc
      2017-07-14  Martin Liska  <mliska@suse.cz>
      
      	* cfgexpand.c (expand_gimple_basic_block): Remove dead comment.
      	* dwarf2out.c (is_java): Remove the function.
      	(output_pubname): Remove usage of the function.
      	(lower_bound_default): Remove usage of DW_LANG_Java.
      	(gen_compile_unit_die): Likewise.
      	* gcc.c: Remove compiler defaults for .java and .zip files.
      	* gimple-expr.c (remove_suffix): Change as there's no longer
      	extension than 4-letter one.
      	* gimplify.c (mostly_copy_tree_r): Remove Java-special part.
      	(gimplify_save_expr): Likewise.
      	* ipa-utils.h (polymorphic_type_binfo_p): Remove the comment
      	as it's possible even for other languages than Java.
      	* langhooks.h (struct lang_hooks): Remove Java from a comment.
      	* lto-opts.c (lto_write_options): Remove reference to Java.
      	* opts.c (strip_off_ending): Update file extension handling.
      	* tree-cfg.c (verify_gimple_call): Remove comment with Java.
      	* tree-eh.c (lower_resx): Likewise.
      	* tree.c (free_lang_data_in_type): Remove dead code.
      	(find_decls_types_r): Likewise.
      	(build_common_builtin_nodes): Remove Java from a comment.
      	(verify_type): Remove dead code.
      	* varasm.c (assemble_external): Remove Java from a comment.
      
      From-SVN: r250199
      Martin Liska committed
  6. 27 Jun, 2017 1 commit
    • fenv.h builtins · a889d6aa
      2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
      
      	* builtin-types.def (BT_FENV_T_PTR, BT_CONST_FENV_T_PTR,
      	BT_FEXCEPT_T_PTR, BT_CONST_FEXCEPT_T_PTR): New primitive types.
      	(BT_FN_INT_FENV_T_PTR, BT_FN_INT_CONST_FENV_T_PTR,
      	BT_FN_INT_FEXCEPT_T_PTR_INT, BT_FN_INT_CONST_FEXCEPT_T_PTR_INT):
      	New function types.
      	* builtins.def (BUILT_IN_FECLEAREXCEPT, BUILT_IN_FEGETENV,
      	BUILT_IN_FEGETEXCEPTFLAG, BUILT_IN_FEGETROUND,
      	BUILT_IN_FEHOLDEXCEPT, BUILT_IN_FERAISEEXCEPT,
      	BUILT_IN_FESETENV, BUILT_IN_FESETEXCEPTFLAG,
      	BUILT_IN_FESETROUND, BUILT_IN_FETESTEXCEPT,
      	BUILT_IN_FEUPDATEENV): New builtins.
      	* tree-core.h (TI_FENV_T_PTR_TYPE, TI_CONST_FENV_T_PTR_TYPE,
      	TI_FEXCEPT_T_PTR_TYPE, TI_CONST_FEXCEPT_T_PTR_TYPE): New entries.
      	* tree.h (fenv_t_ptr_type_node, const_fenv_t_ptr_type_node,
      	fexcept_t_ptr_type_node, const_fexcept_t_ptr_type_node): New
      	macros.
      	(builtin_structptr_types): Adjust size.
      	* tree.c (builtin_structptr_types): Add four entries.
      
      From-SVN: r249685
      Marc Glisse committed
  7. 23 Jun, 2017 1 commit
    • Refactor fileptr_type_node handling · 2db9b7cd
      2017-06-23  Marc Glisse  <marc.glisse@inria.fr>
      
      gcc/
      	* tree.h (builtin_structptr_type): New type.
      	(builtin_structptr_types): Declare new array.
      	* tree.c (builtin_structptr_types): New array.
      	(free_lang_data, build_common_tree_nodes): Use it.
      
      gcc/c-family/
      	* c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
      
      gcc/cp/
      	* decl.c (duplicate_decls): Use builtin_structptr_types.
      
      gcc/lto/
      	* lto-lang.c (lto_init): Use builtin_structptr_types.
      
      From-SVN: r249585
      Marc Glisse committed
  8. 11 Jun, 2017 1 commit
    • tree.h (id_equal): New. · a01f151f
      	* tree.h (id_equal): New.
      
      	* dwarf2out.c, hsa-gen.c, ipa-devirt.c, omp-expand.c,
      	omp-simd-clone.c, read-rtl-function.c, tree-chkp.c, tree.c: Use it
      	instead of strcmp of IDENTIFIER_POINTER.
      c-family/
      	* c-ada-spec.c, c-pragma.c: Use it.
      cp/
      	* cp-tree.h, decl2.c, mangle.c, parser.c, pt.c, semantics.c: Use it.
      
      From-SVN: r249103
      Jason Merrill committed
  9. 09 Jun, 2017 1 commit
    • builtin-attrs.def (ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST, [...]): New. · cb59f689
      	* builtin-attrs.def (ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST,
      	ATTR_CONST_NORETURN_NOTHROW_LEAF_COLD_LIST,
      	ATTR_TMPURE_NORETURN_NOTHROW_LEAF_COLD_LIST): New.
      	* builtins.def (abort, trap, unreachable): Declare cold.
      	* calls.c (flags_from_decl_or_type): Lookup ECF_COLD.
      	* tree-core.h (ECF_COLD): New.
      	* tree.c (set_call_expr_flags): Handle ECF_COLD.
      	(build_common_builtin_nodes): Mark unreachable and abort as cold.
      
      	* class.c (build_vtbl_initializer): Mark dvirt_fn as cold.
      	* decl.c (cxx_init_decl_processing, push_throw_library_fn): Likewise.
      	(excpet.c): Mark terminate as cold.
      
      	* gcc.dg/predict-14.c: Avoid cold function detection.
      	* gcc.target/i386/umod-3.c: Likewise.
      
      From-SVN: r249070
      Jan Hubicka committed
  10. 25 May, 2017 1 commit
  11. 19 May, 2017 1 commit
  12. 16 May, 2017 1 commit
  13. 05 May, 2017 1 commit
  14. 04 May, 2017 1 commit
    • tree.c (array_at_struct_end_p): Handle arrays at struct end with flexarrays more conservatively. · c3e46927
      2017-05-04  Richard Biener  <rguenther@suse.de>
      
      	* tree.c (array_at_struct_end_p): Handle arrays at struct
      	end with flexarrays more conservatively.  Refactor and treat
      	arrays of arrays or aggregates more strict.  Fix
      	VIEW_CONVERT_EXPR handling.  Remove allow_compref argument.
      	* tree.c (array_at_struct_end_p): Adjust prototype.
      	* emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust.
      	* gimple-fold.c (get_range_strlen): Likewise.
      	* tree-chkp.c (chkp_may_narrow_to_field): Likewise.
      
      From-SVN: r247581
      Richard Biener committed
  15. 03 May, 2017 1 commit
    • Canonicalize canonical type hashing · 6fe63fb4
      	Canonicalize canonical type hashing
      	gcc/
      	* tree.h (type_hash_canon_hash): Declare.
      	* tree.c (type_hash_list, attribute_hash_list): Move into
      	type_hash_canon_hash.
      	(build_type_attribute_qual_variant): Break out hash code calc into
      	type_hash_canon_hash.
      	(type_hash_canon_hash): New.  Generic type hash computation.
      	(build_range_type_1, build_array_type_1, build_function_type)
      	build_method_type_directly, build_offset_type, build_complex_type,
      	make_vector_type): Call it.
      	gcc/c-family/
      	* c-common.c (complete_array_type): Use type_hash_canon.
      (--This line, and those below, will be ignored--
      
      M    gcc/tree.c
      M    gcc/tree.h
      M    gcc/c-family/ChangeLog
      M    gcc/c-family/c-common.c
      M    gcc/ChangeLog
      
      From-SVN: r247546
      Nathan Sidwell committed
  16. 01 May, 2017 1 commit
  17. 27 Apr, 2017 1 commit
    • re PR c++/80534 (7.1 RC - internal compiler error: in finish_member_declaration,… · f8a36447
      re PR c++/80534 (7.1 RC - internal compiler error: in finish_member_declaration, at cp/semantics.c:2963)
      
      	PR c++/80534
      	* tree.c (type_cache_hasher::equal): Only compare
      	TYPE_TYPELESS_STORAGE flag on non-aggregate element types.
      	(build_array_type_1): Only hash TYPE_TYPELESS_STORAGE flag on
      	non-aggregate element types.
      	* tree.h (TYPE_TYPELESS_STORAGE): Fix comment typo, add more details
      	about the flag on ARRAY_TYPEs in the comment, formatting fix.
      c-family/
      	* c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
      	flag on non-aggregate element types.
      testsuite/
      	* g++.dg/other/pr80534-1.C: New test.
      	* g++.dg/other/pr80534-2.C: New test.
      
      From-SVN: r247334
      Jakub Jelinek committed
  18. 26 Apr, 2017 1 commit
    • tree.h (crc32_unsigned_n): Declare. · f88523e5
      	* tree.h (crc32_unsigned_n): Declare.
      	(crc32_unsigned, crc32_unsigned): Make inline.
      	* tree.c (crc32_unsigned_bits): Replace with ...
      	(crc32_unsigned_n): ... this.
      	(crc32_unsigned, crc32_byte): Remove.
      	(crc32_string): Remove unnecessary braces.
      
      From-SVN: r247281
      Nathan Sidwell committed
  19. 21 Apr, 2017 1 commit
    • tree.h (build_qualified_type): Annotate with CXX_MEM_STAT_INFO. · ad32f067
      2017-04-21  Richard Biener  <rguenther@suse.de>
      
      	* tree.h (build_qualified_type): Annotate with CXX_MEM_STAT_INFO.
      	(build_distinct_type_copy): Likewise.
      	(build_variant_type_copy): Likewise.
      	* tree.c (build_qualified_type): Pass down mem-stat info.
      	(build_distinct_type_copy): Likewise.
      	(build_variant_type_copy): Likewise.
      
      	cp/
      	* cp-tree.h (copy_decl): Annotate with CXX_MEM_STAT_INFO.
      	(copy_type): Likewise.
      	* lex.c (copy_decl): Pass down mem-stat info.
      	(copy_type): Likewise.
      
      From-SVN: r247053
      Richard Biener committed
  20. 20 Apr, 2017 1 commit
    • re PR middle-end/80423 (GC related -fcompare-debug failure) · 8a59d466
      	PR middle-end/80423
      	* tree.h (build_array_type): Add typeless_storage default argument.
      	* tree.c (type_cache_hasher::equal): Also compare
      	TYPE_TYPELESS_STORAGE flag for ARRAY_TYPEs.
      	(build_array_type): Add typeless_storage argument, set
      	TYPE_TYPELESS_STORAGE to it, if shared also hash it, and pass to
      	recursive call.
      	(build_nonshared_array_type): Adjust build_array_type_1 caller.
      	(build_array_type): Likewise.  Add typeless_storage argument.
      c-family/
      	* c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
      cp/
      	* tree.c (build_cplus_array_type): Call build_array_type
      	with the intended TYPE_TYPELESS_STORAGE flag value, instead
      	of calling build_array_type and modifying later TYPE_TYPELESS_STORAGE
      	on the shared type.
      testsuite/
      	* g++.dg/other/pr80423.C: New test.
      
      From-SVN: r247014
      Jakub Jelinek committed
  21. 07 Apr, 2017 1 commit
    • re PR middle-end/80341 (gcc miscompiles division of signed char) · 2d143ba8
      2017-04-07  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/80341
      	* tree.c (get_unwidened): Also handle ! for_type case for
      	INTEGER_CSTs.
      	* convert.c (do_narrow): Split out from ...
      	(convert_to_integer_1): ... here.  Do not pass final truncation
      	type to get_unwidened for TRUNC_DIV_EXPR.
      
      	* gcc.dg/torture/pr80341.c: New testcase.
      
      From-SVN: r246756
      Richard Biener committed
  22. 28 Mar, 2017 1 commit
    • Avoid name lookup warning · a292245e
      /home/markus/gcc/gcc/tree.c: In function ‘void inchash::add_expr(const_tree, inchash::hash&, unsigned int)’:
      /home/markus/gcc/gcc/tree.c:8013:11: warning: name lookup of ‘i’ changed
            for (i = TREE_OPERAND_LENGTH (t) - 1; i >= 0; --i)
                 ^
      /home/markus/gcc/gcc/tree.c:7773:7: warning:   matches this ‘i’ under ISO standard rules
         int i;
             ^
      /home/markus/gcc/gcc/tree.c:7869:16: warning:   matches this ‘i’ under old rules
             for (int i = 0; i < TREE_VEC_LENGTH (t); ++i)
                      ^
      
      From-SVN: r246519
      Markus Trippelsdorf committed
  23. 09 Mar, 2017 1 commit
  24. 23 Feb, 2017 1 commit
    • re PR middle-end/79665 (gcc's signed (x*x)/200 is slower than clang's) · b607e75e
      	PR middle-end/79665
      	* internal-fn.c (get_range_pos_neg): Moved to ...
      	* tree.c (get_range_pos_neg): ... here.  No longer static.
      	* tree.h (get_range_pos_neg): New prototype.
      	* expr.c (expand_expr_real_2) <case TRUNC_DIV_EXPR>: If both arguments
      	are known to be in between 0 and signed maximum inclusive, try to
      	expand both unsigned and signed divmod and use the cheaper one from
      	those.
      
      From-SVN: r245676
      Jakub Jelinek committed
  25. 09 Feb, 2017 1 commit
    • gimplify.c (gimplify_scan_omp_clauses): No special handling for OMP_CLAUSE_TILE. · 02889d23
      2017-02-09  Nathan Sidwell  <nathan@codesourcery.com>
      	    Cesar Philippidis  <cesar@codesourcery.com>
      	    Joseph Myers  <joseph@codesourcery.com>
      	    Chung-Lin Tang  <cltang@codesourcery.com>
      
      	gcc/
      	* gimplify.c (gimplify_scan_omp_clauses): No special handling for
      	OMP_CLAUSE_TILE.
      	(gimplify_adjust_omp_clauses): Don't delete TILE.
      	(gimplify_omp_for): Deal with TILE.
      	* internal-fn.c (expand_GOACC_TILE): New function.
      	* internal-fn.def (GOACC_DIM_POS): Comment may be overly conservative.
      	(GOACC_TILE): New.
      	* omp-expand.c (struct oacc_collapse): Add tile and outer fields.
      	(expand_oacc_collapse_init): Add LOC paramter.  Initialize tile
      	element fields.
      	(expand_oacc_collapse_vars): Add INNER parm, adjust for tiling,
      	avoid DIV for outermost collapse var.
      	(expand_oacc_for): Insert tile element loop as needed.  Adjust.
      	Remove out of date comments, fix whitespace.
      	* omp-general.c (omp_extract_for_data): Deal with tiling.
      	* omp-general.h (enum oacc_loop_flags): Add OLF_TILE flag,
      	adjust OLF_DIM_BASE value.
      	(struct omp_for_data): Add tiling field.
      	* omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_TILE.
      	(lower_oacc_head_mark): Add OLF_TILE as appropriate.  Ensure 2 levels
      	for auto loops.  Remove default auto determining, moved to
      	oacc_loop_fixed_partitions.
      	* omp-offload.c (struct oacc_loop): Change 'ifns' to vector of call
      	stmts, add e_mask field.
      	(oacc_dim_call): New function, abstracted out from oacc_thread_numbers.
      	(oacc_thread_numbers): Use oacc_dim_call.
      	(oacc_xform_tile): New.
      	(new_oacc_loop_raw): Initialize e_mask, adjust for ifns vector.
      	(finish_oacc_loop): Adjust for ifns vector.
      	(oacc_loop_discover_walk): Append loop abstraction sites to list,
      	add case for GOACC_TILE fns.
      	(oacc_loop_xform_loop): Delete.
      	(oacc_loop_process): Iterate over call list directly, and add
      	handling for GOACC_TILE fns.
      	(oacc_loop_fixed_partitions): Determine default auto, deal with TILE,
      	dump partitioning.
      	(oacc_loop_auto_partitions): Add outer_assign parm. Assign all but
      	vector partitioning to outer loops.  Assign 2 partitions to loops
      	when available. Add TILE handling.
      	(oacc_loop_partition): Adjust oacc_loop_auto_partitions call.
      	(execite_oacc_device_lower): Process GOACC_TILE fns, ignore unknown specs.
      	* tree-nested.c (convert_nonlocal_omp_clauses): Allow OMP_CLAUSE_TILE.
      	* tree.c (omp_clause_num_ops): Adjust TILE ops.
      	* tree.h (OMP_CLAUSE_TILE_ITERVAR, OMP_CLAUSE_TILE_COUNT): New.
      
      	gcc/c/
      	* c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
      	(c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
      	semantic checking.
      	* c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
      
      	gcc/cp/
      	* parser.c (cp_parser_oacc_clause_tile): Disallow collapse.  Fix
      	parsing.  Parse constant expression. Remove semantic checking.
      	(cp_parser_omp_clause_collapse): Disallow tile.
      	(cp_parser_omp_for_loop): Deal with tile clause.  Don't emit a parse
      	error about missing for after already emitting one.  Use more
      	conventional for idiom for unbounded loop.
      	* pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_TILE.
      	* semantics.c (finish_omp_clauses): Correct TILE semantic check.
      	(finish_omp_for): Deal with tile clause.
      
      	gcc/fortran/
      	* openmp.c (resolve_omp_clauses): Error on directives
      	containing both tile and collapse clauses.
      	(resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
      	* trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
      	collapsed loops.
      
      	gcc/testsuite/
      	* c-c++-common/goacc/combined-directives.c: Remove xfail.
      	* c-c++-common/goacc/loop-auto-1.c: Adjust and add additional case.
      	* c-c++-common/goacc/loop-auto-2.c: New.
      	* c-c++-common/goacc/tile.c: Include stdbool, fix expected errors.
      	* c-c++-common/goacc/tile-2.c: New.
      	* g++.dg/goacc/template.C: Test tile subst.  Adjust erroneous uses.
      	* g++.dg/goacc/tile-1.C: New, check tile subst.
      	* gcc.dg/goacc/loop-processing-1.c: Adjust dg-final pattern.
      	* gfortran.dg/goacc/combined-directives.f90: Remove xfail.
      	* gfortran.dg/goacc/tile-1.f90: New test.
      	* gfortran.dg/goacc/tile-2.f90: New test.
      	* gfortran.dg/goacc/tile-lowering.f95: New test.
      
      	libgomp/
      	* testsuite/libgomp.oacc-c-c++-common/tile-1.c: New.
      	* testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Adjust and
      	add additional case.
      	* testsuite/libgomp.oacc-c-c++-common/vprop.c: XFAIL under
      	"openacc_nvidia_accel_selected".
      	* libgomp.oacc-fortran/nested-function-1.f90 (test2):
      	Add num_workers(8) clause.
      
      From-SVN: r245300
      Chung-Lin Tang committed
  26. 03 Feb, 2017 1 commit
    • PR tree-optimization/79352 - -fprintf-return-value doesn't handle flexible-like… · 3f343040
      PR tree-optimization/79352 - -fprintf-return-value doesn't handle flexible-like array members properly
      
      gcc/ChangeLog:
      
      	PR tree-optimization/79352
      	* gimple-fold.c (get_range_strlen): Add argument.
      	(get_range_strlen): Change return type to bool.
      	(get_maxval_strlen): Pass in a dummy argument.
      	* gimple-fold.h (get_range_strlen): Change return type to bool.
      	* gimple-ssa-sprintf.c (get_string_length): Set unlikely counter.
      	* tree.h (array_at_struct_end_p): Add argument.
      	* tree.c (array_at_struct_end_p): Handle it.
      
      gcc/testsuite/ChangeLog:
      
      	PR tree-optimization/79352
      	* gcc.dg/tree-ssa/pr79352.c: New test.
      
      From-SVN: r245156
      Martin Sebor committed
  27. 30 Jan, 2017 1 commit
  28. 23 Jan, 2017 2 commits
  29. 20 Jan, 2017 1 commit
    • re PR c/64279 (Warning missing for "(cond) ? A : A" / if(cond) expr1; else… · 2ebd93e1
      re PR c/64279 (Warning missing for "(cond) ? A : A" / if(cond) expr1; else expr1; // same expression in if and else branch)
      
      	PR c/64279
      	* c-common.h (do_warn_duplicated_branches_r): Declare.
      	* c-gimplify.c (c_genericize): Walk the function tree calling
      	do_warn_duplicated_branches_r.
      	* c-warn.c (expr_from_macro_expansion_r): New.
      	(do_warn_duplicated_branches): New.
      	(do_warn_duplicated_branches_r): New.
      	* c.opt (Wduplicated-branches): New option.
      
      	* c-typeck.c (build_conditional_expr): Warn about duplicated branches.
      
      	* call.c (build_conditional_expr_1): Warn about duplicated branches.
      	* semantics.c (finish_expr_stmt): Build statement using the proper
      	location.
      
      	* doc/invoke.texi: Document -Wduplicated-branches.
      	* fold-const.c (operand_equal_p): Handle MODIFY_EXPR, INIT_EXPR,
      	COMPOUND_EXPR, PREDECREMENT_EXPR, PREINCREMENT_EXPR,
      	POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, CLEANUP_POINT_EXPR, EXPR_STMT,
      	STATEMENT_LIST, and RETURN_EXPR.  For non-pure non-const functions
      	return 0 only when not OEP_LEXICOGRAPHIC.
      	(fold_build_cleanup_point_expr): Use the expression
      	location when building CLEANUP_POINT_EXPR.
      	* tree-core.h (enum operand_equal_flag): Add OEP_LEXICOGRAPHIC.
      	* tree.c (add_expr): Handle error_mark_node.
      
      	* c-c++-common/Wduplicated-branches-1.c: New test.
      	* c-c++-common/Wduplicated-branches-10.c: New test.
      	* c-c++-common/Wduplicated-branches-11.c: New test.
      	* c-c++-common/Wduplicated-branches-12.c: New test.
      	* c-c++-common/Wduplicated-branches-2.c: New test.
      	* c-c++-common/Wduplicated-branches-3.c: New test.
      	* c-c++-common/Wduplicated-branches-4.c: New test.
      	* c-c++-common/Wduplicated-branches-5.c: New test.
      	* c-c++-common/Wduplicated-branches-6.c: New test.
      	* c-c++-common/Wduplicated-branches-7.c: New test.
      	* c-c++-common/Wduplicated-branches-8.c: New test.
      	* c-c++-common/Wduplicated-branches-9.c: New test.
      	* c-c++-common/Wimplicit-fallthrough-7.c: Coalesce dg-warning.
      	* g++.dg/cpp0x/lambda/lambda-switch.C: Move dg-warning.
      	* g++.dg/ext/builtin-object-size3.C: Likewise.
      	* g++.dg/gomp/loop-1.C: Likewise.
      	* g++.dg/warn/Wduplicated-branches1.C: New test.
      	* g++.dg/warn/Wduplicated-branches2.C: New test.
      
      From-SVN: r244705
      Marek Polacek committed