1. 17 Aug, 2017 4 commits
    • gimplify.c (gimplify_adjust_omp_clauses): Compare with 0 instead of 1. · cca6b724
      	* gimplify.c (gimplify_adjust_omp_clauses): Compare with 0 instead of
      	1.
      
      From-SVN: r251142
      Marek Polacek committed
    • tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p to true when overflow… · 344be1fd
      tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p to true when overflow is undefined and we saturated the...
      
      2017-08-17  Richard Biener  <rguenther@suse.de>
      
      	* tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p
      	to true when overflow is undefined and we saturated the
      	result.
      
      	* gcc.dg/tree-ssa/vrp117.c: New testcase.
      
      From-SVN: r251141
      Richard Biener committed
    • [RS6000] PR 80938, Don't emit frame info for regs that don't need saving · b263d657
      It is possible when using out-of-line register saves or store multiple
      to save some registers unnecessarily, for example one reg in the block
      saved might be unused.  We don't need to emit frame info for those
      registers as that just bloats the info, and also can result in an ICE
      when shrink-wrap gives multiple paths through the function saving
      different sets of registers.  Join points need to have identical frame
      register save state regardless of the path taken.
      
      This patch reverts the previous fix for PR80939 "Use SAVE_MULTIPLE
      only if we restore what it saves (PR80938)" and instead fixes the PR
      by correcting the frame info.  The change to rs6000_savres_strategy
      is an optimization, but note that it hides the underlying problem in
      the PR testcase.
      
      	PR target/80938
      	* config/rs6000/rs6000.c (rs6000_savres_strategy): Revert 2017-08-09.
      	Don't use store multiple if only one reg needs saving.
      	(interesting_frame_related_regno): New function.
      	(rs6000_frame_related): Don't emit frame info for regs that
      	don't need saving.
      	(rs6000_emit_epilogue): Likewise.
      
      From-SVN: r251140
      Alan Modra committed
    • Daily bump. · 706028a5
      From-SVN: r251139
      GCC Administrator committed
  2. 16 Aug, 2017 16 commits
  3. 15 Aug, 2017 4 commits
    • Limit SH strncmp inline expansion (PR target/78460). · aaf46c35
      GCC mainline built for sh4-linux-gnu runs out of memory building a
      glibc test, which calls strncmp with very large constant size
      argument, resulting in the SH inline strncmp expansion trying to
      inline a fully unrolled expansion of strncmp for that size.
      
      This patch limits that fully unrolled expansion to the case of less
      than 32 bytes.  This is explicitly *not* trying to be optimal in any
      way (very likely a lower threshold makes sense), just to limit enough
      to avoid the out-of-memory issue in the glibc testsuite.
      
      I have *not* run the GCC testsuite for SH.  I have verified that this
      allows the glibc testsuite to build OK, with both GCC mainline and GCC
      7 branch (and that the included test builds quickly with patched GCC,
      runs out of memory with unpatched GCC).
      
      	PR target/78460
      	PR target/67712
      gcc:
      	* config/sh/sh-mem.cc (sh_expand_cmpnstr): Only unroll for
      	constant count if that count is less than 32.
      
      gcc/testsuite:
      	* gcc.c-torture/compile/string-large-1.c: New test.
      
      From-SVN: r251108
      Joseph Myers committed
    • Update .po files. · 6b789c7f
      	* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po,
      	ja.po, nl.po, ru.po, sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po,
      	zh_TW.po: Update.
      
      From-SVN: r251106
      Joseph Myers committed
    • gcc.c (execute): Emit friendlier message if inferior is killed by an external cause. · 466e6e8d
      	* gcc.c (execute): Emit friendlier message if inferior is killed
      	by an external cause.
      
      From-SVN: r251104
      Nathan Sidwell committed
    • re PR tree-optimization/81790 (ICE in vn_nary_build_or_lookup_1, at tree-ssa-sccvn.c:1738) · 204b99cd
      2017-08-15  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/81790
      	* tree-ssa-sccvn.c (vn_lookup_simplify_result): Handle both
      	CONSTRUCTORs from simplifying and VN.
      
      	* gcc.dg/torture/pr81790.c: New testcase.
      
      From-SVN: r251103
      Richard Biener committed
  4. 14 Aug, 2017 13 commits
    • builtin-attrs.def: Add comments. · c0ff19d5
      gcc/ChangeLog:
      
      	* builtin-attrs.def: Add comments.
      
      From-SVN: r251101
      Martin Sebor committed
    • PR c/81117 - Improve buffer overflow checking in strncpy - part 2 · 27be025d
      gcc/ChangeLog:
      
      	PR c/81117
      	* doc/extend.texi (attribute nonstring): Document new attribute.
      
      gcc/c-family/ChangeLog:
      
      	PR c/81117
      	* c-attribs.c (c_common_attribute_table): Add nonstring entry.
      	(handle_nonstring_attribute): New function.
      
      gcc/testsuite/ChangeLog:
      
      	PR c/81117
      	* c-c++-common/attr-nonstring-1.c: New test.
      
      From-SVN: r251100
      Martin Sebor committed
    • PR c/81117 - Improve buffer overflow checking in strncpy - part 1 · da67acb9
      gcc/ChangeLog:
      
              PR c/81117
      	* tree-diagnostic.c (default_tree_printer): Handle %G.
      	* gimple-pretty-print.h (percent_G_format): Declare new function.
      	* gimple-pretty-print.c (percent_G_format): Define.
      	* tree-pretty-print.c (percent_K_format): Add argument.
      
      gcc/c/ChangeLog:
      
      	PR c/81117
      	* c-objc-common.c (c_objc_common_init): Handle 'G'.
      
      gcc/c-family/ChangeLog:
      
      	PR c/81117
      	* c-format.h (T89_G): New macro.
      	* c-format.c (local_gcall_ptr_node): New variable.
      	(init_dynamic_diag_info): Initialize it.
      
      gcc/cp/ChangeLog:
      
      	PR c/81117
      	* error.c (cp_printer): Handle 'G'.
      
      gcc/testsuite/ChangeLog:
      
      	PR c/81117
      	* gcc.dg/format/gcc_diag-10.c: Exercise %G.
      
      From-SVN: r251098
      Martin Sebor committed
    • ucnid-5.c: Skip on AIX. · 9e3b1778
              * gcc.dg/ucnid-5.c: Skip on AIX.
              * gcc.target/powerpc/pr79909.c: Skip on AIX.
      
      From-SVN: r251097
      David Edelsohn committed
    • PR translation/79998 - typo in diagnostic "specified bound %wu" · 3a66f913
      gcc/ChangeLog:
      	* gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call):
      	Remove a stray space.
      
      From-SVN: r251096
      Martin Sebor committed
    • re PR target/46091 (missed optimization: x86 bt/btc/bts instructions) · 2912db04
      	PR target/46091
      	* config/i386/i386.md (*anddi_1_btr): New insn_and_split pattern.
      	(*iordi_1_bts): Ditto.
      	(*xordi_1_btc): Ditto.
      
      testsuite/ChangeLog:
      
      	PR target/46091
      	* gcc.target/i386/pr46091-1.c: New test.
      	* gcc.target/i386/pr46091-2.c: Ditto.
      	* gcc.target/i386/pr46091-3.c: Ditto.
      
      From-SVN: r251095
      Uros Bizjak committed
    • [AArch64] Fix longbranch test · c7fd2176
      Fix longbranch test so it still generates long tbz branches.
      
          gcc/testsuite/
      	PR target/81643
      	* gcc.target/aarch64/long_branch_1.c: Improve testcase.
      
      From-SVN: r251094
      Wilco Dijkstra committed
    • re PR target/79845 (rs6000: make code in rs6000.c more i18n-friendly) · a72a7e39
      [gcc]
      
      2017-08-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	PR target/79845
      	* config/rs6000/linux64.h (INVALID_64BIT): Use quoted strings.
      	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
      	Likewise.
      	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Use
      	quoted strings, and make more translator-friendly.
      	(darwin_rs6000_override_options): Likewise.
      	(rs6000_option_override_internal): Likewise.
      	(rs6000_return_in_memory): Fix overlong line.
      	(init_cmulative_args): Use quoted strings, and make more
      	translator-friendly.
      	(rs6000_pass_by_reference): Fix overlong line.
      	(def_builtin): Use quoted strings.
      	(altivec_expand_predicate_builtin): Use quoted strings, and make
      	more translator-friendly.
      	(htm_expand_builtin): Use quoted strings.
      	(cpu_expand_builtin): Use quoted strings, and make more
      	translator-friendly.
      	(altivec_expand_builtin): Likewise.
      	(paired_expand_predicate_builtin): Likewise.
      	(rs6000_invalid_builtin): Likewise.
      	(builtin_function_type): Use quoted strings.
      	(rs6000_expand_split_stack_prologue): Use quoted strings, and make
      	more translator-friendly.
      	(rs6000_trampoline_init): Likewise.
      	(rs6000_handle_altivec_attribute): Likewise.
      	(rs6000_inner_target_options): Use quoted strings.
      	(rs6000_disable_incompatible_switches): Likewise.
      	* config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Use quoted
      	strings, and make more translator-friendly.
      	(SUBSUBTARGET_OVERRIDE_OPTIONS): Use quoted strings.
      
      [gcc/testsuite]
      
      2017-08-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	PR target/79845
      	* g++.dg/ext/altivec-cell-5.C: Adjust diagnostic strings.
      	* gcc.target/powerpc/altivec-cell-5.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-cmp-exp-eq-2.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-cmp-exp-gt-2.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-cmp-exp-lt-2.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-cmp-exp-unordered-2.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-extract-exp-1.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-extract-exp-4.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-extract-exp-5.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-extract-sig-1.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-extract-sig-4.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-extract-sig-5.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-1.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-10.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-11.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-4.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-7.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-test-data-class-11.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-test-data-class-6.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-test-data-class-7.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-test-neg-2.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-test-neg-3.c: Likewise.
      	* gcc.target/powerpc/bfp/scalar-test-neg-5.c: Likewise.
      	* gcc.target/powerpc/bfp/vec-extract-exp-2.c: Likewise.
      	* gcc.target/powerpc/bfp/vec-extract-exp-3.c: Likewise.
      	* gcc.target/powerpc/bfp/vec-extract-sig-2.c: Likewise.
      	* gcc.target/powerpc/bfp/vec-extract-sig-3.c: Likewise.
      	* gcc.target/powerpc/bfp/vec-insert-exp-2.c: Likewise.
      	* gcc.target/powerpc/bfp/vec-insert-exp-3.c: Likewise.
      	* gcc.target/powerpc/bfp/vec-insert-exp-6.c: Likewise.
      	* gcc.target/powerpc/bfp/vec-insert-exp-7.c: Likewise.
      	* gcc.target/powerpc/bfp/vec-test-data-class-2.c: Likewise.
      	* gcc.target/powerpc/bfp/vec-test-data-class-3.c: Likewise.
      	* gcc.target/powerpc/byte-in-either-range-1.c: Likewise.
      	* gcc.target/powerpc/byte-in-range-1.c: Likewise.
      	* gcc.target/powerpc/byte-in-set-1.c: Likewise.
      	* gcc.target/powerpc/byte-in-set-2.c: Likewise.
      	* gcc.target/powerpc/cmpb-3.c: Likewise.
      	* gcc.target/powerpc/crypto-builtin-2.c: Likewise.
      	* gcc.target/powerpc/dfp/dtstsfi-1.c: Likewise.
      	* gcc.target/powerpc/dfp/dtstsfi-11.c: Likewise.
      	* gcc.target/powerpc/dfp/dtstsfi-16.c: Likewise.
      	* gcc.target/powerpc/dfp/dtstsfi-21.c: Likewise.
      	* gcc.target/powerpc/dfp/dtstsfi-26.c: Likewise.
      	* gcc.target/powerpc/dfp/dtstsfi-31.c: Likewise.
      	* gcc.target/powerpc/dfp/dtstsfi-36.c: Likewise.
      	* gcc.target/powerpc/dfp/dtstsfi-41.c: Likewise.
      	* gcc.target/powerpc/dfp/dtstsfi-46.c: Likewise.
      	* gcc.target/powerpc/dfp/dtstsfi-51.c: Likewise.
      	* gcc.target/powerpc/dfp/dtstsfi-56.c: Likewise.
      	* gcc.target/powerpc/dfp/dtstsfi-6.c: Likewise.
      	* gcc.target/powerpc/dfp/dtstsfi-61.c: Likewise.
      	* gcc.target/powerpc/dfp/dtstsfi-66.c: Likewise.
      	* gcc.target/powerpc/dfp/dtstsfi-71.c: Likewise.
      	* gcc.target/powerpc/dfp/dtstsfi-76.c: Likewise.
      	* gcc.target/powerpc/no-r11-3.c: Likewise.
      	* gcc.target/powerpc/pr80098-1.c: Likewise.
      	* gcc.target/powerpc/pr80098-2.c: Likewise.
      	* gcc.target/powerpc/pr80098-3.c: Likewise.
      	* gcc.target/powerpc/pr80098-4.c: Likewise.
      	* gcc.target/powerpc/vsu/vec-all-nez-7.c: Likewise.
      	* gcc.target/powerpc/vsu/vec-any-eqz-7.c: Likewise.
      	* gcc.target/powerpc/vsu/vec-cmpnez-7.c: Likewise.
      	* gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c: Likewise.
      	* gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c: Likewise.
      	* gcc.target/powerpc/vsu/vec-xl-len-12.c: Likewise.
      	* gcc.target/powerpc/vsu/vec-xl-len-13.c: Likewise.
      	* gcc.target/powerpc/vsu/vec-xlx-7.c: Likewise.
      	* gcc.target/powerpc/vsu/vec-xrx-7.c: Likewise.
      	* gcc.target/powerpc/vsu/vec-xst-len-12.c: Likewise.
      	* gcc.target/powerpc/vsu/vec-xst-len-13.c: Likewise.
      
      From-SVN: r251092
      Bill Schmidt committed
    • re PR tree-optimization/81799 (ICE on valid code at -O3: verify_gimple failed) · 8d2d0de9
      	PR tree-optimization/81799
      	* tree-loop-distribution.c (version_loop_by_alias_check): Force
      	cond_expr to simple gimple operand.
      
      	gcc/testsuite
      	* gcc.dg/tree-ssa/pr81799.c: New.
      
      From-SVN: r251088
      Bin Cheng committed
    • Add check_effective_target_autoincdec. · 5316dd1b
      Add check_effective_target_autoincdec that returns true if a target
      runs the auto_inc_dec optimization pass.
      
          gcc/
      	* doc/sourcebuild.texi (autoincdec): Add autoincdec description.
      
          gcc/testsuite/
      	PR middle-end/46932
      	* gcc.dg/pr46932.c: Use dg-require-effective-target autoincdec.
      	* lib/target-supports.exp: Add check_effective_target_autoincdec.
      
      From-SVN: r251087
      Wilco Dijkstra committed
    • [AArch64] Fix dbl_mov_immediate_1.c test · 250db3f9
      gcc/testsuite:
      
      	* gcc.target/aarch64/dbl_mov_immediate_1.c: Add
      	-mno-pc-relative-literal-loads.
      
      From-SVN: r251086
      Szabolcs Nagy committed
    • re PR target/81754 (Building of cross compiler avr-elf is broken) · 7f2d3c4f
      gcc/
      	PR target/81754
      	PR target/81268
      	* config/avr/avr.opt (mgas-isr-prologues): New Var
      	avr_gasisr_prologues.
      	* config/avr/avr.md (gasisr, *gasisr): Use it instead of
      	TARGET_GASISR_PROLOGUES.
      	* config/avr/avr.c (avr_option_override): Same.
      	(avr_pass_pre_proep::execute): Same.
      
      From-SVN: r251085
      Georg-Johann Lay committed
    • Daily bump. · 4e5065e1
      From-SVN: r251080
      GCC Administrator committed
  5. 13 Aug, 2017 3 commits
    • i386: Replace frame pointer with stack pointer in debug insns · 15879ef7
      When we eliminate frame pointer, we should also replace frame pointer
      with stack pointer - UNITS_PER_WORD in debug insns.  This patch fixed:
      
      FAIL: gcc.dg/guality/pr58791-5.c   -Os  line pr58791-5.c:20 b1 == 9
      FAIL: gcc.dg/guality/pr58791-5.c   -Os  line pr58791-5.c:20 b2 == 73
      FAIL: gcc.dg/guality/pr58791-5.c   -Os  line pr58791-5.c:20 b3 == 585
      FAIL: gcc.dg/guality/pr58791-5.c   -Os  line pr58791-5.c:20 b4 == 4681
      FAIL: gcc.dg/guality/pr59776.c   -Os  line pr59776.c:17 s1.f == 5.0
      FAIL: gcc.dg/guality/pr59776.c   -Os  line pr59776.c:17 s1.g == 6.0
      FAIL: gcc.dg/guality/pr59776.c   -Os  line pr59776.c:17 s2.g == 6.0
      FAIL: gcc.dg/guality/pr59776.c   -Os  line pr59776.c:20 s1.f == 5.0
      FAIL: gcc.dg/guality/pr59776.c   -Os  line pr59776.c:20 s1.g == 6.0
      FAIL: gcc.dg/guality/pr59776.c   -Os  line pr59776.c:20 s2.f == 5.0
      FAIL: gcc.dg/guality/pr59776.c   -Os  line pr59776.c:20 s2.g == 6.0
      
      on Linux/i386.
      
      	PR target/81820
      	* config/i386/i386.c (ix86_finalize_stack_frame_flags): Replace
      	frame pointer with stack pointer - UNITS_PER_WORD in debug insns.
      
      From-SVN: r251076
      H.J. Lu committed
    • i386.md (*load_tp_<mode>): Redefine as define_insn_and_split. · cfc72af0
      	* config/i386/i386.md (*load_tp_<mode>): Redefine as
      	define_insn_and_split.  Split to a memory load from 0 in
      	DEFAULT_TLS_SEG_REG address space.  Merge with *load_tp_x32
      	using PTR mode iterator.
      	(*load_tp_x32_zext"): Redefine as define_insn_and_split.
      	Split to a memory load from 0 in DEFAULT_TLS_SEG_REG address space.
      	(*add_tp_<mode>): Redefine as define_insn_and_split.
      	Split to an add with a memory load from 0 in DEFAULT_TLS_SEG_REG
      	address space.  Merge with *add_tp_x32 using PTR mode iterator.
      	(*add_tp_x32_zext"): Redefine as define_insn_and_split.
      	Split to an add with a  memory load from 0 in
      	DEFAULT_TLS_SEG_REG address space.
      
      From-SVN: r251075
      Uros Bizjak committed
    • gfortran.texi: Document format of unformatted sequential files. · 04c4bb30
      2017-08-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	* gfortran.texi: Document format of unformatted sequential files.
      
      From-SVN: r251074
      Thomas Koenig committed