1. 24 Jul, 2019 9 commits
    • cgraphunit.c (symbol_table::compile): Start and stop TV_CGRAPH_IPA_PASSES and… · 856bb3ef
      cgraphunit.c (symbol_table::compile): Start and stop TV_CGRAPH_IPA_PASSES and TV_CGRAPH_FUNC_EXPANSION timers.
      
      	* cgraphunit.c (symbol_table::compile): Start and stop
      	TV_CGRAPH_IPA_PASSES and TV_CGRAPH_FUNC_EXPANSION timers.
      	* timevar.def (TV_CGRAPH_IPA_PASSES, TV_CGRAPH_FUNC_EXPANSION): New.
      
      From-SVN: r273767
      Giuliano Belinassi committed
    • gimplify.c (flag_instrument_functions_exclude_p): Include namespace/class… · efab3e3a
      gimplify.c (flag_instrument_functions_exclude_p): Include namespace/class information in the printable name.
      
      	* gimplify.c (flag_instrument_functions_exclude_p): Include
      	namespace/class information in the printable name.
      	* opts.c (add_comma_separated_to_vector): Add NUL terminator
      	to tokens entered into the vector.
      
      From-SVN: r273766
      Oliver Browne committed
    • tree-nested.c (build_simple_mem_ref_notrap): New function. · 58f3f2c3
      	* tree-nested.c (build_simple_mem_ref_notrap): New function.
      	(get_static_chain): Call it instead of build_simple_mem_ref.
      	(get_frame_field): Likewise.
      	(get_nonlocal_debug_decl): Likewise.
      	(convert_nonlocal_reference_op): Likewise.
      
      From-SVN: r273763
      Eric Botcazou committed
    • [ARC] Fix and refurbish the interrupts. · ce9dbf20
      When entering an interrupt, not only the call save registers needs to
      be place on stack but also the call clobbers one. More over, the
      ARC700 return from interrupt instruction needs to be rtie, the same
      like ARCv2 CPUs. While the ARC6xx family uses j.f [ilinkX]
      instruction. Additionally, we need to save the state of the ZOL
      machinery, namely the lp_count, lp_end and lp_start registers. For
      architectures which are using extension registers (i.e., HS48) we need
      to save/restore them as well.
      
      gcc/
      xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc-protos.h (arc_output_function_epilogue): Delete
      	declaration.
      	(arc_compute_frame_size): Millicode is disabled when compiling
      	ISR.
      	(arc_return_address_register): Likewise.
      	(arc_compute_function_type): Likewise.
      	(arc_compute_frame_size): Likewise.
      	(secondary_reload_info): Likewise.
      	(arc_get_unalign): Likewise.
      	(arc_can_use_return_insn): Declare.
      	* config/arc/arc.c (AUX_LP_START): Define
      	(AUX_LP_END): Likewise.
      	(arc_frame_info): Update gmask member to 64-bit datum.
      	(GMASK_LEN): Update.
      	(arc_compute_function_type): Make it static, move it forward.
      	(arc_must_save_register): Update, consider the extra regs.
      	(arc_compute_millicode_save_restore_regs): Update to use the 64
      	bit gmask.
      	(arc_compute_frame_size): Likewise.
      	(arc_enter_leave_p): Likewise.
      	(arc_save_callee_saves): Likewise.
      	(arc_restore_callee_saves): Likewise.
      	(arc_save_callee_enter): Likewise.
      	(arc_restore_callee_leave): Likewise.
      	(arc_save_callee_milli): Likewise.
      	(arc_restore_callee_milli): Likewise.
      	(arc_expand_prologue): Add new interrupt handling.
      	(arc_return_address_register): Make it static, move it forward.
      	(arc_expand_epilogue): Add new interrupt handling.
      	(arc_get_unalign): Delete.
      	(arc_epilogue_uses): Make sure we do not remove the extra
      	saved/restored registers when interrupt.
      	(arc_can_use_return_insn): New function.
      	(push_reg): Likewise.
      	(pop_reg): Likewise.
      	(arc_save_callee_saves): Add ZOL and FPX aux registers saving
      	procedures.
      	(arc_restore_callee_saves): Likewise, but restoring.
      	* config/arc/arc.md (VUNSPEC_ARC_ARC600_RTIE): Define.
      	(R33_REG): Likewise.
      	(R34_REG): Likewise.
      	(R35_REG): Likewise.
      	(R36_REG): Likewise.
      	(R37_REG): Likewise.
      	(R38_REG): Likewise.
      	(R39_REG): Likewise.
      	(R45_REG): Likewise.
      	(R46_REG): Likewise.
      	(R47_REG): Likewise.
      	(R48_REG): Likewise.
      	(R49_REG): Likewise.
      	(R50_REG): Likewise.
      	(R51_REG): Likewise.
      	(R52_REG): Likewise.
      	(R53_REG): Likewise.
      	(R54_REG): Likewise.
      	(R55_REG): Likewise.
      	(R56_REG): Likewise.
      	(R58_REG): Likewise.
      	(type): Add rtie attribute.
      	(in_call_delay_slot): Use RETURN_ADDR_REGNUM.
      	(movsi_insn): Accept moves to lp_count.
      	(rtie): Update pattern.
      	(simple_return): Simplify it, don't use this pattern as a return
      	from an interrupt.
      	(arc600_rtie): New pattern.
      	(p_return_i): Clean up.
      	(return): Likewise.
      	* config/arc/builtins.def (rtie): Only available for non ARC6xx
      	family CPUs.
      	* config/arc/predicates.md (move_src_operand): Consider lp_count
      	as a register.
      
      gcc/testsuite
      xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* gcc.target/arc/arc.exp (check_effective_target_accregs): New
      	predicate.
      	* gcc.target/arc/builtin_special.c: Update test/
      	* gcc.target/arc/interrupt-1.c: Likewise.
      	* gcc.target/arc/interrupt-10.c: New test.
      	* gcc.target/arc/interrupt-11.c: Likewise.
      	* gcc.target/arc/interrupt-12.c: Likewise.
      
      update
      
      From-SVN: r273761
      Claudiu Zissulescu committed
    • S/390: Add add/sub/mul overflow check patterns · 4caa6bab
      This patch implements the addv, subv, and mulv patterns for signed
      integers.
      
      gcc/ChangeLog:
      
      2019-07-24  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	* config/s390/predicates.md (addv_const_operand): New predicate.
      	* config/s390/s390-modes.def (CCO): New condition code mode.
      	* config/s390/s390.c (s390_match_ccmode_set): Handle E_CCOmode.
      	(s390_branch_condition_mask): Likewise.
      	* config/s390/s390.md ("addv<mode>4", "subv<mode>4")
      	("mulv<mode>4"): New expanders.
      	("*addv<mode>3_ccoverflow", "*addv<mode>3_ccoverflow_const")
      	("*subv<mode>3_ccoverflow", "*mulv<mode>3_ccoverflow"): New
      	pattern definitions.
      
      gcc/testsuite/ChangeLog:
      
      2019-07-24  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	* gcc.target/s390/addsub-signed-overflow-1.c: New test.
      	* gcc.target/s390/addsub-signed-overflow-2.c: New test.
      	* gcc.target/s390/mul-signed-overflow-1.c: New test.
      	* gcc.target/s390/mul-signed-overflow-2.c: New test.
      
      From-SVN: r273759
      Andreas Krebbel committed
    • re PR middle-end/91166 ([SVE] Unfolded ZIPs of constants) · 21caa1a2
      2019-07-24  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
      
      	PR middle-end/91166
      	* match.pd (vec_perm_expr(v, v, mask) -> v): New pattern.
      	(define_predicates): Add entry for uniform_vector_p.
      	(vec_same_elem_p): New match pattern.
      
      testsuite/
      	* gcc.target/aarch64/sve/pr91166.c: New test.
      
      From-SVN: r273758
      Prathamesh Kulkarni committed
    • Fix off-by-one in simple-object-elf.c (PR lto/91228). · 70121844
      2019-07-24  Martin Liska  <mliska@suse.cz>
      
      	PR lto/91228
      	* simple-object-elf.c (simple_object_elf_copy_lto_debug_sections):
      	Find first '\0' starting from gnu_lto + 1.
      
      From-SVN: r273757
      Martin Liska committed
    • Fixup ChangeLog entry for revision 273570. · fe1a06fc
      From-SVN: r273756
      Bin Cheng committed
    • Daily bump. · 55ac9c5c
      From-SVN: r273753
      GCC Administrator committed
  2. 23 Jul, 2019 30 commits
    • [Darwin] Fix PR87030 add missed commit hunks. · c2ff7104
      Messed up the commit, and missed changes to gcc/config.gcc and to the comments
      in some of the headers.
      
      2019-07-24  Iain Sandoe  <iain@sandoe.co.uk>
      
      gcc/
      
      	PR bootstrap/87030
      	* config/i386/darwin.h (REAL_LIBGCC_SPEC): Move from here...
      	* config/i386/darwin32-biarch.h .. to here.
      	* config/i386/darwin64-biarch.h: Adjust comments.
      	* config/rs6000/darwin32-biarch.h: Likewise.
      	* config/rs6000/darwin64-biarch.h: Likewise.
      	* config.gcc: Missed commit from r273746
      	(*-*-darwin*): Don't include CPU t-darwin here.
      	(i[34567]86-*-darwin*): Adjust to use biarch files. Produce
      	an error message if i686-darwin configuration is attempted for
      	Darwin >= 18.
      
      From-SVN: r273749
      Iain Sandoe committed
    • re PR fortran/54072 (BOZ with -std=f2008: wrongly accepted to TRANSFER/ABS/...;… · c078c9f4
      re PR fortran/54072 (BOZ with -std=f2008: wrongly accepted to TRANSFER/ABS/...; two BOZ not rejected for IOR/IEOR/IAND)
      
      2019-07-23  Steven G. Kargl  <kargl@gcc.gnu.org>
      
       PR fortran/54072
       * check.c (gfc_invalid_boz): Fix comment.
       (illegal_boz_arg): New function.
       (gfc_check_transfer): Use to arguments.
       (gfc_check_storage_size): Ditto.
       (gfc_check_complex): Remove leftover comment from BOZ patch.
       * primary.c (match_boz_constant): Remove leftover comment. 
      
      2019-07-23  Steven G. Kargl  <kargl@gcc.gnu.org>
      
       PR fortran/54072
       * gfortran.dg/illegal_boz_arg_1.f90: New tests.
      
      From-SVN: r273748
      Steven G. Kargl committed
    • arith.c (gfc_convert_integer, [...]): Move to ... · 8dc63166
      2019-07-23  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	* arith.c (gfc_convert_integer, gfc_convert_real, gfc_convert_complex):
      	Move to ...
      	* primary.c (convert_integer, convert_real, convert_complex): ... here.
      	Rename and make static functions.
      	(match_integer_constant): Use convert_integer
      	(match_real_constant): Use convert_real.
      	(match_complex_constant: Use convert_complex.
      	* arith.h (gfc_convert_integer, gfc_convert_real, gfc_convert_complex):
      	Remove prototypes.
      	* array.c (match_array_cons_element): A BOZ cannot be a data 
      	statement value.  Jump to a common exit point.
      	* check.c (gfc_invalid_boz): New function.  Emit error or warning
      	for a BOZ in an invalid context.
      	(boz_args_check): Move to top of file to prevent need of forward
      	declaration.
      	(is_boz_constant): New function.  Check that BOZ expr is constant.
      	(gfc_b	z2real): New function. In-place conversion of BOZ literal
      	constant to REAL in accordance to F2018.
      	(gfc_boz2int): New function. In-place conversion of BOZ literal
       	onstant to INTEGER in accordance to F2018.
      	(gfc_check_achar, gfc_check_char, gfc_check_float): Use gfc_invalid_boz.
      	Convert BOZ as needed.
      	(gfc_check_bge_bgt_ble_blt): Enforce F2018 requirements on BGE, 
      	BGT, BLE, and BLT intrinsic functions.
      	(gfc_check_cmplx): Re-organize to check kind, if present, first.
      	Convert BOZ real and/or imaginary parts as needed in accordance to
      	F2018.
      	(gfc_check_complex):  Use gfc_invalid_boz.  Convert BOZ as needed.
      	(gfc_check_dcmplx, gfc_check_dble ): Convert BOZ as needed.
      	(gfc_check_dshift):  Make dshift[lr] conform to F2018 standard.
      	 gfc_check_float (gfc_expr *a)
      	(gfc_check_iand_ieor_ior):  Make IAND, IEOR, and IOR conform to 
      	F2018 standard.
      	(gfc_check_int): Conform to F2018 standard.
      	(gfc_check_intconv): Deprecate SHORT and LONG aliases for INT2 and
      	INT.  Simply return for a BOZ argument. See gfc_simplify_intconv.
      	(gfc_check_merge_bits): Make MERGE_BITS conform to Fortran 2018
      	standard.
      	(gfc_check_real): Remove incorrect comment. Check kind, if present,
      	first.  Simply return for a BOZ argument. See gfc_simplify_real.
      	(gfc_check_and): Re-do error handling for BOZ arguments.  Remove
      	special casing ts.type != BT_INTEGER or BT_LOGICAL.
      	* decl.c (match_old_style_init): Check for BOZ in old-style
      	initialization.  Issue error or warning depending on
      	-fallow-invalid-boz option.  Issue error if variable is not an
      	INTEGER or REAL and the value is BOZ.
      	* expr.c (gfc_copy_expr): Copy a BT_BOZ gfc_expr.
      	(gfc_check_assign): Re-do error handling for a BOZ in an assignment
      	statement.  Do in-place conversion of RHS based on LHS type of
      	INTEGER or REAL.
      	* gfortran.h (gfc_expr): Add a boz component.  Remove is_boz component.
      	(gfc_boz2int, gfc_boz2real, gfc_invalid_boz): New prototypes.
      	* interface.c (gfc_extend_assign): Guard against replacing an 
      	intrinsic involving a BOZ literal constant on RHS.
      	* invoke.texi: Doument -fallow-invalid-boz.
      	* lang.opt: New option. -fallow-invalid-boz.
      	* libgfortran.h (bt): Elevate BOZ to a basic type.
      	* misc.c (gfc_basic_typename, gfc_typename): Translate BT_BOZ to BOZ.
      	* primary.c (convert_integer, convert_real, convert_complex): to here.
      	Rename and make static functions.
      	* primary.c(match_boz_constant): Rewrite parsing of a BOZ. Re-do
      	error handling.  Deprecate 'X' for hexidecimal and postfix notation.
      	Use -fallow-invalid-boz and gfc_invalid_boz to accept deprecated code.
      	* resolve.c (resolve_ordinary_assign): Rework a RHS that is a
      	BOZ literal constant.  Use gfc_invalid_boz to allow previous
      	nonstandard behavior.  Remove range checking of BOZ conversion.
      	* simplify.c (convert_boz): Remove function.
      	(simplify_cmplx): Remove conversion of BOZ constants, because
      	conversion is done in gfc_check_cmplx.
      	(gfc_simplify_float): Remove conversion of BOZ constant, because
      	conversion is done in gfc_check_float.
      	(simplify_intconv): Use gfc_boz2int to convert BOZ to INTEGER.
      	Remove range checking for BOZ conversion.
      	(gfc_simplify_real): Use k, if present, to determine kind.  Convert
      	BOZ to REAL.  Remove range checking for BOZ conversion.
      	target-memory.c (gfc_convert_boz): Rewrite to deal with convert of
      	a BOZ to a REAL value.
      
      2019-07-23  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	* gfortran.dg/achar_5.f90: Fix for new BOZ handling.
      	* arithmetic_overflow_1.f90: Ditto.
      	* gfortran.dg/boz_11.f90: Ditto.
      	* gfortran.dg/boz_12.f90: Ditto.
      	* gfortran.dg/boz_4.f90: Ditto.
      	* gfortran.dg/boz_5.f90: Ditto.
      	* gfortran.dg/boz_6.f90: Ditto.
      	* gfortran.dg/boz_7.f90: Ditto.
      	* gfortran.dg/boz_8.f90: Ditto.
      	* gfortran.dg/dec_structure_6.f90: Ditto.
      	* gfortran.dg/dec_union_1.f90: Ditto.
      	* gfortran.dg/dec_union_2.f90: Ditto.
      	* gfortran.dg/dec_union_5.f90: Ditto.
      	* gfortran.dg/dshift_3.f90: Ditto.
      	* gfortran.dg/gnu_logical_2.f90: Ditto.
      	* gfortran.dg/int_conv_1.f90: Ditto.
      	* gfortran.dg/ishft_1.f90: Ditto.
      	* gfortran.dg/nan_4.f90: Ditto.
      	* gfortran.dg/no_range_check_3.f90: Ditto.
      	* gfortran.dg/pr16433.f: Ditto.
      	* gfortran.dg/pr44491.f90: Ditto.
      	* gfortran.dg/pr58027.f90: Ditto.
      	* gfortran.dg/pr81509_2.f90: Ditto.
      	* gfortran.dg/unf_io_convert_1.f90: Ditto.
      	* gfortran.dg/unf_io_convert_2.f90: Ditto.
      	* gfortran.fortran-torture/execute/intrinsic_fraction_exponent.f90:
      	Ditto.
      	* gfortran.fortran-torture/execute/intrinsic_mvbits.f90: Ditto.
      	* gfortran.fortran-torture/execute/intrinsic_nearest.f90: Ditto.
      	* gfortran.fortran-torture/execute/seq_io.f90: Ditto.
      	* gfortran.dg/gnu_logical_1.F: Delete test.
      	* gfortran.dg/merge_bits_3.f90: New test.
      	* gfortran.dg/merge_bits_3.f90: Ditto.
      	* gfortran.dg/boz_int.f90: Ditto.
      	* gfortran.dg/boz_bge.f90: Ditto.
      	* gfortran.dg/boz_complex_1.f90: Ditto.
      	* gfortran.dg/boz_complex_2.f90: Ditto.
      	* gfortran.dg/boz_complex_3.f90: Ditto.
      	* gfortran.dg/boz_dble.f90: Ditto.
      	* gfortran.dg/boz_dshift_1.f90: Ditto.
      	* gfortran.dg/boz_dshift_2.f90: Ditto.
      	* gfortran.dg/boz_float_1.f90: Ditto.
      	* gfortran.dg/boz_float_2.f90: Ditto.
      	* gfortran.dg/boz_float_3.f90: Ditto.
      	* gfortran.dg/boz_iand_1.f90: Ditto.
      	* gfortran.dg/boz_iand_2.f90: Ditto.
      
      2019-07-23  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	* testsuite/libgomp.fortran/reduction4.f90: Update BOZ usage
      	* testsuite/libgomp.fortran/reduction5.f90: Ditto.
      
      From-SVN: r273747
      Steven G. Kargl committed
    • [Darwin] Fix PR87030 and tidy config fragments. · 000a0020
      This is about 32/64b host and multilib support across the range of Darwin
      systems.
      
      Prior to Darwin8 (OS X 10.4), the toolchains support only PowerPC and only 32b.
      
      On Darwin8 it is possible to target a 64b multilib, but with support limited
      to a few of the main libraries on the system (not a recommended configuration).
      
      From Darwin9 to Darwin17 (OSX 10.5 to 10.13) it is possible to have either
      32 or 64b hosted toolchains, with support for a 64 or 32b multilib respectively.
      
      On Darwin9 the kernel is 32b, but with support for 64b executables, so it's
      conventional to build a 32b host toolchain supporting a 64b multilib.  However
      this is not enforced (merely a convention).
      
      There is also some platform hardware supporting Darwin10/11 which is only 32b
      and for which the same situation applies.  However, from Darwin10 to Darwin17,
      the majority of platform hardware supports a 64b kernel and it's conventional
      to build a 64b host toolchain with support for a 32b multilib.
      
      On/from Darwin18 (OS X 10.14), the development headers (in the SDK) no longer
      expose the interfaces for the 32b multilib support (although sufficient runtime
      support remains installed that the testsuite can be run for a 32b multilib).
      
      The PR is raised against this latter situation since the absence of exposed
      interfaces causes a 'default' bootstrap fail regardless of the availability of
      the runtimes.  Given the number of permutations, I felt it warranted a general
      solution, especially since the current scheme of target headers and t-make
      fragments has become somewhat messy.
      
      The changes here enforce the single 32b PowerPC multilib for Darwin < 8 and the
      single X86 64b multilib for Darwin >= 18.  This means that there is no longer
      any need to configure Darwin18+ '--disable-multilib', but also that if you want
      to use the ability to continue to test the compiler's 32b multilib there, you
      need to make a configuration targeting an earlier OS version (and using the
      SDK from that).
      
      gcc/
      
      	PR bootstrap/87030
      	* config.gcc (*-*-darwin*): Don't include CPU t-darwin here.
      	(i[34567]86-*-darwin*): Adjust to use biarch files. Produce
      	an error message if i686-darwin configuration is attempted for
      	Darwin >= 18.
      	(x86_64-*-darwin*): Switch to single multilib for Darwin >= 18.
      	(powerpc-*-darwin*): Use biarch files where needed.
      	(powerpc64-*-darwin*): Likewise.
      	* config/i386/darwin.h (REAL_LIBGCC_SPEC): Move to new biarch file.
      	(DARWIN_ARCH_SPEC, DARWIN_SUBARCH_SPEC): Revise for default single
      	arch case.
      	* config/i386/darwin32-biarch.h: New.
      	* config/i386/darwin64.h: Rename.
      	* gcc/config/i386/darwin64-biarch.h: To this.
      	* config/i386/t-darwin: Rename.
      	* gcc/config/i386/t-darwin32-biarch: To this.
      	* config/i386/t-darwin64: Rename.
      	* gcc/config/i386/t-darwin64-biarch: To this.
      	* config/rs6000/darwin32-biarch.h: New.
      	* config/rs6000/darwin64.h: Rename.
      	* config/rs6000/darwin64-biarch.h: To this.
      	(DARWIN_ARCH_SPEC, DARWIN_SUBARCH_SPEC): Revise for default single
      	arch case.
      	* config/rs6000/t-darwin8: Rename.
      	* config/rs6000/t-darwin32-biarch: To this.
      	* config/rs6000/t-darwin64 Rename.
      	* config/rs6000/t-darwin64-biarch: To this.
      
      From-SVN: r273746
      Iain Sandoe committed
    • Add PR markers to recent DSE changes. And... · d8e54c62
      	PR tree-optimization/86061
      	* gcc.dg/tree-ssa/pr86061.c: New test.
      
      From-SVN: r273745
      Jeff Law committed
    • compiler: use correct value type in 2-case select send · 40768ee0
          
          In the channel-send case, the value to be sent may needs an
          (implicit) type conversion to the channel element type. This CL
          ensures that we use the correct value type for the send.
          
          Fixes golang/go#33235.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/187177
      
      From-SVN: r273743
      Ian Lance Taylor committed
    • configure.ac (ACX_PROG_CXX_WARNING_OPTS): Revert r273311. · 9bf40084
      gcc/ChangeLog:
      	* configure.ac (ACX_PROG_CXX_WARNING_OPTS): Revert r273311.
      
      From-SVN: r273742
      Martin Sebor committed
    • gdbinit.in: add reload-gdbhooks (rh) command · d894bafc
      gcc/ChangeLog:
      
      2019-07-23  Vladislav Ivanishin <vlad@ispras.ru>
      
      	* gdbinit.in (reload-gdbhooks): New command with an attached doc string.
      	(rh): New alias for it.
      
      From-SVN: r273738
      Vladislav Ivanishin committed
    • make gdbhooks.py idempotent with respect to reloading · e41dd068
      gcc/ChangeLog:
      
      2019-07-23  Vladislav Ivanishin <vlad@ispras.ru>
      
      	* gdbhooks.py: Pass replace=True to
      	gdb.printing.register_pretty_printer.
      
      From-SVN: r273737
      Vladislav Ivanishin committed
    • re PR debug/91231 (ICE in dwarf2out_inline_entry, at dwarf2out.c:27642) · 0bd65f4f
      2019-07-23  Richard Biener  <rguenther@suse.de>
      
      	PR debug/91231
      	* lto-streamer-in.c (input_function): Drop inline-entry markers
      	that ended up with an unknown location block.
      
      From-SVN: r273733
      Richard Biener committed
    • re PR tree-optimization/83518 (Missing optimization: useless instructions should be dropped) · 62e3e66f
      2019-07-23  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/83518
      	* tree-ssa-sccvn.c (vn_reference_lookup_3): Handle aggregate
      	init from a constant even when partial defs are already recorded.
      
      	c/
      	* gimple-parser.c (c_parser_parse_gimple_body): When we have
      	a CFG also rebuild cgraph edges.
      
      	* gcc.dg/tree-ssa/ssa-fre-79.c: New testcase.
      
      From-SVN: r273732
      Richard Biener committed
    • i386-common.c: Use PROCESSOR_ZNVER2 scheduler for znver2. · e1eb82f5
      	* i386-common.c: Use PROCESSOR_ZNVER2 scheduler for znver2.
      	* config/i386/znver1.md: Enable patterns for znver2 and add store
      	variants which use extra AGU unit.
      
      From-SVN: r273731
      Jan Hubicka committed
    • i386-options.c (ix86_option_override_internal): Default PARAM_AVOID_FMA_MAX_BITS to 256 for znver2. · 105c2795
      	* config/i386/i386-options.c (ix86_option_override_internal): Default
      	PARAM_AVOID_FMA_MAX_BITS to 256 for znver2.
      
      From-SVN: r273730
      Jan Hubicka committed
    • x86-tune-costs.h (znver2_memcpy): Update. · 187dd65d
      	* config/i386/x86-tune-costs.h (znver2_memcpy): Update.
      	(znver2_costs): Update 256 bit SSE costs and multiplication.
      
      From-SVN: r273728
      Jan Hubicka committed
    • [Ada] Aspect CPU may depend on a discriminant of a task type · 4e2a1652
      2019-07-23  Ed Schonberg  <schonberg@adacore.com>
      
      gcc/ada/
      
      	* sem_ch13.adb (Check_Aspect_At_End_Of_Declarations,
      	Freeze_Entity_Checks): Include Aspect_CPU with other aspects
      	whose expresssion may depend on a discriminant, and thus require
      	that components of the type be made visible.
      
      gcc/testsuite/
      
      	* gnat.dg/task4.adb: New testcase.
      
      From-SVN: r273726
      Ed Schonberg committed
    • [Ada] Plug small loophole in Generate_Range_Check · 67460d45
      The Generate_Range_Check routine is responsible for generating range
      checks in the scalar case.  It automatically deals with possible
      overflow in the process when the source and the target base types are
      different.
      
      However there is one case where overflow is not dealt with correctly,
      namely when the target base type is narrower than the source base type
      and both are floating-point types. In this case, the routine will
      convert the source type to the target base type without checking for
      overflow. In practice this does not matter much because the conversion
      would yield an infinity on overflow, which would then fail the
      subsequent range check. However it's more correct to have a proper
      overflow check with -gnateF than relying on the infinity.
      
      2019-07-23  Eric Botcazou  <ebotcazou@adacore.com>
      
      gcc/ada/
      
      	* checks.adb (Convert_And_Check_Range): Add Suppress parameter
      	and pass it in the call to Insert_Actions.  Rename local
      	variable.
      	(Generate_Range_Check): Minor comment fixes.  Pass Range_Check
      	in the first call to Convert_And_Check_Range and All_Checks in
      	the second call.
      	* exp_ch4.adb (Expand_N_Type_Conversion): Reset the
      	Do_Overflow_Check flag in the float-to-float case too if there
      	is also a range check.
      
      gcc/testsuite/
      
      	* gnat.dg/range_check5.adb: New testcase.
      
      From-SVN: r273725
      Eric Botcazou committed
    • [Ada] Eliminate redundant overflow checks for conversions from fixed-point · a7191e01
      This eliminates redundant overflow checks that are generated for
      conversions from fixed-point to integer types when range checks are also
      enabled (which is the default), as the former checks are subsumed into
      the latter checks.
      
      No functional changes.
      
      2019-07-23  Eric Botcazou  <ebotcazou@adacore.com>
      
      gcc/ada/
      
      	* checks.adb (Activate_Overflow_Check): Remove redundant
      	argument.
      	* exp_ch4.adb (Discrete_Range_Check): Reset the overflow flag.
      	(Expand_N_Type_Conversion): Do not reset it here.
      
      From-SVN: r273724
      Eric Botcazou committed
    • [Ada] Minor tweak to -gnatR output · f9534f4b
      This makes sure that the numbers present in the -gnatR output are
      printed in decimal format in all cases, since the hexadecimal format is
      not compatible with the JSON syntax.
      
      2019-07-23  Eric Botcazou  <ebotcazou@adacore.com>
      
      gcc/ada/
      
      	* repinfo.adb (List_Component_Layout): Pass Decimal to UI_Write.
      	(Write_Val): Likewise.
      
      From-SVN: r273723
      Eric Botcazou committed
    • [Ada] Iterators are view-specific · c910db71
      Operational aspects, such as Default_Iterator, are view-specific, and if
      such an aspect appears on the full view of a private type, an object of
      the type cannot be iterated upon if it is not in the scope of the full
      view, This patch diagnoses properly an attempt to iterate over such an
      object.
      
      2019-07-23  Ed Schonberg  <schonberg@adacore.com>
      
      gcc/ada/
      
      	* aspects.ads: New table Operational_Aspect, used to distinguish
      	between aspects that are view-specific, such as those related to
      	iterators, and representation aspects that apply to all views of
      	a type.
      	* aspects.adb (Find_Aspect): If the aspect being sought is
      	operational, do not ecamine the full view of a private type to
      	retrieve it.
      	* sem_ch5.adb (Analyze_Iterator_Specification): Improve error
      	message when the intended domain of iteration does not implement
      	the required iterator aspects.
      
      gcc/testsuite/
      
      	* gnat.dg/iter5.adb: Add an expected error.
      	* gnat.dg/iter6.adb: New testcase.
      
      From-SVN: r273722
      Ed Schonberg committed
    • [Ada] Issue error on SPARK ownership rule violation · 15e79d66
      A modified rule in SPARK RM specifies that object declarations of
      anonymous access type should only occur immediately in subprogram, entry
      or block. Now checked.
      
      There is no impact on compilation.
      
      2019-07-23  Yannick Moy  <moy@adacore.com>
      
      gcc/ada/
      
      	* sem_spark.ads (Is_Local_Context): New function.
      	* sem_spark.adb (Check_Declaration): Issue errors on violations
      	of SPARK RM 3.10(4)
      	(Process_Path): Do not issue error on borrow/observe during
      	elaboration, as these are caught by the new rule.
      
      From-SVN: r273721
      Yannick Moy committed
    • [Ada] Fix binding of ghost units with finalizer · 39c20502
      Linking of an enabled ghost unit which requires a finalizer lead to an
      error, as the name generated by the binder for calling the finalizer was
      not the same as the name chosen by the compiler. Now fixed.
      
      2019-07-23  Yannick Moy  <moy@adacore.com>
      
      gcc/ada/
      
      	* exp_ch7.adb (Create_Finalizer): Force finalizer not to be
      	Ghost enabled.
      	* exp_dbug.adb (Get_External_Name): Explain special case of
      	Ghost finalizer.
      
      gcc/testsuite/
      
      	* gnat.dg/ghost6.adb, gnat.dg/ghost6_pkg.ads: New testcase.
      
      From-SVN: r273720
      Yannick Moy committed
    • x86/AVX512: improve generated code for mask-to-vector-register conversions · 58b8c5a8
      Conversion of comparison results to full vectors does, when VPMOVM2* are
      unavailable, not require any intermediate VMOVDQ{A,U}*: Simply use
      embedded masking on VPTERNLOG* right away, which is available with
      AVX512F (while VPMOVM2{D,Q} are available only with AVX512DQ).
      
      Note that the chosen immediate is only one of many possible ones; I was
      trying to make the insn here distinguishable from the pre-existing uses
      of vpternlog.
      
      gcc/
      2019-07-23  Jan Beulich  <jbeulich@suse.com>
      
      	* config/i386/sse.md (<avx512>_cvtmask2<ssemodesuffix><mode>):
      	Require only AVX512F.
      	(*<avx512>_cvtmask2<ssemodesuffix><mode>): Likewise.  Add
      	alternative expanding to vpternlog.
      
      From-SVN: r273719
      Jan Beulich committed
    • libiberty: Check zero value shstrndx in simple-object-elf.c · b1bc0f50
      From-SVN: r273718
      Ren Kimura committed
    • Use -flto instead of -flto=N in DWARF producer string. · c0cdef59
      2019-07-23  Martin Liska  <mliska@suse.cz>
      
      	* dwarf2out.c (gen_producer_string): Canonize -flto=N
      	to -flto in dwarf producer string.
      
      From-SVN: r273717
      Martin Liska committed
    • tree-cfg.c (label_for_bb): Remove global var. · 9215b328
      2019-07-23  Richard Biener  <rguenther@suse.de>
      
      	* tree-cfg.c (label_for_bb): Remove global var.
      	(main_block_label): Take label_for_bb as argument.
      	(cleanup_dead_labels_eh): Likewise, adjust.
      	(cleanup_dead_labels): Adjust.
      
      From-SVN: r273716
      Richard Biener committed
    • [rs6000] Add documentation for __builtin_mtfsf · 0ac608a2
      2019-07-22  Paul A. Clarke  <pc@us.ibm.com>
      
      [gcc]
      
      	* doc/extend.texi (Basic PowerPC Built-in Functions Available on all
      	Configurations): Add documentation for __builtin_mtfsf.
      
      From-SVN: r273715
      Paul A. Clarke committed
    • RISC-V: Add -malign-data= option. · ffbb9818
      	gcc/
      	Ilia Diachkov  <ilia.diachkov@optimitech.com>
      	* config/riscv/riscv-opts.h (struct riscv_align_data): New.
      	* config/riscv/riscv.c (riscv_constant_alignment): Use
      	riscv_align_data_type.
      	* config/riscv/riscv.h (RISCV_EXPAND_ALIGNMENT): New.
      	(DATA_ALIGNMENT): Use RISCV_EXPAND_ALIGNMENT.
      	(LOCAL_ALIGNMENT): Use RISCV_EXPAND_ALIGNMENT.
      	* config/riscv/riscv.opt (malign-data): New.
      	* doc/invoke.texi (RISC-V Options): Document -malign-data=.
      
      From-SVN: r273714
      Ilia Diachkov committed
    • compiler: follow-on fix for finalizing imported methods · 1d46067b
          
          This patch is a revision to CL 185518, which added code to perform
          finalization of methods on types created by the importer and not
          directly reachable until inlining is done.
          
          The original fix invoked the finalization code at the end of
          Import::read_types(), but it turns out this doesn't handle the case
          where a type with methods is read in due to a reference from something
          later in the export data (a function or variable). The fix is to move
          the import finalization call to the end of Import::import().
          
          Testcase for this bug is in CL 187057.
          
          Fixes golang/go#33219.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/187058
      
      From-SVN: r273713
      Ian Lance Taylor committed
    • Daily bump. · 22e4efa1
      From-SVN: r273712
      GCC Administrator committed
  3. 22 Jul, 2019 1 commit
    • cgraph.c (dump_graphviz): New function. · 34e64622
      	* cgraph.c (dump_graphviz): New function.
      	* cgraph.h (dump_graphviz): New function.
      	* symtab.c (dump_graphviz): New function.
      
      	* lang.opt (flag_dump_callgraph): New flag.
      	* lto-dump.c (dump_symtab_graphviz): New function.
      	(dump_tool_help): New option.
      	(lto_main): Handle graphviz dumping.
      
      From-SVN: r273708
      Giuliano Belinassi committed