1. 17 May, 2019 6 commits
    • Handle a location with NULL as a file (PR driver/90495) · 804424b9
      2019-05-17  Martin Liska  <mliska@suse.cz>
      
      	PR driver/90495
      	* toplev.c (output_stack_usage): With LTO and sanitizer it
      	happens that a global ctor (_GLOBAL__sub_I_00099_0_main)
      	has no file location.
      
      From-SVN: r271312
      Martin Liska committed
    • Remove a test-case that leads to a huge stack (and file) allocation (PR middle-end/90478). · e2014c8b
      2019-05-17  Martin Liska  <mliska@suse.cz>
      
      	PR middle-end/90478
      	* gcc.dg/tree-ssa/pr90478-2.c: Remove.
      
      From-SVN: r271311
      Martin Liska committed
    • re PR go/90482 (Many 32-bit Solaris/SPARC tests FAIL with SIGBUS) · fb83aeb4
      	PR go/90482
          compiler: make value method of direct interface type takes pointer
          
          Currently, a value method of a direct interface type takes the
          value of the receiver, which is pointer shaped, as the first
          parameter. When this method is called through interface, we
          actually pass the interface data as a pointer. On most platforms
          this is ok, as the underlying calling convention is the same,
          except that on SPARC32, the calling convention is actually
          different.
          
          This CL changes the method function actually takes a pointer.
          The function will convert the pointer to the pointer-shaped
          receiver type (a no-op conversion from machine code's aspect).
          For a direct call, in the caller we convert the receiver to a
          pointer (also no-op conversion) before invoking the method. For
          an interface call, we pass the pointer as before. This way, it is
          consistent that we always pass a pointer.
          
          Hopefully this fixes SPARC32 build and https://gcc.gnu.org/PR90482.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/177758
      
      From-SVN: r271310
      Ian Lance Taylor committed
    • Move from state of allocators (LWG2593) · 935469da
      2019-05-17  François Dumont  <fdumont@gcc.gnu.org>
      
      	Move from state of allocators (LWG2593)
      	* include/bits/stl_deque.h
      	(_Deque_base(_Deque_base&&, false_type)): Remove.
      	(_Deque_base(_Deque_base&&, true_type)): Remove.
      	(_Deque_base(_Deque_base&&)): Adapt.
      	(_Deque_base::_M_move_impl()): Remove.
      	* testsuite/util/testsuite_allocator.h
      	(propagating_allocator(propagating_allocator&&)): Preserve move from
      	state.
      	* testsuite/23_containers/deque/allocator/move_assign.cc (test02):
      	Adapt.
      	* testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
      	Adapt.
      	* testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
      	* testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
      	* testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
      	Adapt.
      	* testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
      	Adapt.
      	* testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
      	* testsuite/23_containers/unordered_map/allocator/move_assign.cc
      	(test02): Adapt.
      	* testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
      	(test02): Adapt.
      	* testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
      	(test02): Adapt.
      	* testsuite/23_containers/unordered_set/allocator/move_assign.cc
      	(test02): Adapt.
      	* testsuite/23_containers/vector/allocator/move_assign.cc (test02):
      	Adapt.
      	* testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
      	Adapt.
      	* testsuite/21_strings/basic_string/allocator/char/move_assign.cc
      	(test02): Adapt.
      	* testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
      	(test02): Adapt.
      
      From-SVN: r271309
      François Dumont committed
    • compiler: intrinsify runtime/internal/atomic functions · 395389bf
          
          Currently runtime/internal/atomic functions are implemented in C
          using C compiler intrinsics. This CL lets the Go frontend
          recognize these functions and turn them into intrinsics directly.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/176918
      
      	* go-gcc.cc (Gcc_backend::Gcc_backend): Define atomic builtins.
      
      From-SVN: r271308
      Cherry Zhang committed
    • Daily bump. · 6a362e12
      From-SVN: r271307
      GCC Administrator committed
  2. 16 May, 2019 25 commits
    • compiler: add intrinsics for runtime/internal/sys functions · f6d67708
          
          runtime/internal/sys.Ctz32/64 and Bswap32/64 are currently
          implemented with compiler builtin functions. But if they are
          called from another package, the compiler does not know and
          therefore cannot turn them into compiler intrinsics. This CL
          makes the compiler recognize these functions and turn them into
          intrinsics directly, as the gc compiler does.
          
          This CL sets up a way for adding intrinsics in the compiler.
          More intrinsics will be added in later CLs.
          
          Also move the handling of runtime.getcallerpc/sp to the new way
          of generating intrinsics.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/176917
      
      From-SVN: r271303
      Ian Lance Taylor committed
    • Remove incorrect assertion from filesystem::absolute · 71101282
      The assertion is wrong, it should be *s.end() == 0, but that's not
      allowed. Just remove it, but keep the comment.
      
      	* src/c++17/fs_ops.cc (absolute(const path&, error_code&))
      	[_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
      
      From-SVN: r271300
      Jonathan Wakely committed
    • re PR c++/90484 (ICE in equal_mem_array_ref_p at gcc/tree-ssa-scopedtables.c:550… · afc819e8
      re PR c++/90484 (ICE in equal_mem_array_ref_p at gcc/tree-ssa-scopedtables.c:550 since r270433 on i586)
      
      	PR c++/90484
      	* tree-ssa-scopedtables.c (equal_mem_array_ref_p): Don't assert that
      	sz0 is equal to sz1, instead return false in that case.
      
      From-SVN: r271299
      Jakub Jelinek committed
    • omp-low.c (lower_rec_input_clauses): If OMP_CLAUSE_IF has non-constant expression... · 4e65deef
      	* omp-low.c (lower_rec_input_clauses): If OMP_CLAUSE_IF
      	has non-constant expression, force sctx.lane and use two
      	argument IFN_GOMP_SIMD_LANE instead of single argument.
      	* tree-ssa-dce.c (eliminate_unnecessary_stmts): Don't DCE
      	two argument IFN_GOMP_SIMD_LANE without lhs.
      	* tree-vectorizer.h (struct _loop_vec_info): Add simd_if_cond
      	member.
      	(LOOP_VINFO_SIMD_IF_COND, LOOP_REQUIRES_VERSIONING_FOR_SIMD_IF_COND):
      	Define.
      	(LOOP_REQUIRES_VERSIONING): Or in
      	LOOP_REQUIRES_VERSIONING_FOR_SIMD_IF_COND.
      	* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
      	simd_if_cond.
      	(vect_analyze_loop_2): Punt if LOOP_VINFO_SIMD_IF_COND is constant 0.
      	* tree-vect-loop-manip.c (vect_loop_versioning): Add runtime check
      	from simd if clause if needed.
      
      	* gcc.dg/vect/vect-simd-1.c: New test.
      	* gcc.dg/vect/vect-simd-2.c: New test.
      	* gcc.dg/vect/vect-simd-3.c: New test.
      	* gcc.dg/vect/vect-simd-4.c: New test.
      
      From-SVN: r271298
      Jakub Jelinek committed
    • Implement sane variant converting constructor (P0608R3) · d069df01
      	* include/std/variant (__overload_set): Remove.
      	(_Arr): New helper.
      	(_Build_FUN): New class template to define a single FUN overload,
      	with specializations to prevent unwanted conversions, as per P0608R3.
      	(_Build_FUNs): New class template to build an overload set of FUN.
      	(_FUN_type): New alias template to perform overload resolution.
      	(__accepted_type): Use integer_constant base for failure case. Use
      	_FUN_type for successful case.
      	(variant::__accepted_index): Use _Tp instead of _Tp&&.
      	(variant::variant(_Tp&&)): Likewise.
      	(variant::operator=(_Tp&&)): Likewise.
      
      From-SVN: r271296
      Jonathan Wakely committed
    • Changes to std::variant to reduce code size · b62dcd16
      	* include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
      	Replace raw visitation with a runtime check for the valueless state
      	and a non-raw visitor.
      	(_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
      	(variant::index()): Remove branch.
      	(variant::swap(variant&)): Use valueless_by_exception() instead of
      	comparing the index to variant_npos, and add likelihood attribute.
      
      From-SVN: r271295
      Jonathan Wakely committed
    • tree-affine.c (expr_to_aff_combination): New function split out from... · 5120e0d8
      2019-05-16  Richard Biener  <rguenther@suse.de>
      
      	* tree-affine.c (expr_to_aff_combination): New function split
      	out from...
      	(tree_to_aff_combination): ... here.
      	(aff_combination_expand): Avoid building a GENERIC tree.
      
      From-SVN: r271294
      Richard Biener committed
    • gcc: move assemble_start_function / assemble_end_function to output_mi_thunk · f7430263
      Let backends call assemble_start_function after they have generated
      thunk function body so that a constant pool could be output if it is
      required. This may help backends to avoid implementing custom constant
      loading code specifically for the MI thunk and reuse existing
      functionality.
      
      gcc/
      2019-05-16  Max Filippov  <jcmvbkbc@gmail.com>
      
      	* cgraphunit.c (cgraph_node::expand_thunk): Remove
      	assemble_start_function and assemble_end_function calls.
      	* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Call
      	assemble_start_function and assemble_end_function.
      	* config/arc/arc.c (arc_output_mi_thunk): Likewise.
      	* config/arm/arm.c (arm_output_mi_thunk): Likewise.
      	* config/bfin/bfin.c (bfin_output_mi_thunk): Likewise.
      	* config/c6x/c6x.c (c6x_output_mi_thunk): Likewise.
      	* config/cris/cris.c (cris_asm_output_mi_thunk): Likewise.
      	* config/csky/csky.c (csky_output_mi_thunk): Likewise.
      	* config/epiphany/epiphany.c (epiphany_output_mi_thunk): Likewise.
      	* config/frv/frv.c (frv_asm_output_mi_thunk): Likewise.
      	* config/i386/i386.c (x86_output_mi_thunk): Likewise.
      	* config/ia64/ia64.c (ia64_output_mi_thunk): Likewise.
      	* config/m68k/m68k.c (m68k_output_mi_thunk): Likewise.
      	* config/microblaze/microblaze.c (microblaze_asm_output_mi_thunk):
      	Likewise.
      	* config/mips/mips.c (mips_output_mi_thunk): Likewise.
      	* config/mmix/mmix.c (mmix_asm_output_mi_thunk): Likewise.
      	* config/mn10300/mn10300.c (mn10300_asm_output_mi_thunk): Likewise.
      	* config/nds32/nds32.c (nds32_asm_output_mi_thunk): Likewise.
      	* config/nios2/nios2.c (nios2_asm_output_mi_thunk): Likewise.
      	* config/or1k/or1k.c (or1k_output_mi_thunk): Likewise.
      	* config/pa/pa.c (pa_asm_output_mi_thunk): Likewise.
      	* config/riscv/riscv.c (riscv_output_mi_thunk): Likewise.
      	* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
      	* config/s390/s390.c (s390_output_mi_thunk): Likewise.
      	* config/sh/sh.c (sh_output_mi_thunk): Likewise.
      	* config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
      	* config/spu/spu.c (spu_output_mi_thunk): Likewise.
      	* config/stormy16/stormy16.c (xstormy16_asm_output_mi_thunk):
      	Likewise.
      	* config/tilegx/tilegx.c (tilegx_output_mi_thunk): Likewise.
      	* config/tilepro/tilepro.c (tilepro_asm_output_mi_thunk): Likewise.
      	* config/vax/vax.c (vax_output_mi_thunk): Likewise.
      
      From-SVN: r271293
      Max Filippov committed
    • tree-ssa-alias.c (alias_stats): Add aliasing_component_refs_p_may_alias and… · 6727c729
      tree-ssa-alias.c (alias_stats): Add aliasing_component_refs_p_may_alias and aliasing_component_refs_p_no_alias.
      
      
      	* tree-ssa-alias.c (alias_stats): Add
      	aliasing_component_refs_p_may_alias and
      	aliasing_component_refs_p_no_alias.
      	(dump_alias_stats): Print aliasing_component_refs_p stats.
      	(aliasing_component_refs_p): Update stats.
      
      From-SVN: r271292
      Jan Hubicka committed
    • Replace _Equal_helper with simpler class template · eba20412
      By defining the new helper inside _Hashtable_base it doesn't need all
      the template parameters to be provided, and by making it only
      responsible for checking a possibly-cached hash code it only has to do
      one thing.  The caller can use the equality predicate itself instead of
      duplicating that in the helper template.
      
      	* include/bits/hashtable_policy.h (_Equal_helper): Remove.
      	(_Hashtable_base::_Equal_hash_code): Define new class template.
      	(_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
      	_Equal_helper.
      
      From-SVN: r271291
      Jonathan Wakely committed
    • Change EBO accessors from static to non-static member functions · 1f6ea968
      	* include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
      	Replace with _M_get non-static member function.
      	(_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
      	member function.
      	(_Hash_code_base, _Local_iterator_base, _Hashtable_base):
      	(_Hashtable_alloc): Adjust to use non-static members of EBO helper.
      
      From-SVN: r271290
      Jonathan Wakely committed
    • Do not allow target_clones with alias attr (PR lto/90500). · a61b003f
      2019-05-16  Martin Liska  <mliska@suse.cz>
      
      	PR lto/90500
      	* multiple_target.c (expand_target_clones): Do not allow
      	target_clones being used with a symbol that is an alias.
      2019-05-16  Martin Liska  <mliska@suse.cz>
      
      	PR lto/90500
      	* gcc.target/i386/pr90500-1.c: New test.
      	* gcc.target/i386/pr90500-2.c: New test.
      
      From-SVN: r271289
      Martin Liska committed
    • tree-ssa-uninit: avoid ICE with BIT_AND_EXPR (PR 90394) · 74a96dd2
      2019-05-16  Vladislav Ivanishin  <vlad@ispras.ru>
      
      	PR tree-optimization/90394
      	* tree-ssa-uninit.c (is_pred_expr_subset_of): Potentially give false
      	positives rather than ICE for cases where (code2 == NE_EXPR
      	&& code1 == BIT_AND_EXPR).
      
      testsuite/
      	* gcc.dg/uninit-pr90394-1-gimple.c: New test.
      	* gcc.dg/uninit-pr90394.c: New test.
      
      From-SVN: r271287
      Vladislav Ivanishin committed
    • Remove unnecessary non-const accessors in hash table bases · 0bc229db
      The const accessors are OK (and arguably more correct) for most callers
      to use. The _M_swap functions that use the non-const overloads can just
      directly use the _S_get members of the EBO helpers.
      
      	* include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
      	_S_get accessors for members in EBO helpers.
      	(_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
      	(_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
      	overloads.
      	(_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
      	helpers.
      	(_Hashtable_base::_M_eq()): Remove non-const overload.
      
      From-SVN: r271286
      Jonathan Wakely committed
    • re PR fortran/90329 (Incompatibility between gfortran and C lapack calls) · 4b8e35f1
      	PR fortran/90329
      	* tree-core.h (struct tree_decl_common): Document
      	decl_nonshareable_flag for PARM_DECLs.
      	* tree.h (DECL_HIDDEN_STRING_LENGTH): Define.
      	* calls.c (expand_call): Don't try tail call if caller
      	has any DECL_HIDDEN_STRING_LENGTH PARM_DECLs that are or might be
      	passed on the stack and callee needs to pass any arguments on the
      	stack.
      	* tree-streamer-in.c (unpack_ts_decl_common_value_fields): Use
      	else if instead of series of mutually exclusive ifs.  Handle
      	DECL_HIDDEN_STRING_LENGTH for PARM_DECLs.
      	* tree-streamer-out.c (pack_ts_decl_common_value_fields): Likewise.
      
      	* trans-decl.c (create_function_arglist): Set
      	DECL_HIDDEN_STRING_LENGTH on hidden string length PARM_DECLs if
      	len is constant.
      
      From-SVN: r271285
      Jakub Jelinek committed
    • * lto-streamer.h (LTO_major_version): Bump to 9. · 86c23d93
      From-SVN: r271284
      Jakub Jelinek committed
    • re PR testsuite/90502 (gcc.dg/tree-ssa/vector-6.c FAILs) · 8c3f47fe
      2019-05-16  Richard Biener  <rguenther@suse.de>
      
      	PR testsuite/90502
      	* gcc.dg/tree-ssa/vector-6.c: Adjust for half of the
      	transforms happening earlier now.
      
      From-SVN: r271283
      Richard Biener committed
    • testsuite - improve check_effective_target_cet. · d695ae21
      In some cases the test using setssbsy was not enough to
      detemine support for the CET insns.  Adding -fcf-protection
      explicitly causes other insns to be emitted (e.g. endbr32/64)
      which are a more complete check.
      
      2019-05-16  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* lib/target-supports.exp (check_effective_target_cet): Add the
      	-fcf-protection flag to the build conditions.
      
      From-SVN: r271282
      Iain Sandoe committed
    • re PR tree-optimization/90106 (builtin sqrt() ignoring libm's sqrt call result) · 5486a996
      	PR tree-optimization/90106
      	* tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds): Add
      	new parameter as new internal function call, also move it to new
      	basic block.
      	(use_internal_fn): Pass internal function call to
      	shrink_wrap_one_built_in_call_with_conds.
      
      	gcc/testsuite
      	* gcc.dg/cdce1.c: Check tailcall code generation after cdce pass.
      	* gcc.dg/cdce2.c: Likewise.
      
      From-SVN: r271281
      Jun Ma committed
    • [RTEMS] Change multilibs for ARM · fd893bf1
      Account for Cortex-M3 Errata 602117.  The -mfix-cortex-m3-ldrd option is
      enabled by default, if -mcpu=cortex-m3 is used.
      
      gcc/
      
      	* config/arm/t-rtems: Replace ARMv7-M multilibs with Cortex-M
      	multilibs.
      
      From-SVN: r271280
      Sebastian Huber committed
    • re PR target/90424 (memcpy into vector builtin not optimized) · 1bf2a0b9
      2019-05-16  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/90424
      	* tree-ssa.c (non_rewritable_lvalue_p): Handle inserts from
      	aligned subvectors.
      	(execute_update_addresses_taken): Likewise.
      	* tree-cfg.c (verify_gimple_assign_ternary): Likewise.
      
      	* g++.target/i386/pr90424-1.C: New testcase.
      	* g++.target/i386/pr90424-2.C: Likewise.
      
      From-SVN: r271279
      Richard Biener committed
    • gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT. · adfe6e4b
      2019-05-16  Richard Biener  <rguenther@suse.de>
      
      	c/
      	* gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
      	(c_parser_gimple_unary_expression): Likewise.
      
      	* gimple-pretty-print.c (dump_ternary_rhs): Dump BIT_INSERT_EXPR
      	as __BIT_INSERT with -gimple.
      
      	* gcc.dg/gimplefe-40.c: Amend again.
      
      From-SVN: r271278
      Richard Biener committed
    • Add myself to MAINTAINERS. · f6b2daaf
      2019-05-16  Jun Ma  <junma@linux.alibaba.com>
      
      	* MAINTAINERS (Write After Approval): Add myself.
      
      From-SVN: r271277
      Jun Ma committed
    • compiler: improve escape analysis on interface conversions · e8e91b84
          
          If an interface does not escape, it doesn't need a heap
          allocation to hold the data (for non-direct interface type).
          This CL improves the escape analysis to track interface
          conversions, and reduces these allocations.
          
          Implicit interface conversions were mostly added late in the
          compilation pipeline, after the escape analysis. For the escape
          analysis to see them, we move the introduction of these
          conversions earlier, right before the escape analysis.
          
          Now that the compiler can generate interface conversions inlined,
          gcc/testsuite/go.test/test/nilptr2.go needs to be adjusted as in
          golang.org/cl/176579, so the use function does an actual use.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/176459
      
      	* go.test/test/nilptr2.go: Change use function to actually do
      	something.
      
      From-SVN: r271276
      Cherry Zhang committed
    • Daily bump. · 92b8603c
      From-SVN: r271275
      GCC Administrator committed
  3. 15 May, 2019 9 commits