diff -Nrcpad gcc-12.1.0/ChangeLog gcc-12.2.0/ChangeLog *** gcc-12.1.0/ChangeLog Fri May 6 07:30:56 2022 --- gcc-12.2.0/ChangeLog Fri Aug 19 08:10:14 2022 *************** *** 1,3 **** --- 1,7 ---- + 2022-08-19 Release Manager + + * GCC 12.2.0 released. + 2022-05-06 Release Manager * GCC 12.1.0 released. diff -Nrcpad gcc-12.1.0/INSTALL/binaries.html gcc-12.2.0/INSTALL/binaries.html *** gcc-12.1.0/INSTALL/binaries.html Fri May 6 07:31:22 2022 --- gcc-12.2.0/INSTALL/binaries.html Fri Aug 19 08:15:37 2022 *************** A GNU Manual *** 19,25 **** You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. --> ! Installing GCC: Binaries --- 19,25 ---- You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. --> ! Installing GCC: Binaries *************** You have freedom to copy and modify this *** 33,46 **** --- 33,55 ---- ! Installing GCC: Building --- 19,25 ---- You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. --> ! Installing GCC: Building *************** You have freedom to copy and modify this *** 33,46 **** --- 33,55 ---- ! Installing GCC: Configuration --- 19,25 ---- You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. --> ! Installing GCC: Configuration *************** You have freedom to copy and modify this *** 33,46 **** --- 33,55 ---- ! Downloading GCC --- 19,25 ---- You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. --> ! Downloading GCC *************** You have freedom to copy and modify this *** 33,46 **** --- 33,55 ---- ! Installing GCC: Final installation --- 19,25 ---- You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. --> ! Installing GCC: Final installation *************** You have freedom to copy and modify this *** 33,46 **** --- 33,55 ---- ! Installing GCC: GNU Free Documentation License --- 19,25 ---- You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. --> ! Installing GCC: GNU Free Documentation License *************** You have freedom to copy and modify this *** 33,46 **** --- 33,55 ---- ! Installing GCC --- 19,25 ---- You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. --> ! Installing GCC *************** You have freedom to copy and modify this *** 33,46 **** --- 33,55 ---- ! Prerequisites for GCC --- 19,25 ---- You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. --> ! Prerequisites for GCC *************** You have freedom to copy and modify this *** 33,46 **** --- 33,55 ---- ! Host/Target specific installation notes for GCC --- 19,25 ---- You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. --> ! Host/Target specific installation notes for GCC *************** You have freedom to copy and modify this *** 33,46 **** --- 33,55 ----
!

aarch64*-*-*

Binutils pre 2.24 does not have support for selecting -mabi and does not support ILP32. If it is used to build GCC 4.9 or later, GCC will not support option -mabi=ilp32. --- 180,187 ----


! !

aarch64*-*-*

Binutils pre 2.24 does not have support for selecting -mabi and does not support ILP32. If it is used to build GCC 4.9 or later, GCC will not support option -mabi=ilp32. *************** protections by default. This mechanism *** 208,224 **** of the options are given at configure time.


!

alpha*-*-*

This section contains general configuration information for all Alpha-based platforms using ELF. In addition to reading this section, please read all other sections that match your target.


!

amd64-*-solaris2*

This is a synonym for ‘x86_64-*-solaris2*’.


!

amdgcn-*-amdhsa

AMD GCN GPU target.

Instead of GNU Binutils, you will need to install LLVM 6, or later, and copy --- 218,237 ---- of the options are given at configure time.


! !

alpha*-*-*

This section contains general configuration information for all Alpha-based platforms using ELF. In addition to reading this section, please read all other sections that match your target.


! !

amd64-*-solaris2*

This is a synonym for ‘x86_64-*-solaris2*’.


! !

amdgcn-*-amdhsa

AMD GCN GPU target.

Instead of GNU Binutils, you will need to install LLVM 6, or later, and copy *************** section, please read all other sections *** 236,254 **** on the GPU.


!

arc-*-elf32

Use ‘configure --target=arc-elf32 --with-cpu=cpu --enable-languages="c,c++"’ to configure GCC, with cpu being one of ‘arc600’, ‘arc601’, or ‘arc700’.


!

arc-linux-uclibc

Use ‘configure --target=arc-linux-uclibc --with-cpu=arc700 --enable-languages="c,c++"’ to configure GCC.


!

arm-*-eabi

ARM-family processors.

Building the Ada frontend commonly fails (an infinite loop executing --- 249,270 ---- on the GPU.


! !

arc-*-elf32

Use ‘configure --target=arc-elf32 --with-cpu=cpu --enable-languages="c,c++"’ to configure GCC, with cpu being one of ‘arc600’, ‘arc601’, or ‘arc700’.


! !

arc-linux-uclibc

Use ‘configure --target=arc-linux-uclibc --with-cpu=arc700 --enable-languages="c,c++"’ to configure GCC.


! !

arm-*-eabi

ARM-family processors.

Building the Ada frontend commonly fails (an infinite loop executing *************** or ‘arc700’. *** 256,262 **** GNAT 4.6, 4.9 or 5 release branches are known to succeed.


!

avr

ATMEL AVR-family micro controllers. These are used in embedded applications. There are no standard Unix configurations. See “AVR Options” in the main manual --- 272,279 ---- GNAT 4.6, 4.9 or 5 release branches are known to succeed.


! !

avr

ATMEL AVR-family micro controllers. These are used in embedded applications. There are no standard Unix configurations. See “AVR Options” in the main manual *************** can also be obtained from: *** 273,286 ****

The following error: !

!
Error: register required
  

indicates that you should upgrade to a newer version of the binutils.


!

Blackfin

The Blackfin processor, an Analog Devices DSP. See “Blackfin Options” in the main manual

--- 290,304 ----

The following error: !

!
Error: register required
  

indicates that you should upgrade to a newer version of the binutils.


! !

Blackfin

The Blackfin processor, an Analog Devices DSP. See “Blackfin Options” in the main manual

*************** See “Blackfin Options” in th *** 288,294 **** are available at https://sourceforge.net/projects/adi-toolchain/.


!

CR16

The CR16 CompactRISC architecture is a 16-bit architecture. This architecture is used in embedded applications.

--- 306,313 ---- are available at https://sourceforge.net/projects/adi-toolchain/.


! !

CR16

The CR16 CompactRISC architecture is a 16-bit architecture. This architecture is used in embedded applications.

*************** GCC for building a CR16 elf cross-c *** 302,308 **** configure GCC for building a CR16 uclinux cross-compiler.


!

CRIS

CRIS is a CPU architecture in Axis Communications systems-on-a-chip, for example the ETRAX series. These are used in embedded applications.

--- 321,328 ---- configure GCC for building a CR16 uclinux cross-compiler.


! !

CRIS

CRIS is a CPU architecture in Axis Communications systems-on-a-chip, for example the ETRAX series. These are used in embedded applications.

*************** for a list of CRIS-specific options. *** 312,318 ****

Use ‘configure --target=cris-elf’ to configure GCC for building a cross-compiler for CRIS.


!

DOS

Please have a look at the binaries page.

You cannot install GCC by itself on MSDOS; it will not compile under --- 332,339 ----

Use ‘configure --target=cris-elf’ to configure GCC for building a cross-compiler for CRIS.


!

!

DOS

Please have a look at the binaries page.

You cannot install GCC by itself on MSDOS; it will not compile under *************** compilation package DJGPP, which include *** 321,332 **** and includes all the necessary compilation tools and libraries.


!

epiphany-*-elf

Adapteva Epiphany. This configuration is intended for embedded systems.


!

*-*-freebsd*

In order to better utilize FreeBSD base system functionality and match the configuration of the system compiler, GCC 4.5 and above as well as GCC 4.4 past 2010-06-20 leverage SSP support in libc (which is present --- 342,355 ---- and includes all the necessary compilation tools and libraries.


! !

epiphany-*-elf

Adapteva Epiphany. This configuration is intended for embedded systems.


! !

*-*-freebsd*

In order to better utilize FreeBSD base system functionality and match the configuration of the system compiler, GCC 4.5 and above as well as GCC 4.4 past 2010-06-20 leverage SSP support in libc (which is present *************** properly on FreeBSD prior to the FreeBSD *** 357,368 **** after 2.16.1.


!

ft32-*-elf

The FT32 processor. This configuration is intended for embedded systems.


!

h8300-hms

Renesas H8/300 series of processors.

Please have a look at the binaries page. --- 380,393 ---- after 2.16.1.


! !

ft32-*-elf

The FT32 processor. This configuration is intended for embedded systems.


! !

h8300-hms

Renesas H8/300 series of processors.

Please have a look at the binaries page. *************** first three arguments in function calls *** 373,379 **** longer a multiple of 2 bytes.


!

hppa*-hp-hpux*

Support for HP-UX version 9 and older was discontinued in GCC 3.4.

We require using gas/binutils on all hppa platforms. Version 2.19 or --- 398,405 ---- longer a multiple of 2 bytes.


! !

hppa*-hp-hpux*

Support for HP-UX version 9 and older was discontinued in GCC 3.4.

We require using gas/binutils on all hppa platforms. Version 2.19 or *************** a list of the predefines used with each *** 423,429 ****

More specific information to ‘hppa*-hp-hpux*’ targets follows.


!

hppa*-hp-hpux10

For hpux10.20, we highly recommend you pick up the latest sed patch PHCO_19798 from HP.

--- 449,456 ----

More specific information to ‘hppa*-hp-hpux*’ targets follows.


! !

hppa*-hp-hpux10

For hpux10.20, we highly recommend you pick up the latest sed patch PHCO_19798 from HP.

*************** problems in using C++ on this target. H *** 433,439 **** with the one implemented under HP-UX 11 using secondary definitions.


!

hppa*-hp-hpux11

GCC 3.0 and up support HP-UX 11. GCC 2.95.x is not supported and cannot be used to compile GCC 3.0 and up.

--- 460,467 ---- with the one implemented under HP-UX 11 using secondary definitions.


! !

hppa*-hp-hpux11

GCC 3.0 and up support HP-UX 11. GCC 2.95.x is not supported and cannot be used to compile GCC 3.0 and up.

*************** versioning with --disable-symvers< *** 536,542 **** supported, so --enable-threads=dce does not work.


!

*-*-linux-gnu

The .init_array and .fini_array sections are enabled unconditionally which requires at least glibc 2.1 and binutils 2.12.

--- 564,571 ---- supported, so --enable-threads=dce does not work.


! !

*-*-linux-gnu

The .init_array and .fini_array sections are enabled unconditionally which requires at least glibc 2.1 and binutils 2.12.

*************** in glibc 2.2.5 and later. More informat *** 545,551 **** libstdc++-v3 documentation.


!

i?86-*-linux*

As of GCC 3.3, binutils 2.13.1 or later is required for this platform. See bug 10877 for more information.

--- 574,581 ---- libstdc++-v3 documentation.


! !

i?86-*-linux*

As of GCC 3.3, binutils 2.13.1 or later is required for this platform. See bug 10877 for more information.

*************** possible you have a hardware problem. F *** 554,560 **** found on www.bitwizard.nl.


!

i?86-*-solaris2*

Use this for Solaris 11.3 or later on x86 and x86-64 systems. Starting with GCC 4.7, there is also a 64-bit ‘amd64-*-solaris2*’ or ‘x86_64-*-solaris2*’ configuration that corresponds to --- 584,591 ---- found on www.bitwizard.nl.


! !

i?86-*-solaris2*

Use this for Solaris 11.3 or later on x86 and x86-64 systems. Starting with GCC 4.7, there is also a 64-bit ‘amd64-*-solaris2*’ or ‘x86_64-*-solaris2*’ configuration that corresponds to *************** to configure with --without-gnu-ld *** 578,584 **** guarantee use of Solaris ld.


!

ia64-*-linux

IA-64 processor (also known as IPF, or Itanium Processor Family) running GNU/Linux.

--- 609,616 ---- guarantee use of Solaris ld.


! !

ia64-*-linux

IA-64 processor (also known as IPF, or Itanium Processor Family) running GNU/Linux.

*************** running GNU/Linux. *** 587,593 **** later.


!

ia64-*-hpux*

Building GCC on this target requires the GNU Assembler. The bundled HP assembler will not work. To prevent GCC from using the wrong assembler, the option --with-gnu-as may be necessary. --- 619,626 ---- later.


! !

ia64-*-hpux*

Building GCC on this target requires the GNU Assembler. The bundled HP assembler will not work. To prevent GCC from using the wrong assembler, the option --with-gnu-as may be necessary. *************** removed and the system libunwind library *** 600,606 ****


!

*-ibm-aix*

Support for AIX version 3 and older was discontinued in GCC 3.4. Support for AIX version 4.2 and older was discontinued in GCC 4.5.

--- 633,640 ----


! !

*-ibm-aix*

Support for AIX version 3 and older was discontinued in GCC 3.4. Support for AIX version 4.2 and older was discontinued in GCC 4.5.

*************** with an earlier release of GCC is recomm *** 617,624 **** requires a larger data segment, which can be enabled through the LDR_CNTRL environment variable, e.g.,

!
!
% LDR_CNTRL=MAXDATA=0x50000000
  % export LDR_CNTRL
  
--- 651,658 ---- requires a larger data segment, which can be enabled through the LDR_CNTRL environment variable, e.g.,

!
!
% LDR_CNTRL=MAXDATA=0x50000000
  % export LDR_CNTRL
  
*************** with a version of GCC built for an earli *** 629,636 ****

To speed up the configuration phases of bootstrapping and installing GCC, one may use GNU Bash instead of AIX /bin/sh, e.g.,

!
!
% CONFIG_SHELL=/opt/freeware/bin/bash
  % export CONFIG_SHELL
  
--- 663,670 ----

To speed up the configuration phases of bootstrapping and installing GCC, one may use GNU Bash instead of AIX /bin/sh, e.g.,

!
!
% CONFIG_SHELL=/opt/freeware/bin/bash
  % export CONFIG_SHELL
  
*************** APAR IY26685 (AIX 4.3) or APAR IY25528 ( *** 680,686 **** fix for another AIX Assembler bug and a co-dependent AIX Archiver fix referenced as APAR IY53606 (AIX 5.2) or as APAR IY54774 (AIX 5.1)

!

libstdc++’ in GCC 3.4 increments the major version number of the shared object and GCC installation places the libstdc++.a shared library in a common location which will overwrite the and GCC 3.3 version of the shared library. Applications either need to be --- 714,720 ---- fix for another AIX Assembler bug and a co-dependent AIX Archiver fix referenced as APAR IY53606 (AIX 5.2) or as APAR IY54774 (AIX 5.1)

!

libstdc++’ in GCC 3.4 increments the major version number of the shared object and GCC installation places the libstdc++.a shared library in a common location which will overwrite the and GCC 3.3 version of the shared library. Applications either need to be *************** multilib libstdc++.a instal *** 694,713 ****

Extract the shared objects from the currently installed libstdc++.a archive: !

!
% ar -x libstdc++.a libstdc++.so.4 libstdc++.so.5
  

Enable the ‘F_LOADONLY’ flag so that the shared object will be available for runtime dynamic loading, but not linking: !

!
% strip -e libstdc++.so.4 libstdc++.so.5
  

Archive the runtime-only shared object in the GCC 3.4 libstdc++.a archive: !

!
% ar -q libstdc++.a libstdc++.so.4 libstdc++.so.5
  

Eventually, the --- 728,747 ----

Extract the shared objects from the currently installed libstdc++.a archive: !

!
% ar -x libstdc++.a libstdc++.so.4 libstdc++.so.5
  

Enable the ‘F_LOADONLY’ flag so that the shared object will be available for runtime dynamic loading, but not linking: !

!
% strip -e libstdc++.so.4 libstdc++.so.5
  

Archive the runtime-only shared object in the GCC 3.4 libstdc++.a archive: !

!
% ar -q libstdc++.a libstdc++.so.4 libstdc++.so.5
  

Eventually, the *************** environment variable to ‘C--with-cpu-cpu_type.


!

iq2000-*-elf

Vitesse IQ2000 processors. These are used in embedded applications. There are no standard Unix configurations.


!

lm32-*-elf

Lattice Mico32 processor. This configuration is intended for embedded systems.


!

lm32-*-uclinux

Lattice Mico32 processor. This configuration is intended for embedded systems running uClinux.


!

LoongArch

LoongArch processor. The following LoongArch targets are available:

--- 798,823 ---- switch and using the configure option --with-cpu-cpu_type.


! !

iq2000-*-elf

Vitesse IQ2000 processors. These are used in embedded applications. There are no standard Unix configurations.


! !

lm32-*-elf

Lattice Mico32 processor. This configuration is intended for embedded systems.


! !

lm32-*-uclinux

Lattice Mico32 processor. This configuration is intended for embedded systems running uClinux.


! !

LoongArch

LoongArch processor. The following LoongArch targets are available:

*************** with a small set of possible suffixes to *** 809,825 **** https://github.com/loongson/LoongArch-Documentation.


!

m32c-*-elf

Renesas M32C processor. This configuration is intended for embedded systems.


!

m32r-*-elf

Renesas M32R processor. This configuration is intended for embedded systems.


!

m68k-*-*

By default, ‘m68k-*-elf*’, ‘m68k-*-rtems’, ‘m68k-*-uclinux’ and ‘m68k-*-linux’ --- 847,866 ---- https://github.com/loongson/LoongArch-Documentation.


! !

m32c-*-elf

Renesas M32C processor. This configuration is intended for embedded systems.


! !

m32r-*-elf

Renesas M32R processor. This configuration is intended for embedded systems.


! !

m68k-*-*

By default, ‘m68k-*-elf*’, ‘m68k-*-rtems’, ‘m68k-*-uclinux’ and ‘m68k-*-linux’ *************** be a -mcpu argument or one *** 845,863 ****

GCC requires at least binutils version 2.17 on these targets.


!

m68k-*-uclinux

GCC 4.3 changed the uClinux configuration so that it uses the ‘m68k-linux-gnu’ ABI rather than the ‘m68k-elf’ ABI. It also added improved support for C++ and flat shared libraries, both of which were ABI changes.


!

microblaze-*-elf

Xilinx MicroBlaze processor. This configuration is intended for embedded systems.


!

mips-*-*

If on a MIPS system you get an error message saying “does not have gp sections for all it’s [sic] sectons [sic]”, don’t worry about it. This happens whenever you use GAS with the MIPS linker, but there is not --- 886,907 ----

GCC requires at least binutils version 2.17 on these targets.


! !

m68k-*-uclinux

GCC 4.3 changed the uClinux configuration so that it uses the ‘m68k-linux-gnu’ ABI rather than the ‘m68k-elf’ ABI. It also added improved support for C++ and flat shared libraries, both of which were ABI changes.


! !

microblaze-*-elf

Xilinx MicroBlaze processor. This configuration is intended for embedded systems.


! !

mips-*-*

If on a MIPS system you get an error message saying “does not have gp sections for all it’s [sic] sectons [sic]”, don’t worry about it. This happens whenever you use GAS with the MIPS linker, but there is not *************** the use of break, use the --with-d *** 897,907 **** use traps on systems that support them.


!

moxie-*-elf

The moxie processor.


!

msp430-*-elf*

TI MSP430 processor. This configuration is intended for embedded systems.

--- 941,953 ---- use traps on systems that support them.


! !

moxie-*-elf

The moxie processor.


! !

msp430-*-elf*

TI MSP430 processor. This configuration is intended for embedded systems.

*************** in a minimal run-time environment by def *** 920,934 ****
!

nds32le-*-elf

Andes NDS32 target in little endian mode.


!

nds32be-*-elf

Andes NDS32 target in big endian mode.


!

nvptx-*-none

Nvidia PTX target.

Instead of GNU binutils, you will need to install --- 966,983 ----


! !

nds32le-*-elf

Andes NDS32 target in little endian mode.


! !

nds32be-*-elf

Andes NDS32 target in big endian mode.


! !

nvptx-*-none

Nvidia PTX target.

Instead of GNU binutils, you will need to install *************** the GCC sources. *** 946,968 **** --enable-newlib-io-long-long options when configuring.


!

or1k-*-elf

The OpenRISC 1000 32-bit processor with delay slots. This configuration is intended for embedded systems.


!

or1k-*-linux

The OpenRISC 1000 32-bit processor with delay slots.


!

powerpc-*-*

You can specify a default version for the -mcpu=cpu_type switch by using the configure option --with-cpu-cpu_type.

You will need GNU binutils 2.20 or newer.


!

powerpc-*-darwin*

PowerPC running Darwin (Mac OS X kernel).

Pre-installed versions of Mac OS X may not include any developer tools, --- 995,1021 ---- --enable-newlib-io-long-long options when configuring.


! !

or1k-*-elf

The OpenRISC 1000 32-bit processor with delay slots. This configuration is intended for embedded systems.


! !

or1k-*-linux

The OpenRISC 1000 32-bit processor with delay slots.


! !

powerpc-*-*

You can specify a default version for the -mcpu=cpu_type switch by using the configure option --with-cpu-cpu_type.

You will need GNU binutils 2.20 or newer.


! !

powerpc-*-darwin*

PowerPC running Darwin (Mac OS X kernel).

Pre-installed versions of Mac OS X may not include any developer tools, *************** cctools-590.36 package referenced from *** 976,1060 **** on systems older than 10.3.9 (aka darwin7.9.0).


!

powerpc-*-elf

PowerPC system in big endian mode, running System V.4.


!

powerpc*-*-linux-gnu*

PowerPC system in big endian mode running Linux.


!

powerpc-*-netbsd*

PowerPC system in big endian mode running NetBSD.


!

powerpc-*-eabisim

Embedded PowerPC system in big endian mode for use in running under the PSIM simulator.


!

powerpc-*-eabi

Embedded PowerPC system in big endian mode.


!

powerpcle-*-elf

PowerPC system in little endian mode, running System V.4.


!

powerpcle-*-eabisim

Embedded PowerPC system in little endian mode for use in running under the PSIM simulator.


!

powerpcle-*-eabi

Embedded PowerPC system in little endian mode.


!

rl78-*-elf

The Renesas RL78 processor. This configuration is intended for embedded systems.


!

riscv32-*-elf

The RISC-V RV32 instruction set. This configuration is intended for embedded systems. This (and all other RISC-V) targets require the binutils 2.30 release.


!

riscv32-*-linux

The RISC-V RV32 instruction set running GNU/Linux. This (and all other RISC-V) targets require the binutils 2.30 release.


!

riscv64-*-elf

The RISC-V RV64 instruction set. This configuration is intended for embedded systems. This (and all other RISC-V) targets require the binutils 2.30 release.


!

riscv64-*-linux

The RISC-V RV64 instruction set running GNU/Linux. This (and all other RISC-V) targets require the binutils 2.30 release.


!

rx-*-elf

The Renesas RX processor.


!

s390-*-linux*

S/390 system running GNU/Linux for S/390.


!

s390x-*-linux*

zSeries system (64-bit) running GNU/Linux for zSeries.


!

s390x-ibm-tpf*

zSeries system (64-bit) running TPF. This platform is supported as cross-compilation target only.


!

*-*-solaris2*

Support for Solaris 10 has been removed in GCC 10. Support for Solaris 9 has been removed in GCC 5. Support for Solaris 8 has been removed in GCC 4.8. Support for Solaris 7 has been removed in GCC 4.6. --- 1029,1131 ---- on systems older than 10.3.9 (aka darwin7.9.0).


! !

powerpc-*-elf

PowerPC system in big endian mode, running System V.4.


! !

powerpc*-*-linux-gnu*

PowerPC system in big endian mode running Linux.


! !

powerpc-*-netbsd*

PowerPC system in big endian mode running NetBSD.


! !

powerpc-*-eabisim

Embedded PowerPC system in big endian mode for use in running under the PSIM simulator.


! !

powerpc-*-eabi

Embedded PowerPC system in big endian mode.


! !

powerpcle-*-elf

PowerPC system in little endian mode, running System V.4.


! !

powerpcle-*-eabisim

Embedded PowerPC system in little endian mode for use in running under the PSIM simulator.


! !

powerpcle-*-eabi

Embedded PowerPC system in little endian mode.


! !

rl78-*-elf

The Renesas RL78 processor. This configuration is intended for embedded systems.


! !

riscv32-*-elf

The RISC-V RV32 instruction set. This configuration is intended for embedded systems. This (and all other RISC-V) targets require the binutils 2.30 release.


! !

riscv32-*-linux

The RISC-V RV32 instruction set running GNU/Linux. This (and all other RISC-V) targets require the binutils 2.30 release.


! !

riscv64-*-elf

The RISC-V RV64 instruction set. This configuration is intended for embedded systems. This (and all other RISC-V) targets require the binutils 2.30 release.


! !

riscv64-*-linux

The RISC-V RV64 instruction set running GNU/Linux. This (and all other RISC-V) targets require the binutils 2.30 release.


! !

rx-*-elf

The Renesas RX processor.


! !

s390-*-linux*

S/390 system running GNU/Linux for S/390.


! !

s390x-*-linux*

zSeries system (64-bit) running GNU/Linux for zSeries.


! !

s390x-ibm-tpf*

zSeries system (64-bit) running TPF. This platform is supported as cross-compilation target only.


! !

*-*-solaris2*

Support for Solaris 10 has been removed in GCC 10. Support for Solaris 9 has been removed in GCC 5. Support for Solaris 8 has been removed in GCC 4.8. Support for Solaris 7 has been removed in GCC 4.6. *************** you can install a pre-built GCC to boots *** 1069,1076 **** ‘libstdc++-v3’. We therefore recommend using the following initial sequence of commands

!
!
% CONFIG_SHELL=/bin/ksh
  % export CONFIG_SHELL
  
--- 1140,1147 ---- ‘libstdc++-v3’. We therefore recommend using the following initial sequence of commands

!
!
% CONFIG_SHELL=/bin/ksh
  % export CONFIG_SHELL
  
*************** need to provide a more recent one. *** 1134,1140 ****
!

sparc*-*-*

This section contains general configuration information for all SPARC-based platforms. In addition to reading this section, please read all other sections that match your target. --- 1205,1212 ----


! !

sparc*-*-*

This section contains general configuration information for all SPARC-based platforms. In addition to reading this section, please read all other sections that match your target. *************** of the exact versions of these libraries *** 1146,1152 **** in the prerequisites.


!

sparc-sun-solaris2*

When GCC is configured to use GNU binutils 2.14 or later, the binaries produced are smaller than the ones produced using Solaris native tools; this difference is quite significant for binaries containing debugging --- 1218,1225 ---- in the prerequisites.


! !

sparc-sun-solaris2*

When GCC is configured to use GNU binutils 2.14 or later, the binaries produced are smaller than the ones produced using Solaris native tools; this difference is quite significant for binaries containing debugging *************** target triplet must be specified as the *** 1166,1180 **** configure line. This target triplet can be obtained by invoking ./config.guess in the toplevel source directory of GCC (and not that of GMP or MPFR or MPC). For example on a Solaris 11 system:

!
!
% ./configure --build=sparc-sun-solaris2.11 --prefix=xxx
  

!

sparc-*-linux*


!

sparc64-*-solaris2*

When configuring a 64-bit-default GCC on Solaris/SPARC, you must use a build compiler that generates 64-bit code, either by default or by specifying ‘CC='gcc -m64' CXX='gcc-m64'’ to configure. --- 1239,1255 ---- configure line. This target triplet can be obtained by invoking ./config.guess in the toplevel source directory of GCC (and not that of GMP or MPFR or MPC). For example on a Solaris 11 system:

!
!
% ./configure --build=sparc-sun-solaris2.11 --prefix=xxx
  

! !

sparc-*-linux*


! !

sparc64-*-solaris2*

When configuring a 64-bit-default GCC on Solaris/SPARC, you must use a build compiler that generates 64-bit code, either by default or by specifying ‘CC='gcc -m64' CXX='gcc-m64'’ to configure. *************** library or the MPC library, the canonica *** 1187,1226 **** as the build parameter on the configure line. For example on a Solaris 11 system:

!
!
% ./configure --build=sparc64-sun-solaris2.11 --prefix=xxx
  

!

sparcv9-*-solaris2*

This is a synonym for ‘sparc64-*-solaris2*’.


!

c6x-*-*

The C6X family of processors. This port requires binutils-2.22 or newer.


!

tilegx-*-linux*

The TILE-Gx processor in little endian mode, running GNU/Linux. This port requires binutils-2.22 or newer.


!

tilegxbe-*-linux*

The TILE-Gx processor in big endian mode, running GNU/Linux. This port requires binutils-2.23 or newer.


!

tilepro-*-linux*

The TILEPro processor running GNU/Linux. This port requires binutils-2.22 or newer.


!

visium-*-elf

CDS VISIUMcore processor. This configuration is intended for embedded systems.


!

*-*-vxworks*

Support for VxWorks is in flux. At present GCC supports only the very recent VxWorks 5.5 (aka Tornado 2.2) release, and only on PowerPC. We welcome patches for other architectures supported by VxWorks 5.5. --- 1262,1308 ---- as the build parameter on the configure line. For example on a Solaris 11 system:

!
!
% ./configure --build=sparc64-sun-solaris2.11 --prefix=xxx
  

! !

sparcv9-*-solaris2*

This is a synonym for ‘sparc64-*-solaris2*’.


! !

c6x-*-*

The C6X family of processors. This port requires binutils-2.22 or newer.


! !

tilegx-*-linux*

The TILE-Gx processor in little endian mode, running GNU/Linux. This port requires binutils-2.22 or newer.


! !

tilegxbe-*-linux*

The TILE-Gx processor in big endian mode, running GNU/Linux. This port requires binutils-2.23 or newer.


! !

tilepro-*-linux*

The TILEPro processor running GNU/Linux. This port requires binutils-2.22 or newer.


! !

visium-*-elf

CDS VISIUMcore processor. This configuration is intended for embedded systems.


! !

*-*-vxworks*

Support for VxWorks is in flux. At present GCC supports only the very recent VxWorks 5.5 (aka Tornado 2.2) release, and only on PowerPC. We welcome patches for other architectures supported by VxWorks 5.5. *************** that file to add the module to your kern *** 1253,1266 **** VxWorks will incorporate this module.)


!

x86_64-*-*, amd64-*-*

GCC supports the x86-64 architecture implemented by the AMD64 processor (amd64-*-* is an alias for x86_64-*-*) on GNU/Linux, FreeBSD and NetBSD. On GNU/Linux the default is a bi-arch compiler which is able to generate both 64-bit x86-64 and 32-bit x86 code (via the -m32 switch).


!

x86_64-*-solaris2*

GCC also supports the x86-64 architecture implemented by the AMD64 processor (‘amd64-*-*’ is an alias for ‘x86_64-*-*’) on Solaris 10 or later. Unlike other systems, without special options a --- 1335,1350 ---- VxWorks will incorporate this module.)


! !

x86_64-*-*, amd64-*-*

GCC supports the x86-64 architecture implemented by the AMD64 processor (amd64-*-* is an alias for x86_64-*-*) on GNU/Linux, FreeBSD and NetBSD. On GNU/Linux the default is a bi-arch compiler which is able to generate both 64-bit x86-64 and 32-bit x86 code (via the -m32 switch).


! !

x86_64-*-solaris2*

GCC also supports the x86-64 architecture implemented by the AMD64 processor (‘amd64-*-*’ is an alias for ‘x86_64-*-*’) on Solaris 10 or later. Unlike other systems, without special options a *************** as 64-bit code, configure with --t *** 1273,1279 **** and ‘CC=gcc -m64’.


!

xtensa*-*-elf

This target is intended for embedded Xtensa systems using the ‘newlib’ C library. It uses ELF but does not support shared objects. Designed-defined instructions specified via the --- 1357,1364 ---- and ‘CC=gcc -m64’.


! !

xtensa*-*-elf

This target is intended for embedded Xtensa systems using the ‘newlib’ C library. It uses ELF but does not support shared objects. Designed-defined instructions specified via the *************** downloaded files include a customized co *** 1288,1294 **** which you can use to replace the default header file.


!

xtensa*-*-linux*

This target is for Xtensa systems running GNU/Linux. It supports ELF shared objects and the GNU C library (glibc). It also generates position-independent code (PIC) regardless of whether the --- 1373,1380 ---- which you can use to replace the default header file.


! !

xtensa*-*-linux*

This target is for Xtensa systems running GNU/Linux. It supports ELF shared objects and the GNU C library (glibc). It also generates position-independent code (PIC) regardless of whether the *************** respects, this target is the same as the *** 1297,1312 **** xtensa*-*-elf target.


!

Microsoft Windows

!

Intel 16-bit versions

The 16-bit versions of Microsoft Windows, such as Windows 3.1, are not supported.

However, the 32-bit port has limited support for Microsoft Windows 3.11 in the Win32s environment, as a target only. See below.

!

Intel 32-bit versions

The 32-bit versions of Windows, including Windows 95, Windows NT, Windows XP, and Windows Vista, are supported by several different target platforms. These targets differ in which Windows subsystem they target --- 1383,1401 ---- xtensa*-*-elf target.


! !

Microsoft Windows

! !

Intel 16-bit versions

The 16-bit versions of Microsoft Windows, such as Windows 3.1, are not supported.

However, the 32-bit port has limited support for Microsoft Windows 3.11 in the Win32s environment, as a target only. See below.

! !

Intel 32-bit versions

The 32-bit versions of Windows, including Windows 95, Windows NT, Windows XP, and Windows Vista, are supported by several different target platforms. These targets differ in which Windows subsystem they target *************** the Win32 subsystem that provides a subs *** 1321,1336 **** https://www.mkssoftware.com for more information. !

Intel 64-bit versions

GCC contains support for x86-64 using the mingw-w64 runtime library, available from https://www.mingw-w64.org/downloads/. This library should be used with the target triple x86_64-pc-mingw32.

!

Windows CE

Windows CE is supported as a target only on Hitachi SuperH (sh-wince-pe), and MIPS (mips-wince-pe).

!

Other Windows Platforms

GCC no longer supports Windows NT on the Alpha or PowerPC.

GCC no longer supports the Windows POSIX subsystem. However, it does --- 1410,1428 ---- https://www.mkssoftware.com for more information. ! !

Intel 64-bit versions

GCC contains support for x86-64 using the mingw-w64 runtime library, available from https://www.mingw-w64.org/downloads/. This library should be used with the target triple x86_64-pc-mingw32.

! !

Windows CE

Windows CE is supported as a target only on Hitachi SuperH (sh-wince-pe), and MIPS (mips-wince-pe).

! !

Other Windows Platforms

GCC no longer supports Windows NT on the Alpha or PowerPC.

GCC no longer supports the Windows POSIX subsystem. However, it does *************** be inactive. See

*-*-cygwin

Ports of GCC are included with the Cygwin environment.

--- 1436,1443 ----

UWIN support has been removed due to a lack of maintenance.


! !

*-*-cygwin

Ports of GCC are included with the Cygwin environment.

*************** the latest official GNU binutils release *** 1358,1364 **** or version 2.20 or above if building your own.


!

*-*-mingw32

GCC will build with and support only MinGW runtime 3.12 and later. Earlier versions of headers are incompatible with the new default semantics of extern inline in -std=c99 and -std=gnu99 modes. --- 1451,1458 ---- or version 2.20 or above if building your own.


! !

*-*-mingw32

GCC will build with and support only MinGW runtime 3.12 and later. Earlier versions of headers are incompatible with the new default semantics of extern inline in -std=c99 and -std=gnu99 modes. *************** version 2.16 or above containing support *** 1368,1374 **** assembler pseudo-op.


!

Older systems

GCC contains support files for many older (1980s and early 1990s) Unix variants. For the most part, support for these systems has not been deliberately removed, but it has not been maintained for --- 1462,1469 ---- assembler pseudo-op.


! !

Older systems

GCC contains support files for many older (1980s and early 1990s) Unix variants. For the most part, support for these systems has not been deliberately removed, but it has not been maintained for *************** about GCC on such systems (which may no *** 1411,1417 **** current GCC) is to be found in the GCC texinfo manual.


!

all ELF targets (SVR4, Solaris 2, etc.)

C++ support is significantly better on ELF targets if you use the GNU linker; duplicate copies of inlines, vtables and template instantiations will be discarded --- 1506,1513 ---- current GCC) is to be found in the GCC texinfo manual.


! !

all ELF targets (SVR4, Solaris 2, etc.)

C++ support is significantly better on ELF targets if you use the GNU linker; duplicate copies of inlines, vtables and template instantiations will be discarded diff -Nrcpad gcc-12.1.0/INSTALL/test.html gcc-12.2.0/INSTALL/test.html *** gcc-12.1.0/INSTALL/test.html Fri May 6 07:31:21 2022 --- gcc-12.2.0/INSTALL/test.html Fri Aug 19 08:15:37 2022 *************** A GNU Manual *** 19,25 **** You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. --> ! Installing GCC: Testing --- 19,25 ---- You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. --> ! Installing GCC: Testing *************** You have freedom to copy and modify this *** 33,46 **** --- 33,55 ---- ! ! --- 47,65 ---- ! ! ! ! ! ! ! diff -Nrcpad gcc-12.1.0/libstdc++-v3/doc/xml/manual/prerequisites.xml gcc-12.2.0/libstdc++-v3/doc/xml/manual/prerequisites.xml *** gcc-12.1.0/libstdc++-v3/doc/xml/manual/prerequisites.xml Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/doc/xml/manual/prerequisites.xml Fri Aug 19 08:09:55 2022 *************** *** 71,77 **** ! Download the libiconv sources and extract them into the top level of the GCC source tree, e.g., --- 71,78 ---- ! Download the libiconv sources and extract them into the top level of the GCC source tree, e.g., diff -Nrcpad gcc-12.1.0/libstdc++-v3/doc/xml/manual/status_cxx2020.xml gcc-12.2.0/libstdc++-v3/doc/xml/manual/status_cxx2020.xml *** gcc-12.1.0/libstdc++-v3/doc/xml/manual/status_cxx2020.xml Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/doc/xml/manual/status_cxx2020.xml Fri Aug 19 08:09:55 2022 *************** not in any particular release. *** 25,32 **** ! The following table lists new library features that have been accepted into ! the C++20 working draft. The "Proposal" column provides a link to the ISO C++ committee proposal that describes the feature, while the "Status" column indicates the first version of GCC that contains an implementation of this feature (if it has been implemented). --- 25,32 ---- ! The following table lists new library features that are included in ! the C++20 standard. The "Proposal" column provides a link to the ISO C++ committee proposal that describes the feature, while the "Status" column indicates the first version of GCC that contains an implementation of this feature (if it has been implemented). *************** or any notes about the implementation. *** 359,365 **** P0053R7 ! 11 __cpp_lib_syncbuf >= 201711L --- 359,365 ---- P0053R7 ! 11.1 __cpp_lib_syncbuf >= 201711L *************** or any notes about the implementation. *** 369,375 **** P0753R2 ! 11 __cpp_lib_syncbuf >= 201803L --- 369,375 ---- P0753R2 ! 11.1 __cpp_lib_syncbuf >= 201803L *************** or any notes about the implementation. *** 643,649 **** P0966R1 ! 11 --- 643,649 ---- P0966R1 ! 11.1 *************** or any notes about the implementation. *** 1039,1045 **** P0476R2 ! 11 __cpp_lib_bit_cast >= 201806L --- 1039,1045 ---- P0476R2 ! 11.1 __cpp_lib_bit_cast >= 201806L *************** or any notes about the implementation. *** 1394,1400 **** P0553R4 ! 10.1 __cpp_lib_bitops >= 201907L (since 9.4, see Note 1) --- 1394,1400 ---- P0553R4 ! 9.1 __cpp_lib_bitops >= 201907L (since 9.4, see Note 1) *************** or any notes about the implementation. *** 1424,1430 **** P1208R6 ! 11 __cpp_lib_source_location >= 201907L --- 1424,1430 ---- P1208R6 ! 11.1 __cpp_lib_source_location >= 201907L *************** or any notes about the implementation. *** 1436,1442 **** P0408R7 ! 11 --- 1436,1442 ---- P0408R7 ! 11.1 diff -Nrcpad gcc-12.1.0/libstdc++-v3/doc/xml/manual/status_cxx2023.xml gcc-12.2.0/libstdc++-v3/doc/xml/manual/status_cxx2023.xml *** gcc-12.1.0/libstdc++-v3/doc/xml/manual/status_cxx2023.xml Thu Jan 1 00:00:00 1970 --- gcc-12.2.0/libstdc++-v3/doc/xml/manual/status_cxx2023.xml Fri Aug 19 08:09:55 2022 *************** *** 0 **** --- 1,573 ---- +

+ + + C++ 2023 + + ISO C++ + 2023 + + + + + In this implementation the -std=gnu++23 or + -std=c++23 flag must be used to enable language + and library + features. See dialect + options. The pre-defined symbol + __cplusplus is used to check for the + presence of the required flag. + + + + This section describes the C++23 and library TS support in mainline GCC, + not in any particular release. + + + + The following table lists new library features that have been accepted into + the C++23 working draft. The "Proposal" column provides a link to the + ISO C++ committee proposal that describes the feature, while the "Status" + column indicates the first version of GCC that contains an implementation of + this feature (if it has been implemented). + A dash (—) in the status column indicates that the changes in the proposal + either do not affect the code in libstdc++, or the changes are not required for conformance. + The "SD-6 Feature Test / Notes" column shows the corresponding macro or header from + SD-6: + Feature-testing recommendations for C++ (where applicable) + or any notes about the implementation. + + + + C++ 2023 Library Features + + + + + + + + + Library Feature + Proposal + Status + SD-6 Feature Test / Notes + + + + + + + + Ranges and Views + + + + + Range constructor for std::string_view + + + P1989R2 + + + 11.1 + + + + + join_view should join all views of ranges + + + P2328R1 + + + 11.2 + + + + + + Clarifying range adaptor objects + + + P2281R1 + + + 11.1 + + + + + Views should not be required to be default constructible + + + P2325R3 + + + 11.3 + __cpp_lib_ranges >= 202106L + + + + Conditionally borrowed ranges + + + P2017R1 + + + 11.1 + + + + + Require span & basic_string_view to be Trivially Copyable + + + P2251R1 + + + Yes + + + + + Repairing input range adaptors and counted_iterator + + + P2259R1 + + + 12.1 + + + + + Superior String Splitting + + + P2210R2 + + + 12.1 + + + + + What is a view? + + + P2415R2 + + + 12.1 + __cpp_lib_ranges >= 202110L + + + + Fix istream_view + + + P2432R1 + + + 12.1 + + + + + + starts_with and ends_with + + + P1659R3 + + + + __cpp_lib_ranges_starts_ends_with >= 202106L + + + + + zip + + + P2321R2 + + + + __cpp_lib_ranges_zip >= 202110L + + + + + Compile-time programming + + + + + A proposal for a type trait to detect scoped enumerations + + + P1048R1 + + + 11.1 + __cpp_lib_is_scoped_enum >= 202011L + + + + std::to_underlying for enumerations + + + P1682R3 + + + 11.1 + __cpp_lib_to_underlying >= 202102L + + + + Missing constexpr in std::optional and std::variant + + + P2231R1 + + + + + 11.3 (optional) + 12.1 (variant) + + + + + __cpp_lib_constexpr_optional >= 202106L + __cpp_lib_variant >= 202106L + + + + + + Making std::unique_ptr constexpr + + + P2273R3 + + + 12.1 + __cpp_lib_constexpr_memory >= 202202L + + + + Making std::type_info::operator== constexpr + + + P1328R1 + + + 12.1 + __cpp_lib_constexpr_typeinfo >= 202106L + + + + + constexpr for <cmath> and <cstdlib> + + + P0533R9 + + + + __cpp_lib_constexpr_cmath >= 202202L + + + + + Deprecate std::aligned_storage and std::aligned_union + + + P1413R3 + + + + + + + + + A type trait to detect reference binding to temporary + + + P2255R2 + + + + __cpp_lib_reference_from_temporary >= 202202L + + + + + Strings and text + + + + + string contains function + + + P1679R3 + + + 11.1 + __cpp_lib_string_contains >= 202011L + + + + Prohibit std::basic_string and std::basic_string_view construction from nullptr + + + P2166R1 + + + 12.1 + + + + + basic_string::resize_and_overwrite + + + P1072R10 + + + 12.1 + __cpp_lib_resize_and_overwrite >= 202110L + + + + A strstream replacement using span<charT> as buffer + + + P0448R4 + + + 12.1 + __cpp_lib_spanstream >= 202106L + + + + + Containers + + + + + Iterator pair constructors for stack and queue + + + P1425R4 + + + 12.1 + __cpp_lib_adaptor_iterator_pair_constructor >= 202106L + + + + Stop overconstraining allocators in container deduction guides + + + P1518R2 + + + 12.1 + + + + + + Heterogeneous erasure overloads for associative containers + + + P2077R3 + + + + __cpp_lib_associative_heterogeneous_erasure >= 202110L + + + + + Miscellaneous + + + + + Inheriting from std::variant + + + P2162R2 + + + 11.3 + __cpp_lib_variant >= 202102L + + + + Printing volatile Pointers + + + P1147R1 + + + 11.3 + + + + + A Proposal to add stacktrace library + + + P0881R7 + + + 12.1 + __cpp_lib_stacktrace >= 202011L + + + + Add a pmr alias for std::stacktrace + + + P2301R1 + + + 12.1 + + + + + std::expected + + + P0323R12 + + + 12.1 + __cpp_lib_expected >= 202202L + + + + Monadic operations for std::optional + + + P0798R8 + + + 12.1 + __cpp_lib_optional >= 202110L + + + + move_only_function + + + P0288R9 + + + 12.1 + __cpp_lib_move_only_function >= 202110L + + + + invoke_r + + + P2136R3 + + + 12.1 + __cpp_lib_invoke_r >= 202106L + + + + Byteswapping for fun&&nuf + + + P1272R4 + + + 12.1 + __cpp_lib_byteswap >= 202110L + + + + Function to mark unreachable code + + + P0627R6 + + + 12.1 + __cpp_lib_unreachable >= 202202L + + + + Add a conditional noexcept specification to std::exchange + + + P2401R0 + + + 12.1 + + + + + Support C atomics in C++ + + + P0943R6 + + + 12.1 + __cpp_lib_stdatomic_h >= 202011L + + + + Clarifying the status of the "C headers" + + + P2340R1 + + + Yes + + + + + Relax Requirements for time_point::clock + + + P2212R2 + + + Yes + + + + + Removing Garbage Collection Support + + + P2186R2 + + + 12.1 + + + + + +
+ +
diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/Makefile.am gcc-12.2.0/libstdc++-v3/include/Makefile.am *** gcc-12.1.0/libstdc++-v3/include/Makefile.am Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/Makefile.am Fri Aug 19 08:09:55 2022 *************** stamp-float128: *** 1285,1291 **** endif # This header is not installed, it's only used to build libstdc++ itself. ! ${host_builddir}/largefile-config.h: ${CONFIG_HEADER} @rm -f $@.tmp @-grep 'define _DARWIN_USE_64_BIT_INODE' ${CONFIG_HEADER} >> $@.tmp @-grep 'define _FILE_OFFSET_BITS' ${CONFIG_HEADER} >> $@.tmp --- 1285,1291 ---- endif # This header is not installed, it's only used to build libstdc++ itself. ! ${host_builddir}/largefile-config.h: ${CONFIG_HEADER} stamp-${host_alias} @rm -f $@.tmp @-grep 'define _DARWIN_USE_64_BIT_INODE' ${CONFIG_HEADER} >> $@.tmp @-grep 'define _FILE_OFFSET_BITS' ${CONFIG_HEADER} >> $@.tmp diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/Makefile.in gcc-12.2.0/libstdc++-v3/include/Makefile.in *** gcc-12.1.0/libstdc++-v3/include/Makefile.in Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/Makefile.in Fri Aug 19 08:09:55 2022 *************** stamp-host: ${host_headers} ${bits_host_ *** 1779,1785 **** @ENABLE_FLOAT128_FALSE@ echo 'undef _GLIBCXX_USE_FLOAT128' > stamp-float128 # This header is not installed, it's only used to build libstdc++ itself. ! ${host_builddir}/largefile-config.h: ${CONFIG_HEADER} @rm -f $@.tmp @-grep 'define _DARWIN_USE_64_BIT_INODE' ${CONFIG_HEADER} >> $@.tmp @-grep 'define _FILE_OFFSET_BITS' ${CONFIG_HEADER} >> $@.tmp --- 1779,1785 ---- @ENABLE_FLOAT128_FALSE@ echo 'undef _GLIBCXX_USE_FLOAT128' > stamp-float128 # This header is not installed, it's only used to build libstdc++ itself. ! ${host_builddir}/largefile-config.h: ${CONFIG_HEADER} stamp-${host_alias} @rm -f $@.tmp @-grep 'define _DARWIN_USE_64_BIT_INODE' ${CONFIG_HEADER} >> $@.tmp @-grep 'define _FILE_OFFSET_BITS' ${CONFIG_HEADER} >> $@.tmp diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/bits/allocator.h gcc-12.2.0/libstdc++-v3/include/bits/allocator.h *** gcc-12.1.0/libstdc++-v3/include/bits/allocator.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/bits/allocator.h Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 179,185 **** allocate(size_t __n) { if (std::__is_constant_evaluated()) ! return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); return __allocator_base<_Tp>::allocate(__n, 0); } --- 179,190 ---- allocate(size_t __n) { if (std::__is_constant_evaluated()) ! { ! if (__builtin_mul_overflow(__n, sizeof(_Tp), &__n)) ! std::__throw_bad_array_new_length(); ! return static_cast<_Tp*>(::operator new(__n)); ! } ! return __allocator_base<_Tp>::allocate(__n, 0); } diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/bits/atomic_wait.h gcc-12.2.0/libstdc++-v3/include/bits/atomic_wait.h *** gcc-12.1.0/libstdc++-v3/include/bits/atomic_wait.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/bits/atomic_wait.h Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 142,149 **** #endif } ! constexpr auto __atomic_spin_count_1 = 12; ! constexpr auto __atomic_spin_count_2 = 4; struct __default_spin_policy { --- 142,149 ---- #endif } ! constexpr auto __atomic_spin_count_relax = 12; ! constexpr auto __atomic_spin_count = 16; struct __default_spin_policy { *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 157,174 **** bool __atomic_spin(_Pred& __pred, _Spin __spin = _Spin{ }) noexcept { ! for (auto __i = 0; __i < __atomic_spin_count_1; ++__i) { if (__pred()) return true; - __detail::__thread_relax(); - } ! for (auto __i = 0; __i < __atomic_spin_count_2; ++__i) ! { ! if (__pred()) ! return true; ! __detail::__thread_yield(); } while (__spin()) --- 157,171 ---- bool __atomic_spin(_Pred& __pred, _Spin __spin = _Spin{ }) noexcept { ! for (auto __i = 0; __i < __atomic_spin_count; ++__i) { if (__pred()) return true; ! if (__i < __atomic_spin_count_relax) ! __detail::__thread_relax(); ! else ! __detail::__thread_yield(); } while (__spin()) diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/bits/basic_string.h gcc-12.2.0/libstdc++-v3/include/bits/basic_string.h *** gcc-12.1.0/libstdc++-v3/include/bits/basic_string.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/bits/basic_string.h Fri Aug 19 08:09:55 2022 *************** *** 36,42 **** #pragma GCC system_header - #include #include #include --- 36,41 ---- *************** _GLIBCXX_BEGIN_NAMESPACE_CXX11 *** 353,359 **** { #if __cpp_lib_is_constant_evaluated if (std::is_constant_evaluated()) ! _M_local_buf[0] = _CharT(); #endif return _M_local_data(); } --- 352,359 ---- { #if __cpp_lib_is_constant_evaluated if (std::is_constant_evaluated()) ! for (_CharT& __c : _M_local_buf) ! __c = _CharT(); #endif return _M_local_data(); } diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/bits/cow_string.h gcc-12.2.0/libstdc++-v3/include/bits/cow_string.h *** gcc-12.1.0/libstdc++-v3/include/bits/cow_string.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/bits/cow_string.h Fri Aug 19 08:09:55 2022 *************** *** 34,39 **** --- 34,41 ---- #if ! _GLIBCXX_USE_CXX11_ABI + #include // _Atomic_word, __is_single_threaded + #ifdef __cpp_lib_is_constant_evaluated // Support P1032R1 in C++20 (but not P0980R1 for COW strings). # define __cpp_lib_constexpr_string 201811L diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/bits/fs_ops.h gcc-12.2.0/libstdc++-v3/include/bits/fs_ops.h *** gcc-12.1.0/libstdc++-v3/include/bits/fs_ops.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/bits/fs_ops.h Fri Aug 19 08:09:55 2022 *************** namespace filesystem *** 44,53 **** --- 44,59 ---- * @{ */ + [[nodiscard]] path absolute(const path& __p); + + [[nodiscard]] path absolute(const path& __p, error_code& __ec); + [[nodiscard]] path canonical(const path& __p); + + [[nodiscard]] path canonical(const path& __p, error_code& __ec); inline void *************** namespace filesystem *** 100,124 **** --- 106,139 ---- void create_symlink(const path& __to, const path& __new_symlink, error_code& __ec) noexcept; + [[nodiscard]] path current_path(); + + [[nodiscard]] path current_path(error_code& __ec); + void current_path(const path& __p); void current_path(const path& __p, error_code& __ec) noexcept; + [[nodiscard]] bool equivalent(const path& __p1, const path& __p2); + [[nodiscard]] bool equivalent(const path& __p1, const path& __p2, error_code& __ec) noexcept; + [[nodiscard]] inline bool exists(file_status __s) noexcept { return status_known(__s) && __s.type() != file_type::not_found; } + [[nodiscard]] inline bool exists(const path& __p) { return exists(status(__p)); } + [[nodiscard]] inline bool exists(const path& __p, error_code& __ec) noexcept { *************** namespace filesystem *** 131,193 **** --- 146,230 ---- return false; } + [[nodiscard]] uintmax_t file_size(const path& __p); + + [[nodiscard]] uintmax_t file_size(const path& __p, error_code& __ec) noexcept; + [[nodiscard]] uintmax_t hard_link_count(const path& __p); + + [[nodiscard]] uintmax_t hard_link_count(const path& __p, error_code& __ec) noexcept; + [[nodiscard]] inline bool is_block_file(file_status __s) noexcept { return __s.type() == file_type::block; } + [[nodiscard]] inline bool is_block_file(const path& __p) { return is_block_file(status(__p)); } + [[nodiscard]] inline bool is_block_file(const path& __p, error_code& __ec) noexcept { return is_block_file(status(__p, __ec)); } + [[nodiscard]] inline bool is_character_file(file_status __s) noexcept { return __s.type() == file_type::character; } + [[nodiscard]] inline bool is_character_file(const path& __p) { return is_character_file(status(__p)); } + [[nodiscard]] inline bool is_character_file(const path& __p, error_code& __ec) noexcept { return is_character_file(status(__p, __ec)); } + [[nodiscard]] inline bool is_directory(file_status __s) noexcept { return __s.type() == file_type::directory; } + [[nodiscard]] inline bool is_directory(const path& __p) { return is_directory(status(__p)); } + [[nodiscard]] inline bool is_directory(const path& __p, error_code& __ec) noexcept { return is_directory(status(__p, __ec)); } + [[nodiscard]] bool is_empty(const path& __p); + + [[nodiscard]] bool is_empty(const path& __p, error_code& __ec); + [[nodiscard]] inline bool is_fifo(file_status __s) noexcept { return __s.type() == file_type::fifo; } + [[nodiscard]] inline bool is_fifo(const path& __p) { return is_fifo(status(__p)); } + [[nodiscard]] inline bool is_fifo(const path& __p, error_code& __ec) noexcept { return is_fifo(status(__p, __ec)); } + [[nodiscard]] inline bool is_other(file_status __s) noexcept { *************** namespace filesystem *** 195,246 **** --- 232,298 ---- && !is_symlink(__s); } + [[nodiscard]] inline bool is_other(const path& __p) { return is_other(status(__p)); } + [[nodiscard]] inline bool is_other(const path& __p, error_code& __ec) noexcept { return is_other(status(__p, __ec)); } + [[nodiscard]] inline bool is_regular_file(file_status __s) noexcept { return __s.type() == file_type::regular; } + [[nodiscard]] inline bool is_regular_file(const path& __p) { return is_regular_file(status(__p)); } + [[nodiscard]] inline bool is_regular_file(const path& __p, error_code& __ec) noexcept { return is_regular_file(status(__p, __ec)); } + [[nodiscard]] inline bool is_socket(file_status __s) noexcept { return __s.type() == file_type::socket; } + [[nodiscard]] inline bool is_socket(const path& __p) { return is_socket(status(__p)); } + [[nodiscard]] inline bool is_socket(const path& __p, error_code& __ec) noexcept { return is_socket(status(__p, __ec)); } + [[nodiscard]] inline bool is_symlink(file_status __s) noexcept { return __s.type() == file_type::symlink; } + [[nodiscard]] inline bool is_symlink(const path& __p) { return is_symlink(symlink_status(__p)); } + [[nodiscard]] inline bool is_symlink(const path& __p, error_code& __ec) noexcept { return is_symlink(symlink_status(__p, __ec)); } + [[nodiscard]] file_time_type last_write_time(const path& __p); + + [[nodiscard]] file_time_type last_write_time(const path& __p, error_code& __ec) noexcept; + void last_write_time(const path& __p, file_time_type __new_time); void last_write_time(const path& __p, file_time_type __new_time, error_code& __ec) noexcept; *************** namespace filesystem *** 257,275 **** --- 309,338 ---- permissions(const path& __p, perms __prms, perm_options __opts, error_code& __ec) noexcept; + [[nodiscard]] inline path proximate(const path& __p, error_code& __ec) { return proximate(__p, current_path(), __ec); } + [[nodiscard]] path proximate(const path& __p, const path& __base = current_path()); + + [[nodiscard]] path proximate(const path& __p, const path& __base, error_code& __ec); + [[nodiscard]] path read_symlink(const path& __p); + + [[nodiscard]] path read_symlink(const path& __p, error_code& __ec); + [[nodiscard]] inline path relative(const path& __p, error_code& __ec) { return relative(__p, current_path(), __ec); } + [[nodiscard]] path relative(const path& __p, const path& __base = current_path()); + + [[nodiscard]] path relative(const path& __p, const path& __base, error_code& __ec); bool remove(const path& __p); *************** namespace filesystem *** 284,305 **** --- 347,384 ---- void resize_file(const path& __p, uintmax_t __size); void resize_file(const path& __p, uintmax_t __size, error_code& __ec) noexcept; + [[nodiscard]] space_info space(const path& __p); + + [[nodiscard]] space_info space(const path& __p, error_code& __ec) noexcept; + [[nodiscard]] file_status status(const path& __p); + + [[nodiscard]] file_status status(const path& __p, error_code& __ec) noexcept; + [[nodiscard]] inline bool status_known(file_status __s) noexcept { return __s.type() != file_type::none; } + [[nodiscard]] file_status symlink_status(const path& __p); + + [[nodiscard]] file_status symlink_status(const path& __p, error_code& __ec) noexcept; + [[nodiscard]] path temp_directory_path(); + + [[nodiscard]] path temp_directory_path(error_code& __ec); + [[nodiscard]] path weakly_canonical(const path& __p); + + [[nodiscard]] path weakly_canonical(const path& __p, error_code& __ec); /// @} group filesystem diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/bits/hashtable.h gcc-12.2.0/libstdc++-v3/include/bits/hashtable.h *** gcc-12.1.0/libstdc++-v3/include/bits/hashtable.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/bits/hashtable.h Fri Aug 19 08:09:55 2022 *************** *** 37,42 **** --- 37,44 ---- #if __cplusplus > 201402L # include #endif + #include + #include // equal_to, _Identity, _Select1st namespace std _GLIBCXX_VISIBILITY(default) { diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/bits/hashtable_policy.h gcc-12.2.0/libstdc++-v3/include/bits/hashtable_policy.h *** gcc-12.1.0/libstdc++-v3/include/bits/hashtable_policy.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/bits/hashtable_policy.h Fri Aug 19 08:09:55 2022 *************** *** 33,38 **** --- 33,40 ---- #include // for std::tuple, std::forward_as_tuple #include // for std::min, std::is_permutation. + #include // for __gnu_cxx::__aligned_buffer + #include // for std::__alloc_rebind #include // for __gnu_cxx::__int_traits namespace std _GLIBCXX_VISIBILITY(default) diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/bits/ios_base.h gcc-12.2.0/libstdc++-v3/include/bits/ios_base.h *** gcc-12.1.0/libstdc++-v3/include/bits/ios_base.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/bits/ios_base.h Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 470,476 **** static const openmode __noreplace = _S_noreplace; #if __cplusplus >= 202100L ! #define __cpp_lib_ios_noreplace 202200L /// Open a file in exclusive mode. static const openmode noreplace = _S_noreplace; #endif --- 470,476 ---- static const openmode __noreplace = _S_noreplace; #if __cplusplus >= 202100L ! #define __cpp_lib_ios_noreplace 202207L /// Open a file in exclusive mode. static const openmode noreplace = _S_noreplace; #endif diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/bits/mofunc_impl.h gcc-12.2.0/libstdc++-v3/include/bits/mofunc_impl.h *** gcc-12.1.0/libstdc++-v3/include/bits/mofunc_impl.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/bits/mofunc_impl.h Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 48,54 **** * @brief Polymorphic function wrapper. * @ingroup functors * @since C++23 ! * @headername functional * * The `std::move_only_function` class template is a call wrapper similar * to * `std::function`, but does not require the stored target function --- 48,54 ---- * @brief Polymorphic function wrapper. * @ingroup functors * @since C++23 ! * @headerfile functional * * The `std::move_only_function` class template is a call wrapper similar * to * `std::function`, but does not require the stored target function diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/bits/new_allocator.h gcc-12.2.0/libstdc++-v3/include/bits/new_allocator.h *** gcc-12.1.0/libstdc++-v3/include/bits/new_allocator.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/bits/new_allocator.h Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 112,120 **** allocate(size_type __n, const void* = static_cast(0)) { #if __cplusplus >= 201103L ! // _GLIBCXX_RESOLVE_LIB_DEFECTS ! // 3308. std::allocator().allocate(n) ! static_assert(sizeof(_Tp) != 0, "cannot allocate incomplete types"); #endif if (__builtin_expect(__n > this->_M_max_size(), false)) --- 112,120 ---- allocate(size_type __n, const void* = static_cast(0)) { #if __cplusplus >= 201103L ! // _GLIBCXX_RESOLVE_LIB_DEFECTS ! // 3308. std::allocator().allocate(n) ! static_assert(sizeof(_Tp) != 0, "cannot allocate incomplete types"); #endif if (__builtin_expect(__n > this->_M_max_size(), false)) diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/bits/random.tcc gcc-12.2.0/libstdc++-v3/include/bits/random.tcc *** gcc-12.1.0/libstdc++-v3/include/bits/random.tcc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/bits/random.tcc Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 1961,1967 **** bool __saved_avail; if (__is >> __mean >> __stddev >> __saved_avail) { ! if (__saved_avail && (__is >> __x._M_saved)) { __x._M_saved_available = __saved_avail; __x.param(param_type(__mean, __stddev)); --- 1961,1967 ---- bool __saved_avail; if (__is >> __mean >> __stddev >> __saved_avail) { ! if (!__saved_avail || (__is >> __x._M_saved)) { __x._M_saved_available = __saved_avail; __x.param(param_type(__mean, __stddev)); diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/bits/stl_heap.h gcc-12.2.0/libstdc++-v3/include/bits/stl_heap.h *** gcc-12.1.0/libstdc++-v3/include/bits/stl_heap.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/bits/stl_heap.h Fri Aug 19 08:09:55 2022 *************** *** 58,63 **** --- 58,64 ---- #include #include #include + #include namespace std _GLIBCXX_VISIBILITY(default) { diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/bits/stl_iterator.h gcc-12.2.0/libstdc++-v3/include/bits/stl_iterator.h *** gcc-12.1.0/libstdc++-v3/include/bits/stl_iterator.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/bits/stl_iterator.h Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 1838,1844 **** _S_noexcept1() { if constexpr (is_trivially_default_constructible_v<_Tp>) ! return is_nothrow_assignable_v<_Tp, _Up>; else return is_nothrow_constructible_v<_Tp, _Up>; } --- 1838,1844 ---- _S_noexcept1() { if constexpr (is_trivially_default_constructible_v<_Tp>) ! return is_nothrow_assignable_v<_Tp&, _Up>; else return is_nothrow_constructible_v<_Tp, _Up>; } *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 1908,1913 **** --- 1908,1914 ---- noexcept(_S_noexcept()) : _M_valueless(), _M_index(__x._M_index) { + __glibcxx_assert(__x._M_has_value()); if (_M_index == 0) { if constexpr (is_trivially_default_constructible_v<_It>) *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 1932,1958 **** if (_M_index == 0) { if constexpr (is_trivially_default_constructible_v<_It>) ! _M_it = std::move(__x._M_it); else std::construct_at(std::__addressof(_M_it), __x._M_it); } else if (_M_index == 1) { if constexpr (is_trivially_default_constructible_v<_Sent>) ! _M_sent = std::move(__x._M_sent); else std::construct_at(std::__addressof(_M_sent), __x._M_sent); } } constexpr common_iterator& operator=(const common_iterator& __x) noexcept(is_nothrow_copy_assignable_v<_It> && is_nothrow_copy_assignable_v<_Sent> && is_nothrow_copy_constructible_v<_It> && is_nothrow_copy_constructible_v<_Sent>) { ! return this->operator=<_It, _Sent>(__x); } template --- 1933,2003 ---- if (_M_index == 0) { if constexpr (is_trivially_default_constructible_v<_It>) ! _M_it = __x._M_it; else std::construct_at(std::__addressof(_M_it), __x._M_it); } else if (_M_index == 1) { if constexpr (is_trivially_default_constructible_v<_Sent>) ! _M_sent = __x._M_sent; else std::construct_at(std::__addressof(_M_sent), __x._M_sent); } } + constexpr + common_iterator(common_iterator&& __x) + noexcept(_S_noexcept<_It, _Sent>()) + : _M_valueless(), _M_index(__x._M_index) + { + if (_M_index == 0) + { + if constexpr (is_trivially_default_constructible_v<_It>) + _M_it = std::move(__x._M_it); + else + std::construct_at(std::__addressof(_M_it), std::move(__x._M_it)); + } + else if (_M_index == 1) + { + if constexpr (is_trivially_default_constructible_v<_Sent>) + _M_sent = std::move(__x._M_sent); + else + std::construct_at(std::__addressof(_M_sent), + std::move(__x._M_sent)); + } + } + + constexpr common_iterator& + operator=(const common_iterator&) = default; + constexpr common_iterator& operator=(const common_iterator& __x) noexcept(is_nothrow_copy_assignable_v<_It> && is_nothrow_copy_assignable_v<_Sent> && is_nothrow_copy_constructible_v<_It> && is_nothrow_copy_constructible_v<_Sent>) + requires (!is_trivially_copy_assignable_v<_It> + || !is_trivially_copy_assignable_v<_Sent>) { ! _M_assign(__x); ! return *this; ! } ! ! constexpr common_iterator& ! operator=(common_iterator&&) = default; ! ! constexpr common_iterator& ! operator=(common_iterator&& __x) ! noexcept(is_nothrow_move_assignable_v<_It> ! && is_nothrow_move_assignable_v<_Sent> ! && is_nothrow_move_constructible_v<_It> ! && is_nothrow_move_constructible_v<_Sent>) ! requires (!is_trivially_move_assignable_v<_It> ! || !is_trivially_move_assignable_v<_Sent>) ! { ! _M_assign(std::move(__x)); ! return *this; } template *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 1964,2015 **** operator=(const common_iterator<_It2, _Sent2>& __x) noexcept(is_nothrow_constructible_v<_It, const _It2&> && is_nothrow_constructible_v<_Sent, const _Sent2&> ! && is_nothrow_assignable_v<_It, const _It2&> ! && is_nothrow_assignable_v<_Sent, const _Sent2&>) { ! switch(_M_index << 2 | __x._M_index) ! { ! case 0b0000: ! _M_it = __x._M_it; ! break; ! case 0b0101: ! _M_sent = __x._M_sent; ! break; ! case 0b0001: ! _M_it.~_It(); ! _M_index = -1; ! [[fallthrough]]; ! case 0b1001: ! std::construct_at(std::__addressof(_M_sent), _Sent(__x._M_sent)); ! _M_index = 1; ! break; ! case 0b0100: ! _M_sent.~_Sent(); ! _M_index = -1; ! [[fallthrough]]; ! case 0b1000: ! std::construct_at(std::__addressof(_M_it), _It(__x._M_it)); ! _M_index = 0; ! break; ! default: ! __glibcxx_assert(__x._M_has_value()); ! __builtin_unreachable(); ! } return *this; } constexpr ~common_iterator() { ! switch (_M_index) ! { ! case 0: ! _M_it.~_It(); ! break; ! case 1: ! _M_sent.~_Sent(); ! break; ! } } [[nodiscard]] --- 2009,2029 ---- operator=(const common_iterator<_It2, _Sent2>& __x) noexcept(is_nothrow_constructible_v<_It, const _It2&> && is_nothrow_constructible_v<_Sent, const _Sent2&> ! && is_nothrow_assignable_v<_It&, const _It2&> ! && is_nothrow_assignable_v<_Sent&, const _Sent2&>) { ! __glibcxx_assert(__x._M_has_value()); ! _M_assign(__x); return *this; } constexpr ~common_iterator() { ! if (_M_index == 0) ! _M_it.~_It(); ! else if (_M_index == 1) ! _M_sent.~_Sent(); } [[nodiscard]] *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 2029,2035 **** } [[nodiscard]] ! constexpr decltype(auto) operator->() const requires __detail::__common_iter_has_arrow<_It> { __glibcxx_assert(_M_index == 0); --- 2043,2049 ---- } [[nodiscard]] ! constexpr auto operator->() const requires __detail::__common_iter_has_arrow<_It> { __glibcxx_assert(_M_index == 0); *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 2164,2172 **** private: template _Sent2> friend class common_iterator; ! constexpr bool _M_has_value() const noexcept { return _M_index < 2; } union { --- 2178,2217 ---- private: template _Sent2> + requires (!same_as<_It2, _Sent2>) && copyable<_It2> friend class common_iterator; ! constexpr bool ! _M_has_value() const noexcept { return _M_index != _S_valueless; } ! ! template ! constexpr void ! _M_assign(_CIt&& __x) ! { ! if (_M_index == __x._M_index) ! { ! if (_M_index == 0) ! _M_it = std::forward<_CIt>(__x)._M_it; ! else if (_M_index == 1) ! _M_sent = std::forward<_CIt>(__x)._M_sent; ! } ! else ! { ! if (_M_index == 0) ! _M_it.~_It(); ! else if (_M_index == 1) ! _M_sent.~_Sent(); ! _M_index = _S_valueless; ! ! if (__x._M_index == 0) ! std::construct_at(std::__addressof(_M_it), ! std::forward<_CIt>(__x)._M_it); ! else if (__x._M_index == 1) ! std::construct_at(std::__addressof(_M_sent), ! std::forward<_CIt>(__x)._M_sent); ! _M_index = __x._M_index; ! } ! } union { *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 2174,2180 **** _Sent _M_sent; unsigned char _M_valueless; }; ! unsigned char _M_index; // 0==_M_it, 1==_M_sent, 2==valueless }; template --- 2219,2227 ---- _Sent _M_sent; unsigned char _M_valueless; }; ! unsigned char _M_index; // 0 == _M_it, 1 == _M_sent, 2 == valueless ! ! static constexpr unsigned char _S_valueless{2}; }; template *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 2341,2347 **** return *this; } ! decltype(auto) operator++(int) { __glibcxx_assert(_M_length > 0); --- 2388,2394 ---- return *this; } ! constexpr decltype(auto) operator++(int) { __glibcxx_assert(_M_length > 0); *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 2353,2359 **** ++_M_length; __throw_exception_again; } - } constexpr counted_iterator --- 2400,2405 ---- diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/bits/stl_iterator_base_funcs.h gcc-12.2.0/libstdc++-v3/include/bits/stl_iterator_base_funcs.h *** gcc-12.1.0/libstdc++-v3/include/bits/stl_iterator_base_funcs.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/bits/stl_iterator_base_funcs.h Fri Aug 19 08:09:55 2022 *************** *** 63,68 **** --- 63,69 ---- #include #include + #include namespace std _GLIBCXX_VISIBILITY(default) { diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/bits/utility.h gcc-12.2.0/libstdc++-v3/include/bits/utility.h *** gcc-12.1.0/libstdc++-v3/include/bits/utility.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/bits/utility.h Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 125,131 **** } // The standard says this macro and alias template should be in but we ! // we define them here, to be available in , and too. // _GLIBCXX_RESOLVE_LIB_DEFECTS // 3378. tuple_size_v/tuple_element_t should be available when // tuple_size/tuple_element are --- 125,131 ---- } // The standard says this macro and alias template should be in but we ! // define them here, to be available in , and too. // _GLIBCXX_RESOLVE_LIB_DEFECTS // 3378. tuple_size_v/tuple_element_t should be available when // tuple_size/tuple_element are *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 190,196 **** #if __cplusplus >= 201703L - // struct in_place_t { explicit in_place_t() = default; }; --- 190,195 ---- diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/experimental/bits/fs_ops.h gcc-12.2.0/libstdc++-v3/include/experimental/bits/fs_ops.h *** gcc-12.1.0/libstdc++-v3/include/experimental/bits/fs_ops.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/experimental/bits/fs_ops.h Fri Aug 19 08:09:55 2022 *************** inline namespace v1 *** 51,60 **** --- 51,66 ---- * @{ */ + [[__nodiscard__]] path absolute(const path& __p, const path& __base = current_path()); + [[__nodiscard__]] path canonical(const path& __p, const path& __base = current_path()); + + [[__nodiscard__]] path canonical(const path& __p, error_code& __ec); + + [[__nodiscard__]] path canonical(const path& __p, const path& __base, error_code& __ec); inline void *************** inline namespace v1 *** 66,71 **** --- 72,78 ---- { copy(__from, __to, copy_options::none, __ec); } void copy(const path& __from, const path& __to, copy_options __options); + void copy(const path& __from, const path& __to, copy_options __options, error_code& __ec) noexcept; *************** inline namespace v1 *** 107,131 **** --- 114,147 ---- void create_symlink(const path& __to, const path& __new_symlink, error_code& __ec) noexcept; + [[__nodiscard__]] path current_path(); + + [[__nodiscard__]] path current_path(error_code& __ec); + void current_path(const path& __p); void current_path(const path& __p, error_code& __ec) noexcept; + [[__nodiscard__]] bool equivalent(const path& __p1, const path& __p2); + [[__nodiscard__]] bool equivalent(const path& __p1, const path& __p2, error_code& __ec) noexcept; + [[__nodiscard__]] inline bool exists(file_status __s) noexcept { return status_known(__s) && __s.type() != file_type::not_found; } + [[__nodiscard__]] inline bool exists(const path& __p) { return exists(status(__p)); } + [[__nodiscard__]] inline bool exists(const path& __p, error_code& __ec) noexcept { *************** inline namespace v1 *** 138,200 **** --- 154,237 ---- return false; } + [[__nodiscard__]] uintmax_t file_size(const path& __p); + + [[__nodiscard__]] uintmax_t file_size(const path& __p, error_code& __ec) noexcept; + [[__nodiscard__]] uintmax_t hard_link_count(const path& __p); + + [[__nodiscard__]] uintmax_t hard_link_count(const path& __p, error_code& __ec) noexcept; + [[__nodiscard__]] inline bool is_block_file(file_status __s) noexcept { return __s.type() == file_type::block; } + [[__nodiscard__]] inline bool is_block_file(const path& __p) { return is_block_file(status(__p)); } + [[__nodiscard__]] inline bool is_block_file(const path& __p, error_code& __ec) noexcept { return is_block_file(status(__p, __ec)); } + [[__nodiscard__]] inline bool is_character_file(file_status __s) noexcept { return __s.type() == file_type::character; } + [[__nodiscard__]] inline bool is_character_file(const path& __p) { return is_character_file(status(__p)); } + [[__nodiscard__]] inline bool is_character_file(const path& __p, error_code& __ec) noexcept { return is_character_file(status(__p, __ec)); } + [[__nodiscard__]] inline bool is_directory(file_status __s) noexcept { return __s.type() == file_type::directory; } + [[__nodiscard__]] inline bool is_directory(const path& __p) { return is_directory(status(__p)); } + [[__nodiscard__]] inline bool is_directory(const path& __p, error_code& __ec) noexcept { return is_directory(status(__p, __ec)); } + [[__nodiscard__]] bool is_empty(const path& __p); + [[__nodiscard__]] bool is_empty(const path& __p, error_code& __ec) noexcept; + [[__nodiscard__]] inline bool is_fifo(file_status __s) noexcept { return __s.type() == file_type::fifo; } + [[__nodiscard__]] inline bool is_fifo(const path& __p) { return is_fifo(status(__p)); } + [[__nodiscard__]] inline bool is_fifo(const path& __p, error_code& __ec) noexcept { return is_fifo(status(__p, __ec)); } + [[__nodiscard__]] inline bool is_other(file_status __s) noexcept { *************** inline namespace v1 *** 202,253 **** --- 239,305 ---- && !is_symlink(__s); } + [[__nodiscard__]] inline bool is_other(const path& __p) { return is_other(status(__p)); } + [[__nodiscard__]] inline bool is_other(const path& __p, error_code& __ec) noexcept { return is_other(status(__p, __ec)); } + [[__nodiscard__]] inline bool is_regular_file(file_status __s) noexcept { return __s.type() == file_type::regular; } + [[__nodiscard__]] inline bool is_regular_file(const path& __p) { return is_regular_file(status(__p)); } + [[__nodiscard__]] inline bool is_regular_file(const path& __p, error_code& __ec) noexcept { return is_regular_file(status(__p, __ec)); } + [[__nodiscard__]] inline bool is_socket(file_status __s) noexcept { return __s.type() == file_type::socket; } + [[__nodiscard__]] inline bool is_socket(const path& __p) { return is_socket(status(__p)); } + [[__nodiscard__]] inline bool is_socket(const path& __p, error_code& __ec) noexcept { return is_socket(status(__p, __ec)); } + [[__nodiscard__]] inline bool is_symlink(file_status __s) noexcept { return __s.type() == file_type::symlink; } + [[__nodiscard__]] inline bool is_symlink(const path& __p) { return is_symlink(symlink_status(__p)); } + [[__nodiscard__]] inline bool is_symlink(const path& __p, error_code& __ec) noexcept { return is_symlink(symlink_status(__p, __ec)); } + [[__nodiscard__]] file_time_type last_write_time(const path& __p); + + [[__nodiscard__]] file_time_type last_write_time(const path& __p, error_code& __ec) noexcept; + void last_write_time(const path& __p, file_time_type __new_time); void last_write_time(const path& __p, file_time_type __new_time, error_code& __ec) noexcept; *************** inline namespace v1 *** 255,261 **** --- 307,316 ---- void permissions(const path& __p, perms __prms); void permissions(const path& __p, perms __prms, error_code& __ec) noexcept; + [[__nodiscard__]] path read_symlink(const path& __p); + + [[__nodiscard__]] path read_symlink(const path& __p, error_code& __ec); bool remove(const path& __p); *************** inline namespace v1 *** 270,291 **** --- 325,362 ---- void resize_file(const path& __p, uintmax_t __size); void resize_file(const path& __p, uintmax_t __size, error_code& __ec) noexcept; + [[__nodiscard__]] space_info space(const path& __p); + + [[__nodiscard__]] space_info space(const path& __p, error_code& __ec) noexcept; + [[__nodiscard__]] file_status status(const path& __p); + + [[__nodiscard__]] file_status status(const path& __p, error_code& __ec) noexcept; + [[__nodiscard__]] inline bool status_known(file_status __s) noexcept { return __s.type() != file_type::none; } + [[__nodiscard__]] file_status symlink_status(const path& __p); + + [[__nodiscard__]] file_status symlink_status(const path& __p, error_code& __ec) noexcept; + [[__nodiscard__]] path system_complete(const path& __p); + + [[__nodiscard__]] path system_complete(const path& __p, error_code& __ec); + [[__nodiscard__]] path temp_directory_path(); + + [[__nodiscard__]] path temp_directory_path(error_code& __ec); /// @} group filesystem-ts diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/experimental/bits/fs_path.h gcc-12.2.0/libstdc++-v3/include/experimental/bits/fs_path.h *** gcc-12.1.0/libstdc++-v3/include/experimental/bits/fs_path.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/experimental/bits/fs_path.h Fri Aug 19 08:09:55 2022 *************** namespace __detail *** 140,149 **** inline _Source _S_range_begin(_Source __begin) { return __begin; } ! struct __null_terminated { }; template ! inline __null_terminated _S_range_end(_Source) { return {}; } template --- 140,149 ---- inline _Source _S_range_begin(_Source __begin) { return __begin; } ! struct __nul_terminated { }; template ! inline __nul_terminated _S_range_end(_Source) { return {}; } template *************** namespace __detail *** 459,469 **** struct _Cvt; static string_type ! _S_convert(value_type* __src, __detail::__null_terminated) { return string_type(__src); } static string_type ! _S_convert(const value_type* __src, __detail::__null_terminated) { return string_type(__src); } template --- 459,469 ---- struct _Cvt; static string_type ! _S_convert(value_type* __src, __detail::__nul_terminated) { return string_type(__src); } static string_type ! _S_convert(const value_type* __src, __detail::__nul_terminated) { return string_type(__src); } template *************** namespace __detail *** 477,483 **** template static string_type ! _S_convert(_InputIterator __src, __detail::__null_terminated) { auto __s = _S_string_from_iter(__src); return _S_convert(__s.c_str(), __s.c_str() + __s.size()); --- 477,483 ---- template static string_type ! _S_convert(_InputIterator __src, __detail::__nul_terminated) { auto __s = _S_string_from_iter(__src); return _S_convert(__s.c_str(), __s.c_str() + __s.size()); *************** namespace __detail *** 504,510 **** template static string_type ! _S_convert_loc(_InputIterator __src, __detail::__null_terminated, const std::locale& __loc) { const std::string __s = _S_string_from_iter(__src); --- 504,510 ---- template static string_type ! _S_convert_loc(_InputIterator __src, __detail::__nul_terminated, const std::locale& __loc) { const std::string __s = _S_string_from_iter(__src); diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/experimental/bits/simd.h gcc-12.2.0/libstdc++-v3/include/experimental/bits/simd.h *** gcc-12.1.0/libstdc++-v3/include/experimental/bits/simd.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/experimental/bits/simd.h Fri Aug 19 08:09:55 2022 *************** template *** 2430,2446 **** --- 2430,2452 ---- template <> \ struct __intrinsic_type_impl<_Tp> { using type = __vector _Tp; } _GLIBCXX_SIMD_PPC_INTRIN(float); + #ifdef __VSX__ _GLIBCXX_SIMD_PPC_INTRIN(double); + #endif _GLIBCXX_SIMD_PPC_INTRIN(signed char); _GLIBCXX_SIMD_PPC_INTRIN(unsigned char); _GLIBCXX_SIMD_PPC_INTRIN(signed short); _GLIBCXX_SIMD_PPC_INTRIN(unsigned short); _GLIBCXX_SIMD_PPC_INTRIN(signed int); _GLIBCXX_SIMD_PPC_INTRIN(unsigned int); + #if defined __VSX__ || __SIZEOF_LONG__ == 4 _GLIBCXX_SIMD_PPC_INTRIN(signed long); _GLIBCXX_SIMD_PPC_INTRIN(unsigned long); + #endif + #ifdef __VSX__ _GLIBCXX_SIMD_PPC_INTRIN(signed long long); _GLIBCXX_SIMD_PPC_INTRIN(unsigned long long); + #endif #undef _GLIBCXX_SIMD_PPC_INTRIN template *************** template *** 2450,2459 **** static constexpr bool _S_is_ldouble = is_same_v<_Tp, long double>; // allow _Tp == long double with -mlong-double-64 static_assert(!(_S_is_ldouble && sizeof(long double) > sizeof(double)), ! "no __intrinsic_type support for long double on PPC"); #ifndef __VSX__ ! static_assert(!is_same_v<_Tp, double>, ! "no __intrinsic_type support for double on PPC w/o VSX"); #endif using type = typename __intrinsic_type_impl< --- 2456,2466 ---- static constexpr bool _S_is_ldouble = is_same_v<_Tp, long double>; // allow _Tp == long double with -mlong-double-64 static_assert(!(_S_is_ldouble && sizeof(long double) > sizeof(double)), ! "no __intrinsic_type support for 128-bit floating point on PowerPC"); #ifndef __VSX__ ! static_assert(!(is_same_v<_Tp, double> ! || (_S_is_ldouble && sizeof(long double) == sizeof(double))), ! "no __intrinsic_type support for 64-bit floating point on PowerPC w/o VSX"); #endif using type = typename __intrinsic_type_impl< diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/experimental/numeric gcc-12.2.0/libstdc++-v3/include/experimental/numeric *** gcc-12.1.0/libstdc++-v3/include/experimental/numeric Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/experimental/numeric Fri Aug 19 08:09:55 2022 *************** inline namespace fundamentals_v2 *** 56,72 **** constexpr common_type_t<_Mn, _Nn> gcd(_Mn __m, _Nn __n) noexcept { ! static_assert(is_integral_v<_Mn>, ! "std::experimental::gcd arguments must be integers"); ! static_assert(is_integral_v<_Nn>, ! "std::experimental::gcd arguments must be integers"); ! static_assert(_Mn(2) != _Mn(1), ! "std::experimental::gcd arguments must not be bool"); ! static_assert(_Nn(2) != _Nn(1), ! "std::experimental::gcd arguments must not be bool"); ! using _Up = make_unsigned_t>; ! return std::__detail::__gcd(std::__detail::__absu<_Up>(__m), ! std::__detail::__absu<_Up>(__n)); } /// Least common multiple --- 56,70 ---- constexpr common_type_t<_Mn, _Nn> gcd(_Mn __m, _Nn __n) noexcept { ! static_assert(is_integral_v<_Mn> && is_integral_v<_Nn>, ! "std::experimental::gcd arguments must be integers"); ! static_assert(_Mn(2) == 2 && _Nn(2) == 2, ! "std::experimental::gcd arguments must not be bool"); ! namespace __detail = std::__detail; ! using _Ct = common_type_t<_Mn, _Nn>; ! const _Ct __m2 = __detail::__abs_r<_Ct>(__m); ! const _Ct __n2 = __detail::__abs_r<_Ct>(__n); ! return __detail::__gcd>(__m2, __n2); } /// Least common multiple *************** inline namespace fundamentals_v2 *** 74,90 **** constexpr common_type_t<_Mn, _Nn> lcm(_Mn __m, _Nn __n) { ! static_assert(is_integral_v<_Mn>, ! "std::experimental::lcm arguments must be integers"); ! static_assert(is_integral_v<_Nn>, "std::experimental::lcm arguments must be integers"); ! static_assert(_Mn(2) != _Mn(1), ! "std::experimental::lcm arguments must not be bool"); ! static_assert(_Nn(2) != _Nn(1), "std::experimental::lcm arguments must not be bool"); ! using _Up = make_unsigned_t>; ! return std::__detail::__lcm(std::__detail::__absu<_Up>(__m), ! std::__detail::__absu<_Up>(__n)); } } // namespace fundamentals_v2 } // namespace experimental --- 72,96 ---- constexpr common_type_t<_Mn, _Nn> lcm(_Mn __m, _Nn __n) { ! static_assert(is_integral_v<_Mn> && is_integral_v<_Nn>, "std::experimental::lcm arguments must be integers"); ! static_assert(_Mn(2) == 2 && _Nn(2) == 2, "std::experimental::lcm arguments must not be bool"); ! namespace __detail = std::__detail; ! using _Ct = common_type_t<_Mn, _Nn>; ! const _Ct __m2 = __detail::__abs_r<_Ct>(__m); ! const _Ct __n2 = __detail::__abs_r<_Ct>(__n); ! if (__m2 == 0 || __n2 == 0) ! return 0; ! _Ct __r = __m2 / __detail::__gcd>(__m2, __n2); ! ! if _GLIBCXX17_CONSTEXPR (is_signed_v<_Ct>) ! if (__is_constant_evaluated()) ! return __r * __n2; // constant evaluation can detect overflow here. ! ! bool __overflow = __builtin_mul_overflow(__r, __n2, &__r); ! __glibcxx_assert(!__overflow); ! return __r; } } // namespace fundamentals_v2 } // namespace experimental diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/ext/malloc_allocator.h gcc-12.2.0/libstdc++-v3/include/ext/malloc_allocator.h *** gcc-12.1.0/libstdc++-v3/include/ext/malloc_allocator.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/ext/malloc_allocator.h Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 103,111 **** allocate(size_type __n, const void* = 0) { #if __cplusplus >= 201103L ! // _GLIBCXX_RESOLVE_LIB_DEFECTS ! // 3308. std::allocator().allocate(n) ! static_assert(sizeof(_Tp) != 0, "cannot allocate incomplete types"); #endif if (__builtin_expect(__n > this->_M_max_size(), false)) --- 103,111 ---- allocate(size_type __n, const void* = 0) { #if __cplusplus >= 201103L ! // _GLIBCXX_RESOLVE_LIB_DEFECTS ! // 3308. std::allocator().allocate(n) ! static_assert(sizeof(_Tp) != 0, "cannot allocate incomplete types"); #endif if (__builtin_expect(__n > this->_M_max_size(), false)) diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp gcc-12.2.0/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp *** gcc-12.1.0/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp Fri Aug 19 08:09:55 2022 *************** namespace detail *** 46,60 **** { enum { num_distinct_sizes_32_bit = 30, num_distinct_sizes_64_bit = 62, ! num_distinct_sizes = sizeof(std::size_t) != 8 ? ! num_distinct_sizes_32_bit : num_distinct_sizes_64_bit, }; // Originally taken from the SGI implementation; acknowledged in the docs. // Further modified (for 64 bits) from tr1's hashtable. ! static const std::size_t g_a_sizes[num_distinct_sizes_64_bit] = { /* 0 */ 5ul, /* 1 */ 11ul, --- 46,68 ---- { enum { + num_distinct_sizes_16_bit = 14, num_distinct_sizes_32_bit = 30, num_distinct_sizes_64_bit = 62, ! // The number of values is limited by the width of size_t. ! // Maybe we could just use (__SIZE_WIDTH__ - 2) here. ! #if __SIZE_WIDTH__ >= 64 ! num_distinct_sizes = num_distinct_sizes_64_bit ! #elif __SIZE_WIDTH__ >= 32 ! num_distinct_sizes = num_distinct_sizes_32_bit ! #else ! num_distinct_sizes = num_distinct_sizes_16_bit ! #endif }; // Originally taken from the SGI implementation; acknowledged in the docs. // Further modified (for 64 bits) from tr1's hashtable. ! static const std::size_t g_a_sizes[num_distinct_sizes] = { /* 0 */ 5ul, /* 1 */ 11ul, *************** namespace detail *** 70,75 **** --- 78,84 ---- /* 11 */ 14033ul, /* 12 */ 28411ul, /* 13 */ 57557ul, + #if __SIZE_WIDTH__ >= 32 /* 14 */ 116731ul, /* 15 */ 236897ul, /* 16 */ 480881ul, *************** namespace detail *** 86,91 **** --- 95,101 ---- /* 27 */ 1164186217ul, /* 28 */ 2364114217ul, /* 29 */ 4294967291ul, + #if __SIZE_WIDTH__ >= 64 /* 30 */ (std::size_t)8589934583ull, /* 31 */ (std::size_t)17179869143ull, /* 32 */ (std::size_t)34359738337ull, *************** namespace detail *** 118,123 **** --- 128,135 ---- /* 59 */ (std::size_t)4611686018427387847ull, /* 60 */ (std::size_t)9223372036854775783ull, /* 61 */ (std::size_t)18446744073709551557ull, + #endif + #endif }; } // namespace detail diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/ext/random gcc-12.2.0/libstdc++-v3/include/ext/random *** gcc-12.1.0/libstdc++-v3/include/ext/random Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/ext/random Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 346,351 **** --- 346,352 ---- 0xa3ac4000U, 0xecc1327aU> sfmt44497_64; + #if __SIZE_WIDTH__ >= 32 typedef simd_fast_mersenne_twister_engine sfmt216091_64; + #endif // __SIZE_WIDTH__ >= 32 #endif // __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/std/atomic gcc-12.2.0/libstdc++-v3/include/std/atomic *** gcc-12.1.0/libstdc++-v3/include/std/atomic Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/std/atomic Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 1241,1249 **** atomic_flag_clear(volatile atomic_flag* __a) noexcept { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } ! template ! using __atomic_val_t = typename atomic<_Tp>::value_type; template using __atomic_diff_t = typename atomic<_Tp>::difference_type; --- 1241,1250 ---- atomic_flag_clear(volatile atomic_flag* __a) noexcept { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } ! // _GLIBCXX_RESOLVE_LIB_DEFECTS ! // 3220. P0558 broke conforming C++14 uses of atomic shared_ptr template ! using __atomic_val_t = __type_identity_t<_Tp>; template using __atomic_diff_t = typename atomic<_Tp>::difference_type; diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/std/charconv gcc-12.2.0/libstdc++-v3/include/std/charconv *** gcc-12.1.0/libstdc++-v3/include/std/charconv Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/std/charconv Fri Aug 19 08:09:55 2022 *************** namespace __detail *** 436,442 **** __from_chars_alnum_to_val(unsigned char __c) { if _GLIBCXX17_CONSTEXPR (_DecOnly) ! return __c - '0'; else { // This initializer is deliberately made dependent in order to work --- 436,442 ---- __from_chars_alnum_to_val(unsigned char __c) { if _GLIBCXX17_CONSTEXPR (_DecOnly) ! return static_cast(__c - '0'); else { // This initializer is deliberately made dependent in order to work diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/std/expected gcc-12.2.0/libstdc++-v3/include/std/expected *** gcc-12.1.0/libstdc++-v3/include/std/expected Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/std/expected Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 95,126 **** class bad_expected_access : public bad_expected_access { public: explicit ! bad_expected_access(_Er __e) : _M_val(std::move(__e)) { } // XXX const char* what() const noexcept override; [[nodiscard]] _Er& error() & noexcept ! { return _M_val; } [[nodiscard]] const _Er& error() const & noexcept ! { return _M_val; } [[nodiscard]] _Er&& error() && noexcept ! { return std::move(_M_val); } [[nodiscard]] const _Er&& error() const && noexcept ! { return std::move(_M_val); } private: ! _Er _M_val; }; /// Tag type for constructing unexpected values in a std::expected --- 95,126 ---- class bad_expected_access : public bad_expected_access { public: explicit ! bad_expected_access(_Er __e) : _M_unex(std::move(__e)) { } // XXX const char* what() const noexcept override; [[nodiscard]] _Er& error() & noexcept ! { return _M_unex; } [[nodiscard]] const _Er& error() const & noexcept ! { return _M_unex; } [[nodiscard]] _Er&& error() && noexcept ! { return std::move(_M_unex); } [[nodiscard]] const _Er&& error() const && noexcept ! { return std::move(_M_unex); } private: ! _Er _M_unex; }; /// Tag type for constructing unexpected values in a std::expected *************** namespace __expected *** 175,181 **** constexpr explicit unexpected(_Err&& __e) noexcept(is_nothrow_constructible_v<_Er, _Err>) ! : _M_val(std::forward<_Err>(__e)) { } template --- 175,181 ---- constexpr explicit unexpected(_Err&& __e) noexcept(is_nothrow_constructible_v<_Er, _Err>) ! : _M_unex(std::forward<_Err>(__e)) { } template *************** namespace __expected *** 183,189 **** constexpr explicit unexpected(in_place_t, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Er, _Args...>) ! : _M_val(std::forward<_Args>(__args)...) { } template --- 183,189 ---- constexpr explicit unexpected(in_place_t, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Er, _Args...>) ! : _M_unex(std::forward<_Args>(__args)...) { } template *************** namespace __expected *** 192,198 **** unexpected(in_place_t, initializer_list<_Up> __il, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Er, initializer_list<_Up>&, _Args...>) ! : _M_val(__il, std::forward<_Args>(__args)...) { } constexpr unexpected& operator=(const unexpected&) = default; --- 192,198 ---- unexpected(in_place_t, initializer_list<_Up> __il, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Er, initializer_list<_Up>&, _Args...>) ! : _M_unex(__il, std::forward<_Args>(__args)...) { } constexpr unexpected& operator=(const unexpected&) = default; *************** namespace __expected *** 201,233 **** [[nodiscard]] constexpr const _Er& ! error() const & noexcept { return _M_val; } [[nodiscard]] constexpr _Er& ! error() & noexcept { return _M_val; } [[nodiscard]] constexpr const _Er&& ! error() const && noexcept { return std::move(_M_val); } [[nodiscard]] constexpr _Er&& ! error() && noexcept { return std::move(_M_val); } constexpr void swap(unexpected& __other) noexcept(is_nothrow_swappable_v<_Er>) { static_assert( is_swappable_v<_Er> ); using std::swap; ! swap(_M_val, __other._M_val); } template [[nodiscard]] friend constexpr bool operator==(const unexpected& __x, const unexpected<_Err>& __y) ! { return __x._M_val == __y.error(); } friend constexpr void swap(unexpected& __x, unexpected& __y) --- 201,233 ---- [[nodiscard]] constexpr const _Er& ! error() const & noexcept { return _M_unex; } [[nodiscard]] constexpr _Er& ! error() & noexcept { return _M_unex; } [[nodiscard]] constexpr const _Er&& ! error() const && noexcept { return std::move(_M_unex); } [[nodiscard]] constexpr _Er&& ! error() && noexcept { return std::move(_M_unex); } constexpr void swap(unexpected& __other) noexcept(is_nothrow_swappable_v<_Er>) { static_assert( is_swappable_v<_Er> ); using std::swap; ! swap(_M_unex, __other._M_unex); } template [[nodiscard]] friend constexpr bool operator==(const unexpected& __x, const unexpected<_Err>& __y) ! { return __x._M_unex == __y.error(); } friend constexpr void swap(unexpected& __x, unexpected& __y) *************** namespace __expected *** 236,242 **** { __x.swap(__y); } private: ! _Er _M_val; }; template unexpected(_Er) -> unexpected<_Er>; --- 236,242 ---- { __x.swap(__y); } private: ! _Er _M_unex; }; template unexpected(_Er) -> unexpected<_Er>; diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/std/future gcc-12.2.0/libstdc++-v3/include/std/future *** gcc-12.1.0/libstdc++-v3/include/std/future Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/std/future Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 140,173 **** deferred = 2 }; ! constexpr launch operator&(launch __x, launch __y) { return static_cast( static_cast(__x) & static_cast(__y)); } ! constexpr launch operator|(launch __x, launch __y) { return static_cast( static_cast(__x) | static_cast(__y)); } ! constexpr launch operator^(launch __x, launch __y) { return static_cast( static_cast(__x) ^ static_cast(__y)); } ! constexpr launch operator~(launch __x) { return static_cast(~static_cast(__x)); } ! inline launch& operator&=(launch& __x, launch __y) { return __x = __x & __y; } ! inline launch& operator|=(launch& __x, launch __y) { return __x = __x | __y; } ! inline launch& operator^=(launch& __x, launch __y) { return __x = __x ^ __y; } /// Status code for futures --- 140,173 ---- deferred = 2 }; ! constexpr launch operator&(launch __x, launch __y) noexcept { return static_cast( static_cast(__x) & static_cast(__y)); } ! constexpr launch operator|(launch __x, launch __y) noexcept { return static_cast( static_cast(__x) | static_cast(__y)); } ! constexpr launch operator^(launch __x, launch __y) noexcept { return static_cast( static_cast(__x) ^ static_cast(__y)); } ! constexpr launch operator~(launch __x) noexcept { return static_cast(~static_cast(__x)); } ! inline launch& operator&=(launch& __x, launch __y) noexcept { return __x = __x & __y; } ! inline launch& operator|=(launch& __x, launch __y) noexcept { return __x = __x | __y; } ! inline launch& operator^=(launch& __x, launch __y) noexcept { return __x = __x ^ __y; } /// Status code for futures diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/std/iosfwd gcc-12.2.0/libstdc++-v3/include/std/iosfwd *** gcc-12.1.0/libstdc++-v3/include/std/iosfwd Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/std/iosfwd Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_END_NAMESPACE_CXX11 *** 207,212 **** --- 207,253 ---- /// Class for @c wchar_t mixed input and output file streams. typedef basic_fstream wfstream; #endif + + #if __cplusplus >= 202002L && _GLIBCXX_USE_CXX11_ABI + template, + typename _Allocator = allocator<_CharT>> + class basic_syncbuf; + template, + typename _Allocator = allocator<_CharT>> + class basic_osyncstream; + + using syncbuf = basic_syncbuf; + using osyncstream = basic_osyncstream; + + #ifdef _GLIBCXX_USE_WCHAR_T + using wsyncbuf = basic_syncbuf; + using wosyncstream = basic_osyncstream; + #endif + #endif // C++20 && CXX11_ABI + + #if __cplusplus > 202002L + template> + class basic_spanbuf; + template> + class basic_ispanstream; + template> + class basic_ospanstream; + template> + class basic_spanstream; + + using spanbuf = basic_spanbuf; + using ispanstream = basic_ispanstream; + using ospanstream = basic_ospanstream; + using spanstream = basic_spanstream; + + #ifdef _GLIBCXX_USE_WCHAR_T + using wspanbuf = basic_spanbuf; + using wispanstream = basic_ispanstream; + using wospanstream = basic_ospanstream; + using wspanstream = basic_spanstream; + #endif + #endif // C++23 + /** @} */ _GLIBCXX_END_NAMESPACE_VERSION diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/std/istream gcc-12.2.0/libstdc++-v3/include/std/istream *** gcc-12.1.0/libstdc++-v3/include/std/istream Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/std/istream Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 784,790 **** * - if `width()` is greater than zero, `n` is `min(width(), n)` * - otherwise `n` is the number of elements of the array * - (before C++20 the pointer is assumed to point to an array of ! * - the largest possible size for an array of `char_type`). * * Characters are extracted and stored until one of the following happens: * - `n - 1` characters are stored --- 784,790 ---- * - if `width()` is greater than zero, `n` is `min(width(), n)` * - otherwise `n` is the number of elements of the array * - (before C++20 the pointer is assumed to point to an array of ! * the largest possible size for an array of `char_type`). * * Characters are extracted and stored until one of the following happens: * - `n - 1` characters are stored *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 802,820 **** inline basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) { size_t __n = __builtin_object_size(__s, 0); ! if (__builtin_expect(__n < sizeof(_CharT), false)) { // There is not even space for the required null terminator. __glibcxx_assert(__n >= sizeof(_CharT)); __in.width(0); __in.setstate(ios_base::failbit); } else { ! if (__n == (size_t)-1) ! __n = __gnu_cxx::__numeric_traits::__max; ! std::__istream_extract(__in, __s, __n / sizeof(_CharT)); } return __in; } --- 802,841 ---- inline basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) { + #ifdef __OPTIMIZE__ + // Function inlining might make the buffer size known, allowing us to + // prevent overflow. size_t __n = __builtin_object_size(__s, 0); ! if (__n < sizeof(_CharT)) { // There is not even space for the required null terminator. __glibcxx_assert(__n >= sizeof(_CharT)); + // No point calling __istream_extract, but still need to reset width. __in.width(0); __in.setstate(ios_base::failbit); } + else if (__n != (size_t)-1) + { + __n /= sizeof(_CharT); + streamsize __w = __in.width(); + std::__istream_extract(__in, __s, __n); + if (__in.good() && (__w <= 0 || __n < __w)) + { + // Stopped extracting early to avoid overflowing the buffer, + // but might have stopped anyway (and set eofbit) if at EOF. + const typename _Traits::int_type __c = __in.rdbuf()->sgetc(); + const bool __eof = _Traits::eq_int_type(__c, _Traits::eof()); + if (__builtin_expect(__eof, true)) // Assume EOF, not overflow. + __in.setstate(ios_base::eofbit); + } + } else + #endif // __OPTIMIZE { ! // Buffer size is unknown, have to assume it's huge. ! streamsize __n = __gnu_cxx::__numeric_traits::__max; ! __n /= sizeof(_CharT); ! std::__istream_extract(__in, __s, __n); } return __in; } diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/std/memory_resource gcc-12.2.0/libstdc++-v3/include/std/memory_resource *** gcc-12.1.0/libstdc++-v3/include/std/memory_resource Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/std/memory_resource Fri Aug 19 08:09:55 2022 *************** namespace pmr *** 338,343 **** --- 338,359 ---- __attribute__((__returns_nonnull__)) { return _M_resource; } + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 3683. operator== for polymorphic_allocator cannot deduce template arg + [[nodiscard]] + friend bool + operator==(const polymorphic_allocator& __a, + const polymorphic_allocator& __b) noexcept + { return *__a.resource() == *__b.resource(); } + + #if __cpp_impl_three_way_comparison < 201907L + [[nodiscard]] + friend bool + operator!=(const polymorphic_allocator& __a, + const polymorphic_allocator& __b) noexcept + { return !(__a == __b); } + #endif + private: #if ! __cpp_lib_make_obj_using_allocator using __uses_alloc1_ = __uses_alloc1; diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/std/numeric gcc-12.2.0/libstdc++-v3/include/std/numeric *** gcc-12.1.0/libstdc++-v3/include/std/numeric Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/std/numeric Fri Aug 19 08:09:55 2022 *************** *** 68,73 **** --- 68,74 ---- #if __cplusplus >= 201402L # include # include + # include #endif #if __cplusplus >= 201703L *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 93,111 **** #if __cplusplus >= 201402L namespace __detail { ! // std::abs is not constexpr, doesn't support unsigned integers, ! // and std::abs(std::numeric_limits::min()) is undefined. ! template ! constexpr _Up ! __absu(_Tp __val) { ! static_assert(is_unsigned<_Up>::value, "result type must be unsigned"); ! static_assert(sizeof(_Up) >= sizeof(_Tp), "result type must be at least as wide as the input type"); ! return __val < 0 ? -(_Up)__val : (_Up)__val; } ! template void __absu(bool) = delete; // GCD implementation, using Stein's algorithm template --- 94,118 ---- #if __cplusplus >= 201402L namespace __detail { ! // Like std::abs, but supports unsigned types and returns the specified type, ! // so |std::numeric_limits<_Tp>::min()| is OK if representable in _Res. ! template ! constexpr _Res ! __abs_r(_Tp __val) { ! static_assert(sizeof(_Res) >= sizeof(_Tp), "result type must be at least as wide as the input type"); ! ! if (__val >= 0) ! return __val; ! #ifdef _GLIBCXX_ASSERTIONS ! if (!__is_constant_evaluated()) // overflow already detected in constexpr ! __glibcxx_assert(__val != __gnu_cxx::__int_traits<_Res>::__min); ! #endif ! return -static_cast<_Res>(__val); } ! template void __abs_r(bool) = delete; // GCD implementation, using Stein's algorithm template *************** namespace __detail *** 142,157 **** __n >>= std::__countr_zero(__n); } } - - // LCM implementation - template - constexpr _Tp - __lcm(_Tp __m, _Tp __n) - { - return (__m != 0 && __n != 0) - ? (__m / __detail::__gcd(__m, __n)) * __n - : 0; - } } // namespace __detail #if __cplusplus >= 201703L --- 149,154 ---- *************** namespace __detail *** 166,178 **** constexpr common_type_t<_Mn, _Nn> gcd(_Mn __m, _Nn __n) noexcept { ! static_assert(is_integral_v<_Mn>, "std::gcd arguments must be integers"); ! static_assert(is_integral_v<_Nn>, "std::gcd arguments must be integers"); ! static_assert(_Mn(2) != _Mn(1), "std::gcd arguments must not be bool"); ! static_assert(_Nn(2) != _Nn(1), "std::gcd arguments must not be bool"); ! using _Up = make_unsigned_t>; ! return __detail::__gcd(__detail::__absu<_Up>(__m), ! __detail::__absu<_Up>(__n)); } /// Least common multiple --- 163,176 ---- constexpr common_type_t<_Mn, _Nn> gcd(_Mn __m, _Nn __n) noexcept { ! static_assert(is_integral_v<_Mn> && is_integral_v<_Nn>, ! "std::gcd arguments must be integers"); ! static_assert(_Mn(2) == 2 && _Nn(2) == 2, ! "std::gcd arguments must not be bool"); ! using _Ct = common_type_t<_Mn, _Nn>; ! const _Ct __m2 = __detail::__abs_r<_Ct>(__m); ! const _Ct __n2 = __detail::__abs_r<_Ct>(__n); ! return __detail::__gcd>(__m2, __n2); } /// Least common multiple *************** namespace __detail *** 180,192 **** constexpr common_type_t<_Mn, _Nn> lcm(_Mn __m, _Nn __n) noexcept { ! static_assert(is_integral_v<_Mn>, "std::lcm arguments must be integers"); ! static_assert(is_integral_v<_Nn>, "std::lcm arguments must be integers"); ! static_assert(_Mn(2) == 2, "std::lcm arguments must not be bool"); ! static_assert(_Nn(2) == 2, "std::lcm arguments must not be bool"); ! using _Up = make_unsigned_t>; ! return __detail::__lcm(__detail::__absu<_Up>(__m), ! __detail::__absu<_Up>(__n)); } #endif // C++17 --- 178,201 ---- constexpr common_type_t<_Mn, _Nn> lcm(_Mn __m, _Nn __n) noexcept { ! static_assert(is_integral_v<_Mn> && is_integral_v<_Nn>, ! "std::lcm arguments must be integers"); ! static_assert(_Mn(2) == 2 && _Nn(2) == 2, ! "std::lcm arguments must not be bool"); ! using _Ct = common_type_t<_Mn, _Nn>; ! const _Ct __m2 = __detail::__abs_r<_Ct>(__m); ! const _Ct __n2 = __detail::__abs_r<_Ct>(__n); ! if (__m2 == 0 || __n2 == 0) ! return 0; ! _Ct __r = __m2 / __detail::__gcd>(__m2, __n2); ! ! if constexpr (is_signed_v<_Ct>) ! if (__is_constant_evaluated()) ! return __r * __n2; // constant evaluation can detect overflow here. ! ! bool __overflow = __builtin_mul_overflow(__r, __n2, &__r); ! __glibcxx_assert(!__overflow); ! return __r; } #endif // C++17 diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/std/spanstream gcc-12.2.0/libstdc++-v3/include/std/spanstream *** gcc-12.1.0/libstdc++-v3/include/std/spanstream Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/std/spanstream Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 45,51 **** #define __cpp_lib_spanstream 202106L ! template> class basic_spanbuf : public basic_streambuf<_CharT, _Traits> { --- 45,51 ---- #define __cpp_lib_spanstream 202106L ! template class basic_spanbuf : public basic_streambuf<_CharT, _Traits> { *************** template; using wspanbuf = basic_spanbuf; ! template> class basic_ispanstream : public basic_istream<_CharT, _Traits> { --- 218,224 ---- using spanbuf = basic_spanbuf; using wspanbuf = basic_spanbuf; ! template class basic_ispanstream : public basic_istream<_CharT, _Traits> { *************** template; using wispanstream = basic_ispanstream; ! template> class basic_ospanstream : public basic_ostream<_CharT, _Traits> { --- 310,316 ---- using ispanstream = basic_ispanstream; using wispanstream = basic_ispanstream; ! template class basic_ospanstream : public basic_ostream<_CharT, _Traits> { *************** template; using wospanstream = basic_ospanstream; ! template> class basic_spanstream : public basic_iostream<_CharT, _Traits> { --- 378,384 ---- using ospanstream = basic_ospanstream; using wospanstream = basic_ospanstream; ! template class basic_spanstream : public basic_iostream<_CharT, _Traits> { diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/std/sstream gcc-12.2.0/libstdc++-v3/include/std/sstream *** gcc-12.1.0/libstdc++-v3/include/std/sstream Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/std/sstream Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_CXX11 *** 425,430 **** --- 425,431 ---- // This might not be the same character as _M_string.end() because // basic_stringbuf::overflow might have written to unused capacity // in _M_string without updating its length. + __attribute__((__always_inline__)) char_type* _M_high_mark() const _GLIBCXX_NOEXCEPT { diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/std/stacktrace gcc-12.2.0/libstdc++-v3/include/std/stacktrace *** gcc-12.1.0/libstdc++-v3/include/std/stacktrace Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/std/stacktrace Fri Aug 19 08:09:55 2022 *************** *** 38,44 **** #include #include #include - #include struct __glibcxx_backtrace_state; struct __glibcxx_backtrace_simple_data; --- 38,43 ---- *************** __glibcxx_backtrace_syminfo(__glibcxx_ba *** 70,75 **** --- 69,81 ---- void*); } + namespace __cxxabiv1 + { + extern "C" char* + __cxa_demangle(const char* __mangled_name, char* __output_buffer, + size_t* __length, int* __status); + } + namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/std/string_view gcc-12.2.0/libstdc++-v3/include/std/string_view *** gcc-12.1.0/libstdc++-v3/include/std/string_view Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/std/string_view Fri Aug 19 08:09:55 2022 *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 162,168 **** }) && (!requires { typename _DRange::traits_type; } || is_same_v) ! constexpr basic_string_view(_Range&& __r) noexcept(noexcept(ranges::size(__r)) && noexcept(ranges::data(__r))) : _M_len(ranges::size(__r)), _M_str(ranges::data(__r)) --- 162,168 ---- }) && (!requires { typename _DRange::traits_type; } || is_same_v) ! constexpr explicit basic_string_view(_Range&& __r) noexcept(noexcept(ranges::size(__r)) && noexcept(ranges::data(__r))) : _M_len(ranges::size(__r)), _M_str(ranges::data(__r)) diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/std/syncstream gcc-12.2.0/libstdc++-v3/include/std/syncstream *** gcc-12.1.0/libstdc++-v3/include/std/syncstream Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/std/syncstream Fri Aug 19 08:09:55 2022 *************** namespace std _GLIBCXX_VISIBILITY(defaul *** 50,57 **** { _GLIBCXX_BEGIN_NAMESPACE_VERSION ! template, ! typename _Alloc = allocator<_CharT>> class basic_syncbuf : public __syncbuf_base<_CharT, _Traits> { public: --- 50,56 ---- { _GLIBCXX_BEGIN_NAMESPACE_VERSION ! template class basic_syncbuf : public __syncbuf_base<_CharT, _Traits> { public: *************** _GLIBCXX_BEGIN_NAMESPACE_VERSION *** 241,248 **** __mutex _M_mtx; }; ! template , ! typename _Alloc = allocator<_CharT>> class basic_osyncstream : public basic_ostream<_CharT, _Traits> { using __ostream_type = basic_ostream<_CharT, _Traits>; --- 240,246 ---- __mutex _M_mtx; }; ! template class basic_osyncstream : public basic_ostream<_CharT, _Traits> { using __ostream_type = basic_ostream<_CharT, _Traits>; diff -Nrcpad gcc-12.1.0/libstdc++-v3/include/std/version gcc-12.2.0/libstdc++-v3/include/std/version *** gcc-12.1.0/libstdc++-v3/include/std/version Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/include/std/version Fri Aug 19 08:09:55 2022 *************** *** 315,321 **** # define __cpp_lib_expected 202202L #endif #define __cpp_lib_invoke_r 202106L ! #define __cpp_lib_ios_noreplace 202200L #if __cpp_lib_concepts # undef __cpp_lib_optional # define __cpp_lib_optional 202110L --- 315,321 ---- # define __cpp_lib_expected 202202L #endif #define __cpp_lib_invoke_r 202106L ! #define __cpp_lib_ios_noreplace 202207L #if __cpp_lib_concepts # undef __cpp_lib_optional # define __cpp_lib_optional 202110L diff -Nrcpad gcc-12.1.0/libstdc++-v3/libsupc++/eh_globals.cc gcc-12.2.0/libstdc++-v3/libsupc++/eh_globals.cc *** gcc-12.1.0/libstdc++-v3/libsupc++/eh_globals.cc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/libsupc++/eh_globals.cc Fri Aug 19 08:09:55 2022 *************** __cxxabiv1::__cxa_get_globals() _GLIBCXX *** 64,71 **** #else ! // Single-threaded fallback buffer. ! static __cxa_eh_globals eh_globals; #if __GTHREADS --- 64,89 ---- #else ! #if __has_cpp_attribute(clang::require_constant_initialization) ! # define __constinit [[clang::require_constant_initialization]] ! #endif ! ! namespace ! { ! struct constant_init ! { ! union { ! unsigned char unused; ! __cxa_eh_globals obj; ! }; ! constexpr constant_init() : obj() { } ! ! ~constant_init() { /* do nothing, union member is not destroyed */ } ! }; ! ! // Single-threaded fallback buffer. ! __constinit constant_init eh_globals; ! } #if __GTHREADS *************** eh_globals_dtor(void* ptr) *** 90,121 **** struct __eh_globals_init { __gthread_key_t _M_key; ! bool _M_init; ! __eh_globals_init() : _M_init(false) ! { if (__gthread_active_p()) ! _M_init = __gthread_key_create(&_M_key, eh_globals_dtor) == 0; } ~__eh_globals_init() { ! if (_M_init) __gthread_key_delete(_M_key); ! _M_init = false; } }; static __eh_globals_init init; extern "C" __cxa_eh_globals* __cxxabiv1::__cxa_get_globals_fast() _GLIBCXX_NOTHROW { __cxa_eh_globals* g; ! if (init._M_init) g = static_cast<__cxa_eh_globals*>(__gthread_getspecific(init._M_key)); else ! g = &eh_globals; return g; } --- 108,144 ---- struct __eh_globals_init { __gthread_key_t _M_key; ! static bool _S_init; ! __eh_globals_init() ! { if (__gthread_active_p()) ! _S_init = __gthread_key_create(&_M_key, eh_globals_dtor) == 0; } ~__eh_globals_init() { ! if (_S_init) __gthread_key_delete(_M_key); ! _S_init = false; } + + __eh_globals_init(const __eh_globals_init&) = delete; + __eh_globals_init& operator=(const __eh_globals_init&) = delete; }; + bool __eh_globals_init::_S_init = false; + static __eh_globals_init init; extern "C" __cxa_eh_globals* __cxxabiv1::__cxa_get_globals_fast() _GLIBCXX_NOTHROW { __cxa_eh_globals* g; ! if (init._S_init) g = static_cast<__cxa_eh_globals*>(__gthread_getspecific(init._M_key)); else ! g = &eh_globals.obj; return g; } *************** extern "C" __cxa_eh_globals* *** 123,129 **** __cxxabiv1::__cxa_get_globals() _GLIBCXX_NOTHROW { __cxa_eh_globals* g; ! if (init._M_init) { g = static_cast<__cxa_eh_globals*>(__gthread_getspecific(init._M_key)); if (!g) --- 146,152 ---- __cxxabiv1::__cxa_get_globals() _GLIBCXX_NOTHROW { __cxa_eh_globals* g; ! if (init._S_init) { g = static_cast<__cxa_eh_globals*>(__gthread_getspecific(init._M_key)); if (!g) *************** __cxxabiv1::__cxa_get_globals() _GLIBCXX *** 140,146 **** } } else ! g = &eh_globals; return g; } --- 163,169 ---- } } else ! g = &eh_globals.obj; return g; } *************** __cxxabiv1::__cxa_get_globals() _GLIBCXX *** 148,158 **** extern "C" __cxa_eh_globals* __cxxabiv1::__cxa_get_globals_fast() _GLIBCXX_NOTHROW ! { return &eh_globals; } extern "C" __cxa_eh_globals* __cxxabiv1::__cxa_get_globals() _GLIBCXX_NOTHROW ! { return &eh_globals; } #endif --- 171,181 ---- extern "C" __cxa_eh_globals* __cxxabiv1::__cxa_get_globals_fast() _GLIBCXX_NOTHROW ! { return &eh_globals.obj; } extern "C" __cxa_eh_globals* __cxxabiv1::__cxa_get_globals() _GLIBCXX_NOTHROW ! { return &eh_globals.obj; } #endif diff -Nrcpad gcc-12.1.0/libstdc++-v3/python/libstdcxx/v6/printers.py gcc-12.2.0/libstdc++-v3/python/libstdcxx/v6/printers.py *** gcc-12.1.0/libstdc++-v3/python/libstdcxx/v6/printers.py Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/python/libstdcxx/v6/printers.py Fri Aug 19 08:09:55 2022 *************** class SharedPointerPrinter: *** 242,247 **** --- 242,248 ---- state = 'empty' refcounts = self._get_refcounts() targ = self.val.type.template_argument(0) + targ = strip_versioned_namespace(str(targ)) if refcounts != 0: usecount = refcounts['_M_use_count'] *************** class SharedPointerPrinter: *** 250,256 **** state = 'expired, weak count %d' % weakcount else: state = 'use count %d, weak count %d' % (usecount, weakcount - 1) ! return '%s<%s> (%s)' % (self.typename, str(targ), state) def _tuple_impl_get(val): "Return the tuple element stored in a _Tuple_impl base class." --- 251,257 ---- state = 'expired, weak count %d' % weakcount else: state = 'use count %d, weak count %d' % (usecount, weakcount - 1) ! return '%s<%s> (%s)' % (self.typename, targ, state) def _tuple_impl_get(val): "Return the tuple element stored in a _Tuple_impl base class." *************** class StdErrorCodePrinter: *** 1551,1556 **** --- 1552,1566 ---- return None @classmethod + def _find_standard_errc_enum(cls, name): + for ns in ['', _versioned_namespace]: + try: + qname = 'std::{}{}'.format(ns, name) + return cls._find_errc_enum(qname) + except RuntimeError: + pass + + @classmethod def _match_net_ts_category(cls, cat): net_cats = ['stream', 'socket', 'ip::resolver'] for c in net_cats: *************** class StdErrorCodePrinter: *** 1591,1600 **** is_errno = cls._system_is_posix if typ.tag.endswith('::future_error_category'): name = 'future' ! enum = cls._find_errc_enum('std::future_errc') if typ.tag.endswith('::io_error_category'): name = 'io' ! enum = cls._find_errc_enum('std::io_errc') if name is None: try: --- 1601,1610 ---- is_errno = cls._system_is_posix if typ.tag.endswith('::future_error_category'): name = 'future' ! enum = cls._find_standard_errc_enum('future_errc') if typ.tag.endswith('::io_error_category'): name = 'io' ! enum = cls._find_standard_errc_enum('io_errc') if name is None: try: *************** class StdSpanPrinter: *** 1687,1693 **** return '[%d]' % count, (self.begin + count).dereference() def __init__(self, typename, val): ! self.typename = typename self.val = val if val.type.template_argument(1) == gdb.parse_and_eval('static_cast(-1)'): self.size = val['_M_extent']['_M_extent_value'] --- 1697,1703 ---- return '[%d]' % count, (self.begin + count).dereference() def __init__(self, typename, val): ! self.typename = strip_versioned_namespace(typename) self.val = val if val.type.template_argument(1) == gdb.parse_and_eval('static_cast(-1)'): self.size = val['_M_extent']['_M_extent_value'] *************** class StdAtomicPrinter: *** 1724,1730 **** "Print a std:atomic" def __init__(self, typename, val): ! self.typename = typename self.val = val self.shptr_printer = None self.value_type = self.val.type.template_argument(0) --- 1734,1740 ---- "Print a std:atomic" def __init__(self, typename, val): ! self.typename = strip_versioned_namespace(typename) self.val = val self.shptr_printer = None self.value_type = self.val.type.template_argument(0) *************** class FilteringTypePrinter(object): *** 1994,2000 **** self.enabled = True class _recognizer(object): ! "The recognizer class for TemplateTypePrinter." def __init__(self, match, name): self.match = match --- 2004,2010 ---- self.enabled = True class _recognizer(object): ! "The recognizer class for FilteringTypePrinter." def __init__(self, match, name): self.match = match diff -Nrcpad gcc-12.1.0/libstdc++-v3/src/c++17/floating_from_chars.cc gcc-12.2.0/libstdc++-v3/src/c++17/floating_from_chars.cc *** gcc-12.1.0/libstdc++-v3/src/c++17/floating_from_chars.cc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/src/c++17/floating_from_chars.cc Fri Aug 19 08:09:55 2022 *************** *** 40,46 **** #include #include #include - #include #include #include #if _GLIBCXX_HAVE_XLOCALE_H --- 40,45 ---- *************** namespace *** 142,151 **** // Find initial portion of [first, last) containing a floating-point number. // The string `digits` is either `dec_digits` or `hex_digits` ! // and `exp` is 'e' or 'p' or '\0'. const char* find_end_of_float(const char* first, const char* last, const char* digits, ! char exp) { while (first < last && strchr(digits, *first) != nullptr) ++first; --- 141,150 ---- // Find initial portion of [first, last) containing a floating-point number. // The string `digits` is either `dec_digits` or `hex_digits` ! // and `exp` is "eE", "pP" or NULL. const char* find_end_of_float(const char* first, const char* last, const char* digits, ! const char *exp) { while (first < last && strchr(digits, *first) != nullptr) ++first; *************** namespace *** 155,161 **** while (first < last && strchr(digits, *first)) ++first; } ! if (first < last && exp != 0 && std::tolower((unsigned char)*first) == exp) { ++first; if (first < last && (*first == '-' || *first == '+')) --- 154,160 ---- while (first < last && strchr(digits, *first)) ++first; } ! if (first < last && exp != nullptr && (*first == exp[0] || *first == exp[1])) { ++first; if (first < last && (*first == '-' || *first == '+')) *************** namespace *** 237,243 **** if ((last - first + 2) > buffer_resource::guaranteed_capacity()) { ! last = find_end_of_float(first + neg, last, digits, 'p'); #ifndef __cpp_exceptions if ((last - first + 2) > buffer_resource::guaranteed_capacity()) { --- 236,242 ---- if ((last - first + 2) > buffer_resource::guaranteed_capacity()) { ! last = find_end_of_float(first + neg, last, digits, "pP"); #ifndef __cpp_exceptions if ((last - first + 2) > buffer_resource::guaranteed_capacity()) { *************** namespace *** 261,267 **** if ((last - first) > buffer_resource::guaranteed_capacity()) { last = find_end_of_float(first + neg, last, digits, ! "e"[fmt == chars_format::fixed]); #ifndef __cpp_exceptions if ((last - first) > buffer_resource::guaranteed_capacity()) { --- 260,266 ---- if ((last - first) > buffer_resource::guaranteed_capacity()) { last = find_end_of_float(first + neg, last, digits, ! fmt == chars_format::fixed ? nullptr : "eE"); #ifndef __cpp_exceptions if ((last - first) > buffer_resource::guaranteed_capacity()) { diff -Nrcpad gcc-12.1.0/libstdc++-v3/src/c++17/fs_dir.cc gcc-12.2.0/libstdc++-v3/src/c++17/fs_dir.cc *** gcc-12.1.0/libstdc++-v3/src/c++17/fs_dir.cc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/src/c++17/fs_dir.cc Fri Aug 19 08:09:55 2022 *************** struct fs::_Dir : _Dir_base *** 46,54 **** { _Dir(const fs::path& p, bool skip_permission_denied, bool nofollow, [[maybe_unused]] bool filename_only, error_code& ec) ! : _Dir_base(fdcwd(), p.c_str(), skip_permission_denied, nofollow, ec) { ! #if _GLIBCXX_HAVE_DIRFD if (filename_only) return; // Do not store path p when we aren't going to use it. #endif --- 46,54 ---- { _Dir(const fs::path& p, bool skip_permission_denied, bool nofollow, [[maybe_unused]] bool filename_only, error_code& ec) ! : _Dir_base(p.c_str(), skip_permission_denied, nofollow, ec) { ! #if _GLIBCXX_HAVE_DIRFD && _GLIBCXX_HAVE_OPENAT && _GLIBCXX_HAVE_UNLINKAT if (filename_only) return; // Do not store path p when we aren't going to use it. #endif *************** struct fs::_Dir : _Dir_base *** 117,134 **** return false; } ! // Return a file descriptor for the directory and current entry's path. ! // If dirfd is available, use it and return only the filename. ! // Otherwise, return AT_FDCWD and return the full path. ! pair ! dir_and_pathname() const noexcept { const fs::path& p = entry.path(); #if _GLIBCXX_HAVE_DIRFD ! if (!p.empty()) ! return {::dirfd(this->dirp), std::prev(p.end())->c_str()}; #endif ! return {this->fdcwd(), p.c_str()}; } // Create a new _Dir for the directory this->entry.path(). --- 117,135 ---- return false; } ! // Return a pathname for the current directory entry, as an _At_path. ! _Dir_base::_At_path ! current() const noexcept { const fs::path& p = entry.path(); #if _GLIBCXX_HAVE_DIRFD ! if (!p.empty()) [[__likely__]] ! { ! auto len = std::prev(p.end())->native().size(); ! return {::dirfd(this->dirp), p.c_str(), p.native().size() - len}; ! } #endif ! return p.c_str(); } // Create a new _Dir for the directory this->entry.path(). *************** struct fs::_Dir : _Dir_base *** 136,143 **** open_subdir(bool skip_permission_denied, bool nofollow, error_code& ec) const noexcept { ! auto [dirfd, pathname] = dir_and_pathname(); ! _Dir_base d(dirfd, pathname, skip_permission_denied, nofollow, ec); // If this->path is empty, the new _Dir should have an empty path too. const fs::path& p = this->path.empty() ? this->path : this->entry.path(); return _Dir(std::move(d), p); --- 137,143 ---- open_subdir(bool skip_permission_denied, bool nofollow, error_code& ec) const noexcept { ! _Dir_base d(current(), skip_permission_denied, nofollow, ec); // If this->path is empty, the new _Dir should have an empty path too. const fs::path& p = this->path.empty() ? this->path : this->entry.path(); return _Dir(std::move(d), p); *************** struct fs::_Dir : _Dir_base *** 147,154 **** do_unlink(bool is_directory, error_code& ec) const noexcept { #if _GLIBCXX_HAVE_UNLINKAT ! auto [dirfd, pathname] = dir_and_pathname(); ! if (::unlinkat(dirfd, pathname, is_directory ? AT_REMOVEDIR : 0) == -1) { ec.assign(errno, std::generic_category()); return false; --- 147,155 ---- do_unlink(bool is_directory, error_code& ec) const noexcept { #if _GLIBCXX_HAVE_UNLINKAT ! const auto atp = current(); ! if (::unlinkat(atp.dir(), atp.path_at_dir(), ! is_directory ? AT_REMOVEDIR : 0) == -1) { ec.assign(errno, std::generic_category()); return false; diff -Nrcpad gcc-12.1.0/libstdc++-v3/src/filesystem/dir-common.h gcc-12.2.0/libstdc++-v3/src/filesystem/dir-common.h *** gcc-12.1.0/libstdc++-v3/src/filesystem/dir-common.h Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/src/filesystem/dir-common.h Fri Aug 19 08:09:55 2022 *************** *** 25,30 **** --- 25,31 ---- #ifndef _GLIBCXX_DIR_COMMON_H #define _GLIBCXX_DIR_COMMON_H 1 + #include // uint32_t #include // strcmp #include #if _GLIBCXX_FILESYSTEM_IS_WINDOWS *************** is_permission_denied_error(int e) *** 91,102 **** struct _Dir_base { // If no error occurs then dirp is non-null, // otherwise null (even if a permission denied error is ignored). ! _Dir_base(int fd, const posix::char_type* pathname, bool skip_permission_denied, bool nofollow, error_code& ec) noexcept ! : dirp(_Dir_base::openat(fd, pathname, nofollow)) { if (dirp) ec.clear(); --- 92,145 ---- struct _Dir_base { + // As well as the full pathname (including the directory iterator's path) + // this type contains a file descriptor for a directory and a second pathname + // relative to that directory. The file descriptor and relative pathname + // can be used with POSIX openat and unlinkat. + struct _At_path + { + // No file descriptor given, so interpret the pathname relative to the CWD. + _At_path(const posix::char_type* p) noexcept + : pathname(p), dir_fd(fdcwd()), offset(0) + { } + + _At_path(int fd, const posix::char_type* p, size_t offset) noexcept + : pathname(p), dir_fd(fd), offset(offset) + { } + + const posix::char_type* + path() const noexcept { return pathname; } + + int + dir() const noexcept { return dir_fd; } + + const posix::char_type* + path_at_dir() const noexcept { return pathname + offset; } + + private: + const posix::char_type* pathname; // Full path relative to CWD. + int dir_fd; // A directory descriptor (either the parent dir, or AT_FDCWD). + uint32_t offset; // Offset into pathname for the part relative to dir_fd. + + // Special value representing the current working directory. + // Not a valid file descriptor for an open directory stream. + static constexpr int + fdcwd() noexcept + { + #ifdef AT_FDCWD + return AT_FDCWD; + #else + return -1; // Use invalid fd if AT_FDCWD isn't supported. + #endif + } + }; + // If no error occurs then dirp is non-null, // otherwise null (even if a permission denied error is ignored). ! _Dir_base(const _At_path& atp, bool skip_permission_denied, bool nofollow, error_code& ec) noexcept ! : dirp(_Dir_base::openat(atp, nofollow)) { if (dirp) ec.clear(); *************** struct _Dir_base *** 143,158 **** } } - static constexpr int - fdcwd() noexcept - { - #ifdef AT_FDCWD - return AT_FDCWD; - #else - return -1; // Use invalid fd if AT_FDCWD isn't supported. - #endif - } - static bool is_dot_or_dotdot(const char* s) noexcept { return !strcmp(s, ".") || !strcmp(s, ".."); } --- 186,191 ---- *************** struct _Dir_base *** 174,180 **** } static posix::DIR* ! openat(int fd, const posix::char_type* pathname, bool nofollow) { #if _GLIBCXX_HAVE_FDOPENDIR && defined O_RDONLY && defined O_DIRECTORY \ && ! _GLIBCXX_FILESYSTEM_IS_WINDOWS --- 207,213 ---- } static posix::DIR* ! openat(const _At_path& atp, bool nofollow) { #if _GLIBCXX_HAVE_FDOPENDIR && defined O_RDONLY && defined O_DIRECTORY \ && ! _GLIBCXX_FILESYSTEM_IS_WINDOWS *************** struct _Dir_base *** 198,213 **** nofollow = false; #endif ! #ifdef AT_FDCWD ! fd = ::openat(fd, pathname, flags); #else // If we cannot use openat, there's no benefit to using posix::open unless // we will use O_NOFOLLOW, so just use the simpler posix::opendir. if (!nofollow) ! return posix::opendir(pathname); ! fd = ::open(pathname, flags); #endif if (fd == -1) --- 231,247 ---- nofollow = false; #endif + int fd; ! #if _GLIBCXX_HAVE_OPENAT ! fd = ::openat(atp.dir(), atp.path_at_dir(), flags); #else // If we cannot use openat, there's no benefit to using posix::open unless // we will use O_NOFOLLOW, so just use the simpler posix::opendir. if (!nofollow) ! return posix::opendir(atp.path()); ! fd = ::open(atp.path(), flags); #endif if (fd == -1) *************** struct _Dir_base *** 220,226 **** errno = err; return nullptr; #else ! return posix::opendir(pathname); #endif } --- 254,260 ---- errno = err; return nullptr; #else ! return posix::opendir(atp.path()); #endif } diff -Nrcpad gcc-12.1.0/libstdc++-v3/src/filesystem/dir.cc gcc-12.2.0/libstdc++-v3/src/filesystem/dir.cc *** gcc-12.1.0/libstdc++-v3/src/filesystem/dir.cc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/src/filesystem/dir.cc Fri Aug 19 08:09:55 2022 *************** struct fs::_Dir : std::filesystem::_Dir_ *** 53,59 **** { _Dir(const fs::path& p, bool skip_permission_denied, bool nofollow, error_code& ec) ! : _Dir_base(this->fdcwd(), p.c_str(), skip_permission_denied, nofollow, ec) { if (!ec) path = p; --- 53,59 ---- { _Dir(const fs::path& p, bool skip_permission_denied, bool nofollow, error_code& ec) ! : _Dir_base(p.c_str(), skip_permission_denied, nofollow, ec) { if (!ec) path = p; *************** struct fs::_Dir : std::filesystem::_Dir_ *** 113,129 **** return false; } ! // Return a file descriptor for the directory and current entry's path. ! // If dirfd is available, use it and return only the filename. ! // Otherwise, return AT_FDCWD and return the full path. ! pair ! dir_and_pathname() const noexcept { const fs::path& p = entry.path(); #if _GLIBCXX_HAVE_DIRFD ! return {::dirfd(this->dirp), std::prev(p.end())->c_str()}; #endif - return {this->fdcwd(), p.c_str()}; } // Create a new _Dir for the directory this->entry.path(). --- 113,129 ---- return false; } ! // Return a pathname for the current directory entry, as an _At_path. ! _Dir_base::_At_path ! current() const noexcept { const fs::path& p = entry.path(); #if _GLIBCXX_HAVE_DIRFD ! auto len = std::prev(p.end())->native().size(); ! return {::dirfd(this->dirp), p.c_str(), p.native().size() - len}; ! #else ! return p.c_str(); #endif } // Create a new _Dir for the directory this->entry.path(). *************** struct fs::_Dir : std::filesystem::_Dir_ *** 131,138 **** open_subdir(bool skip_permission_denied, bool nofollow, error_code& ec) noexcept { ! auto [dirfd, pathname] = dir_and_pathname(); ! _Dir_base d(dirfd, pathname, skip_permission_denied, nofollow, ec); return _Dir(std::move(d), entry.path()); } --- 131,137 ---- open_subdir(bool skip_permission_denied, bool nofollow, error_code& ec) noexcept { ! _Dir_base d(current(), skip_permission_denied, nofollow, ec); return _Dir(std::move(d), entry.path()); } diff -Nrcpad gcc-12.1.0/libstdc++-v3/src/filesystem/ops.cc gcc-12.2.0/libstdc++-v3/src/filesystem/ops.cc *** gcc-12.1.0/libstdc++-v3/src/filesystem/ops.cc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/src/filesystem/ops.cc Fri Aug 19 08:09:55 2022 *************** fs::space(const path& p, error_code& ec) *** 1176,1188 **** return info; } #ifdef _GLIBCXX_HAVE_SYS_STAT_H fs::file_status fs::status(const fs::path& p, error_code& ec) noexcept { file_status status; stat_type st; ! if (posix::stat(p.c_str(), &st)) { int err = errno; ec.assign(err, std::generic_category()); --- 1176,1218 ---- return info; } + #if _GLIBCXX_FILESYSTEM_IS_WINDOWS + static bool has_trailing_slash(const fs::path& p) + { + wchar_t c = p.native().back(); + return c == '/' || c == L'\\'; + } + #endif + #ifdef _GLIBCXX_HAVE_SYS_STAT_H fs::file_status fs::status(const fs::path& p, error_code& ec) noexcept { file_status status; + + auto str = p.c_str(); + + #if _GLIBCXX_FILESYSTEM_IS_WINDOWS + // stat() fails if there's a trailing slash (PR 88881) + path p2; + if (p.has_relative_path() && has_trailing_slash(p)) + { + __try + { + p2 = p.parent_path(); + str = p2.c_str(); + } + __catch(const bad_alloc&) + { + ec = std::make_error_code(std::errc::not_enough_memory); + return status; + } + str = p2.c_str(); + } + #endif + stat_type st; ! if (posix::stat(str, &st)) { int err = errno; ec.assign(err, std::generic_category()); *************** fs::file_status *** 1205,1212 **** fs::symlink_status(const fs::path& p, std::error_code& ec) noexcept { file_status status; stat_type st; ! if (posix::lstat(p.c_str(), &st)) { int err = errno; ec.assign(err, std::generic_category()); --- 1235,1264 ---- fs::symlink_status(const fs::path& p, std::error_code& ec) noexcept { file_status status; + + auto str = p.c_str(); + + #if _GLIBCXX_FILESYSTEM_IS_WINDOWS + // stat() fails if there's a trailing slash (PR 88881) + path p2; + if (p.has_relative_path() && has_trailing_slash(p)) + { + __try + { + p2 = p.parent_path(); + str = p2.c_str(); + } + __catch(const bad_alloc&) + { + ec = std::make_error_code(std::errc::not_enough_memory); + return status; + } + str = p2.c_str(); + } + #endif + stat_type st; ! if (posix::lstat(str, &st)) { int err = errno; ec.assign(err, std::generic_category()); diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/20_util/allocator/105975.cc gcc-12.2.0/libstdc++-v3/testsuite/20_util/allocator/105975.cc *** gcc-12.1.0/libstdc++-v3/testsuite/20_util/allocator/105975.cc Thu Jan 1 00:00:00 1970 --- gcc-12.2.0/libstdc++-v3/testsuite/20_util/allocator/105975.cc Fri Aug 19 08:09:55 2022 *************** *** 0 **** --- 1,18 ---- + // { dg-options "-std=gnu++20" } + // { dg-do compile { target c++20 } } + + // PR libstdc++/105957 + + #include + + consteval bool test_pr105957() + { + std::allocator a; + auto n = std::size_t(-1) / (sizeof(long long) - 1); + auto p = a.allocate(n); // { dg-error "constexpr" } + a.deallocate(p, n); + return true; + } + static_assert( test_pr105957() ); + + // { dg-error "throw_bad_array_new_length" "" { target *-*-* } 0 } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/20_util/expected/synopsis.cc gcc-12.2.0/libstdc++-v3/testsuite/20_util/expected/synopsis.cc *** gcc-12.1.0/libstdc++-v3/testsuite/20_util/expected/synopsis.cc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/20_util/expected/synopsis.cc Fri Aug 19 08:09:55 2022 *************** *** 1,5 **** --- 1,6 ---- // { dg-options "-std=gnu++23" } // { dg-do compile { target c++23 } } + // { dg-require-normal-namespace "" } #include diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/20_util/from_chars/4.cc gcc-12.2.0/libstdc++-v3/testsuite/20_util/from_chars/4.cc *** gcc-12.1.0/libstdc++-v3/testsuite/20_util/from_chars/4.cc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/20_util/from_chars/4.cc Fri Aug 19 08:09:55 2022 *************** test_max_mantissa() *** 300,308 **** --- 300,310 ---- if (Float_limits::is_iec559 && Float_limits::digits < UInt_limits::digits) { + #ifdef _GLIBCXX_USE_C99_MATH_TR1 std::printf("Testing %d-bit float, using %zu-bit integer\n", Float_limits::digits + (int)std::log2(Float_limits::max_exponent) + 1, sizeof(UIntT) * __CHAR_BIT__); + #endif std::from_chars_result res; FloatT flt; diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc gcc-12.2.0/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc *** gcc-12.1.0/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc Fri Aug 19 08:09:55 2022 *************** *** 5,14 **** --- 5,16 ---- int main() { + #if __cpp_lib_to_chars >= 201611L // FP from_char not available otherwise. // PR libstdc++/105324 // std::from_chars() assertion at floating_from_chars.cc:78 std::string s(512, '1'); s[1] = '.'; long double d; std::from_chars(s.data(), s.data() + s.size(), d); + #endif } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/20_util/polymorphic_allocator/lwg3683.cc gcc-12.2.0/libstdc++-v3/testsuite/20_util/polymorphic_allocator/lwg3683.cc *** gcc-12.1.0/libstdc++-v3/testsuite/20_util/polymorphic_allocator/lwg3683.cc Thu Jan 1 00:00:00 1970 --- gcc-12.2.0/libstdc++-v3/testsuite/20_util/polymorphic_allocator/lwg3683.cc Fri Aug 19 08:09:55 2022 *************** *** 0 **** --- 1,13 ---- + // { dg-do compile { target c++17 } } + + #include + + bool + test_lwg3683(const std::pmr::polymorphic_allocator& a) + { + if (a == std::pmr::get_default_resource()) + return true; + if (std::pmr::get_default_resource() != a) + return false; + throw a; + } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/105995.cc gcc-12.2.0/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/105995.cc *** gcc-12.1.0/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/105995.cc Thu Jan 1 00:00:00 1970 --- gcc-12.2.0/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/105995.cc Fri Aug 19 08:09:55 2022 *************** *** 0 **** --- 1,11 ---- + // { dg-options "-std=gnu++20" } + // { dg-do compile { target c++20 } } + // { dg-require-effective-target cxx11_abi } + + #include + + // PR libstdc++/105995 + // Not required by the standard, but supported for QoI. + constexpr std::string pr105995_empty; + constexpr std::string pr105995_partial = "0"; + constexpr std::string pr105995_full = "0123456789abcde"; diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc gcc-12.2.0/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc *** gcc-12.1.0/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc Fri Aug 19 08:09:55 2022 *************** test01() *** 36,42 **** }; R r; ! std::string_view s = r; VERIFY( s == r.str ); VERIFY( s.data() == std::ranges::data(r) ); VERIFY( s.size() == std::ranges::size(r) ); --- 36,42 ---- }; R r; ! std::string_view s{r}; VERIFY( s == r.str ); VERIFY( s.data() == std::ranges::data(r) ); VERIFY( s.size() == std::ranges::size(r) ); *************** test01() *** 50,59 **** static_assert( std::ranges::contiguous_range ); static_assert( std::ranges::sized_range ); R2 r2; ! std::string_view s2 = r2; // uses conversion to string_view VERIFY( s2 == "Out of range" ); VERIFY( std::string_view(const_cast(r2)) == s2 ); struct R3 : R { using R::begin; --- 50,64 ---- static_assert( std::ranges::contiguous_range ); static_assert( std::ranges::sized_range ); R2 r2; ! std::string_view s2(r2); // uses conversion to string_view VERIFY( s2 == "Out of range" ); VERIFY( std::string_view(const_cast(r2)) == s2 ); + // And again using copy-initialization instead of direct-initialization. + std::string_view s2_implicit = r2; // uses conversion to string_view + VERIFY( s2_implicit == "Out of range" ); + VERIFY( std::string_view(const_cast(r2)) == s2_implicit ); + struct R3 : R { using R::begin; *************** test01() *** 91,97 **** static_assert( std::ranges::contiguous_range ); static_assert( std::ranges::sized_range ); R5 r5; ! std::string_view s5 = r5; // Uses range constructor VERIFY( s5 == r5.str ); s5 = std::string_view(std::move(r5)); // In C++20 this used conversion op. VERIFY( s5 == r5.str ); // In C++23 it uses range constructor. --- 96,102 ---- static_assert( std::ranges::contiguous_range ); static_assert( std::ranges::sized_range ); R5 r5; ! std::string_view s5(r5); // Uses range constructor VERIFY( s5 == r5.str ); s5 = std::string_view(std::move(r5)); // In C++20 this used conversion op. VERIFY( s5 == r5.str ); // In C++23 it uses range constructor. *************** test04() *** 156,170 **** }; R r; ! std::basic_string_view s = r; // Use deduction guide. static_assert( std::is_same_v ); } int main() { test01(); test02(); test03(); test04(); } --- 161,190 ---- }; R r; ! std::basic_string_view s(r); // Use deduction guide. static_assert( std::is_same_v ); } + void + test05() + { + struct R + { + const char* begin() const { return nullptr; } + const char* end() const { return nullptr; } + }; + + // P2499R0 string_view range constructor should be explicit + // P2516R0 string_view is implicitly convertible from what? + static_assert( ! std::is_convertible_v ); + } + int main() { test01(); test02(); test03(); test04(); + test05(); } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc gcc-12.2.0/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc *** gcc-12.1.0/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc Fri Aug 19 08:09:55 2022 *************** test01() *** 36,42 **** }; R r; ! std::wstring_view s = r; VERIFY( s == r.str ); VERIFY( s.data() == std::ranges::data(r) ); VERIFY( s.size() == std::ranges::size(r) ); --- 36,42 ---- }; R r; ! std::wstring_view s{r}; VERIFY( s == r.str ); VERIFY( s.data() == std::ranges::data(r) ); VERIFY( s.size() == std::ranges::size(r) ); *************** test01() *** 50,59 **** static_assert( std::ranges::contiguous_range ); static_assert( std::ranges::sized_range ); R2 r2; ! std::wstring_view s2 = r2; // uses conversion to wstring_view VERIFY( s2 == L"Out of range" ); VERIFY( std::wstring_view(const_cast(r2)) == s2 ); struct R3 : R { using R::begin; --- 50,64 ---- static_assert( std::ranges::contiguous_range ); static_assert( std::ranges::sized_range ); R2 r2; ! std::wstring_view s2(r2); // uses conversion to wstring_view VERIFY( s2 == L"Out of range" ); VERIFY( std::wstring_view(const_cast(r2)) == s2 ); + // And again using copy-initialization instead of direct-initialization. + std::wstring_view s2_implicit = r2; // uses conversion to wstring_view + VERIFY( s2_implicit == L"Out of range" ); + VERIFY( std::wstring_view(const_cast(r2)) == s2_implicit ); + struct R3 : R { using R::begin; *************** test01() *** 91,100 **** static_assert( std::ranges::contiguous_range ); static_assert( std::ranges::sized_range ); R5 r5; ! std::wstring_view s5 = r5; // Uses range constructor VERIFY( s5 == r5.str ); s5 = std::wstring_view(std::move(r5)); // In C++20 this used conversion op. ! VERIFY( s5 == r5.str ); // In C++23 it uses range constructor. wchar_t arr[] = L"arrangement\0with\0nulls"; std::wstring_view sa = arr; // Does not use range constructor --- 96,105 ---- static_assert( std::ranges::contiguous_range ); static_assert( std::ranges::sized_range ); R5 r5; ! std::wstring_view s5(r5); // Uses range constructor VERIFY( s5 == r5.str ); s5 = std::wstring_view(std::move(r5)); // In C++20 this used conversion op. ! VERIFY( s5 == r5.str ); // In C++23 it uses range constructor. wchar_t arr[] = L"arrangement\0with\0nulls"; std::wstring_view sa = arr; // Does not use range constructor *************** test04() *** 156,170 **** }; R r; ! std::basic_string_view s = r; // Use deduction guide. static_assert( std::is_same_v ); } int main() { test01(); test02(); test03(); test04(); } --- 161,190 ---- }; R r; ! std::basic_string_view s(r); // Use deduction guide. static_assert( std::is_same_v ); } + void + test05() + { + struct R + { + const wchar_t* begin() const { return nullptr; } + const wchar_t* end() const { return nullptr; } + }; + + // P2499R0 string_view range constructor should be explicit + // P2516R0 string_view is implicitly convertible from what? + static_assert( ! std::is_convertible_v ); + } + int main() { test01(); test02(); test03(); test04(); + test05(); } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/24_iterators/common_iterator/1.cc gcc-12.2.0/libstdc++-v3/testsuite/24_iterators/common_iterator/1.cc *** gcc-12.1.0/libstdc++-v3/testsuite/24_iterators/common_iterator/1.cc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/24_iterators/common_iterator/1.cc Fri Aug 19 08:09:55 2022 *************** test01() *** 27,41 **** using I = std::common_iterator; static_assert( std::is_default_constructible_v ); static_assert( std::is_copy_constructible_v ); static_assert( std::is_copy_assignable_v ); static_assert( std::is_constructible_v ); static_assert( std::is_constructible_v ); ! struct sentinel { operator int*() const { return nullptr; } }; using K = std::common_iterator; static_assert( std::is_constructible_v ); static_assert( std::is_assignable_v ); struct sentinel2 { const int* p; --- 27,56 ---- using I = std::common_iterator; static_assert( std::is_default_constructible_v ); static_assert( std::is_copy_constructible_v ); + static_assert( std::is_move_constructible_v ); static_assert( std::is_copy_assignable_v ); + static_assert( std::is_move_assignable_v ); static_assert( std::is_constructible_v ); static_assert( std::is_constructible_v ); ! static_assert( std::is_nothrow_copy_constructible_v ); // GCC extension ! static_assert( std::is_nothrow_move_constructible_v ); // GCC extension ! static_assert( std::is_nothrow_copy_assignable_v ); // GCC extension ! static_assert( std::is_nothrow_move_assignable_v ); // GCC extension ! ! struct sentinel { operator int*() const noexcept { return nullptr; } }; using K = std::common_iterator; static_assert( std::is_constructible_v ); static_assert( std::is_assignable_v ); + static_assert( std::is_nothrow_assignable_v ); // GCC extension + + struct sentinel_throwing { operator int*() const { return nullptr; } }; + using K_throwing = std::common_iterator; + // Conversion is noexcept(false) + static_assert( ! std::is_nothrow_assignable_v ); + + struct sentinel2 { const int* p; *************** test01() *** 46,51 **** --- 61,72 ---- using J = std::common_iterator; static_assert( std::is_constructible_v ); static_assert( std::is_convertible_v ); + + static_assert( std::is_constructible_v ); + static_assert( std::is_convertible_v ); + + // Constructor is noexcept(false) + static_assert( ! std::is_nothrow_constructible_v ); } void diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/24_iterators/common_iterator/100823.cc gcc-12.2.0/libstdc++-v3/testsuite/24_iterators/common_iterator/100823.cc *** gcc-12.1.0/libstdc++-v3/testsuite/24_iterators/common_iterator/100823.cc Thu Jan 1 00:00:00 1970 --- gcc-12.2.0/libstdc++-v3/testsuite/24_iterators/common_iterator/100823.cc Fri Aug 19 08:09:55 2022 *************** *** 0 **** --- 1,43 ---- + // { dg-options "-std=gnu++20 -D_GLIBCXX_ASSERTIONS" } + // { dg-do run { target c++20 } } + #include + #include + #include + + void + test_valueless_assignment() + { + int x[1] { }; + __gnu_test::test_forward_range r(x); + using Iter = decltype(r.begin()); + using Sent = decltype(r.end()); + + std::common_iterator i; + const std::common_iterator j(r.begin()); + try + { + struct Bomb + { + bool operator==(Iter) const { return true; } + operator Sent() const { throw 1; } + }; + std::common_iterator b{Bomb{}}; + i = b; // Throws, leaving i valueless-by-exception. + VERIFY(false); + } + catch (int) + { + std::common_iterator k(i); + + // PR libstdc++/100823 + k = i; // Valid even though both operands are valueless. + + i = j; // No longer valueless. + } + VERIFY( i == j ); + } + + int main() + { + test_valueless_assignment(); + } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/24_iterators/counted_iterator/lwg3643.cc gcc-12.2.0/libstdc++-v3/testsuite/24_iterators/counted_iterator/lwg3643.cc *** gcc-12.1.0/libstdc++-v3/testsuite/24_iterators/counted_iterator/lwg3643.cc Thu Jan 1 00:00:00 1970 --- gcc-12.2.0/libstdc++-v3/testsuite/24_iterators/counted_iterator/lwg3643.cc Fri Aug 19 08:09:55 2022 *************** *** 0 **** --- 1,27 ---- + // { dg-options "-std=gnu++20" } + // { dg-do compile { target c++20 } } + + #include + + struct InputIterator + { + using difference_type = int; + using value_type = int; + + constexpr int operator*() const noexcept { return 0; } + InputIterator& operator++() { return *this; } + constexpr void operator++(int) { } + }; + + static_assert( std::input_iterator ); + static_assert( !std::forward_iterator ); + + constexpr bool + test_lwg3643() + { + std::counted_iterator iter({}, 1); + iter++; + return iter == std::default_sentinel; + } + + static_assert( test_lwg3643() ); diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/gcd/105844.cc gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/gcd/105844.cc *** gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/gcd/105844.cc Thu Jan 1 00:00:00 1970 --- gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/gcd/105844.cc Fri Aug 19 08:09:55 2022 *************** *** 0 **** --- 1,21 ---- + // { dg-do compile { target c++17 } } + #include + #include + + // PR libstdc++/105844 + + // |INT_MIN| can be represented in common_type_t i.e. unsigned. + static_assert( std::gcd(INT_MIN, 2u) == 2 ); + static_assert( std::gcd(2u, INT_MIN) == 2 ); + + // |LLONG_MIN| can be represented in unsigned long long. + static_assert( std::gcd(LLONG_MIN, 2ull) == 2 ); + static_assert( std::gcd(2ull, LLONG_MIN) == 2 ); + + // But |INT_MIN| cannot be represented in common_type i.e. int. + constexpr int a = std::gcd(INT_MIN, 1); // { dg-error "overflow" } + constexpr int b = std::gcd(1, INT_MIN); // { dg-error "overflow" } + + // And |LLONG_MIN| cannot be represented in long. + constexpr long long c = std::gcd(LLONG_MIN, 1); // { dg-error "overflow" } + constexpr long long d = std::gcd(1, LLONG_MIN); // { dg-error "overflow" } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc *** gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc Fri Aug 19 08:09:55 2022 *************** test01() *** 45,53 **** std::gcd(0.1, 0.1); // { dg-error "from here" } } ! // { dg-error "must be integers" "" { target *-*-* } 169 } ! // { dg-error "must be integers" "" { target *-*-* } 170 } ! // { dg-error "must not be bool" "" { target *-*-* } 171 } ! // { dg-error "must not be bool" "" { target *-*-* } 172 } // { dg-prune-output "deleted function" } // { dg-prune-output "incomplete type .*make_unsigned" } --- 45,55 ---- std::gcd(0.1, 0.1); // { dg-error "from here" } } ! // { dg-error "must be integers" "" { target *-*-* } 0 } ! // { dg-error "must not be bool" "" { target *-*-* } 0 } ! // These prunes could be removed if a fix for PR c++/96286 stops them. // { dg-prune-output "deleted function" } // { dg-prune-output "incomplete type .*make_unsigned" } + // { dg-prune-output "does not have integral type" } + // { dg-prune-output "non-integral type" } + // { dg-prune-output "invalid specialization" } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/lcm/105844.cc gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/lcm/105844.cc *** gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/lcm/105844.cc Thu Jan 1 00:00:00 1970 --- gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/lcm/105844.cc Fri Aug 19 08:09:55 2022 *************** *** 0 **** --- 1,22 ---- + // { dg-do compile { target c++17 } } + #include + #include + + // PR libstdc++/105844 + + // |INT_MIN| can be represented in common_type_t i.e. unsigned. + static_assert( std::lcm(INT_MIN, 1u) == INT_MAX+1u ); + static_assert( std::lcm(1u, INT_MIN) == INT_MAX+1u ); + + // But |INT_MIN| cannot be represented in common_type i.e. int. + constexpr int a = std::lcm(INT_MIN, 1); // { dg-error "overflow" } + constexpr int b = std::lcm(1, INT_MIN); // { dg-error "overflow" } + + // And the LCM of 50000 and 49999 cannot be represented in int. + constexpr int c = std::lcm(50000, 49999); // { dg-error "overflow" } + constexpr int d = std::lcm(49999, 50000); // { dg-error "overflow" } + + // Similarly for unsigned, but the diagnostic is a failed assertion instead. + constexpr int e = std::lcm(500000u, 499999); // { dg-error "in 'constexpr'" } + constexpr int f = std::lcm(499999u, 500000); // { dg-error "in 'constexpr'" } + // { dg-error "unreachable" "" { target *-*-* } 0 } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc *** gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc Fri Aug 19 08:09:55 2022 *************** test01() *** 45,53 **** std::lcm(0.1, 0.1); // { dg-error "from here" } } ! // { dg-error "must be integers" "" { target *-*-* } 183 } ! // { dg-error "must be integers" "" { target *-*-* } 184 } ! // { dg-error "must not be bool" "" { target *-*-* } 185 } ! // { dg-error "must not be bool" "" { target *-*-* } 186 } // { dg-prune-output "deleted function" } // { dg-prune-output "incomplete type .*make_unsigned" } --- 45,55 ---- std::lcm(0.1, 0.1); // { dg-error "from here" } } ! // { dg-error "must be integers" "" { target *-*-* } 0 } ! // { dg-error "must not be bool" "" { target *-*-* } 0 } ! // These prunes could be removed if a fix for PR c++/96286 stops them. // { dg-prune-output "deleted function" } // { dg-prune-output "incomplete type .*make_unsigned" } + // { dg-prune-output "does not have integral type" } + // { dg-prune-output "non-integral type" } + // { dg-prune-output "invalid specialization" } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/operators/values.cc gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/operators/values.cc *** gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/operators/values.cc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/operators/values.cc Fri Aug 19 08:09:55 2022 *************** *** 24,29 **** --- 24,37 ---- #include #include + // { dg-additional-options "-DSIMULATOR_TEST" { target simulator } } + + #ifdef SIMULATOR_TEST + # define ARGS 100, 1000 + #else + # define ARGS + #endif + void test01() { using namespace __gnu_test; *************** void test01() *** 32,46 **** std::bernoulli_distribution bd1(0.25); auto bbd1 = std::bind(bd1, eng); ! testDiscreteDist(bbd1, [](int n) { return bernoulli_pdf(n, 0.25); } ); std::bernoulli_distribution bd2(0.5); auto bbd2 = std::bind(bd2, eng); ! testDiscreteDist(bbd2, [](int n) { return bernoulli_pdf(n, 0.5); } ); std::bernoulli_distribution bd3(0.75); auto bbd3 = std::bind(bd3, eng); ! testDiscreteDist(bbd3, [](int n) { return bernoulli_pdf(n, 0.75); } ); } int main() --- 40,54 ---- std::bernoulli_distribution bd1(0.25); auto bbd1 = std::bind(bd1, eng); ! testDiscreteDist(bbd1, [](int n) { return bernoulli_pdf(n, 0.25); } ); std::bernoulli_distribution bd2(0.5); auto bbd2 = std::bind(bd2, eng); ! testDiscreteDist(bbd2, [](int n) { return bernoulli_pdf(n, 0.5); } ); std::bernoulli_distribution bd3(0.75); auto bbd3 = std::bind(bd3, eng); ! testDiscreteDist(bbd3, [](int n) { return bernoulli_pdf(n, 0.75); } ); } int main() diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/operators/values.cc gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/operators/values.cc *** gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/operators/values.cc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/operators/values.cc Fri Aug 19 08:09:55 2022 *************** *** 25,30 **** --- 25,38 ---- #include #include + // { dg-additional-options "-DSIMULATOR_TEST" { target simulator } } + + #ifdef SIMULATOR_TEST + # define ARGS 100, 1000 + #else + # define ARGS + #endif + void test01() { using namespace __gnu_test; *************** void test01() *** 33,41 **** std::binomial_distribution<> bd1(5, 0.3); auto bbd1 = std::bind(bd1, eng); ! testDiscreteDist(bbd1, [](int n) { return binomial_pdf(n, 5, 0.3); } ); ! // These tests take a relatively long time on soft-float simulated // targets, so please don't add new tests here, instead add a new file. } --- 41,49 ---- std::binomial_distribution<> bd1(5, 0.3); auto bbd1 = std::bind(bd1, eng); ! testDiscreteDist(bbd1, [](int n) { return binomial_pdf(n, 5, 0.3); } ); ! // These tests take a relatively long time on soft-float simulated targets. // targets, so please don't add new tests here, instead add a new file. } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/operators/values.cc gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/operators/values.cc *** gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/operators/values.cc Fri May 6 07:31:00 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/operators/values.cc Fri Aug 19 08:09:55 2022 *************** *** 24,29 **** --- 24,37 ---- #include #include + // { dg-additional-options "-DSIMULATOR_TEST" { target simulator } } + + #ifdef SIMULATOR_TEST + # define ARGS 100, 1000 + #else + # define ARGS + #endif + void test01() { using namespace __gnu_test; diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/operators/values.cc gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/operators/values.cc *** gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/operators/values.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/operators/values.cc Fri Aug 19 08:09:55 2022 *************** *** 24,29 **** --- 24,37 ---- #include #include + // { dg-additional-options "-DSIMULATOR_TEST" { target simulator } } + + #ifdef SIMULATOR_TEST + # define ARGS 100, 1000 + #else + # define ARGS + #endif + void test01() { using namespace __gnu_test; *************** void test01() *** 32,47 **** std::geometric_distribution<> gd1(0.5); auto bgd1 = std::bind(gd1, eng); ! testDiscreteDist(bgd1, [](int n) { return geometric_pdf(n, 0.5); } ); std::geometric_distribution<> gd2(0.75); auto bgd2 = std::bind(gd2, eng); ! testDiscreteDist(bgd2, [](int n) { return geometric_pdf(n, 0.75); } ); // libstdc++/48114 std::geometric_distribution<> gd3(0.25); auto bgd3 = std::bind(gd3, eng); ! testDiscreteDist(bgd3, [](int n) { return geometric_pdf(n, 0.25); } ); } int main() --- 40,55 ---- std::geometric_distribution<> gd1(0.5); auto bgd1 = std::bind(gd1, eng); ! testDiscreteDist(bgd1, [](int n) { return geometric_pdf(n, 0.5); } ); std::geometric_distribution<> gd2(0.75); auto bgd2 = std::bind(gd2, eng); ! testDiscreteDist(bgd2, [](int n) { return geometric_pdf(n, 0.75); } ); // libstdc++/48114 std::geometric_distribution<> gd3(0.25); auto bgd3 = std::bind(gd3, eng); ! testDiscreteDist(bgd3, [](int n) { return geometric_pdf(n, 0.25); } ); } int main() diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/operators/values.cc gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/operators/values.cc *** gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/operators/values.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/operators/values.cc Fri Aug 19 08:09:55 2022 *************** *** 26,31 **** --- 26,39 ---- #include #include + // { dg-additional-options "-DSIMULATOR_TEST" { target simulator } } + + #ifdef SIMULATOR_TEST + # define ARGS 100, 1000 + #else + # define ARGS + #endif + void test01() { using namespace __gnu_test; *************** void test01() *** 34,51 **** std::negative_binomial_distribution<> nbd1(5, 0.3); auto bnbd1 = std::bind(nbd1, eng); ! testDiscreteDist(bnbd1, [](int n) ! { return negative_binomial_pdf(n, 5, 0.3); } ); std::negative_binomial_distribution<> nbd2(55, 0.3); auto bnbd2 = std::bind(nbd2, eng); ! testDiscreteDist(bnbd2, [](int n) ! { return negative_binomial_pdf(n, 55, 0.3); } ); std::negative_binomial_distribution<> nbd3(10, 0.75); auto bnbd3 = std::bind(nbd3, eng); ! testDiscreteDist(bnbd3, [](int n) ! { return negative_binomial_pdf(n, 10, 0.75); } ); } int main() --- 42,59 ---- std::negative_binomial_distribution<> nbd1(5, 0.3); auto bnbd1 = std::bind(nbd1, eng); ! testDiscreteDist(bnbd1, [](int n) ! { return negative_binomial_pdf(n, 5, 0.3); } ); std::negative_binomial_distribution<> nbd2(55, 0.3); auto bnbd2 = std::bind(nbd2, eng); ! testDiscreteDist(bnbd2, [](int n) ! { return negative_binomial_pdf(n, 55, 0.3); } ); std::negative_binomial_distribution<> nbd3(10, 0.75); auto bnbd3 = std::bind(nbd3, eng); ! testDiscreteDist(bnbd3, [](int n) ! { return negative_binomial_pdf(n, 10, 0.75); } ); } int main() diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/operators/serialize.cc gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/operators/serialize.cc *** gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/operators/serialize.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/operators/serialize.cc Fri Aug 19 08:09:55 2022 *************** *** 25,30 **** --- 25,31 ---- #include #include + #include void test01() *************** test01() *** 37,46 **** str << u; str >> v; } int main() { test01(); ! return 0; } --- 38,80 ---- str << u; str >> v; + VERIFY( u == v ); + } + + void + test_pr105502() + { + // PR libstdc++/105502 std::normal_distribution deserialization issue + std::stringstream str; + std::normal_distribution<> d{1, 2}, d2; + std::minstd_rand0 g; + str << d; + VERIFY( str ); + str >> d2; + VERIFY( str ); + VERIFY( d == d2 ); + + (void) d(g); // sets d._M_saved_available = true + str.str(""); + str.clear(); + str << d; + VERIFY( str ); + str >> d2; + VERIFY( str ); + VERIFY( d == d2 ); + + (void) d(g); // sets d._M_saved_available = false + str.str(""); + str.clear(); + str << d; + VERIFY( str ); + str >> d2; + VERIFY( str ); + VERIFY( d == d2 ); } int main() { test01(); ! test_pr105502(); } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/operators/values.cc gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/operators/values.cc *** gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/operators/values.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/operators/values.cc Fri Aug 19 08:09:55 2022 *************** *** 1,4 **** - // { dg-options "-DSIMULATOR_TEST" { target simulator } } // { dg-do run { target c++11 } } // { dg-require-cstdint "" } // { dg-require-cmath "" } --- 1,3 ---- *************** *** 26,31 **** --- 25,38 ---- #include #include + // { dg-additional-options "-DSIMULATOR_TEST" { target simulator } } + + #ifdef SIMULATOR_TEST + # define ARGS 100, 1000 + #else + # define ARGS + #endif + void test01() { using namespace __gnu_test; *************** void test01() *** 34,48 **** std::poisson_distribution<> pd1(3.0); auto bpd1 = std::bind(pd1, eng); ! testDiscreteDist(bpd1, [](int n) { return poisson_pdf(n, 3.0); } ); std::poisson_distribution<> pd2(15.0); auto bpd2 = std::bind(pd2, eng); ! testDiscreteDist(bpd2, [](int n) { return poisson_pdf(n, 15.0); } ); std::poisson_distribution<> pd3(30.0); auto bpd3 = std::bind(pd3, eng); ! testDiscreteDist(bpd3, [](int n) { return poisson_pdf(n, 30.0); } ); // This can take extremely long on simulators, timing out the test. #ifndef SIMULATOR_TEST --- 41,55 ---- std::poisson_distribution<> pd1(3.0); auto bpd1 = std::bind(pd1, eng); ! testDiscreteDist(bpd1, [](int n) { return poisson_pdf(n, 3.0); } ); std::poisson_distribution<> pd2(15.0); auto bpd2 = std::bind(pd2, eng); ! testDiscreteDist(bpd2, [](int n) { return poisson_pdf(n, 15.0); } ); std::poisson_distribution<> pd3(30.0); auto bpd3 = std::bind(pd3, eng); ! testDiscreteDist(bpd3, [](int n) { return poisson_pdf(n, 30.0); } ); // This can take extremely long on simulators, timing out the test. #ifndef SIMULATOR_TEST diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/random_device/entropy.cc gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/random_device/entropy.cc *** gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/random_device/entropy.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/random_device/entropy.cc Fri Aug 19 08:09:55 2022 *************** *** 1,6 **** --- 1,7 ---- // { dg-do run { target c++11 } } #include + #include #include #include *************** test01() *** 12,18 **** VERIFY( std::random_device(token).entropy() == 0.0 ); using result_type = std::random_device::result_type; ! const double max = std::log2(std::numeric_limits::max() + 1.0); for (auto token : { "/dev/random", "/dev/urandom" }) if (__gnu_test::random_device_available(token)) --- 13,19 ---- VERIFY( std::random_device(token).entropy() == 0.0 ); using result_type = std::random_device::result_type; ! const double max = std::numeric_limits::digits; for (auto token : { "/dev/random", "/dev/urandom" }) if (__gnu_test::random_device_available(token)) diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/operators/values.cc gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/operators/values.cc *** gcc-12.1.0/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/operators/values.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/operators/values.cc Fri Aug 19 08:09:55 2022 *************** *** 24,29 **** --- 24,37 ---- #include #include + // { dg-additional-options "-DSIMULATOR_TEST" { target simulator } } + + #ifdef SIMULATOR_TEST + # define ARGS 100, 1000 + #else + # define ARGS + #endif + void test01() { using namespace __gnu_test; *************** void test01() *** 32,46 **** std::uniform_int_distribution<> uid1(0, 2); auto buid1 = std::bind(uid1, eng); ! testDiscreteDist(buid1, [](int n) { return uniform_int_pdf(n, 0, 2); } ); std::uniform_int_distribution<> uid2(3, 7); auto buid2 = std::bind(uid2, eng); ! testDiscreteDist(buid2, [](int n) { return uniform_int_pdf(n, 3, 7); } ); std::uniform_int_distribution<> uid3(1, 20); auto buid3 = std::bind(uid3, eng); ! testDiscreteDist(buid3, [](int n) { return uniform_int_pdf(n, 1, 20); } ); } int main() --- 40,54 ---- std::uniform_int_distribution<> uid1(0, 2); auto buid1 = std::bind(uid1, eng); ! testDiscreteDist(buid1, [](int n) { return uniform_int_pdf(n, 0, 2); } ); std::uniform_int_distribution<> uid2(3, 7); auto buid2 = std::bind(uid2, eng); ! testDiscreteDist(buid2, [](int n) { return uniform_int_pdf(n, 3, 7); } ); std::uniform_int_distribution<> uid3(1, 20); auto buid3 = std::bind(uid3, eng); ! testDiscreteDist(buid3, [](int n) { return uniform_int_pdf(n, 1, 20); } ); } int main() diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/pr106248.cc gcc-12.2.0/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/pr106248.cc *** gcc-12.1.0/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/pr106248.cc Thu Jan 1 00:00:00 1970 --- gcc-12.2.0/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/pr106248.cc Fri Aug 19 08:09:55 2022 *************** *** 0 **** --- 1,40 ---- + // { dg-do run } + + #include + #include + + void + test_pr106248() + { + char buf[5] = {'x', 'x', 'x', 'x', 'x'}; + std::string s(" four"); + std::istringstream in(s); + in >> buf; + #if __cplusplus >= 202002L + // Extraction stops because buffer is full. + VERIFY( in.good() ); + #else + // PR libstdc++/106248 + // Extraction stops because all input has been consumed and eofbit is set. + VERIFY( in.eof() ); + #endif + // Extracted string must be null-terminated. + VERIFY( buf[4] == '\0' ); + VERIFY( std::string(buf) == "four" ); + + in.clear(); + in.str(s); + for (int i = 0; i < 5; ++i) + s[i] = 'x'; + + in.width(5); + in >> buf; + // Extraction stops due to field width, eofbit not set. + VERIFY( in.good() ); + VERIFY( std::string(buf) == "four" ); + } + + int main() + { + test_pr106248(); + } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/pr106248.cc gcc-12.2.0/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/pr106248.cc *** gcc-12.1.0/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/pr106248.cc Thu Jan 1 00:00:00 1970 --- gcc-12.2.0/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/pr106248.cc Fri Aug 19 08:09:55 2022 *************** *** 0 **** --- 1,40 ---- + // { dg-do run } + + #include + #include + + void + test_pr106248() + { + wchar_t buf[5] = {L'x', L'x', L'x', L'x', L'x'}; + std::wstring s(L" four"); + std::wistringstream in(s); + in >> buf; + #if __cplusplus >= 202002L + // Extraction stops because buffer is full. + VERIFY( in.good() ); + #else + // PR libstdc++/106248 + // Extraction stops because all input has been consumed and eofbit is set. + VERIFY( in.eof() ); + #endif + // Extracted string must be null-terminated. + VERIFY( buf[4] == L'\0' ); + VERIFY( std::wstring(buf) == L"four" ); + + in.clear(); + in.str(s); + for (int i = 0; i < 5; ++i) + s[i] = L'x'; + + in.width(5); + in >> buf; + // Extraction stops due to field width, eofbit not set. + VERIFY( in.good() ); + VERIFY( std::wstring(buf) == L"four" ); + } + + int main() + { + test_pr106248(); + } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/noreplace.cc gcc-12.2.0/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/noreplace.cc *** gcc-12.1.0/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/noreplace.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/noreplace.cc Fri Aug 19 08:09:55 2022 *************** *** 2,11 **** #include ! #if __cplusplus >= 202200L #ifndef __cpp_lib_ios_noreplace # error "Feature-test macro for ios::noreplace missing in " ! #elif __cpp_lib_ios_noreplace < 202200L # error "Feature-test macro for ios::noreplace has wrong value in " #endif #endif --- 2,11 ---- #include ! #if __cplusplus >= 202207L #ifndef __cpp_lib_ios_noreplace # error "Feature-test macro for ios::noreplace missing in " ! #elif __cpp_lib_ios_noreplace < 202207L # error "Feature-test macro for ios::noreplace has wrong value in " #endif #endif diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc gcc-12.2.0/libstdc++-v3/testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc *** gcc-12.1.0/libstdc++-v3/testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc Fri Aug 19 08:09:55 2022 *************** *** 2,11 **** #include ! #if __cplusplus >= 202200L #ifndef __cpp_lib_ios_noreplace # error "Feature-test macro for ios::noreplace missing in " ! #elif __cpp_lib_ios_noreplace < 202200L # error "Feature-test macro for ios::noreplace has wrong value in " #endif #endif --- 2,11 ---- #include ! #if __cplusplus >= 202207L #ifndef __cpp_lib_ios_noreplace # error "Feature-test macro for ios::noreplace missing in " ! #elif __cpp_lib_ios_noreplace < 202207L # error "Feature-test macro for ios::noreplace has wrong value in " #endif #endif diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/iterators/error_reporting.cc gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/iterators/error_reporting.cc *** gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/iterators/error_reporting.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/iterators/error_reporting.cc Fri Aug 19 08:09:55 2022 *************** *** 28,62 **** int choice; - struct dirent global_dirent; - extern "C" struct dirent* readdir(DIR*) { switch (choice) { case 1: ! global_dirent.d_ino = 999; #if defined _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE && defined DT_REG ! global_dirent.d_type = DT_REG; #endif ! global_dirent.d_reclen = 0; ! std::char_traits::copy(global_dirent.d_name, "file", 5); choice = 0; ! return &global_dirent; case 2: ! global_dirent.d_ino = 111; #if defined _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE && defined DT_DIR ! global_dirent.d_type = DT_DIR; #endif ! global_dirent.d_reclen = 60; ! std::char_traits::copy(global_dirent.d_name, "subdir", 7); choice = 1; ! return &global_dirent; default: errno = EIO; return nullptr; } ! return &global_dirent; } void --- 28,71 ---- int choice; extern "C" struct dirent* readdir(DIR*) { + // On some targets dirent::d_name is very small, but the OS allocates + // a trailing char array after the dirent struct. Emulate that here. + union State + { + struct dirent d; + char buf[sizeof(struct dirent) + 16] = {}; + }; + + static State state; + char* d_name = state.buf + offsetof(struct dirent, d_name); + switch (choice) { case 1: ! state.d.d_ino = 999; #if defined _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE && defined DT_REG ! state.d.d_type = DT_REG; #endif ! state.d.d_reclen = 0; ! std::char_traits::copy(d_name, "file", 5); choice = 0; ! return &state.d; case 2: ! state.d.d_ino = 111; #if defined _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE && defined DT_DIR ! state.d.d_type = DT_DIR; #endif ! state.d.d_reclen = 60; ! std::char_traits::copy(d_name, "subdir", 7); choice = 1; ! return &state.d; default: errno = EIO; return nullptr; } ! return &state.d; } void *************** void *** 98,104 **** test02() { namespace fs = std::filesystem; ! auto dir = __gnu_test::nonexistent_path(); fs::create_directories(dir/"subdir"); std::error_code ec; --- 107,113 ---- test02() { namespace fs = std::filesystem; ! const auto dir = __gnu_test::nonexistent_path(); fs::create_directories(dir/"subdir"); std::error_code ec; *************** test02() *** 128,134 **** } #endif ! fs::remove_all(dir, ec); } int --- 137,148 ---- } #endif ! // Cannot use fs::remove_all here because that uses ! // recursive_directory_iterator which would use the fake readdir above. ! #ifndef _GLIBCXX_FILESYSTEM_IS_WINDOWS ! ::rmdir((dir/"subdir").c_str()); ! ::rmdir(dir.c_str()); ! #endif } int diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/absolute.cc gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/absolute.cc *** gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/absolute.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/absolute.cc Fri Aug 19 08:09:55 2022 *************** test03() *** 84,90 **** VERIFY( eabs.empty() ); try { ! absolute(path{}); VERIFY( false ); } catch (const std::filesystem::filesystem_error& e) { VERIFY( e.code() == std::errc::invalid_argument ); --- 84,90 ---- VERIFY( eabs.empty() ); try { ! (void) absolute(path{}); VERIFY( false ); } catch (const std::filesystem::filesystem_error& e) { VERIFY( e.code() == std::errc::invalid_argument ); diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/all.cc gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/all.cc *** gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/all.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/all.cc Fri Aug 19 08:09:55 2022 *************** main() *** 42,52 **** bool b [[maybe_unused]]; std::uintmax_t size; ! std::filesystem::absolute(p); ! std::filesystem::absolute(p, ec); ! std::filesystem::canonical(p); ! std::filesystem::canonical(p, ec); std::filesystem::copy(p, p); std::filesystem::copy(p, p, ec); --- 42,52 ---- bool b [[maybe_unused]]; std::uintmax_t size; ! p2 = std::filesystem::absolute(p); ! p2 = std::filesystem::absolute(p, ec); ! p2 = std::filesystem::canonical(p); ! p2 = std::filesystem::canonical(p, ec); std::filesystem::copy(p, p); std::filesystem::copy(p, p, ec); diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/canonical.cc gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/canonical.cc *** gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/canonical.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/canonical.cc Fri Aug 19 08:09:55 2022 *************** test01() *** 31,37 **** const std::error_code bad_ec = make_error_code(std::errc::invalid_argument); std::error_code ec; auto p = __gnu_test::nonexistent_path(); ! canonical( p, ec ); VERIFY( ec ); create_directory(p); --- 31,37 ---- const std::error_code bad_ec = make_error_code(std::errc::invalid_argument); std::error_code ec; auto p = __gnu_test::nonexistent_path(); ! (void) canonical( p, ec ); VERIFY( ec ); create_directory(p); *************** test02() *** 90,96 **** #if __cpp_exceptions fs::path e1, e2; try { ! canonical(p); } catch (const fs::filesystem_error& e) { e1 = e.path1(); e2 = e.path2(); --- 90,96 ---- #if __cpp_exceptions fs::path e1, e2; try { ! (void) canonical(p); } catch (const fs::filesystem_error& e) { e1 = e.path1(); e2 = e.path2(); diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/exists.cc gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/exists.cc *** gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/exists.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/exists.cc Fri Aug 19 08:09:55 2022 *************** test04() *** 95,101 **** ec.clear(); try { ! exists(unr); } catch(const std::filesystem::filesystem_error& ex) { --- 95,101 ---- ec.clear(); try { ! (void) exists(unr); } catch(const std::filesystem::filesystem_error& ex) { diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/is_empty.cc gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/is_empty.cc *** gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/is_empty.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/is_empty.cc Fri Aug 19 08:09:55 2022 *************** test01() *** 40,46 **** VERIFY( !result ); try { ! fs::is_empty(p); } catch (const fs::filesystem_error& e) { ec2 = e.code(); } --- 40,46 ---- VERIFY( !result ); try { ! (void) fs::is_empty(p); } catch (const fs::filesystem_error& e) { ec2 = e.code(); } *************** test01() *** 51,57 **** VERIFY( !result ); try { ! fs::is_empty(p/"f"); } catch (const fs::filesystem_error& e) { ec2 = e.code(); } --- 51,57 ---- VERIFY( !result ); try { ! (void) fs::is_empty(p/"f"); } catch (const fs::filesystem_error& e) { ec2 = e.code(); } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/read_symlink.cc gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/read_symlink.cc *** gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/read_symlink.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/read_symlink.cc Fri Aug 19 08:09:55 2022 *************** test01() *** 31,37 **** auto p = __gnu_test::nonexistent_path(); std::error_code ec; ! read_symlink(p, ec); VERIFY( ec ); fs::path tgt = "."; --- 31,37 ---- auto p = __gnu_test::nonexistent_path(); std::error_code ec; ! (void) read_symlink(p, ec); VERIFY( ec ); fs::path tgt = "."; diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/status.cc gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/status.cc *** gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/status.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/status.cc Fri Aug 19 08:09:55 2022 *************** test03() *** 74,80 **** std::error_code ec2; fs::path p, p2; try { ! fs::symlink_status(f.path); } catch (const fs::filesystem_error& e) { caught = true; p = e.path1(); --- 74,80 ---- std::error_code ec2; fs::path p, p2; try { ! (void) fs::symlink_status(f.path); } catch (const fs::filesystem_error& e) { caught = true; p = e.path1(); diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/symlink_status.cc gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/symlink_status.cc *** gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/symlink_status.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/symlink_status.cc Fri Aug 19 08:09:55 2022 *************** test03() *** 94,100 **** std::error_code ec2; fs::path p, p2; try { ! fs::symlink_status(f.path); } catch (const fs::filesystem_error& e) { caught = true; p = e.path1(); --- 94,100 ---- std::error_code ec2; fs::path p, p2; try { ! (void) fs::symlink_status(f.path); } catch (const fs::filesystem_error& e) { caught = true; p = e.path1(); diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/temp_directory_path.cc gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/temp_directory_path.cc *** gcc-12.1.0/libstdc++-v3/testsuite/27_io/filesystem/operations/temp_directory_path.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/27_io/filesystem/operations/temp_directory_path.cc Fri Aug 19 08:09:55 2022 *************** test03() *** 117,123 **** std::error_code ec2; try { ! fs::temp_directory_path(); } catch (const fs::filesystem_error& e) { ec2 = e.code(); } --- 117,123 ---- std::error_code ec2; try { ! (void) fs::temp_directory_path(); } catch (const fs::filesystem_error& e) { ec2 = e.code(); } *************** test04() *** 141,147 **** std::error_code ec2; try { ! fs::temp_directory_path(); } catch (const fs::filesystem_error& e) { ec2 = e.code(); } --- 141,147 ---- std::error_code ec2; try { ! (void) fs::temp_directory_path(); } catch (const fs::filesystem_error& e) { ec2 = e.code(); } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/27_io/headers/iosfwd/synopsis.cc gcc-12.2.0/libstdc++-v3/testsuite/27_io/headers/iosfwd/synopsis.cc *** gcc-12.1.0/libstdc++-v3/testsuite/27_io/headers/iosfwd/synopsis.cc Thu Jan 1 00:00:00 1970 --- gcc-12.2.0/libstdc++-v3/testsuite/27_io/headers/iosfwd/synopsis.cc Fri Aug 19 08:09:55 2022 *************** *** 0 **** --- 1,133 ---- + // { dg-do compile } + // { dg-require-normal-namespace "" } + + #include + + namespace std + { + // [iosfwd.syn] + + template struct char_traits; + template<> struct char_traits; + #if __cplusplus >= 202002L + template<> struct char_traits; + #endif + #if __cplusplus >= 201103L + template<> struct char_traits; + template<> struct char_traits; + #endif + template<> struct char_traits; + + template class allocator; + + template + class basic_ios; + template + class basic_streambuf; + template + class basic_istream; + template + class basic_ostream; + template + class basic_iostream; + + _GLIBCXX_BEGIN_NAMESPACE_CXX11 + template + class basic_stringbuf; + template + class basic_istringstream; + template + class basic_ostringstream; + template + class basic_stringstream; + _GLIBCXX_END_NAMESPACE_CXX11 + + template + class basic_filebuf; + template + class basic_ifstream; + template + class basic_ofstream; + template + class basic_fstream; + + #if __cplusplus >= 202002L && _GLIBCXX_USE_CXX11_ABI + template + class basic_syncbuf; + template + class basic_osyncstream; + #endif + + template + class istreambuf_iterator; + template + class ostreambuf_iterator; + + typedef basic_ios ios; + typedef basic_ios wios; + + typedef basic_streambuf streambuf; + typedef basic_istream istream; + typedef basic_ostream ostream; + typedef basic_iostream iostream; + + typedef basic_stringbuf stringbuf; + typedef basic_istringstream istringstream; + typedef basic_ostringstream ostringstream; + typedef basic_stringstream stringstream; + + #if __cplusplus > 202002L + typedef basic_spanbuf spanbuf; + typedef basic_ispanstream ispanstream; + typedef basic_ospanstream ospanstream; + typedef basic_spanstream spanstream; + #endif + + typedef basic_filebuf filebuf; + typedef basic_ifstream ifstream; + typedef basic_ofstream ofstream; + typedef basic_fstream fstream; + + #if __cplusplus >= 202002L && _GLIBCXX_USE_CXX11_ABI + typedef basic_syncbuf syncbuf; + typedef basic_osyncstream osyncstream; + #endif + + typedef basic_streambuf wstreambuf; + typedef basic_istream wistream; + typedef basic_ostream wostream; + typedef basic_iostream wiostream; + + typedef basic_stringbuf wstringbuf; + typedef basic_istringstream wistringstream; + typedef basic_ostringstream wostringstream; + typedef basic_stringstream wstringstream; + + #if __cplusplus > 202002L + typedef basic_spanbuf wspanbuf; + typedef basic_ispanstream wispanstream; + typedef basic_ospanstream wospanstream; + typedef basic_spanstream wspanstream; + #endif + + typedef basic_filebuf wfilebuf; + typedef basic_ifstream wifstream; + typedef basic_ofstream wofstream; + typedef basic_fstream wfstream; + + #if __cplusplus >= 202002L + typedef basic_syncbuf wsyncbuf; + typedef basic_osyncstream wosyncstream; + #endif + + template class fpos; + typedef fpos streampos; + typedef fpos wstreampos; + #if __cplusplus >= 202002L + typedef fpos u8streampos; + #endif + #if __cplusplus >= 201103L + typedef fpos u16streampos; + typedef fpos u32streampos; + #endif + } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/27_io/headers/iosfwd/types.cc gcc-12.2.0/libstdc++-v3/testsuite/27_io/headers/iosfwd/types.cc *** gcc-12.1.0/libstdc++-v3/testsuite/27_io/headers/iosfwd/types.cc Thu Jan 1 00:00:00 1970 --- gcc-12.2.0/libstdc++-v3/testsuite/27_io/headers/iosfwd/types.cc Fri Aug 19 08:09:55 2022 *************** *** 0 **** --- 1,264 ---- + // { dg-do compile { target c++11 } } + + #include + + template struct Same { static constexpr bool value = false; }; + template struct Same { static constexpr bool value = true; }; + + template using Traits = std::char_traits; + template using Alloc = std::allocator; + + using std::basic_ios; + + static_assert(Same, + basic_ios> + >::value, + "std::basic_ios has the correct default template argument"); + + static_assert(Same, + basic_ios> + >::value, + "std::basic_ios has the correct default template argument"); + + using std::basic_streambuf; + + static_assert(Same, + basic_streambuf> + >::value, + "std::basic_streambuf has the correct default template argument"); + + static_assert(Same, + basic_streambuf> + >::value, + "std::basic_streambuf has the correct default template argument"); + + using std::basic_istream; + + static_assert(Same, + basic_istream> + >::value, + "std::basic_istream has the correct default template argument"); + + static_assert(Same, + basic_istream> + >::value, + "std::basic_istream has the correct default template argument"); + + using std::basic_ostream; + + static_assert(Same, + basic_ostream> + >::value, + "std::basic_ostream has the correct default template argument"); + + static_assert(Same, + basic_ostream> + >::value, + "std::basic_ostream has the correct default template argument"); + + using std::basic_iostream; + + static_assert(Same, + basic_iostream>>::value, + "std::basic_iostream has the correct default template argument"); + + static_assert(Same, + basic_iostream> + >::value, + "std::basic_iostream has the correct default template argument"); + + using std::basic_stringbuf; + + static_assert(Same, + basic_stringbuf, Alloc> + >::value, + "std::basic_stringbuf has the correct default template argument"); + + static_assert(Same, + basic_stringbuf, Alloc> + >::value, + "std::basic_stringbuf has the correct default template argument"); + + using std::basic_istringstream; + + static_assert(Same, + basic_istringstream, Alloc> + >::value, + "std::basic_istringstream has the correct default template argument"); + + static_assert(Same, + basic_istringstream, Alloc> + >::value, + "std::basic_istringstream has the correct default template argument"); + + using std::basic_ostringstream; + + static_assert(Same, + basic_ostringstream, Alloc> + >::value, + "std::basic_ostringstream has the correct default template argument"); + + static_assert(Same, + basic_ostringstream, Alloc> + >::value, + "std::basic_ostringstream has the correct default template argument"); + + using std::basic_stringstream; + + static_assert(Same, + basic_stringstream, Alloc> + >::value, + "std::basic_stringstream has the correct default template argument"); + + static_assert(Same, + basic_stringstream, Alloc> + >::value, + "std::basic_stringstream has the correct default template argument"); + + #if __cplusplus > 202002L + using std::basic_spanbuf; + + static_assert(Same, + basic_spanbuf> + >::value, + "std::basic_spanbuf has the correct default template argument"); + + static_assert(Same, + basic_spanbuf> + >::value, + "std::basic_spanbuf has the correct default template argument"); + + using std::basic_ispanstream; + + static_assert(Same, + basic_ispanstream> + >::value, + "std::basic_ispanstream has the correct default template argument"); + + static_assert(Same, + basic_ispanstream> + >::value, + "std::basic_ispanstream has the correct default template argument"); + + using std::basic_ospanstream; + + static_assert(Same, + basic_ospanstream> + >::value, + "std::basic_ospanstream has the correct default template argument"); + + static_assert(Same, + basic_ospanstream> + >::value, + "std::basic_ospanstream has the correct default template argument"); + + using std::basic_spanstream; + + static_assert(Same, + basic_spanstream> + >::value, + "std::basic_spanstream has the correct default template argument"); + + static_assert(Same, + basic_spanstream> + >::value, + "std::basic_spanstream has the correct default template argument"); + #endif + + using std::basic_filebuf; + + static_assert(Same, + basic_filebuf> + >::value, + "std::basic_filebuf has the correct default template argument"); + + static_assert(Same, + basic_filebuf> + >::value, + "std::basic_filebuf has the correct default template argument"); + + using std::basic_ifstream; + + static_assert(Same, + basic_ifstream> + >::value, + "std::basic_ifstream has the correct default template argument"); + + static_assert(Same, + basic_ifstream> + >::value, + "std::basic_ifstream has the correct default template argument"); + + using std::basic_ofstream; + + static_assert(Same, + basic_ofstream> + >::value, + "std::basic_ofstream has the correct default template argument"); + + static_assert(Same, + basic_ofstream> + >::value, + "std::basic_ofstream has the correct default template argument"); + + using std::basic_fstream; + + static_assert(Same, + basic_fstream> + >::value, + "std::basic_fstream has the correct default template argument"); + + static_assert(Same, + basic_fstream> + >::value, + "std::basic_fstream has the correct default template argument"); + + #if __cplusplus >= 202002L && _GLIBCXX_USE_CXX11_ABI + using std::basic_syncbuf; + + static_assert(Same, + basic_syncbuf, Alloc> + >::value, + "std::basic_syncbuf has the correct default template argument"); + + static_assert(Same, + basic_syncbuf, Alloc> + >::value, + "std::basic_syncbuf has the correct default template argument"); + + using std::basic_osyncstream; + + static_assert(Same, + basic_osyncstream, Alloc> + >::value, + "std::basic_osyncstream has the correct default template argument"); + + static_assert(Same, + basic_osyncstream, Alloc> + >::value, + "std::basic_osyncstream has the correct default template argument"); + #endif + + using std::istreambuf_iterator; + + static_assert(Same, + istreambuf_iterator> + >::value, + "std::istreambuf_iterator has the correct default template argument"); + + static_assert(Same, + istreambuf_iterator> + >::value, + "std::istreambuf_iterator has the correct default template argument"); + + using std::ostreambuf_iterator; + + static_assert(Same, + ostreambuf_iterator> + >::value, + "std::ostreambuf_iterator has the correct default template argument"); + + static_assert(Same, + ostreambuf_iterator> + >::value, + "std::ostreambuf_iterator has the correct default template argument"); diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/29_atomics/atomic/lwg3220.cc gcc-12.2.0/libstdc++-v3/testsuite/29_atomics/atomic/lwg3220.cc *** gcc-12.1.0/libstdc++-v3/testsuite/29_atomics/atomic/lwg3220.cc Thu Jan 1 00:00:00 1970 --- gcc-12.2.0/libstdc++-v3/testsuite/29_atomics/atomic/lwg3220.cc Fri Aug 19 08:09:55 2022 *************** *** 0 **** --- 1,13 ---- + // { dg-do compile { target c++11 } } + // DR 3220. P0558 broke conforming C++14 uses of atomic shared_ptr + + #include + #include + + struct Abstract { virtual void test() = 0; }; + struct Concrete : Abstract { virtual void test() override {} }; + + int main() { + std::shared_ptr ptr; + std::atomic_store(&ptr, std::make_shared()); + } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/experimental/filesystem/iterators/error_reporting.cc gcc-12.2.0/libstdc++-v3/testsuite/experimental/filesystem/iterators/error_reporting.cc *** gcc-12.1.0/libstdc++-v3/testsuite/experimental/filesystem/iterators/error_reporting.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/experimental/filesystem/iterators/error_reporting.cc Fri Aug 19 08:09:55 2022 *************** void *** 99,105 **** test02() { namespace fs = std::experimental::filesystem; ! auto dir = __gnu_test::nonexistent_path(); fs::create_directories(dir/"subdir"); std::error_code ec; --- 99,105 ---- test02() { namespace fs = std::experimental::filesystem; ! const auto dir = __gnu_test::nonexistent_path(); fs::create_directories(dir/"subdir"); std::error_code ec; *************** test02() *** 129,135 **** } #endif ! fs::remove_all(dir, ec); } int --- 129,140 ---- } #endif ! // Cannot use fs::remove_all here because that depends on ! // recursive_directory_iterator which would use the fake readdir above. ! #ifndef _GLIBCXX_FILESYSTEM_IS_WINDOWS ! ::rmdir((dir/"subdir").c_str()); ! ::rmdir(dir.c_str()); ! #endif } int diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/experimental/filesystem/operations/canonical.cc gcc-12.2.0/libstdc++-v3/testsuite/experimental/filesystem/operations/canonical.cc *** gcc-12.1.0/libstdc++-v3/testsuite/experimental/filesystem/operations/canonical.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/experimental/filesystem/operations/canonical.cc Fri Aug 19 08:09:55 2022 *************** test01() *** 30,40 **** { std::error_code ec; auto p = __gnu_test::nonexistent_path(); ! canonical( p, ec ); VERIFY( ec ); p = fs::current_path(); ! canonical( p, ec ); VERIFY( !ec ); const auto root = fs::absolute("/"); --- 30,40 ---- { std::error_code ec; auto p = __gnu_test::nonexistent_path(); ! (void) canonical( p, ec ); VERIFY( ec ); p = fs::current_path(); ! (void) canonical( p, ec ); VERIFY( !ec ); const auto root = fs::absolute("/"); *************** test02() *** 67,73 **** fs::path p = "rel", base = __gnu_test::nonexistent_path(); fs::path e1, e2; try { ! canonical(p, base); } catch (const fs::filesystem_error& e) { e1 = e.path1(); e2 = e.path2(); --- 67,73 ---- fs::path p = "rel", base = __gnu_test::nonexistent_path(); fs::path e1, e2; try { ! (void) canonical(p, base); } catch (const fs::filesystem_error& e) { e1 = e.path1(); e2 = e.path2(); diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/experimental/filesystem/operations/exists.cc gcc-12.2.0/libstdc++-v3/testsuite/experimental/filesystem/operations/exists.cc *** gcc-12.1.0/libstdc++-v3/testsuite/experimental/filesystem/operations/exists.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/experimental/filesystem/operations/exists.cc Fri Aug 19 08:09:55 2022 *************** test04() *** 89,95 **** ec.clear(); try { ! exists(unr); } catch(const std::experimental::filesystem::filesystem_error& ex) { --- 89,95 ---- ec.clear(); try { ! (void) exists(unr); } catch(const std::experimental::filesystem::filesystem_error& ex) { diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/experimental/filesystem/operations/is_empty.cc gcc-12.2.0/libstdc++-v3/testsuite/experimental/filesystem/operations/is_empty.cc *** gcc-12.1.0/libstdc++-v3/testsuite/experimental/filesystem/operations/is_empty.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/experimental/filesystem/operations/is_empty.cc Fri Aug 19 08:09:55 2022 *************** test01() *** 41,47 **** VERIFY( !result ); try { ! fs::is_empty(p); } catch (const fs::filesystem_error& e) { ec2 = e.code(); } --- 41,47 ---- VERIFY( !result ); try { ! (void) fs::is_empty(p); } catch (const fs::filesystem_error& e) { ec2 = e.code(); } *************** test01() *** 52,58 **** VERIFY( !result ); try { ! fs::is_empty(p/"f"); } catch (const fs::filesystem_error& e) { ec2 = e.code(); } --- 52,58 ---- VERIFY( !result ); try { ! (void) fs::is_empty(p/"f"); } catch (const fs::filesystem_error& e) { ec2 = e.code(); } diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/experimental/filesystem/operations/read_symlink.cc gcc-12.2.0/libstdc++-v3/testsuite/experimental/filesystem/operations/read_symlink.cc *** gcc-12.1.0/libstdc++-v3/testsuite/experimental/filesystem/operations/read_symlink.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/experimental/filesystem/operations/read_symlink.cc Fri Aug 19 08:09:55 2022 *************** test01() *** 32,38 **** auto p = __gnu_test::nonexistent_path(); std::error_code ec; ! read_symlink(p, ec); VERIFY( ec ); fs::path tgt = "."; --- 32,38 ---- auto p = __gnu_test::nonexistent_path(); std::error_code ec; ! (void) read_symlink(p, ec); VERIFY( ec ); fs::path tgt = "."; diff -Nrcpad gcc-12.1.0/libstdc++-v3/testsuite/experimental/filesystem/operations/temp_directory_path.cc gcc-12.2.0/libstdc++-v3/testsuite/experimental/filesystem/operations/temp_directory_path.cc *** gcc-12.1.0/libstdc++-v3/testsuite/experimental/filesystem/operations/temp_directory_path.cc Fri May 6 07:31:01 2022 --- gcc-12.2.0/libstdc++-v3/testsuite/experimental/filesystem/operations/temp_directory_path.cc Fri Aug 19 08:09:55 2022 *************** test03() *** 105,110 **** --- 105,112 ---- if (!__gnu_test::permissions_are_testable()) return; + clean_env(); + auto p = __gnu_test::nonexistent_path(); create_directories(p/"tmp"); permissions(p, fs::perms::none); *************** test03() *** 116,122 **** std::error_code ec2; try { ! fs::temp_directory_path(); } catch (const fs::filesystem_error& e) { ec2 = e.code(); } --- 118,124 ---- std::error_code ec2; try { ! (void) fs::temp_directory_path(); } catch (const fs::filesystem_error& e) { ec2 = e.code(); } *************** test03() *** 129,136 **** void test04() { __gnu_test::scoped_file f; ! set_env("TMPDIR", f.path.string()); std::error_code ec; auto r = fs::temp_directory_path(ec); VERIFY( ec == std::make_error_code(std::errc::not_a_directory) ); --- 131,140 ---- void test04() { + clean_env(); + __gnu_test::scoped_file f; ! set_env("TMP", f.path.string()); std::error_code ec; auto r = fs::temp_directory_path(ec); VERIFY( ec == std::make_error_code(std::errc::not_a_directory) ); *************** test04() *** 138,144 **** std::error_code ec2; try { ! fs::temp_directory_path(); } catch (const fs::filesystem_error& e) { ec2 = e.code(); } --- 142,148 ---- std::error_code ec2; try { ! (void) fs::temp_directory_path(); } catch (const fs::filesystem_error& e) { ec2 = e.code(); } diff -Nrcpad gcc-12.1.0/libvtv/ChangeLog gcc-12.2.0/libvtv/ChangeLog *** gcc-12.1.0/libvtv/ChangeLog Fri May 6 07:31:01 2022 --- gcc-12.2.0/libvtv/ChangeLog Fri Aug 19 08:10:14 2022 *************** *** 1,3 **** --- 1,7 ---- + 2022-08-19 Release Manager + + * GCC 12.2.0 released. + 2022-05-06 Release Manager * GCC 12.1.0 released. diff -Nrcpad gcc-12.1.0/lto-plugin/ChangeLog gcc-12.2.0/lto-plugin/ChangeLog *** gcc-12.1.0/lto-plugin/ChangeLog Fri May 6 07:31:01 2022 --- gcc-12.2.0/lto-plugin/ChangeLog Fri Aug 19 08:10:14 2022 *************** *** 1,3 **** --- 1,7 ---- + 2022-08-19 Release Manager + + * GCC 12.2.0 released. + 2022-05-06 Release Manager * GCC 12.1.0 released. diff -Nrcpad gcc-12.1.0/maintainer-scripts/ChangeLog gcc-12.2.0/maintainer-scripts/ChangeLog *** gcc-12.1.0/maintainer-scripts/ChangeLog Fri May 6 07:31:01 2022 --- gcc-12.2.0/maintainer-scripts/ChangeLog Fri Aug 19 08:10:14 2022 *************** *** 1,3 **** --- 1,7 ---- + 2022-08-19 Release Manager + + * GCC 12.2.0 released. + 2022-05-06 Release Manager * GCC 12.1.0 released. diff -Nrcpad gcc-12.1.0/zlib/ChangeLog gcc-12.2.0/zlib/ChangeLog *** gcc-12.1.0/zlib/ChangeLog Fri May 6 07:31:01 2022 --- gcc-12.2.0/zlib/ChangeLog Fri Aug 19 08:10:14 2022 *************** *** 1,3 **** --- 1,7 ---- + 2022-08-19 Release Manager + + * GCC 12.2.0 released. + 2022-05-06 Release Manager * GCC 12.1.0 released.