1. 23 Nov, 2018 16 commits
    • PR tree-optimization/87756 - missing unterminated argument warning using address… · 70c70369
      PR tree-optimization/87756 - missing unterminated argument warning using address of a constant character
      
      gcc/ChangeLog:
      
      	PR tree-optimization/87756
      	* expr.c (string_constant): Synthesize a string literal from
      	the address of a constant character.
      	* tree.c (build_string_literal): Add an argument.
      	* tree.h (build_string_literal): Same.
      
      gcc/testsuite/ChangeLog:
      
      	PR tree-optimization/87756
      	* gcc.dg/builtin-memchr-2.c: New test.
      	* gcc.dg/builtin-memchr-3.c: Same.
      	* gcc.dg/warn-sprintf-no-nul-2.c: Same.
      
      From-SVN: r266418
      Martin Sebor committed
    • PR testsuite/88098 - FAIL: gcc.dg/Wbuiltin-declaration-mismatch-4.c · db1d09b0
      gcc/c/ChangeLog:
      
      	PR testsuite/88098
      	* c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
      	(maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
      
      gcc/testsuite/ChangeLog:
      
      	PR testsuite/88098
      	* gcc.dg/Wbuiltin-declaration-mismatch-4.c: Adjust.
      	* gcc.dg/Wbuiltin-declaration-mismatch-5.c: New test.
      	* gcc.dg/torture/pr67222.c: Adjust.
      
      From-SVN: r266417
      Martin Sebor committed
    • Implement P0415 More constexpr for std::complex. · e987fb1e
      2018-11-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
      
      	Implement P0415 More constexpr for std::complex.
      	* include/std/complex (conj(complex<Tp>), norm(complex<Tp>)): Constexpr;
      	(real(Tp), imag(Tp)): Constexpr;
      	(operator@=(Tp), operator@=(complex<Tp>)): Constexpr;
      	(operator@(Tp,complex<Tp>), operator@(complex<Tp>,Tp)
      	operator@(complex<Tp>,complex<Tp>)): Constexpr.
      	* testsuite/26_numerics/complex/comparison_operators/
      	more_constexpr.cc: New test.
      	* testsuite/26_numerics/complex/operators/more_constexpr.cc: New test.
      	* testsuite/26_numerics/complex/requirements/
      	more_constexpr.cc: New test.
      	* testsuite/26_numerics/complex/value_operations/
      	more_constexpr.cc: New test.
      	* testsuite/26_numerics/headers/complex/synopsis.cc:
      	Add _GLIBCXX20_CONSTEXPR to applicable operators; Add missing proj().
      	* testsuite/26_numerics/headers/complex/synopsis.cc:
      	Add _GLIBCXX20_CONSTEXPR to relevant decls.
      
      From-SVN: r266416
      Edward Smith-Rowland committed
    • [aarch64] Add CPU support for Ampere Computing's eMAG. · e02669db
      2018-11-23  Christoph Muellner <christoph.muellner@theobroma-system.com>
      
      	* config/aarch64/aarch64-cores.def: Define emag.
      	* config/aarch64/aarch64-tune.md: Regenerated with emag.
      	* config/aarch64/aarch64.c (emag_tunings): New struct.
      	* doc/invoke.texi: Document mtune value.
      
      From-SVN: r266415
      Christoph Muellner committed
    • [aarch64] Update xgene1 tuning struct. · cf28c77e
      2018-11-23  Christoph Muellner  <christoph.muellner@theobroma-systems.com>
      	    Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
      
      	* config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
      	for GCC 9.
      
      Co-Authored-By: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
      
      From-SVN: r266414
      Christoph Muellner committed
    • [aarch64] Add xgene1 prefetch tunings. · d5e9851e
      2018-11-23  Christoph Muellner  <christoph.muellner@theobroma-systems.com>
                  Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
      
      	* config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
      	prefetch tunings.
      
      Co-Authored-By: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
      
      From-SVN: r266413
      Christoph Muellner committed
    • [aarch64] Update xgene1_addrcost_table. · 52ddefd8
      2018-11-23  Christoph Muellner  <christoph.muellner@theobroma-systems.com>
                  Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
      
      	* config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post modify
      	costs.
      
      Co-Authored-By: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
      
      From-SVN: r266412
      Christoph Muellner committed
    • [aarch64/arm] Updating the cost table for xgene1. · 221e1f30
      2018-11-23  Christoph Muellner <christoph.muellner@theobroma-system.com>
      
      	* config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
      	for Xgene1.
      
      From-SVN: r266411
      Christoph Muellner committed
    • PR libstdc++/65229 fix pretty printer for std::bitset<0> · 14a9206d
      2018-11-23  Martin Sebor  <msebor@redhat.com>
      	    Jonathan Wakely  <jwakely@redhat.com>
      
      	PR libstdc++/65229
      	* python/libstdcxx/v6/printers.py (StdBitsetPrinter): Handle
      	exception thrown for std::bitset<0>.
      	* testsuite/libstdc++-prettyprinters/simple.cc: Test std::bitset<0>.
      
      Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
      
      From-SVN: r266409
      Martin Sebor committed
    • PR libstdc++/87308 adjust regex used in std::any pretty printer · 11aa881f
      The pretty printer for std::any fails when the contained value is a
      locally-defined type, because the name in the debuginfo has
      cv-qualifiers and ptr-declarators in different positions. The unexpected
      format confuses the printer. This makes the printer's regex handle
      either format.
      
      This isn't a complete fix because looking up the contained type fails
      when there are two types with the same name (defined in different local
      scopes). This applies to all closure types defined in a given function,
      as they all appear as "func()::lambda" in the debuginfo names.
      
      	PR libstdc++/87308 (partial)
      	* python/libstdcxx/v6/printers.py (StdExpAnyPrinter): Adjust regex to
      	work around PR 88166.
      	* testsuite/libstdc++-prettyprinters/cxx17.cc: Test std::any
      	containing a local type.
      
      From-SVN: r266408
      Jonathan Wakely committed
    • re PR tree-optimization/88149 (ICE in vect_transform_stmt since r265959) · f7b94dec
      2018-11-23  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/88149
      	* tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
      	the case where there are two different def types for the
      	same operand at different operand position in the same stmt.
      
      	* g++.dg/torture/pr88149.C: New testcase.
      
      From-SVN: r266406
      Richard Biener committed
    • [PATCH, ARM] Clean up arm backend using the @ construct for MD patterns · ff03f2d1
      This patch removes some of the machine mode checks from the arm backend when
      emitting instructions by using the '@' construct (Parameterized Names[2]). It
      is based on the previous AArch64 patch[1].
      
      [1] https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00673.html
      [2] https://gcc.gnu.org/onlinedocs/gccint/Parameterized-Names.html#Parameterized-Names
      
      
      2018-23-11  Mihail Ionescu  <mihail.ionescu@arm.com>
      
      	* config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
      	gen_atomic_compare_swap_1.
      	(arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
      	(arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
      	(arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
      	(arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
      	(arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
      	checks.
      	* config/arm/arm.md (neon_vext<mode>),
      	(neon_vrev64<mode>, neon_vrev32<mode>),
      	(neon_vrev16<mode>, neon_vtrn<mode>_internal),
      	(neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
      	before the pattern name.
      	* config/arm/sync.md:
      	(atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
      	(atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
      
      From-SVN: r266404
      Mihail Ionescu committed
    • re PR tree-optimization/86614 (duplicate -Warray-bounds for a strncpy call with… · 21150aba
      re PR tree-optimization/86614 (duplicate -Warray-bounds for a strncpy  call with out-of-bounds offset)
      
      	PR tree-optimization/86614
      	* gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
      	if TREE_NO_WARNING is set on ref.ref.
      
      	* c-c++-common/Warray-bounds-2.c (wrap_strncpy_dstarray_diff_neg,
      	call_strncpy_dstarray_diff_neg): Don't expect late -Warray-bounds
      	warnings, just early ones from FE.  Remove dg-prune-output.
      	* c-c++-common/Warray-bounds-6.c: New test.
      
      From-SVN: r266403
      Jakub Jelinek committed
    • re PR c/53608 (Documentation could be clearer about designated initializers of unions) · e0a35f9b
      2018-11-22  Sandra Loosemore  <sandra@codesourcery.com>
      	    Alan Coopersmith  <alan.coopersmith@oracle.com>
      
      	PR c/53608
      
      	gcc/
      	* doc/extend.texi (Designated Inits): Clarify handling of multiple
      	initializers for unions.
      
      Co-Authored-By: Alan Coopersmith <alan.coopersmith@oracle.com>
      
      From-SVN: r266402
      Sandra Loosemore committed
    • Daily bump. · 3f317614
      From-SVN: r266400
      GCC Administrator committed
    • lang.opt (fpad-source): New option. · f03d260a
      	* lang.opt (fpad-source): New option.
      	* scanner.c (load_line): Don't pad fixed form lines if
      	!flag_pad_source.
      	* invoke.texi (-fno-pad-source): Document.
      
      	* gfortran.dg/pad_source_1.f: New test.
      	* gfortran.dg/pad_source_2.f: New test.
      	* gfortran.dg/pad_source_3.f: New test.
      	* gfortran.dg/pad_source_4.f: New test.
      	* gfortran.dg/pad_source_5.f: New test.
      
      From-SVN: r266397
      Jakub Jelinek committed
  2. 22 Nov, 2018 24 commits
    • re PR lto/88142 (ICE in lto_warn at ipa-devirt.c:1020 since r265519) · bbbef996
      	PR lto/88142
      	* ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
      	parameters; do not warn here.
      	(odr_subtypes_equivalent_p): Likewise.
      	(warn_odr): Fix typo.
      	(warn_types_mismatch): Do not output confused warnings on integer types.
      	(odr_types_equivalent_p): Update.
      
      	* g++.dg/lto/odr-5_0.C: New testcase.
      	* g++.dg/lto/odr-5_1.C: New testcase.
      
      From-SVN: r266396
      Jan Hubicka committed
    • lto.c (cmp_type_location): Remove. · d7dce787
      	* lto.c (cmp_type_location): Remove.
      	(lto_read_decls): Do not allocate odr_types.
      
      From-SVN: r266395
      Jan Hubicka committed
    • i386.c (ix86_option_override_internal, [...]): Formatting fixes. · 95e3eb80
      	* config/i386/i386.c (ix86_option_override_internal,
      	ix86_can_inline_p, classify_argument, construct_container,
      	ix86_expand_prologue, ix86_expand_split_stack_prologue,
      	ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
      	expand_setmem_epilogue_via_loop, promote_duplicated_reg,
      	ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
      	Formatting fixes.
      
      From-SVN: r266391
      Jakub Jelinek committed
    • i386.c (ix86_option_override_internal): For stack_protector_guard related options... · a7433f32
      	* config/i386/i386.c (ix86_option_override_internal): For
      	stack_protector_guard related options, use opts_set->x_ instead
      	of global_options_set. and prefix options with opts->x_ .  Move
      	defaults for offset and reg into else block.
      
      From-SVN: r266390
      Jakub Jelinek committed
    • i386.c (ix86_check_avx_upper_register): Return true for all SSE registers with mode bitsize > 128. · e4b02155
      	* config/i386/i386.c (ix86_check_avx_upper_register):
      	Return true for all SSE registers with mode bitsize > 128.
      
      From-SVN: r266389
      Uros Bizjak committed
    • odr-2_0.C: Drop dg-lto-options. · 69a69df1
      	* g++.dg/lto/odr-2_0.C: Drop dg-lto-options.
      	* g++.dg/lto/odr-3_0.C: Likewise; harden for optimizing compilatoin.
      
      From-SVN: r266388
      Jan Hubicka committed
    • re PR tree-optimization/85794 ([AArch64] ICE in expand_vector_condition in GIMPLE pass: veclower2) · b9207e90
      	PR tree-optimization/85794
      	* gcc.dg/vect/O3-pr85794.c: New test.
      
      From-SVN: r266387
      Jakub Jelinek committed
    • Improve relocation · ff2e7f19
      2018-11-22  Marc Glisse  <marc.glisse@inria.fr>
      
      	PR libstdc++/87106
      	* include/bits/stl_algobase.h: Include <type_traits>.
      	(__niter_base): Add noexcept specification.
      	* include/bits/stl_deque.h: Include <bits/stl_uninitialized.h>.
      	(__is_trivially_relocatable): Specialize for deque.
      	* include/bits/stl_iterator.h: Include <type_traits>.
      	(__niter_base): Add noexcept specification.
      	* include/bits/stl_uninitialized.h (__is_trivially_relocatable):
      	Add parameter for meta-programming.
      	(__relocate_a_1, __relocate_a): Add noexcept specification.
      	* include/bits/stl_vector.h (__use_relocate): Test __relocate_a.
      
      From-SVN: r266386
      Marc Glisse committed
    • re PR rtl-optimization/87718 (FAIL: gcc.target/i386/avx512dq-concatv2si-1.c) · eeae9314
      2018-11-22  Vladimir Makarov  <vmakarov@redhat.com>
      
      	PR rtl-optimization/87718
      	* ira-costs.c: Remove trailing white-spaces.
      	(record_operand_costs): Add a special treatment for moves
      	involving a hard register.
      
      2018-11-22  Vladimir Makarov  <vmakarov@redhat.com>
      
      	PR rtl-optimization/87718
      	* gcc.target/i386/pr82361-1.c: Check only the first operand of
      	moves.
      
      From-SVN: r266385
      Vladimir Makarov committed
    • i386.c (ix86_avx_emit_vzeroupper): Remove. · b8a31831
      	* config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
      	(ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
      
      From-SVN: r266382
      Uros Bizjak committed
    • Fix option values for -march. · 2559ef9f
      2018-11-22  Martin Liska  <mliska@suse.cz>
      
      	* common/config/i386/i386-common.c (processor_names): Add
      	static assert and add missing "znver2".
      	(ix86_get_valid_option_values): Add checking assert for null
      	values and add "native" value if feasible.
      	* config/i386/i386.h: Do not declare size of processor_names.
      	* common/config/i386/i386-common.c:
      	* config/i386/i386.c: Add static assert for size
      	of processor_cost_table.
      
      From-SVN: r266381
      Martin Liska committed
    • PR85434: Prevent spilling of stack protector guard's address on ARM · 89d75572
      In case of high register pressure in PIC mode, address of the stack
      protector's guard can be spilled on ARM targets as shown in PR85434,
      thus allowing an attacker to control what the canary would be compared
      against. ARM does lack stack_protect_set and stack_protect_test insn
      patterns, defining them does not help as the address is expanded
      regularly and the patterns only deal with the copy and test of the
      guard with the canary.
      
      This problem does not occur for x86 targets because the PIC access and
      the test can be done in the same instruction. Aarch64 is exempt too
      because PIC access insn pattern are mov of UNSPEC which prevents it from
      the second access in the epilogue being CSEd in cse_local pass with the
      first access in the prologue.
      
      The approach followed here is to create new "combined" set and test
      standard pattern names that take the unexpanded guard and do the set or
      test. This allows the target to use an opaque pattern (eg. using UNSPEC)
      to hide the individual instructions being generated to the compiler and
      split the pattern into generic load, compare and branch instruction
      after register allocator, therefore avoiding any spilling. This is here
      implemented for the ARM targets. For targets not implementing these new
      standard pattern names, the existing stack_protect_set and
      stack_protect_test pattern names are used.
      
      To be able to split PIC access after register allocation, the functions
      had to be augmented to force a new PIC register load and to control
      which register it loads into. This is because sharing the PIC register
      between prologue and epilogue could lead to spilling due to CSE again
      which an attacker could use to control what the canary gets compared
      against.
      
      2018-11-22  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
      
          gcc/
          PR target/85434
          * target-insns.def (stack_protect_combined_set): Define new standard
          pattern name.
          (stack_protect_combined_test): Likewise.
          * cfgexpand.c (stack_protect_prologue): Try new
          stack_protect_combined_set pattern first.
          * function.c (stack_protect_epilogue): Try new
          stack_protect_combined_test pattern first.
          * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
          parameters to control which register to use as PIC register and force
          reloading PIC register respectively.  Insert in the stream of insns if
          possible.
          (legitimize_pic_address): Expose above new parameters in prototype and
          adapt recursive calls accordingly.  Use pic_reg if non null instead of
          cached one.
          (arm_load_pic_register): Add pic_reg parameter and use it if non null.
          (arm_legitimize_address): Adapt to new legitimize_pic_address
          prototype.
          (thumb_legitimize_address): Likewise.
          (arm_emit_call_insn): Adapt to require_pic_register prototype change.
          (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
          (thumb1_expand_prologue): Likewise.
          * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
          change.
          (arm_load_pic_register): Likewise.
          * config/arm/predicated.md (guard_addr_operand): New predicate.
          (guard_operand): New predicate.
          * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
          prototype change.
          (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
          prototype change.
          (stack_protect_combined_set): New expander..
          (stack_protect_combined_set_insn): New insn_and_split pattern.
          (stack_protect_set_insn): New insn pattern.
          (stack_protect_combined_test): New expander.
          (stack_protect_combined_test_insn): New insn_and_split pattern.
          (arm_stack_protect_test_insn): New insn pattern.
          * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
          * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
          (UNSPEC_SP_TEST): Likewise.
          * doc/md.texi (stack_protect_combined_set): Document new standard
          pattern name.
          (stack_protect_set): Clarify that the operand for guard's address is
          legal.
          (stack_protect_combined_test): Document new standard pattern name.
          (stack_protect_test): Clarify that the operand for guard's address is
          legal.
      
          gcc/testsuite/
          PR target/85434
          * gcc.target/arm/pr85434.c: New test.
      
      From-SVN: r266379
      Thomas Preud'homme committed
    • re PR tree-optimization/88148 (ICE in tree_nop_conversion_p at gcc/tree.c:12550 since r264273) · e5f0e041
      2018-11-22  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/88148
      	* tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
      	valueization callback parameter and handle it.
      	* tree-ssa-loop-niter.h (simplify_replace_tree): Export.
      	* tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
      
      	* gfortran.dg/pr88148.f90: New testcase.
      
      From-SVN: r266378
      Richard Biener committed
    • Add new maintainer script for PRs that can be closed. · 9479946c
      2018-11-22  Martin Liska  <mliska@suse.cz>
      
      	* bugzilla-close-candidate.py: New file.
      
      From-SVN: r266377
      Martin Liska committed
    • PR libstdc++/87520 Always pass type-punned type_info reference · a942dfca
      The implementations of std::make_shared for -frtti and -fno-rtti are not
      compatible, because they pass different arguments to
      _Sp_counted_ptr_inplace::_M_get_deleter and so can't interoperate.
      Either the argument doesn't match the expected value, and so the
      shared_ptr::_M_ptr member is never set, or the type-punned reference is
      treated as a real std::type_info object and gets dereferenced.
      
      This patch removes the differences between -frtti and -fno-rtti, so that
      typeid is never used, and the type-punned reference is used in both
      cases. For backwards compatibility with existing code that passes
      typeid(_Sp_make_shared_tag) that still needs to be handled, but only
      after checking that the argument is not the type-punned reference (so
      it's safe to treat as a real std::type_info object). The reference is
      bound to an object of literal type, so that it doesn't need a guard
      variable to make its initialization thread-safe.
      
      This patch also fixes 87520 by ensuring that the type-punned reference
      is bound to "a region of storage of suitable size and alignment to
      contain an object of the reference's type" (as per the proposed
      resolution of Core DR 453).
      
      If all objects are built with the fixed version of GCC then -frtti and
      -fno-rtti can be mixed freely and std::make_shared will work correctly.
      If some objects are built with unfixed GCC versions then problems can
      still arise, depending on which template instantiations are kept by the
      linker.
      
      	PR libstdc++/85930
      	PR libstdc++/87520
      	* include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti)
      	[__cpp_rtti]: Define even when RTTI is enabled. Use array of
      	sizeof(type_info) so that type-punned reference binds to an object
      	of the correct size as well as correct alignment.
      	(_Sp_counted_ptr_inplace::_M_get_deleter) [__cpp_rtti]: Check for
      	_S_ti() reference even when RTTI is enabled.
      	(__shared_ptr(_Sp_make_shared_tag, const _Alloc&, _Args&&...))
      	[__cpp_rtti]: Pass _S_ti() instead of typeid(_Sp_make_shared_tag).
      
      From-SVN: r266376
      Jonathan Wakely committed
    • Update changelog entry. · a8589077
      From-SVN: r266374
      Martin Liska committed
    • * g++.dg/lto/odr-2_0.C: Remove extra brace · 5ce83c0e
      From-SVN: r266373
      Andreas Schwab committed
    • re PR c++/87229 (ICE: tree code 'call_expr' is not supported in LTO streams) · 7f29dafe
      2018-11-22  Richard Biener  <rguenther@suse.de>
      
      	PR lto/87229
      	PR lto/88112
      	* lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
      	which can appear in size expressions.
      	* tree-streamer-in.c (unpack_ts_base_value_fields): Stream
      	CALL_EXPR_BY_DESCRIPTOR.
      	(streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
      	* tree-streamer-out.c (pack_ts_base_value_fields): Stream
      	CALL_EXPR_BY_DESCRIPTOR.
      	(streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
      
      	Revert
      	PR lto/87229
      	* tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
      	sizepos values.
      
      From-SVN: r266372
      Richard Biener committed
    • re PR tree-optimization/88069 (ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.c:709) · d42ef0f8
      2018-11-22  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/88069
      	* tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
      	apply to default defs.
      
      From-SVN: r266371
      Richard Biener committed
    • re PR target/85644 (-fstack-protector generates invalid read to %fs:0x0 on mac) · e15bac63
      	PR target/85644
      	PR target/86832
      	* config/i386/i386.c (ix86_option_override_internal): Default
      	ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
      	is defined.
      	* config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
      	stack_protect_test, stack_protect_test_<mode>): Use empty condition
      	instead of TARGET_SSP_TLS_GUARD.
      
      From-SVN: r266370
      Jakub Jelinek committed
    • re PR c++/87386 (Error message for static_assert show wrong range) · 3bcd9882
      	PR c++/87386
      	* parser.c (cp_parser_operator): Use str.get_value () instead of just
      	str in USERDEF_LITERAL_VALUE and USERDEF_LITERAL_SUFFIX_ID arguments.
      
      From-SVN: r266369
      Jakub Jelinek committed
    • Do not mix -fsanitize=thread and -mabi=ms (PR sanitizer/88017). · 577fe16a
      2018-11-22  Martin Liska  <mliska@suse.cz>
      
      	PR sanitizer/88017
      	* config/i386/i386.c (ix86_option_override_internal):
      2018-11-22  Martin Liska  <mliska@suse.cz>
      
      	PR sanitizer/88017
      	* gcc.dg/tsan/pr88017.c: New test.
      
      From-SVN: r266368
      Martin Liska committed
    • Replace sync builtins with atomic builtins · 0536d5b3
      The old __sync builtins have been deprecated for a long time now in
      favor of the __atomic builtins following the C++11/C11 memory model.
      This patch converts libgfortran to use the modern __atomic builtins.
      
      At the same time I weakened the consistency to relaxed for
      incrementing and decrementing the counter, and acquire-release when
      decrementing to check whether the counter is 0 and the unit can be
      freed.  This is similar to e.g. std::shared_ptr in C++.
      
      Regtested on x86_64-pc-linux-gnu.
      
      libgfortran/ChangeLog:
      
      2018-11-22  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	* acinclude.m4 (LIBGFOR_CHECK_ATOMIC_FETCH_ADD): Rename and test
      	presence of atomic builtins instead of sync builtins.
      	* configure.ac (LIBGFOR_CHECK_ATOMIC_FETCH_ADD): Call new test.
      	* io/io.h (inc_waiting_locked): Use __atomic_fetch_add.
      	(predec_waiting_locked): Use __atomic_add_fetch.
      	(dec_waiting_unlocked): Use __atomic_fetch_add.
      	* config.h.in: Regenerated.
      	* configure: Regenerated.
              * Makefile.in: Regenerated.
      
      From-SVN: r266367
      Janne Blomqvist committed
    • re PR d/87824 (x86_64-linux multilib issues) · d8bcb00f
      libphobos/ChangeLog:
      
      2018-11-22  Johannes Pfau  <johannespfau@gmail.com>
      
      	PR d/87824
      	* testsuite/libphobos.shared/shared.exp: Set proper path to phobos
      	library for multilib builds.
      
      From-SVN: r266366
      Johannes Pfau committed