1. 01 Dec, 2017 10 commits
  2. 30 Nov, 2017 21 commits
    • re PR c/83222 (Inconsistent "initializer element is not constant" error) · cc6534d4
      	PR c/83222
      	* c-tree.h (decl_constant_value_1): Declare.
      	* c-typeck.c (decl_constant_value_1): New function.
      	(decl_constant_value): Use it.
      	* c-fold.c (c_fully_fold_internal): If in_init, use
      	decl_constant_value_1 instead of decl_constant_value.
      
      	* gcc.c-torture/compile/pr83222.c: New test.
      
      From-SVN: r255285
      Jakub Jelinek committed
    • spellcheck-tree.c (test_find_closest_identifier): Use ; instead of ;;. · 5de73c05
      	* spellcheck-tree.c (test_find_closest_identifier): Use ; instead
      	of ;;.
      	* gengtype-state.c (read_state_pair): Likewise.
      	* gimple-fold.c (gimple_fold_builtin_string_compare): Likewise.
      	* sel-sched-dump.c (dump_insn_rtx_1): Likewise.
      	* ipa-cp.c (intersect_aggregates_with_edge): Likewise.
      	* ifcvt.c (noce_try_store_flag_constants): Likewise.
      	* tree-ssa-ccp.c (ccp_finalize): Likewise.
      	* omp-grid.c (grid_process_kernel_body_copy): Likewise.
      	* builtins.c (fold_builtin_3): Likewise.
      	* graphite-scop-detection.c
      	(scop_detection::stmt_has_simple_data_refs_p): Likewise.
      	* hsa-gen.c (hsa_function_representation::hsa_function_representation):
      	Likewise.
      c/
      	* c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
      jit/
      	* jit-recording.c
      	(recording::memento_of_new_rvalue_from_const <long>::write_reproducer):
      	Use ; instead of ;;.
      lto/
      	* lto.c (create_subid_section_table): Use ; instead of ;;.
      objc/
      	* objc-next-runtime-abi-01.c (generate_dispatch_table): Use ; instead
      	of ;;.
      
      From-SVN: r255284
      Jakub Jelinek committed
    • re PR sanitizer/81697 (Incorrect ASan global variables alignment on arm) · 1069dc25
      gcc/
      
      2017-11-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
      
      	PR sanitizer/81697
      	* asan.c (asan_protect_global): Add new ignore_decl_rtl_set_p
      	parameter. Return true if ignore_decl_rtl_set_p is true and other
      	conditions are satisfied.
      	* asan.h (asan_protect_global): Add new parameter.
      	* varasm.c (categorize_decl_for_section): Pass true as second parameter
      	to asan_protect_global calls.
      
      gcc/testsuite/
      
      2017-11-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
      
      	PR sanitizer/81697
      	* c-c++-common/asan/pr81697.c: New test.
      
      From-SVN: r255283
      Maxim Ostapenko committed
    • re PR libgcc/83112 (Silence warnings from PowerPC libgcc float128-ifunc.c compilation) · 75ad35b5
      2017-11-30  Michael Meissner  <meissner@linux.vnet.ibm.com>
      
      	PR libgcc/83112
      	* config/rs6000/float128-ifunc.c (__addkf3_resolve): Use the
      	correct type for all ifunc resolvers to silence -Wattribute-alias
      	warnings.  Eliminate the forward declaration of the resolver
      	functions which is no longer needed.
      	(__subkf3_resolve): Likewise.
      	(__mulkf3_resolve): Likewise.
      	(__divkf3_resolve): Likewise.
      	(__negkf2_resolve): Likewise.
      	(__eqkf2_resolve): Likewise.
      	(__nekf2_resolve): Likewise.
      	(__gekf2_resolve): Likewise.
      	(__gtkf2_resolve): Likewise.
      	(__lekf2_resolve): Likewise.
      	(__ltkf2_resolve): Likewise.
      	(__unordkf2_resolve): Likewise.
      	(__extendsfkf2_resolve): Likewise.
      	(__extenddfkf2_resolve): Likewise.
      	(__trunckfsf2_resolve): Likewise.
      	(__trunckfdf2_resolve): Likewise.
      	(__fixkfsi_resolve): Likewise.
      	(__fixkfdi_resolve): Likewise.
      	(__fixunskfsi_resolve): Likewise.
      	(__fixunskfdi_resolve): Likewise.
      	(__floatsikf_resolve): Likewise.
      	(__floatdikf_resolve): Likewise.
      	(__floatunsikf_resolve): Likewise.
      	(__floatundikf_resolve): Likewise.
      	(__extendkftf2_resolve): Likewise.
      	(__trunctfkf2_resolve): Likewise.
      
      	PR libgcc/83103
      	* config/rs6000/quad-float128.h (TF): Don't define if long double
      	is IEEE 128-bit floating point.
      	(TCtype): Define as either TCmode or KCmode, depending on whether
      	long double is IEEE 128-bit floating point.
      	(__mulkc3_sw): Add declarations for software/hardware versions of
      	complex multiply/divide.
      	(__divkc3_sw): Likewise.
      	(__mulkc3_hw): Likewise.
      	(__divkc3_hw): Likewise.
      	* config/rs6000/_mulkc3.c (_mulkc3): If we are building ifunc
      	handlers to switch between using software emulation and hardware
      	float128 instructions, build the complex multiply/divide functions
      	for both software and hardware support.
      	* config/rs6000/_divkc3.c (_divkc3): Likewise.
      	* config/rs6000/float128-ifunc.c (__mulkc3_resolve): Likewise.
      	(__divkc3_resolve): Likewise.
      	(__mulkc3): Likewise.
      	(__divkc3): Likewise.
      	* config/rs6000/t-float128-hw (fp128_hardfp_src): Likewise.
      	(fp128_hw_src): Likewise.
      	(fp128_hw_static_obj): Likewise.
      	(fp128_hw_shared_obj): Likewise.
      	(_mulkc3-hw.c): Create _mulkc3-hw.c and _divkc3-hw.c from
      	_mulkc3.c and _divkc3.c, changing the function name.
      	(_divkc3-hw.c): Likewise.
      	* config/rs6000/t-float128 (clean-float128): Delete _mulkc3-hw.c
      	and _divkc3-hw.c.
      
      From-SVN: r255282
      Michael Meissner committed
    • Cleanup riscv option docs. · fb0e72c8
      	gcc/
      	* doc/invoke.texi (RISC-V Options): Delete nonexistent -mmemcpy and
      	-mno-memcpy options.  For -mplt, -mfdiv, -mdiv, -msave-restore, and
      	-mstrict-align, add info on default value.  Delete redundant lines for
      	-mabi.  Add missing -mexplicit-relocs docs.
      
      From-SVN: r255280
      Jim Wilson committed
    • PR c++/82219 - bogus -Wignored-qualifiers with template · 2d11897a
      	* pt.c (tsubst_copy_and_build) [STATIC_CAST_EXPR]: Suppress
      	-Wignored-qualifiers.
      
      From-SVN: r255279
      Jason Merrill committed
    • PR libstdc++/65927 Fix -Wunused-but-set-parameter warning · d44e1abe
      	PR libstdc++/65927
      	* include/bits/locale_facets_nonio.h (__timepunct::_M_am_pm_format):
      	Remove statement with no effect.
      
      From-SVN: r255278
      Jonathan Wakely committed
    • Move assertion from to_address to __to_address · 6b590c7a
      2017-11-30  Glen Joseph Fernandes  <glenjofe@gmail.com>
      
      	* include/bits/ptr_traits.h (__to_address, to_address): Move static
      	assertion.
      	* testsuite/20_util/to_address/1_neg.cc: New test.
      
      From-SVN: r255277
      Glen Joseph Fernandes committed
    • [ARC] Add trap instruction. · f521d500
      2017-11-07  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc.md (trap): New pattern.
      
      From-SVN: r255276
      Claudiu Zissulescu committed
    • [ARC] Don't allow the last ZOL insn to be in a delay slot. · a0920243
      The ARC ZOL implementation doesn't allow the last instruction to be a
      control instruction or part of a delay slot.  Thus, we add a note to
      the last ZOL instruction which will prevent it to finish into a delay
      slot.
      
      2017-10-20  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc.c (hwloop_optimize): Prevent the last
              ZOL instruction to end into a delay slot.
      	* config/arc/arc.md (cond_delay_insn): Check if the instruction
      	can be placed into a delay slot against reg_note.
      	(in_delay_slot): Likewise.
      
      testsuite/
      2017-10-20  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* gcc.target/arc/loop-3.c: New test.
      	* gcc.target/arc/loop-4.c: Likewise.
      
      [FIX][ZOL] fix checking for jumps
      
      From-SVN: r255275
      Claudiu Zissulescu committed
    • [ARC] Update uses for hw-loop labels. · 5d4c34aa
      Make sure we mark the hw-loop labels as beeing used.
      
      gcc/
      2017-09-19  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc.c (hwloop_optimize): Update hw-loop's end/start
      	labels number of usages.
      
      gcc/testsuite
      2017-09-19  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* gcc.target/arc/loop-2.cpp: New test.
      
      From-SVN: r255274
      Claudiu Zissulescu committed
    • [ARC] Use TARGET_CANNOT_SUBSTITUTE_MEM_EQUIV. · 31e72f4f
      Sometimes the memory equivalent is not valid due to a large offset.
      For example replacing the ap register with its fp/sp-equivalent during
      LRA step. To solve this we introduced TARGET_CANNOT_SUBSTITUTE_MEM_EQUIV.
      
      gcc/
      2017-08-08  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc.c (arc_cannot_substitute_mem_equiv_p): New function.
      	(TARGET_CANNOT_SUBSTITUTE_MEM_EQUIV_P): Define.
      
      gcc/testsuite
      2017-08-08  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* gcc.target/arc/lra-1.c: New test.
      
      From-SVN: r255273
      Claudiu Zissulescu committed
    • fold-vec-abs-char-fwrapv.c: Add xxspltib insn to expected output. · e47b37ca
      [testsuite]
      
      2017-11-29  Will Schmidt  <will_schmidt@vnet.ibm.com>
      
      	* gcc.target/powerpc/fold-vec-abs-char-fwrapv.c: Add xxspltib insn
      	to expected output.
      	* gcc.target/powerpc/fold-vec-abs-char.c: Add xxspltib insn
      	to expected output.
      
      From-SVN: r255272
      Will Schmidt committed
    • PR libstdc++/83226 avoid forming pointer-to-reference type · 5f939178
      	PR libstdc++/83226
      	* include/bits/node_handle.h (_Node_handle::__pointer): Avoid forming
      	pointer-to-reference types.
      	* testsuite/23_containers/map/modifiers/insert/83226.cc: New test.
      
      From-SVN: r255271
      Jonathan Wakely committed
    • Remove inv_list. · b0da4034
      gcc/c-family/
      	* c-common.h (inv_list): Remove.
      
      From-SVN: r255270
      Julia Koval committed
    • re PR target/83210 (__builtin_mul_overflow() generates suboptimal code when… · 89b1427f
      re PR target/83210 (__builtin_mul_overflow() generates suboptimal code when exactly one argument is the constant 2)
      
      	PR target/83210
      	* internal-fn.c (expand_mul_overflow): Optimize unsigned
      	multiplication by power of 2 constant into two shifts + comparison.
      
      	* gcc.target/i386/pr83210.c: New test.
      
      From-SVN: r255269
      Jakub Jelinek committed
    • re PR target/81616 (Update -mtune=generic for the current Intel and AMD processors) · 7c080ade
      	PR target/81616
      	* x86-tnue-costs.h (generic_cost): Revise for modern CPUs
      	* gcc.target/i386/l_fma_double_1.c: Update count of fma instructions.
      	* gcc.target/i386/l_fma_double_2.c: Update count of fma instructions.
      	* gcc.target/i386/l_fma_double_3.c: Update count of fma instructions.
      	* gcc.target/i386/l_fma_double_4.c: Update count of fma instructions.
      	* gcc.target/i386/l_fma_double_5.c: Update count of fma instructions.
      	* gcc.target/i386/l_fma_double_6.c: Update count of fma instructions.
      	* gcc.target/i386/l_fma_float_1.c: Update count of fma instructions.
      	* gcc.target/i386/l_fma_float_2.c: Update count of fma instructions.
      	* gcc.target/i386/l_fma_float_3.c: Update count of fma instructions.
      	* gcc.target/i386/l_fma_float_4.c: Update count of fma instructions.
      	* gcc.target/i386/l_fma_float_5.c: Update count of fma instructions.
      	* gcc.target/i386/l_fma_float_6.c: Update count of fma instructions.
      
      From-SVN: r255268
      Jan Hubicka committed
    • re PR tree-optimization/83202 (Try joining operations on consecutive array… · a52206ae
      re PR tree-optimization/83202 (Try joining operations on consecutive array elements during tree vectorization)
      
      2017-11-30  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/83202
      	* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add
      	allow_peel argument and guard peeling.
      	(canonicalize_loop_induction_variables): Likewise.
      	(canonicalize_induction_variables): Pass false.
      	(tree_unroll_loops_completely_1): Pass unroll_outer to disallow
      	peeling from cunrolli.
      
      	* gcc.dg/vect/pr83202-1.c: New testcase.
      	* gcc.dg/tree-ssa/pr61743-1.c: Adjust.
      
      From-SVN: r255267
      Richard Biener committed
    • compiler: don't make map zero value constant · 222353ed
          
          The map zero value is a common symbol, and it doesn't really make
          sense to have a constant common symbol. Current GCC has started to
          reject this case, probably as part of the fix for PR 83100.
          
          Reviewed-on: https://go-review.googlesource.com/80877
      
      From-SVN: r255266
      Ian Lance Taylor committed
    • baseline_symbols.txt: Update. · 3be30be2
      	* config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
      
      From-SVN: r255265
      John David Anglin committed
    • Daily bump. · bd881a00
      From-SVN: r255264
      GCC Administrator committed
  3. 29 Nov, 2017 9 commits
    • combine: Print to dump if some insn cannot be combined into i3 · 3d985316
      Eventually we should print the reason that any combination fails.
      This is a good start (these happen often).
      
      
      	* combine.c (try_combine): Print a message to dump file whenever
      	I0, I1, or I2 cannot be combined into I3.
      
      From-SVN: r255261
      Segher Boessenkool committed
    • combine: Do not throw away unneeded arms of parallels (PR83156) · 4a016178
      The fix for PR82621 makes us not split an I2 if one of the results of
      those SETs is unused, since combine does not handle that properly.  But
      this results in degradation for i386 (or more in general, for any
      target that does not have patterns for parallels with an unused result
      as a CLOBBER instead of a SET for that result).
      
      This patch instead makes us not split only if one of the results is set
      again before I3.  That fixes PR83156 and also fixes PR82621.
      
      Unfortunately it undoes the nice optimisations that the previous patch
      did on powerpc.
      
      
      	PR rtl-optimization/83156
      	PR rtl-optimization/82621
      	* combine.c (try_combine): Don't split an I2 if one of the dests is
      	set again before I3.  Allow unused dests.
      
      From-SVN: r255260
      Segher Boessenkool committed
    • rs6000: Add second variant of adde · 18b776e9
      This adds a second variant of the adde insn pattern, this one with the
      CA register as the second operand.  The existing pattern has it as the
      third operand.  It would be ideal if RTL was always canonicalised like
      that, but it isn't (and that is not trivial), and this is a simple and
      harmless patch.
      
      
      	* config/rs6000/rs6000.md (*add<mode>3_carry_in_internal2): New.
      
      From-SVN: r255259
      Segher Boessenkool committed
    • re PR rtl-optimization/80818 (LRA clobbers live hard reg clobbered during rematerialization) · 561c58b4
      2017-11-29  Vladimir Makarov  <vmakarov@redhat.com>
      
      	PR rtl-optimization/80818
      	* lra.c (collect_non_operand_hard_regs): New arg insn.  Pass it
      	recursively.  Use insn code for clobber.
      	(lra_set_insn_recog_data): Pass the new arg to
      	collect_non_operand_hard_regs.
      	(add_regs_to_insn_regno_info): Pass insn instead of uid.  Use insn
      	code for clobber.
      	(lra_update_insn_regno_info): Pass insn to
      	add_regs_to_insn_regno_info.
      
      From-SVN: r255258
      Vladimir Makarov committed
    • Riscv patterns to optimize away some redundant zero/sign extends. · 08539f3e
      	gcc/
      	* config/riscv/riscv.c (SINGLE_SHIFT_COST): New.
      	(riscv_rtx_costs): Case ZERO_EXTRACT, match new pattern, and return
      	SINGLE_SHIFT_COST.  Case LT and ZERO_EXTEND, likewise.  Case ASHIFT,
      	use SINGLE_SHIFT_COST.
      	* config/riscv/riscv.md (lshrsi3_zero_extend_1): New.
      	(lshrsi3_zero_extend_2, lshrsi3_zero_extend_3): New.
      
      	gcc/testsuite/
      	* gcc.target/riscv/riscv.exp: New.
      	* gcc.target/riscv/zero-extend-1.c: New.
      	* gcc.target/riscv/zero-extend-2.c: New.
      	* gcc.target/riscv/zero-extend-3.c: New.
      	* gcc.target/riscv/zero-extend-4.c: New.
      
      
      Co-Authored-By: Andrew Waterman <andrew@sifive.com>
      
      From-SVN: r255257
      Jim Wilson committed
    • C++: improve location of static_assert errors · 591996ba
      gcc/cp/ChangeLog:
      	* parser.c (cp_parser_unary_expression): Generate a location for
      	"noexcept".
      	(cp_parser_trait_expr): Generate and return a location_t,
      	converting the return type from tree to cp_expr.
      	(cp_parser_static_assert): Pass location of the condition to
      	finish_static_assert, rather than that of the "static_assert"
      	token, where available.
      
      gcc/testsuite/ChangeLog:
      	* g++.dg/cpp1y/static_assert3.C: New test case.
      
      libstdc++-v3/ChangeLog:
      	* testsuite/20_util/duration/literals/range.cc: Update expected
      	line of a static_assert failure.
      
      From-SVN: r255255
      David Malcolm committed
    • re PR c++/82293 (ICE in nonlambda_method_basetype at gcc/cp/lambda.c:886) · cc6fe784
      /cp
      2017-11-29  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/82293
      	* lambda.c (nonlambda_method_basetype): Don't use LAMBDA_TYPE_P
      	on a null type.
      
      /testsuite
      2017-11-29  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/82293
      	* g++.dg/cpp0x/lambda/lambda-ice24.C: New.
      
      From-SVN: r255254
      Paolo Carlini committed
    • PR c++/82760 - memory corruption with aligned new. · e3704417
      	* call.c (build_operator_new_call): Update *args if we add the
      	align_arg.
      
      From-SVN: r255253
      Jason Merrill committed
    • fold-vec-ld-char.c: Add lxv insn to expected output. · edaa6eb5
      [testsuite]
      
      2017-11-29  Will Schmidt  <will_schmidt@vnet.ibm.com>
      
          * gcc.target/powerpc/fold-vec-ld-char.c: Add lxv insn to expected output.
          * gcc.target/powerpc/fold-vec-ld-double.c: Add lxv insn to expected output.
          * gcc.target/powerpc/fold-vec-ld-float.c: Add lxv insn to expected output.
          * gcc.target/powerpc/fold-vec-ld-int.c: Add lxv insn to expected output.
          * gcc.target/powerpc/fold-vec-ld-longlong.c: Add lxv insn to expected output.
          * gcc.target/powerpc/fold-vec-ld-short.c: Add lxv insn to expected output.
      
      From-SVN: r255252
      Will Schmidt committed