]> gcc.gnu.org Git - gcc.git/log
gcc.git
12 months agoDarwin,debug : Switch to DWARF 3 or 4 when dsymutil supports it.
Iain Sandoe [Sun, 17 Sep 2023 14:56:07 +0000 (15:56 +0100)]
Darwin,debug : Switch to DWARF 3 or 4 when dsymutil supports it.

The main reason that Darwin has been using DWARF2 only as debug is that
earlier debug linkers (dsymutil) did not support any extensions to this
so that the default "non-strict" mode used in GCC would cause tool errors.

There are two sources for dsymutil, those based off a closed source base
"dwarfutils" and those based off LLVM.

For dsymutil versions based off LLVM-7+ we can use up to DWARF-4, and for
versions based on dwarfutils 121+ we can use DWARF-3.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/ChangeLog:

* config/darwin-protos.h (enum darwin_external_toolchain): New.
* config/darwin.cc (DSYMUTIL_VERSION): New.
(darwin_override_options): Choose the default debug DWARF version
depending on the configured dsymutil version.

12 months agoconfigure, Darwin: Adjust handing of stdlib option.
Iain Sandoe [Sat, 16 Sep 2023 07:40:49 +0000 (08:40 +0100)]
configure, Darwin: Adjust handing of stdlib option.

The intent of the configuration choices for -stdlib is that default
setting should choose reasonable options for the target.  This should
enable -stdlib= for Darwin targets where libc++ is the default on the
system (so that it is only necessary to provide the headers).

However, it seems that there are some cases where (external) config
scripts are using -stdlib (incorrectly) to determine if the compiler
in use is GCC or clang.

In order to allow for these cases, this patch refines the setting
like so:

--with-gxx-libcxx-include-dir= is used to configure the path containing
libc++ headers; it also controls the enabling of the -stdlib option.

We are adding a special value for path:
if --with-gxx-libcxx-include-dir is 'no' we disable the stdlib option.

Otherwise if the --with-gxx-libcxx-include-dir is set we use the path
provided, and enable the stdlib option.

if --with-gxx-libcxx-include-dir is unset
We decide on the stdlib option based on the OS type and revision being
targeted.  The path is set to a fixed position relative to the compiler
install (similar logic to that used for libstdc++ headers).

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/ChangeLog:

* configure: Regenerate.
* configure.ac: Handle explict disable of stdlib option, set
defaults for Darwin.

12 months agoc++: optimize tsubst_template_decl for function templates
Patrick Palka [Mon, 18 Sep 2023 18:27:18 +0000 (14:27 -0400)]
c++: optimize tsubst_template_decl for function templates

r14-2655-g92d1425ca78040 made instantiate_template avoid redundantly
performing a specialization lookup when calling tsubst_decl.  This patch
applies the same optimization to the analagous tsubst_template_decl when
(partially) instantiating a function template.  This allows us to remove
an early exit test from register_specialization since we no longer try
to register the FUNCTION_DECL corresponding to a function template
partial instantiation.

gcc/cp/ChangeLog:

* pt.cc (register_specialization): Remove now-unnecessary
early exit for FUNCTION_DECL partial instantiation.
(tsubst_template_decl): Pass use_spec_table=false to
tsubst_function_decl.  Set DECL_TI_ARGS of a non-lambda
FUNCTION_DECL specialization to the full set of arguments.
Simplify register_specialization call accordingly.

gcc/testsuite/ChangeLog:

* g++.dg/template/nontype12.C: Expect two instead of three
duplicate diagnostics for A<double>::bar() specialization.

12 months agoMATCH: Add simplifications of `(a == CST) & a`
Andrew Pinski [Sat, 16 Sep 2023 03:27:26 +0000 (03:27 +0000)]
MATCH: Add simplifications of `(a == CST) & a`

`(a == CST) & a` can be either simplified to simplying `a == CST`
or 0 depending on the first bit of the CST.
This is an extension of the already pattern of `X & !X` and allows
us to remove the 2 xfails on gcc.dg/binop-notand1a.c and gcc.dg/binop-notand4a.c.

OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

PR tree-optimization/111431

gcc/ChangeLog:

* match.pd (`(a == CST) & a`): New pattern.

gcc/testsuite/ChangeLog:

* gcc.dg/binop-notand1a.c: Remove xfail.
* gcc.dg/binop-notand4a.c: Likewise.
* gcc.c-torture/execute/pr111431-1.c: New test.
* gcc.dg/binop-andeq1.c: New test.
* gcc.dg/binop-andeq2.c: New test.
* gcc.dg/binop-notand7.c: New test.
* gcc.dg/binop-notand7a.c: New test.

12 months agoMove 'g++.dg/abi/nvptx-[...].C' -> 'g++.target/nvptx/abi-[...].C'
Thomas Schwinge [Mon, 18 Sep 2023 14:36:24 +0000 (16:36 +0200)]
Move 'g++.dg/abi/nvptx-[...].C' -> 'g++.target/nvptx/abi-[...].C'

... instead of burying these nvptx-specific test cases within the generic ones.

gcc/testsuite/
* g++.dg/abi/nvptx-nrv1.C: Move...
* g++.target/nvptx/abi-nrv1.C: ... here.
* g++.dg/abi/nvptx-ptrmem1.C: Move...
* g++.target/nvptx/abi-ptrmem1.C: ... here.

12 months agoAdd 'g++.target/nvptx/nvptx.exp' for nvptx-specific C++ test cases
Thomas Schwinge [Mon, 18 Sep 2023 14:35:56 +0000 (16:35 +0200)]
Add 'g++.target/nvptx/nvptx.exp' for nvptx-specific C++ test cases

Like 'gcc.target/nvptx/nvptx.exp' is modeled after 'gcc.dg/dg.exp', this new
'g++.target/nvptx/nvptx.exp' is modeled after 'g++.dg/dg.exp'.

gcc/testsuite/
* g++.target/nvptx/nvptx.exp: New.

12 months agoFix up 'g++.dg/abi/nvptx-ptrmem1.C'
Thomas Schwinge [Mon, 18 Sep 2023 14:34:47 +0000 (16:34 +0200)]
Fix up 'g++.dg/abi/nvptx-ptrmem1.C'

..., which shortly after its inception in
commit 44eba92d0a0594bda5b53fcb3c8f84f164c653b6 (Subversion r231628)
"[PTX] parameters and return values" was forgotten to be updated in next day's
commit 1f0659546bcf5b95c3263cdc73149f6c2a05ebe1 (Subversion r231663)
"[PTX] more register cleanups".  Fix it up now, as obvious, for the current
state of things.

gcc/testsuite/
* g++.dg/abi/nvptx-ptrmem1.C: Fix up.

12 months agolibstdc++: Minor tweak to C++20 status docs
Jonathan Wakely [Mon, 18 Sep 2023 14:19:51 +0000 (15:19 +0100)]
libstdc++: Minor tweak to C++20 status docs

The row for P1466R3 was missing the info on when it was implemented.

libstdc++-v3/ChangeLog:

* doc/xml/manual/status_cxx2020.xml: Tweak P1466R3 status.
* doc/html/manual/status.html: Regenerate.

12 months agolibstdc++: Update C++20 and C++23 status docs
Jonathan Wakely [Sat, 6 May 2023 21:02:51 +0000 (22:02 +0100)]
libstdc++: Update C++20 and C++23 status docs

libstdc++-v3/ChangeLog:

* doc/xml/manual/configure.xml: Use conventional option name.
* doc/xml/manual/status_cxx2020.xml: Update.
* doc/xml/manual/status_cxx2023.xml: Update.
* doc/html/*: Regenerate.

12 months agoRISC-V: Remove redundant vec_duplicate pattern
Juzhe-Zhong [Mon, 18 Sep 2023 12:35:08 +0000 (20:35 +0800)]
RISC-V: Remove redundant vec_duplicate pattern

Currently, VLS and VLA patterns are different.
VLA is define_expand
VLS is define_insn_and_split

It makes no sense that they are different pattern format.
Merge them into same pattern (define_insn_and_split).
It can also be helpful for the future vv -> vx fwprop optimization.

gcc/ChangeLog:

* config/riscv/riscv-selftests.cc (run_broadcast_selftests): Adapt selftests.
* config/riscv/vector.md (@vec_duplicate<mode>): Remove.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/pr111313.c: Adapt test.

12 months agoRISC-V: Fix bogus FAILs of vsetvl testcases
Juzhe-Zhong [Mon, 18 Sep 2023 12:28:54 +0000 (20:28 +0800)]
RISC-V: Fix bogus FAILs of vsetvl testcases

Due the the global codes change which change the CFG cause bogus vsetvl checking FAILs.

Adapt testcases for the global codes change.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/vsetvl/avl_single-21.c: Adapt test.
* gcc.target/riscv/rvv/vsetvl/avl_single-26.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/avl_single-39.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/avl_single-41.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/avl_single-6.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/vlmax_conflict-12.c: Ditto.
* gcc.target/riscv/rvv/vsetvl/vlmax_conflict-3.c: Ditto.

12 months agoRISC-V: Removed misleading comments in testcases
Lehua Ding [Mon, 18 Sep 2023 12:24:26 +0000 (20:24 +0800)]
RISC-V: Removed misleading comments in testcases

This patch removed the misleading comments in testcases since we
support fold min(int, poly) to constant by this patch
(https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629651.html).
Thereby the csrr will not appear inside the assembly code, even if there
is no support for some VLS vector patterns.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/vls/div-1.c: Removed comments.
* gcc.target/riscv/rvv/autovec/vls/shift-3.c: Ditto.

12 months agoAArch64: Improve immediate expansion [PR105928]
Wilco Dijkstra [Wed, 13 Sep 2023 12:21:50 +0000 (13:21 +0100)]
AArch64: Improve immediate expansion [PR105928]

Support immediate expansion of immediates which can be created from 2 MOVKs
and a shifted ORR or BIC instruction.  Change aarch64_split_dimode_const_store
to apply if we save one instruction.

This reduces the number of 4-instruction immediates in SPECINT/FP by 5%.

gcc/ChangeLog:
PR target/105928
* config/aarch64/aarch64.cc (aarch64_internal_mov_immediate)
Add support for immediates using shifted ORR/BIC.
(aarch64_split_dimode_const_store): Apply if we save one instruction.
* config/aarch64/aarch64.md (<LOGICAL:optab>_<SHIFT:optab><mode>3):
Make pattern global.

gcc/testsuite:
PR target/105928
* gcc.target/aarch64/pr105928.c: Add new test.
* gcc.target/aarch64/vect-cse-codegen.c: Fix test.

12 months agoAArch64: List official cores before codenames
Wilco Dijkstra [Wed, 13 Sep 2023 12:16:14 +0000 (13:16 +0100)]
AArch64: List official cores before codenames

List official cores first so that -mcpu=native does not show a codename with
-v or in errors/warnings.

gcc/ChangeLog:
* config/aarch64/aarch64-cores.def (neoverse-n1): Place before ares.
(neoverse-v1): Place before zeus.
(neoverse-v2): Place before demeter.
* config/aarch64/aarch64-tune.md: Regenerate.

12 months agoRISC-V: Add fixed PR111255 testcase by other patch
Lehua Ding [Mon, 18 Sep 2023 12:04:07 +0000 (20:04 +0800)]
RISC-V: Add fixed PR111255 testcase by other patch

This patch add the missed PR111255 testcase which is fixed by this
committed patch (https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628922.html).

PR target/111255

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/vsetvl/pr111255.c: New test.

12 months agoRISC-V: Support VLS reduction
Juzhe-Zhong [Sat, 16 Sep 2023 15:01:30 +0000 (23:01 +0800)]
RISC-V: Support VLS reduction

Notice previous VLS reduction patch is missing some codes which cause multiple ICE:
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c (internal compiler error: in code_for_pred, at ./insn-opinit.h:1560)
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c (internal compiler error: in code_for_pred, at ./insn-opinit.h:1560)
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c (internal compiler error: in code_for_pred, at ./insn-opinit.h:1560)
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c (internal compiler error: in code_for_pred, at ./insn-opinit.h:1560)
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c (internal compiler error: in code_for_pred, at ./insn-opinit.h:1560)
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c (internal compiler error: in code_for_pred, at ./insn-opinit.h:1560)
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c (internal compiler error: in code_for_pred, at ./insn-opinit.h:1560)
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c (internal compiler error: in code_for_pred, at ./insn-opinit.h:1560)
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/vls-vlmax/vec_extract-run.c -std=c99 -O3 -ftree-vectorize --param riscv-autovec-preference=fixed-vlmax (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/vls-vlmax/vec_extract-runu.c -std=c99 -O3 -ftree-vectorize --param riscv-autovec-preference=fixed-vlmax (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/vls-vlmax/vec_set-run.c -std=c99 -O3 -ftree-vectorize --param riscv-autovec-preference=fixed-vlmax (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-1.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredsum\\.vs 22
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-10.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredmax\\.vs 9
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-10.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredmaxu\\.vs 9
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-10.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredmin\\.vs 9
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-10.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredminu\\.vs 9
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-11.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredmax\\.vs 8
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-11.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredmaxu\\.vs 8
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-11.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredmin\\.vs 8
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-11.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredminu\\.vs 8
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-12.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vfredmax\\.vs 10
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-12.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vfredmin\\.vs 10
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-13.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vfredmax\\.vs 9
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-13.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vfredmin\\.vs 9
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-14.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vfredmax\\.vs 8
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-14.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vfredmin\\.vs 8
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-15.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredand\\.vs 22
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-15.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredor\\.vs 22
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-15.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredxor\\.vs 22
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-16.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredand\\.vs 20
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-16.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredor\\.vs 20
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-16.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredxor\\.vs 20
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-17.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredand\\.vs 18
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-17.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredor\\.vs 18
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-17.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredxor\\.vs 18
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-18.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredand\\.vs 16
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-18.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredor\\.vs 16
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-18.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredxor\\.vs 16
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-19.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable (internal compiler error: in code_for_pred, at ./insn-opinit.h:1560)
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-19.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-2.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredsum\\.vs 20
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-20.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable (internal compiler error: in code_for_pred, at ./insn-opinit.h:1560)
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-20.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-21.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable (internal compiler error: in code_for_pred, at ./insn-opinit.h:1560)
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-21.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable (test for excess errors)
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-3.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredsum\\.vs 18
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-4.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredsum\\.vs 16
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-5.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vfredusum\\.vs 10
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-6.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vfredusum\\.vs 9
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-7.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vfredusum\\.vs 8
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-8.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredmax\\.vs 11
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-8.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredmaxu\\.vs 11
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-8.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredmin\\.vs 11
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-8.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredminu\\.vs 11
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-9.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredmax\\.vs 10
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-9.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredmaxu\\.vs 10
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-9.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredmin\\.vs 10
FAIL: gcc.target/riscv/rvv/autovec/vls/reduc-9.c -O3 -ftree-vectorize --param riscv-autovec-preference=scalable  scan-assembler-times vredminu\\.vs 10

Committed.

gcc/ChangeLog:

* config/riscv/autovec.md: Add VLS modes.
* config/riscv/vector-iterators.md: Ditto.
* config/riscv/vector.md: Ditto.

12 months agolibstdc++: Minor update to installation docs
Jonathan Wakely [Mon, 18 Sep 2023 11:14:15 +0000 (12:14 +0100)]
libstdc++: Minor update to installation docs

libstdc++-v3/ChangeLog:

* doc/xml/manual/intro.xml: Clarify that building libstdc++
separately from GCC is not supported.
* doc/xml/manual/prerequisites.xml: Note msgfmt prerequisite for
testing.
* doc/html/manual/setup.html: Regenerate.

12 months agoRISC-V: Fix VSETVL PASS fusion bug
Juzhe-Zhong [Mon, 18 Sep 2023 11:08:25 +0000 (19:08 +0800)]
RISC-V: Fix VSETVL PASS fusion bug

There is an obvious fusion bug that is exposed by more VLS patterns support.
After more VLS modes support, it cause following FAILs:
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c execution test
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c execution test
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c execution test
FAIL: gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c execution test

Demand 1: SEW = 64, LMUL = 1, RATIO = 64, demand SEW, demand GE_SEW.
Demand 2: SEW = 64, LMUL = 2, RATIO = 32, demand SEW, demand GE_SEW, demand RATIO.

Before this patch:
merge demand: SEW = 64, LMUL = 1, RATIO = 32, demand SEW, demand LMUL, demand GE_SEW.
It's obvious incorrect of merge LMUL which should be new LMUL = (demand 2 RATIO * greatest SEW) = M2

gcc/ChangeLog:

* config/riscv/riscv-vsetvl.cc (vlmul_for_greatest_sew_second_ratio): New function.
* config/riscv/riscv-vsetvl.def (DEF_SEW_LMUL_FUSE_RULE): Fix bug.

12 months agoMAINTAINERS: Add myself to write after approval
Fei Gao [Mon, 18 Sep 2023 09:27:55 +0000 (09:27 +0000)]
MAINTAINERS: Add myself to write after approval

Signed-off-by: Fei Gao <gaofei@eswincomputing.com>
ChangeLog:

* MAINTAINERS: Add myself.

12 months agotree-optimization/111294 - backwards threader PHI costing
Richard Biener [Thu, 14 Sep 2023 11:06:51 +0000 (13:06 +0200)]
tree-optimization/111294 - backwards threader PHI costing

This revives an earlier patch since the problematic code applying
extra costs to PHIs in copied blocks we couldn't make any sense of
prevents a required threading in this case.  Instead of coming up
with an artificial other costing the following simply removes the
bits.

As with all threading changes this requires a plethora of testsuite
adjustments, but only the last three are unfortunate as is the
libgomp team.c adjustment which is required to avoid a bogus -Werror
diagnostic during bootstrap.

PR tree-optimization/111294
gcc/
* tree-ssa-threadbackward.cc (back_threader_profitability::m_name):
Remove
(back_threader::find_paths_to_names): Adjust.
(back_threader::maybe_thread_block): Likewise.
(back_threader_profitability::possibly_profitable_path_p): Remove
code applying extra costs to copies PHIs.

libgomp/
* team.c (gomp_team_start): Assert alloca size to avoid false
positive alloc-size diagnostic.

gcc/testsuite/
* gcc.dg/tree-ssa/pr111294.c: New test.
* gcc.dg/tree-ssa/phi_on_compare-4.c: Adjust.
* gcc.dg/tree-ssa/pr59597.c: Likewise.
* gcc.dg/tree-ssa/pr61839_2.c: Likewise.
* gcc.dg/tree-ssa/ssa-sink-18.c: Likewise.
* g++.dg/warn/Wstringop-overflow-4.C: XFAIL subtest on ilp32.
* gcc.dg/uninit-pred-9_b.c: XFAIL subtest everywhere.
* gcc.dg/vect/vect-117.c: Make scan for not Invalid sum
conditional on lp64.

12 months agoRISC-V: Support VLS modes vec_init auto-vectorization
Juzhe-Zhong [Fri, 15 Sep 2023 03:53:08 +0000 (11:53 +0800)]
RISC-V: Support VLS modes vec_init auto-vectorization

There are multiple SLP dump FAILs in vect testsuite.
After analysis, confirm we are missing vec_init for VLS modes.
This patch is not sufficient to fix those FAILs (We need more VLS patterns will send them soon).

This patch is the prerequsite patch for fixing those SLP FAILs.

Finish the whole regression.
Ok for trunk ?

gcc/ChangeLog:

* config/riscv/autovec.md: Extend VLS modes.
* config/riscv/vector.md: Ditto.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/vls/def.h: Add VLS vec_init tests.
* gcc.target/riscv/rvv/autovec/vls/init-1.c: New test.
* gcc.target/riscv/rvv/autovec/vls/init-2.c: New test.
* gcc.target/riscv/rvv/autovec/vls/init-3.c: New test.
* gcc.target/riscv/rvv/autovec/vls/init-4.c: New test.
* gcc.target/riscv/rvv/autovec/vls/init-5.c: New test.
* gcc.target/riscv/rvv/autovec/vls/init-6.c: New test.
* gcc.target/riscv/rvv/autovec/vls/init-7.c: New test.
* gcc.target/riscv/rvv/autovec/vls/repeat-1.c: New test.
* gcc.target/riscv/rvv/autovec/vls/repeat-2.c: New test.
* gcc.target/riscv/rvv/autovec/vls/repeat-3.c: New test.
* gcc.target/riscv/rvv/autovec/vls/repeat-4.c: New test.
* gcc.target/riscv/rvv/autovec/vls/repeat-5.c: New test.
* gcc.target/riscv/rvv/autovec/vls/repeat-6.c: New test.
* gcc.target/riscv/rvv/autovec/vls/repeat-7.c: New test.
* gcc.target/riscv/rvv/autovec/vls/repeat-8.c: New test.
* gcc.target/riscv/rvv/autovec/vls/repeat-9.c: New test.

12 months agoRISC-V: Remove autovec-vls.md file and clean up VLS move modes[NFC]
Juzhe-Zhong [Mon, 18 Sep 2023 07:07:13 +0000 (15:07 +0800)]
RISC-V: Remove autovec-vls.md file and clean up VLS move modes[NFC]

We have largely supportted VLS modes. Only move patterns of VLS modes are
different from VLS patterns. The rest of them are the same.

We always extend the current VLA patterns with VLSmodes:

VI --> V_VLSI
VF --> V_VLSF

It makes no sense to have a separate file holding a very few VLS patterns
that can not be extended from the current VLA patterns.

So remove autovec-vls.md

gcc/ChangeLog:

* config/riscv/vector.md (mov<mode>): New pattern.
(*mov<mode>_mem_to_mem): Ditto.
(*mov<mode>): Ditto.
(@mov<VLS_AVL_REG:mode><P:mode>_lra): Ditto.
(*mov<VLS_AVL_REG:mode><P:mode>_lra): Ditto.
(*mov<mode>_vls): Ditto.
(movmisalign<mode>): Ditto.
(@vec_duplicate<mode>): Ditto.
* config/riscv/autovec-vls.md: Removed.

12 months agoRISC-V: Support VLS modes reduction[PR111153]
Juzhe-Zhong [Sun, 17 Sep 2023 02:05:49 +0000 (10:05 +0800)]
RISC-V: Support VLS modes reduction[PR111153]

This patch supports VLS reduction vectorization.

It can optimize the current reduction vectorization codegen with current COST model.

TYPE __attribute__ ((noinline, noclone)) \
reduc_plus_##TYPE (TYPE * __restrict a, int n) \
{ \
  TYPE r = 0; \
  for (int i = 0; i < n; ++i) \
    r += a[i]; \
  return r; \
}

  T (int32_t) \

TEST_PLUS (DEF_REDUC_PLUS)

Before this patch:

        vle32.v v2,0(a5)
        addi    a5,a5,16
        vadd.vv v1,v1,v2
        bne     a5,a4,.L4
        lui     a4,%hi(.LC0)
        lui     a5,%hi(.LC1)
        addi    a4,a4,%lo(.LC0)
        vlm.v   v0,0(a4)
        addi    a5,a5,%lo(.LC1)
        andi    a1,a1,-4
        vmv1r.v v2,v3
        vlm.v   v4,0(a5)
        vcompress.vm    v2,v1,v0
        vmv1r.v v0,v4
        vadd.vv v1,v2,v1
        vcompress.vm    v3,v1,v0
        vadd.vv v3,v3,v1
        vmv.x.s a0,v3
        sext.w  a0,a0
        beq     a3,a1,.L12

After this patch:

vle32.v v2,0(a5)
addi a5,a5,16
vadd.vv v1,v1,v2
bne a5,a4,.L4
li a5,0
andi a1,a1,-4
vmv.s.x v2,a5
vredsum.vs v1,v1,v2
vmv.x.s a0,v1
beq a3,a1,.L12

PR target/111153

gcc/ChangeLog:

* config/riscv/autovec.md: Add VLS modes.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/vls/def.h: Add VLS mode reduction case.
* gcc.target/riscv/rvv/autovec/vls/reduc-1.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-10.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-11.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-12.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-13.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-14.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-15.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-16.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-17.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-18.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-19.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-2.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-20.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-21.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-3.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-4.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-5.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-6.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-7.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-8.c: New test.
* gcc.target/riscv/rvv/autovec/vls/reduc-9.c: New test.

12 months agodoc: GTY((cache)) documentation tweak
Jason Merrill [Fri, 8 Sep 2023 15:27:26 +0000 (11:27 -0400)]
doc: GTY((cache)) documentation tweak

gcc/ChangeLog:

* doc/gty.texi: Add discussion of cache vs. deletable.

12 months agoc++: overlapping subobjects tweak
Jason Merrill [Tue, 12 Sep 2023 16:15:13 +0000 (12:15 -0400)]
c++: overlapping subobjects tweak

The ABI is settling on "similar" for this rule.

gcc/cp/ChangeLog:

* class.cc (check_subobject_offset): Use similar_type_p.

12 months agoRISC-V: Remove redundant codes of VLS patterns[NFC]
Juzhe-Zhong [Mon, 18 Sep 2023 02:51:56 +0000 (10:51 +0800)]
RISC-V: Remove redundant codes of VLS patterns[NFC]

Consider those VLS patterns are the same VLA patterns.
Now extend VI -> V_VLSI and VF -> V_VLSF.
Then remove the redundant codes of VLS patterns.

gcc/ChangeLog:

* config/riscv/autovec-vls.md (<optab><mode>3): Deleted.
(copysign<mode>3): Ditto.
(xorsign<mode>3): Ditto.
(<optab><mode>2): Ditto.
* config/riscv/autovec.md: Extend VLS modes.

12 months agouse local range for one more pattern in match.pd
Jiufu Guo [Wed, 13 Sep 2023 08:12:05 +0000 (16:12 +0800)]
use local range for one more pattern in match.pd

For "get_global_range_query" SSA_NAME_RANGE_INFO can be queried.
For "get_range_query", it could get more context-aware range info.
And look at the implementation of "get_range_query",  it returns
global range if no local fun info.

ATTRIBUTE_RETURNS_NONNULL inline range_query *
get_range_query (const struct function *fun)
{
  return (fun && fun->x_range_query) ? fun->x_range_query : &global_ranges;
}

So, using "get_range_query" would cover more case.
For example, the test case of "pr111303.c".

PR middle-end/111303

gcc/ChangeLog:

* match.pd ((t * 2) / 2): Update pattern.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/pr111303.c: New test.

12 months agoDaily bump.
GCC Administrator [Mon, 18 Sep 2023 00:17:30 +0000 (00:17 +0000)]
Daily bump.

12 months agoRemove xfail from gcc.dg/tree-ssa/20040204-1.c
Andrew Pinski [Sun, 17 Sep 2023 21:41:01 +0000 (21:41 +0000)]
Remove xfail from gcc.dg/tree-ssa/20040204-1.c

So the xfail was there because at one point the difference
from having logical-op-non-short-circuit set to 1 or 0 made a
difference in being able to optimizing a conditional way.
This has not been true for over 10 years in this case so
instead of keeping on adding to the xfail list, removing it
is the right thing to do.

Committed as obvious after a test on x86_64-linux-gnu.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/20040204-1.c: Remove xfail.

12 months agors6000: unnecessary clear after vctzlsbb in vec_first_match_or_eos_index
Ajit Kumar Agarwal [Sun, 17 Sep 2023 17:27:10 +0000 (12:27 -0500)]
rs6000: unnecessary clear after vctzlsbb in vec_first_match_or_eos_index

For rs6000 target we dont need zero_extend after vctzlsbb as vctzlsbb
already zero extend.

2023-09-17  Ajit Kumar Agarwal  <aagarwa1@linux.ibm.com>

gcc/ChangeLog:

* config/rs6000/vsx.md (*vctzlsbb_zext_<mode>): New define_insn.

gcc/testsuite/ChangeLog:

* g++.target/powerpc/altivec-19.C: New testcase.

12 months agoDaily bump.
GCC Administrator [Sun, 17 Sep 2023 00:18:33 +0000 (00:18 +0000)]
Daily bump.

12 months agoRISC-V: Expand VLS mode to scalar mode move[PR111391]
Juzhe-Zhong [Thu, 14 Sep 2023 10:49:52 +0000 (18:49 +0800)]
RISC-V: Expand VLS mode to scalar mode move[PR111391]

This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111391

PR target/111391

gcc/ChangeLog:

* config/riscv/autovec.md (@vec_extract<mode><vel>): Remove @.
(vec_extract<mode><vel>): Ditto.
* config/riscv/riscv-vsetvl.cc (emit_vsetvl_insn): Fix bug.
(pass_vsetvl::local_eliminate_vsetvl_insn): Fix bug.
* config/riscv/riscv.cc (riscv_legitimize_move): Expand VLS mode to scalar mode move.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/partial/slp-9.c: Adapt test.
* gcc.target/riscv/rvv/autovec/pr111391-1.c: New test.
* gcc.target/riscv/rvv/autovec/pr111391-2.c: New test.

12 months agoRISC-V: Make SHA-256, SM3 and SM4 builtins operate on uint32_t
Tsukasa OI [Thu, 7 Sep 2023 07:39:33 +0000 (07:39 +0000)]
RISC-V: Make SHA-256, SM3 and SM4 builtins operate on uint32_t

This is in parity with the LLVM commit a64b3e92c7cb ("[RISCV] Re-define
sha256, Zksed, and Zksh intrinsics to use i32 types.").

SHA-256, SM3 and SM4 instructions operate on 32-bit integers and upper
32-bits have no effects on RV64 (the output is sign-extended from the
original 32-bit value).  In that sense, making those intrinsics only
operate on uint32_t is much more natural than XLEN-bits wide integers.

This commit reforms instructions and expansions based on 32-bit
instruction handling on RV64 (such as ADDW).

Before:
   riscv_<op>_si: For RV32, fully operate on uint32_t
   riscv_<op>_di: For RV64, fully operate on uint64_t
After:
  *riscv_<op>_si: For RV32, fully operate on uint32_t
   riscv_<op>_di_extended:
                  For RV64.  Input is uint32_t and output is int64_t,
                  sign-extended from the int32_t result
                  (represents a part of <op> behavior).
   riscv_<op>_si: Common (fully operate on uint32_t).
                  On RV32, "expands" to *riscv_<op>_si.
                  On RV64, initially expands to riscv_<op>_di_extended *and*
                  extracts lower 32-bits from the int64_t result.

It also refines definitions of SHA-256, SM3 and SM4 intrinsics.

gcc/ChangeLog:

* config/riscv/crypto.md (riscv_sha256sig0_<mode>,
riscv_sha256sig1_<mode>, riscv_sha256sum0_<mode>,
riscv_sha256sum1_<mode>, riscv_sm3p0_<mode>, riscv_sm3p1_<mode>,
riscv_sm4ed_<mode>, riscv_sm4ks_<mode>): Remove and replace with
new insn/expansions.
(SHA256_OP, SM3_OP, SM4_OP): New iterators.
(sha256_op, sm3_op, sm4_op): New attributes for iteration.
(*riscv_<sha256_op>_si): New raw instruction for RV32.
(*riscv_<sm3_op>_si): Ditto.
(*riscv_<sm4_op>_si): Ditto.
(riscv_<sha256_op>_di_extended): New base instruction for RV64.
(riscv_<sm3_op>_di_extended): Ditto.
(riscv_<sm4_op>_di_extended): Ditto.
(riscv_<sha256_op>_si): New common instruction expansion.
(riscv_<sm3_op>_si): Ditto.
(riscv_<sm4_op>_si): Ditto.
* config/riscv/riscv-builtins.cc: Add availability "crypto_zknh",
"crypto_zksh" and "crypto_zksed".  Remove availability
"crypto_zksh{32,64}" and "crypto_zksed{32,64}".
* config/riscv/riscv-ftypes.def: Remove unused function type.
* config/riscv/riscv-scalar-crypto.def: Make SHA-256, SM3 and SM4
intrinsics to operate on uint32_t.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/zknh-sha256.c: Moved to...
* gcc.target/riscv/zknh-sha256-64.c: ...here.  Test RV64.
* gcc.target/riscv/zknh-sha256-32.c: New test for RV32.
* gcc.target/riscv/zksh64.c: Change the type.
* gcc.target/riscv/zksed64.c: Ditto.

12 months agoRISC-V: Make bit manipulation value / round number and shift amount types for builtin...
Tsukasa OI [Wed, 6 Sep 2023 06:28:39 +0000 (06:28 +0000)]
RISC-V: Make bit manipulation value / round number and shift amount types for builtins unsigned

For bit manipulation operations, input(s) and the manipulated output are
better to be unsigned like other target-independent builtins like
__builtin_bswap32 and __builtin_popcount.

Although this is not completely compatible as before (as the type changes),
most code will run normally, even without warnings (with -Wall -Wextra).

To make consistent to the LLVM commit 599421ae36c3 ("[RISCV] Use unsigned
instead of signed types for Zk* and Zb* builtins."), round numbers and
shift amount on the scalar crypto instructions are also changed
to unsigned.

gcc/ChangeLog:

* config/riscv/riscv-builtins.cc (RISCV_ATYPE_UQI): New for
uint8_t.  (RISCV_ATYPE_UHI): New for uint16_t.
(RISCV_ATYPE_QI, RISCV_ATYPE_HI, RISCV_ATYPE_SI, RISCV_ATYPE_DI):
Removed as no longer used.
(RISCV_ATYPE_UDI): New for uint64_t.
* config/riscv/riscv-cmo.def: Make types unsigned for not working
"zicbop_cbo_prefetchi" and working bit manipulation clmul builtin
argument/return types.
* config/riscv/riscv-ftypes.def: Make bit manipulation, round
number and shift amount types unsigned.
* config/riscv/riscv-scalar-crypto.def: Ditto.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/zbc32.c: Make signed type to unsigned.
* gcc.target/riscv/zbc64.c: Ditto.
* gcc.target/riscv/zbkb32.c: Ditto.
* gcc.target/riscv/zbkb64.c: Ditto.
* gcc.target/riscv/zbkc32.c: Ditto.
* gcc.target/riscv/zbkc64.c: Ditto.
* gcc.target/riscv/zbkx32.c: Ditto.
* gcc.target/riscv/zbkx64.c: Ditto.
* gcc.target/riscv/zknd32.c: Ditto.
* gcc.target/riscv/zknd64.c: Ditto.
* gcc.target/riscv/zkne32.c: Ditto.
* gcc.target/riscv/zkne64.c: Ditto.
* gcc.target/riscv/zknh-sha256.c: Ditto.
* gcc.target/riscv/zknh-sha512-32.c: Ditto.
* gcc.target/riscv/zknh-sha512-64.c: Ditto.
* gcc.target/riscv/zksed32.c: Ditto.
* gcc.target/riscv/zksed64.c: Ditto.
* gcc.target/riscv/zksh32.c: Ditto.
* gcc.target/riscv/zksh64.c: Ditto.

12 months agoRISC-V: Support FP SGNJX autovec for VLS mode
Pan Li [Fri, 15 Sep 2023 12:57:20 +0000 (20:57 +0800)]
RISC-V: Support FP SGNJX autovec for VLS mode

This patch would like to allow the VLS mode autovec for the
floating-point binary operation SGNJX.

Give sample code as below:

void
test (float * restrict out, float * restrict in1, float * restrict in2)
{
  for (int i = 0; i < 128; i++)
    out[i] = in1[i] * copysignf (1.0, in2[i]);
}

Before this patch:
test:
  li      a5,128
  vsetvli zero,a5,e32,m1,ta,ma
  vle32.v v2,0(a1)
  lui     a4,%hi(.LC0)
  flw     fa5,%lo(.LC0)(a4)
  vfmv.v.f        v1,fa5
  vle32.v v3,0(a2)
  vfsgnj.vv       v1,v1,v3
  vfmul.vv        v1,v1,v2
  vse32.v v1,0(a0)
  ret

After this patch:
test:
  li      a5,128
  vsetvli zero,a5,e32,m1,ta,ma
  vle32.v v1,0(a1)
  vle32.v v2,0(a2)
  vfsgnjx.vv      v1,v1,v2
  vse32.v v1,0(a0)
  ret

This SGNJX autovec acts on function call copysignf/copysignf
in math.h too. And it depends on the option -ffast-math.

gcc/ChangeLog:

* config/riscv/autovec-vls.md (xorsign<mode>3): New pattern.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/vls/def.h: New macro.
* gcc.target/riscv/rvv/autovec/vls/floating-point-sgnjx-1.c: New test.
* gcc.target/riscv/rvv/autovec/vls/floating-point-sgnjx-2.c: New test.

Signed-off-by: Pan Li <pan2.li@intel.com>
12 months agoDaily bump.
GCC Administrator [Sat, 16 Sep 2023 00:17:55 +0000 (00:17 +0000)]
Daily bump.

12 months agolibstdc++: Do not require effective target pthread for some tests
Jonathan Wakely [Fri, 15 Sep 2023 13:49:36 +0000 (14:49 +0100)]
libstdc++: Do not require effective target pthread for some tests

We can remove { dg-require-effective-target pthread } and allow these
tests non-pthread targets and conditionally adding -pthread only for
pthread targets.

Also remove the { dg-options "-std=gnu++20" } that is no longer needed.

libstdc++-v3/ChangeLog:

* testsuite/29_atomics/atomic_ref/wait_notify.cc: Do not
restrict to pthreads targets.
* testsuite/30_threads/jthread/3.cc: Likewise.
* testsuite/30_threads/semaphore/100806.cc: Likewise.
* testsuite/30_threads/semaphore/try_acquire.cc: Likewise.
* testsuite/30_threads/semaphore/try_acquire_for.cc: Likewise.
* testsuite/30_threads/semaphore/try_acquire_posix.cc: Likewise.

12 months agolibstdc++: Remove dg-options "-std=gnu++20" from remaining tests
Jonathan Wakely [Fri, 15 Sep 2023 13:27:56 +0000 (14:27 +0100)]
libstdc++: Remove dg-options "-std=gnu++20" from remaining tests

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

* testsuite/18_support/coroutines/95917.cc: Remove dg-options
-std=gnu++2a.
* testsuite/18_support/coroutines/hash.cc: Likewise.
* testsuite/18_support/coroutines/lwg3460.cc: Likewise.
* testsuite/18_support/destroying_delete.cc: Likewise.
* testsuite/18_support/source_location/1.cc: Likewise.
* testsuite/18_support/source_location/consteval.cc: Likewise.
* testsuite/18_support/source_location/version.cc: Likewise.
* testsuite/19_diagnostics/error_category/operators/three_way.cc:
Likewise.
* testsuite/19_diagnostics/error_code/operators/three_way.cc:
Likewise.
* testsuite/19_diagnostics/error_condition/operators/three_way.cc:
Likewise.
* testsuite/19_diagnostics/stacktrace/output.cc: Likewise.
* testsuite/26_numerics/adjacent_difference/lwg2055.cc:
Likewise.
* testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
* testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
* testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
* testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc:
Likewise.
* testsuite/28_regex/iterators/regex_iterator/lwg3719.cc:
Likewise.
* testsuite/28_regex/iterators/regex_token_iterator/lwg3719.cc:
Likewise.
* testsuite/28_regex/sub_match/compare_c++20.cc: Likewise.
* testsuite/experimental/filesystem/iterators/106201.cc:
Likewise.
* testsuite/experimental/scopeguard/exit.cc: Likewise.
* testsuite/experimental/scopeguard/uniqueres.cc: Likewise.

12 months agolibstdc++: Remove dg-options "-std=gnu++20" from 30_threads tests
Jonathan Wakely [Fri, 15 Sep 2023 13:27:56 +0000 (14:27 +0100)]
libstdc++: Remove dg-options "-std=gnu++20" from 30_threads tests

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

* testsuite/30_threads/barrier/1.cc: Remove dg-options
-std=gnu++20.
* testsuite/30_threads/barrier/2.cc: Likewise.
* testsuite/30_threads/barrier/arrive.cc: Likewise.
* testsuite/30_threads/barrier/arrive_and_drop.cc: Likewise.
* testsuite/30_threads/barrier/arrive_and_wait.cc: Likewise.
* testsuite/30_threads/barrier/completion.cc: Likewise.
* testsuite/30_threads/condition_variable/members/clock_neg.cc:
Likewise.
* testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
Likewise.
* testsuite/30_threads/condition_variable_any/stop_token/1.cc:
Likewise.
* testsuite/30_threads/condition_variable_any/stop_token/2.cc:
Likewise.
* testsuite/30_threads/future/members/clock_neg.cc: Likewise.
* testsuite/30_threads/headers/stop_token/synopsis.cc: Likewise.
* testsuite/30_threads/headers/thread/types_std_c++20.cc:
Likewise.
* testsuite/30_threads/jthread/1.cc: Likewise.
* testsuite/30_threads/jthread/100612.cc: Likewise.
* testsuite/30_threads/jthread/95989.cc: Likewise.
* testsuite/30_threads/jthread/jthread.cc: Likewise.
* testsuite/30_threads/jthread/version.cc: Likewise.
* testsuite/30_threads/latch/1.cc: Likewise.
* testsuite/30_threads/latch/2.cc: Likewise.
* testsuite/30_threads/latch/3.cc: Likewise.
* testsuite/30_threads/recursive_timed_mutex/try_lock_until/clock_neg.cc:
Likewise.
* testsuite/30_threads/semaphore/1.cc: Likewise.
* testsuite/30_threads/semaphore/2.cc: Likewise.
* testsuite/30_threads/semaphore/least_max_value_neg.cc:
Likewise.
* testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise.
* testsuite/30_threads/shared_future/members/clock_neg.cc:
Likewise.
* testsuite/30_threads/shared_lock/locking/clock_neg.cc:
Likewise.
* testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
Likewise.
* testsuite/30_threads/stop_token/1.cc: Likewise.
* testsuite/30_threads/stop_token/2.cc: Likewise.
* testsuite/30_threads/stop_token/stop_callback.cc: Likewise.
* testsuite/30_threads/stop_token/stop_callback/deadlock.cc:
Likewise.
* testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
Likewise.
* testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc:
Likewise.
* testsuite/30_threads/stop_token/stop_callback/invoke.cc:
Likewise.
* testsuite/30_threads/stop_token/stop_source.cc: Likewise.
* testsuite/30_threads/stop_token/stop_source/assign.cc:
Likewise.
* testsuite/30_threads/stop_token/stop_token.cc: Likewise.
* testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
Likewise.
* testsuite/30_threads/thread/id/operators_c++20.cc: Likewise.
* testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc:
Likewise.
* testsuite/30_threads/unique_lock/locking/clock_neg.cc:
Likewise.

12 months agolibstdc++: Remove dg-options "-std=gnu++20" from 27_io tests
Jonathan Wakely [Fri, 15 Sep 2023 13:27:56 +0000 (14:27 +0100)]
libstdc++: Remove dg-options "-std=gnu++20" from 27_io tests

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

* testsuite/27_io/basic_istream/extractors_character/char/lwg2499.cc:
Remove dg-options -std=gnu++2a.
* testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
Likewise.
* testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
Likewise.
* testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
Likewise.
* testsuite/27_io/basic_istringstream/cons/char/1.cc: Likewise.
* testsuite/27_io/basic_istringstream/cons/wchar_t/1.cc:
Likewise.
* testsuite/27_io/basic_istringstream/str/char/2.cc: Likewise.
* testsuite/27_io/basic_istringstream/str/wchar_t/2.cc:
Likewise.
* testsuite/27_io/basic_istringstream/view/char/1.cc: Likewise.
* testsuite/27_io/basic_istringstream/view/wchar_t/1.cc:
Likewise.
* testsuite/27_io/basic_ostream/emit/1.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_character/char/deleted.cc:
Likewise.
* testsuite/27_io/basic_ostream/inserters_character/wchar_t/deleted.cc:
Likewise.
* testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
* testsuite/27_io/basic_ostringstream/cons/wchar_t/1.cc:
Likewise.
* testsuite/27_io/basic_ostringstream/str/char/3.cc: Likewise.
* testsuite/27_io/basic_ostringstream/str/wchar_t/3.cc:
Likewise.
* testsuite/27_io/basic_ostringstream/view/char/1.cc: Likewise.
* testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc:
Likewise.
* testsuite/27_io/basic_stringbuf/cons/char/2.cc: Likewise.
* testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc: Likewise.
* testsuite/27_io/basic_stringbuf/str/char/4.cc: Likewise.
* testsuite/27_io/basic_stringbuf/str/wchar_t/4.cc: Likewise.
* testsuite/27_io/basic_stringbuf/view/char/1.cc: Likewise.
* testsuite/27_io/basic_stringbuf/view/wchar_t/1.cc: Likewise.
* testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
* testsuite/27_io/basic_stringstream/cons/char/97719.cc:
Likewise.
* testsuite/27_io/basic_stringstream/cons/wchar_t/1.cc:
Likewise.
* testsuite/27_io/basic_stringstream/str/char/5.cc: Likewise.
* testsuite/27_io/basic_stringstream/str/wchar_t/5.cc.cc:
Likewise.
* testsuite/27_io/basic_stringstream/view/char/1.cc: Likewise.
* testsuite/27_io/basic_stringstream/view/wchar_t/1.cc:
Likewise.
* testsuite/27_io/basic_syncbuf/1.cc: Likewise.
* testsuite/27_io/basic_syncbuf/2.cc: Likewise.
* testsuite/27_io/basic_syncbuf/basic_ops/1.cc: Likewise.
* testsuite/27_io/basic_syncbuf/requirements/types.cc: Likewise.
* testsuite/27_io/basic_syncbuf/sync_ops/1.cc: Likewise.
* testsuite/27_io/basic_syncstream/1.cc: Likewise.
* testsuite/27_io/basic_syncstream/2.cc: Likewise.
* testsuite/27_io/basic_syncstream/basic_ops/1.cc: Likewise.
* testsuite/27_io/basic_syncstream/requirements/types.cc:
Likewise.
* testsuite/27_io/filesystem/iterators/106201.cc: Likewise.
* testsuite/27_io/filesystem/iterators/lwg3719.cc: Likewise.
* testsuite/27_io/filesystem/path/factory/u8path-depr.cc:
Likewise.
* testsuite/27_io/filesystem/path/nonmember/cmp_c++20.cc:
Likewise.

12 months agolibstdc++: Remove dg-options "-std=gnu++20" from 26_numerics tests
Jonathan Wakely [Fri, 15 Sep 2023 13:27:56 +0000 (14:27 +0100)]
libstdc++: Remove dg-options "-std=gnu++20" from 26_numerics tests

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

* testsuite/26_numerics/accumulate/constexpr.cc: Remove
dg-options -std=gnu++2a.
* testsuite/26_numerics/accumulate/lwg2055.cc: Likewise.
* testsuite/26_numerics/adjacent_difference/constexpr.cc:
Likewise.
* testsuite/26_numerics/bit/bit.cast/105027.cc: Likewise.
* testsuite/26_numerics/bit/bit.cast/bit_cast.cc: Likewise.
* testsuite/26_numerics/bit/bit.cast/version.cc: Likewise.
* testsuite/26_numerics/bit/bit.count/countl_one.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc:
Likewise.
* testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/lwg3656.cc: Likewise.
* testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
* testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
* testsuite/26_numerics/bit/header-2.cc: Likewise.
* testsuite/26_numerics/bit/header.cc: Likewise.
* testsuite/26_numerics/complex/1.cc: Likewise.
* testsuite/26_numerics/complex/2.cc: Likewise.
* testsuite/26_numerics/complex/comparison_operators/more_constexpr.cc:
Likewise.
* testsuite/26_numerics/complex/operators/more_constexpr.cc:
Likewise.
* testsuite/26_numerics/complex/requirements/more_constexpr.cc:
Likewise.
* testsuite/26_numerics/complex/value_operations/more_constexpr.cc:
Likewise.
* testsuite/26_numerics/endian/1.cc: Likewise.
* testsuite/26_numerics/endian/2.cc: Likewise.
* testsuite/26_numerics/endian/3.cc: Likewise.
* testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
* testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
* testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
* testsuite/26_numerics/inner_product/lwg2055.cc: Likewise.
* testsuite/26_numerics/iota/constexpr.cc: Likewise.
* testsuite/26_numerics/lerp/1.cc: Likewise.
* testsuite/26_numerics/lerp/constexpr.cc: Likewise.
* testsuite/26_numerics/lerp/version.cc: Likewise.
* testsuite/26_numerics/midpoint/floating.cc: Likewise.
* testsuite/26_numerics/midpoint/integral.cc: Likewise.
* testsuite/26_numerics/midpoint/pointer.cc: Likewise.
* testsuite/26_numerics/midpoint/pointer_neg.cc: Likewise.
* testsuite/26_numerics/midpoint/version.cc: Likewise.
* testsuite/26_numerics/numbers/1.cc: Likewise.
* testsuite/26_numerics/numbers/2.cc: Likewise.
* testsuite/26_numerics/numbers/3.cc: Likewise.
* testsuite/26_numerics/numbers/float128.cc: Likewise.
* testsuite/26_numerics/numbers/nonfloat_neg.cc: Likewise.
* testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
* testsuite/26_numerics/partial_sum/lwg2055.cc: Likewise.
* testsuite/26_numerics/random/concept.cc: Likewise.
* testsuite/26_numerics/reduce/constexpr.cc: Likewise.
* testsuite/26_numerics/slice/compare.cc: Likewise.
* testsuite/26_numerics/transform_exclusive_scan/constexpr.cc:
Likewise.
* testsuite/26_numerics/transform_inclusive_scan/constexpr.cc:
Likewise.
* testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.

12 months agolibstdc++: Remove dg-options "-std=gnu++20" from 24_iterators tests
Jonathan Wakely [Fri, 15 Sep 2023 13:27:56 +0000 (14:27 +0100)]
libstdc++: Remove dg-options "-std=gnu++20" from 24_iterators tests

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

* testsuite/24_iterators/aliases.cc: Remove dg-options
-std=gnu++2a.
* testsuite/24_iterators/associated_types/incrementable.traits.cc:
Likewise.
* testsuite/24_iterators/associated_types/iterator.traits.cc:
Likewise.
* testsuite/24_iterators/associated_types/readable.traits.cc:
Likewise.
* testsuite/24_iterators/back_insert_iterator/constexpr.cc:
Likewise.
* testsuite/24_iterators/back_insert_iterator/pr93884.cc:
Likewise.
* testsuite/24_iterators/bidirectional/concept.cc: Likewise.
* testsuite/24_iterators/common_iterator/1.cc: Likewise.
* testsuite/24_iterators/common_iterator/100823.cc: Likewise.
* testsuite/24_iterators/common_iterator/2.cc: Likewise.
* testsuite/24_iterators/contiguous/concept.cc: Likewise.
* testsuite/24_iterators/contiguous/tag.cc: Likewise.
* testsuite/24_iterators/counted_iterator/1.cc: Likewise.
* testsuite/24_iterators/counted_iterator/lwg3389.cc: Likewise.
* testsuite/24_iterators/counted_iterator/lwg3643.cc: Likewise.
* testsuite/24_iterators/customization_points/92894.cc:
Likewise.
* testsuite/24_iterators/customization_points/iter_move.cc:
Likewise.
* testsuite/24_iterators/customization_points/iter_swap.cc:
Likewise.
* testsuite/24_iterators/customization_points/lwg3420.cc:
Likewise.
* testsuite/24_iterators/forward/concept.cc: Likewise.
* testsuite/24_iterators/front_insert_iterator/constexpr.cc:
Likewise.
* testsuite/24_iterators/front_insert_iterator/pr93884.cc:
Likewise.
* testsuite/24_iterators/headers/iterator/synopsis_c++20.cc:
Likewise.
* testsuite/24_iterators/indirect_callable/92894.cc: Likewise.
* testsuite/24_iterators/indirect_callable/projected-adl.cc:
Likewise.
* testsuite/24_iterators/indirect_callable/projected.cc:
Likewise.
* testsuite/24_iterators/input/concept.cc: Likewise.
* testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise.
* testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
Likewise.
* testsuite/24_iterators/istream_iterator/sentinel.cc: Likewise.
* testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
Likewise.
* testsuite/24_iterators/istreambuf_iterator/sentinel.cc:
Likewise.
* testsuite/24_iterators/move_iterator/cust.cc: Likewise.
* testsuite/24_iterators/move_iterator/dr3435.cc: Likewise.
* testsuite/24_iterators/move_iterator/input_iterator.cc:
Likewise.
* testsuite/24_iterators/move_iterator/lwg3390.cc: Likewise.
* testsuite/24_iterators/move_iterator/lwg3391.cc: Likewise.
* testsuite/24_iterators/move_iterator/move_only.cc: Likewise.
* testsuite/24_iterators/move_iterator/p2520r0.cc: Likewise.
* testsuite/24_iterators/move_iterator/rel_ops_c++20.cc:
Likewise.
* testsuite/24_iterators/move_iterator/sentinel.cc: Likewise.
* testsuite/24_iterators/normal_iterator/cmp_c++20.cc: Likewise.
* testsuite/24_iterators/output/concept.cc: Likewise.
* testsuite/24_iterators/random_access/concept.cc: Likewise.
* testsuite/24_iterators/range_access/range_access_cpp20.cc:
Likewise.
* testsuite/24_iterators/range_access/range_access_cpp20_neg.cc:
Likewise.
* testsuite/24_iterators/range_operations/100768.cc: Likewise.
* testsuite/24_iterators/range_operations/advance.cc: Likewise.
* testsuite/24_iterators/range_operations/advance_overflow.cc:
Likewise.
* testsuite/24_iterators/range_operations/distance.cc: Likewise.
* testsuite/24_iterators/range_operations/lwg3392.cc: Likewise.
* testsuite/24_iterators/range_operations/next.cc: Likewise.
* testsuite/24_iterators/range_operations/prev.cc: Likewise.
* testsuite/24_iterators/reverse_iterator/cust.cc: Likewise.
* testsuite/24_iterators/reverse_iterator/dr3435.cc: Likewise.
* testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc:
Likewise.

12 months agolibstdc++: Remove dg-options "-std=gnu++20" from 23_containers tests
Jonathan Wakely [Fri, 15 Sep 2023 13:27:56 +0000 (14:27 +0100)]
libstdc++: Remove dg-options "-std=gnu++20" from 23_containers tests

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

* testsuite/23_containers/array/comparison_operators/96851.cc:
Remove dg-options -std=gnu++2a.
* testsuite/23_containers/array/comparison_operators/constexpr.cc:
Likewise.
* testsuite/23_containers/array/creation/1.cc: Likewise.
* testsuite/23_containers/array/creation/110167.cc: Likewise.
* testsuite/23_containers/array/creation/2.cc: Likewise.
* testsuite/23_containers/array/creation/3_neg.cc: Likewise.
* testsuite/23_containers/array/requirements/constexpr_fill.cc:
Likewise.
* testsuite/23_containers/array/requirements/constexpr_swap.cc:
Likewise.
* testsuite/23_containers/deque/48101-3_neg.cc: Likewise.
* testsuite/23_containers/deque/erasure.cc: Likewise.
* testsuite/23_containers/deque/modifiers/emplace/92878_92947.cc:
Likewise.
* testsuite/23_containers/deque/operators/cmp_c++20.cc:
Likewise.
* testsuite/23_containers/forward_list/48101-3_neg.cc: Likewise.
* testsuite/23_containers/forward_list/cmp_c++20.cc: Likewise.
* testsuite/23_containers/forward_list/erasure.cc: Likewise.
* testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
Likewise.
* testsuite/23_containers/forward_list/operations/remove_cxx20_return.cc:
Likewise.
* testsuite/23_containers/forward_list/operations/unique_cxx20_return.cc:
Likewise.
* testsuite/23_containers/list/48101-3_neg.cc: Likewise.
* testsuite/23_containers/list/cmp_c++20.cc: Likewise.
* testsuite/23_containers/list/erasure.cc: Likewise.
* testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
Likewise.
* testsuite/23_containers/list/operations/remove_cxx20_return.cc:
Likewise.
* testsuite/23_containers/list/operations/unique_cxx20_return.cc:
Likewise.
* testsuite/23_containers/map/48101-3_neg.cc: Likewise.
* testsuite/23_containers/map/erasure.cc: Likewise.
* testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
Likewise.
* testsuite/23_containers/map/operations/contains.cc: Likewise.
* testsuite/23_containers/map/operators/cmp_c++20.cc: Likewise.
* testsuite/23_containers/multimap/48101-3_neg.cc: Likewise.
* testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
Likewise.
* testsuite/23_containers/multimap/operations/contains.cc:
Likewise.
* testsuite/23_containers/multimap/operators/cmp_c++20.cc:
Likewise.
* testsuite/23_containers/multiset/48101-3_neg.cc: Likewise.
* testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
Likewise.
* testsuite/23_containers/multiset/operations/contains.cc:
Likewise.
* testsuite/23_containers/multiset/operators/cmp_c++20.cc:
Likewise.
* testsuite/23_containers/priority_queue/92878_92947.cc:
Likewise.
* testsuite/23_containers/queue/92878_92947.cc: Likewise.
* testsuite/23_containers/queue/cmp_c++20.cc: Likewise.
* testsuite/23_containers/set/48101-3_neg.cc: Likewise.
* testsuite/23_containers/set/erasure.cc: Likewise.
* testsuite/23_containers/set/modifiers/emplace/92878_92947.cc:
Likewise.
* testsuite/23_containers/set/operations/contains.cc: Likewise.
* testsuite/23_containers/set/operators/cmp_c++20.cc: Likewise.
* testsuite/23_containers/span/1.cc: Likewise.
* testsuite/23_containers/span/101411.cc: Likewise.
* testsuite/23_containers/span/2.cc: Likewise.
* testsuite/23_containers/span/deduction.cc: Likewise.
* testsuite/23_containers/span/explicit.cc: Likewise.
* testsuite/23_containers/span/layout_compat.cc: Likewise.
* testsuite/23_containers/span/lwg3255.cc: Likewise.
* testsuite/23_containers/span/nothrow_cons.cc: Likewise.
* testsuite/23_containers/span/trivially_copyable.cc: Likewise.
* testsuite/23_containers/stack/92878_92947.cc: Likewise.
* testsuite/23_containers/stack/cmp_c++20.cc: Likewise.
* testsuite/23_containers/unordered_map/48101-3_neg.cc:
Likewise.
* testsuite/23_containers/unordered_map/erasure.cc: Likewise.
* testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
Likewise.
* testsuite/23_containers/unordered_map/operations/1.cc:
Likewise.
* testsuite/23_containers/unordered_map/operations/contains.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/48101-3_neg.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/operations/1.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/operations/contains.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/48101-3_neg.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/operations/1.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/operations/contains.cc:
Likewise.
* testsuite/23_containers/unordered_set/48101-3_neg.cc:
Likewise.
* testsuite/23_containers/unordered_set/erasure.cc: Likewise.
* testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
Likewise.
* testsuite/23_containers/unordered_set/operations/1.cc:
Likewise.
* testsuite/23_containers/unordered_set/operations/contains.cc:
Likewise.
* testsuite/23_containers/vector/48101-3_neg.cc: Likewise.
* testsuite/23_containers/vector/bool/capacity/constexpr.cc:
Likewise.
* testsuite/23_containers/vector/bool/cmp_c++20.cc: Likewise.
* testsuite/23_containers/vector/bool/cons/constexpr.cc:
Likewise.
* testsuite/23_containers/vector/bool/element_access/constexpr.cc:
Likewise.
* testsuite/23_containers/vector/bool/iterator_c++20.cc:
Likewise.
* testsuite/23_containers/vector/bool/modifiers/assign/constexpr.cc:
Likewise.
* testsuite/23_containers/vector/bool/modifiers/constexpr.cc:
Likewise.
* testsuite/23_containers/vector/bool/modifiers/swap/constexpr.cc:
Likewise.
* testsuite/23_containers/vector/capacity/constexpr.cc:
Likewise.
* testsuite/23_containers/vector/cmp_c++20.cc: Likewise.
* testsuite/23_containers/vector/cons/constexpr.cc: Likewise.
* testsuite/23_containers/vector/data_access/constexpr.cc:
Likewise.
* testsuite/23_containers/vector/element_access/constexpr.cc:
Likewise.
* testsuite/23_containers/vector/erasure.cc: Likewise.
* testsuite/23_containers/vector/modifiers/assign/constexpr.cc:
Likewise.
* testsuite/23_containers/vector/modifiers/constexpr.cc:
Likewise.
* testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
Likewise.
* testsuite/23_containers/vector/modifiers/swap/constexpr.cc:
Likewise.
* testsuite/23_containers/vector/requirements/version.cc:
Likewise.

12 months agolibstdc++: Remove dg-options "-std=gnu++20" from 21_strings tests
Jonathan Wakely [Fri, 15 Sep 2023 13:27:56 +0000 (14:27 +0100)]
libstdc++: Remove dg-options "-std=gnu++20" from 21_strings tests

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

* testsuite/21_strings/basic_string/cons/char/105995.cc: Remove
dg-options -std=gnu++20.
* testsuite/21_strings/basic_string/cons/char/constexpr.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/wchar_t/constexpr.cc:
Likewise.
* testsuite/21_strings/basic_string/erasure.cc: Likewise.
* testsuite/21_strings/basic_string/hash/hash_char8_t.cc:
Likewise.
* testsuite/21_strings/basic_string/literals/constexpr.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/constexpr.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/swap/constexpr-wchar_t.cc:
Likewise.
* testsuite/21_strings/basic_string/modifiers/swap/constexpr.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/ends_with/char.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/ends_with/wchar_t.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/starts_with/char.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/starts_with/wchar_t.cc:
Likewise.
* testsuite/21_strings/basic_string/operators/char/cmp_c++20.cc:
Likewise.
* testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
Likewise.
* testsuite/21_strings/basic_string_view/cons/char/range.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/copy/char/constexpr.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/copy/wchar_t/constexpr.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/ends_with/char.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/ends_with/nonnull.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/ends_with/wchar_t.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/starts_with/char.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/starts_with/nonnull.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/starts_with/wchar_t.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
Likewise.
* testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
Likewise.
* testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
Likewise.

12 months agolibstdc++: Remove dg-options "-std=gnu++20" from 20_utils tests
Jonathan Wakely [Fri, 15 Sep 2023 13:27:56 +0000 (14:27 +0100)]
libstdc++: Remove dg-options "-std=gnu++20" from 20_utils tests

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

* testsuite/20_util/allocator/105975.cc: Remove dg-options
-std=gnu++2a.
* testsuite/20_util/allocator/rebind_c++20.cc: Likewise.
* testsuite/20_util/allocator/requirements/constexpr.cc:
Likewise.
* testsuite/20_util/allocator/requirements/typedefs_c++20.cc:
Likewise.
* testsuite/20_util/allocator_traits/header-2.cc: Likewise.
* testsuite/20_util/allocator_traits/header.cc: Likewise.
* testsuite/20_util/allocator_traits/members/92878_92947.cc:
Likewise.
* testsuite/20_util/any/assign/92878_92947.cc: Likewise.
* testsuite/20_util/any/cons/92878_92947.cc: Likewise.
* testsuite/20_util/assume_aligned/1.cc: Likewise.
* testsuite/20_util/assume_aligned/2_neg.cc: Likewise.
* testsuite/20_util/assume_aligned/3.cc: Likewise.
* testsuite/20_util/assume_aligned/97132.cc: Likewise.
* testsuite/20_util/bind/constexpr.cc: Likewise.
* testsuite/20_util/bitset/operations/96303.cc: Likewise.
* testsuite/20_util/common_reference/100894.cc: Likewise.
* testsuite/20_util/common_reference/requirements/alias_decl.cc:
Likewise.
* testsuite/20_util/common_reference/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/common_reference/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/duration/comparison_operators/three_way.cc:
Likewise.
* testsuite/20_util/exchange/constexpr.cc: Likewise.
* testsuite/20_util/exchange/noexcept.cc: Likewise.
* testsuite/20_util/from_chars/1_c++20_neg.cc: Likewise.
* testsuite/20_util/from_chars/compare.cc: Likewise.
* testsuite/20_util/function_objects/bind_front/1.cc: Likewise.
* testsuite/20_util/function_objects/bind_front/107784.cc:
Likewise.
* testsuite/20_util/function_objects/bind_front/111327.cc:
Likewise.
* testsuite/20_util/function_objects/bind_front/2.cc: Likewise.
* testsuite/20_util/function_objects/bind_front/97101.cc:
Likewise.
* testsuite/20_util/function_objects/bind_front/constexpr.cc:
Likewise.
* testsuite/20_util/function_objects/constexpr_searcher.cc:
Likewise.
* testsuite/20_util/function_objects/identity/1.cc: Likewise.
* testsuite/20_util/function_objects/invoke/constexpr.cc:
Likewise.
* testsuite/20_util/function_objects/mem_fn/constexpr.cc:
Likewise.
* testsuite/20_util/function_objects/not_fn/constexpr.cc:
Likewise.
* testsuite/20_util/integer_comparisons/1.cc: Likewise.
* testsuite/20_util/integer_comparisons/2.cc: Likewise.
* testsuite/20_util/integer_comparisons/equal.cc: Likewise.
* testsuite/20_util/integer_comparisons/equal_neg.cc: Likewise.
* testsuite/20_util/integer_comparisons/greater.cc: Likewise.
* testsuite/20_util/integer_comparisons/greater_equal.cc:
Likewise.
* testsuite/20_util/integer_comparisons/greater_equal_neg.cc:
Likewise.
* testsuite/20_util/integer_comparisons/greater_neg.cc:
Likewise.
* testsuite/20_util/integer_comparisons/in_range.cc: Likewise.
* testsuite/20_util/integer_comparisons/in_range_neg.cc:
Likewise.
* testsuite/20_util/integer_comparisons/less.cc: Likewise.
* testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
* testsuite/20_util/integer_comparisons/less_equal_neg.cc:
Likewise.
* testsuite/20_util/integer_comparisons/less_neg.cc: Likewise.
* testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
* testsuite/20_util/integer_comparisons/not_equal_neg.cc:
Likewise.
* testsuite/20_util/is_bounded_array/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_bounded_array/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/is_bounded_array/value.cc: Likewise.
* testsuite/20_util/is_constant_evaluated/1.cc: Likewise.
* testsuite/20_util/is_constant_evaluated/noexcept.cc: Likewise.
* testsuite/20_util/is_constructible/92878_92947.cc: Likewise.
* testsuite/20_util/is_layout_compatible/is_corresponding_member.cc:
Likewise.
* testsuite/20_util/is_layout_compatible/value.cc: Likewise.
* testsuite/20_util/is_layout_compatible/version.cc: Likewise.
* testsuite/20_util/is_nothrow_constructible/value_c++20.cc:
Likewise.
* testsuite/20_util/is_nothrow_convertible/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_nothrow_convertible/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/is_nothrow_convertible/value.cc: Likewise.
* testsuite/20_util/is_pod/deprecated-2a.cc: Likewise.
* testsuite/20_util/is_pointer_interconvertible/value.cc:
Likewise.
* testsuite/20_util/is_pointer_interconvertible/version.cc:
Likewise.
* testsuite/20_util/is_pointer_interconvertible/with_class.cc:
Likewise.
* testsuite/20_util/is_unbounded_array/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/is_unbounded_array/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/is_unbounded_array/value.cc: Likewise.
* testsuite/20_util/optional/assignment/92878_92947.cc:
Likewise.
* testsuite/20_util/optional/cons/92878_92947.cc: Likewise.
* testsuite/20_util/optional/constexpr/assign.cc: Likewise.
* testsuite/20_util/optional/constexpr/cons/conv.cc: Likewise.
* testsuite/20_util/optional/constexpr/modifiers.cc: Likewise.
* testsuite/20_util/optional/constexpr/swap.cc: Likewise.
* testsuite/20_util/optional/relops/96269.cc: Likewise.
* testsuite/20_util/optional/relops/three_way.cc: Likewise.
* testsuite/20_util/pair/comparison_operators/constexpr_c++20.cc:
Likewise.
* testsuite/20_util/pair/cons/92878_92947.cc: Likewise.
* testsuite/20_util/pair/constexpr_assign.cc: Likewise.
* testsuite/20_util/pair/constexpr_swap.cc: Likewise.
* testsuite/20_util/pair/requirements/structural.cc: Likewise.
* testsuite/20_util/pointer_traits/pointer_to_constexpr.cc:
Likewise.
* testsuite/20_util/polymorphic_allocator/allocate_object.cc:
Likewise.
* testsuite/20_util/polymorphic_allocator/construct_c++2a.cc:
Likewise.
* testsuite/20_util/polymorphic_allocator/lwg3237.cc: Likewise.
* testsuite/20_util/reference_wrapper/constexpr.cc: Likewise.
* testsuite/20_util/reference_wrapper/incomplete.cc: Likewise.
* testsuite/20_util/remove_cvref/requirements/alias_decl.cc:
Likewise.
* testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/remove_cvref/value.cc: Likewise.
* testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:
Likewise.
* testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
Likewise.
* testsuite/20_util/shared_ptr/casts/rval.cc: Likewise.
* testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc:
Likewise.
* testsuite/20_util/shared_ptr/cons/alias-rval.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/92878_92947.cc:
Likewise.
* testsuite/20_util/shared_ptr/creation/array.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/overwrite.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/version.cc: Likewise.
* testsuite/20_util/time_point/4.cc: Likewise.
* testsuite/20_util/time_point/comparison_operators/three_way.cc:
Likewise.
* testsuite/20_util/to_address/1.cc: Likewise.
* testsuite/20_util/to_address/1_neg.cc: Likewise.
* testsuite/20_util/to_address/debug.cc: Likewise.
* testsuite/20_util/to_address/lwg3545.cc: Likewise.
* testsuite/20_util/to_chars/compare.cc: Likewise.
* testsuite/20_util/tuple/comparison_operators/three_way.cc:
Likewise.
* testsuite/20_util/tuple/cons/102270.cc: Likewise.
* testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc:
Likewise.
* testsuite/20_util/tuple/constexpr_swap.cc: Likewise.
* testsuite/20_util/type_identity/requirements/alias_decl.cc:
Likewise.
* testsuite/20_util/type_identity/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/type_identity/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/typeindex/comparison_operators_c++20.cc:
Likewise.
* testsuite/20_util/unique_ptr/comparison/compare_c++20.cc:
Likewise.
* testsuite/20_util/unique_ptr/creation/92878_92947.cc:
Likewise.
* testsuite/20_util/unique_ptr/creation/for_overwrite.cc:
Likewise.
* testsuite/20_util/unique_ptr/creation/for_overwrite__neg.cc:
Likewise.
* testsuite/20_util/unique_ptr/io/lwg2948.cc: Likewise.
* testsuite/20_util/unwrap_reference/1.cc: Likewise.
* testsuite/20_util/unwrap_reference/2.cc: Likewise.
* testsuite/20_util/unwrap_reference/3.cc: Likewise.
* testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
* testsuite/20_util/uses_allocator/lwg3527.cc: Likewise.
* testsuite/20_util/uses_allocator/make_obj.cc: Likewise.
* testsuite/20_util/uses_allocator/uninitialized_construct.cc:
Likewise.
* testsuite/20_util/variant/92878_92947.cc: Likewise.
* testsuite/20_util/variant/95915.cc: Likewise.
* testsuite/20_util/variant/constexpr.cc: Likewise.
* testsuite/20_util/variant/relops/three_way.cc: Likewise.
* testsuite/20_util/variant/visit_neg.cc: Likewise.
* testsuite/20_util/variant/visit_r.cc: Likewise.
* testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: Likewise.

12 months agolibstdc++: Remove dg-options "-std=gnu++20" from <compare> tests
Jonathan Wakely [Fri, 15 Sep 2023 13:05:07 +0000 (14:05 +0100)]
libstdc++: Remove dg-options "-std=gnu++20" from <compare> tests

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

* testsuite/18_support/comparisons/algorithms/fallback.cc:
Remove dg-options -std=gnu++2a.
* testsuite/18_support/comparisons/algorithms/partial_order.cc:
Likewise.
* testsuite/18_support/comparisons/algorithms/strong_order.cc:
Likewise.
* testsuite/18_support/comparisons/algorithms/strong_order_floats.cc:
Likewise.
* testsuite/18_support/comparisons/algorithms/weak_order.cc:
Likewise.
* testsuite/18_support/comparisons/categories/94565.cc:
Likewise.
* testsuite/18_support/comparisons/categories/partialord.cc:
Likewise.
* testsuite/18_support/comparisons/categories/strongord.cc:
Likewise.
* testsuite/18_support/comparisons/categories/weakord.cc:
Likewise.
* testsuite/18_support/comparisons/categories/zero_neg.cc:
Likewise.
* testsuite/18_support/comparisons/common/1.cc: Likewise.
* testsuite/18_support/comparisons/object/93479.cc: Likewise.
* testsuite/18_support/comparisons/object/lwg3530.cc: Likewise.

12 months agolibstdc++: Remove dg-options "-std=gnu++20" from <atomic> tests
Jonathan Wakely [Fri, 15 Sep 2023 13:27:56 +0000 (14:27 +0100)]
libstdc++: Remove dg-options "-std=gnu++20" from <atomic> tests

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

* testsuite/29_atomics/atomic/compare_exchange_padding.cc:
Remove dg-options -std=gnu++2a.
* testsuite/29_atomics/atomic/cons/value_init.cc: Likewise.
* testsuite/29_atomics/atomic/lock_free_aliases.cc: Likewise.
* testsuite/29_atomics/atomic/requirements/types_neg.cc:
Likewise.
* testsuite/29_atomics/atomic/wait_notify/1.cc: Likewise.
* testsuite/29_atomics/atomic/wait_notify/100334.cc: Likewise.
* testsuite/29_atomics/atomic/wait_notify/102994.cc: Likewise.
* testsuite/29_atomics/atomic/wait_notify/2.cc: Likewise.
* testsuite/29_atomics/atomic/wait_notify/bool.cc: Likewise.
* testsuite/29_atomics/atomic/wait_notify/generic.cc: Likewise.
* testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
* testsuite/29_atomics/atomic_flag/cons/value_init.cc: Likewise.
* testsuite/29_atomics/atomic_flag/test/explicit.cc: Likewise.
* testsuite/29_atomics/atomic_flag/test/implicit.cc: Likewise.
* testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
* testsuite/29_atomics/atomic_float/1.cc: Likewise.
* testsuite/29_atomics/atomic_float/95282.cc: Likewise.
* testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
* testsuite/29_atomics/atomic_float/value_init.cc: Likewise.
* testsuite/29_atomics/atomic_float/wait_notify.cc: Likewise.
* testsuite/29_atomics/atomic_integral/cons/value_init.cc:
Likewise.
* testsuite/29_atomics/atomic_integral/wait_notify.cc: Likewise.
* testsuite/29_atomics/atomic_ref/compare_exchange_padding.cc:
Likewise.
* testsuite/29_atomics/atomic_ref/deduction.cc: Likewise.
* testsuite/29_atomics/atomic_ref/float.cc: Likewise.
* testsuite/29_atomics/atomic_ref/generic.cc: Likewise.
* testsuite/29_atomics/atomic_ref/integral.cc: Likewise.
* testsuite/29_atomics/atomic_ref/pointer.cc: Likewise.
* testsuite/29_atomics/atomic_ref/requirements.cc: Likewise.
* testsuite/29_atomics/headers/atomic/types_std_c++20.cc:
Likewise.
* testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc:
Likewise.
* testsuite/29_atomics/headers/atomic/types_std_c++2a.cc:
Likewise.
* testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc:
Likewise.

12 months agolibstdc++: Add missing tests for std::basic_filebuf::native_handle()
Jonathan Wakely [Fri, 15 Sep 2023 23:09:53 +0000 (00:09 +0100)]
libstdc++: Add missing tests for std::basic_filebuf::native_handle()

I forgot to 'git add' these files in the commit that added the new
member function to basic_filebuf.

libstdc++-v3/ChangeLog:

* testsuite/27_io/basic_filebuf/native_handle/char/1.cc: New test.
* testsuite/27_io/basic_filebuf/native_handle/wchar_t/1.cc: New test.

12 months agolibstdc++: Implement C++26 native handles for file streams (P1759R6)
Jonathan Wakely [Fri, 15 Sep 2023 12:43:43 +0000 (13:43 +0100)]
libstdc++: Implement C++26 native handles for file streams (P1759R6)

The new __basic_file::native_handle() function can be added for C++11
and above, because the names "native_handle" and "native_handle_type"
are already reserved since C++11. Exporting those symbols from the
shared library does no harm, even if the feature gets dropped before the
C++23 standard is final.

The new member functions of std::fstream etc. are only declared for
C++26 and so are not instantiated in src/c++11/fstream-inst.cc. Declare
them with the always_inline attribute so that no symbol definitions are
needed in the library (we can change this later when C++26 support is
less experimental).

libstdc++-v3/ChangeLog:

* acinclude.m4 (GLIBCXX_CHECK_FILEBUF_NATIVE_HANDLES): New
macro.
* config.h.in: Regenerate.
* config/abi/pre/gnu.ver (GLIBCXX_3.4.32): Export new
basic_filebuf members.
* config/io/basic_file_stdio.cc (__basic_file::native_handle):
Define new function.
* config/io/basic_file_stdio.h (__basic_file::native_handle):
Declare new function.
* configure: Regenerate.
* configure.ac: Use GLIBCXX_CHECK_FILEBUF_NATIVE_HANDLES.
* include/bits/version.def (fstream_native_handles): New macro.
* include/bits/version.h: Regenerate.
* include/std/fstream (basic_filebuf::native_handle)
(basic_fstream::native_handle, basic_ifstream::native_handle)
(basic_ofstream::native_handle): New functions.
* src/c++11/Makefile.am: Move compilation of basic_file.cc,
locale_init.cc and localename.cc to here.
* src/c++11/Makefile.in: Regenerate.
* src/c++98/locale_init.cc: Moved to...
* src/c++11/locale_init.cc: ...here.
* src/c++98/localename.cc: Moved to...
* src/c++11/localename.cc: ...here.
* src/c++98/Makefile.am: Remove basic_file.cc, locale_init.cc
and localename.cc from here.
* src/c++98/Makefile.in: Regenerate.
* testsuite/27_io/basic_filebuf/native_handle/version.cc: New test.
* testsuite/27_io/basic_fstream/native_handle/char/1.cc: New test.
* testsuite/27_io/basic_fstream/native_handle/wchar_t/1.cc: New test.
* testsuite/27_io/basic_ifstream/native_handle/char/1.cc: New test.
* testsuite/27_io/basic_ifstream/native_handle/wchar_t/1.cc: New test.
* testsuite/27_io/basic_ofstream/native_handle/char/1.cc: New test.
* testsuite/27_io/basic_ofstream/native_handle/wchar_t/1.cc: New test.

12 months agolibstdc++: Add log line to testsuite output
Jonathan Wakely [Thu, 14 Sep 2023 12:57:05 +0000 (13:57 +0100)]
libstdc++: Add log line to testsuite output

Write a line to the log when using a testsuite_files file.

libstdc++-v3/ChangeLog:

* testsuite/libstdc++-dg/conformance.exp: Add log line when
using testsuite_files.

12 months agolibstdc++: Simplify dejagnu directives for some tests using threads
Jonathan Wakely [Thu, 7 Sep 2023 12:56:15 +0000 (13:56 +0100)]
libstdc++: Simplify dejagnu directives for some tests using threads

Replace dg-require-effective-target directives with a target selector on
the dg-do directive.

We can also remove { dg-require-effective-target pthread } and the
associated { dg-options "-pthread" } by allowing it to run on
non-pthread targets and conditionally adding -pthread only for pthread
targets.

libstdc++-v3/ChangeLog:

* testsuite/20_util/shared_ptr/atomic/3.cc: Simplify dg
directives.
* testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
Likewise.
* testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.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/30_threads/condition_variable_any/stop_token/wait_on.cc:
Likewise.
* testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
Likewise.
* testsuite/30_threads/stop_token/stop_callback/destroy.cc:
Likewise.

12 months agolibstdc++: Remove dg-options "-std=gnu++2a" from XFAIL std::span tests
Jonathan Wakely [Thu, 7 Sep 2023 13:17:50 +0000 (14:17 +0100)]
libstdc++: Remove dg-options "-std=gnu++2a" from XFAIL std::span tests

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

We can also combine the { dg-require-effective-target c++2a } directive
with the dg-do selector.

We need to add the no_pch options for tests that define
_GLIBCXX_ASSERTIONS in the test, otherwise the PCH is included without
that defined.

libstdc++-v3/ChangeLog:

* testsuite/23_containers/span/back_assert_neg.cc: Remove
dg-options and add effective target selector to dg-do. Add
no_pch.
* testsuite/23_containers/span/back_neg.cc: Likewise.
* testsuite/23_containers/span/cons_1_assert_neg.cc: Likewise.
* testsuite/23_containers/span/cons_2_assert_neg.cc: Likewise.
* testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
* testsuite/23_containers/span/first_assert_neg.cc: Likewise.
* testsuite/23_containers/span/first_neg.cc: Likewise.
* testsuite/23_containers/span/front_assert_neg.cc: Likewise.
* testsuite/23_containers/span/front_neg.cc: Likewise.
* testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
* testsuite/23_containers/span/index_op_neg.cc: Likewise.
* testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
* testsuite/23_containers/span/last_assert_neg.cc: Likewise.
* testsuite/23_containers/span/last_neg.cc: Likewise.
* testsuite/23_containers/span/subspan_2_assert_neg.cc:
Likewise.
* testsuite/23_containers/span/subspan_3_assert_neg.cc:
Likewise.
* testsuite/23_containers/span/subspan_4_assert_neg.cc:
Likewise.
* testsuite/23_containers/span/subspan_5_assert_neg.cc:
Likewise.
* testsuite/23_containers/span/subspan_6_assert_neg.cc:
Likewise.
* testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
* testsuite/23_containers/span/subspan_neg.cc: Likewise.
* testsuite/24_iterators/range_operations/advance_debug_neg.cc:
Likewise.

12 months agolibstdc++: Remove dg-options "-std=gnu++23" from remaining tests
Jonathan Wakely [Fri, 1 Sep 2023 20:28:05 +0000 (21:28 +0100)]
libstdc++: Remove dg-options "-std=gnu++23" from remaining tests

The testsuite will automatically select C++23 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++26
as well.

libstdc++-v3/ChangeLog:

* testsuite/18_support/headers/limits/synopsis_cxx23.cc: Remove
dg-options.
* testsuite/18_support/headers/stdfloat/types_std.cc: Likewise.
* testsuite/18_support/type_info/constexpr.cc: Likewise.
* testsuite/19_diagnostics/stacktrace/current.cc: Likewise.
* testsuite/19_diagnostics/stacktrace/entry.cc: Likewise.
* testsuite/19_diagnostics/stacktrace/stacktrace.cc: Likewise.
* testsuite/19_diagnostics/stacktrace/synopsis.cc: Likewise.
* testsuite/19_diagnostics/stacktrace/version.cc: Likewise.
* testsuite/20_util/aligned_storage/deprecated-2b.cc: Likewise.
* testsuite/20_util/aligned_union/deprecated-2b.cc: Likewise.
* testsuite/20_util/bitset/access/constexpr.cc: Likewise.
* testsuite/20_util/bitset/cons/constexpr_c++23.cc: Likewise.
* testsuite/20_util/bitset/count/constexpr.cc: Likewise.
* testsuite/20_util/bitset/ext/constexpr.cc: Likewise.
* testsuite/20_util/bitset/operations/constexpr_c++23.cc:
Likewise.
* testsuite/20_util/bitset/version.cc: Likewise.
* testsuite/20_util/from_chars/8.cc: Likewise.
* testsuite/20_util/from_chars/constexpr.cc: Likewise.
* testsuite/20_util/function/cons/deduction_c++23.cc: Likewise.
* testsuite/20_util/function_objects/invoke/4.cc: Likewise.
* testsuite/20_util/function_objects/invoke/dangling_ref.cc:
Likewise.
* testsuite/20_util/is_scoped_enum/value.cc: Likewise.
* testsuite/20_util/is_scoped_enum/version.cc: Likewise.
* testsuite/20_util/move_only_function/call.cc: Likewise.
* testsuite/20_util/move_only_function/cons.cc: Likewise.
* testsuite/20_util/move_only_function/move.cc: Likewise.
* testsuite/20_util/move_only_function/version.cc: Likewise.
* testsuite/20_util/optional/monadic/and_then.cc: Likewise.
* testsuite/20_util/optional/monadic/or_else.cc: Likewise.
* testsuite/20_util/optional/monadic/or_else_neg.cc: Likewise.
* testsuite/20_util/optional/monadic/pr109242.cc: Likewise.
* testsuite/20_util/optional/monadic/transform.cc: Likewise.
* testsuite/20_util/pair/p2321r2.cc: Likewise.
* testsuite/20_util/reference_from_temporary/value.cc: Likewise.
* testsuite/20_util/reference_from_temporary/value2.cc:
Likewise.
* testsuite/20_util/reference_from_temporary/version.cc:
Likewise.
* testsuite/20_util/to_chars/constexpr.cc: Likewise.
* testsuite/20_util/to_chars/float128_c++23.cc: Likewise.
* testsuite/20_util/to_chars/float16_c++23.cc: Likewise.
* testsuite/20_util/to_chars/version.cc: Likewise.
* testsuite/20_util/to_underlying/1.cc: Likewise.
* testsuite/20_util/to_underlying/version.cc: Likewise.
* testsuite/20_util/tuple/p2321r2.cc: Likewise.
* testsuite/20_util/unique_ptr/assign/constexpr.cc: Likewise.
* testsuite/20_util/unique_ptr/comparison/constexpr.cc:
Likewise.
* testsuite/20_util/unique_ptr/cons/constexpr_c++20.cc:
Likewise.
* testsuite/20_util/unique_ptr/creation/constexpr.cc: Likewise.
* testsuite/20_util/unique_ptr/modifiers/constexpr.cc: Likewise.
* testsuite/20_util/unique_ptr/specialized_algorithms/constexpr.cc: Likewise.
* testsuite/20_util/unreachable/1.cc: Likewise.
* testsuite/20_util/unreachable/version.cc: Likewise.
* testsuite/20_util/uses_allocator/lwg3677.cc: Likewise.
* testsuite/21_strings/basic_string/capacity/char/resize_and_overwrite.cc: Likewise.
* testsuite/21_strings/basic_string/operations/contains/char.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/contains/nonnull.cc: Likewise.
* testsuite/21_strings/basic_string/operations/contains/wchar_t.cc: Likewise.
* testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc: Likewise.
* testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc: Likewise.
* testsuite/21_strings/basic_string_view/operations/contains/char.cc: Likewise.
* testsuite/21_strings/basic_string_view/operations/contains/char/2.cc: Likewise.
* testsuite/21_strings/basic_string_view/operations/contains/nonnull.cc: Likewise.
* testsuite/21_strings/basic_string_view/operations/contains/wchar_t.cc: Likewise.
* testsuite/23_containers/queue/cons_from_iters.cc: Likewise.
* testsuite/23_containers/stack/cons_from_iters.cc: Likewise.
* testsuite/23_containers/vector/bool/element_access/1.cc:
Likewise.
* testsuite/24_iterators/const_iterator/1.cc: Likewise.
* testsuite/25_algorithms/contains/1.cc: Likewise.
* testsuite/25_algorithms/contains_subrange/1.cc: Likewise.
* testsuite/25_algorithms/find_last/1.cc: Likewise.
* testsuite/25_algorithms/find_last_if/1.cc: Likewise.
* testsuite/25_algorithms/find_last_if_not/1.cc: Likewise.
* testsuite/25_algorithms/fold_left/1.cc: Likewise.
* testsuite/25_algorithms/fold_right/1.cc: Likewise.
* testsuite/25_algorithms/iota/1.cc: Likewise.
* testsuite/26_numerics/bit/bit.byteswap/byteswap.cc: Likewise.
* testsuite/26_numerics/bit/bit.byteswap/version.cc: Likewise.
* testsuite/26_numerics/complex/ext_c++23.cc: Likewise.
* testsuite/26_numerics/headers/cmath/c99_classification_macros_c++23.cc: Likewise.
* testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc:
Likewise.
* testsuite/26_numerics/headers/cmath/functions_std_c++23.cc:
Likewise.
* testsuite/26_numerics/headers/cmath/nextafter_c++23.cc:
Likewise.
* testsuite/26_numerics/numbers/4.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_other/char/volatile_ptr.cc: Likewise.
* testsuite/27_io/filesystem/path/native/conv_c++23.cc:
Likewise.
* testsuite/27_io/spanstream/1.cc: Likewise.
* testsuite/27_io/spanstream/2.cc: Likewise.
* testsuite/27_io/spanstream/version.cc: Likewise.
* testsuite/29_atomics/atomic_float/requirements_cxx23.cc:
Likewise.
* testsuite/29_atomics/headers/stdatomic.h/c_compat.cc:
Likewise.
* testsuite/29_atomics/headers/stdatomic.h/version.cc: Likewise.
* testsuite/30_threads/packaged_task/cons/deduction_c++23.cc:
Likewise.
* testsuite/experimental/filesystem/path/native/conv_c++23.cc:
Likewise.
* testsuite/std/ranges/adaptors/adjacent/1.cc: Likewise.
* testsuite/std/ranges/adaptors/adjacent_transform/1.cc:
Likewise.
* testsuite/std/ranges/adaptors/as_const/1.cc: Likewise.
* testsuite/std/ranges/adaptors/as_rvalue/1.cc: Likewise.
* testsuite/std/ranges/adaptors/chunk/1.cc: Likewise.
* testsuite/std/ranges/adaptors/chunk_by/1.cc: Likewise.
* testsuite/std/ranges/adaptors/enumerate/1.cc: Likewise.
* testsuite/std/ranges/adaptors/join_with/1.cc: Likewise.
* testsuite/std/ranges/adaptors/lwg3715.cc: Likewise.
* testsuite/std/ranges/adaptors/slide/1.cc: Likewise.
* testsuite/std/ranges/adaptors/stride/1.cc: Likewise.
* testsuite/std/ranges/cartesian_product/1.cc: Likewise.
* testsuite/std/ranges/range_adaptor_closure.cc: Likewise.
* testsuite/std/ranges/repeat/1.cc: Likewise.
* testsuite/std/ranges/version_c++23.cc: Likewise.
* testsuite/std/ranges/zip/1.cc: Likewise.
* testsuite/std/ranges/zip_transform/1.cc: Likewise.

12 months agolibstdc++: Remove dg-options "-std=gnu++23" from std::expected tests
Jonathan Wakely [Fri, 1 Sep 2023 20:28:05 +0000 (21:28 +0100)]
libstdc++: Remove dg-options "-std=gnu++23" from std::expected tests

The testsuite will automatically select C++23 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++26
as well.

libstdc++-v3/ChangeLog:

* testsuite/20_util/expected/assign.cc: Remove dg-options.
* testsuite/20_util/expected/bad.cc: Likewise.
* testsuite/20_util/expected/cons.cc: Likewise.
* testsuite/20_util/expected/equality.cc: Likewise.
* testsuite/20_util/expected/illformed_neg.cc: Likewise.
* testsuite/20_util/expected/lwg3877.cc: Likewise.
* testsuite/20_util/expected/lwg3938.cc: Likewise.
* testsuite/20_util/expected/monadic.cc: Likewise.
* testsuite/20_util/expected/observers.cc: Likewise.
* testsuite/20_util/expected/requirements.cc: Likewise.
* testsuite/20_util/expected/swap.cc: Likewise.
* testsuite/20_util/expected/synopsis.cc: Likewise.
* testsuite/20_util/expected/unexpected.cc: Likewise.
* testsuite/20_util/expected/version.cc: Likewise.

12 months agolibstdc++: Remove dg-options "-std=gnu++20" from std::chrono tests
Jonathan Wakely [Fri, 1 Sep 2023 20:28:07 +0000 (21:28 +0100)]
libstdc++: Remove dg-options "-std=gnu++20" from std::chrono tests

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

* testsuite/20_util/duration/arithmetic/overflow_c++20.cc:
Remove dg-options.
* testsuite/20_util/duration/io.cc: Likewise.
* testsuite/std/time/clock/file/io.cc: Likewise.
* testsuite/std/time/clock/file/members.cc: Likewise.
* testsuite/std/time/clock/file/overview.cc: Likewise.
* testsuite/std/time/clock/gps/1.cc: Likewise.
* testsuite/std/time/clock/gps/io.cc: Likewise.
* testsuite/std/time/clock/local/io.cc: Likewise.
* testsuite/std/time/clock/system/io.cc: Likewise.
* testsuite/std/time/clock/tai/1.cc: Likewise.
* testsuite/std/time/clock/tai/io.cc: Likewise.
* testsuite/std/time/clock/utc/1.cc: Likewise.
* testsuite/std/time/clock/utc/io.cc: Likewise.
* testsuite/std/time/clock/utc/leap_second_info.cc: Likewise.
* testsuite/std/time/day/1.cc: Likewise.
* testsuite/std/time/day/io.cc: Likewise.
* testsuite/std/time/exceptions.cc: Likewise.
* testsuite/std/time/format.cc: Likewise.
* testsuite/std/time/hh_mm_ss/1.cc: Likewise.
* testsuite/std/time/hh_mm_ss/109772.cc: Likewise.
* testsuite/std/time/hh_mm_ss/io.cc: Likewise.
* testsuite/std/time/is_am/1.cc: Likewise.
* testsuite/std/time/is_pm/1.cc: Likewise.
* testsuite/std/time/make12/1.cc: Likewise.
* testsuite/std/time/make24/1.cc: Likewise.
* testsuite/std/time/month/1.cc: Likewise.
* testsuite/std/time/month/io.cc: Likewise.
* testsuite/std/time/month_day/1.cc: Likewise.
* testsuite/std/time/month_day/io.cc: Likewise.
* testsuite/std/time/month_day_last/1.cc: Likewise.
* testsuite/std/time/month_day_last/io.cc: Likewise.
* testsuite/std/time/month_weekday/1.cc: Likewise.
* testsuite/std/time/month_weekday/io.cc: Likewise.
* testsuite/std/time/month_weekday_last/1.cc: Likewise.
* testsuite/std/time/month_weekday_last/io.cc: Likewise.
* testsuite/std/time/parse.cc: Likewise.
* testsuite/std/time/syn_c++20.cc: Likewise.
* testsuite/std/time/time_zone/get_info_local.cc: Likewise.
* testsuite/std/time/time_zone/get_info_sys.cc: Likewise.
* testsuite/std/time/time_zone/requirements.cc: Likewise.
* testsuite/std/time/traits/is_clock.cc: Likewise.
* testsuite/std/time/tzdb/1.cc: Likewise.
* testsuite/std/time/tzdb/leap_seconds.cc: Likewise.
* testsuite/std/time/tzdb_list/1.cc: Likewise.
* testsuite/std/time/tzdb_list/requirements.cc: Likewise.
* testsuite/std/time/weekday/1.cc: Likewise.
* testsuite/std/time/weekday/io.cc: Likewise.
* testsuite/std/time/weekday_indexed/io.cc: Likewise.
* testsuite/std/time/weekday_last/1.cc: Likewise.
* testsuite/std/time/weekday_last/io.cc: Likewise.
* testsuite/std/time/year/1.cc: Likewise.
* testsuite/std/time/year/2.cc: Likewise.
* testsuite/std/time/year/io.cc: Likewise.
* testsuite/std/time/weekday_indexed/1.cc: Likewise.
* testsuite/std/time/year_month/1.cc: Likewise.
* testsuite/std/time/year_month/2.cc: Likewise.
* testsuite/std/time/year_month/io.cc: Likewise.
* testsuite/std/time/year_month_day/1.cc: Likewise.
* testsuite/std/time/year_month_day/2.cc: Likewise.
* testsuite/std/time/year_month_day/3.cc: Likewise.
* testsuite/std/time/year_month_day/4.cc: Likewise.
* testsuite/std/time/year_month_day/io.cc: Likewise.
* testsuite/std/time/year_month_day_last/1.cc: Likewise.
* testsuite/std/time/year_month_day_last/2.cc: Likewise.
* testsuite/std/time/year_month_day_last/io.cc: Likewise.
* testsuite/std/time/year_month_weekday/1.cc: Likewise.
* testsuite/std/time/year_month_weekday/2.cc: Likewise.
* testsuite/std/time/year_month_weekday/3.cc: Likewise.
* testsuite/std/time/year_month_weekday/io.cc: Likewise.
* testsuite/std/time/year_month_weekday_last/1.cc: Likewise.
* testsuite/std/time/year_month_weekday_last/2.cc: Likewise.
* testsuite/std/time/year_month_weekday_last/io.cc: Likewise.
* testsuite/std/time/zoned_time/1.cc: Likewise.
* testsuite/std/time/zoned_time/custom.cc: Likewise.
* testsuite/std/time/zoned_time/deduction.cc: Likewise.
* testsuite/std/time/zoned_time/io.cc: Likewise.
* testsuite/std/time/zoned_time/req_neg.cc: Likewise.
* testsuite/std/time/zoned_time/requirements.cc: Likewise.
* testsuite/std/time/zoned_traits.cc: Likewise.

12 months agolibstdc++: Remove dg-options "-std=gnu++20" from std::format tests
Jonathan Wakely [Fri, 1 Sep 2023 20:28:03 +0000 (21:28 +0100)]
libstdc++: Remove dg-options "-std=gnu++20" from std::format tests

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

* testsuite/std/format/arguments/args.cc: Remove dg-options.
* testsuite/std/format/arguments/lwg3810.cc: Likewise.
* testsuite/std/format/error.cc: Likewise.
* testsuite/std/format/format_string.cc: Likewise.
* testsuite/std/format/formatter/concept.cc: Likewise.
* testsuite/std/format/formatter/ext_float.cc: Likewise.
* testsuite/std/format/formatter/requirements.cc: Likewise.
* testsuite/std/format/functions/107871.cc: Likewise.
* testsuite/std/format/functions/format.cc: Likewise.
* testsuite/std/format/functions/format_to.cc: Likewise.
* testsuite/std/format/functions/format_to_n.cc: Likewise.
* testsuite/std/format/functions/size.cc: Likewise.
* testsuite/std/format/functions/vformat_to.cc: Likewise.
* testsuite/std/format/parse_ctx.cc: Likewise.
* testsuite/std/format/string.cc: Likewise.
* testsuite/std/format/string_neg.cc: Likewise.
* testsuite/std/format/functions/format_c++23.cc: Removed.

12 months agolibstdc++: Remove dg-options "-std=gnu++2a" from constrained algo tests
Jonathan Wakely [Mon, 11 Sep 2023 13:16:27 +0000 (14:16 +0100)]
libstdc++: Remove dg-options "-std=gnu++2a" from constrained algo tests

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

* testsuite/20_util/function_objects/range.cmp/equal_to.cc:
Remove dg-options.
* testsuite/20_util/function_objects/range.cmp/greater.cc:
Likewise.
* testsuite/20_util/function_objects/range.cmp/greater_equal.cc:
Likewise.
* testsuite/20_util/function_objects/range.cmp/less.cc:
Likewise.
* testsuite/20_util/function_objects/range.cmp/less_equal.cc:
Likewise.
* testsuite/20_util/function_objects/range.cmp/lwg3530.cc:
Likewise.
* testsuite/20_util/function_objects/range.cmp/not_equal_to.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/construct_at/1.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/construct_at/95788.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_copy/constrained.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_default_construct/constrained.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_fill/constrained.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_move/constrained.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/uninitialized_value_construct/constrained.cc:
Likewise.
* testsuite/25_algorithms/adjacent_find/constexpr.cc: Likewise.
* testsuite/25_algorithms/adjacent_find/constrained.cc:
Likewise.
* testsuite/25_algorithms/all_of/constexpr.cc: Likewise.
* testsuite/25_algorithms/all_of/constrained.cc: Likewise.
* testsuite/25_algorithms/any_of/constexpr.cc: Likewise.
* testsuite/25_algorithms/any_of/constrained.cc: Likewise.
* testsuite/25_algorithms/binary_search/constexpr.cc: Likewise.
* testsuite/25_algorithms/binary_search/constrained.cc:
Likewise.
* testsuite/25_algorithms/clamp/constrained.cc: Likewise.
* testsuite/25_algorithms/constexpr_macro.cc: Likewise.
* testsuite/25_algorithms/copy/95578.cc: Likewise.
* testsuite/25_algorithms/copy/constexpr.cc: Likewise.
* testsuite/25_algorithms/copy/constrained.cc: Likewise.
* testsuite/25_algorithms/copy/debug/constexpr_neg.cc: Likewise.
* testsuite/25_algorithms/copy_backward/95578.cc: Likewise.
* testsuite/25_algorithms/copy_backward/constexpr.cc: Likewise.
* testsuite/25_algorithms/copy_backward/constrained.cc:
Likewise.
* testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc:
Likewise.
* testsuite/25_algorithms/copy_if/constexpr.cc: Likewise.
* testsuite/25_algorithms/copy_if/constrained.cc: Likewise.
* testsuite/25_algorithms/copy_n/constexpr.cc: Likewise.
* testsuite/25_algorithms/copy_n/constrained.cc: Likewise.
* testsuite/25_algorithms/count/constexpr.cc: Likewise.
* testsuite/25_algorithms/count/constrained.cc: Likewise.
* testsuite/25_algorithms/count_if/constexpr.cc: Likewise.
* testsuite/25_algorithms/count_if/constrained.cc: Likewise.
* testsuite/25_algorithms/cpp_lib_constexpr.cc: Likewise.
* testsuite/25_algorithms/equal/95578.cc: Likewise.
* testsuite/25_algorithms/equal/constexpr.cc: Likewise.
* testsuite/25_algorithms/equal/constexpr_neg.cc: Likewise.
* testsuite/25_algorithms/equal/constrained.cc: Likewise.
* testsuite/25_algorithms/equal/debug/constexpr_neg.cc:
Likewise.
* testsuite/25_algorithms/equal_range/constexpr.cc: Likewise.
* testsuite/25_algorithms/equal_range/constrained.cc: Likewise.
* testsuite/25_algorithms/fill/94017.cc: Likewise.
* testsuite/25_algorithms/fill/constexpr.cc: Likewise.
* testsuite/25_algorithms/fill/constrained.cc: Likewise.
* testsuite/25_algorithms/fill_n/94017.cc: Likewise.
* testsuite/25_algorithms/fill_n/constexpr.cc: Likewise.
* testsuite/25_algorithms/fill_n/constrained.cc: Likewise.
* testsuite/25_algorithms/find/constexpr.cc: Likewise.
* testsuite/25_algorithms/find/constrained.cc: Likewise.
* testsuite/25_algorithms/find_end/constexpr.cc: Likewise.
* testsuite/25_algorithms/find_end/constrained.cc: Likewise.
* testsuite/25_algorithms/find_first_of/constexpr.cc: Likewise.
* testsuite/25_algorithms/find_first_of/constrained.cc:
Likewise.
* testsuite/25_algorithms/find_if/constexpr.cc: Likewise.
* testsuite/25_algorithms/find_if/constrained.cc: Likewise.
* testsuite/25_algorithms/find_if_not/constexpr.cc: Likewise.
* testsuite/25_algorithms/find_if_not/constrained.cc: Likewise.
* testsuite/25_algorithms/for_each/constexpr.cc: Likewise.
* testsuite/25_algorithms/for_each/constrained.cc: Likewise.
* testsuite/25_algorithms/generate/constexpr.cc: Likewise.
* testsuite/25_algorithms/generate/constrained.cc: Likewise.
* testsuite/25_algorithms/generate_n/constexpr.cc: Likewise.
* testsuite/25_algorithms/generate_n/constrained.cc: Likewise.
* testsuite/25_algorithms/heap/constrained.cc: Likewise.
* testsuite/25_algorithms/includes/constrained.cc: Likewise.
* testsuite/25_algorithms/inplace_merge/constrained.cc:
Likewise.
* testsuite/25_algorithms/is_heap/constexpr.cc: Likewise.
* testsuite/25_algorithms/is_heap_until/constexpr.cc: Likewise.
* testsuite/25_algorithms/is_partitioned/constexpr.cc: Likewise.
* testsuite/25_algorithms/is_partitioned/constrained.cc:
Likewise.
* testsuite/25_algorithms/is_permutation/constexpr.cc: Likewise.
* testsuite/25_algorithms/is_permutation/constrained.cc:
Likewise.
* testsuite/25_algorithms/is_sorted/constexpr.cc: Likewise.
* testsuite/25_algorithms/is_sorted/constrained.cc: Likewise.
* testsuite/25_algorithms/is_sorted_until/constexpr.cc:
Likewise.
* testsuite/25_algorithms/is_sorted_until/constrained.cc:
Likewise.
* testsuite/25_algorithms/iter_swap/constexpr.cc: Likewise.
* testsuite/25_algorithms/lexicographical_compare/93972.cc:
Likewise.
* testsuite/25_algorithms/lexicographical_compare/95578.cc:
Likewise.
* testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
Likewise.
* testsuite/25_algorithms/lexicographical_compare/constrained.cc:
Likewise.
* testsuite/25_algorithms/lexicographical_compare_three_way/1.cc:
Likewise.
* testsuite/25_algorithms/lexicographical_compare_three_way/constexpr.cc:
Likewise.
* testsuite/25_algorithms/lower_bound/constexpr.cc: Likewise.
* testsuite/25_algorithms/lower_bound/constrained.cc: Likewise.
* testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc:
Likewise.
* testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc:
Likewise.
* testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc:
Likewise.
* testsuite/25_algorithms/make_heap/constexpr.cc: Likewise.
* testsuite/25_algorithms/max/constrained.cc: Likewise.
* testsuite/25_algorithms/max_element/constrained.cc: Likewise.
* testsuite/25_algorithms/merge/constexpr.cc: Likewise.
* testsuite/25_algorithms/merge/constrained.cc: Likewise.
* testsuite/25_algorithms/min/constrained.cc: Likewise.
* testsuite/25_algorithms/min_element/constrained.cc: Likewise.
* testsuite/25_algorithms/minmax/constrained.cc: Likewise.
* testsuite/25_algorithms/minmax_element/constrained.cc:
Likewise.
* testsuite/25_algorithms/mismatch/constexpr.cc: Likewise.
* testsuite/25_algorithms/mismatch/constrained.cc: Likewise.
* testsuite/25_algorithms/move/93872.cc: Likewise.
* testsuite/25_algorithms/move/95578.cc: Likewise.
* testsuite/25_algorithms/move/constexpr.cc: Likewise.
* testsuite/25_algorithms/move/constrained.cc: Likewise.
* testsuite/25_algorithms/move_backward/93872.cc: Likewise.
* testsuite/25_algorithms/move_backward/95578.cc: Likewise.
* testsuite/25_algorithms/move_backward/constrained.cc:
Likewise.
* testsuite/25_algorithms/next_permutation/constexpr.cc:
Likewise.
* testsuite/25_algorithms/next_permutation/constrained.cc:
Likewise.
* testsuite/25_algorithms/none_of/constexpr.cc: Likewise.
* testsuite/25_algorithms/none_of/constrained.cc: Likewise.
* testsuite/25_algorithms/nth_element/constexpr.cc: Likewise.
* testsuite/25_algorithms/nth_element/constrained.cc: Likewise.
* testsuite/25_algorithms/partial_sort/constexpr.cc: Likewise.
* testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
* testsuite/25_algorithms/partial_sort_copy/constexpr.cc:
Likewise.
* testsuite/25_algorithms/partial_sort_copy/constrained.cc:
Likewise.
* testsuite/25_algorithms/partition/constexpr.cc: Likewise.
* testsuite/25_algorithms/partition/constrained.cc: Likewise.
* testsuite/25_algorithms/partition_copy/constexpr.cc: Likewise.
* testsuite/25_algorithms/partition_copy/constrained.cc:
Likewise.
* testsuite/25_algorithms/partition_point/constexpr.cc:
Likewise.
* testsuite/25_algorithms/partition_point/constrained.cc:
Likewise.
* testsuite/25_algorithms/pop_heap/constexpr.cc: Likewise.
* testsuite/25_algorithms/prev_permutation/constexpr.cc:
Likewise.
* testsuite/25_algorithms/prev_permutation/constrained.cc:
Likewise.
* testsuite/25_algorithms/push_heap/constexpr.cc: Likewise.
* testsuite/25_algorithms/remove/constexpr.cc: Likewise.
* testsuite/25_algorithms/remove/constrained.cc: Likewise.
* testsuite/25_algorithms/remove_copy/constexpr.cc: Likewise.
* testsuite/25_algorithms/remove_copy/constrained.cc: Likewise.
* testsuite/25_algorithms/remove_copy_if/constexpr.cc: Likewise.
* testsuite/25_algorithms/remove_copy_if/constrained.cc:
Likewise.
* testsuite/25_algorithms/remove_if/constexpr.cc: Likewise.
* testsuite/25_algorithms/remove_if/constrained.cc: Likewise.
* testsuite/25_algorithms/replace/constrained.cc: Likewise.
* testsuite/25_algorithms/replace_copy/constexpr.cc: Likewise.
* testsuite/25_algorithms/replace_copy/constrained.cc: Likewise.
* testsuite/25_algorithms/replace_copy_if/constexpr.cc:
Likewise.
* testsuite/25_algorithms/replace_copy_if/constrained.cc:
Likewise.
* testsuite/25_algorithms/replace_if/constexpr.cc: Likewise.
* testsuite/25_algorithms/replace_if/constrained.cc: Likewise.
* testsuite/25_algorithms/reverse/constexpr.cc: Likewise.
* testsuite/25_algorithms/reverse/constrained.cc: Likewise.
* testsuite/25_algorithms/reverse_copy/constexpr.cc: Likewise.
* testsuite/25_algorithms/reverse_copy/constrained.cc: Likewise.
* testsuite/25_algorithms/rotate/constexpr.cc: Likewise.
* testsuite/25_algorithms/rotate/constrained.cc: Likewise.
* testsuite/25_algorithms/rotate_copy/constexpr.cc: Likewise.
* testsuite/25_algorithms/rotate_copy/constrained.cc: Likewise.
* testsuite/25_algorithms/sample/constrained.cc: Likewise.
* testsuite/25_algorithms/search/constexpr.cc: Likewise.
* testsuite/25_algorithms/search/constrained.cc: Likewise.
* testsuite/25_algorithms/search_n/97828.cc: Likewise.
* testsuite/25_algorithms/search_n/constexpr.cc: Likewise.
* testsuite/25_algorithms/search_n/constrained.cc: Likewise.
* testsuite/25_algorithms/set_difference/constexpr.cc: Likewise.
* testsuite/25_algorithms/set_difference/constrained.cc:
Likewise.
* testsuite/25_algorithms/set_intersection/constexpr.cc:
Likewise.
* testsuite/25_algorithms/set_intersection/constrained.cc:
Likewise.
* testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
Likewise.
* testsuite/25_algorithms/set_symmetric_difference/constrained.cc:
Likewise.
* testsuite/25_algorithms/set_union/constexpr.cc: Likewise.
* testsuite/25_algorithms/set_union/constrained.cc: Likewise.
* testsuite/25_algorithms/shift_left/1.cc: Likewise.
* testsuite/25_algorithms/shift_right/1.cc: Likewise.
* testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
* testsuite/25_algorithms/sort/constexpr.cc: Likewise.
* testsuite/25_algorithms/sort/constrained.cc: Likewise.
* testsuite/25_algorithms/sort_heap/constexpr.cc: Likewise.
* testsuite/25_algorithms/stable_partition/constrained.cc:
Likewise.
* testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
* testsuite/25_algorithms/swap/constexpr.cc: Likewise.
* testsuite/25_algorithms/swap_ranges/constexpr.cc: Likewise.
* testsuite/25_algorithms/swap_ranges/constrained.cc: Likewise.
* testsuite/25_algorithms/transform/constexpr.cc: Likewise.
* testsuite/25_algorithms/transform/constrained.cc: Likewise.
* testsuite/25_algorithms/unique/constexpr.cc: Likewise.
* testsuite/25_algorithms/unique/constrained.cc: Likewise.
* testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise.
* testsuite/25_algorithms/unique_copy/constrained.cc: Likewise.
* testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
* testsuite/25_algorithms/upper_bound/constrained.cc: Likewise.
* testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc:
Likewise.
* testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc:
Likewise.
* testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc:
Likewise.

12 months agolibstdc++: Remove dg-options "-std=gnu++20" from <concepts> and <ranges> tests
Jonathan Wakely [Mon, 4 Sep 2023 13:06:43 +0000 (14:06 +0100)]
libstdc++: Remove dg-options "-std=gnu++20" from <concepts> and <ranges> tests

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

libstdc++-v3/ChangeLog:

* testsuite/std/concepts/1.cc: Remove dg-options.
* testsuite/std/concepts/2.cc: Likewise.
* testsuite/std/concepts/concepts.callable/invocable.cc:
Likewise.
* testsuite/std/concepts/concepts.callable/regular_invocable.cc:
Likewise.
* testsuite/std/concepts/concepts.callable/relation.cc:
Likewise.
* testsuite/std/concepts/concepts.callable/strictweakorder.cc:
Likewise.
* testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc: Likewise.
* testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc: Likewise.
* testsuite/std/concepts/concepts.lang/concept.arithmetic/signed_integral.cc: Likewise.
* testsuite/std/concepts/concepts.lang/concept.arithmetic/unsigned_integral.cc: Likewise.
* testsuite/std/concepts/concepts.lang/concept.assignable/1.cc:
Likewise.
* testsuite/std/concepts/concepts.lang/concept.common/1.cc:
Likewise.
* testsuite/std/concepts/concepts.lang/concept.commonref/1.cc:
Likewise.
* testsuite/std/concepts/concepts.lang/concept.constructible/1.cc: Likewise.
* testsuite/std/concepts/concepts.lang/concept.convertible/1.cc:
Likewise.
* testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc: Likewise.
* testsuite/std/concepts/concepts.lang/concept.defaultinitializable/1.cc: Likewise.
* testsuite/std/concepts/concepts.lang/concept.defaultinitializable/lwg3149.cc: Likewise.
* testsuite/std/concepts/concepts.lang/concept.derived/1.cc:
Likewise.
* testsuite/std/concepts/concepts.lang/concept.destructible/1.cc: Likewise.
* testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc: Likewise.
* testsuite/std/concepts/concepts.lang/concept.same/1.cc:
Likewise.
* testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc: Likewise.
* testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc: Likewise.
* testsuite/std/concepts/concepts.lang/concept.swappable/swappable_with.cc: Likewise.
* testsuite/std/concepts/concepts.object/copyable.cc: Likewise.
* testsuite/std/concepts/concepts.object/movable.cc: Likewise.
* testsuite/std/concepts/concepts.object/regular.cc: Likewise.
* testsuite/std/concepts/concepts.object/semiregular.cc:
Likewise.
* testsuite/std/ranges/97600.cc: Likewise.
* testsuite/std/ranges/access/101782.cc: Likewise.
* testsuite/std/ranges/access/begin.cc: Likewise.
* testsuite/std/ranges/access/begin_neg.cc: Likewise.
* testsuite/std/ranges/access/cbegin.cc: Likewise.
* testsuite/std/ranges/access/cdata.cc: Likewise.
* testsuite/std/ranges/access/cend.cc: Likewise.
* testsuite/std/ranges/access/crbegin.cc: Likewise.
* testsuite/std/ranges/access/crend.cc: Likewise.
* testsuite/std/ranges/access/data.cc: Likewise.
* testsuite/std/ranges/access/empty.cc: Likewise.
* testsuite/std/ranges/access/end.cc: Likewise.
* testsuite/std/ranges/access/end_neg.cc: Likewise.
* testsuite/std/ranges/access/lwg3467.cc: Likewise.
* testsuite/std/ranges/access/p2602.cc: Likewise.
* testsuite/std/ranges/access/rbegin.cc: Likewise.
* testsuite/std/ranges/access/rend.cc: Likewise.
* testsuite/std/ranges/access/size.cc: Likewise.
* testsuite/std/ranges/access/size_neg.cc: Likewise.
* testsuite/std/ranges/access/ssize.cc: Likewise.
* testsuite/std/ranges/adaptors/100479.cc: Likewise.
* testsuite/std/ranges/adaptors/100577.cc: Likewise.
* testsuite/std/ranges/adaptors/93978.cc: Likewise.
* testsuite/std/ranges/adaptors/95322.cc: Likewise.
* testsuite/std/ranges/adaptors/99433.cc: Likewise.
* testsuite/std/ranges/adaptors/all.cc: Likewise.
* testsuite/std/ranges/adaptors/common.cc: Likewise.
* testsuite/std/ranges/adaptors/conditionally_borrowed.cc:
Likewise.
* testsuite/std/ranges/adaptors/counted.cc: Likewise.
* testsuite/std/ranges/adaptors/detail/copyable_box.cc:
Likewise.
* testsuite/std/ranges/adaptors/drop.cc: Likewise.
* testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
* testsuite/std/ranges/adaptors/elements.cc: Likewise.
* testsuite/std/ranges/adaptors/filter.cc: Likewise.
* testsuite/std/ranges/adaptors/join.cc: Likewise.
* testsuite/std/ranges/adaptors/lazy_split.cc: Likewise.
* testsuite/std/ranges/adaptors/lazy_split_neg.cc: Likewise.
* testsuite/std/ranges/adaptors/lwg3286.cc: Likewise.
* testsuite/std/ranges/adaptors/lwg3313_neg.cc: Likewise.
* testsuite/std/ranges/adaptors/lwg3325_neg.cc: Likewise.
* testsuite/std/ranges/adaptors/lwg3406.cc: Likewise.
* testsuite/std/ranges/adaptors/p1739.cc: Likewise.
* testsuite/std/ranges/adaptors/p2281.cc: Likewise.
* testsuite/std/ranges/adaptors/p2770r0.cc: Likewise.
* testsuite/std/ranges/adaptors/reverse.cc: Likewise.
* testsuite/std/ranges/adaptors/sizeof.cc: Likewise.
* testsuite/std/ranges/adaptors/split.cc: Likewise.
* testsuite/std/ranges/adaptors/take.cc: Likewise.
* testsuite/std/ranges/adaptors/take_while.cc: Likewise.
* testsuite/std/ranges/adaptors/transform.cc: Likewise.
* testsuite/std/ranges/empty_view.cc: Likewise.
* testsuite/std/ranges/headers/ranges/synopsis.cc: Likewise.
* testsuite/std/ranges/iota/difference_type.cc: Likewise.
* testsuite/std/ranges/iota/iota_view.cc: Likewise.
* testsuite/std/ranges/iota/iterator.cc: Likewise.
* testsuite/std/ranges/iota/lwg3292_neg.cc: Likewise.
* testsuite/std/ranges/iota/max_size_type.cc: Likewise.
* testsuite/std/ranges/istream_view.cc: Likewise.
* testsuite/std/ranges/p2259.cc: Likewise.
* testsuite/std/ranges/p2325.cc: Likewise.
* testsuite/std/ranges/p2367.cc: Likewise.
* testsuite/std/ranges/range.cc: Likewise.
* testsuite/std/ranges/refinements.cc: Likewise.
* testsuite/std/ranges/safe_range.cc: Likewise.
* testsuite/std/ranges/safe_range_types.cc: Likewise.
* testsuite/std/ranges/single_view.cc: Likewise.
* testsuite/std/ranges/sized.cc: Likewise.
* testsuite/std/ranges/subrange/1.cc: Likewise.
* testsuite/std/ranges/subrange/97512.cc: Likewise.
* testsuite/std/ranges/subrange/constexpr.cc: Likewise.
* testsuite/std/ranges/subrange/lwg3282_neg.cc: Likewise.
* testsuite/std/ranges/subrange/lwg3286.cc: Likewise.
* testsuite/std/ranges/subrange/lwg3433.cc: Likewise.
* testsuite/std/ranges/subrange/sizeof.cc: Likewise.
* testsuite/std/ranges/subrange/tuple_like.cc: Likewise.
* testsuite/std/ranges/view.cc: Likewise.

12 months agolibstdc++: Remove dg-options "-std=c++20" from <span> and <cuchar> tests
Jonathan Wakely [Mon, 4 Sep 2023 15:01:16 +0000 (16:01 +0100)]
libstdc++: Remove dg-options "-std=c++20" from <span> and <cuchar> tests

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well.

There doesn't seem to be any reason they need to use strict -std=c++20
mode, so don't add the { dg-add-options strict_std } directive, just let
them use strict or non-strict modes.

libstdc++-v3/ChangeLog:

* testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc:
Remove dg-options.
* testsuite/23_containers/span/contiguous_range_neg.cc:
Likewise.
* testsuite/23_containers/span/everything.cc: Likewise.

12 months agolibstdc++: Replace dg-options "-std=c++20" with dg-add-options strict_std
Jonathan Wakely [Mon, 4 Sep 2023 13:11:54 +0000 (14:11 +0100)]
libstdc++: Replace dg-options "-std=c++20" with dg-add-options strict_std

The testsuite will automatically select C++20 for these tests now, and
removing the hardcoded -std option allows them to be tested for C++23
and C++26 as well. Because they test a problem seen with -std=c++20 add
the new { dg-add-options strict_std } directive so that the test runner
uses -std=c++NN not -std=gnu++NN.

libstdc++-v3/ChangeLog:

* testsuite/24_iterators/reverse_iterator/100639.cc: Remove
dg-options and add dg-add-options strict_std.
* testsuite/std/ranges/iota/93267.cc: Likewise.
* testsuite/std/ranges/iota/96042.cc: Likewise.
* testsuite/std/ranges/iota/size.cc: Likewise.
* testsuite/std/ranges/subrange/96042.cc: Likewise.

12 months agolibstdc++: Replace dg-options "-std=c++17" with dg-add-options strict_std
Jonathan Wakely [Mon, 4 Sep 2023 13:10:15 +0000 (14:10 +0100)]
libstdc++: Replace dg-options "-std=c++17" with dg-add-options strict_std

These tests can (and should) also be run for later standards, so replace
the { dg-options "-std=c++17" } with { dg-add-options strict_std }.

* testsuite/tr1/5_numerical_facilities/special_functions/07_conf_hyperg/compile_cxx17.cc:
Replace dg-options -std=c++17 with dg-add-options strict_std.
* testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/compile_cxx17.cc:
Likewise.

12 months agolibstdc++: Replace dg-options "-std=c++11" with dg-add-options strict_std
Jonathan Wakely [Mon, 4 Sep 2023 13:10:15 +0000 (14:10 +0100)]
libstdc++: Replace dg-options "-std=c++11" with dg-add-options strict_std

These tests can (and should) also be run for later standards, so replace
the { dg-options "-std=c++11" } with { dg-add-options strict_std } and a
target selector for c++11.

libstdc++-v3/ChangeLog:

* testsuite/23_containers/deque/48101-2_neg.cc: Replace
dg-options with target selector.
* testsuite/23_containers/forward_list/48101-2_neg.cc: Likewise.
* testsuite/23_containers/list/48101-2_neg.cc: Likewise.
* testsuite/23_containers/map/48101-2_neg.cc: Likewise.
* testsuite/23_containers/map/48101_neg.cc: Likewise.
* testsuite/23_containers/multimap/48101-2_neg.cc: Likewise.
* testsuite/23_containers/multimap/48101_neg.cc: Likewise.
* testsuite/23_containers/multiset/48101-2_neg.cc: Likewise.
* testsuite/23_containers/set/48101-2_neg.cc: Likewise.
* testsuite/23_containers/unordered_map/48101-2_neg.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/48101-2_neg.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/48101-2_neg.cc:
Likewise.
* testsuite/23_containers/unordered_set/48101-2_neg.cc:
Likewise.
* testsuite/23_containers/vector/48101-2_neg.cc: Likewise.

12 months agolibstdc++: Add support for running tests with multiple -std options
Jonathan Wakely [Fri, 1 Sep 2023 20:27:57 +0000 (21:27 +0100)]
libstdc++: Add support for running tests with multiple -std options

This copies the code from the compiler's gcc/testsuite/lib/g++-dg.exp so
that each test can be run multiple times, with different -std options.
This means that we can remove most { dg-options "-std=gnu++20" }
directives from tests, because the testsuite will automatically select
a set of -std options that includes that version.

Tests that should only run for a specific standard (e.g. ones that use
something like { dg-do run { target c++11_only } }) should still specify
that standard with { dg-options "-std=gnu++11" }, which overrides the
automatic selection. But a dg-options that selects a newer standard than
the default can be removed, because that standard will be selected
automatically based on a selector like { target c++20 } in the dg-do
directive. This will allow those tests to be run for more than just the
one they currently hardcode, so that e.g. std::format tests can be run
for all of C++20, C++23 and C++26. Currently that has to be done by
adding a second test file that uses a different dg-options line.

By default most tests will continue to run with only the default dialect
(currently -std=gnu++17) so that the time to run the entire testsuite is
not increased. We can revisit this later if increasing the testsuite
time (and coverage) is acceptable. Libstdc++ developers can easily
override the defaults to run for multiple versions. To test all
versions, either add 'set v3_std_list { 98 11 14 17 20 23 26 }' to
~/.dejagnurc or define GLIBCXX_TESTSUITE_STDS="98,11,14,17,20,23,26" in
the environment.

This should be more efficient than the current way to test with multple
standards, i.e. --target_board=unix{-std=c++14,-std=c++17,-std=c++20},
because today all tests with an explicit -std option hardcoded in them
get run for each target board variation but using the exact same
hardcoded -std every time. With the new approach you can just use the
default --target_board=unix and set GLIBCXX_TESTSUITE_STDS="14,17,20"
and now a test that has { target c++20 } will only run once (and be
UNSUPPORTED twice), instead of running with identical options three
times.

In order to support ~/.dejagnurc and $DEJAGNU files that need to work
with versions of GCC without this change, a new variable is added to
site.tmp to detect whether v3_std_list is supported. That allows e.g.

if { [info exists v3-use-std-list] } {
  set v3_std_list { 11 17 23 }
  set target_list { "unix{,-m32}" }
} else {
  set target_list { "unix{,-std=gnu++2b,-std=gnu++11,-m32}" }
}

libstdc++-v3/ChangeLog:

* doc/xml/manual/test.xml: Update documentation on running and
writing tests.
* doc/html/manual/test.html: Regenerate.
* testsuite/Makefile.am: Add v3-use-std-list to site.tmp
* testsuite/Makefile.in: Regenerate.
* testsuite/lib/dg-options.exp (add_options_for_strict_std): New
proc.
* testsuite/lib/libstdc++.exp (search_for): New utility proc.
(v3-dg-runtest): New proc to replace dg-runtest.
* testsuite/libstdc++-dg/conformance.exp: Use v3-dg-runtest.

12 months agolibstdc++: Fix 29_atomics/headers/atomic/types_std_c++2a_neg.cc for C++23
Jonathan Wakely [Fri, 15 Sep 2023 20:37:46 +0000 (21:37 +0100)]
libstdc++: Fix 29_atomics/headers/atomic/types_std_c++2a_neg.cc for C++23

This test fails when run as C++23 because the <bits/stdc++.h> PCH
includes <stdatomic.h> which declares ::memory_order, invalidating the
test's assumptions. Disable PCH so that the test verifies that <atomic>
doesn't declare ::memory_order, as originally intended.

Also fix the using-declaration which would be invalid even if the type
was declared in the global namespace, and adjust the expected error.

libstdc++-v3/ChangeLog:

* testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc:
Fix test to work for C++23 and C++26 too.

12 months agofix PR 111259 invalid zcmp mov predicate.
Fei Gao [Fri, 15 Sep 2023 01:20:08 +0000 (01:20 +0000)]
fix PR 111259 invalid zcmp mov predicate.

The code changes are from Palmer.

root cause:
In a gcc build with --enable-checking=yes, REGNO (op) checks
rtx code and expected code 'reg'. so a rtx with 'subreg' causes
an internal compiler error.

solution:
Restrict predicate to allow 'reg' only.

gcc/ChangeLog:

* config/riscv/predicates.md: Restrict predicate
to allow 'reg' only.
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
12 months agolibstdc++: Use C++20 constraints in <bit>
Patrick Palka [Fri, 15 Sep 2023 19:26:26 +0000 (15:26 -0400)]
libstdc++: Use C++20 constraints in <bit>

Using a type-constraint instead of enable_if_t in the return types of
these functions greatly reduces the size of their mangled names.  And by
now it's probably safe to assume recent compilers have sufficient C++20
concepts support to handle such constraints.

libstdc++-v3/ChangeLog:

* include/std/bit: Include <concepts>.
(byteswap): Use a type-constraint instead of enable_if_t
inside the return type, and use std::integral.
(_If_is_unsigned_integer): Replace with ...
(__unsigned_integer): ... this.
(rotl): Use a type-constraint instead of enable_if_t inside
the return type.
(countl_zero): Likewise.
(countl_one): Likewise.
(countr_zero): Likewise.
(countr_one): Likewise.
(popcount): Likewise.
(has_single_bit): Likewise.
(bit_ceil): Likewise.
(bit_floor): Likewise.
(bit_width): Likewise.

12 months agoanalyzer: support diagnostics that don't have a stmt
David Malcolm [Fri, 15 Sep 2023 17:47:42 +0000 (13:47 -0400)]
analyzer: support diagnostics that don't have a stmt

gcc/analyzer/ChangeLog:
* analyzer.cc (get_stmt_location): Handle null stmt.
* diagnostic-manager.cc (saved_diagnostic::saved_diagnostic): Copy
m_loc from ploc.
(saved_diagnostic::operator==): Compare m_loc.
(saved_diagnostic::calc_best_epath): Only use m_stmt_finder if
m_loc is unknown.
(dedupe_key::dedupe_key): Initialize m_loc.
(dedupe_key::operator==): Compare m_loc.
(dedupe_key::get_location): Use m_loc if it's known.
(dedupe_key::m_loc): New field.
(diagnostic_manager::emit_saved_diagnostic): Only call
get_emission_location if m_loc is unknown, preferring to use m_loc
if it's available.
* diagnostic-manager.h (saved_diagnostic::m_loc): New field.
(pending_location::pending_location): Initialize m_loc.  Add
overload taking a location_t rather than a stmt/stmt_finder.
(pending_location::m_loc): New field.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
12 months agoanalyzer: introduce pending_location
David Malcolm [Fri, 15 Sep 2023 17:47:42 +0000 (13:47 -0400)]
analyzer: introduce pending_location

No functional change intended.

gcc/analyzer/ChangeLog:
* analyzer.h (struct pending_location): New forward decl.
* diagnostic-manager.cc (saved_diagnostic::saved_diagnostic):
Replace params "enode", "snode", "stmt", and "stmt_finder" with
"ploc".
(diagnostic_manager::add_diagnostic): Likewise for both overloads.
* diagnostic-manager.h (saved_diagnostic::saved_diagnostic):
Likewise.
(struct pending_location): New.
(diagnostic_manager::add_diagnostic): Replace params "enode",
"snode", "stmt", and "stmt_finder" with "ploc".
* engine.cc (impl_region_model_context::warn): Update call to
add_diagnostic for above change.
(impl_sm_context::warn): Likewise.
(impl_region_model_context::on_state_leak): Likewise.
* infinite-recursion.cc
(exploded_graph::detect_infinite_recursion): Likewise.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
12 months agoanalyzer: handle volatile ops
David Malcolm [Fri, 15 Sep 2023 17:47:42 +0000 (13:47 -0400)]
analyzer: handle volatile ops

gcc/analyzer/ChangeLog:
* region-model.cc (region_model::get_gassign_result): Handle
volatile ops by using a conjured_svalue.

gcc/testsuite/ChangeLog:
* c-c++-common/analyzer/volatile-1.c: New test.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
12 months agoFortran: improve bounds-checking for array sections [PR30802]
Harald Anlauf [Fri, 15 Sep 2023 17:13:38 +0000 (19:13 +0200)]
Fortran: improve bounds-checking for array sections [PR30802]

gcc/fortran/ChangeLog:

PR fortran/30802
* trans-array.cc (trans_array_bound_check): Add optional argument
COMPNAME for explicit specification of array component name.
(array_bound_check_elemental): Helper function for generating
bounds-checking code for elemental dimensions.
(gfc_conv_expr_descriptor): Use bounds-checking also for elemental
dimensions, i.e. those not handled by the scalarizer.

gcc/testsuite/ChangeLog:

PR fortran/30802
* gfortran.dg/bounds_check_fail_6.f90: New test.

12 months agoMATCH: Improve zero_one_valued_p for cases without range information
Andrew Pinski [Thu, 14 Sep 2023 21:47:04 +0000 (14:47 -0700)]
MATCH: Improve zero_one_valued_p for cases without range information

I noticed we sometimes lose range information in forwprop due to a few
match and simplify patterns optimizing away casts. So the easier way
to these cases is to add a match for zero_one_valued_p wich mathes
a cast from another zero_one_valued_p.
This also adds the case of `x & zero_one_valued_p` as being zero_one_valued_p
which allows catching more cases too.

OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

gcc/ChangeLog:

* match.pd (zero_one_valued_p): Match a cast from a zero_one_valued_p.
Also match `a & zero_one_valued_p` too.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/bool-13.c: Update testcase as we now do
the MIN/MAX during forwprop1.

12 months agoMATCH: Fix `(1 >> X) != 0` pattern for vector types
Andrew Pinski [Thu, 14 Sep 2023 14:39:31 +0000 (07:39 -0700)]
MATCH: Fix `(1 >> X) != 0` pattern for vector types

I had missed that integer_onep can match vector types with uniform constant of `1`.
This means the shifter could be an scalar type and then doing a comparison against `0`
would be an invalid transformation.
This fixes the problem by adding a check for the type of the integer_onep to make
sure it is a INTEGRAL_TYPE_P (which does not match a vector type).

OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

PR tree-optimization/111414

gcc/ChangeLog:

* match.pd (`(1 >> X) != 0`): Check to see if
the integer_onep was an integral type (not a vector type).

gcc/testsuite/ChangeLog:

* gcc.c-torture/compile/pr111414-1.c: New test.

12 months agoAlways do PHI analysis and before loop analysis.
Andrew MacLeod [Wed, 13 Sep 2023 14:09:16 +0000 (10:09 -0400)]
Always do PHI analysis and before loop analysis.

PHI analysis wasn't being done if loop analysis found a value.  Always
do the PHI analysis, and run it for an iniital value before invoking
loop analysis.

* gimple-range-fold.cc (fold_using_range::range_of_phi): Always
run phi analysis, and do it before loop analysis.

12 months agoFix indentation.
Andrew MacLeod [Wed, 13 Sep 2023 13:58:39 +0000 (09:58 -0400)]
Fix indentation.

No functio0nal change, indentation was incorrect.

* gimple-range-fold.cc (fold_using_range::range_of_phi): Fix
indentation.

12 months agoFix PR111407--SSA corruption due to widening_mul opt on conflict across an abnormal...
Qing Zhao [Fri, 15 Sep 2023 13:46:52 +0000 (13:46 +0000)]
Fix PR111407--SSA corruption due to widening_mul opt on conflict across an abnormal edge

This is a bug in tree-ssa-math-opts.cc, when applying the widening mul
optimization, the compiler needs to check whether the operand is in a
ABNORMAL PHI, if YES, we should avoid the transformation.

PR tree-optimization/111407

gcc/ChangeLog:

* tree-ssa-math-opts.cc (convert_mult_to_widen): Avoid the transform
when one of the operands is subject to abnormal coalescing.

gcc/testsuite/ChangeLog:

* gcc.dg/pr111407.c: New test.

12 months agoada: Fix minor glitch in finish_record_type
Eric Botcazou [Thu, 7 Sep 2023 08:47:31 +0000 (10:47 +0200)]
ada: Fix minor glitch in finish_record_type

The size needs to be rounded up to the storage unit in all cases.

gcc/ada/

* gcc-interface/utils.cc (finish_record_type): Round the size in
the padding case as well.

12 months agoada: Explicitly analyze and expand null array aggregates
Piotr Trojanek [Thu, 7 Sep 2023 20:13:51 +0000 (22:13 +0200)]
ada: Explicitly analyze and expand null array aggregates

Null array aggregates have present but empty lists of expressions and
component associations. This confuses the previous code for ordinary
array aggregates, which assumes that if a list of either expressions or
component associations is present, then it is non-empty.

This patch adds explicit handling for null array aggregates to avoid
assertion failures in code for ordinary array aggregates.

gcc/ada/

* exp_aggr.adb (Build_Array_Aggr_Code): Don't build aggregate code
for null array aggregates.
* sem_aggr.adb (Resolve_Array_Aggregate): Don't examine formatting
of a null array aggregate.

12 months agoada: Fix wrong optimization of extended return for discriminated record type
Eric Botcazou [Thu, 7 Sep 2023 14:44:36 +0000 (16:44 +0200)]
ada: Fix wrong optimization of extended return for discriminated record type

This happens when the discriminants of the record type have default values.

gcc/ada/ChangeLog:

* inline.adb (Expand_Inlined_Call): In the case of a function call
that returns an unconstrained type and initializes an object, set
the No_Initialization flag on the new declaration of the object.

12 months agoada: Do not perform local-exception-to-goto optimization on barrier functions
Patrick Bernardi [Tue, 15 Aug 2023 19:52:57 +0000 (15:52 -0400)]
ada: Do not perform local-exception-to-goto optimization on barrier functions

The local-exception-to-goto optimization is no longer applied to entry
barrier functions as entry barriers cannot contain exception handlers and
this optimization interferes with another optimization that occurs for
simple barrier functions.

In particular, the simple barrier optimization removes the push error label
statements generated by the local-exception-to-goto optimization. This
causes a Storage_Error in GIGI when the restriction No_Exception_Propagation
is  active and a protected object contains more than one simple entry
barrier.

gcc/ada/

* exp_ch6.adb (Expand_N_Subprogram_Body): Do not perform
local-exception-to- goto optimization on barrier functions.
* exp_ch9.adb (Expand_Entry_Barrier): Simplify the if statement
around the simple barrier optimization and remove an old, no
longer relevant comment.

12 months agoada: Generate runtime restrictions list when the standard library is suppressed
Patrick Bernardi [Thu, 17 Aug 2023 20:24:13 +0000 (16:24 -0400)]
ada: Generate runtime restrictions list when the standard library is suppressed

With the introduction of Jorvik support into the light-tasking runtime comes
the requirement to detect voliations of runtime restrictions (for example
Max_Entry_Queue_Length) where previously they could be hard coded in the
runtime. This means we now need the binder to populate
System.System.Restrictions.Run_Time_Restrictions when the standard library
is suppressed.

gcc/ada/

* bindgen.adb (Gen_Adainit): Generate restrictions when standard
library is suppressed.
(Gen_Output_File_Ada): Ditto.
(Gen_Restrictions): Ditto.

12 months agoada: Fix internal error on misaligned component with variable nominal size
Eric Botcazou [Thu, 7 Sep 2023 08:53:39 +0000 (10:53 +0200)]
ada: Fix internal error on misaligned component with variable nominal size

The back-end cannot handle this kind of components even when they are small.

gcc/ada/

* exp_util.adb (Component_May_Be_Bit_Aligned): Do not return false
for a small component of a record type with a variant part.

12 months agoada: Fix internal error on aggregate nested in container aggregate
Eric Botcazou [Wed, 6 Sep 2023 07:37:29 +0000 (09:37 +0200)]
ada: Fix internal error on aggregate nested in container aggregate

This handles the case where a component association is present.

gcc/ada/

* exp_aggr.adb (Convert_To_Assignments): In the case of a
component association, call Is_Container_Aggregate on the parent's
parent.
(Expand_Array_Aggregate): Likewise.

12 months agoada: Remove GNAT Pro details regarding mold
Kévin Le Gouguec [Wed, 6 Sep 2023 08:02:26 +0000 (10:02 +0200)]
ada: Remove GNAT Pro details regarding mold

gcc/ada/

* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Remove
extended discussion regarding mold run-time dependencies;
packaging changes in GNAT Pro have made them obsolete.

12 months agoada: Fix internal error on expression function with Refined_Post aspect
Eric Botcazou [Tue, 5 Sep 2023 11:21:24 +0000 (13:21 +0200)]
ada: Fix internal error on expression function with Refined_Post aspect

This occurs when the expression function calls a protected function and the
-gnata switch is specified, because the compiler wrongly freezes the called
function when analyzing the expression function, a fallout of the wrapping
scheme used for the Post and Refined_Post aspects.

gcc/ada/

* sem_res.adb (Resolve_Call): When the target is an entity, do not
freeze it if the current scope is the inner wrapper function built
for an expression function with a Post or Refined_Post aspect.

12 months agoada: Clean up scope depth and related code (tech debt)
Bob Duff [Tue, 5 Sep 2023 18:40:22 +0000 (14:40 -0400)]
ada: Clean up scope depth and related code (tech debt)

The main point of this patch is to remove the special case
for Atree.F_Scope_Depth_Value in the Assert that Field_Present
in Get_Field_Value. Pulling on that thread leads to lots
of related cleanup.

gcc/ada/ChangeLog:

* atree.adb (Node_Kind_Table): Specify parameter explicitly in
GNAT.Table instantiations. Use fully qualified references instead
of relying on use clauses.
(Get_Field_Value): Remove special case for F_Scope_Depth_Value.
That is, enable the Field_Present check in that case.
(It was already enabled for all other fields.) Violations of this
check were already fixed.
(Print_Node_Statistics): Sort the output in decreasing order of
frequencies.
(Print_Field_Statistics): Likewise (sort).
* accessibility.adb (Accessibility_Level): Pass Allow_Alt_Model in
recursive calls. Apparently, an oversight.
(Innermost_Master_Scope_Depth): Need to special-case the 'Old
attribute and allocators.
* einfo-utils.ads (Scope_Depth): Use Scope_Kind_Id to get
predicate checks.
(Scope_Depth_Set): Likewise.
(Scope_Depth_Default_0): Likewise.
* einfo-utils.adb: As for spec.
* frontend.adb (Frontend): Remove unnecessary "return;".
* gen_il-types.ads (Scope_Kind): New union type.
* gen_il-gen-gen_entities.adb (Scope_Kind): New union type.
* sem.ads: Move "with Einfo.Entities;" from body to spec.
(Scope_Stack_Entry): Declare Entity to be of Scope_Kind_Id to get
predicate checks. We had previously been putting non-scopes on the
scope stack; this prevents such anomalies.
* sem.adb: Move "with Einfo.Entities;" from body to spec.
* sem_ch8.ads: Move "with Einfo.Entities;" from body to spec. Add
"with Types;".
(Push_Scope): Use Scope_Kind_Id to get predicate checks.
* sem_ch8.adb: Move "with Einfo.Entities;" from body to spec. Add
"with Types;".
(Push_Scope): Use Scope_Kind_Id to get predicate checks.
(Pop_Scope): Use Scope_Kind_Id on popped entity to get predicate
checks. This prevents anomalies where a scope pushed onto the
stack is later mutated to a nonscope before being popped.
* sem_util.ads (Find_Enclosing_Scope): Add postcondition to ensure
that the enclosing scope of a node N is not the same node N.
Clearly, N does not enclose itself.
* sem_util.adb (Find_Enclosing_Scope): There were several bugs
where Find_Enclosing_Scope(N) = N. For example, if N is an entity,
then we would typically go up to its declaration, and then back
down to the Defining_Entity of the declaration, which is N itself.
There were other cases where Find_Enclosing_Scope of an entity
disagreed with Scope. Clearly, Find_Enclosing_Scope and Scope
should agree (when both are defined). Such bugs caused latent bugs
in accessibility.adb related to 'Old, and fixing bugs here caused
such bugs to be revealed. These are fixed by calling Scope when N
is an entity.

Co-authored-by: Ronan Desplanques <desplanques@adacore.com>
12 months agoada: Crash on creation of extra formals on type extension
Javier Miranda [Tue, 5 Sep 2023 06:57:10 +0000 (06:57 +0000)]
ada: Crash on creation of extra formals on type extension

Revert previous patch and fix the pending issue.

gcc/ada/

* accessibility.ads (Needs_Result_Accessibility_Extra_Formal):
Removed.
* accessibility.adb (Needs_Result_Accessibility_Level_Param):
Removed.
(Needs_Result_Accessibility_Extra_Formal): Removed.
(Needs_Result_Accessibility_Level): Revert previous patch.
* sem_ch6.adb (Parent_Subprogram): Handle function overriding an
enumeration literal.
(Create_Extra_Formals): Ensure that the parent subprogram has all
its extra formals.

12 months agoRISC-V: Fix using wrong mode to get reduction insn vlmax
Lehua Ding [Fri, 15 Sep 2023 11:13:42 +0000 (19:13 +0800)]
RISC-V: Fix using wrong mode to get reduction insn vlmax

This patch fix using wrong mode when emit vlmax reduction insn. We should
use src operand instead dest operand (which always LMUL=m1) to get the vlmax
length. This patch alse remove dest_mode and mask_mode from insn_expander
constructor, which can be geted by insn_flags.

gcc/ChangeLog:

* config/riscv/riscv-protos.h (enum insn_flags): Change name.
(enum insn_type): Ditto.
* config/riscv/riscv-v.cc (get_mask_mode_from_insn_flags): Removed.
(emit_vlmax_insn): Adjust.
(emit_nonvlmax_insn): Adjust.
(emit_vlmax_insn_lra): Adjust.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/vsetvl/wredsum_vlmax.c: New test.

12 months agofortran: Remove reference count update [PR108957]
Mikael Morin [Fri, 15 Sep 2023 11:40:08 +0000 (13:40 +0200)]
fortran: Remove reference count update [PR108957]

Remove one reference count incrementation following the assignment of a
symbol pointer to a local variable.  Most symbol pointers are "weak" pointer
and don't need any reference count update when they are assigned, and it is
especially the case of local variables.

This fixes a memory leak with the testcase from the PR (not included).

PR fortran/108957

gcc/fortran/ChangeLog:

* gfortran.h (gfc_symbol): Add comment documenting reference counting.
* parse.cc (parse_interface): Remove reference count incrementation.

12 months agotest: Block SLP check of slp-35.c for vect_strided5
Juzhe-Zhong [Fri, 15 Sep 2023 10:06:03 +0000 (18:06 +0800)]
test: Block SLP check of slp-35.c for vect_strided5

gcc/testsuite/ChangeLog:

* gcc.dg/vect/slp-35.c: Block SLP check for vect_strided5 targets.

12 months agotest: Block SLP check of slp-34.c for vect_strided5
Juzhe-Zhong [Fri, 15 Sep 2023 10:00:24 +0000 (18:00 +0800)]
test: Block SLP check of slp-34.c for vect_strided5

Since RISC-V use vsseg5 which is the vect_store_lanes with stride 5
if failed on RISC-V.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/slp-34.c: Block check for vect_strided5.

12 months agotest: Block vect_strided5 for slp-34-big-array.c SLP check
Juzhe-Zhong [Fri, 15 Sep 2023 09:54:44 +0000 (17:54 +0800)]
test: Block vect_strided5 for slp-34-big-array.c SLP check

If failed on RISC-V since it use vect_store_lanes with array 5.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/slp-34-big-array.c: Block SLP check for vect_strided5.

12 months agotest: Block slp-16.c check for target support vect_strided6
Juzhe-Zhong [Fri, 15 Sep 2023 09:03:49 +0000 (17:03 +0800)]
test: Block slp-16.c check for target support vect_strided6

This testcase FAIL in RISC-V because RISC-V support vect_load_lanes with 6.
FAIL: gcc.dg/vect/slp-16.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorizing stmts using SLP" 2
FAIL: gcc.dg/vect/slp-16.c scan-tree-dump-times vect "vectorizing stmts using SLP" 2

Since it use vlseg6 (vect_load_lanes with array size = 6)

gcc/testsuite/ChangeLog:

* gcc.dg/vect/slp-16.c: Block vect_strided6.
* lib/target-supports.exp: Add strided type.

12 months agotest: Isolate slp-1.c check of target supports vect_strided5
Juzhe-Zhong [Fri, 15 Sep 2023 09:16:36 +0000 (17:16 +0800)]
test: Isolate slp-1.c check of target supports vect_strided5

This test failed in RISC-V:
FAIL: gcc.dg/vect/slp-1.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorizing stmts using SLP" 4
FAIL: gcc.dg/vect/slp-1.c scan-tree-dump-times vect "vectorizing stmts using SLP" 4

Because this loop:
  /* SLP with unrolling by 8.  */
  for (i = 0; i < N; i++)
    {
      out[i*5] = 8;
      out[i*5 + 1] = 7;
      out[i*5 + 2] = 81;
      out[i*5 + 3] = 28;
      out[i*5 + 4] = 18;
    }

is using vect_load_lanes with array size = 5.
instead of SLP.

When we adjust the COST of LANES load store, then it will use SLP.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/slp-1.c: Add vect_stried5.

12 months agotest: Remove XPASS for RISCV
Juzhe-Zhong [Fri, 15 Sep 2023 08:30:04 +0000 (16:30 +0800)]
test: Remove XPASS for RISCV

Like ARM SVE, this test cause FAILs of XPASS:
XPASS: gcc.dg/Wstringop-overflow-47.c pr97027 (test for warnings, line 72)
XPASS: gcc.dg/Wstringop-overflow-47.c pr97027 (test for warnings, line 77)
XPASS: gcc.dg/Wstringop-overflow-47.c pr97027 note (test for warnings, line 68)

on RISC-V

gcc/testsuite/ChangeLog:

* gcc.dg/Wstringop-overflow-47.c: Add riscv.

12 months agoRISC-V: Refactor expand_reduction and cleanup enum reduction_type
Lehua Ding [Fri, 15 Sep 2023 03:45:55 +0000 (11:45 +0800)]
RISC-V: Refactor expand_reduction and cleanup enum reduction_type

This patch refactors expand_reduction, remove the reduction_type argument
and add insn_flags argument to determine the passing of the operands.
ops has also been modified to restrict it to only two cases and to remove
operand that are not in use.

gcc/ChangeLog:

* config/riscv/autovec-opt.md: Adjust.
* config/riscv/autovec.md: Ditto.
* config/riscv/riscv-protos.h (enum class): Delete enum reduction_type.
(expand_reduction): Adjust expand_reduction prototype.
* config/riscv/riscv-v.cc (need_mask_operand_p): New helper function.
(expand_reduction): Refactor expand_reduction.

12 months agolibstdc++: Fix constraints for std::variant default constructor
Jonathan Wakely [Thu, 14 Sep 2023 09:27:09 +0000 (10:27 +0100)]
libstdc++: Fix constraints for std::variant default constructor

The standard says the default ctor should be constrained, not deleted.
Our use of a defaulted default ctor and _Enable_default_constructor base
class results in it being deleted.

libstdc++-v3/ChangeLog:

* include/std/variant (variant): Remove derivation from
_Enable_default_constructor base class.
(variant::variant()): Constrain.
* testsuite/20_util/variant/default_ctor.cc: New test.

12 months agolibstdc++: Remove non-void static assertions in variant's std::get [PR111172]
Jonathan Wakely [Tue, 12 Sep 2023 20:28:38 +0000 (21:28 +0100)]
libstdc++: Remove non-void static assertions in variant's std::get [PR111172]

A void template argument would cause a substitution failure when trying
to form a reference for the return type, so the function body would
never be instantiated.

libstdc++-v3/ChangeLog:

PR libstdc++/111172
* include/std/variant (get<T>): Remove !is_void static
assertions.

12 months agolibstdc++: Add operator bool to <charconv> result types (P2497R0)
Jonathan Wakely [Thu, 17 Aug 2023 23:24:46 +0000 (00:24 +0100)]
libstdc++: Add operator bool to <charconv> result types (P2497R0)

C++26 adds these convenience conversions.

libstdc++-v3/ChangeLog:

* include/bits/version.def (to_chars): Define new value for
C++26.
* include/bits/version.h: Regenerate.
* include/std/charconv (to_chars_result::operator bool): New
function.
(from_chars_result::operator bool): New function.
* testsuite/20_util/to_chars/version.cc: Update expected value.
* testsuite/20_util/from_chars/result.cc: New test.
* testsuite/20_util/to_chars/result.cc: New test.

12 months agoaarch64: Fix loose ldpstp check [PR111411]
Richard Sandiford [Fri, 15 Sep 2023 08:19:14 +0000 (09:19 +0100)]
aarch64: Fix loose ldpstp check [PR111411]

aarch64_operands_ok_for_ldpstp contained the code:

  /* One of the memory accesses must be a mempair operand.
     If it is not the first one, they need to be swapped by the
     peephole.  */
  if (!aarch64_mem_pair_operand (mem_1, GET_MODE (mem_1))
       && !aarch64_mem_pair_operand (mem_2, GET_MODE (mem_2)))
    return false;

But the requirement isn't just that one of the accesses must be a
valid mempair operand.  It's that the lower access must be, since
that's the access that will be used for the instruction operand.

gcc/
PR target/111411
* config/aarch64/aarch64.cc (aarch64_operands_ok_for_ldpstp): Require
the lower memory access to a mem-pair operand.

gcc/testsuite/
PR target/111411
* gcc.dg/rtl/aarch64/pr111411.c: New test.

12 months agoLoongArch: Reimplement multilib build option handling.
Yang Yujie [Wed, 13 Sep 2023 09:52:14 +0000 (17:52 +0800)]
LoongArch: Reimplement multilib build option handling.

Library build options from --with-multilib-list used to be processed with
*self_spec, which missed the driver's initial canonicalization.  This
caused limitations on CFLAGS override and the use of driver-only options
like -m[no]-lsx.

The problem is solved by promoting the injection rules of --with-multilib-list
options to the first element of DRIVER_SELF_SPECS, to make them execute before
the canonialization.  The library-build options are also hard-coded in
the driver and can be used conveniently by the builders of other non-gcc
libraries via the use of -fmultiflags.

Bootstrapped and tested on loongarch64-linux-gnu.

ChangeLog:

* config-ml.in: Remove unneeded loongarch clause.
* configure.ac: Register custom makefile fragments mt-loongarch-*
for loongarch targets.
* configure: Regenerate.

config/ChangeLog:

* mt-loongarch-mlib: New file.  Pass -fmultiflags when building
target libraries (FLAGS_FOR_TARGET).
* mt-loongarch-elf: New file.
* mt-loongarch-gnu: New file.

gcc/ChangeLog:

* config.gcc: Pass the default ABI via TM_MULTILIB_CONFIG.
* config/loongarch/loongarch-driver.h: Invoke MLIB_SELF_SPECS
before the driver canonicalization routines.
* config/loongarch/loongarch.h: Move definitions of CC1_SPEC etc.
to loongarch-driver.h
* config/loongarch/t-linux: Move multilib-related definitions to
t-multilib.
* config/loongarch/t-multilib: New file.  Inject library build
options obtained from --with-multilib-list.
* config/loongarch/t-loongarch: Same.

This page took 0.128852 seconds and 5 git commands to generate.