Commit Graph

168674 Commits

Author SHA1 Message Date
Robin Dapp
5719731f47 S/390: Fix larl/PIC test case.
This patch adds -march=z900 to a test case that expects larl for loading
a value via the GOT.  On z10 and later, lgrl is used which is tested in
a new, separate test case.

gcc/testsuite/ChangeLog:

2019-05-17  Robin Dapp  <rdapp@linux.ibm.com>

  * gcc.target/s390/global-array-element-pic.c: Add -march=z900.
  * gcc.target/s390/global-array-element-pic2.c: New test for z10+.

From-SVN: r271321
2019-05-17 12:18:09 +00:00
Richard Biener
c449919263 gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2019-05-17  Richard Biener  <rguenther@suse.de>

	c/
	* gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
	(c_parser_gimple_unary_expression): Likewise.
	(c_parser_gimple_parentized_ternary_expression): New function.

	* gimple-pretty-print.c (dump_ternary_rhs): Handle dumping
	VEC_PERM_EXPR as __VEC_PERM with -gimple.

	* gcc.dg/gimplefe-41.c: New testcase.

From-SVN: r271320
2019-05-17 12:04:21 +00:00
Jun Ma
35ee7f5468 re PR tree-optimization/90106 (builtin sqrt() ignoring libm's sqrt call result)
PR tree-optimization/90106
	* gcc.dg/cdce3.c: New test.

From-SVN: r271319
2019-05-17 10:13:29 +00:00
Andreas Krebbel
f4debcd1e8 S/390: Fix vec_sldw builtin
The builtin was wired up to the wrong pattern.  Fixed with this patch.

gcc/ChangeLog:

2019-05-17  Andreas Krebbel  <krebbel@linux.ibm.com>

	* config/s390/s390-builtins.def (s390_vec_sldw_*): Use the
	vec_sldw insn pattern.

gcc/testsuite/ChangeLog:

2019-05-17  Andreas Krebbel  <krebbel@linux.ibm.com>

	* gcc.target/s390/zvector/vec-sldw.c: New test.

From-SVN: r271318
2019-05-17 10:08:13 +00:00
Jonathan Wakely
c471fb2f94 Fix __invoke_r<void> to be valid in C++11
* include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
	Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
	in C++11.

From-SVN: r271317
2019-05-17 10:28:17 +01:00
Jonathan Wakely
32a1aa7095 Add missing piece of P0777R1 and update C++20 status docs
* doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
	P1165R1 entries.
	* doc/html/*: Regenerate.
	* include/std/tuple (make_from_tuple): Use remove_reference_t instead
	of decay_t (P0777R1).

From-SVN: r271316
2019-05-17 10:28:13 +01:00
Richard Biener
8666d8bdea ccmp.c (expand_ccmp_expr_1): Do not use gimple_assign_rhs_to_tree.
2019-05-17  Richard Biener  <rguenther@suse.de>

	* ccmp.c (expand_ccmp_expr_1): Do not use gimple_assign_rhs_to_tree.

From-SVN: r271315
2019-05-17 08:15:46 +00:00
Martin Liska
dc2e58c56f Handle a location with NULL as a file (PR driver/90496)
2019-05-17  Martin Liska  <mliska@suse.cz>

	PR driver/90496
	* 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: r271313
2019-05-17 07:24:28 +00:00
Martin Liska
804424b95b Handle a location with NULL as a file (PR driver/90495)
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
2019-05-17 07:22:00 +00:00
Martin Liska
e2014c8b3c Remove a test-case that leads to a huge stack (and file) allocation (PR middle-end/90478).
2019-05-17  Martin Liska  <mliska@suse.cz>

	PR middle-end/90478
	* gcc.dg/tree-ssa/pr90478-2.c: Remove.

From-SVN: r271311
2019-05-17 07:21:46 +00:00
Ian Lance Taylor
fb83aeb499 re PR go/90482 (Many 32-bit Solaris/SPARC tests FAIL with SIGBUS)
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
2019-05-17 05:49:22 +00:00
François Dumont
935469daaa Move from state of allocators (LWG2593)
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
2019-05-17 04:55:37 +00:00
Cherry Zhang
395389bf94 compiler: intrinsify runtime/internal/atomic functions
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
2019-05-17 00:21:22 +00:00
GCC Administrator
6a362e1237 Daily bump.
From-SVN: r271307
2019-05-17 00:16:16 +00:00
Ian Lance Taylor
f6d67708ca compiler: add intrinsics for runtime/internal/sys functions
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
2019-05-16 23:23:58 +00:00
Jonathan Wakely
7110128236 Remove incorrect assertion from filesystem::absolute
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
2019-05-16 23:52:10 +01:00
Jakub Jelinek
afc819e866 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
2019-05-16 23:45:34 +02:00
Jakub Jelinek
4e65deeffb omp-low.c (lower_rec_input_clauses): If OMP_CLAUSE_IF has non-constant expression...
* 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
2019-05-16 23:44:40 +02:00
Jonathan Wakely
d069df01ed Implement sane variant converting constructor (P0608R3)
* 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
2019-05-16 21:30:35 +01:00
Jonathan Wakely
b62dcd16aa Changes to std::variant to reduce code size
* 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
2019-05-16 21:30:27 +01:00
Richard Biener
5120e0d8d4 tree-affine.c (expr_to_aff_combination): New function split out from...
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
2019-05-16 19:06:55 +00:00
Max Filippov
f7430263c0 gcc: move assemble_start_function / assemble_end_function to output_mi_thunk
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
2019-05-16 17:38:29 +00:00
Jan Hubicka
6727c72984 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
2019-05-16 15:33:01 +00:00
Jonathan Wakely
eba20412b4 Replace _Equal_helper with simpler class template
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
2019-05-16 15:18:50 +01:00
Jonathan Wakely
1f6ea96860 Change EBO accessors from static to non-static member functions
* 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
2019-05-16 15:18:45 +01:00
Martin Liska
a61b003fbd Do not allow target_clones with alias attr (PR lto/90500).
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
2019-05-16 13:08:48 +00:00
Vladislav Ivanishin
74a96dd28c tree-ssa-uninit: avoid ICE with BIT_AND_EXPR (PR 90394)
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
2019-05-16 15:36:33 +03:00
Jonathan Wakely
0bc229dbbe Remove unnecessary non-const accessors in hash table bases
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
2019-05-16 11:04:50 +01:00
Jakub Jelinek
4b8e35f1b1 re PR fortran/90329 (Incompatibility between gfortran and C lapack calls)
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
2019-05-16 11:37:43 +02:00
Jakub Jelinek
86c23d9314 * lto-streamer.h (LTO_major_version): Bump to 9.
From-SVN: r271284
2019-05-16 11:30:41 +02:00
Richard Biener
8c3f47feb3 re PR testsuite/90502 (gcc.dg/tree-ssa/vector-6.c FAILs)
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
2019-05-16 09:12:53 +00:00
Iain Sandoe
d695ae2130 testsuite - improve check_effective_target_cet.
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
2019-05-16 08:36:05 +00:00
Jun Ma
5486a99614 re PR tree-optimization/90106 (builtin sqrt() ignoring libm's sqrt call result)
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
2019-05-16 08:21:17 +00:00
Sebastian Huber
fd893bf1e9 [RTEMS] Change multilibs for ARM
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
2019-05-16 08:06:31 +00:00
Richard Biener
1bf2a0b90f re PR target/90424 (memcpy into vector builtin not optimized)
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
2019-05-16 08:03:49 +00:00
Richard Biener
adfe6e4b2f gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
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
2019-05-16 08:01:09 +00:00
Jun Ma
f6b2daaf4e Add myself to MAINTAINERS.
2019-05-16  Jun Ma  <junma@linux.alibaba.com>

	* MAINTAINERS (Write After Approval): Add myself.

From-SVN: r271277
2019-05-16 07:44:34 +00:00
Cherry Zhang
e8e91b8454 compiler: improve escape analysis on interface conversions
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
2019-05-16 04:35:15 +00:00
GCC Administrator
92b8603c7c Daily bump.
From-SVN: r271275
2019-05-16 00:16:25 +00:00
Jakub Jelinek
80c1c40acb re PR middle-end/90478 (ICE in emit_case_dispatch_table at gcc/stmt.c:796)
PR middle-end/90478
	* gcc.dg/tree-ssa/pr90478.c: Add empty dg-options.  Use long long type
	instead of long.

From-SVN: r271271
2019-05-16 00:43:47 +02:00
Jakub Jelinek
fed2a43c01 omp-low.c (lower_rec_input_clauses): For if (0) or simdlen (1) set max_vf to 1.
* omp-low.c (lower_rec_input_clauses): For if (0) or simdlen (1) set
	max_vf to 1.
	* omp-expand.c (expand_omp_simd): For if (0) or simdlen (1) clear
	safelen_int and set loop->dont_vectorize.

	* c-c++-common/gomp/simd8.c: New test.

From-SVN: r271270
2019-05-15 23:42:46 +02:00
Jakub Jelinek
c42b72a7dd re PR debug/90197 (Cannot step through simple loop at -O -g)
PR debug/90197
	* cp-gimplify.c (genericize_cp_loop): Emit a DEBUG_BEGIN_STMT
	before the condition (or if missing or constant non-zero at the end
	of the loop.  Emit a DEBUG_BEGIN_STMT before the increment expression
	if any.  Don't call protected_set_expr_location on incr if it already
	has a location.

From-SVN: r271269
2019-05-15 23:41:35 +02:00
Jonathan Wakely
e5d7010bb3 Qualify calls in std::visit and std::visit<R>
* include/std/variant (visit, visit<R>): Qualify calls to __do_visit.

From-SVN: r271268
2019-05-15 22:19:39 +01:00
Marek Polacek
47805f5712 CWG 2096 - constraints on literal unions.
* class.c (check_field_decls): Initialize booleans directly.  A union
	is literal if at least one of its non-static data members is of
	non-volatile literal type.

	* g++.dg/cpp0x/literal-type1.C: New test.

From-SVN: r271267
2019-05-15 20:42:52 +00:00
Janne Blomqvist
193f241906 Remove translation string markers
C preprocessor definitions should not be translated.

2019-05-15  Janne Blomqvist  <jb@gcc.gnu.org>

        * parse.c (gfc_parse_file): Remove translation string markers.

From-SVN: r271261
2019-05-15 22:33:32 +03:00
Janne Blomqvist
0c15ebf1bd Allow opening file on multiple units
As of Fortran 2018 it's allowed to open the same file on multiple
units.

libgfortran/ChangeLog:

2019-05-15  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/90461
        * io/open.c (new_unit): Don't check if the file is already open
	for F2018.

testsuite/ChangeLog:

2019-05-15  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/90461
        * gfortran.dg/open_errors_2.f90: Add -std=f2008, adjust line number.
	* gfortran.dg/open_errors_3.f90: New test.

From-SVN: r271260
2019-05-15 21:02:36 +03:00
Uros Bizjak
40c81f845c i386-expand.c (ix86_split_idivmod): Rename signed_p argument to unsigned_p.
* config/i386/i386-expand.c (ix86_split_idivmod): Rename
	signed_p argument to unsigned_p.  Update all uses for changed polarity.
	* config/i386/i386.md (u_bool): Handle DIV and UDIV RTXes.
	(divmod splitters): Use u_bool macro in the call to ix86_split_idivmod.

From-SVN: r271259
2019-05-15 19:59:19 +02:00
Paolo Carlini
53f45e3cb9 cp-tree.h (REFERENCE_VLA_OK): Remove.
2019-05-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* cp-tree.h (REFERENCE_VLA_OK): Remove.
	* lambda.c (build_capture_proxy): Remove use of the above.

From-SVN: r271258
2019-05-15 17:47:55 +00:00
H.J. Lu
dc90cc8c23 i386: Add tests for MMX intrinsic emulations with SSE
Test MMX intrinsics with -msse2 in 32-bit mode and -msse2 -mno-mmx in
64-bit mode.

	PR target/89021
	* gcc.target/i386/mmx-vals.h: New file.
	* gcc.target/i386/sse2-mmx-2.c: Likewise.
	* gcc.target/i386/sse2-mmx-3.c: Likewise.
	* gcc.target/i386/sse2-mmx-4.c: Likewise.
	* gcc.target/i386/sse2-mmx-5.c: Likewise.
	* gcc.target/i386/sse2-mmx-6.c: Likewise.
	* gcc.target/i386/sse2-mmx-7.c: Likewise.
	* gcc.target/i386/sse2-mmx-8.c: Likewise.
	* gcc.target/i386/sse2-mmx-9.c: Likewise.
	* gcc.target/i386/sse2-mmx-10.c: Likewise.
	* gcc.target/i386/sse2-mmx-11.c: Likewise.
	* gcc.target/i386/sse2-mmx-12.c: Likewise.
	* gcc.target/i386/sse2-mmx-13.c: Likewise.
	* gcc.target/i386/sse2-mmx-14.c: Likewise.
	* gcc.target/i386/sse2-mmx-15.c: Likewise.
	* gcc.target/i386/sse2-mmx-16.c: Likewise.
	* gcc.target/i386/sse2-mmx-17.c: Likewise.
	* gcc.target/i386/sse2-mmx-18a.c: Likewise.
	* gcc.target/i386/sse2-mmx-18b.c: Likewise.
	* gcc.target/i386/sse2-mmx-18c.c: Likewise.
	* gcc.target/i386/sse2-mmx-19a.c: Likewise.
	* gcc.target/i386/sse2-mmx-18b.c: Likewise.
	* gcc.target/i386/sse2-mmx-19c.c: Likewise.
	* gcc.target/i386/sse2-mmx-19d.c: Likewise.
	* gcc.target/i386/sse2-mmx-19e.c: Likewise.
	* gcc.target/i386/sse2-mmx-20.c: Likewise.
	* gcc.target/i386/sse2-mmx-21.c: Likewise.
	* gcc.target/i386/sse2-mmx-22.c: Likewise.
	* gcc.target/i386/sse2-mmx-cvtpi2ps.c: Likewise.
	* gcc.target/i386/sse2-mmx-cvtps2pi.c: Likewise.
	* gcc.target/i386/sse2-mmx-cvttps2pi.c: Likewise.
	* gcc.target/i386/sse2-mmx-maskmovq.c: Likewise.
	* gcc.target/i386/sse2-mmx-packssdw.c: Likewise.
	* gcc.target/i386/sse2-mmx-packsswb.c: Likewise.
	* gcc.target/i386/sse2-mmx-packuswb.c: Likewise.
	* gcc.target/i386/sse2-mmx-paddb.c: Likewise.
	* gcc.target/i386/sse2-mmx-paddd.c: Likewise.
	* gcc.target/i386/sse2-mmx-paddq.c: Likewise.
	* gcc.target/i386/sse2-mmx-paddsb.c: Likewise.
	* gcc.target/i386/sse2-mmx-paddsw.c: Likewise.
	* gcc.target/i386/sse2-mmx-paddusb.c: Likewise.
	* gcc.target/i386/sse2-mmx-paddusw.c: Likewise.
	* gcc.target/i386/sse2-mmx-paddw.c: Likewise.
	* gcc.target/i386/sse2-mmx-pand.c: Likewise.
	* gcc.target/i386/sse2-mmx-pandn.c: Likewise.
	* gcc.target/i386/sse2-mmx-pavgb.c: Likewise.
	* gcc.target/i386/sse2-mmx-pavgw.c: Likewise.
	* gcc.target/i386/sse2-mmx-pcmpeqb.c: Likewise.
	* gcc.target/i386/sse2-mmx-pcmpeqd.c: Likewise.
	* gcc.target/i386/sse2-mmx-pcmpeqw.c: Likewise.
	* gcc.target/i386/sse2-mmx-pcmpgtb.c: Likewise.
	* gcc.target/i386/sse2-mmx-pcmpgtd.c: Likewise.
	* gcc.target/i386/sse2-mmx-pcmpgtw.c: Likewise.
	* gcc.target/i386/sse2-mmx-pextrw.c: Likewise.
	* gcc.target/i386/sse2-mmx-pinsrw.c: Likewise.
	* gcc.target/i386/sse2-mmx-pmaddwd.c: Likewise.
	* gcc.target/i386/sse2-mmx-pmaxsw.c: Likewise.
	* gcc.target/i386/sse2-mmx-pmaxub.c: Likewise.
	* gcc.target/i386/sse2-mmx-pminsw.c: Likewise.
	* gcc.target/i386/sse2-mmx-pminub.c: Likewise.
	* gcc.target/i386/sse2-mmx-pmovmskb.c: Likewise.
	* gcc.target/i386/sse2-mmx-pmulhuw.c: Likewise.
	* gcc.target/i386/sse2-mmx-pmulhw.c: Likewise.
	* gcc.target/i386/sse2-mmx-pmullw.c: Likewise.
	* gcc.target/i386/sse2-mmx-pmuludq.c: Likewise.
	* gcc.target/i386/sse2-mmx-por.c: Likewise.
	* gcc.target/i386/sse2-mmx-psadbw.c: Likewise.
	* gcc.target/i386/sse2-mmx-pshufw.c: Likewise.
	* gcc.target/i386/sse2-mmx-pslld.c: Likewise.
	* gcc.target/i386/sse2-mmx-pslldi.c: Likewise.
	* gcc.target/i386/sse2-mmx-psllq.c: Likewise.
	* gcc.target/i386/sse2-mmx-psllqi.c: Likewise.
	* gcc.target/i386/sse2-mmx-psllw.c: Likewise.
	* gcc.target/i386/sse2-mmx-psllwi.c: Likewise.
	* gcc.target/i386/sse2-mmx-psrad.c: Likewise.
	* gcc.target/i386/sse2-mmx-psradi.c: Likewise.
	* gcc.target/i386/sse2-mmx-psraw.c: Likewise.
	* gcc.target/i386/sse2-mmx-psrawi.c: Likewise.
	* gcc.target/i386/sse2-mmx-psrld.c: Likewise.
	* gcc.target/i386/sse2-mmx-psrldi.c: Likewise.
	* gcc.target/i386/sse2-mmx-psrlq.c: Likewise.
	* gcc.target/i386/sse2-mmx-psrlqi.c: Likewise.
	* gcc.target/i386/sse2-mmx-psrlw.c: Likewise.
	* gcc.target/i386/sse2-mmx-psrlwi.c: Likewise.
	* gcc.target/i386/sse2-mmx-psubb.c: Likewise.
	* gcc.target/i386/sse2-mmx-psubd.c: Likewise.
	* gcc.target/i386/sse2-mmx-psubq.c: Likewise.
	* gcc.target/i386/sse2-mmx-psubusb.c: Likewise.
	* gcc.target/i386/sse2-mmx-psubusw.c: Likewise.
	* gcc.target/i386/sse2-mmx-psubw.c: Likewise.
	* gcc.target/i386/sse2-mmx-punpckhbw.c: Likewise.
	* gcc.target/i386/sse2-mmx-punpckhdq.c: Likewise.
	* gcc.target/i386/sse2-mmx-punpckhwd.c: Likewise.
	* gcc.target/i386/sse2-mmx-punpcklbw.c: Likewise.
	* gcc.target/i386/sse2-mmx-punpckldq.c: Likewise.
	* gcc.target/i386/sse2-mmx-punpcklwd.c: Likewise.
	* gcc.target/i386/sse2-mmx-pxor.c: Likewise.

From-SVN: r271254
2019-05-15 08:39:38 -07:00
H.J. Lu
0cfa5d9c59 i386: Enable TM MMX intrinsics with SSE2
This patch enables TM MMX intrinsics with SSE2 when MMX is disabled.

	PR target/89021
	* config/i386/i386-builtins.c (bdesc_tm): Enable MMX intrinsics
	with SSE2.

From-SVN: r271253
2019-05-15 08:33:43 -07:00