1. 05 Nov, 2018 24 commits
    • S/390: Make tests expect column numbers in RTL output · d64d068c
      RTL output now includes column numbers in addition to line numbers,
      like this:
      
        "gcc/testsuite/gcc.target/s390/md/andc-splitter-1.c":16:1
      
      This confuses some S/390 tests.
      
      gcc/testsuite/ChangeLog:
      
      2018-11-05  Ilya Leoshkevich  <iii@linux.ibm.com>
      
      	* gcc.target/s390/md/andc-splitter-1.c: Add colon to
      	expectations.
      	* gcc.target/s390/md/andc-splitter-2.c: Likewise.
      	* gcc.target/s390/md/setmem_long-1.c: Likewise.
      
      From-SVN: r265813
      Ilya Leoshkevich committed
    • re PR tree-optimization/87873 (ICE: verify_gimple failed (error: incompatible… · 733441e2
      re PR tree-optimization/87873 (ICE: verify_gimple failed (error: incompatible types in PHI argument 0))
      
      2018-11-05  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/87873
      	* tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
      	argument.
      	* tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
      	* tree-vect-loop.c (vect_transform_loop): When splitting the
      	loop exit also create forwarder PHIs for constants.
      	* tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
      	Handle constant to_arg, add extra checking we match up the correct
      	PHIs.
      
      	* gcc.dg/pr87873.c: New testcase.
      
      From-SVN: r265812
      Richard Biener committed
    • Do not use %zu format in libcpp. · 546f678c
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	* symtab.c (ht_dump_statistics): Replace %zu with %lu format.
      
      From-SVN: r265811
      Martin Liska committed
    • Fix printf call in symtab.c. · 037903cb
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	* symtab.c (ht_dump_statistics): Fix format and
      	pass missing argument.
      
      From-SVN: r265810
      Martin Liska committed
    • S/390: Add loc patterns for QImode and HImode · d8928886
      This adds QImode and HImode support to load on condition.
      
      gcc/ChangeLog:
      
      2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
      
      	* config/s390/s390.md: QImode and HImode for load on condition.
      
      gcc/testsuite/ChangeLog:
      
      2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
      
      	* gcc.target/s390/ifcvt-one-insn-bool.c: New test.
      	* gcc.target/s390/ifcvt-one-insn-char.c: New test.
      
      From-SVN: r265808
      Robin Dapp committed
    • S/390: Allow immediates in loc expander · 88e845c0
      This allows immediate operands for load on condition.
      
      gcc/ChangeLog:
      
      2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
      
      	* config/s390/predicates.md: Fix typo.
      	* config/s390/s390.md: Allow immediates for load on condition.
      
      gcc/testsuite/ChangeLog:
      
      2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
      
      	* gcc.dg/loop-8.c: On s390, always run the test with -march=zEC12.
      
      From-SVN: r265804
      Robin Dapp committed
    • Come up with SIZE_AMOUNT and use it in memory statistics and sort stats. · 40ce7fa6
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	* alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
      	* bitmap.h (struct bitmap_usage): Likewise.
      	* ggc-common.c (SCALE): Remove.
      	(LABEL): Likewise.
      	(struct ggc_usage): Use SIZE_AMOUNT. And update
      	compare method.
      	* ggc-page.c (SCALE): Remove.
      	(STAT_LABEL): Remove.
      	(ggc_print_statistics): Use SIZE_AMOUNT.
      	* gimple.h (SCALE): Remove.
      	(LABEL): Likewise.
      	* input.c (ONE_K): Remove.
      	(ONE_M): Likewise.
      	(SCALE): Likewise.
      	(STAT_LABEL): Likewise.
      	(FORMAT_AMOUNT): Likewise.
      	(dump_line_table_statistics): Use SIZE_AMOUNT.
      	* mem-stats.h (struct mem_usage): Likewise.
      	* rtl.c (dump_rtx_statistics): Likewise.
      	(rtx_alloc_counts): Change type to size_t.
      	(rtx_alloc_sizes): Likewise.
      	(rtx_count_cmp): New.
      	(dump_rtx_statistics): Sort first based on counts.
      	* tree.c (tree_nodes_cmp): New.
      	(tree_codes_cmp): New.
      	(dump_tree_statistics): Sort first based on counts.
      	* system.h (ONE_K): New.
      	(ONE_M): Likewise.
      	(SIZE_SCALE): Likewise.
      	(SIZE_LABEL): Likewise.
      	(SIZE_AMOUNT): Likewise.
      	* tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
      	* tree-dfa.c (dump_dfa_stats): Likewise.
      	* tree-phinodes.c (phinodes_print_statistics): Likewise.
      	* tree-ssanames.c (ssanames_print_statistics): Likewise.
      	* tree.c (dump_tree_statistics): Likewise.
      	* vec.c (struct vec_usage): Likewise.
      	* trans-mem.c (tm_mangle): Enlarge buffer in order to not
      	trigger a -Werror=format-overflow with
      	--enable-gather-detailed-stats.
      
      From-SVN: r265800
      Martin Liska committed
    • Fix vector memory statistics. · 00e6775a
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	* mem-stats.h (mem_alloc_description::release_instance_overhead):
      	Return T *.
      	* vec.c (struct vec_usage): Register m_element_size.
      	(vec_prefix::register_overhead): New arguments: elements and
      	element_size.
      	(vec_prefix::release_overhead): Subtract elements.
      	* vec.h (struct vec_prefix): Change signature.
      	(va_heap::reserve): Pass proper arguments.
      	(va_heap::release): Likewise.
      
      From-SVN: r265799
      Martin Liska committed
    • Fix GNU coding style. · 93ef36dc
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	* mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
      	style.
      	* vec.c: Likewise.
      
      From-SVN: r265798
      Martin Liska committed
    • Fix string pool statistics. · 46aeb07f
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	* symtab.c (ht_dump_statistics): Make dump conditional
      	based on alloc_subobject.
      
      From-SVN: r265797
      Martin Liska committed
    • Fix build on sparc64-linux-gnu. · 6388cb29
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	PR sanitizer/87860
      	* sanitizer_common/sanitizer_linux.cc:  Cherry-pick upstream
      	r346129.
      
      From-SVN: r265796
      Martin Liska committed
    • tree-scalar-evolution.h (final_value_replacement_loop): Update prototype. · 4cc31a3c
      2018-11-05  Richard Biener  <rguenther@suse.de>
      
      	* tree-scalar-evolution.h (final_value_replacement_loop): Update
      	prototype.
      	* tree-scalar-evolution.c (final_value_replacement_loop): Return
      	whether anything was done.
      	(scev_const_prop): Remove constant propagation part, fold
      	remains into ...
      	* tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
      	(pass_data_scev_cprop): TODO_cleanup_cfg is now done
      	conditionally.
      
      	* gcc.dg/pr41488.c: Scan ivcanon dump instead of sccp one.
      	* gcc.dg/tree-ssa/scev-7.c: Likewise.
      
      From-SVN: r265795
      Richard Biener committed
    • re PR tree-optimization/87859 (store-merging miscompilation of mesa) · 18e0c3d1
      	PR tree-optimization/87859
      	* gimple-ssa-store-merging.c (struct merged_store_group): Add
      	only_constants and first_nonmergeable_order members.
      	(merged_store_group::merged_store_group): Initialize them.
      	(merged_store_group::do_merge): Clear only_constants member if
      	adding something other than INTEGER_CST store.
      	(imm_store_chain_info::coalesce_immediate_stores): Don't merge
      	stores with order >= first_nonmergeable_order.  Use
      	merged_store->only_constants instead of always recomputing it.
      	Set merged_store->first_nonmergeable_order if we've skipped any
      	stores.  Attempt to merge overlapping INTEGER_CST stores that
      	we would otherwise skip.
      
      	* gcc.dg/store_merging_24.c: New test.
      	* gcc.dg/store_merging_25.c: New test.
      
      From-SVN: r265794
      Jakub Jelinek committed
    • re PR sanitizer/87837 (-O2 -fsanitize=signed-integer-overflow misses overflows on x86-64) · cbd42900
      	PR sanitizer/87837
      	* match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
      
      	* c-c++-common/ubsan/pr87837.c: New test.
      
      From-SVN: r265793
      Jakub Jelinek committed
    • re PR target/87853 (_mm_cmpgt_epi8 broken with -funsigned-char) · 6db6445e
      2018-11-05  Xuepeng Guo  <xuepeng.guo@intel.com>
      
      	PR target/87853
      	* config/i386/emmintrin.h (__v16qs): New to cope with option
      	-funsigned-char.
      	(_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
      	(_mm_cmplt_epi8): Likewise.
      	(_mm_cmpgt_epi8): Likewise.
      
      From-SVN: r265792
      Xuepeng Guo committed
    • re PR middle-end/87852 (FAIL: gcc.c-torture/execute/pr53465.c) · 692e7e54
      2018-11-05  Richard Biener  <rguenther@suse.de>
      
      	PR rtl-optimization/87852
      	* fwprop.c (use_killed_between): Only consider single-defs of the
      	use whose definition statement dominates the use.
      
      From-SVN: r265791
      Richard Biener committed
    • Implement UDL changes from P0732R2. · b008f16b
      Implementing the UDL changes was pretty straightforward; I simplified
      cp_parser_userdef_string_literal using the releasing_vec type from mangle.c.
      
      While looking at this, I realized that the string UDL template taking a
      character pack that we implemented for C++14 didn't actually make it into
      C++14, so I've added a pedwarn for it and no longer suggest it in the
      diagnostic about an invalid UDL template.
      
      	* cp-tree.h (struct releasing_vec): Move from mangle.c.
      	Add get_ref method.
      	* parser.c (cp_parser_userdef_string_literal): Use it.  Handle
      	passing the string to a single template parameter of class type.
      	(cp_parser_template_declaration_after_parameters): Allow it.
      	Pedwarn about the character pack template that was proposed but not
      	accepted for C++14, and don't suggest it.
      
      From-SVN: r265790
      Jason Merrill committed
    • Implement P0732R2, class types in non-type template parameters. · 4be5c72c
      There is one significant piece of this that is not implemented yet: the
      reliance on defaulted operator<=>, which someone else has been working on.
      So, for the moment those lines are commented out of the testcases.
      
      One tricky bit was treating template parameters of classtype as const
      lvalues without making their decltype const; for this I used a
      VIEW_CONVERT_EXPR wrapper, which previously could only appear in templates
      as location wrappers.
      
      The user-defined literal parts of P0732R2 are in the next patch.
      
      gcc/cp/
      	* error.c (dump_simple_decl): Look through a template parm object.
      	* mangle.c (write_template_arg): Likewise.
      	(mangle_template_parm_object): New.
      	* pt.c (template_parm_object_p, get_template_parm_object): New.
      	(invalid_tparm_referent_p): Factor from convert_nontype_argument.
      	(convert_nontype_argument, invalid_nontype_parm_type_p): Handle
      	class-type template arguments.
      	* tree.c (lvalue_kind): Likewise.
      gcc/c-family/
      	* c-cppbuiltin.c (c_cpp_builtins): Add
      	__cpp_nontype_template_parameter_class.
      libiberty/
      	* cp-demangle.c (d_dump, d_make_comp, d_count_templates_scopes)
      	(d_print_comp_inner): Handle DEMANGLE_COMPONENT_TPARM_OBJ.
      	(d_special_name): Handle TA.
      	(d_expresion_1): Fix demangling of brace-enclosed initializer list.
      include/
      	* demangle.h (enum demangle_component_type): Add
      	DEMANGLE_COMPONENT_TPARM_OBJ.
      
      From-SVN: r265789
      Jason Merrill committed
    • Fix various latent issues revealed by P0732 work. · 5dab8b11
      The initialized_type hunk fixes handling of void AGGR_INIT_EXPRs that call a
      non-constructor; an AGGR_INIT_EXPR can have void type if its initialization
      semantics are more complicated than just expanding the call.
      
      The cxx_eval_vec_init_1 hunk corrects AGGR_INIT_EXPRs that were
      nonsensically built to initialize an object of void type.  And the
      build_aggr_init_expr hunk makes sure we don't do that again.
      
      The ocp_convert and cxx_eval_outermost_constant_expr hunks deal with making
      sure that a constant CONSTRUCTOR has the right type.
      
      	* cvt.c (ocp_convert): Don't wrap a CONSTRUCTOR in a NOP_EXPR.
      	* constexpr.c (initialized_type): Fix AGGR_INIT_EXPR handling.
      	(cxx_eval_vec_init_1): Correct type of AGGR_INIT_EXPR.
      	(cxx_eval_outermost_constant_expr): Make sure a CONSTRUCTOR has the
      	right type.  Don't wrap a CONSTRUCTOR if one was passed in.
      	* tree.c (build_aggr_init_expr): Check for void.
      
      From-SVN: r265788
      Jason Merrill committed
    • PR c++/60503 - wrong lambda attribute syntax. · c24c8a4b
      This patch fixes two issues with lambda attribute handling: First, it was in
      the wrong place in the grammar.  Second, it was treating attributes as
      applying to the whole declaration rather than to the function type, as
      specified by the standard.
      
      	* parser.c (cp_parser_lambda_declarator_opt): Fix attribute
      	handling.
      
      From-SVN: r265787
      Jason Merrill committed
    • Remove options that are not disabled with -Os (PR web/87829). · ac274592
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	PR web/87829
      	* doc/invoke.texi: Remove options that are
      	not disabled with -Os.
      
      From-SVN: r265786
      Martin Liska committed
    • Verify that last argument of __builtin_expect_with_probability is a real cst (PR c/87811). · c3210c96
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	PR c/87811
      	* predict.c (expr_expected_value_1): Verify
      	that last argument is a real constants and emit
      	error.
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	PR c/87811
      	* gcc.dg/pr87811.c: New test.
      	* gcc.dg/pr87811-2.c: Likewise.
      	* gcc.dg/pr87811-3.c: Likewise.
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	PR c/87811
      	* doc/extend.texi: Update constrain about the last argument
      	of __builtin_expect_with_probability.
      
      From-SVN: r265785
      Martin Liska committed
    • Fix setting of hotness in non-LTO mode (PR gcov-profile/77698). · e53f77c6
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	PR gcov-profile/77698
      	* ipa-profile.c (ipa_profile): Adjust hotness threshold
      	only in LTO mode.
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	PR gcov-profile/77698
      	* gcc.dg/tree-prof/pr77698.c: New test.
      
      From-SVN: r265784
      Martin Liska committed
    • Daily bump. · 51020b00
      From-SVN: r265783
      GCC Administrator committed
  2. 04 Nov, 2018 7 commits
  3. 03 Nov, 2018 2 commits
  4. 02 Nov, 2018 7 commits
    • re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character return type) · 0f4f8561
      2018-11-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
          PR fortran/46020
          * decl.c (verify_bind_c_sym): Remove unnecessary space
          in error message.
      
      From-SVN: r265757
      Thomas Koenig committed
    • Move gcc.dg/compat dg-skip-if to *_main.c files · 361420ee
      	* gcc.dg/compat/pr83487-1_y.c: Move dg-skip-if ...
      	* gcc.dg/compat/pr83487-1_main.c: ... here.
      	* gcc.dg/compat/struct-by-value-10_main.c,
      	gcc.dg/compat/struct-by-value-10_x.c,
      	gcc.dg/compat/struct-by-value-11_main.c,
      	gcc.dg/compat/struct-by-value-11_x.c,
      	gcc.dg/compat/struct-by-value-12_main.c,
      	gcc.dg/compat/struct-by-value-12_x.c,
      	gcc.dg/compat/struct-by-value-13_main.c,
      	gcc.dg/compat/struct-by-value-13_x.c,
      	gcc.dg/compat/struct-by-value-14_main.c,
      	gcc.dg/compat/struct-by-value-14_x.c,
      	gcc.dg/compat/struct-by-value-15_main.c,
      	gcc.dg/compat/struct-by-value-15_x.c,
      	gcc.dg/compat/struct-by-value-17_main.c,
      	gcc.dg/compat/struct-by-value-17_x.c,
      	gcc.dg/compat/struct-by-value-18_main.c,
      	gcc.dg/compat/struct-by-value-18_x.c,
      	gcc.dg/compat/struct-by-value-2_main.c,
      	gcc.dg/compat/struct-by-value-2_x.c,
      	gcc.dg/compat/struct-by-value-22_main.c,
      	gcc.dg/compat/struct-by-value-22_x.c,
      	gcc.dg/compat/struct-by-value-3_main.c,
      	gcc.dg/compat/struct-by-value-3_x.c,
      	gcc.dg/compat/struct-by-value-4_main.c,
      	gcc.dg/compat/struct-by-value-4_x.c,
      	gcc.dg/compat/struct-by-value-5b_main.c,
      	gcc.dg/compat/struct-by-value-5b_x.c,
      	gcc.dg/compat/struct-by-value-6b_main.c,
      	gcc.dg/compat/struct-by-value-6b_x.c,
      	gcc.dg/compat/struct-by-value-6b_main.c,
      	gcc.dg/compat/struct-by-value-7b_x.c,
      	gcc.dg/compat/struct-by-value-7b_main.c,
      	gcc.dg/compat/struct-by-value-8_main.c,
      	gcc.dg/compat/struct-by-value-8_x.c,
      	gcc.dg/compat/struct-by-value-9_main.c,
      	gcc.dg/compat/struct-by-value-9_x.c,
      	gcc.dg/compat/struct-return-2_main.c,
      	gcc.dg/compat/struct-return-2_x.c: Likewise.
      
      From-SVN: r265755
      Rainer Orth committed
    • rs6000-string.c (expand_strncmp_gpr_sequence): Pay attention to… · 122d6c36
      rs6000-string.c (expand_strncmp_gpr_sequence): Pay attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
      
      2018-11-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
      
      	* config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
      	attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
      
      From-SVN: r265751
      Aaron Sawdey committed
    • Although there's no fundamental reason why shrink wrapping and speculation… · 5f7dbaa0
      Although there's no fundamental reason why shrink wrapping and speculation tracking are incompatible...
      
      Although there's no fundamental reason why shrink wrapping and
      speculation tracking are incompatible, a phase-ordering requirement
      (we need to do speculation tracking before the final basic block
      clean-up) means that the shrink wrapping pass can undo some of the
      changes the speculation tracking pass makes.  The result is that the
      tracking, while still safe is less comprehensive than we really want.
      
      So to keep things simple, and because the tracking code is quite
      expensive anyway, it seems best to just disable that pass when we are
      tracking speculative execution.
      
      	 * config/aarch64/aarch64.c (aarch64_override_options): Disable
      	 shrink-wrapping when -mtrack-speculation.
      
      From-SVN: r265747
      Richard Earnshaw committed
    • tree-ssa-coalesce.c (struct coalesce_list): Add obstack member. · 4c998ca5
      2018-11-02  Richard Biener  <rguenther@suse.de>
      
      	* tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
      	(pop_cost_one_pair): Do not free pair.
      	(pop_best_coalesce): Likewise.
      	(create_coalesce_list): Initialize obstack.
      	(delete_coalesce_list): Free obstack.
      	(find_coalesce_pair): Obstack-allocate coalesce pairs.
      	(add_cost_one_coalesce): Likewise.
      	(struct live_track): Remove bitmap pointer indirections.
      	(new_live_track): Adjust.
      	(delete_live_track): Likewise.
      	(live_track_remove_partition): Likewise.
      	(live_track_add_partition): Likewise.
      	(live_track_live_p): Likewise.
      	(live_track_process_def): Likewise.
      	(live_track_clear_base_vars): Likewise.
      
      From-SVN: r265745
      Richard Biener committed
    • [C++ PATCH] refactor duplicate_decls · 4155777d
      https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00085.html
      	gcc/cp/
      	* decl.c (duplicate_decls): Refactor checks.
      	gcc/testsuite/
      	* g++.dg/lookup/crash6.C: Adjust error
      	* g++.dg/parse/crash38.C: Likewise.
      
      From-SVN: r265744
      Nathan Sidwell committed
    • Remove SPARC HAVE_AS_REGISTER_PSEUDO_OP · 97f5962a
      	* configure.ac (gcc_cv_as_sparc_register_op): Remove.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      	* config/sparc/sparc.c (sparc_output_scratch_registers): Remove
      	HAVE_AS_REGISTER_PSEUDO_OP guard.
      	* config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
      	!HAVE_AS_REGISTER_PSEUDO_OP support.
      	(ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
      	guard.
      
      From-SVN: r265743
      Rainer Orth committed