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
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
* 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 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 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
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
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
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
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
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
* 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
* 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
* 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 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
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
* 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 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
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
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 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
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
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
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
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
* 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
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
* 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
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
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
* 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 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
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