platform/upstream/gcc.git
3 years agolibstdc++: Remove extern "C" from Ryu sources
Patrick Palka [Tue, 11 May 2021 17:19:46 +0000 (13:19 -0400)]
libstdc++: Remove extern "C" from Ryu sources

floating_to_chars.cc includes the Ryu sources into an anonymous
namespace as a convenient way to give all its symbols internal linkage.
But an entity declared extern "C" always has external linkage even
from within an anonymous namespace, so this trick doesn't work in the
presence of extern "C", and it causes the Ryu function generic_to_chars
to be visible from libstdc++.a.

This patch removes the only use of extern "C" from our local copy of
Ryu along with some declarations for never-defined functions that GCC
now warns about.

libstdc++-v3/ChangeLog:

* src/c++17/ryu/LOCAL_PATCHES: Update.
* src/c++17/ryu/ryu_generic_128.h: Remove extern "C".
Remove declarations for never-defined functions.
* testsuite/20_util/to_chars/4.cc: New test.

3 years agolibstdc++: Fix tests that fail in C++98 mode
Jonathan Wakely [Tue, 11 May 2021 16:14:26 +0000 (17:14 +0100)]
libstdc++: Fix tests that fail in C++98 mode

The header synopsis test fails to define NOTHROW for C++98.

The shared_ptr test should be skipped for C++98.

The debug mode one should work for C++98 too, it just needs to avoid
C++11 syntax that isn't valid in C++98.

libstdc++-v3/ChangeLog:

* testsuite/20_util/headers/memory/synopsis.cc: Define C++98
alternative for macro.
* testsuite/20_util/shared_ptr/creation/99006.cc: Add effective
target keyword.
* testsuite/25_algorithms/copy/debug/99402.cc: Avoid C++11
syntax.

3 years agolibstdc++: Fix missing members in std::allocator<void>
Jonathan Wakely [Tue, 11 May 2021 14:01:01 +0000 (15:01 +0100)]
libstdc++: Fix missing members in std::allocator<void>

The changes in 75c6a925dab5b7af9ab47c10906cb0e140261cc2 were slightly
incorrect, because the converting constructor should be noexcept, and
the POCMA and is_always_equal traits should still be present in C++20.
This fixes it, and slightly refactors the preprocessor conditions and
order of members. Also add comments explaining things.

The non-standard construct and destroy members added for PR 78052 can be
private if allocator_traits<allocator<void>> is made a friend.

libstdc++-v3/ChangeLog:

* include/bits/allocator.h (allocator<void>) [C++20]: Add
missing noexcept to constructor. Restore missing POCMA and
is_always_equal_traits.
[C++17]: Make construct and destroy members private and
declare allocator_traits as a friend.
* include/bits/memoryfwd.h (allocator_traits): Declare.
* include/ext/malloc_allocator.h (malloc_allocator::allocate):
Add nodiscard attribute. Add static assertion for LWG 3307.
* include/ext/new_allocator.h (new_allocator::allocate): Add
static assertion for LWG 3307.
* testsuite/20_util/allocator/void.cc: Check that converting
constructor is noexcept. Check for propagation traits and
size_type and difference_type. Check that pointer and
const_pointer are gone in C++20.

3 years agopreprocessor: Enable digit separators for C2X
Joseph Myers [Tue, 11 May 2021 14:25:55 +0000 (14:25 +0000)]
preprocessor: Enable digit separators for C2X

C2X adds digit separators, as in C++.  Enable them accordingly in
libcpp and c-lex.c.  Some basic tests are added that digit separators
behave as expected for C2X and are properly disabled for C11; further
test coverage is included in the existing g++.dg/cpp1y/digit-sep*.C
tests.

Bootstrapped with no regressions for x86_64-pc-linux-gnu.

gcc/c-family/
* c-lex.c (interpret_float): Handle digit separators for C2X.

libcpp/
* init.c (lang_defaults): Enable digit separators for GNUC2X and
STDC2X.

gcc/testsuite/
* gcc.dg/c11-digit-separators-1.c,
gcc.dg/c2x-digit-separators-1.c, gcc.dg/c2x-digit-separators-2.c:
New tests.

3 years agoc++: ICE casting class to vector [PR100517]
Jason Merrill [Tue, 11 May 2021 13:53:20 +0000 (09:53 -0400)]
c++: ICE casting class to vector [PR100517]

My recent change to reject calling rvalue() with an argument of class type
crashes on this testcase, where we use rvalue() on what we expect to be an
argument of integer or vector type.  Fixed by checking first.

gcc/cp/ChangeLog:

PR c++/100517
* typeck.c (build_reinterpret_cast_1): Check intype on
cast to vector.

gcc/testsuite/ChangeLog:

PR c++/100517
* g++.dg/ext/vector41.C: New test.

3 years agoMore maybe_fold_reference TLC
Richard Biener [Tue, 11 May 2021 12:49:07 +0000 (14:49 +0200)]
More maybe_fold_reference TLC

This removes stale users of maybe_fold_reference where IL constraints
make it never do anything.

2021-05-11  Richard Biener  <rguenther@suse.de>

* gimple-fold.c (gimple_fold_call): Do not call
maybe_fold_reference on call arguments or the static chain.
(fold_stmt_1): Do not call maybe_fold_reference on GIMPLE_ASM
inputs.

3 years agoRemove dead components from MAINTAINERS.
Martin Liska [Fri, 12 Mar 2021 07:48:43 +0000 (08:48 +0100)]
Remove dead components from MAINTAINERS.

ChangeLog:

* MAINTAINERS: Remove entries for removed
components (HSA, BRIG, libhsail-rt).
Move Pekka to Write After Approval.

3 years agoRemove libhsail-rt.
Martin Liska [Thu, 11 Mar 2021 15:23:56 +0000 (16:23 +0100)]
Remove libhsail-rt.

ChangeLog:

* Makefile.def: Remove libhsail-rt.
* Makefile.in: Likewise.
* configure.ac: Likewise.
* configure: Regenerate.
* libhsail-rt/ChangeLog: Removed.
* libhsail-rt/Makefile.am: Removed.
* libhsail-rt/Makefile.in: Removed.
* libhsail-rt/README: Removed.
* libhsail-rt/aclocal.m4: Removed.
* libhsail-rt/configure: Removed.
* libhsail-rt/configure.ac: Removed.
* libhsail-rt/configure.tgt: Removed.
* libhsail-rt/include/internal/fibers.h: Removed.
* libhsail-rt/include/internal/phsa-queue-interface.h: Removed.
* libhsail-rt/include/internal/phsa-rt.h: Removed.
* libhsail-rt/include/internal/workitems.h: Removed.
* libhsail-rt/rt/arithmetic.c: Removed.
* libhsail-rt/rt/atomics.c: Removed.
* libhsail-rt/rt/bitstring.c: Removed.
* libhsail-rt/rt/fbarrier.c: Removed.
* libhsail-rt/rt/fibers.c: Removed.
* libhsail-rt/rt/fp16.c: Removed.
* libhsail-rt/rt/misc.c: Removed.
* libhsail-rt/rt/multimedia.c: Removed.
* libhsail-rt/rt/queue.c: Removed.
* libhsail-rt/rt/sat_arithmetic.c: Removed.
* libhsail-rt/rt/segment.c: Removed.
* libhsail-rt/rt/workitems.c: Removed.
* libhsail-rt/target-config.h.in: Removed.

contrib/ChangeLog:

* gcc_update: Remove libhsail-rt folder.
* update-copyright.py: Likewise.

3 years agoRemove BRIG front-end.
Martin Liska [Thu, 11 Mar 2021 15:13:24 +0000 (16:13 +0100)]
Remove BRIG front-end.

gcc/ada/ChangeLog:

* gcc-interface/ada-tree.h (BUILT_IN_LIKELY): Use builtins
from COROUTINES.
(BUILT_IN_UNLIKELY): Likewise.

gcc/ChangeLog:

* builtins.def (DEF_HSAIL_BUILTIN): Remove.
(DEF_HSAIL_ATOMIC_BUILTIN): Likewise.
(DEF_HSAIL_SAT_BUILTIN): Likewise.
(DEF_HSAIL_INTR_BUILTIN): Likewise.
(DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN): Likewise.
* doc/frontends.texi: Remove BRIG.
* doc/install.texi: Likewise.
* doc/invoke.texi: Likewise.
* doc/standards.texi: Likewise.
* brig-builtins.def: Removed.
* brig/ChangeLog: Removed.
* brig/Make-lang.in: Removed.
* brig/brig-builtins.h: Removed.
* brig/brig-c.h: Removed.
* brig/brig-lang.c: Removed.
* brig/brigfrontend/brig-arg-block-handler.cc: Removed.
* brig/brigfrontend/brig-atomic-inst-handler.cc: Removed.
* brig/brigfrontend/brig-basic-inst-handler.cc: Removed.
* brig/brigfrontend/brig-branch-inst-handler.cc: Removed.
* brig/brigfrontend/brig-cmp-inst-handler.cc: Removed.
* brig/brigfrontend/brig-code-entry-handler.cc: Removed.
* brig/brigfrontend/brig-code-entry-handler.h: Removed.
* brig/brigfrontend/brig-comment-handler.cc: Removed.
* brig/brigfrontend/brig-control-handler.cc: Removed.
* brig/brigfrontend/brig-copy-move-inst-handler.cc: Removed.
* brig/brigfrontend/brig-cvt-inst-handler.cc: Removed.
* brig/brigfrontend/brig-fbarrier-handler.cc: Removed.
* brig/brigfrontend/brig-function-handler.cc: Removed.
* brig/brigfrontend/brig-function.cc: Removed.
* brig/brigfrontend/brig-function.h: Removed.
* brig/brigfrontend/brig-inst-mod-handler.cc: Removed.
* brig/brigfrontend/brig-label-handler.cc: Removed.
* brig/brigfrontend/brig-lane-inst-handler.cc: Removed.
* brig/brigfrontend/brig-machine.c: Removed.
* brig/brigfrontend/brig-machine.h: Removed.
* brig/brigfrontend/brig-mem-inst-handler.cc: Removed.
* brig/brigfrontend/brig-module-handler.cc: Removed.
* brig/brigfrontend/brig-queue-inst-handler.cc: Removed.
* brig/brigfrontend/brig-seg-inst-handler.cc: Removed.
* brig/brigfrontend/brig-signal-inst-handler.cc: Removed.
* brig/brigfrontend/brig-to-generic.cc: Removed.
* brig/brigfrontend/brig-to-generic.h: Removed.
* brig/brigfrontend/brig-util.cc: Removed.
* brig/brigfrontend/brig-util.h: Removed.
* brig/brigfrontend/brig-variable-handler.cc: Removed.
* brig/brigfrontend/hsa-brig-format.h: Removed.
* brig/brigfrontend/phsa.h: Removed.
* brig/brigspec.c: Removed.
* brig/config-lang.in: Removed.
* brig/gccbrig.texi: Removed.
* brig/lang-specs.h: Removed.
* brig/lang.opt: Removed.

gcc/testsuite/ChangeLog:

* gfortran.dg/goacc/pr78027.f90: Remove -Wno-hsa option.
* brig.dg/README: Removed.
* brig.dg/dg.exp: Removed.
* brig.dg/test/gimple/alloca.hsail: Removed.
* brig.dg/test/gimple/atomics.hsail: Removed.
* brig.dg/test/gimple/branches.hsail: Removed.
* brig.dg/test/gimple/fbarrier.hsail: Removed.
* brig.dg/test/gimple/function_calls.hsail: Removed.
* brig.dg/test/gimple/internal-casts.hsail: Removed.
* brig.dg/test/gimple/kernarg.hsail: Removed.
* brig.dg/test/gimple/mem.hsail: Removed.
* brig.dg/test/gimple/mulhi.hsail: Removed.
* brig.dg/test/gimple/packed.hsail: Removed.
* brig.dg/test/gimple/priv-array-offset-access.hsail: Removed.
* brig.dg/test/gimple/smoke_test.hsail: Removed.
* brig.dg/test/gimple/variables.hsail: Removed.
* brig.dg/test/gimple/vector.hsail: Removed.
* lib/brig-dg.exp: Removed.
* lib/brig.exp: Removed.

3 years agoipa/100513 - fix SSA_NAME_DEF_STMT corruption in IPA param manip
Richard Biener [Tue, 11 May 2021 11:23:45 +0000 (13:23 +0200)]
ipa/100513 - fix SSA_NAME_DEF_STMT corruption in IPA param manip

This fixes unintended clobbering of SSA_NAME_DEF_STMT of the
cloned/inlined from SSA name during IPA parameter manipulation
of call stmt LHSs.  gimple_call_set_lhs adjusts SSA_NAME_DEF_STMT
of the lhs to the stmt being modified but when
ipa_param_body_adjustments::modify_call_stmt is called the
cloning/inlining process has not yet remapped the stmts operands
to the copy variants but they are still original.

2021-05-11  Richard Biener  <rguenther@suse.de>

PR ipa/100513
* ipa-param-manipulation.c
(ipa_param_body_adjustments::modify_call_stmt): Avoid
altering SSA_NAME_DEF_STMT by adjusting the calls LHS
via gimple_call_lhs_ptr.

3 years agoarm: Avoid emitting bogus CFA adjusts for CMSE nonsecure calls [PR99725]
Alex Coplan [Tue, 11 May 2021 12:11:09 +0000 (13:11 +0100)]
arm: Avoid emitting bogus CFA adjusts for CMSE nonsecure calls [PR99725]

The PR shows us attaching REG_CFA_ADJUST_CFA notes to stack pointer
adjustments emitted in cmse_nonsecure_call_inline_register_clear (when
-march=armv8.1-m.main). However, the stack pointer is not guaranteed to
be the CFA reg. If we're at -O0 or we have -fno-omit-frame-pointer, then
the frame pointer will be used as the CFA reg, and these notes on the sp
adjustments will lead to ICEs in dwarf2out_frame_debug_adjust_cfa.

This patch avoids emitting these notes if the current function has a
frame pointer.

gcc/ChangeLog:

PR target/99725
* config/arm/arm.c (cmse_nonsecure_call_inline_register_clear):
Avoid emitting CFA adjusts on the sp if we have the fp.

gcc/testsuite/ChangeLog:

PR target/99725
* gcc.target/arm/cmse/pr99725.c: New test.

3 years agoaarch64: A couple of mul_laneq tweaks
Richard Sandiford [Tue, 11 May 2021 11:17:33 +0000 (12:17 +0100)]
aarch64: A couple of mul_laneq tweaks

This patch removes the duplication between the mul_laneq<mode>3
and the older mul-lane patterns.  The older patterns were previously
divided into two based on whether the indexed operand had the same mode
as the other operands or whether it had the opposite length from the
other operands (64-bit vs. 128-bit).  However, it seemed easier to
divide them instead based on whether the indexed operand was 64-bit or
128-bit, since that maps directly to the arm_neon.h “q” conventions.

Also, it looks like the older patterns were missing cases for
V8HF<->V4HF combinations, which meant that vmul_laneq_f16 and
vmulq_lane_f16 didn't produce single instructions.

There was a typo in the V2SF entry for VCONQ, but in practice
no patterns were using that entry until now.

The test passes for both endiannesses, but endianness does change
the mapping between regexps and functions.

gcc/
* config/aarch64/iterators.md (VMUL_CHANGE_NLANES): Delete.
(VMULD): New iterator.
(VCOND): Handle V4HF and V8HF.
(VCONQ): Fix entry for V2SF.
* config/aarch64/aarch64-simd.md (mul_lane<mode>3): Use VMULD
instead of VMUL.  Use a 64-bit vector mode for the indexed operand.
(*aarch64_mul3_elt_<vswap_width_name><mode>): Merge with...
(mul_laneq<mode>3): ...this define_insn.  Use VMUL instead of VDQSF.
Use a 128-bit vector mode for the indexed operand.  Use stype for
the scheduling type.

gcc/testsuite/
* gcc.target/aarch64/fmul_lane_1.c: New test.

3 years agoMore maybe_fold_reference TLC
Richard Biener [Tue, 11 May 2021 09:05:10 +0000 (11:05 +0200)]
More maybe_fold_reference TLC

This adjusts maybe_fold_reference to adhere to its desired behavior
of performing constant folding and thus explicitely avoid returning
unfolded reference trees.

2021-05-11  Richard Biener  <rguenther@suse.de>

* gimple-fold.c (maybe_fold_reference): Only return
is_gimple_min_invariant values.

3 years agomiddle-end/100509 - avoid folding constant to aggregate type
Richard Biener [Tue, 11 May 2021 08:58:35 +0000 (10:58 +0200)]
middle-end/100509 - avoid folding constant to aggregate type

When folding a constant initializer looking through aliases to
incompatible types can lead to us trying to fold a constant
to an aggregate type which can't work.  Simply avoid trying
to constant fold non-register typed symbols.

2021-05-11  Richard Biener  <rguenther@suse.de>

PR middle-end/100509
* gimple-fold.c (fold_gimple_assign): Only call
get_symbol_constant_value on register type symbols.

* gcc.dg/pr100509.c: New testcase.

3 years agoarm: Remove duplicate definitions from arm_mve.h (pr100419).
Srinath Parvathaneni [Tue, 11 May 2021 09:43:11 +0000 (10:43 +0100)]
arm: Remove duplicate definitions from arm_mve.h (pr100419).

This patch removes several duplicated intrinsic definitions from
arm_mve.h mentioned in PR100419 and also fixes the wrong arguments
in few of intrinsics polymorphic variants.

gcc/ChangeLog:

2021-05-04  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

PR target/100419
* config/arm/arm_mve.h (__arm_vstrwq_scatter_offset): Fix wrong arguments.
(__arm_vcmpneq): Remove duplicate definition.
(__arm_vstrwq_scatter_offset_p): Likewise.
(__arm_vmaxq_x): Likewise.
(__arm_vmlsdavaq): Likewise.
(__arm_vmlsdavaxq): Likewise.
(__arm_vmlsdavq_p): Likewise.
(__arm_vmlsdavxq_p): Likewise.
(__arm_vrmlaldavhaq): Likewise.
(__arm_vstrbq_p): Likewise.
(__arm_vstrbq_scatter_offset): Likewise.
(__arm_vstrbq_scatter_offset_p): Likewise.
(__arm_vstrdq_scatter_offset): Likewise.
(__arm_vstrdq_scatter_offset_p): Likewise.
(__arm_vstrdq_scatter_shifted_offset): Likewise.
(__arm_vstrdq_scatter_shifted_offset_p): Likewise.

Co-authored-by: Joe Ramsay <joe.ramsay@arm.com>
3 years agogcc-changelog: Remove non-strict mode.
Martin Liska [Mon, 10 May 2021 12:13:53 +0000 (14:13 +0200)]
gcc-changelog: Remove non-strict mode.

contrib/ChangeLog:

* gcc-changelog/git_check_commit.py: Remove --non-strict-mode.
* gcc-changelog/git_commit.py: Remove strict mode.
* gcc-changelog/git_email.py: Likewise.
* gcc-changelog/git_repository.py: Likewise.
* gcc-changelog/test_email.py: Likewise.
* gcc-changelog/test_patches.txt: Update patches so that they
don't contain a ChangeLog file changes.

3 years agogcc-changelog: Accept ref_name argument in GitCommit.
Martin Liska [Mon, 10 May 2021 11:51:22 +0000 (13:51 +0200)]
gcc-changelog: Accept ref_name argument in GitCommit.

contrib/ChangeLog:

* gcc-changelog/git_commit.py: Remove ChangeLog locations
based on ref_name.
* gcc-changelog/git_repository.py: Likewise.

3 years agotestsuite/s390: Fix risbg-ll-3.c f2_cconly test.
Robin Dapp [Tue, 11 May 2021 07:50:44 +0000 (09:50 +0200)]
testsuite/s390: Fix risbg-ll-3.c f2_cconly test.

Instead of selecting bits 62 to (wraparound) 59 from r2 and inserting them
into r3, we select bits 60 to 62 from r3 and insert them into r2
nowadays.  Adjust the test accordingly.

gcc/testsuite/ChangeLog:

* gcc.target/s390/risbg-ll-3.c: Change match pattern.

3 years agoFurther minor fixes
Eric Botcazou [Tue, 11 May 2021 07:44:05 +0000 (09:44 +0200)]
Further minor fixes

gcc/ada/
* gnatvsn.adb (Version_String): Rename to...
(C_Version_String): ...this.
(Gnat_Version_String): Adjust to above renaming.
* version.c : Fix formatting glitches.

3 years agoopenmp: Fix up taskloop reduction ICE if taskloop has no iterations [PR100471]
Jakub Jelinek [Tue, 11 May 2021 07:07:47 +0000 (09:07 +0200)]
openmp: Fix up taskloop reduction ICE if taskloop has no iterations [PR100471]

When a taskloop doesn't have any iterations, GOMP_taskloop* takes an early
return, doesn't create any tasks and more importantly, doesn't create
a taskgroup and doesn't register task reductions.  But, the code emitted
in the callers assumes task reductions have been registered and performs
the reduction handling and task reduction unregistration.  The pointer
to the task reduction private variables is reused, on input it is the alignment
and only on output it is the pointer, so in the case taskloop with no iterations
the caller attempts to dereference the alignment value as if it was a pointer
and crashes.  We could in the early returns register the task reductions
only to have them looped over and unregistered in the caller, but I think
it is better to tell the caller there is nothing to task reduce and bypass
all that.

2021-05-11  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/100471
* omp-low.c (lower_omp_task_reductions): For OMP_TASKLOOP, if data
is 0, bypass the reduction loop including
GOMP_taskgroup_reduction_unregister call.

* taskloop.c (GOMP_taskloop): If GOMP_TASK_FLAG_REDUCTION and not
GOMP_TASK_FLAG_NOGROUP, when doing early return clear the task
reduction pointer.
* testsuite/libgomp.c/task-reduction-4.c: New test.

3 years agors6000: Guard density_test only for vector version
Kewen Lin [Tue, 11 May 2021 04:01:15 +0000 (23:01 -0500)]
rs6000: Guard density_test only for vector version

This patch teaches rs6000_density_test to only care about the vector
version cost calculation and early return when calculating the single
scalar iteration cost.

Bootstrapped/regtested on powerpc64le-linux-gnu P9.

gcc/ChangeLog:

* config/rs6000/rs6000.c (struct rs6000_cost_data): New member
costing_for_scalar.
(rs6000_density_test): Early return if costing_for_scalar is true.
(rs6000_init_cost): Init costing_for_scalar of rs6000_cost_data.

3 years agovect: Add costing_for_scalar parameter to init_cost hook
Kewen Lin [Tue, 11 May 2021 03:13:27 +0000 (22:13 -0500)]
vect: Add costing_for_scalar parameter to init_cost hook

rs6000 port function rs6000_density_test wants to differentiate the
current cost model is for the scalar version of a loop or block, or
the vector version.  As Richi suggested, this patch introduces one
new parameter costing_for_scalar to init_cost hook to pass down this
information explicitly.

gcc/ChangeLog:

* doc/tm.texi: Regenerated.
* target.def (init_cost): Add new parameter costing_for_scalar.
* targhooks.c (default_init_cost): Adjust for new parameter.
* targhooks.h (default_init_cost): Likewise.
* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
(vect_compute_single_scalar_iteration_cost): Likewise.
(vect_analyze_loop_2): Likewise.
* tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
(vect_bb_vectorization_profitable_p): Likewise.
* tree-vectorizer.h (init_cost): Likewise.
* config/aarch64/aarch64.c (aarch64_init_cost): Likewise.
* config/i386/i386.c (ix86_init_cost): Likewise.
* config/rs6000/rs6000.c (rs6000_init_cost): Likewise.

3 years agors6000: Move rs6000_vect_nonmem into target cost_data
Kewen Lin [Tue, 11 May 2021 02:34:36 +0000 (21:34 -0500)]
rs6000: Move rs6000_vect_nonmem into target cost_data

This patch is to move rs6000_vect_nonmem (target cost_data
related information) into target cost_data struct.
As Richi pointed out, we can gather data from add_stmt_cost
invocations.  This is one pre-step to centralize target
cost_data related stuffs.

gcc/ChangeLog:

* config/rs6000/rs6000.c (rs6000_vect_nonmem): Renamed to
vect_nonmem and moved into...
(struct rs6000_cost_data): ...here.
(rs6000_init_cost): Use vect_nonmem of cost_data instead.
(rs6000_add_stmt_cost): Likewise.
(rs6000_finish_cost): Likewise.

3 years agoc++: dependent operator expression lookup [PR51577]
Patrick Palka [Tue, 11 May 2021 02:38:34 +0000 (22:38 -0400)]
c++: dependent operator expression lookup [PR51577]

This unconditionally enables the maybe_save_operator_binding mechanism
for all function templates, so that when resolving a dependent operator
expression from a function template we ignore later-declared
namespace-scope bindings that weren't visible at template definition
time.  This patch additionally makes the mechanism apply to dependent
comma and compound-assignment operator expressions.

Note that this doesn't fix the testcases in PR83035 or PR99692 because
there the dependent operator expressions aren't at function scope.  I'm
not sure how adapt this mechanism for these testcases, since although
we'll in both testcases have a TEMPLATE_DECL to associate the lookup
result with, at instantiation time we won't have an appropriate binding
level to push to.

gcc/cp/ChangeLog:

PR c++/51577
* name-lookup.c (maybe_save_operator_binding): Unconditionally
enable for all function templates, not just generic lambdas.
Handle compound-assignment operator expressions.
* typeck.c (build_x_compound_expr): Call maybe_save_operator_binding
in the type-dependent case.
(build_x_modify_expr): Likewise.  Move declaration of 'op' closer
to its first use.

gcc/testsuite/ChangeLog:

PR c++/51577
* g++.dg/lookup/operator-3.C: New test.

3 years agoc++: fn parm pack expansion inside constraint [PR100138]
Patrick Palka [Tue, 11 May 2021 02:33:04 +0000 (22:33 -0400)]
c++: fn parm pack expansion inside constraint [PR100138]

This PR is about CTAD but the underlying problems are more general;
CTAD is a good trigger for them because of the necessary substitution
into constraints that deduction guide generation entails.

In the testcase below, when generating the implicit deduction guide for
the constrained constructor template for A, we substitute the generic
flattening map 'tsubst_args' into the constructor's constraints.  During
this substitution, tsubst_pack_expansion returns a rebuilt pack
expansion for sizeof...(xs), but doesn't carry over the
PACK_EXPANSION_LOCAL_P (and PACK_EXPANSION_SIZEOF_P) flag from the
original tree to the rebuilt one.  The flag is otherwise unset on the
original tree but gets set for the rebuilt tree from make_pack_expansion
since at_function_scope_p() is true (we're inside main).  This leads to
a crash during satisfaction when substituting into the pack expansion
because we don't have local_specializations set up (and it'd be set up
for us if PACK_EXPANSION_LOCAL_P is unset)

Similarly, tsubst_constraint needs to set cp_unevaluated so that the
substitution performed therein doesn't rely on local_specializations.
This avoids a crash during CTAD for C below.

gcc/cp/ChangeLog:

PR c++/100138
* constraint.cc (tsubst_constraint): Set up cp_unevaluated.
(satisfy_atom): Set up iloc_sentinel before calling
cxx_constant_value.
* pt.c (tsubst_pack_expansion): When returning a rebuilt pack
expansion, carry over PACK_EXPANSION_LOCAL_P and
PACK_EXPANSION_SIZEOF_P from the original pack expansion.

gcc/testsuite/ChangeLog:

PR c++/100138
* g++.dg/cpp2a/concepts-ctad4.C: New test.

3 years agoDaily bump.
GCC Administrator [Tue, 11 May 2021 00:16:36 +0000 (00:16 +0000)]
Daily bump.

3 years agoFix missing version_string in Ada
Martin Liska [Mon, 10 May 2021 22:44:25 +0000 (00:44 +0200)]
Fix missing version_string in Ada

gcc/ada/
PR bootstrap/100506
* Make-generated.in: Replace version.c with ada/version.c.
* gcc-interface/Make-lang.in: Add version.o to GNAT1_C_OBJS.
Add version.o to GNAT_ADA_OBJS and GNATBIND_OBJS.
* gcc-interface/Makefile.in: Add version.o to TOOLS_LIBS.
* gnatvsn.adb: Start using a new C symbol gnat_version_string.
* version.c: New file.

3 years agoAdd missing pragma Inline for classification attributes
Eric Botcazou [Mon, 10 May 2021 21:33:18 +0000 (23:33 +0200)]
Add missing pragma Inline for classification attributes

This also moves other pragmas to their corresponding section.

gcc/ada/
* einfo-utils.ads (Classification Attributes): Add pragma Inline.
(Synthesized Attribute Functions): Move pragma Inline around.
(Type Representation Attribute Predicates): Likewise.
(Field Initialization Routines): Likewise.
(Miscellaneous Subprogram): Likewise.

3 years agoDo not use pragma Provide_Shift_Operators in Atree package
Eric Botcazou [Mon, 10 May 2021 21:27:23 +0000 (23:27 +0200)]
Do not use pragma Provide_Shift_Operators in Atree package

This pragma is relatively recent and may be problematic for the bootstrap.

gcc/ada/
* atree.ads (Slot): Remove pragma Provide_Shift_Operators.
(Shift_Left): New intrinsic function.
(Shift_Right): Likewise.
* atree.adb (Get_1_Bit_Val): Use Natural instead of Integer.
(Get_2_Bit_Val): Likewise.
(Get_4_Bit_Val): Likewise.
(Get_8_Bit_Val): Likewise.
(Set_1_Bit_Val): Likewise.
(Set_2_Bit_Val): Likewise.
(Set_4_Bit_Val): Likewise.
(Set_8_Bit_Val): Likewise.

3 years agoRemove obsolete comment and add missing header
Eric Botcazou [Mon, 10 May 2021 21:25:45 +0000 (23:25 +0200)]
Remove obsolete comment and add missing header

gcc/ada/
* atree.adb (Zero_Slots): Remove obsolete comment and add header.

3 years agoMinor tweak to previous change for the sake of consistency
Eric Botcazou [Mon, 10 May 2021 21:24:33 +0000 (23:24 +0200)]
Minor tweak to previous change for the sake of consistency

gcc/ada/
* atree.h (Get_32_Bit_Field): Tidy up.
(Get_32_Bit_Field_With_Default): Likewise.

3 years agoAvoid spurious rebuild actions in ada/gen_il
Eric Botcazou [Mon, 10 May 2021 21:14:43 +0000 (23:14 +0200)]
Avoid spurious rebuild actions in ada/gen_il

This uses the same mechanism as for ada/snames and ada/sdefault to avoid
spurious rebuild actions in the ada/gen_il directory.  This also avoids
copying some files into the generated directory, which is unnecessary.

gcc/ada/
* Make-generated.in (do_gen_il): Replace with...
(ada/stamp-gen_il): ...this.  Do not copy files into generated/.

3 years agoRemove call to gcc_unreachable in range-op.cc
Eric Botcazou [Mon, 10 May 2021 15:41:01 +0000 (17:41 +0200)]
Remove call to gcc_unreachable in range-op.cc

The Ada testcase happens to stumble on the call to gcc_unreachable in
operator_bitwise_xor::op1_range, but there is nothing wrong going on
and it's safe to let it go through.

gcc/
* range-op.cc (get_bool_state): Adjust head comment.
(operator_not_equal::op1_range): Fix comment.
(operator_bitwise_xor::op1_range): Remove call to gcc_unreachable.
gcc/testsuite/
* gnat.dg/specs/opt5.ads: New test.
* gnat.dg/specs/opt5_pkg.ads: New helper.

3 years agolibstdc++: Remove TODO comment
Jonathan Wakely [Mon, 10 May 2021 20:06:22 +0000 (21:06 +0100)]
libstdc++: Remove TODO comment

We have a comment saying to replace the simple binary_semaphore type
with std::binary_semaphore, which has been done. However, that isn't
defined on all targets. So keep the simple one here that just implements
the parts of the API needed by <stop_token>, and remove the comment
suggesting it should be replaced.

libstdc++-v3/ChangeLog:

* include/std/stop_token: Remove TODO comment.

3 years agolibstdc++: Implement proposed resolution to LWG 3548
Jonathan Wakely [Mon, 10 May 2021 19:46:38 +0000 (20:46 +0100)]
libstdc++: Implement proposed resolution to LWG 3548

This has been tentatively approved by LWG. The deleter from a unique_ptr
can be moved into the shared_ptr (at least, since LWG 2802). This uses
std::forward<_Del>(__r.get_deleter()) not std::move(__r.get_deleter())
because we don't want to convert the deleter to an rvalue when _Del is
an lvalue reference type.

This also adds a missing is_move_constructible_v<D> constraint to the
shared_ptr(unique_ptr<Y, D>&&) constructor, which is inherited from the
shared_ptr(Y*, D) constructor due to the use of "equivalent to" in the
specified effects.

libstdc++-v3/ChangeLog:

* include/bits/shared_ptr_base.h (__shared_count(unique_ptr&&)):
Initialize a non-reference deleter from an rvalue, as per LWG
3548.
(__shared_ptr::_UniqCompatible): Add missing constraint.
* testsuite/20_util/shared_ptr/cons/lwg3548.cc: New test.
* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc: Check
constraints.

3 years agoAvoid -Walloca-larger-than and -Wvla-larger-than false postives and negatives.
Martin Sebor [Mon, 10 May 2021 20:00:04 +0000 (14:00 -0600)]
Avoid -Walloca-larger-than and -Wvla-larger-than false postives and negatives.

Resolves:
PR middle-end/100425 - missing -Walloca-larger-than with -O0
PR middle-end/100510 - bogus -Wvla-large-than with -Walloca

gcc/ChangeLog:

PR middle-end/100425
PR middle-end/100510
* gimple-ssa-warn-alloca.c (pass_walloca::firast_time_p): Rename...
(pass_walloca::xlimit_certain_p): ...to this.
(pass_walloca::gate): Execute for any kind of handled warning.
(pass_walloca::execute): Avoid issuing "maybe" and "unbounded"
warnings when xlimit_certain_p is set.

gcc/testsuite/ChangeLog:

PR middle-end/100425
PR middle-end/100510
* c-c++-common/Walloca-larger-than.C: New test.
* gcc.dg/Walloca-larger-than-4.c: New test.
* gcc.dg/Wvla-larger-than-5.c: New test.
* gcc.dg/pr79972.c: Remove unexpected warning directive.

3 years agoAdd ALTIVEC_REGS as pressure class.
Pat Haugen [Mon, 10 May 2021 18:49:06 +0000 (13:49 -0500)]
Add ALTIVEC_REGS as pressure class.

Code that has heavy register pressure on Altivec registers can suffer from
over-aggressive scheduling during sched1, which then leads to increased
register spill. This is due to the fact that registers that prefer
ALTIVEC_REGS are currently assigned an allocno class of VSX_REGS. This then
misleads the scheduler to think there are 64 regs available, when in reality
there are only 32 Altivec regs. This patch fixes the problem by assigning an
allocno class of ALTIVEC_REGS and adding ALTIVEC_REGS as a pressure class.

2021-05-10  Pat Haugen  <pthaugen@linux.ibm.com>

gcc/ChangeLog:

* config/rs6000/rs6000.c (rs6000_ira_change_pseudo_allocno_class):
Return ALTIVEC_REGS if that is best_class.
(rs6000_compute_pressure_classes): Add ALTIVEC_REGS.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/fold-vec-insert-float-p9.c: Adjust counts.
* gcc.target/powerpc/vec-rlmi-rlnm.c: Likewise.

3 years agoarm: remove error in CPP_SPEC when float-abi soft and hard are used together
Christophe Lyon [Mon, 10 May 2021 16:39:04 +0000 (16:39 +0000)]
arm: remove error in CPP_SPEC when float-abi soft and hard are used together

arm.h has had this error message since 1997, and was never updated to
take softfp into account. Anyway, it seems it was useful long ago, but
it is no longer needed since option parsing has been improved:
-mfloat-abi is handled via arm.opt and updates the var_float_abi
variable. So, the last instance of -mfloat-abi= on the command line
wins.

This patch just removes this error message, thus enabling many more
tests to pass on arm-eabi:

* with -mcpu=cortex-a7/-mfloat-abi=soft/-march=armv7ve+simd (2 more passes)
gcc.target/arm/pr52375.c
g++.target/arm/pr99593.C (test for excess errors)

* with -mthumb/-mfloat-abi=soft/-march=armv6s-m (115 more passes in C, 90 more in C++)
gcc.target/arm/armv8_1m-fp16-move-1.c (test for excess errors)
gcc.target/arm/armv8_1m-fp32-move-1.c (test for excess errors)
gcc.target/arm/armv8_1m-fp64-move-1.c (test for excess errors)
gcc.target/arm/armv8_2-fp16-move-1.c (test for excess errors)
gcc.target/arm/cortex-m55-nodsp-flag-hard.c (test for excess errors)
gcc.target/arm/cortex-m55-nofp-flag-hard.c (test for excess errors)
gcc.target/arm/cortex-m55-nomve-flag-hard.c (test for excess errors)
gcc.target/arm/cortex-m55-nomve.fp-flag-hard.c (test for excess errors)
g++.target/arm/no_unique_address_1.C
g++.target/arm/no_unique_address_2.C

* with -mthumb/-mfloat-abi=soft/-march=armv7-m (153 more passes in C, 90 more in C++)
gcc.dg/pr59418.c (test for excess errors)
gcc.target/arm/armv8_1m-fp16-move-1.c (test for excess errors)
gcc.target/arm/armv8_1m-fp32-move-1.c (test for excess errors)
gcc.target/arm/armv8_1m-fp64-move-1.c (test for excess errors)
gcc.target/arm/armv8_2-fp16-move-1.c (test for excess errors)
gcc.target/arm/bfloat16_scalar_2_1.c (test for excess errors)
gcc.target/arm/bfloat16_scalar_3_1.c (test for excess errors)
gcc.target/arm/cortex-m55-nodsp-flag-hard.c (test for excess errors)
gcc.target/arm/cortex-m55-nofp-flag-hard.c (test for excess errors)
gcc.target/arm/cortex-m55-nomve-flag-hard.c (test for excess errors)
gcc.target/arm/cortex-m55-nomve.fp-flag-hard.c (test for excess errors)
gcc.target/arm/pr52375.c (test for excess errors)
gcc.target/arm/simd/vld1_bf16_1.c (test for excess errors)
gcc.target/arm/simd/vldn_lane_bf16_1.c (test for excess errors)
gcc.target/arm/simd/vst1_bf16_1.c (test for excess errors)
gcc.target/arm/simd/vstn_lane_bf16_1.c (test for excess errors)
g++.target/arm/no_unique_address_1.C
g++.target/arm/no_unique_address_2.C

* with -mthumb/-mfloat-abi=hard/-march=armv7e-m+fp (65 more passes)
gcc.target/arm/atomic-comp-swap-release-acquire-3.c (test for excess errors)
gcc.target/arm/atomic-comp-swap-release-acquire-3.c scan-assembler-not dmb
gcc.target/arm/atomic-comp-swap-release-acquire-3.c scan-assembler-times ldaex 4
gcc.target/arm/atomic-comp-swap-release-acquire-3.c scan-assembler-times stlex 4
gcc.target/arm/atomic-op-acq_rel-3.c (test for excess errors)
gcc.target/arm/atomic-op-acq_rel-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-acq_rel-3.c scan-assembler-times ldaex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-acq_rel-3.c scan-assembler-times stlex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-acquire-3.c (test for excess errors)
gcc.target/arm/atomic-op-acquire-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-acquire-3.c scan-assembler-times ldaex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-acquire-3.c scan-assembler-times strex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-char-3.c (test for excess errors)
gcc.target/arm/atomic-op-char-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-char-3.c scan-assembler-times ldrexb\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-char-3.c scan-assembler-times strexb\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-consume-3.c (test for excess errors)
gcc.target/arm/atomic-op-consume-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-consume-3.c scan-assembler-times ldaex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-consume-3.c scan-assembler-times strex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-int-3.c (test for excess errors)
gcc.target/arm/atomic-op-int-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-int-3.c scan-assembler-times ldrex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-int-3.c scan-assembler-times strex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-relaxed-3.c (test for excess errors)
gcc.target/arm/atomic-op-relaxed-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-relaxed-3.c scan-assembler-times ldrex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-relaxed-3.c scan-assembler-times strex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-release-3.c (test for excess errors)
gcc.target/arm/atomic-op-release-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-release-3.c scan-assembler-times ldrex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-release-3.c scan-assembler-times stlex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-seq_cst-3.c (test for excess errors)
gcc.target/arm/atomic-op-seq_cst-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-seq_cst-3.c scan-assembler-times ldaex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-seq_cst-3.c scan-assembler-times stlex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-short-3.c (test for excess errors)
gcc.target/arm/atomic-op-short-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-short-3.c scan-assembler-times ldrexh\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-short-3.c scan-assembler-times strexh\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/builtin-bswap-2.c (test for excess errors)
gcc.target/arm/builtin-bswap-2.c scan-assembler-not orr[ \t]
gcc.target/arm/builtin-bswap-2.c scan-assembler-times rev16\\t 2
gcc.target/arm/builtin-bswap-2.c scan-assembler-times rev\\t 4
gcc.target/arm/builtin-bswap-2.c scan-assembler-times revsh\\t 2
gcc.target/arm/builtin-bswap16-2.c (test for excess errors)
gcc.target/arm/builtin-bswap16-2.c scan-assembler-not orr[ \t]
gcc.target/arm/pr89190.c (test for excess errors)
gcc.target/arm/pr95646.c (test for excess errors)
gcc.target/arm/pr95646.c check-function-bodies __acle_se_bar
gcc.target/arm/pr95646.c scan-assembler-not mov\tr9, r0

* with -mthumb/-mfloat-abi=hard/-march=armv8-m.main+fp+dsp (870 more passes)
gcc.target/arm/atomic-comp-swap-release-acquire-3.c (test for excess errors)
gcc.target/arm/atomic-comp-swap-release-acquire-3.c scan-assembler-not dmb
gcc.target/arm/atomic-comp-swap-release-acquire-3.c scan-assembler-times ldaex 4
gcc.target/arm/atomic-comp-swap-release-acquire-3.c scan-assembler-times stlex 4
gcc.target/arm/atomic-op-acq_rel-3.c (test for excess errors)
gcc.target/arm/atomic-op-acq_rel-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-acq_rel-3.c scan-assembler-times ldaex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-acq_rel-3.c scan-assembler-times stlex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-acquire-3.c (test for excess errors)
gcc.target/arm/atomic-op-acquire-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-acquire-3.c scan-assembler-times ldaex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-acquire-3.c scan-assembler-times strex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-char-3.c (test for excess errors)
gcc.target/arm/atomic-op-char-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-char-3.c scan-assembler-times ldrexb\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-char-3.c scan-assembler-times strexb\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-consume-3.c (test for excess errors)
gcc.target/arm/atomic-op-consume-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-consume-3.c scan-assembler-times ldaex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-consume-3.c scan-assembler-times strex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-int-3.c (test for excess errors)
gcc.target/arm/atomic-op-int-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-int-3.c scan-assembler-times ldrex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-int-3.c scan-assembler-times strex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-relaxed-3.c (test for excess errors)
gcc.target/arm/atomic-op-relaxed-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-relaxed-3.c scan-assembler-times ldrex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-relaxed-3.c scan-assembler-times strex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-release-3.c (test for excess errors)
gcc.target/arm/atomic-op-release-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-release-3.c scan-assembler-times ldrex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-release-3.c scan-assembler-times stlex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-seq_cst-3.c (test for excess errors)
gcc.target/arm/atomic-op-seq_cst-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-seq_cst-3.c scan-assembler-times ldaex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-seq_cst-3.c scan-assembler-times stlex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-short-3.c (test for excess errors)
gcc.target/arm/atomic-op-short-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-short-3.c scan-assembler-times ldrexh\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-short-3.c scan-assembler-times strexh\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/builtin-bswap-2.c (test for excess errors)
gcc.target/arm/builtin-bswap-2.c scan-assembler-not orr[ \t]
gcc.target/arm/builtin-bswap-2.c scan-assembler-times rev16\\t 2
gcc.target/arm/builtin-bswap-2.c scan-assembler-times rev\\t 4
gcc.target/arm/builtin-bswap-2.c scan-assembler-times revsh\\t 2
gcc.target/arm/builtin-bswap16-2.c (test for excess errors)
gcc.target/arm/builtin-bswap16-2.c scan-assembler-not orr[ \t]
gcc.target/arm/pr89190.c (test for excess errors)
gcc.target/arm/pr95646.c (test for excess errors)
gcc.target/arm/pr95646.c check-function-bodies __acle_se_bar
gcc.target/arm/pr95646.c scan-assembler-not mov\tr9, r0

and all cmse tests

2021-05-10  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/
* config/arm/arm.h (CPP_SPEC): Remove error message about
-mfloat-abi.

3 years agoipa: Get rid of IPA_NODE_REF and IPA_EDGE_REF
Martin Jambor [Mon, 10 May 2021 14:24:08 +0000 (16:24 +0200)]
ipa: Get rid of IPA_NODE_REF and IPA_EDGE_REF

The node and edge summaries defined in ipa-prop.h are probably the
oldest in GCC and so it happened that they are the only ones using
macros to look them up and create them.  With Honza and Martin we
agreed it is ugly and the macros should be removed and the ipa-prop
summaries should be accessed like all the other ones but somehow I
never got to it until now.

The patch is mostly mechanical.  Because the lookup machinery was much
simpler in the old times (something like the fast summaries we have
today), a lot of code queried for the summary multiple times for no
good reasons and I fixed that in places where it was easy.

Also, before we switched to hash based summaries, new summary pointers
had to be obtained whenever the underlying array could be reallocated
because of new cgraph nodes/edges.  This is no longer necessary and so
I removed the instances which I found.

Both kinds of these non-mechanical changes should be specifically called
out in the ChangeLog.

I also removed the IS_VALID_JUMP_FUNC_INDEX macro because it not used
anywhere.

gcc/ChangeLog:

2021-05-07  Martin Jambor  <mjambor@suse.cz>

* ipa-prop.h (IPA_NODE_REF): Removed.
(IPA_NODE_REF_GET_CREATE): Likewise.
(IPA_EDGE_REF): Likewise.
(IPA_EDGE_REF_GET_CREATE): Likewise.
(IS_VALID_JUMP_FUNC_INDEX): Likewise.
* ipa-cp.c (print_all_lattices): Replaced IPA_NODE_REF with a direct
use of ipa_node_params_sum.
(ipcp_versionable_function_p): Likewise.
(push_node_to_stack): Likewise.
(pop_node_from_stack): Likewise.
(set_single_call_flag): Replaced two IPA_NODE_REF with one single
direct use of ipa_node_params_sum.
(initialize_node_lattices): Replaced IPA_NODE_REF with a direct use of
ipa_node_params_sum.
(ipa_context_from_jfunc): Replaced IPA_EDGE_REF with a direct use of
ipa_edge_args_sum.
(ipcp_verify_propagated_values): Replaced IPA_NODE_REF with a direct
use of ipa_node_params_sum.
(self_recursively_generated_p): Likewise.
(propagate_scalar_across_jump_function): Likewise.
(propagate_context_across_jump_function): Replaced IPA_EDGE_REF with a
direct use of ipa_edge_args_sum, moved the lookup after the early
exit.  Replaced IPA_NODE_REF with a direct use of ipa_node_params_sum.
(propagate_bits_across_jump_function): Replaced IPA_NODE_REF with
direct uses of ipa_node_params_sum.
(propagate_vr_across_jump_function): Likewise.
(propagate_aggregate_lattice): Likewise.
(propagate_aggs_across_jump_function): Likewise.
(propagate_constants_across_call): Likewise, also replaced
IPA_EDGE_REF with a direct use of ipa_edge_args_sum.
(good_cloning_opportunity_p): Replaced IPA_NODE_REF with a direct use
of ipa_node_params_sum.
(estimate_local_effects): Likewise.
(add_all_node_vals_to_toposort): Likewise.
(propagate_constants_topo): Likewise.
(ipcp_propagate_stage): Likewise.
(ipcp_discover_new_direct_edges): Likewise.
(calls_same_node_or_its_all_contexts_clone_p): Likewise.
(cgraph_edge_brings_value_p): Likewise (in both overloaded functions).
(get_info_about_necessary_edges): Likewise.
(want_remove_some_param_p): Likewise.
(create_specialized_node): Likewise.
(self_recursive_pass_through_p): Likewise.
(self_recursive_agg_pass_through_p): Likewise.
(find_more_scalar_values_for_callers_subset): Likewise and also
replaced IPA_EDGE_REF with direct uses of ipa_edge_args_sum, in one
case replacing two of those with a single query.
(find_more_contexts_for_caller_subset): Likewise for the
ipa_polymorphic_call_context overload.
(intersect_aggregates_with_edge): Replaced IPA_EDGE_REF with a direct
use of ipa_edge_args_sum.  Replaced IPA_NODE_REF with direct uses of
ipa_node_params_sum.
(find_aggregate_values_for_callers_subset): Likewise, also reusing
results of ipa_edge_args_sum->get.
(cgraph_edge_brings_all_scalars_for_node): Replaced IPA_NODE_REF with
direct uses of ipa_node_params_sum, replaced IPA_EDGE_REF with a
direct use of ipa_edge_args_sum.
(cgraph_edge_brings_all_agg_vals_for_node): Likewise, moved node
summary query after the early exit and reused the result later.
(decide_about_value): Replaced IPA_NODE_REF with a direct use of
ipa_node_params_sum.
(decide_whether_version_node): Likewise.  Removed re-querying for
summaries after cloning.
(spread_undeadness): Replaced IPA_NODE_REF with a direct use of
ipa_node_params_sum.
(has_undead_caller_from_outside_scc_p): Likewise, reusing results of
some queries.
(identify_dead_nodes): Likewise.
(ipcp_store_bits_results): Replaced IPA_NODE_REF with direct uses of
ipa_node_params_sum.
(ipcp_store_vr_results): Likewise.
* ipa-fnsummary.c (evaluate_properties_for_edge): Likewise.
(ipa_fn_summary_t::duplicate): Likewise.
(analyze_function_body): Likewise.
(estimate_calls_size_and_time): Likewise.
(ipa_cached_call_context::duplicate_from): Likewise.
(ipa_call_context::equal_to): Likewise.
(remap_edge_params): Likewise.
(ipa_merge_fn_summary_after_inlining): Likewise.
(inline_read_section): Likewise.
* ipa-icf.c (sem_function::param_used_p): Likewise.
* ipa-modref.c (compute_parm_map): Likewise.
(compute_parm_map): Replaced IPA_EDGE_REF with a direct use of
ipa_edge_args_sum.
(get_access_for_fnspec): Replaced IPA_NODE_REF with a direct use of
ipa_node_params_sum and replaced IPA_EDGE_REF with a direct use of
ipa_edge_args_sum.
* ipa-profile.c (check_argument_count): Likewise.
* ipa-prop.c (ipa_alloc_node_params): Replaced IPA_NODE_REF_GET_CREATE
with a direct use of ipa_node_params_sum.
(ipa_initialize_node_params): Likewise.
(ipa_print_node_jump_functions_for_edge): Replaced IPA_EDGE_REF with a
direct use of ipa_edge_args_sum and reused the query result.
(ipa_compute_jump_functions_for_edge): Replaced IPA_NODE_REF with a
direct use of ipa_node_params_sum and replaced IPA_EDGE_REF with a
direct use of ipa_edge_args_sum.
(ipa_note_param_call): Replaced IPA_NODE_REF with a direct use of
ipa_node_params_sum and reused the result of the query.
(ipa_analyze_node): Likewise.
(ipa_analyze_controlled_uses): Replaced IPA_NODE_REF with a direct use
of ipa_node_params_sum.
(update_jump_functions_after_inlining): Replaced IPA_EDGE_REF with
direct uses of ipa_edge_args_sum.
(update_indirect_edges_after_inlining): Replaced IPA_NODE_REF with
direct uses of ipa_node_params_sum and replaced IPA_EDGE_REF with a
direct use of ipa_edge_args_sum.  Removed superficial re-querying the
top edge summary.
(propagate_controlled_uses): Replaced IPA_NODE_REF with direct uses of
ipa_node_params_sum and replaced IPA_EDGE_REF with a direct use of
ipa_edge_args_sum.
(ipa_propagate_indirect_call_infos): Replaced IPA_EDGE_REF with a
direct use of ipa_edge_args_sum.
(ipa_edge_args_sum_t::duplicate): Replaced IPA_NODE_REF with a direct
use of ipa_node_params_sum.
(ipa_print_node_params): Likewise.
(ipa_write_node_info): Likewise and also replaced IPA_EDGE_REF with
direct uses of ipa_edge_args_sum.
(ipa_read_edge_info): Replaced IPA_EDGE_REF with a direct use of
ipa_edge_args_sum.
(ipa_read_node_info): Replaced IPA_NODE_REF with a direct use of
ipa_node_params_sum.
(ipa_prop_write_jump_functions): Likewise.  Move variable node to the
scopes where it is used.

3 years agolibstdc++: Remove redundant -std=gnu++17 option from remaining tests
Jonathan Wakely [Mon, 10 May 2021 15:22:54 +0000 (16:22 +0100)]
libstdc++: Remove redundant -std=gnu++17 option from remaining tests

GCC defaults to -std=gnu++17 now anyway, and using it explicitly in the
dg-options directive prevents running these tests with different modes
such as -std=c++17 or -std=gnu++20.

libstdc++-v3/ChangeLog:

* testsuite/17_intro/headers/c++2017/all_attributes.cc: Remove
-std=gnu++17 from dg-options directive.
* testsuite/17_intro/headers/c++2017/all_no_exceptions.cc:
Likewise.
* testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc:
Likewise.
* testsuite/17_intro/headers/c++2017/operator_names.cc:
Likewise.
* testsuite/17_intro/headers/c++2017/parallel_mode.cc: Likewise.
* testsuite/17_intro/headers/c++2017/stdc++.cc: Likewise.
* testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
Likewise.
* testsuite/18_support/aligned_alloc/aligned_alloc.cc: Likewise.
* testsuite/18_support/byte/81076.cc: Likewise.
* testsuite/18_support/byte/global_neg.cc: Likewise.
* testsuite/18_support/byte/ops.cc: Likewise.
* testsuite/18_support/byte/requirements.cc: Likewise.
* testsuite/18_support/headers/cfloat/values_c++17.cc: Likewise.
* testsuite/18_support/launder/1.cc: Likewise.
* testsuite/18_support/launder/nodiscard.cc: Likewise.
* testsuite/18_support/launder/requirements.cc: Likewise.
* testsuite/18_support/launder/requirements_neg.cc: Likewise.
* testsuite/18_support/new_aligned.cc: Likewise.
* testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
Likewise.
* testsuite/19_diagnostics/error_code/is_error_code_v.cc:
Likewise.
* testsuite/19_diagnostics/error_condition/hash.cc: Likewise.
* testsuite/20_util/addressof/requirements/constexpr.cc:
Likewise.
* testsuite/20_util/as_const/1.cc: Likewise.
* testsuite/20_util/as_const/rvalue_neg.cc: Likewise.
* testsuite/20_util/bind/83427.cc: Likewise.
* testsuite/20_util/bind/is_placeholder_v.cc: Likewise.
* testsuite/20_util/bool_constant/requirements.cc: Likewise.
* testsuite/20_util/duration/arithmetic/constexpr_c++17.cc:
Likewise.
* testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc:
Likewise.
* testsuite/20_util/duration_cast/rounding.cc: Likewise.
* testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
Likewise.
* testsuite/20_util/from_chars/1_neg.cc: Likewise.
* testsuite/20_util/from_chars/requirements.cc: Likewise.
* testsuite/20_util/function/91456.cc: Likewise.
* testsuite/20_util/function/cons/deduction.cc: Likewise.
* testsuite/20_util/function_objects/83607.cc: Likewise.
* testsuite/20_util/function_objects/invoke/59768.cc: Likewise.
* testsuite/20_util/function_objects/mem_fn/80478.cc: Likewise.
* testsuite/20_util/function_objects/not_fn/1.cc: Likewise.
* testsuite/20_util/function_objects/not_fn/87538.cc: Likewise.
* testsuite/20_util/has_unique_object_representations/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/has_unique_object_representations/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/has_unique_object_representations/value.cc:
Likewise.
* testsuite/20_util/hash/nullptr.cc: Likewise.
* testsuite/20_util/in_place/requirements.cc: Likewise.
* testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise.
* testsuite/20_util/is_aggregate/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_aggregate/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/is_aggregate/value.cc: Likewise.
* testsuite/20_util/is_invocable/83395.cc: Likewise.
* testsuite/20_util/is_invocable/91456.cc: Likewise.
* testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_invocable/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/is_invocable/value.cc: Likewise.
* testsuite/20_util/is_literal_type/deprecated-1z.cc: Likewise.
* testsuite/20_util/is_nothrow_constructible/94003.cc: Likewise.
* testsuite/20_util/is_nothrow_invocable/83395.cc: Likewise.
* testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc: Likewise.
* testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
* testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
* testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/is_nothrow_swappable_with/value.cc:
Likewise.
* testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_swappable/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/is_swappable/value.cc: Likewise.
* testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_swappable_with/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/is_swappable_with/value.cc: Likewise.
* testsuite/20_util/logical_traits/83134.cc: Likewise.
* testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/logical_traits/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/logical_traits/value.cc: Likewise.
* testsuite/20_util/pair/cons/deduction.cc: Likewise.
* testsuite/20_util/pair/swap_cxx17.cc: Likewise.
* testsuite/20_util/ratio/requirements/ratio_equal_v.cc:
Likewise.
* testsuite/20_util/reference_wrapper/83427.cc: Likewise.
* testsuite/20_util/reference_wrapper/deduction.cc: Likewise.
* testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/deduction.cc: Likewise.
* testsuite/20_util/shared_ptr/requirements/weak_type.cc:
Likewise.
* testsuite/20_util/time_point/arithmetic/constexpr.cc:
Likewise.
* testsuite/20_util/time_point_cast/rounding.cc: Likewise.
* testsuite/20_util/to_chars/3.cc: Likewise.
* testsuite/20_util/to_chars/chars_format.cc: Likewise.
* testsuite/20_util/to_chars/lwg3266.cc: Likewise.
* testsuite/20_util/to_chars/requirements.cc: Likewise.
* testsuite/20_util/tuple/78939.cc: Likewise.
* testsuite/20_util/tuple/apply/1.cc: Likewise.
* testsuite/20_util/tuple/apply/2.cc: Likewise.
* testsuite/20_util/tuple/cons/deduction.cc: Likewise.
* testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise.
* testsuite/20_util/tuple/make_from_tuple/2.cc: Likewise.
* testsuite/20_util/tuple/swap_cxx17.cc: Likewise.
* testsuite/20_util/tuple/tuple_size_v.cc: Likewise.
* testsuite/20_util/unique_ptr/cons/deduction_neg.cc: Likewise.
* testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
Likewise.
* testsuite/20_util/variable_templates_for_traits.cc: Likewise.
* testsuite/20_util/void_t/1.cc: Likewise.
* testsuite/20_util/weak_ptr/cons/deduction.cc: Likewise.
* testsuite/24_iterators/container_access.cc: Likewise.
* testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
Likewise.
* testsuite/24_iterators/headers/iterator/synopsis_c++17.cc:
Likewise.
* testsuite/24_iterators/range_access/range_access_cpp17.cc:
Likewise.
* testsuite/24_iterators/range_access/range_access_cpp17_neg.cc:
Likewise.
* testsuite/26_numerics/gcd/gcd_neg.cc: Likewise.
* testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
Likewise.
* testsuite/26_numerics/headers/cmath/hypot.cc: Likewise.
* testsuite/26_numerics/headers/cmath/special_functions_global.cc:
Likewise.
* testsuite/26_numerics/lcm/1.cc: Likewise.
* testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
* testsuite/26_numerics/valarray/deduction.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc:
Likewise.
* testsuite/27_io/manipulators/standard/char/quoted_sv.cc:
Likewise.
* testsuite/27_io/manipulators/standard/wchar_t/quoted_sv.cc:
Likewise.
* testsuite/27_io/types/4.cc: Likewise.
* testsuite/28_regex/basic_regex/ctors/deduction.cc: Likewise.
* testsuite/libstdc++-prettyprinters/91997.cc: Likewise.
* testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.

3 years agolibstdc++: Remove redundant -std=gnu++17 option from algorithm tests
Jonathan Wakely [Mon, 10 May 2021 15:22:54 +0000 (16:22 +0100)]
libstdc++: Remove redundant -std=gnu++17 option from algorithm tests

GCC defaults to -std=gnu++17 now anyway, and using it explicitly in the
dg-options directive prevents running these tests with different modes
such as -std=c++17 or -std=gnu++20.

libstdc++-v3/ChangeLog:

* testsuite/20_util/function_objects/searchers.cc: Remove
-std=gnu++17 from dg-options directive.
* testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94831.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
Likewise.
* testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
Likewise.
* testsuite/25_algorithms/clamp/1.cc: Likewise.
* testsuite/25_algorithms/clamp/2.cc: Likewise.
* testsuite/25_algorithms/clamp/constexpr.cc: Likewise.
* testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc:
Likewise.
* testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/for_each/for_each_n.cc: Likewise.
* testsuite/25_algorithms/for_each/for_each_n_debug.cc:
Likewise.
* testsuite/25_algorithms/sample/1.cc: Likewise.
* testsuite/25_algorithms/sample/2.cc: Likewise.
* testsuite/25_algorithms/sample/3.cc: Likewise.
* testsuite/25_algorithms/sample/81221.cc: Likewise.
* testsuite/25_algorithms/search/searcher.cc: Likewise.
* testsuite/26_numerics/exclusive_scan/1.cc: Likewise.
* testsuite/26_numerics/inclusive_scan/1.cc: Likewise.
* testsuite/26_numerics/reduce/1.cc: Likewise.
* testsuite/26_numerics/reduce/2.cc: Likewise.
* testsuite/26_numerics/transform_exclusive_scan/1.cc: Likewise.
* testsuite/26_numerics/transform_inclusive_scan/1.cc: Likewise.
* testsuite/26_numerics/transform_reduce/1.cc: Likewise.

3 years agolibstdc++: Remove redundant -std=gnu++17 option from containers tests
Jonathan Wakely [Mon, 10 May 2021 15:22:53 +0000 (16:22 +0100)]
libstdc++: Remove redundant -std=gnu++17 option from containers tests

GCC defaults to -std=gnu++17 now anyway, and using it explicitly in the
dg-options directive prevents running these tests with different modes
such as -std=c++17 or -std=gnu++20.

libstdc++-v3/ChangeLog:

* testsuite/23_containers/array/cons/deduction.cc: Remove
-std=gnu++17 from dg-options directive.
* testsuite/23_containers/array/cons/deduction_neg.cc: Likewise.
* testsuite/23_containers/array/element_access/constexpr_c++17.cc:
Likewise.
* testsuite/23_containers/array/requirements/constexpr_iter.cc:
Likewise.
* testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
Likewise.
* testsuite/23_containers/deque/cons/deduction.cc: Likewise.
* testsuite/23_containers/deque/modifiers/emplace/cxx17_return.cc:
Likewise.
* testsuite/23_containers/forward_list/cons/deduction.cc:
Likewise.
* testsuite/23_containers/forward_list/modifiers/emplace_cxx17_return.cc:
Likewise.
* testsuite/23_containers/list/cons/deduction.cc: Likewise.
* testsuite/23_containers/list/modifiers/emplace/cxx17_return.cc:
Likewise.
* testsuite/23_containers/map/cons/deduction.cc: Likewise.
* testsuite/23_containers/map/modifiers/extract.cc: Likewise.
* testsuite/23_containers/map/modifiers/insert/83226.cc:
Likewise.
* testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
Likewise.
* testsuite/23_containers/map/modifiers/merge.cc: Likewise.
* testsuite/23_containers/map/modifiers/try_emplace/1.cc:
Likewise.
* testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
* testsuite/23_containers/multimap/modifiers/extract.cc:
Likewise.
* testsuite/23_containers/multimap/modifiers/merge.cc: Likewise.
* testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
* testsuite/23_containers/multiset/modifiers/extract.cc:
Likewise.
* testsuite/23_containers/multiset/modifiers/merge.cc: Likewise.
* testsuite/23_containers/priority_queue/deduction.cc: Likewise.
* testsuite/23_containers/queue/deduction.cc: Likewise.
* testsuite/23_containers/queue/members/emplace_cxx17_return.cc:
Likewise.
* testsuite/23_containers/set/cons/deduction.cc: Likewise.
* testsuite/23_containers/set/modifiers/extract.cc: Likewise.
* testsuite/23_containers/set/modifiers/merge.cc: Likewise.
* testsuite/23_containers/set/modifiers/node_swap.cc: Likewise.
* testsuite/23_containers/stack/deduction.cc: Likewise.
* testsuite/23_containers/stack/members/emplace_cxx17_return.cc:
Likewise.
* testsuite/23_containers/unordered_map/cons/deduction.cc:
Likewise.
* testsuite/23_containers/unordered_map/modifiers/extract.cc:
Likewise.
* testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
Likewise.
* testsuite/23_containers/unordered_map/modifiers/merge.cc:
Likewise.
* testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/cons/deduction.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/modifiers/merge.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/cons/deduction.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/modifiers/merge.cc:
Likewise.
* testsuite/23_containers/unordered_set/cons/deduction.cc:
Likewise.
* testsuite/23_containers/unordered_set/modifiers/extract.cc:
Likewise.
* testsuite/23_containers/unordered_set/modifiers/merge.cc:
Likewise.
* testsuite/23_containers/vector/bool/emplace_cxx17_return.cc:
Likewise.
* testsuite/23_containers/vector/cons/89164_c++17.cc: Likewise.
* testsuite/23_containers/vector/cons/deduction.cc: Likewise.
* testsuite/23_containers/vector/modifiers/emplace/cxx17_return.cc:
Likewise.

3 years agolibstdc++: Remove redundant -std=gnu++17 option from strings tests
Jonathan Wakely [Mon, 10 May 2021 15:22:53 +0000 (16:22 +0100)]
libstdc++: Remove redundant -std=gnu++17 option from strings tests

GCC defaults to -std=gnu++17 now anyway, and using it explicitly in the
dg-options directive prevents running these tests with different modes
such as -std=c++17 or -std=gnu++20.

libstdc++-v3/ChangeLog:

* testsuite/21_strings/basic_string/79162.cc: Remove
-std=gnu++17 from dg-options directive.
* testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
* testsuite/21_strings/basic_string/cons/char/79162.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/char/86138.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/char/9.cc: Likewise.
* testsuite/21_strings/basic_string/cons/char/deduction.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/char/moveable2_c++17.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/79162.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/86138.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/9.cc: Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/moveable2_c++17.cc:
Likewise.
* testsuite/21_strings/basic_string/hash/hash.cc: Likewise.
* testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
* testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
* testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/compare/char/2.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/data/char/2.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/data/char/86169.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/find/char/5.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
Likewise.
* testsuite/21_strings/basic_string/operators/char/5.cc:
Likewise.
* testsuite/21_strings/basic_string/operators/wchar_t/5.cc:
Likewise.
* testsuite/21_strings/basic_string_view/capacity/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/capacity/empty_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/char/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/char/3.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/char/nonnull.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/constexpr.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/front_back_constexpr.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/include.cc: Likewise.
* testsuite/21_strings/basic_string_view/inserters/94051.cc:
Likewise.
* testsuite/21_strings/basic_string_view/inserters/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/inserters/char/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/inserters/char/3.cc:
Likewise.
* testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
Likewise.
* testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
Likewise.
* testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
Likewise.
* testsuite/21_strings/basic_string_view/literals/types.cc:
Likewise.
* testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
Likewise.
* testsuite/21_strings/basic_string_view/literals/values.cc:
Likewise.
* testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/modifiers/swap/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/compare/char/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/compare/char/70483.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/compare/wchar_t/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/copy/char/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/copy/wchar_t/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/substr/char/83511.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/substr/wchar_t/83511.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operators/char/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operators/char/89446.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
Likewise.
* testsuite/21_strings/basic_string_view/range_access/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
Likewise.
* testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
Likewise.
* testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
* testsuite/21_strings/basic_string_view/types/1.cc: Likewise.
* testsuite/21_strings/char_traits/requirements/char/99181.cc:
Likewise.
* testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:

3 years agolibstdc++: Remove redundant -std=gnu++17 option from PMR tests
Jonathan Wakely [Mon, 10 May 2021 15:22:53 +0000 (16:22 +0100)]
libstdc++: Remove redundant -std=gnu++17 option from PMR tests

GCC defaults to -std=gnu++17 now anyway, and using it explicitly in the
dg-options directive prevents running these tests with different modes
such as -std=c++17 or -std=gnu++20.

libstdc++-v3/ChangeLog:

* testsuite/20_util/memory_resource/1.cc: Remove -std=gnu++17
from dg-options directive.
* testsuite/20_util/memory_resource/2.cc: Likewise.
* testsuite/20_util/monotonic_buffer_resource/1.cc: Likewise.
* testsuite/20_util/monotonic_buffer_resource/93208.cc:
Likewise.
* testsuite/20_util/monotonic_buffer_resource/allocate.cc:
Likewise.
* testsuite/20_util/monotonic_buffer_resource/deallocate.cc:
Likewise.
* testsuite/20_util/monotonic_buffer_resource/release.cc:
Likewise.
* testsuite/20_util/monotonic_buffer_resource/upstream_resource.cc:
Likewise.
* testsuite/20_util/polymorphic_allocator/1.cc: Likewise.
* testsuite/20_util/polymorphic_allocator/construct_pair.cc:
Likewise.
* testsuite/20_util/polymorphic_allocator/resource.cc: Likewise.
* testsuite/20_util/polymorphic_allocator/select.cc: Likewise.
* testsuite/20_util/synchronized_pool_resource/allocate.cc:
Likewise.
* testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
Likewise.
* testsuite/20_util/synchronized_pool_resource/cons.cc:
Likewise.
* testsuite/20_util/synchronized_pool_resource/cons_single.cc:
Likewise.
* testsuite/20_util/synchronized_pool_resource/is_equal.cc:
Likewise.
* testsuite/20_util/synchronized_pool_resource/multithreaded.cc:
Likewise.
* testsuite/20_util/synchronized_pool_resource/options.cc:
Likewise.
* testsuite/20_util/synchronized_pool_resource/release.cc:
Likewise.
* testsuite/20_util/synchronized_pool_resource/release_single.cc:
Likewise.
* testsuite/20_util/unsynchronized_pool_resource/allocate-max-chunks.cc:
Likewise.
* testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
Likewise.
* testsuite/20_util/unsynchronized_pool_resource/cons.cc:
Likewise.
* testsuite/20_util/unsynchronized_pool_resource/is_equal.cc:
Likewise.
* testsuite/20_util/unsynchronized_pool_resource/options.cc:
Likewise.
* testsuite/20_util/unsynchronized_pool_resource/release.cc:
Likewise.
* testsuite/21_strings/basic_string/types/pmr_typedefs.cc:
Likewise.
* testsuite/23_containers/deque/types/pmr_typedefs.cc: Likewise.
* testsuite/23_containers/deque/types/pmr_typedefs_debug.cc:
Likewise.
* testsuite/23_containers/forward_list/pmr_typedefs.cc:
Likewise.
* testsuite/23_containers/forward_list/pmr_typedefs_debug.cc:
Likewise.
* testsuite/23_containers/list/pmr_typedefs.cc: Likewise.
* testsuite/23_containers/list/pmr_typedefs_debug.cc: Likewise.
* testsuite/23_containers/map/pmr_typedefs.cc: Likewise.
* testsuite/23_containers/map/pmr_typedefs_debug.cc: Likewise.
* testsuite/23_containers/multimap/pmr_typedefs.cc: Likewise.
* testsuite/23_containers/multimap/pmr_typedefs_debug.cc:
Likewise.
* testsuite/23_containers/multiset/pmr_typedefs.cc: Likewise.
* testsuite/23_containers/multiset/pmr_typedefs_debug.cc:
Likewise.
* testsuite/23_containers/set/pmr_typedefs.cc: Likewise.
* testsuite/23_containers/set/pmr_typedefs_debug.cc: Likewise.
* testsuite/23_containers/unordered_map/pmr_typedefs.cc:
Likewise.
* testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/pmr_typedefs.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/pmr_typedefs.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
Likewise.
* testsuite/23_containers/unordered_set/pmr_typedefs.cc:
Likewise.
* testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc:
Likewise.
* testsuite/23_containers/vector/pmr_typedefs.cc: Likewise.
* testsuite/23_containers/vector/types/pmr_typedefs_debug.cc:
Likewise.
* testsuite/28_regex/match_results/pmr_typedefs.cc: Likewise.

3 years agolibstdc++: Remove redundant -std=gnu++17 option from concurrency tests
Jonathan Wakely [Mon, 10 May 2021 15:22:53 +0000 (16:22 +0100)]
libstdc++: Remove redundant -std=gnu++17 option from concurrency tests

GCC defaults to -std=gnu++17 now anyway, and using it explicitly in the
dg-options directive prevents running these tests with different modes
such as -std=c++17 or -std=gnu++20.

libstdc++-v3/ChangeLog:

* testsuite/29_atomics/atomic/69769.cc: Remove -std=gnu++17 from
dg-options.
* testsuite/29_atomics/atomic/is_always_lock_free.cc:
* testsuite/29_atomics/atomic/requirements/typedefs.cc:
* testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
* testsuite/29_atomics/atomic_integral/requirements/typedefs.cc:
* testsuite/30_threads/lock_guard/cons/deduction.cc: Likewise.
* testsuite/30_threads/scoped_lock/cons/1.cc: Likewise.
* testsuite/30_threads/scoped_lock/cons/deduction.cc: Likewise.
* testsuite/30_threads/scoped_lock/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/30_threads/scoped_lock/requirements/typedefs.cc:
Likewise.
* testsuite/30_threads/shared_lock/70766.cc: Likewise.
* testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
* testsuite/30_threads/shared_mutex/cons/assign_neg.cc:
Likewise.
* testsuite/30_threads/shared_mutex/cons/copy_neg.cc: Likewise.
* testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
Likewise.
* testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
* testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
* testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
* testsuite/30_threads/unique_lock/cons/deduction.cc: Likewise.

3 years agolibstdc++: Remove redundant -std=gnu++17 option from any/optional/variant tests
Jonathan Wakely [Mon, 10 May 2021 15:22:53 +0000 (16:22 +0100)]
libstdc++: Remove redundant -std=gnu++17 option from any/optional/variant tests

GCC defaults to -std=gnu++17 now anyway, and using it explicitly in the
dg-options directive prevents running these tests with different modes
such as -std=c++17 or -std=gnu++20.

libstdc++-v3/ChangeLog:

* testsuite/20_util/any/assign/1.cc: Remove -std=gnu++17 from
dg-options directive.
* testsuite/20_util/any/assign/2.cc: Likewise.
* testsuite/20_util/any/assign/emplace.cc: Likewise.
* testsuite/20_util/any/assign/exception.cc: Likewise.
* testsuite/20_util/any/assign/self.cc: Likewise.
* testsuite/20_util/any/cons/1.cc: Likewise.
* testsuite/20_util/any/cons/2.cc: Likewise.
* testsuite/20_util/any/cons/90415.cc: Likewise.
* testsuite/20_util/any/cons/92156.cc: Likewise.
* testsuite/20_util/any/cons/aligned.cc: Likewise.
* testsuite/20_util/any/cons/explicit.cc: Likewise.
* testsuite/20_util/any/cons/in_place.cc: Likewise.
* testsuite/20_util/any/cons/nontrivial.cc: Likewise.
* testsuite/20_util/any/make_any.cc: Likewise.
* testsuite/20_util/any/misc/any_cast.cc: Likewise.
* testsuite/20_util/any/misc/any_cast_neg.cc: Likewise.
* testsuite/20_util/any/misc/any_cast_no_rtti.cc: Likewise.
* testsuite/20_util/any/misc/swap.cc: Likewise.
* testsuite/20_util/any/modifiers/1.cc: Likewise.
* testsuite/20_util/any/modifiers/83658.cc: Likewise.
* testsuite/20_util/any/modifiers/92156.cc: Likewise.
* testsuite/20_util/any/observers/type.cc: Likewise.
* testsuite/20_util/any/requirements.cc: Likewise.
* testsuite/20_util/any/typedefs.cc: Likewise.
* testsuite/20_util/optional/77288.cc: Likewise.
* testsuite/20_util/optional/84601.cc: Likewise.
* testsuite/20_util/optional/assignment/1.cc: Likewise.
* testsuite/20_util/optional/assignment/2.cc: Likewise.
* testsuite/20_util/optional/assignment/3.cc: Likewise.
* testsuite/20_util/optional/assignment/4.cc: Likewise.
* testsuite/20_util/optional/assignment/5.cc: Likewise.
* testsuite/20_util/optional/assignment/6.cc: Likewise.
* testsuite/20_util/optional/assignment/7.cc: Likewise.
* testsuite/20_util/optional/assignment/8.cc: Likewise.
* testsuite/20_util/optional/assignment/9.cc: Likewise.
* testsuite/20_util/optional/bad_access.cc: Likewise.
* testsuite/20_util/optional/cons/77727.cc: Likewise.
* testsuite/20_util/optional/cons/85642.cc: Likewise.
* testsuite/20_util/optional/cons/copy.cc: Likewise.
* testsuite/20_util/optional/cons/deduction.cc: Likewise.
* testsuite/20_util/optional/cons/default.cc: Likewise.
* testsuite/20_util/optional/cons/move.cc: Likewise.
* testsuite/20_util/optional/cons/trivial.cc: Likewise.
* testsuite/20_util/optional/cons/value.cc: Likewise.
* testsuite/20_util/optional/cons/value_neg.cc: Likewise.
* testsuite/20_util/optional/constexpr/cons/default.cc:
Likewise.
* testsuite/20_util/optional/constexpr/cons/value.cc: Likewise.
* testsuite/20_util/optional/constexpr/in_place.cc: Likewise.
* testsuite/20_util/optional/constexpr/make_optional.cc:
Likewise.
* testsuite/20_util/optional/constexpr/nullopt.cc: Likewise.
* testsuite/20_util/optional/constexpr/observers/1.cc: Likewise.
* testsuite/20_util/optional/constexpr/observers/2.cc: Likewise.
* testsuite/20_util/optional/constexpr/observers/3.cc: Likewise.
* testsuite/20_util/optional/constexpr/observers/4.cc: Likewise.
* testsuite/20_util/optional/constexpr/observers/5.cc: Likewise.
* testsuite/20_util/optional/constexpr/relops/1.cc: Likewise.
* testsuite/20_util/optional/constexpr/relops/2.cc: Likewise.
* testsuite/20_util/optional/constexpr/relops/3.cc: Likewise.
* testsuite/20_util/optional/constexpr/relops/4.cc: Likewise.
* testsuite/20_util/optional/constexpr/relops/5.cc: Likewise.
* testsuite/20_util/optional/constexpr/relops/6.cc: Likewise.
* testsuite/20_util/optional/hash.cc: Likewise.
* testsuite/20_util/optional/in_place.cc: Likewise.
* testsuite/20_util/optional/make_optional.cc: Likewise.
* testsuite/20_util/optional/nullopt.cc: Likewise.
* testsuite/20_util/optional/observers/1.cc: Likewise.
* testsuite/20_util/optional/observers/2.cc: Likewise.
* testsuite/20_util/optional/observers/3.cc: Likewise.
* testsuite/20_util/optional/observers/4.cc: Likewise.
* testsuite/20_util/optional/observers/5.cc: Likewise.
* testsuite/20_util/optional/observers/6.cc: Likewise.
* testsuite/20_util/optional/relops/1.cc: Likewise.
* testsuite/20_util/optional/relops/2.cc: Likewise.
* testsuite/20_util/optional/relops/3.cc: Likewise.
* testsuite/20_util/optional/relops/4.cc: Likewise.
* testsuite/20_util/optional/relops/5.cc: Likewise.
* testsuite/20_util/optional/relops/6.cc: Likewise.
* testsuite/20_util/optional/relops/7.cc: Likewise.
* testsuite/20_util/optional/requirements.cc: Likewise.
* testsuite/20_util/optional/swap/1.cc: Likewise.
* testsuite/20_util/optional/swap/2.cc: Likewise.
* testsuite/20_util/optional/typedefs.cc: Likewise.
* testsuite/20_util/variant/80165.cc: Likewise.
* testsuite/20_util/variant/85183.cc: Likewise.
* testsuite/20_util/variant/86874.cc: Likewise.
* testsuite/20_util/variant/87431.cc: Likewise.
* testsuite/20_util/variant/87619.cc: Likewise.
* testsuite/20_util/variant/91807.cc: Likewise.
* testsuite/20_util/variant/any.cc: Likewise.
* testsuite/20_util/variant/compile.cc: Likewise.
* testsuite/20_util/variant/deduction.cc: Likewise.
* testsuite/20_util/variant/exception_safety.cc: Likewise.
* testsuite/20_util/variant/hash.cc: Likewise.
* testsuite/20_util/variant/index_type.cc: Likewise.
* testsuite/20_util/variant/relops/89851.cc: Likewise.
* testsuite/20_util/variant/relops/90008.cc: Likewise.
* testsuite/20_util/variant/run.cc: Likewise.
* testsuite/20_util/variant/visit.cc: Likewise.

3 years agolibstdc++: Remove redundant -std=gnu++17 options from filesystem tests
Jonathan Wakely [Mon, 10 May 2021 15:22:53 +0000 (16:22 +0100)]
libstdc++: Remove redundant -std=gnu++17 options from filesystem tests

GCC defaults to -std=gnu++17 now anyway, and using it explicitly in the
dg-options directive prevents running these tests with different modes
such as -std=c++17 or -std=gnu++20.

libstdc++-v3/ChangeLog:

* testsuite/27_io/basic_filebuf/open/char/path.cc: Remove
-std=gnu++17 from dg-options directive.
* testsuite/27_io/basic_fstream/cons/char/path.cc: Likewise.
* testsuite/27_io/basic_fstream/open/char/path.cc: Likewise.
* testsuite/27_io/basic_ifstream/cons/char/path.cc: Likewise.
* testsuite/27_io/basic_ifstream/open/char/path.cc: Likewise.
* testsuite/27_io/basic_ofstream/cons/char/path.cc: Likewise.
* testsuite/27_io/basic_ofstream/open/char/path.cc: Likewise.
* testsuite/27_io/filesystem/directory_entry/86597.cc: Likewise.
* testsuite/27_io/filesystem/directory_entry/lwg3171.cc:
Likewise.
* testsuite/27_io/filesystem/file_status/1.cc: Likewise.
* testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
* testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
* testsuite/27_io/filesystem/iterators/91067.cc: Likewise.
* testsuite/27_io/filesystem/iterators/caching.cc: Likewise.
* testsuite/27_io/filesystem/iterators/directory_iterator.cc:
Likewise.
* testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
* testsuite/27_io/filesystem/iterators/recursion_pending.cc:
Likewise.
* testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
Likewise.
* testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
* testsuite/27_io/filesystem/operations/all.cc: Likewise.
* testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
* testsuite/27_io/filesystem/operations/copy.cc: Likewise.
* testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
* testsuite/27_io/filesystem/operations/create_directories.cc:
Likewise.
* testsuite/27_io/filesystem/operations/create_directory.cc:
Likewise.
* testsuite/27_io/filesystem/operations/create_symlink.cc:
Likewise.
* testsuite/27_io/filesystem/operations/current_path.cc:
Likewise.
* testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
* testsuite/27_io/filesystem/operations/exists.cc: Likewise.
* testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
* testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
* testsuite/27_io/filesystem/operations/last_write_time.cc:
Likewise.
* testsuite/27_io/filesystem/operations/permissions.cc:
Likewise.
* testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
* testsuite/27_io/filesystem/operations/read_symlink.cc:
Likewise.
* testsuite/27_io/filesystem/operations/relative.cc: Likewise.
* testsuite/27_io/filesystem/operations/remove.cc: Likewise.
* testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
* testsuite/27_io/filesystem/operations/rename.cc: Likewise.
* testsuite/27_io/filesystem/operations/resize_file.cc:
Likewise.
* testsuite/27_io/filesystem/operations/space.cc: Likewise.
* testsuite/27_io/filesystem/operations/status.cc: Likewise.
* testsuite/27_io/filesystem/operations/symlink_status.cc:
Likewise.
* testsuite/27_io/filesystem/operations/temp_directory_path.cc:
Likewise.
* testsuite/27_io/filesystem/operations/weakly_canonical.cc:
Likewise.
* testsuite/27_io/filesystem/path/append/path.cc: Likewise.
* testsuite/27_io/filesystem/path/append/source.cc: Likewise.
* testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
* testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
* testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
* testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
* testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
* testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
* testsuite/27_io/filesystem/path/concat/92853.cc: Likewise.
* testsuite/27_io/filesystem/path/concat/94063.cc: Likewise.
* testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
* testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
* testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
* testsuite/27_io/filesystem/path/construct/90281.cc: Likewise.
* testsuite/27_io/filesystem/path/construct/90634.cc: Likewise.
* testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
* testsuite/27_io/filesystem/path/construct/default.cc:
Likewise.
* testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
* testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
* testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
* testsuite/27_io/filesystem/path/construct/string_view.cc:
Likewise.
* testsuite/27_io/filesystem/path/decompose/extension.cc:
Likewise.
* testsuite/27_io/filesystem/path/decompose/filename.cc:
Likewise.
* testsuite/27_io/filesystem/path/decompose/parent_path.cc:
Likewise.
* testsuite/27_io/filesystem/path/decompose/relative_path.cc:
Likewise.
* testsuite/27_io/filesystem/path/decompose/root_directory.cc:
Likewise.
* testsuite/27_io/filesystem/path/decompose/root_name.cc:
Likewise.
* testsuite/27_io/filesystem/path/decompose/root_path.cc:
Likewise.
* testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
* testsuite/27_io/filesystem/path/factory/u8path-char8_t.cc:
Likewise.
* testsuite/27_io/filesystem/path/factory/u8path.cc: Likewise.
* testsuite/27_io/filesystem/path/generation/normal.cc:
Likewise.
* testsuite/27_io/filesystem/path/generation/normal2.cc:
Likewise.
* testsuite/27_io/filesystem/path/generation/proximate.cc:
Likewise.
* testsuite/27_io/filesystem/path/generation/relative.cc:
Likewise.
* testsuite/27_io/filesystem/path/generic/94242.cc: Likewise.
* testsuite/27_io/filesystem/path/generic/generic_string.cc:
Likewise.
* testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
* testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
* testsuite/27_io/filesystem/path/io/dr2989.cc: Likewise.
* testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
* testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
* testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
* testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
Likewise.
* testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
Likewise.
* testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
Likewise.
* testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
Likewise.
* testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
* testsuite/27_io/filesystem/path/native/alloc.cc: Likewise.
* testsuite/27_io/filesystem/path/native/string-char8_t.cc:
Likewise.
* testsuite/27_io/filesystem/path/native/string.cc: Likewise.
* testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
* testsuite/27_io/filesystem/path/nonmember/cmp.cc: Likewise.
* testsuite/27_io/filesystem/path/nonmember/hash_value.cc:
Likewise.
* testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
* testsuite/27_io/filesystem/path/query/empty_neg.cc:
* testsuite/27_io/filesystem/path/query/has_extension.cc:
Likewise.
* testsuite/27_io/filesystem/path/query/has_filename.cc:
Likewise.
* testsuite/27_io/filesystem/path/query/has_parent_path.cc:
Likewise.
* testsuite/27_io/filesystem/path/query/has_relative_path.cc:
Likewise.
* testsuite/27_io/filesystem/path/query/has_root_directory.cc:
Likewise.
* testsuite/27_io/filesystem/path/query/has_root_name.cc:
Likewise.
* testsuite/27_io/filesystem/path/query/has_root_path.cc:
Likewise.
* testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
* testsuite/27_io/filesystem/path/query/is_absolute.cc:
Likewise.
* testsuite/27_io/filesystem/path/query/is_relative.cc:
Likewise.
* testsuite/experimental/filesystem/path/construct/string_view.cc:
Likewise.

3 years agolibstdc++: Remove redundant -std=gnu++17 options from PSTL tests
Jonathan Wakely [Mon, 10 May 2021 15:22:53 +0000 (16:22 +0100)]
libstdc++: Remove redundant -std=gnu++17 options from PSTL tests

GCC defaults to -std=gnu++17 now anyway, and using it explicitly in the
dg-options directive prevents running these tests with different modes
such as -std=c++17 or -std=gnu++20.

libstdc++-v3/ChangeLog:

* testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
Remove -std=gnu++17 from dg-options.
* testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_sorting/includes.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
* testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
Likewise.
* testsuite/25_algorithms/pstl/alg_sorting/set.cc: Likewise.
* testsuite/25_algorithms/pstl/alg_sorting/sort.cc: Likewise.
* testsuite/25_algorithms/pstl/feature_test-2.cc: Likewise.
* testsuite/25_algorithms/pstl/feature_test-3.cc: Likewise.
* testsuite/25_algorithms/pstl/feature_test-4.cc: Likewise.
* testsuite/25_algorithms/pstl/feature_test-5.cc: Likewise.
* testsuite/25_algorithms/pstl/feature_test.cc: Likewise.
* testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
Likewise.
* testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
* testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
* testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc:
Likewise.
* testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc:
Likewise.

3 years agolibstdc++: Adjust expected errors in tests when compiled as C++20
Jonathan Wakely [Mon, 10 May 2021 14:10:45 +0000 (15:10 +0100)]
libstdc++: Adjust expected errors in tests when compiled as C++20

libstdc++-v3/ChangeLog:

* testsuite/20_util/scoped_allocator/69293_neg.cc: Add dg-error
for additional errors in C++20.
* testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc:
Likewise.
* testsuite/20_util/uses_allocator/69293_neg.cc: Likewise.
* testsuite/27_io/filesystem/path/io/dr2989.cc: Likewise.

3 years agoi386: Force V2SI mode operands to registers in expand_sse_movcc
Uros Bizjak [Mon, 10 May 2021 14:41:16 +0000 (16:41 +0200)]
i386: Force V2SI mode operands to registers in expand_sse_movcc

For some reason middle-end does not enforce operand
predicates for vcond patterns.

2021-05-10  Uroš Bizjak  <ubizjak@gmail.com>

gcc/
* config/i386/i386-expand.c (ix86_expand_sse_movcc)
<case E_V2SImode>: Force op_true to register.

3 years agolibstdc++: Rename test type to avoid clashing with std::any
Jonathan Wakely [Mon, 10 May 2021 12:57:49 +0000 (13:57 +0100)]
libstdc++: Rename test type to avoid clashing with std::any

When PCH are enabled this test file includes <any> and so the
using-directive brings std::any into the global scope. It isn't
currently a problem, because the -std option in the dg-options means
that PCH is not used. If that option is removed, the test fails with PCH
and passes without.

This just renames the type to avoid the name classh (and also the 'none'
type for consistency).

libstdc++-v3/ChangeLog:

* testsuite/20_util/variant/compile.cc: Rename 'any' to avoid
clash with std::any.

3 years agogcc-changelog: remove newlines in git_email.py --help
Martin Liska [Mon, 10 May 2021 13:17:06 +0000 (15:17 +0200)]
gcc-changelog: remove newlines in git_email.py --help

contrib/ChangeLog:

* gcc-changelog/git_email.py: Remove newlines when --help
is used.

3 years agocontrib/gcc-changelog: Add/improve --help
Tobias Burnus [Mon, 10 May 2021 13:13:37 +0000 (15:13 +0200)]
contrib/gcc-changelog: Add/improve --help

contrib/ChangeLog:

* gcc-changelog/git_check_commit.py (__Main__): State in --help
the default value for 'revisions'.
* gcc-changelog/git_email.py (show_help): Add.
(__main__): Handle -h and --help.

3 years agoarm: MVE: Factorize vcmp_*f*
Christophe Lyon [Mon, 10 May 2021 12:52:11 +0000 (12:52 +0000)]
arm: MVE: Factorize vcmp_*f*

Like in the previous, we factorize the vcmp_*f* patterns to make
maintenance easier.

2021-05-10  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/
* config/arm/iterators.md (MVE_FP_COMPARISONS): New.
* config/arm/mve.md (mve_vcmp<mve_cmp_op>q_f<mode>)
(mve_vcmp<mve_cmp_op>q_n_f<mode>): New, merge all vcmp_*f*
patterns.
(mve_vcmpeqq_f<mode>, mve_vcmpeqq_n_f<mode>, mve_vcmpgeq_f<mode>)
(mve_vcmpgeq_n_f<mode>, mve_vcmpgtq_f<mode>)
(mve_vcmpgtq_n_f<mode>, mve_vcmpleq_f<mode>)
(mve_vcmpleq_n_f<mode>, mve_vcmpltq_f<mode>)
(mve_vcmpltq_n_f<mode>, mve_vcmpneq_f<mode>)
(mve_vcmpneq_n_f<mode>): Remove.
* config/arm/unspecs.md (VCMPEQQ_F, VCMPEQQ_N_F, VCMPGEQ_F)
(VCMPGEQ_N_F, VCMPGTQ_F, VCMPGTQ_N_F, VCMPLEQ_F, VCMPLEQ_N_F)
(VCMPLTQ_F, VCMPLTQ_N_F, VCMPNEQ_F, VCMPNEQ_N_F): Remove.

3 years agoarm: MVE: Factorize all vcmp* integer patterns
Christophe Lyon [Mon, 10 May 2021 12:52:02 +0000 (12:52 +0000)]
arm: MVE: Factorize all vcmp* integer patterns

After removing the signed and unsigned suffixes in the previous
patches, we can now factorize the vcmp* patterns: there is no longer
an asymmetry where operators do not have the same set of signed and
unsigned variants.

The will make maintenance easier.

MVE has a different set of vector comparison operators than Neon,
so we have to introduce dedicated iterators.

2021-05-10  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/
* config/arm/iterators.md (MVE_COMPARISONS): New.
(mve_cmp_op): New.
(mve_cmp_type): New.
* config/arm/mve.md (mve_vcmp<mve_cmp_op>q_<mode>): New, merge all
mve_vcmp patterns.
(mve_vcmpneq_<mode>, mve_vcmpcsq_n_<mode>, mve_vcmpcsq_<mode>)
(mve_vcmpeqq_n_<mode>, mve_vcmpeqq_<mode>, mve_vcmpgeq_n_<mode>)
(mve_vcmpgeq_<mode>, mve_vcmpgtq_n_<mode>, mve_vcmpgtq_<mode>)
(mve_vcmphiq_n_<mode>, mve_vcmphiq_<mode>, mve_vcmpleq_n_<mode>)
(mve_vcmpleq_<mode>, mve_vcmpltq_n_<mode>, mve_vcmpltq_<mode>)
(mve_vcmpneq_n_<mode>, mve_vcmpltq_n_<mode>, mve_vcmpltq_<mode>)
(mve_vcmpneq_n_<mode>): Remove.

3 years agoarm: MVE: Remove _s and _u suffixes from vcmp* builtins.
Christophe Lyon [Mon, 10 May 2021 12:51:53 +0000 (12:51 +0000)]
arm: MVE: Remove _s and _u suffixes from vcmp* builtins.

This patch brings more unification in the vector comparison builtins,
by removing the useless 's' (signed) suffix since we no longer need
unsigned versions.

2021-05-10  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/
* config/arm/arm_mve.h (__arm_vcmp*): Remove 's' suffix.
* config/arm/arm_mve_builtins.def (vcmp*): Remove 's' suffix.
* config/arm/mve.md (mve_vcmp*): Remove 's' suffix in pattern
names.

3 years agoarm: MVE: Cleanup vcmpne/vcmpeq builtins
Christophe Lyon [Mon, 10 May 2021 12:51:45 +0000 (12:51 +0000)]
arm: MVE: Cleanup vcmpne/vcmpeq builtins

After the previous patch, we no longer need to emit the unsigned
variants of vcmpneq/vcmpeqq. This patch removes them as well as the
corresponding iterator entries.

2021-05-10  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/
* config/arm/arm_mve_builtins.def (vcmpneq_u): Remove.
(vcmpneq_n_u): Likewise.
(vcmpeqq_u,): Likewise.
(vcmpeqq_n_u): Likewise.
* config/arm/iterators.md (supf): Remove VCMPNEQ_U, VCMPEQQ_U,
VCMPEQQ_N_U and VCMPNEQ_N_U.
* config/arm/mve.md (mve_vcmpneq): Remove <supf> iteration.
(mve_vcmpeqq_n): Likewise.
(mve_vcmpeqq): Likewise.
(mve_vcmpneq_n): Likewise.

3 years agoarm: MVE: Convert vcmp[eq|ne]* in arm_mve.h to use only 's' builtin version
Christophe Lyon [Mon, 10 May 2021 12:51:33 +0000 (12:51 +0000)]
arm: MVE: Convert vcmp[eq|ne]* in arm_mve.h to use only 's' builtin version

There is no need to have a signed and an unsigned version of these
builtins. This is similar to what we do for Neon in arm_neon.h.
This mechanical patch enables later cleanup patches.

2021-05-10  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/
* config/arm/arm_mve.h (__arm_vcmpeq*u*, __arm_vcmpne*u*): Call
the 's' version of the builtin.

3 years agotestsuite/arm: Add mve-vmul-scalar-1.c test
Christophe Lyon [Mon, 10 May 2021 12:50:48 +0000 (12:50 +0000)]
testsuite/arm: Add mve-vmul-scalar-1.c test

Support for vmul has been present for a while, but it was lacking a
test for the scalar variant.

This patch adds one, precisely noting that we do not yet use the T2
variants of vmul, which take a scalar as final argument.

2021-05-10  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/testsuite/
* gcc.target/arm/simd/mve-vmul-scalar-1.c: New.

3 years agotestsuite/arm: Add mve-vsub-scalar-1.c test
Christophe Lyon [Mon, 10 May 2021 12:45:30 +0000 (12:45 +0000)]
testsuite/arm: Add mve-vsub-scalar-1.c test

This patchs adds a test similar to mve-vsub_1.c, but operates on a
scalar as second argument. For the moment we do not select the T2 vsub
variant operating on a scalar final argument, and we use vadd of the
opposite.

2021-05-10  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/testsuite/
* gcc.target/arm/simd/mve-vsub-scalar-1.c: New test.

3 years agocontrib/gcc-changelog: Detect if same file appears twice
Tobias Burnus [Mon, 10 May 2021 12:36:52 +0000 (14:36 +0200)]
contrib/gcc-changelog: Detect if same file appears twice

contrib/ChangeLog:

* gcc-changelog/git_commit.py (Error.__repr__): Add space after the colon.
(GitCommit.check_mentioned_files): Check whether the same file has been
specified multiple times.
* gcc-changelog/test_email.py (TestGccChangelog.test_multi_same_file): New.
* gcc-changelog/test_patches.txt (0001-OpenMP-Fix-SIMT): New test.

3 years agoAdd a test for PR tree-optimization/42587
H.J. Lu [Sat, 8 May 2021 14:23:25 +0000 (07:23 -0700)]
Add a test for PR tree-optimization/42587

PR tree-optimization/42587
* gcc.dg/optimize-bswapsi-6.c: New test.

3 years agoRevert "gcc-changelog: Remove components that will be removed."
Martin Liska [Mon, 10 May 2021 11:44:18 +0000 (13:44 +0200)]
Revert "gcc-changelog: Remove components that will be removed."

This reverts commit fea26bad2e5b9078d6a6b16d5e48653e31794273.

3 years agotestsuite/100452 - fix g++.dg/vect/slp-pr99971.cc
Richard Biener [Mon, 10 May 2021 11:22:03 +0000 (13:22 +0200)]
testsuite/100452 - fix g++.dg/vect/slp-pr99971.cc

This makes sure to align data so targets without unaligned
accesses can vectorize it.

2021-05-10  Richard Biener  <rguenther@suse.de>

PR testsuite/100452
* g++.dg/vect/slp-pr99971.cc: Align data.

3 years agotree-optimization/100492 - avoid irreducible regions in loop distribution
Richard Biener [Mon, 10 May 2021 09:37:27 +0000 (11:37 +0200)]
tree-optimization/100492 - avoid irreducible regions in loop distribution

When we distribute away a condition we rely on the ability to
change it to either 1 != 0 or 0 != 0 depending on the direction
of the exit branch in the respective loop.  But when the loop
contains an irreducible sub-region then for the conditions inside
this this fails and can lead to infinite loops being generated.

Avoid distibuting loops with irreducible sub-regions.

2021-05-10  Richard Biener  <rguenther@suse.de>

PR tree-optimization/100492
* tree-loop-distribution.c (find_seed_stmts_for_distribution):
Find nothing when the loop contains an irreducible region.

* gcc.dg/torture/pr100492.c: New testcase.

3 years agod: Fix qualifier ignored in alias definition if parentheses are not present
Iain Buclaw [Mon, 10 May 2021 10:03:19 +0000 (12:03 +0200)]
d: Fix qualifier ignored in alias definition if parentheses are not present

Fixes regression where the qualifier was ignored in an alias definition
if parentheses were not present.

Reviewed-on: https://github.com/dlang/dmd/pull/12504

gcc/d/ChangeLog:

* dmd/MERGE: Merge upstream dmd b7d146c4c.

3 years agolibphobos: Fix visibility of std.process.searchPathFor
Iain Buclaw [Tue, 4 May 2021 22:28:44 +0000 (00:28 +0200)]
libphobos: Fix visibility of std.process.searchPathFor

This symbol is used by std.file.thisExePath on OpenBSD.

Reviewed-on: https://github.com/dlang/phobos/pull/8041

libphobos/ChangeLog:

* src/MERGE: Merge upstream phobos 32cfe9b61.

3 years agogcc_update: fix check for local source tree.
Martin Liska [Mon, 10 May 2021 10:11:48 +0000 (12:11 +0200)]
gcc_update: fix check for local source tree.

contrib/ChangeLog:

* gcc_update: Start using reload.c instead of version.c.

3 years agomiddle-end/100464 - avoid spurious TREE_ADDRESSABLE in folding debug stmts
Richard Biener [Fri, 7 May 2021 07:51:18 +0000 (09:51 +0200)]
middle-end/100464 - avoid spurious TREE_ADDRESSABLE in folding debug stmts

canonicalize_constructor_val was setting TREE_ADDRESSABLE on bases
of ADDR_EXPRs but that's futile when we're dealing with CTOR values
in debug stmts.  This rips out the code which was added for Java
and should have been an assertion when we didn't have debug stmts.
To not regress g++.dg/tree-ssa/array-temp1.C we have to adjust the
testcase to not look for a no longer applied invalid optimization.

2021-05-10  Richard Biener  <rguenther@suse.de>

PR middle-end/100464
PR c++/100468
gcc/
* gimple-fold.c (canonicalize_constructor_val): Do not set
TREE_ADDRESSABLE.

gcc/cp/
* call.c (set_up_extended_ref_temp): Mark the temporary
addressable if the TARGET_EXPR was.

gcc/testsuite/
* gcc.dg/pr100464.c: New testcase.
* g++.dg/tree-ssa/array-temp1.C: Adjust.

3 years agotree-optimization/100434 - DSE aggregate call LHS
Richard Biener [Wed, 5 May 2021 14:15:12 +0000 (16:15 +0200)]
tree-optimization/100434 - DSE aggregate call LHS

This makes DSE consider aggregate LHS of calls as dead, for pure
or const calls the whole stmt and for others by removing the LHS.

2021-05-05  Richard Biener  <rguenther@suse.de>

PR tree-optimization/100434
* tree-ssa-dse.c (initialize_ao_ref_for_dse): Handle
call LHS.
(dse_optimize_stmt): Handle call LHS by dropping the
LHS or the whole call if it doesn't have other
side-effects.
(pass_dse::execute): Adjust.

* gcc.dg/tree-ssa/ssa-dse-43.c: New testcase.

3 years agoFix genversion linker error.
Martin Liska [Mon, 10 May 2021 09:35:49 +0000 (11:35 +0200)]
Fix genversion linker error.

When renaming gcov-iov to genversion I forgot one hunk that led
to the following linker error:

ld: error: build/genversion.o: requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC

gcc/ChangeLog:

* Makefile.in: Add missing genversion rule.

3 years agoarm: Fix wrong code with MVE V2DImode loads and stores [PR99960]
Alex Coplan [Mon, 10 May 2021 08:46:45 +0000 (09:46 +0100)]
arm: Fix wrong code with MVE V2DImode loads and stores [PR99960]

As the PR shows, we currently miscompile V2DImode loads and stores for
MVE.  We're currently using 64-bit loads/stores, but need to be using
128-bit vector loads and stores. Fixed thusly.

Some intrinsics tests were checking that we (incorrectly) used the
64-bit loads/stores: these have been updated.

gcc/ChangeLog:

PR target/99960
* config/arm/mve.md (*mve_mov<mode>): Simplify output code. Use
vldrw.u32 and vstrw.32 for V2D[IF]mode loads and stores.

gcc/testsuite/ChangeLog:

PR target/99960
* gcc.target/arm/mve/intrinsics/vldrdq_gather_base_wb_s64.c:
Update now that we're (correctly) using full 128-bit vector
loads/stores.
* gcc.target/arm/mve/intrinsics/vldrdq_gather_base_wb_u64.c:
Likewise.
* gcc.target/arm/mve/intrinsics/vldrdq_gather_base_wb_z_s64.c:
Likewise.
* gcc.target/arm/mve/intrinsics/vldrdq_gather_base_wb_z_u64.c:
Likewise.
* gcc.target/arm/mve/intrinsics/vuninitializedq_int.c: Likewise.
* gcc.target/arm/mve/intrinsics/vuninitializedq_int1.c:
Likewise.

3 years agoLTO plugin: use startswith function.
Martin Liska [Fri, 19 Mar 2021 14:23:01 +0000 (15:23 +0100)]
LTO plugin: use startswith function.

lto-plugin/ChangeLog:

* lto-plugin.c (LTO_SEGMENT_NAME): Remove.
(LTO_SYMTAB_PREFIX): Likewise.
(LTO_SYMTAB_PREFIX_LEN): Likewise.
(LTO_SYMTAB_EXT_PREFIX): Likewise.
(LTO_SYMTAB_EXT_PREFIX_LEN): Likewise.
(LTO_LTO_PREFIX): Likewise.
(LTO_LTO_PREFIX_LEN): Likewise.
(OFFLOAD_SECTION): Likewise.
(OFFLOAD_SECTION_LEN): Likewise.
(startswith): New function.
(all_symbols_read_handler): Use it.
(process_symtab): Likewise.
(process_symtab_extension): Likewise.
(process_offload_section): Likewise.
(process_option): Likewise.

3 years agoCome up with startswith function.
Martin Liska [Wed, 17 Mar 2021 15:36:44 +0000 (16:36 +0100)]
Come up with startswith function.

gcc/ada/ChangeLog:

* gcc-interface/utils.c (def_builtin_1): Use startswith
function instead of strncmp.

gcc/analyzer/ChangeLog:

* sm-file.cc (is_file_using_fn_p): Use startswith
function instead of strncmp.

gcc/ChangeLog:

* builtins.c (is_builtin_name): Use startswith
function instead of strncmp.
* collect2.c (main): Likewise.
(has_lto_section): Likewise.
(scan_libraries): Likewise.
* coverage.c (coverage_checksum_string): Likewise.
(coverage_init): Likewise.
* dwarf2out.c (is_cxx): Likewise.
(gen_compile_unit_die): Likewise.
* gcc-ar.c (main): Likewise.
* gcc.c (init_spec): Likewise.
(read_specs): Likewise.
(execute): Likewise.
(check_live_switch): Likewise.
* genattrtab.c (write_attr_case): Likewise.
(IS_ATTR_GROUP): Likewise.
* gencfn-macros.c (main): Likewise.
* gengtype.c (type_for_name): Likewise.
(gen_rtx_next): Likewise.
(get_file_langdir): Likewise.
(write_local): Likewise.
* genmatch.c (get_operator): Likewise.
(get_operand_type): Likewise.
(expr::gen_transform): Likewise.
* genoutput.c (validate_optab_operands): Likewise.
* incpath.c (add_sysroot_to_chain): Likewise.
* langhooks.c (lang_GNU_C): Likewise.
(lang_GNU_CXX): Likewise.
(lang_GNU_Fortran): Likewise.
(lang_GNU_OBJC): Likewise.
* lto-wrapper.c (run_gcc): Likewise.
* omp-general.c (omp_max_simt_vf): Likewise.
* omp-low.c (omp_runtime_api_call): Likewise.
* opts-common.c (parse_options_from_collect_gcc_options): Likewise.
* read-rtl-function.c (function_reader::read_rtx_operand_r): Likewise.
* real.c (real_from_string): Likewise.
* selftest.c (assert_str_startswith): Likewise.
* timevar.c (timer::validate_phases): Likewise.
* tree.c (get_file_function_name): Likewise.
* ubsan.c (ubsan_use_new_style_p): Likewise.
* varasm.c (default_function_rodata_section): Likewise.
(incorporeal_function_p): Likewise.
(default_section_type_flags): Likewise.
* system.h (startswith): Define startswith.

gcc/c-family/ChangeLog:

* c-ada-spec.c (print_destructor): Use startswith
function instead of strncmp.
(dump_ada_declaration): Likewise.
* c-common.c (disable_builtin_function): Likewise.
(def_builtin_1): Likewise.
* c-format.c (check_tokens): Likewise.
(check_plain): Likewise.
(convert_format_name_to_system_name): Likewise.

gcc/c/ChangeLog:

* c-aux-info.c (affix_data_type): Use startswith
function instead of strncmp.
* c-typeck.c (build_function_call_vec): Likewise.
* gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.

gcc/cp/ChangeLog:

* decl.c (duplicate_decls): Use startswith
function instead of strncmp.
(cxx_builtin_function): Likewise.
(omp_declare_variant_finalize_one): Likewise.
(grokfndecl): Likewise.
* error.c (dump_decl_name): Likewise.
* mangle.c (find_decomp_unqualified_name): Likewise.
(write_guarded_var_name): Likewise.
(decl_tls_wrapper_p): Likewise.
* parser.c (cp_parser_simple_type_specifier): Likewise.
(cp_parser_tx_qualifier_opt): Likewise.
* pt.c (template_parm_object_p): Likewise.
(dguide_name_p): Likewise.

gcc/d/ChangeLog:

* d-builtins.cc (do_build_builtin_fn): Use startswith
function instead of strncmp.
* dmd/dinterpret.c (evaluateIfBuiltin): Likewise.
* dmd/dmangle.c: Likewise.
* dmd/hdrgen.c: Likewise.
* dmd/identifier.c (Identifier::toHChars2): Likewise.

gcc/fortran/ChangeLog:

* decl.c (variable_decl): Use startswith
function instead of strncmp.
(gfc_match_end): Likewise.
* gfortran.h (gfc_str_startswith): Likewise.
* module.c (load_omp_udrs): Likewise.
(read_module): Likewise.
* options.c (gfc_handle_runtime_check_option): Likewise.
* primary.c (match_arg_list_function): Likewise.
* trans-decl.c (gfc_get_symbol_decl): Likewise.
* trans-expr.c (gfc_conv_procedure_call): Likewise.
* trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Likewise.

gcc/go/ChangeLog:

* gofrontend/runtime.cc (Runtime::name_to_code): Use startswith
function instead of strncmp.

gcc/objc/ChangeLog:

* objc-act.c (objc_string_ref_type_p): Use startswith
function instead of strncmp.
* objc-encoding.c (encode_type): Likewise.
* objc-next-runtime-abi-02.c (has_load_impl): Likewise.

3 years agogcc-changelog: Remove components that will be removed.
Martin Liska [Fri, 12 Mar 2021 08:31:37 +0000 (09:31 +0100)]
gcc-changelog: Remove components that will be removed.

contrib/ChangeLog:

* gcc-changelog/git_commit.py: Remove components that will be
removed.

3 years agoc++: remove redundand NULL check.
Martin Liska [Tue, 16 Mar 2021 12:22:55 +0000 (13:22 +0100)]
c++: remove redundand NULL check.

gcc/cp/ChangeLog:

PR c++/99616
* decl.c (grokdeclarator): Remove redundant NULL check.

3 years agoRemove __cplusplus >= 201103
Martin Liska [Thu, 22 Apr 2021 07:39:39 +0000 (09:39 +0200)]
Remove __cplusplus >= 201103

Right now, we require a C++11 compiler, so the check is not needed any
longer.

gcc/analyzer/ChangeLog:

* program-state.cc (program_state::operator=): Remove
__cplusplus >= 201103.
(program_state::program_state): Likewise.
* program-state.h: Likewise.
* region-model.h (class region_model): Remove dead code.

gcc/ChangeLog:

* bitmap.h (class auto_bitmap): Remove
__cplusplus >= 201103.
* config/aarch64/aarch64.c: Likewise.
* gimple-ssa-store-merging.c (store_immediate_info::store_immediate_info):
Likewise.
* sbitmap.h: Likewise.

3 years agoUse genversion to generate version.h.
Martin Liska [Tue, 20 Apr 2021 14:56:07 +0000 (16:56 +0200)]
Use genversion to generate version.h.

c++tools/ChangeLog:

* Makefile.in: Include also ../gcc folder.

gcc/ChangeLog:

* Makefile.in: Rename gcov-iov to genversion and depend
on version.h (instead of gcov-iov.h).
* gcov-io.h: Include version.h instread of gcov-iov.h.
* gengtype-state.c (read_state_version): Likewise.
* gcov-iov.c: Moved to...
* genversion.c: ...here.
* lto-streamer.h (LTO_major_version): Define it with
GCC_major_version.
* version.c: Removed.
* version.h: Removed.

libgcc/ChangeLog:

* libgcov-driver.c (gcov_version): Use different name that does
not clash with newly introduced macro.

3 years agoarc: Improve vector support for ARCv2.
Claudiu Zissulescu [Mon, 10 May 2021 06:49:35 +0000 (09:49 +0300)]
arc: Improve vector support for ARCv2.

Add vector negate, reduc_plus_scal, vec_duplicate, vector
min/max/mult/div patterns.  Besides vector negate and reduction
patterns, all the others are emulated using scalar instructions. The
reason is taking advantage of the double load/store instructions as
well as enabling the autovectorizer to further analize a loop.

gcc/
2021-05-10  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.md (UNSPEC_ARC_DMPYWH): Define.
* config/arc/simdext.md (VCT): Add predicates for iterator
elements.
(EMUVEC): Define.
(voptab): Likewise.
(vec_widen_<V_US>mult_hi_v4hi): Change pattern predicate.
(<voptab>v2si3): New patterns.
(neg): Likewise.
(reduc_plus_scal_v4hi): Likewise.
(reduc_plus_scal_v2si): Likewise.
(vec_duplicatev2si): Likewise.
(vec_duplicatev4hi): Likewise.

Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
3 years agoarc: Cleanup simdext.md file
Claudiu Zissulescu [Mon, 10 May 2021 06:49:35 +0000 (09:49 +0300)]
arc: Cleanup simdext.md file

Textual cleanup of the simdext.md file.  Format the output assembly
instructions.

gcc/
2021-05-10  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/simdext.md: Format and cleanup file.

Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
3 years agoarc: Disable movmisalign patterns when aligned access is required
Claudiu Zissulescu [Mon, 10 May 2021 06:49:35 +0000 (09:49 +0300)]
arc: Disable movmisalign patterns when aligned access is required

Disable movmisalign patterns when aligned access is required.

gcc/
2021-05-10  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/simdext.md (movmisalignv2hi): Allow misaligned access
only when munaligned-access option is on.
(movmisalign<mode>): Likewise.

Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
3 years agoarc: Fix compilation warnings.
Claudiu Zissulescu [Mon, 10 May 2021 06:03:41 +0000 (09:03 +0300)]
arc: Fix compilation warnings.

gcc/
2021-05-10  Claudiu Zissulescu  <claziss@synopsys.com>

* common/config/arc/arc-common.c (arc_handle_option): Remove dot
from string.
* config/arc/arc.c (arc_reorg): Remove underscore from string.

Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
3 years agoarc: Update ctz/clz patterns
Claudiu Zissulescu [Mon, 10 May 2021 06:03:41 +0000 (09:03 +0300)]
arc: Update ctz/clz patterns

ARCv2 ISA introduces special clz/ctz instructions. This patch is
adding support for them when available.

Corner case:
mov            r0,0x0 : (w0) r0 <= 0x00000000 *
ffs            r1,r0 : (w0) r1 <= 0x0000001f *
fls            r2,r0 : (w0) r2 <= 0x00000000 *

gcc/
2021-05-10  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
(CTZ_DEFINED_VALUE_AT_ZERO): Likewise.
* config/arc/arc.md (clrsbsi2): Cleanup pattern.
(norm_f): Likewise.
(ffs): Likewise.
(ffs_f): Likewise.
(clzsi2): Use fls instruction when available.
(arc_clzsi2): Likewise.

Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
3 years agoarc: Add alternative names for gp and fp registers.
Claudiu Zissulescu [Mon, 10 May 2021 06:03:41 +0000 (09:03 +0300)]
arc: Add alternative names for gp and fp registers.

Add alternative register name r26 for gp register, and add
alternative register name r27 for fp register.

gcc/
2021-05-10  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add r26 and r27.

3 years agoarc: Fix documentation __builtin_arc_sr
Claudiu Zissulescu [Mon, 10 May 2021 06:03:41 +0000 (09:03 +0300)]
arc: Fix documentation __builtin_arc_sr

The arguments of __builtin_arc_sr are swapped in documentation. Fix it.

gcc/
2021-05-10  Claudiu Zissulescu  <claziss@synopsys.com>

* doc/extend.texi (__builtin_arc_sr): Swap arguments.

Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
3 years agoReset prologue_location before calling code_end
Bernd Edlinger [Sat, 8 May 2021 05:46:17 +0000 (07:46 +0200)]
Reset prologue_location before calling code_end

Some targets emit thunks from the targetm.asm_out.code_end
function and set the DECL_IGNORED_P, but due to
e69ac020372 ("Add line debug info for virtual thunks")
the value in prologue_location is no longer ignored.

So reset that value before calling the backend.

2021-05-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>

PR middle-end/100467
* toplev.c (compile_file): Call insn_locations_init before
targetm.asm_out.code_end.

3 years agoDaily bump.
GCC Administrator [Mon, 10 May 2021 00:16:28 +0000 (00:16 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 9 May 2021 00:16:29 +0000 (00:16 +0000)]
Daily bump.

3 years agoCorrect ChangeLob entries for PR46991
Paul Thomas [Sat, 8 May 2021 11:12:48 +0000 (12:12 +0100)]
Correct ChangeLob entries for PR46991

3 years agoFortran: Correct PR number from 46691 [PR46991].
Paul Thomas [Fri, 7 May 2021 18:52:40 +0000 (19:52 +0100)]
Fortran: Correct PR number from 46691 [PR46991].

2021-05-07  Paul Thomas  <pault@gcc.gnu.org>

gcc/testsuite/ChangeLog

PR fortran/46991
* gfortran.dg/class_dummy_7.f90: Correct PR number.

3 years agoRemove obsolete gcc.dg/sso-9.c
Eric Botcazou [Sat, 8 May 2021 07:49:38 +0000 (09:49 +0200)]
Remove obsolete gcc.dg/sso-9.c

gcc/testsuite/
* gcc.dg/sso-9.c: Delete.

3 years agoDaily bump.
GCC Administrator [Sat, 8 May 2021 00:16:27 +0000 (00:16 +0000)]
Daily bump.

3 years agoRevert "amdgcn: disable TImode"
Andrew Stubbs [Fri, 7 May 2021 22:55:35 +0000 (23:55 +0100)]
Revert "amdgcn: disable TImode"

This reverts commit 7af392687952608b988bd5a476583106b3f51740.

3 years agoEnsure emit_move_insn operands are valid
Andrew Stubbs [Fri, 7 May 2021 14:31:05 +0000 (15:31 +0100)]
Ensure emit_move_insn operands are valid

Some architectures are fine with PLUS in move instructions, but others
are not (amdgcn is the motivating example).

2021-05-07  Jakub Jelinek  <jakub@redhat.com>
    Andrew Stubbs  <amd@codesourcery.com>

gcc/ChangeLog:

PR target/100418
* builtins.c (try_store_by_multiple_pieces): Use force_operand for
emit_move_insn operands.

3 years agolibstdc++: Fix constraints for rvalue stream insertion/extraction
Jonathan Wakely [Thu, 6 May 2021 18:14:42 +0000 (19:14 +0100)]
libstdc++: Fix constraints for rvalue stream insertion/extraction

The __rval_streamable() function was an attempt to test for
convertibility cheaply and without confusing diagnostics. It doesn't
work with Clang though, and is probably ill-formed.

Replace that helper function with a check for derivation from ios_base,
and use that in the alias templates __rvalue_stream_insertion_t and
__rvalue_stream_extraction_t. Use concepts for the constraints when
available.

libstdc++-v3/ChangeLog:

* include/std/istream (__rvalue_stream_extraction_t): Replace
use of __rval_streamable.
* include/std/ostream (__rvalue_stream_insertion_t): Likewise.
(__rval_streamable): Remove.
(_Require_derived_from_ios_base, __derived_from_ios_base): New
helper for checking constraints.
* testsuite/27_io/basic_istream/extractors_other/char/4.cc: Fix
reference to the wrong subclause of the standard.
* testsuite/27_io/basic_istream/extractors_other/wchar_t/4.cc:
Likewise.
* testsuite/27_io/basic_ostream/inserters_other/char/6.cc:
Likewise.
* testsuite/27_io/basic_ostream/inserters_other/wchar_t/6.cc:
Likewise.
* testsuite/27_io/basic_ostream/inserters_other/char/99692.cc:
New test.
* testsuite/27_io/filesystem/path/io/dr2989.cc: Adjust pruned
errors.

3 years agoFix incorrect array bounds with -fgnat-encodings=minimal in DWARF
Eric Botcazou [Fri, 7 May 2021 20:52:18 +0000 (22:52 +0200)]
Fix incorrect array bounds with -fgnat-encodings=minimal in DWARF

This makes add_subscript_info query the get_array_descr_info hook for the
actual information when it is defined.

gcc/
* cfgexpand.c (expand_gimple_basic_block): Do not inherit a current
location for the outgoing edges of an empty block.
* dwarf2out.c (add_subscript_info): Retrieve the bounds and index
type by means of the get_array_descr_info langhook, if it is set and
returns true.  Remove obsolete code dealing with unnamed subtypes.
gcc/testsuite/
* gnat.dg/debug18.adb: New test.

3 years agoClean up and virtualize the on-entry cache interface.
Andrew MacLeod [Fri, 7 May 2021 16:03:01 +0000 (12:03 -0400)]
Clean up and virtualize the on-entry cache interface.

Cleanup/Virtualize the ssa_block_range class, and implement the current
vector approach as a derived class.
Allow memory allocation from the irange allocator obstack for easy freeing.

* gimple-range-cache.cc (ssa_block_ranges): Virtualize.
(sbr_vector): Renamed from ssa_block_cache.
(sbr_vector::sbr_vector): Allocate from obstack abd initialize.
(ssa_block_ranges::~ssa_block_ranges): Remove.
(sbr_vector::set_bb_range): Use varying and undefined cached values.
(ssa_block_ranges::set_bb_varying): Remove.
(sbr_vector::get_bb_range): Adjust assert.
(sbr_vector::bb_range_p): Adjust assert.
(~block_range_cache): No freeing loop required.
(block_range_cache::get_block_ranges): Remove.
(block_range_cache::set_bb_range): Inline get_block_ranges.
(block_range_cache::set_bb_varying): Remove.
* gimple-range-cache.h (set_bb_varying): Remove prototype.
* value-range.h (irange_allocator::get_memory): New.

3 years agoWhen searching for non-null, check the dominator tree.
Andrew MacLeod [Tue, 27 Apr 2021 12:44:46 +0000 (08:44 -0400)]
When searching for non-null, check the dominator tree.

The non-null bitmap only indicates which blocks non-null setting occurs.
Generalized queries need to search the dom tree, whereas propagation
engines only need to know the current block.  Add a flag for this purpose.

* gimple-range-cache.cc (non_null_ref::non_null_deref_p): Search
dominator tree is available and requested.
(ranger_cache::ssa_range_in_bb): Don't search dom tree here.
(ranger_cache::fill_block_cache): Don't search dom tree here either.
* gimple-range-cache.h (non_null_deref_p): Add dom_search param.

3 years agoFix range_on_exit for PHI stmts when there are no other stmts in the block.
Andrew MacLeod [Mon, 26 Apr 2021 23:23:25 +0000 (19:23 -0400)]
Fix range_on_exit for PHI stmts when there are no other stmts in the block.

last_stmt(bb) returns NULL for blocks which only have PHI stmts, and
range_on_exit would trigger a cache fill all the way to the top of the
program for the SSA_NAME.

* gimple-range.cc (gimple_ranger::range_on_exit): Handle block with
only PHI nodes better.

3 years agoMake TRUE/FALSE edge calculation available without the outgoing edge class.
Andrew MacLeod [Mon, 26 Apr 2021 22:14:15 +0000 (18:14 -0400)]
Make TRUE/FALSE edge calculation available without the outgoing edge class.

Rename class to gimple_outoging_edge and provide a non-class routine for
the outgoing edge of a gcond.

* gimple-range-edge.h (gimple_outgoing_range): Rename from
outgoing_range.
(gcond_edge_range): Export prototype.
* gimple-range-edge.cc (gcond_edge_range): New.
(gimple_outgoing_range::edge_range_p): Use gcond_edge_range.
* gimple-range-gori.h (gori_compute): Use gimple_outgoing_range.