1. 11 Mar, 2016 7 commits
    • re PR rtl-optimization/70174 (ICE at -O1 and above on x86_64-linux-gnu in… · 686d390a
      re PR rtl-optimization/70174 (ICE at -O1 and above on x86_64-linux-gnu in gen_lowpart_general, at rtlhooks.c:63)
      
      	PR rtl-optimization/70174
      	* expmed.c (store_bit_field_using_insv): Use gen_lowpart_if_possible
      	followed by gen_lowpart on force_reg instead of just gen_lowpart.
      
      	* gcc.dg/pr70174.c: New test.
      
      From-SVN: r234137
      Jakub Jelinek committed
    • re PR tree-optimization/70169 (ICE at -O1 and above on x86_64-linux-gnu in… · 02d472a2
      re PR tree-optimization/70169 (ICE at -O1 and above on x86_64-linux-gnu in gen_lsm_tmp_name, at tree-ssa-loop.c:791)
      
      	PR tree-optimization/70169
      	* tree-ssa-loop.c (gen_lsm_tmp_name): Handle FUNCTION_DECL and
      	LABEL_DECL like VAR_DECL.  Emit nothing instead of gcc_unreachable
      	for unknown codes.
      
      	* gcc.dg/pr70169.c: New test.
      
      From-SVN: r234136
      Jakub Jelinek committed
    • re PR rtl-optimization/70160 (gcc ICE at -O2 (seg fault) and above on valid code… · 0f9befa1
      re PR rtl-optimization/70160 (gcc ICE at -O2 (seg fault) and above on valid code on x86_64-linux-gnu)
      
      gcc/
      
      	PR target/70160
      	* config/i386/i386.c (scalar_chain::convert_reg): Skip uses
      	of uninitialized values.
      
      gcc/testsuite/
      
      	PR target/70160
      	* gcc.target/i386/pr70160.c: New test.
      
      Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
      
      From-SVN: r234135
      Ilya Enkovich committed
    • S/390: Fix rounding for _Decimal128 to _Decimal32 conversion · 432d4670
      We do not have a direct conversion instruction from 128 bit DFP to 32
      bit DFP so this needs to be done in two steps.  The first needs to be
      done with the "prepare for shorter precision rounding mode" in order
      to produce a correct result.
      
      gcc/ChangeLog:
      
      2016-03-11  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
      
      	* config/s390/s390.md ("trunctddd2"): Turn former define_insn into
      	define_expand.
      	("*trunctddd2"): New pattern definition.
      	("trunctdsd2"): Set prep_for_short_prec rounding mode for the
      	TD->DD truncation.
      
      gcc/testsuite/ChangeLog:
      
      2016-03-11  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
      
      	* gcc.target/s390/dfp-1.c: New test.
      
      From-SVN: r234134
      Andreas Krebbel committed
    • S/390: Define macros for rounding mode constants · ae8e301e
      This patch replaces a few magic numbers used for floating point
      rounding modes with macros.  This is mostly a NoOp change apart from:
      
      fixuns_truncdddi2, fixuns_trunctddi2, fixuns_trunc<mode>si2: Replace 5
      with DFP_RND_TOWARD_0 (which is 9).
      
      5 as well as 9 represent round towards 0 with the difference that for
      5 the new DFP quantum exception is enabled as well.  This exception
      isn't IEEE754 and we do not have an interface to enable and test it
      anyway.  So we do not intend to enable it.  This so far should not
      have any noticable effect since the quantum exception was not
      observable through the Posix functions.
      
      Some pattern ("fix_trunc<mode>di2") is already using rounding mode 9
      correctly.
      
      gcc/ChangeLog:
      
      2016-03-11  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
      
      	* config/s390/s390.md (BFP_RND_*, DFP_RND_*): Add new constant
      	definitions for BFP and DFP rounding modes.
      	("fixuns_truncdddi2", "fixuns_trunctddi2")
      	("fixuns_trunc<BFP:mode><GPR:mode>2", "fixuns_trunc<mode>si2")
      	("fix_trunc<DSF:mode><GPR:mode>2", "fix_trunc<mode>di2")
      	("fix_trunctf<mode>2"): Use the new constants instead of magic
      	numbers.
      
      From-SVN: r234133
      Andreas Krebbel committed
    • S/390: Rename shift_count_or_setmem_operand to setmem_operand · dd95128b
      The shift_count_or_setmem_operand predicate is now only used for
      setmem patterns anymore.  Rename it together with the related
      functions.
      
      gcc/ChangeLog:
      
      2016-03-11  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
      
      	* config/s390/constraints.md: Adjust comment.
      	("Y"): Adjust comment.  Rename s390_decompose_shift_count to
      	s390_decompose_addrstyle_without_index.
      	* config/s390/predicates.md (shift_count_or_setmem_operand):
      	Rename to setmem_operand.
      	* config/s390/s390-protos.h
      	(s390_decompose_shift_count): Rename to
      	s390_decompose_addrstyle_without_index.
      	* config/s390/s390.c (s390_decompose_shift_count)
      	(s390_mem_constraint, print_shift_count_operand)
      	(print_operand_address, print_operand): Rename
      	s390_decompose_shift_count to
      	s390_decompose_addrstyle_without_index and rename
      	print_shift_count_operand to print_addrstyle_operand troughout the
      	file.
      	* config/s390/s390.md ("setmem_long_<P:mode>", "*setmem_long")
      	("*setmem_long_and", "*setmem_long_31z", "*setmem_long_and_31z"):
      	Rename shift_count_or_setmem_operand to setmem_operand.
      	* config/s390/vx-builtins.md ("vec_insert<mode>")
      	("vec_promote<mode>"): Replace shift_count_or_setmem_operand with
      	nonmemory_operand.
      
      From-SVN: r234132
      Andreas Krebbel committed
    • Daily bump. · a0232c64
      From-SVN: r234130
      GCC Administrator committed
  2. 10 Mar, 2016 20 commits
  3. 09 Mar, 2016 13 commits
    • re PR tree-optimization/70152 (gcc ICE at -O3 and above on valid code on… · c2864f02
      re PR tree-optimization/70152 (gcc ICE at -O3 and above on valid code on x86_64-linux-gnu in "replace_uses_by")
      
      	PR tree-optimization/70152
      	* tree-sra.c (replace_removed_params_ssa_names): Copy over
      	SSA_NAME_OCCURS_IN_ABNORMAL_PHI from old_name to new_name.
      
      	* gcc.dg/pr70152.c: New test.
      
      From-SVN: r234092
      Jakub Jelinek committed
    • re PR target/70086 (ICE: in extract_constrain_insn_cached, at recog.c:2202 (insn… · 3433b975
      re PR target/70086 (ICE: in extract_constrain_insn_cached, at recog.c:2202 (insn does not satisfy its constraints) with -mavx512vl -ffloat-store)
      
      	PR target/70086
      	* config/i386/i386.md (truncdfsf2 splitter): Use gen_vec_concatv2df
      	instead of gen_sse2_loadlpd.
      	* config/i386/sse.md (*vec_concatv2df): Rename to...
      	(vec_concatv2df): ... this.
      
      	* gcc.target/i386/pr70086-1.c: New test.
      	* gcc.target/i386/pr70086-2.c: New test.
      	* gcc.target/i386/pr70086-3.c: New test.
      
      From-SVN: r234091
      Jakub Jelinek committed
    • re PR middle-end/70127 (wrong code on x86_64-linux-gnu at -O3 in 32-bit and 64-bit modes) · 2bd8090f
      	PR tree-optimization/70127
      	* fold-const.c (operand_equal_p): Revert the 2015-10-28 change.
      
      	* gcc.c-torture/execute/pr70127.c: New test.
      
      From-SVN: r234090
      Jakub Jelinek committed
    • c-parser.c (c_parser_oacc_loop): Update cclauses and clauses when calling c_finish_omp_clauses. · 96b3c82d
      	gcc/c/
      	* c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
      	when calling c_finish_omp_clauses.
      
      	gcc/cp/
      	* parser.c (cp_parser_oacc_loop): Update cclauses and clauses
      	when calling c_finish_omp_clauses.
      
      	gcc/testsuite/
      	* c-c++-common/goacc/combined-directives-2.c: New test.
      
      From-SVN: r234089
      Cesar Philippidis committed
    • PR c++/70105: prevent nonsensical underline spew for macro expansions · b4f3232d
      diagnostic_show_locus can sometimes do the wrong thing when handling
      expressions built up from macros.
      
      PR c++/70105 (currently marked as a P3 regression) has an example of
      a diagnostic where over 500 lines of irrelevant source are printed,
      and underlined, giving >1000 lines of useless spew to stderr.
      
      This patch adds extra sanitization to diagnostic-show-locus.c, so that
      we only attempt to print underlines and secondary locations if such
      locations are "sufficiently sane" relative to the primary location
      of a diagnostic.
      
      This "sufficiently sane" condition is implemented by a new helper
      function compatible_locations_p, which requires such locations to
      have the same macro expansion hierarchy as the primary location,
      using linemap_macro_map_loc_unwind_toward_spelling, effectively
      mimicing the expansion performed by LRK_SPELLING_LOCATION.
      
      This may be too strong a condition, but it effectively fixes
      PR c++/70105, without removing any underlines in my testing.
      
      Successfully bootstrapped&regrtested in combination with the previous
      patch on x86_64-pc-linux-gnu; adds 15 new PASS results to g++.sum
      and 4 new PASS results to gcc.sum.
      
      gcc/ChangeLog:
      	PR c/68473
      	PR c++/70105
      	* diagnostic-show-locus.c (compatible_locations_p): New function.
      	(layout::layout): Sanitize ranges using compatible_locations_p.
      
      gcc/testsuite/ChangeLog:
      	PR c/68473
      	PR c++/70105
      	* g++.dg/diagnostic/pr70105.C: New test.
      	* gcc.dg/plugin/diagnostic-test-expressions-1.c (foo): New decl.
      	(test_multiple_ordinary_maps): New test function.
      
      libcpp/ChangeLog:
      	PR c/68473
      	PR c++/70105
      	* line-map.c (linemap_macro_map_loc_unwind_toward_spelling): Move
      	decl...
      	* include/line-map.h
      	(linemap_macro_map_loc_unwind_toward_spelling): ...here,
      	converting from static to extern.
      
      From-SVN: r234088
      David Malcolm committed
    • PR c++/70105: Defer location expansion until diagnostic_show_locus · 40499f81
      gcc/ChangeLog:
      	PR c/68473
      	PR c++/70105
      	* diagnostic-show-locus.c (layout_range::layout_range): Replace
      	location_range param with three const expanded_locations * and a
      	bool.
      	(layout::layout): Replace call to
      	rich_location::lazily_expand_location with get_expanded_location.
      	Extract the range and perform location expansion here, passing
      	the results to the layout_range ctor.
      	* diagnostic.c (source_range::debug): Delete.
      	* diagnostic.h (diagnostic_expand_location): Reimplement in terms
      	of rich_location::get_expanded_location.
      	* gcc-rich-location.c (get_range_for_expr): Delete.
      	(gcc_rich_location::add_expr): Reimplement to avoid the
      	rich_location::add_range overload that took a location_range,
      	passing a location_t instead.
      
      gcc/testsuite/ChangeLog:
      	PR c/68473
      	PR c++/70105
      	* gcc.dg/plugin/diagnostic_plugin_show_trees.c (show_tree):
      	Drop range information from call to inform_at_rich_loc.
      	* gcc.dg/plugin/diagnostic_plugin_test_show_locus.c (add_range):
      	New.
      	(test_show_locus): Replace calls to rich_location::add_range with
      	calls to add_range.  Rewrite the tests that used the now-defunct
      	rich_location ctor taking a source_range.  Simplify other tests
      	by replacing calls to COMBINE_LOCATION_DATA with calls to
      	make_location.
      
      libcpp/ChangeLog:
      	PR c/68473
      	PR c++/70105
      	* include/line-map.h (source_range::debug): Delete.
      	(struct location_range): Update comment.  Replace
      	expanded_location fields "m_start", "m_finish", and "m_caret" with
      	a source_location field: "m_loc".
      	(class rich_location): Reword comment.
      	(rich_location::get_loc): Reimplement in terms of a new overloaded
      	variant which takes an unsigned int.
      	(rich_location::get_loc_addr): Delete.
      	(rich_location::add_range): Drop params "start" and "finish" in
      	favor of param "loc".  Drop overloaded variants taking a
      	source_range or location_range *.
      	(rich_location::lazily_expand_location): Delete in favor of...
      	(rich_location::get_expanded_location): New decl.
      	(rich_location::m_loc): Delete field.
      	(rich_location::m_column_override): New field.
      	* line-map.c (rich_location::rich_location):  Drop name of
      	line_maps * param.  Update initializations for deletion of field
      	"m_loc" and addition of field "m_column_override".  Reimplement
      	body as a call to add_range.  Delete overloaded variant taking a
      	source_range.
      	(rich_location::get_loc): New function.
      	(rich_location::lazily_expand_location): Delete in favor of...
      	(rich_location::get_expanded_location): New function.
      	(rich_location::override_column): Reimplement.
      	(rich_location::add_range): Drop params "start" and "finish" in
      	favor of param "loc".  Eliminate location expansion in favor of
      	simply storing loc.  Drop overloaded variants taking a
      	source_range or location_range *.
      	(rich_location::set_range): Eliminate location expansion.
      
      From-SVN: r234087
      David Malcolm committed
    • re PR tree-optimization/70138 (wrong code at -O3 on x86_64-linux-gnu) · c9e33662
      2016-03-09  Richard Biener  <rguenther@suse.de>
      	Jakub Jelinek  <jakub@redhat.com>
      
      	PR tree-optimization/70138
      	* tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer):
      	Also skip vect_double_reduction_def.
      
      	* gcc.dg/vect/pr70138-1.c: New testcase.
      	* gcc.dg/vect/pr70138-2.c: Likewise.
      
      Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
      
      From-SVN: r234086
      Richard Biener committed
    • re PR target/70049 (Error: operand size mismatch for `vpextrw' (wrong assembly… · 2c73b764
      re PR target/70049 (Error: operand size mismatch for `vpextrw' (wrong assembly generated) with -masm=intel)
      
      	PR target/70049
      	* config/i386/sse.md (*vec_extract<mode>): Use %0 instead of %k0
      	if the operand is "m".
      
      	* gcc.target/i386/pr70049.c: New test.
      
      From-SVN: r234085
      Jakub Jelinek committed
    • re PR c/70143 (false strict-aliasing warning) · c06d25bb
      2016-03-09  Richard Biener  <rguenther@suse.de>
      
      	c-family/
      	PR c/70143
      	* c-common.c (strict_aliasing_warning): Add back
      	alias_sets_conflict_p check.
      
      	* gcc.dg/Wstrict-aliasing-bogus-upcast.c: New testcase.
      	* gcc.dg/Wstrict-aliasing-struct-with-char-member.c: Likewise.
      	* gcc.dg/Wstrict-aliasing-struct-member.c: Remove again.
      
      From-SVN: r234084
      Richard Biener committed
    • Really don't xfail gcc.dg/vect/bb-slp-34.c on aarch64, arm · 5828a501
      	* gcc.dg/vect/bb-slp-34.c: Really don't xfail on aarch64-*-*,
      	arm-*-*.
      
      From-SVN: r234081
      Rainer Orth committed
    • re PR target/67278 (ICE: verify_gimple failed on darwin 14.5 x86_64) · 5a9def37
      	PR middle-end/67278
      	* gcc.dg/simd-7.c: Add -w -Wno-psabi to dg-options.
      
      From-SVN: r234080
      Jakub Jelinek committed
    • re PR target/67278 (ICE: verify_gimple failed on darwin 14.5 x86_64) · 2e141c8d
      	PR target/67278
      	* gcc.dg/simd-8.c: Add -w -Wno-psabi to dg-options.
      
      	PR middle-end/70050
      	* gcc.dg/pr70050.c: Add -w to dg-options.  Fix up PR number
      	in testcase comment.
      
      From-SVN: r234079
      Jakub Jelinek committed