1. 13 Sep, 2019 8 commits
    • gnatmake: Accept the `--sysroot=' GCC driver option · a6fa2e83
      According to `gnatmake' documentation:
      
      "Any uppercase or multi-character switch that is not a 'gnatmake' switch
      is passed to 'gcc' (e.g., '-O', '-gnato,' etc.)"
      
      however the `--sysroot=' switch is actually rejected:
      
      gnatmake: invalid switch: --sysroot=...
      
      likely because it is one of the very few GCC driver options that have a 
      leading double dash and therefore we don't have a blanket fall-through 
      for such switches that would satisfy what our documentation claims.
      
      The option is actually shared between the compiler and the linker, so 
      pass the switch to both build stages if requested, removing GNAT 
      testsuite issues like:
      
      gnatmake: invalid switch: --sysroot=.../sysroot
      compiler exited with status 1
      Executing on host: .../gcc/gnatclean -c -q -n ./abstract_with_anonymous_result   (timeout = 300)
      spawn -ignore SIGHUP .../gcc/gnatclean -c -q -n ./abstract_with_anonymous_result
      PASS: gnat.dg/abstract_with_anonymous_result.adb (test for excess errors)
      UNRESOLVED: gnat.dg/abstract_with_anonymous_result.adb compilation failed to produce executable
      
      in a test environment where `--with-build-sysroot=.../sysroot' has been 
      used to build a cross-compiler.  Passing to the compilation stage only 
      would lead to errors like:
      
      .../bin/riscv64-linux-gnu-ld: cannot find crt1.o: No such file or directory
      .../bin/riscv64-linux-gnu-ld: cannot find -lc
      collect2: error: ld returned 1 exit status
      gnatlink: error when calling .../gcc/xgcc
      gnatmake: *** link failed.
      compiler exited with status 1
      Executing on host: .../gcc/gnatclean -c -q -n ./abstract_with_anonymous_result   (timeout = 300)
      spawn -ignore SIGHUP .../gcc/gnatclean -c -q -n ./abstract_with_anonymous_result
      ./abstract_with_anonymous_result.ali
      ./abstract_with_anonymous_result.o
      FAIL: gnat.dg/abstract_with_anonymous_result.adb (test for excess errors)
      Excess errors:
      .../bin/riscv64-linux-gnu-ld: cannot find crt1.o: No such file or directory
      .../bin/riscv64-linux-gnu-ld: cannot find -lc
      gnatlink: error when calling .../gcc/xgcc
      
      UNRESOLVED: gnat.dg/abstract_with_anonymous_result.adb compilation failed to produce executable
      
      instead.
      
      	gcc/ada/
      	* make.adb (Scan_Make_Arg): Also accept `--sysroot=' for the 
      	compiler and the linker.
      
      From-SVN: r275702
      Maciej W. Rozycki committed
    • re PR middle-end/91708 ([ARM] Bootstrap fails in gen_movsi, at config/arm/arm.md:5258) · 23741374
      2019-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              PR middle-end/91708
              * cse.c (cse_insn): Do not replace anything with a
              MEM.
      
      From-SVN: r275701
      Bernd Edlinger committed
    • libgo: don't use \? in grep pattern · 57cccc86
          
          It's not supported by Solaris grep.  Just use * instead; it matches
          more but it shouldn't matter.
          
          Fixes https://gcc.gnu.org/PR91764
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/195238
      
      From-SVN: r275700
      Ian Lance Taylor committed
    • * doc/invoke.texi (Optimize Options): Fix typo. · 9a235e7e
      From-SVN: r275699
      Ian Lance Taylor committed
    • re PR fortran/91716 (ICE in output_constant, at varasm.c:5026) · 22cd0312
      2019-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              PR fortran/91716
              * trans-array.c (gfc_conv_array_initializer): Always assign the
              array type of the field to the string constant.
      
      testsuite:
      2019-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              PR fortran/91716
              * gfortran.dg/pr91716.f90: New test.
      
      From-SVN: r275698
      Bernd Edlinger committed
    • [PATCH][GCC] Update my email address · 0d1cfeed
      gcc/ChangeLog
      2019-09-13  Sam Tebbs  <sam.tebbs@arm.com>
      
      	* MAINTAINERS (Sam Tebbs): Update email address.
      
      From-SVN: r275697
      Sam Tebbs committed
    • re PR fortran/91717 (ICE on concatenating deferred-length character and character literal) · e4dc7c65
      2019-09-13  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/91717
      	* dependency.c (gfc_dep_resolver): Flag identical components
      	and exit with return value 1 if set and no array refs.
      
      2019-09-13  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/91717
      	* gfortran.dg/dependency_55.f90 : New test.
      
      From-SVN: r275696
      Paul Thomas committed
    • Daily bump. · e5b3c74b
      From-SVN: r275695
      GCC Administrator committed
  2. 12 Sep, 2019 6 commits
    • re PR tree-optimization/89386 (Generation of vectorized MULHRS (Multiply High… · d6ecb707
      re PR tree-optimization/89386 (Generation of vectorized MULHRS (Multiply High with Round and Scale) instruction)
      
      	PR tree-optimization/89386
      	* config/i386/sse.md (smulhrs<mode>3): New expander.
      	(smulhrsv4hi3): Ditto.
      
      testsuite/ChangeLog:
      
      	PR tree-optimization/89386
      	* gcc.target/i386/pr89386.c: New test.
      	* gcc.target/i386/pr89386-1.c: Ditto.
      
      From-SVN: r275689
      Uros Bizjak committed
    • re PR tree-optimization/91750 (Induction vectorization introduces signed overflows) · bdc91a32
      2019-09-12  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/91750
      	* tree-vect-loop.c (vectorizable_induction): Compute IV increments
      	in the type of the evolution.
      
      	* gcc.dg/vect/pr91750.c: New testcase.
      
      From-SVN: r275685
      Richard Biener committed
    • PR libstdc++/91748 fix std::for_each_n for random access iterators · 52f6afe0
      	PR libstdc++/91748
      	* include/bits/stl_algo.h (for_each_n): Fix random access iterator
      	case.
      	* testsuite/25_algorithms/for_each/for_each_n.cc: Test with random
      	access iterators.
      
      From-SVN: r275683
      Jonathan Wakely committed
    • Vectorise multiply high with scaling operations (PR 89386) · 58cc9876
      2019-09-12  Yuliang Wang  <yuliang.wang@arm.com>
      
      gcc/
      	PR tree-optimization/89386
      	* config/aarch64/aarch64-sve2.md (<su>mull<bt><Vwide>)
      	(<r>shrnb<mode>, <r>shrnt<mode>): New SVE2 patterns.
      	(<su>mulh<r>s<mode>3): New pattern for MULHRS.
      	* config/aarch64/iterators.md (UNSPEC_SMULLB, UNSPEC_SMULLT)
      	(UNSPEC_UMULLB, UNSPEC_UMULLT, UNSPEC_SHRNB, UNSPEC_SHRNT)
      	(UNSPEC_RSHRNB, UNSPEC_RSHRNT, UNSPEC_SMULHS, UNSPEC_SMULHRS)
      	UNSPEC_UMULHS, UNSPEC_UMULHRS): New unspecs.
      	(MULLBT, SHRNB, SHRNT, MULHRS): New int iterators.
      	(su, r): Handle the unspecs above.
      	(bt): New int attribute.
      	* internal-fn.def (IFN_MULHS, IFN_MULHRS): New internal functions.
      	* internal-fn.c (first_commutative_argument): Commutativity info for
      	above.
      	* optabs.def (smulhs_optab, smulhrs_optab, umulhs_optab)
      	(umulhrs_optab): New optabs.
      	* doc/md.texi (smulhs$var{m3}, umulhs$var{m3})
      	(smulhrs$var{m3}, umulhrs$var{m3}): Documentation for the above.
      	* tree-vect-patterns.c (vect_recog_mulhs_pattern): New pattern
      	function.
      	(vect_vect_recog_func_ptrs): Add it.
      	* testsuite/gcc.target/aarch64/sve2/mulhrs_1.c: New test.
      	* testsuite/gcc.dg/vect/vect-mulhrs-1.c: As above.
      	* testsuite/gcc.dg/vect/vect-mulhrs-2.c: As above.
      	* testsuite/gcc.dg/vect/vect-mulhrs-3.c: As above.
      	* testsuite/gcc.dg/vect/vect-mulhrs-4.c: As above.
      	* doc/sourcebuild.texi (vect_mulhrs_hi): Document new target selector.
      	* testsuite/lib/target-supports.exp
      	(check_effective_target_vect_mulhrs_hi): Return true for AArch64
      	with SVE2.
      
      From-SVN: r275682
      Yuliang Wang committed
    • Daily bump. · 8c58d9d8
      From-SVN: r275680
      GCC Administrator committed
  3. 11 Sep, 2019 19 commits
  4. 10 Sep, 2019 7 commits
    • PR c++/91673 - ICE with noexcept in alias-declaration. · 480c18e1
      	* parser.c (CP_PARSER_FLAGS_DELAY_NOEXCEPT): New parser flag.
      	(cp_parser_lambda_declarator_opt): Pass CP_PARSER_FLAGS_NONE to
      	cp_parser_exception_specification_opt.
      	(cp_parser_direct_declarator): Adjust a call to
      	cp_parser_exception_specification_opt.
      	(cp_parser_member_declaration): Pass CP_PARSER_FLAGS_DELAY_NOEXCEPT
      	to cp_parser_declarator if not processing a friend or typedef
      	declaration.
      	(cp_parser_late_noexcept_specifier): Adjust a call to
      	cp_parser_noexcept_specification_opt.
      	(cp_parser_noexcept_specification_opt): New parameter for parser flags,
      	drop the FRIEND_P parameter.  Use the new parameter.
      	(cp_parser_exception_specification_opt): Likewise.
      	(cp_parser_transaction): Adjust a call to
      	cp_parser_noexcept_specification_opt.
      	(cp_parser_transaction_expression): Likewise.
      
      	* g++.dg/cpp1z/using7.C: New test.
      	* g++.dg/cpp1z/using8.C: New test.
      
      From-SVN: r275617
      Marek Polacek committed
    • PR c++/91705 - constexpr evaluation rejects ++/-- on floats. · d85569f6
      	* constexpr.c (cxx_eval_increment_expression): Call fold_simple on
      	the offset.
      
      	* g++.dg/cpp1y/constexpr-incr2.C: New test.
      
      From-SVN: r275613
      Marek Polacek committed
    • libgo: Solaris and x/sys/cpu compatibility fixes · efc86492
          
          Restore Solaris compatibility fixes lost when internal/x/net/lif moved
          to golang.org/x/net/lif.  Also fix the Makefile for x/net/lif and
          x/net/route.
          
          Change x/sys/cpu to get the cache line size from goarch.sh as the
          gofrontend version of internal/cpu does.
          
          Partially based on work by Rainer Orth.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194438
      
      From-SVN: r275611
      Ian Lance Taylor committed
    • re PR go/91621 (libgo/mksysinfo.sh: please avoid test ==) · 4d7bfeec
      	PR go/91621
          mksysinfo: change test == to test =
          
          Fixes https://gcc.gnu.org/PR91621
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194569
      
      From-SVN: r275608
      Ian Lance Taylor committed
    • go/internal/gccgoimporter: support embedded field in pointer loop · a1fc3891
          
          Backport of https://golang.org/cl/194440.  Original description:
          
              If an embedded field refers to a type via a pointer, the parser needs
              to know the name of the embedded field. It is possible that the
              pointer type is not yet resolved. This CL fixes the parser to handle
              that case by setting the pointer element type to the unresolved named
              type while the pointer is being resolved.
          
          Updates golang/go#34182
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194562
      
      From-SVN: r275606
      Ian Lance Taylor committed
    • Remove call_really_used_regs · d7fb4c31
      After previous patches, it's now possible for call_used_regs to be
      the "real" set of call-clobbered registers, without any special
      handling for fixed registers.  This patch therefore removes the
      separate call_really_used_regs and updates the targets that define
      CALL_REALLY_USED_REGISTERS so that they handle call_used_regs in
      the same way that they used to handle call_really_used_regs.
      
      With this change, it's no longer necessary for targets that define
      CALL_REALLY_USED_REGISTERS to define CALL_USED_REGISTER as well.
      
      2019-09-10  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* doc/tm.texi.in: Document that exactly one of CALL_USED_REGISTERS
      	and CALL_REALLY_USED_REGISTERS must be defined, and that
      	CALL_REALLY_USED_REGISTERS is preferred.
      	* doc/tm.texi: Regenerate.
      	* hard-reg-set.h (target_hard_regs::x_call_really_used_regs): Delete.
      	(call_really_used_regs): Likewise.
      	* reginfo.c: Raise an #error if both CALL_USED_REGISTERS and
      	CALL_REALLY_USED_REGISTERS are defined.
      	(initial_call_used_regs): Use CALL_REALLY_USED_REGISTERS as the
      	initial value if defined.
      	(initial_call_really_used_regs): Delete.
      	(saved_call_really_used_regs): Likewise.
      	(CALL_REALLY_USED_REGNO_P): Likewise.
      	(init_reg_sets): Remove handling of call_really_used_regs.
      	(save_register_info, restore_register_info, globalize_reg): Likewise.
      	(init_reg_sets_1): Likewise.  Use call_used_regs instead of
      	CALL_REALLY_USED_REGNO_P.  Don't set call_used_regs for registers
      	outside operand_reg_set.
      	(fix_register): Don't change call_used_regs if
      	CALL_REALLY_USED_REGISTERS is defined.
      	* config/csky/csky.h (CALL_USED_REGISTERS): Delete.
      	* config/csky/csky.c (get_csky_live_regs): Use call_used_regs
      	instead of call_really_used_regs.
      	(csky_conditional_register_usage): Remove the old handling of
      	call_used_regs and change the handling of call_really_used_regs
      	to use call_used_regs instead.
      	* config/ia64/ia64.h (CALL_USED_REGISTERS): Delete.
      	* config/ia64/ia64.c (fix_range): Don't set call_used_regs when
      	making a register fixed.
      	* config/m32r/m32r.h (CALL_USED_REGISTERS): Delete.
      	* config/m32r/m32r.c (MUST_SAVE_REGISTER): Use call_used_regs
      	instead of call_really_used_regs.
      	(m32r_conditional_register_usage): Don't set call_used_regs when
      	making a register fixed.
      	* config/mips/mips.h (CALL_USED_REGISTERS): Delete.
      	* config/mips/mips.c (mips_global_pointer): Use call_used_regs
      	instead of call_really_used_regs.
      	(mips_interrupt_extra_call_saved_reg_p): Likewise.
      	(mips_cfun_call_saved_reg_p): Likewise.
      	(mips_swap_registers): Remove the old handling of call_used_regs
      	and change the handling of call_really_used_regs to use call_used_regs
      	instead.
      	(mips_conditional_register_usage): Likewise.
      	* config/mn10300/mn10300.h (CALL_USED_REGISTERS): Delete.
      	* config/mn10300/mn10300.c (fp_regs_to_save): Use call_used_regs
      	instead of call_really_used_regs.
      	(mn10300_get_live_callee_saved_regs): Likewise.
      	(mn10300_expand_prologue, mn10300_expand_epilogue): Likewise.
      	(mn10300_conditional_register_usage): Don't set call_used_regs when
      	making a register fixed.
      	* config/rs6000/rs6000.h (CALL_USED_REGISTERS): Delete.
      	* config/rs6000/rs6000.c (rs6000_conditional_register_usage):
      	Remove the old handling of call_used_regs and change the handling
      	of call_really_used_regs to use call_used_regs instead.
      	* config/s390/s390.h (CALL_USED_REGISTERS): Delete.
      	* config/s390/s390.c (s390_regs_ever_clobbered): Use call_used_regs
      	instead of call_really_used_regs.
      	(s390_register_info_gprtofpr, s390_register_info): Likewise.
      	(s390_hard_regno_rename_ok, s390_hard_regno_scratch_ok): Likewise.
      	(s390_emit_prologue, s300_set_up_by_prologue): Likewise.
      	(s390_can_use_return_insn, s390_optimize_prologue): Likewise.
      	(s390_conditional_register_usage): Remove the old handling of
      	call_used_regs and change the handling of call_really_used_regs
      	to use call_used_regs instead.
      	* config/sh/sh.h (CALL_USED_REGISTERS): Delete.
      	* config/sh/sh.c (output_stack_adjust, calc_live_regs): Likewise.
      	(sh_fix_range, reg_unused_after): Likewise.
      	(sh_conditional_register_usage): Remove the old handling of
      	call_used_regs and change the handling of call_really_used_regs
      	to use call_used_regs instead.
      	* config/sparc/sparc.h (CALL_USED_REGISTERS): Delete.
      	* config/sparc/sparc.c (sparc_conditional_register_usage): Don't set
      	call_used_regs when making a register fixed.
      	* config/tilegx/tilegx.h (CALL_USED_REGISTERS): Delete.
      	* config/tilegx/tilegx.c (tilegx_conditional_register_usage): Don't set
      	call_used_regs when making a register fixed.
      	* config/tilepro/tilepro.h (CALL_USED_REGISTERS): Delete.
      	* config/tilepro/tilepro.c (tilepro_conditional_register_usage): Don't
      	set call_used_regs when making a register fixed.
      	* config/visium/visium.h (CALL_USED_REGISTERS): Delete.
      	* config/visium/visium.c (visium_conditional_register_usage): Remove
      	the old handling of call_used_regs and change the handling of
      	call_really_used_regs to use call_used_regs instead.
      
      From-SVN: r275605
      Richard Sandiford committed
    • Hide call_used_regs in target-independent code · 53bee79c
      Now that tests of call_used_regs go through call_used_or_fixed_reg_p,
      we can hide call_used_regs from target-independent code.  (It still
      needs to be available to targets for the conditional register usage
      hooks.)
      
      2019-09-10  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* hard-reg-set.h (call_used_regs): Only define if IN_TARGET_CODE.
      	(call_used_or_fixed_reg_p): Expand definition of call_used_regs.
      	* reginfo.c (call_used_regs): New macro.
      
      From-SVN: r275604
      Richard Sandiford committed