Commit Graph

180704 Commits

Author SHA1 Message Date
GCC Administrator
f19e7c8d5b Daily bump. 2020-10-27 00:16:28 +00:00
Alan Modra
18e7f36bf2 [RS6000] Remove -mpcrel from tests
When running with -m32
FAIL: gcc.target/powerpc/pr94740.c (test for excess errors)
Excess errors:
cc1: error: '-mpcrel' requires '-mcmodel=medium'

The others don't run for -m32, but remove the unnecessary -mpcrel
anyway.

	* gcc.target/powerpc/localentry-1.c: Remove -mpcrel from options.
	* gcc.target/powerpc/notoc-direct-1.c: Likewise.
	* gcc.target/powerpc/pr94740.c: Likewise.
2020-10-27 10:06:57 +10:30
Alan Modra
b1fc5c940e [RS6000] biarch test fail
* gcc.target/powerpc/bswap64-4.c: Comment.
2020-10-27 09:29:53 +10:30
Alan Modra
d7c71335c2 [RS6000] Replace -mcpu with -mdejagnu-cpu
* gcc.target/powerpc/pr93122.c: Replace -mcpu with -mdejagnu-cpu.
	* gcc.target/powerpc/vsx_mask-count-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-expand-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-extract-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-move-runnable.c: Likewise.
2020-10-27 09:25:23 +10:30
Alan Modra
99f68181b1 [RS6000] Tests that use int128_t and -m32
All these tests fail with -m32 due to lack of int128 support, in some
cases with what I thought was not the best error message.  For example
vsx_mask-move-runnable.c:34:3: error: unknown type name 'vector'
is misleading.  The problem isn't "vector" but "vector __uint128_t".

	* gcc.target/powerpc/vsx-load-element-extend-char.c: Require int128.
	* gcc.target/powerpc/vsx-load-element-extend-int.c: Likewise.
	* gcc.target/powerpc/vsx-load-element-extend-longlong.c: Likewise.
	* gcc.target/powerpc/vsx-load-element-extend-short.c: Likewise.
	* gcc.target/powerpc/vsx-store-element-truncate-char.c: Likewise.
	* gcc.target/powerpc/vsx-store-element-truncate-int.c: Likewise.
	* gcc.target/powerpc/vsx-store-element-truncate-longlong.c: Likewise.
	* gcc.target/powerpc/vsx-store-element-truncate-short.c: Likewise.
	* gcc.target/powerpc/vsx_mask-count-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-expand-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-extract-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-move-runnable.c: Likewise.
2020-10-27 09:23:07 +10:30
Alan Modra
8d8fef1971 [RS6000] Link power10 testcases
Running the assembler and linker catches more errors.

	* gcc.target/powerpc/cfuged-1.c,
	gcc.target/powerpc/cntlzdm-1.c,
	gcc.target/powerpc/cnttzdm-1.c,
	gcc.target/powerpc/dg-future-1.c,
	gcc.target/powerpc/lsbb-runnable.c,
	gcc.target/powerpc/mma-double-test.c,
	gcc.target/powerpc/mma-single-test.c,
	gcc.target/powerpc/p10-arch31.c,
	gcc.target/powerpc/p10-identify.c,
	gcc.target/powerpc/pdep-1.c,
	gcc.target/powerpc/pextd-1.c,
	gcc.target/powerpc/pr96787-2.c,
	gcc.target/powerpc/vec-blend-runnable.c,
	gcc.target/powerpc/vec-cfuged-1.c,
	gcc.target/powerpc/vec-clrl-1.c,
	gcc.target/powerpc/vec-clrl-3.c,
	gcc.target/powerpc/vec-clrr-1.c,
	gcc.target/powerpc/vec-clrr-3.c,
	gcc.target/powerpc/vec-cntlzm-1.c,
	gcc.target/powerpc/vec-cnttzm-1.c,
	gcc.target/powerpc/vec-extracth-1.c,
	gcc.target/powerpc/vec-extracth-3.c,
	gcc.target/powerpc/vec-extracth-5.c,
	gcc.target/powerpc/vec-extracth-7.c,
	gcc.target/powerpc/vec-extractl-1.c,
	gcc.target/powerpc/vec-extractl-3.c,
	gcc.target/powerpc/vec-extractl-5.c,
	gcc.target/powerpc/vec-extractl-7.c,
	gcc.target/powerpc/vec-gnb-1.c,
	gcc.target/powerpc/vec-insert-word-runnable.c,
	gcc.target/powerpc/vec-pdep-1.c,
	gcc.target/powerpc/vec-permute-ext-runnable.c,
	gcc.target/powerpc/vec-pext-1.c,
	gcc.target/powerpc/vec-replace-word-runnable.c,
	gcc.target/powerpc/vec-shift-double-runnable.c,
	gcc.target/powerpc/vec-splati-runnable.c,
	gcc.target/powerpc/vec-stril-1.c,
	gcc.target/powerpc/vec-stril-16.c,
	gcc.target/powerpc/vec-stril-17.c,
	gcc.target/powerpc/vec-stril-18.c,
	gcc.target/powerpc/vec-stril-19.c,
	gcc.target/powerpc/vec-stril-20.c,
	gcc.target/powerpc/vec-stril-21.c,
	gcc.target/powerpc/vec-stril-22.c,
	gcc.target/powerpc/vec-stril-23.c,
	gcc.target/powerpc/vec-stril-3.c,
	gcc.target/powerpc/vec-stril-5.c,
	gcc.target/powerpc/vec-stril-7.c,
	gcc.target/powerpc/vec-stril_p-1.c,
	gcc.target/powerpc/vec-stril_p-3.c,
	gcc.target/powerpc/vec-stril_p-5.c,
	gcc.target/powerpc/vec-stril_p-7.c,
	gcc.target/powerpc/vec-strir-1.c,
	gcc.target/powerpc/vec-strir-16.c,
	gcc.target/powerpc/vec-strir-17.c,
	gcc.target/powerpc/vec-strir-18.c,
	gcc.target/powerpc/vec-strir-19.c,
	gcc.target/powerpc/vec-strir-20.c,
	gcc.target/powerpc/vec-strir-21.c,
	gcc.target/powerpc/vec-strir-22.c,
	gcc.target/powerpc/vec-strir-23.c,
	gcc.target/powerpc/vec-strir-3.c,
	gcc.target/powerpc/vec-strir-5.c,
	gcc.target/powerpc/vec-strir-7.c,
	gcc.target/powerpc/vec-strir_p-1.c,
	gcc.target/powerpc/vec-strir_p-3.c,
	gcc.target/powerpc/vec-strir_p-5.c,
	gcc.target/powerpc/vec-strir_p-7.c,
	gcc.target/powerpc/vec-ternarylogic-1.c,
	gcc.target/powerpc/vec-ternarylogic-3.c,
	gcc.target/powerpc/vec-ternarylogic-5.c,
	gcc.target/powerpc/vec-ternarylogic-7.c,
	gcc.target/powerpc/vec-ternarylogic-9.c,
	gcc.target/powerpc/vsx_mask-count-runnable.c,
	gcc.target/powerpc/vsx_mask-expand-runnable.c,
	gcc.target/powerpc/vsx_mask-extract-runnable.c,
	gcc.target/powerpc/vsx_mask-move-runnable.c,
	gcc.target/powerpc/xxgenpc-runnable.c: Link testcase when it
	can't be run.
2020-10-27 09:15:52 +10:30
Alan Modra
6848894053 [RS6000] dimode_off.c test
This tests behaviour near the limit of 16-bit signed offsets.  If
power10 prefix instructions are enabled, no such testing occurs.

	* gcc.target/powerpc/dimode_off.c: Add -mno-prefixed to options.
2020-10-27 09:15:52 +10:30
Alan Modra
32c89b1633 [RS6000] Non-pcrel tests when power10
These tests require -mno-pcrel because they are testing features
of the non-pcrel ABI.

	* gcc.target/powerpc/cprophard.c: Add -mno-pcrel to options.
	* gcc.target/powerpc/float128-hw3.c: Likewise.
	* gcc.target/powerpc/pr79439-1.c: Likewise.
	* gcc.target/powerpc/pr79439-2.c: Likewise.
	* gcc.target/powerpc/r2_shrink-wrap.c: Likewise.
2020-10-27 09:15:52 +10:30
Nikhil Benesch
a573530d50 syscall: import additional BSD-specific syscall wrappers
Import additional code from upstream for handing system
calls on BSD systems. This makes the syscall package on
NetBSD complete enough to compile the standard library.

Updates golang/go#38538.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265123
2020-10-26 15:04:16 -07:00
Andrew MacLeod
48722d158c Combine logical OR ranges properly.
When combining logical OR operands with a FALSE result, union the false
ranges for operand1 and operand2... not intersection.

	gcc/
	PR tree-optimization/97567
	* gimple-range-gori.cc (gori_compute::logical_combine): Union the
	ranges of operand1 and operand2, not intersect.
	gcc/testsuite/
	* gcc.dg/pr97567.c: New.
2020-10-26 17:41:07 -04:00
Jonathan Wakely
b784bbbe45 libstdc++: Fix error in experimental::strand
libstdc++-v3/ChangeLog:

	* include/experimental/executor (strand::_State): Fix thinko.
2020-10-26 21:00:06 +00:00
Jan Hubicka
4f8cfb4288 Extend builtin fnspecs
* attr-fnspec.h: Update toplevel comment.
	(attr_fnspec::attr_fnspec): New constructor.
	(attr_fnspec::arg_read_p,
	attr_fnspec::arg_written_p,
	attr_fnspec::arg_access_size_given_by_arg_p,
	attr_fnspec::arg_single_access_p
	attr_fnspec::loads_known_p
	attr_fnspec::stores_known_p,
	attr_fnspec::clobbers_errno_p): New member functions.
	(gimple_call_fnspec): Declare.
	(builtin_fnspec): Declare.
	* builtins.c: Include attr-fnspec.h
	(builtin_fnspec): New function.
	* builtins.def (BUILT_IN_MEMCPY): Do not specify RET1 fnspec.
	(BUILT_IN_MEMMOVE): Do not specify RET1 fnspec.
	(BUILT_IN_MEMSET): Do not specify RET1 fnspec.
	(BUILT_IN_STRCAT): Do not specify RET1 fnspec.
	(BUILT_IN_STRCPY): Do not specify RET1 fnspec.
	(BUILT_IN_STRNCAT): Do not specify RET1 fnspec.
	(BUILT_IN_STRNCPY): Do not specify RET1 fnspec.
	(BUILT_IN_MEMCPY_CHK): Do not specify RET1 fnspec.
	(BUILT_IN_MEMMOVE_CHK): Do not specify RET1 fnspec.
	(BUILT_IN_MEMSET_CHK): Do not specify RET1 fnspec.
	(BUILT_IN_STRCAT_CHK): Do not specify RET1 fnspec.
	(BUILT_IN_STRCPY_CHK): Do not specify RET1 fnspec.
	(BUILT_IN_STRNCAT_CHK): Do not specify RET1 fnspec.
	(BUILT_IN_STRNCPY_CHK): Do not specify RET1 fnspec.
	* gimple.c (gimple_call_fnspec): Return attr_fnspec.
	(gimple_call_arg_flags): Update.
	(gimple_call_return_flags): Update.
	* tree-ssa-alias.c (check_fnspec): New function.
	(ref_maybe_used_by_call_p_1): Use fnspec for builtin handling.
	(call_may_clobber_ref_p_1): Likewise.
	(attr_fnspec::verify): Update verifier.
	* calls.c (decl_fnspec): New function.
	(decl_return_flags): Use it.
2020-10-26 20:22:16 +01:00
Aldy Hernandez
2118438f49 Handle signed 1-bit ranges in irange::invert.
The problem here is we are trying to add 1 to a -1 in a signed 1-bit
field and coming up with UNDEFINED because of the overflow.

Signed 1-bits are annoying because you can't really add or subtract
one, because the one is unrepresentable.  For invert() we have a
special subtract_one() function that handles 1-bit signed fields.

This patch implements the analogous add_one() function so that invert
works.

gcc/ChangeLog:

	PR tree-optimization/97555
	* range-op.cc (range_tests): Test 1-bit signed invert.
	* value-range.cc (subtract_one): Adjust comment.
	(add_one): New.
	(irange::invert): Call add_one.

gcc/testsuite/ChangeLog:

	* gcc.dg/pr97555.c: New test.
2020-10-26 19:05:53 +01:00
Jan Hubicka
f20a6c57f0 Implement three-level optimize_for_size predicates
this patch implements thre two-state optimize_for_size predicates, so with -Os
and with profile feedback for never executed code it returns OPTIMIZE_SIZE_MAX
while in cases we decide to optimize for size based on branch prediction logic
it return OPTIMIZE_SIZE_BALLANCED.

The idea is that for places where we guess that code is unlikely we do not
want to do extreme optimizations for size that leads to many fold slowdowns
(using idiv rather than few shigts or using rep based inlined stringops).

I will update RTL handling code to also support this with BB granuality (which
we don't currently).  LLVM has -Os and -Oz levels where -Oz is our -Os and
LLVM's -Os would ocrrespond to OPTIMIZE_SIZE_BALLANCED.  I wonder if we want
to export this to command line somehow?  For me it would be definitly useful
to test things, I am not sure how "weaker" -Os is desired in practice.

gcc/ChangeLog:

	* cgraph.h (cgraph_node::optimize_for_size_p): Return
	optimize_size_level.
	(cgraph_node::optimize_for_size_p): Update.
	* coretypes.h (enum optimize_size_level): New enum.
	* predict.c (unlikely_executed_edge_p): Microoptimize.
	(optimize_function_for_size_p): Return optimize_size_level.
	(optimize_bb_for_size_p): Likewise.
	(optimize_edge_for_size_p): Likewise.
	(optimize_insn_for_size_p): Likewise.
	(optimize_loop_nest_for_size_p): Likewise.
	* predict.h (optimize_function_for_size_p): Update declaration.
	(optimize_bb_for_size_p): Update declaration.
	(optimize_edge_for_size_p): Update declaration.
	(optimize_insn_for_size_p): Update declaration.
	(optimize_loop_for_size_p): Update declaration.
	(optimize_loop_nest_for_size_p): Update declaration.
2020-10-26 18:19:48 +01:00
Richard Biener
63b2149fb4 Refactor SLP instance analysis
This refactors the toplevel entry to analyze an SLP instance to
expose a worker analyzing from a vector of stmts and an SLP entry
kind.

2020-10-26  Richard Biener  <rguenther@suse.de>

	* tree-vect-slp.c (enum slp_instance_kind): New.
	(vect_build_slp_instance): Split out from...
	(vect_analyze_slp_instance): ... this.
2020-10-26 16:00:25 +01:00
Andrew MacLeod
425bb53b54 Re: error: ‘EVRP_MODE_DEBUG’ was not declared – was: [PUSHED] Ranger classes.
Initialize zerov to match vr-values.c.

	* gimple-range.cc (range_of_builtin_call): Initialize zerov to 0.
2020-10-26 10:18:01 -04:00
Ville Voutilainen
9e2256dcd4 c++: Implement __is_nothrow_constructible and __is_nothrow_assignable
gcc/c-family/ChangeLog:

	* c-common.c (__is_nothrow_assignable): New.
	(__is_nothrow_constructible): Likewise.
	* c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
	(RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.

gcc/cp/ChangeLog:

	* cp-tree.h (CPTK_IS_NOTHROW_ASSIGNABLE): New.
	(CPTK_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
	(is_nothrow_xible): Likewise.
	* method.c (is_nothrow_xible): New.
	(is_trivially_xible): Tweak.
	* parser.c (cp_parser_primary_expression): Handle the new RID_*.
	(cp_parser_trait_expr): Likewise.
	* semantics.c (trait_expr_value): Handle the new RID_*.
	(finish_trait_expr): Likewise.

libstdc++-v3/ChangeLog:

	* include/std/type_traits (__is_nt_constructible_impl): Remove.
	(__is_nothrow_constructible_impl): Adjust.
	(is_nothrow_default_constructible): Likewise.
	(__is_nt_assignable_impl): Remove.
	(__is_nothrow_assignable_impl): Adjust.
2020-10-26 15:36:24 +02:00
Jan Hubicka
783dc02d89 Fix simdclones
gcc/ChangeLog:

	PR ipa/97576
	* cgraphclones.c (cgraph_node::materialize_clone): Clear stmt
	references.
	* cgraphunit.c (mark_functions_to_output): Do not clear them here.
	* ipa-inline-transform.c (inline_transform): Clear stmt references.
	* symtab.c (symtab_node::clear_stmts_in_references): Make recursive
	for clones.
	* tree-ssa-structalias.c (ipa_pta_execute): Do not clear references.

gcc/testsuite/ChangeLog:

	PR ipa/97576
	* gcc.c-torture/compile/pr97576.c: New test.
2020-10-26 14:11:35 +01:00
zhengnannan
2d5aad691f AArch64: Add FLAG for store intrinsics [PR94442]
2020-10-26  Zhiheng Xie  <xiezhiheng@huawei.com>
	    Nannan Zheng  <zhengnannan@huawei.com>

gcc/ChangeLog:

	* config/aarch64/aarch64-builtins.c: Add FLAG STORE.
	* config/aarch64/aarch64-simd-builtins.def: Add proper FLAG
	for store intrinsics.
2020-10-26 13:02:18 +00:00
Jonathan Wakely
93e9a7bcd5 libstdc++: Fix declarations of memalign etc. for freestanding [PR 97570]
libstdc++-v3/ChangeLog:

	PR libstdc++/97570
	* libsupc++/new_opa.cc: Declare size_t in global namespace.
	Remove unused header.
2020-10-26 12:02:50 +00:00
Kyrylo Tkachov
7f0ce82a4c PR tree-optimization/97546 Bail out of find_bswap_or_nop on non-INTEGER_CST sizes
This patch fixes the ICE in the PR by bailing out of find_bswap_or_nop
on poly_int sizes.
I don't think it intends to handle them and from my reading of the code
it's the most appropriate place to reject them
here rather than in the callers.

Bootstrapped and tested on aarch64-none-linux-gnu.

gcc/
	PR tree-optimization/97546
	* gimple-ssa-store-merging.c (find_bswap_or_nop): Return NULL if
	type is not INTEGER_CST.

gcc/testsuite/
	PR tree-optimization/97546
	* gcc.target/aarch64/sve/acle/general/pr97546.c: New test.
2020-10-26 11:43:26 +00:00
Richard Biener
605c2a393d middle-end/97521 - always use single-bit bools in mask vector types
This makes us always use a single-bit boolean type component type
for integer mode mask VECTOR_BOOLEAN_TYPE_P to match the RTL and target
representation.  This aovids the need for magic translation and
the inconsistencies from the translation requirement now that
we expose temporaries of those types on the GIMPLE level.

2020-10-23  Richard Biener  <rguenther@suse.de>

	PR middle-end/97521
	* expr.c (const_scalar_mask_from_tree): Remove.
	(expand_expr_real_1): Always VIEW_CONVERT integer mode
	vector constants to an integer type.
	* tree.c (build_truth_vector_type_for_mode): Use a single-bit
	boolean component type for non-vector-mode mask_mode.

	* gcc.target/i386/pr97521.c: New testcase.
2020-10-26 12:28:30 +01:00
H.J. Lu
4052c05e5b x86: Inline strncmp only with -minline-all-stringops
Expand strncmp to "repz cmpsb" only with -minline-all-stringops since
"repz cmpsb" can be much slower than strncmp function implemented with
vector instructions, see

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052

gcc/

	PR target/95458
	* config/i386/i386-expand.c (ix86_expand_cmpstrn_or_cmpmem):
	Return false for -mno-inline-all-stringops.

gcc/testsuite/

	PR target/95458
	* gcc.target/i386/pr95458-1.c: New test.
	* gcc.target/i386/pr95458-2.c: Likewise.
2020-10-26 04:15:47 -07:00
H.J. Lu
3edc21af52 x86: Add cmpmemsi for -minline-all-stringops
We used to expand memcmp to "repz cmpsb" via cmpstrnsi.  It was changed
by

commit 9b0f6f5e51
Author: Nick Clifton <nickc@redhat.com>
Date:   Fri Aug 12 16:26:11 2011 +0000

    builtins.c (expand_builtin_memcmp): Do not use cmpstrnsi pattern.

            * builtins.c (expand_builtin_memcmp): Do not use cmpstrnsi
            pattern.
            * doc/md.texi (cmpstrn): Note that the comparison stops if both
            fetched bytes are zero.
            (cmpstr): Likewise.
            (cmpmem): Note that the comparison does not stop if both of the
            fetched bytes are zero.

Duplicate the cmpstrn pattern for cmpmem.  The only difference is that
the length argument of cmpmem is guaranteed to be less than or equal to
lengths of 2 memory areas.  Since "repz cmpsb" can be much slower than
memcmp function implemented with vector instruction, see

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052

expand cmpmem to "repz cmpsb" only for -minline-all-stringops.

gcc/

	PR target/95151
	* config/i386/i386-expand.c (ix86_expand_cmpstrn_or_cmpmem): New
	function.
	* config/i386/i386-protos.h (ix86_expand_cmpstrn_or_cmpmem): New
	prototype.
	* config/i386/i386.md (cmpmemsi): New pattern.

gcc/testsuite/

	PR target/95151
	* gcc.target/i386/pr95151-1.c: New test.
	* gcc.target/i386/pr95151-2.c: Likewise.
	* gcc.target/i386/pr95151-3.c: Likewise.
	* gcc.target/i386/pr95151-4.c: Likewise.
2020-10-26 04:06:32 -07:00
Andreas Krebbel
19534269d8 IBM Z: Add vcond_mask expander
After adding vec_cmp expanders we have seen various performance
related regression in the testsuite.  These appear to be caused by a
missing vcond_mask definition in the backend.  Fixed with this patch.

The patch fixes the following testsuite fails:

FAIL: gcc.dg/vect/vect-21.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-21.c scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-23.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-23.c scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-24.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-24.c scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-live-6.c -flto -ffat-lto-objects  scan-tree-dump vect "vectorized 1 loops"
FAIL: gcc.dg/vect/vect-live-6.c scan-tree-dump vect "vectorized 1 loops"
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrab\\t%v.?,%v.?,7 6
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesraf\\t%v.?,%v.?,31 6
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrah\\t%v.?,%v.?,15 6
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlb\\t%v.?,%v.?,7 4
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlf\\t%v.?,%v.?,31 4
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlh\\t%v.?,%v.?,15 4
FAIL: gcc.dg/vect/vect-21.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-21.c scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-23.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-23.c scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-24.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-24.c scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-live-6.c -flto -ffat-lto-objects  scan-tree-dump vect "vectorized 1 loops"
FAIL: gcc.dg/vect/vect-live-6.c scan-tree-dump vect "vectorized 1 loops"
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrab\\t%v.?,%v.?,7 6
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesraf\\t%v.?,%v.?,31 6
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrah\\t%v.?,%v.?,15 6
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlb\\t%v.?,%v.?,7 4
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlf\\t%v.?,%v.?,31 4
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlh\\t%v.?,%v.?,15 4

gcc/ChangeLog:

	* config/s390/vector.md ("vcond_mask_<mode><mode>"): New expander.
2020-10-26 11:42:06 +01:00
Richard Biener
50f9e1f4d4 middle-end/97554 - avoid overflow in alloc size compute
This avoids overflow in the allocation size computations in
sbitmap_vector_alloc when the result exceeds 2GB.

2020-10-26  Richard Biener  <rguenther@suse.de>

	* sbitmap.c (sbitmap_vector_alloc): Use size_t for byte
	quantities to avoid overflow.
2020-10-26 11:33:50 +01:00
Richard Biener
27c14056f4 tree-optimization/97539 - reset out-of-loop debug uses before peeling
This makes sure to reset out-of-loop debug uses before vectorizer
loop peeling as we cannot make sure to retain the use-def dominance
relationship when there are no LC SSA nodes.

2020-10-26  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/97539
	* tree-vect-loop-manip.c (vect_do_peeling): Reset out-of-loop
	debug uses before peeling.

	* gcc.dg/pr97539.c: New testcase.
2020-10-26 11:33:50 +01:00
Jan Hubicka
40e67ab8e5 Make default duplicate and insert methods of summaries abort; fix fallout
the default duplicate and insert methods of sumaries produce empty
summary that is not useful for anything and makes it easy to introduce
bugs.

This patch makes the default hooks to abort and summaries that do not
need dupicaito/insertion disable the corresponding hooks. I also
implemented missing insertion hook for ipa-sra which forced me to move
analysis out of anonymous namespace.

2020-10-23  Jan Hubicka  <hubicka@ucw.cz>

	* cgraph.h (struct cgraph_node): Make ipa_transforms_to_apply vl_ptr.
	* ipa-inline-analysis.c (initialize_growth_caches): Disable insertion
	and duplication hooks.
	* ipa-inline-transform.c (clone_inlined_nodes): Clear
	ipa_transforms_to_apply.
	(save_inline_function_body): Disable insertion hoook for
	ipa_saved_clone_sources.
	* ipa-prop.c (ipcp_transformation_initialize): Disable insertion hook.
	* ipa-prop.h (ipa_node_params_t): Disable insertion hook.
	* ipa-reference.c (propagate): Disable insertion hoook.
	* ipa-sra.c (ipa_sra_summarize_function): Move out of anonymous
	namespace.
	(ipa_sra_function_summaries::insert): New virtual function.
	* passes.c (execute_one_pass): Do not add transforms to inline clones.
	* symbol-summary.h (function_summary_base): Make insert and duplicate
	hooks fail instead of silently producing empty summaries; add way to
	disable duplication hooks
	(call_summary_base): Likewise.
	* tree-nested.c (nested_function_info::get_create): Disable insertion
	hooks
	(maybe_record_nested_function): Likewise.
2020-10-26 11:24:33 +01:00
Stephan Bergmann
dc7824734e libstdc++: Add missing exception-specifications in shared_ptr
libstdc++-v3/ChangeLog:

	* include/bits/shared_ptr_base.h
	(_Sp_counted_base::_M_add_ref_lock_nothrow(): Add noexcept to
	definitions to match declaration.
	(__shared_count(const __weak_count&, nothrow_t)): Add noexcept
	to declaration to match definition.
2020-10-26 10:15:45 +00:00
Ed Schonberg
02a8253980 [Ada] Handle Iterated_Component_Association with Others_Choice
gcc/ada/

	* exp_aggr.adb (Build_Array_Aggr_Code): If the aggregate
	includes an Others_Choice in an association that is an
	Iterated_Component_Association, generate a proper loop for it.
2020-10-26 04:59:17 -04:00
Eric Botcazou
fcae4f70cd [Ada] Further small edition to documentation of Ada.Text_IO.Fixed_IO
gcc/ada/

	* libgnat/a-tifiio.adb: Add missing sign in documentation.
	* libgnat/s-imgrea.ads: Minor fixes in commentary.
2020-10-26 04:59:16 -04:00
Pat Rogers
38a61cff22 [Ada] Replace GNAT_Extended_Ravenscar profile name
gcc/ada/

	* doc/gnat_rm/implementation_defined_pragmas.rst: Include
	"Jorvik" in pragma Profile description.
	* gnat_rm.texi: Regenerate.
2020-10-26 04:59:15 -04:00
Bob Duff
10c633b7d6 [Ada] Avoid crash on use of Ada 2020 feature
gcc/ada/

	* sem_attr.adb (Check_Image_Type): Remove "|", so the compiler
	will not crash.
	* errout.ads: Improve comment. This has nothing to do with
	-gnatQ.
2020-10-26 04:59:14 -04:00
Eric Botcazou
4b0fe398db [Ada] Further small edition to documentation of Ada.Text_IO.Fixed_IO
gcc/ada/

	* libgnat/a-tifiio.adb: Minor editions to documentation.
2020-10-26 04:59:13 -04:00
Piotr Trojanek
19b00ffa9c [Ada] Fix freezing of previous contracts
gcc/ada/

	* contracts.adb (Causes_Contract_Freezing): Extend condition to
	match the one in Analyze_Subprogram_Body_Helper. This routine is
	used both as an assertion at the very start of
	Freeze_Previous_Contracts and to detect previous declaration for
	which Freeze_Previous_Contracts has been executed.
2020-10-26 04:59:12 -04:00
Eric Botcazou
d4506716bc [Ada] Another small edition to documentation of Ada.Text_IO.Fixed_IO
gcc/ada/

	* libgnat/a-tifiio.adb: Move around documentaton paragraph.
2020-10-26 04:59:12 -04:00
Piotr Trojanek
acd4ef9df2 [Ada] Fix harmless assertion failure in GNATprove mode
gcc/ada/

	* inline.adb (Establish_Actual_Mapping_For_Inlined_Call): Add
	guard for a call to Set_Last_Assignment with the same condition
	as the assertion in that routine and explain why this guard
	fails in GNATprove mode.
2020-10-26 04:59:11 -04:00
Eric Botcazou
4ab5d8c17b [Ada] Document characteristics of ordinary fixed point types
gcc/ada/

	* doc/gnat_rm/implementation_defined_characteristics.rst: Adjust
	the entries of 3.5.9(8) and 3.5.9(10).
	* gnat_rm.texi: Regenerate.
2020-10-26 04:59:10 -04:00
Eric Botcazou
4d4a3fb738 [Ada] Relax assertion on Small in Ada.Text_IO.Fixed_IO
gcc/ada/

	* libgnat/a-tifiio.adb: Change the range of supported Small
	values.
	(E0, E1, E2): Adjust factors.
	(Exact): Return false if the Small does not fit in 64 bits.
2020-10-26 04:59:09 -04:00
Dmitriy Anisimkov
86d774f68e [Ada] Fix Accept_Socket and Connect_Socket timeout support
gcc/ada/

	* libgnat/g-socket.adb (Wait_On_Socket): Boolean parameter
	For_Read changed to Event parameter of type
	GNAT.Sockets.Poll.Wait_Event_Set.  Implementation is simplified
	and based on call to GNAT.Sockets.Poll.Wait now.
2020-10-26 04:59:08 -04:00
Eric Botcazou
e0481cf5fc [Ada] Minor editions to documentation of Ada.Text_IO.Fixed_IO
gcc/ada/

	* libgnat/a-tifiio.adb: Minor editions to documentation.
2020-10-26 04:59:07 -04:00
Yannick Moy
326c36ce37 [Ada] Fix GNATprove crash on generics with access types
gcc/ada/

	* sem_ch12.adb (Restore_Private_Views): Do not lose the
	information provided by Is_Generic_Actual_Type in GNATprove
	mode.
2020-10-26 04:59:06 -04:00
Arnaud Charlet
7649892bfc [Ada] Suppress warnings on unreferenced parameters of dispatching ops
gcc/ada/

	* sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
	on formal parameters of all dispatching operations.

gcc/testsuite/

	* gnat.dg/warn14.adb: Update expectations.
2020-10-26 04:59:05 -04:00
Piotr Trojanek
f69ecf3bba [Ada] Fix typos in error message for array delta aggregates
gcc/ada/

	* sem_aggr.adb (Resolve_Delta_Array_Aggregate): Fix typos in
	error message.
2020-10-26 04:59:04 -04:00
Olivier Hainque
d111f09ee5 [Ada] Restore hex addresses and improve symbolic backtraces
gcc/ada/

	* libgnat/s-dwalin.adb (Symbolic_Traceback): Always emit the hex
	address at the beginning of an entry if suppression is not
	requested. Consistently output a "???" for the subprogram name
	when it is unknown.
2020-10-26 04:59:03 -04:00
Doug Rupp
51fb7000aa [Ada] x86-lynx178elf - gcc build fails
gcc/ada/

	* s-oscons-tmplt.c (_nfds_t): Use sizeof (unsigned long int).
2020-10-26 04:59:03 -04:00
Piotr Trojanek
5d2041a0c7 [Ada] Fix interference between iterated element-and-component association
gcc/ada/

	* par-ch4.adb (P_Iterated_Component_Association): Move code for
	iterated_element_association to
	Build_Iterated_Element_Association.
2020-10-26 04:59:02 -04:00
Yannick Moy
aa32e8f466 [Ada] Do not instantiate generic bodies outside of main unit in GNATprove
gcc/ada/

	* sem_ch12.adb (Needs_Body_Instantiated): In GNATprove mode, do
	not instantiate bodies outside of the main unit.
2020-10-26 04:59:01 -04:00
Ed Schonberg
cfc3a1db82 [Ada] Spurious error on Old attribute reference in delta aggregate
gcc/ada/

	* sem_aggr.adb (Resolve_Delta_Array_Aggregate): For an
	association that is an iterated component association, attach
	the copy of the expression to the tree prior to analysis, in
	order to preserve its context. This is needed when verifying
	static semantic rules that depend on context, for example that a
	use of 'Old appears only within a postcondition.
2020-10-26 04:59:00 -04:00
Bob Duff
adf1c867c0 [Ada] gnatpp: Document that --no-comments-fill is now the default
gcc/ada/

	* doc/gnat_ugn/gnat_utility_programs.rst: Document that
	--no-comments-fill is now the default.
2020-10-26 04:58:59 -04:00