aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.def7
-rw-r--r--Makefile.in58
-rw-r--r--Makefile.tpl15
-rw-r--r--config/acx.m44
-rw-r--r--config/clang-plugin.m4114
-rw-r--r--config/gcc-plugin.m443
-rw-r--r--config/lthostflags.m42
-rwxr-xr-xconfigure760
-rw-r--r--configure.ac47
-rw-r--r--gcc/aclocal.m41
-rw-r--r--gcc/c-family/c-attribs.cc30
-rw-r--r--gcc/c/c-decl.cc118
-rw-r--r--gcc/c/c-parser.cc7
-rw-r--r--gcc/cfghooks.cc2
-rw-r--r--gcc/config/riscv/predicates.md11
-rw-r--r--gcc/config/riscv/riscv.md39
-rwxr-xr-xgcc/configure405
-rw-r--r--gcc/cp/parser.cc7
-rw-r--r--gcc/diagnostics/output-spec.cc585
-rw-r--r--gcc/diagnostics/output-spec.h88
-rw-r--r--gcc/doc/passes.texi6
-rw-r--r--gcc/fortran/decl.cc10
-rw-r--r--gcc/gimple-fold.cc131
-rw-r--r--gcc/gimple-isel.cc956
-rw-r--r--gcc/libgdiagnostics.cc3
-rw-r--r--gcc/m2/gm2-compiler/M2GCCDeclare.mod13
-rw-r--r--gcc/m2/gm2-gcc/m2type.cc2
-rw-r--r--gcc/m2/gm2-gcc/m2type.def2
-rw-r--r--gcc/m2/gm2-gcc/m2type.h2
-rw-r--r--gcc/m2/gm2-libs/M2WIDESET.mod116
-rw-r--r--gcc/opts-diagnostic.cc9
-rw-r--r--gcc/passes.def8
-rw-r--r--gcc/simplify-rtx.cc4
-rw-r--r--gcc/testsuite/g++.dg/parse/auto-struct-param.C4
-rw-r--r--gcc/testsuite/gcc.dg/builtin-unreachable-5.c10
-rw-r--r--gcc/testsuite/gcc.dg/builtin-unreachable-6.c6
-rw-r--r--gcc/testsuite/gcc.dg/builtin-unreachable-6a.c6
-rw-r--r--gcc/testsuite/gcc.dg/builtin-unreachable-7.c8
-rw-r--r--gcc/testsuite/gcc.dg/c2y-init-2.c33
-rw-r--r--gcc/testsuite/gcc.dg/c2y-init-3.c106
-rw-r--r--gcc/testsuite/gcc.dg/plugin/start_unit_plugin.cc2
-rw-r--r--gcc/testsuite/gcc.dg/pr78408-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr122079-1.c27
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr122079-2.c27
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr122079-3.c27
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c20
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c20
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c16
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c16
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c16
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c16
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr122033-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr122033-2.c23
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr79691.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-10.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/asm-flag-1.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/builtin_pld_pli.c72
-rw-r--r--gcc/testsuite/gcc.target/aarch64/csinc-1.c43
-rw-r--r--gcc/testsuite/gcc.target/aarch64/csneg-1.c44
-rw-r--r--gcc/testsuite/gcc.target/aarch64/declare-simd-2.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/flt_mov_immediate_1.c50
-rw-r--r--gcc/testsuite/gcc.target/aarch64/ldp_stp_18.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-1.c43
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-and-mvc-error1.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-and-mvc-error2.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-and-mvc-error3.c8
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-and-mvc1.c37
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-and-mvc2.c28
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-and-mvc3.c40
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-and-mvc4.c37
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-error1.c18
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-error10.c13
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-error11.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-error12.c13
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-error2.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-error3.c12
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-error4.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-error5.c8
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-error6.c20
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-error7.c11
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-error8.c12
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-error9.c12
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-symbols1.c38
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-symbols10.c42
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-symbols11.c16
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-symbols12.c27
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-symbols13.c28
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-symbols14.c34
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-symbols2.c28
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-symbols3.c27
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-symbols4.c31
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-symbols5.c36
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-symbols6.c20
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-symbols7.c47
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-symbols8.c47
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mv-symbols9.c44
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mvc-error1.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mvc-error2.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mvc-symbols1.c25
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mvc-symbols2.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mvc-symbols3.c19
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mvc-symbols4.c12
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mvc-warning1.c13
-rw-r--r--gcc/testsuite/gcc.target/aarch64/ror_2.c12
-rw-r--r--gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/scalar_shift_1.c114
-rw-r--r--gcc/testsuite/gcc.target/aarch64/simd/fold_to_highpart_5.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/singleton_intrinsics_1.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/arith_1.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_1.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_3.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_5.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_7.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_1.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_3.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_5.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_7.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fmul_3.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fsubr_3.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/mixed_size_6.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/pcs/annotate_1.c1
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/pcs/return_6.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/struct_move_3.c12
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/struct_move_6.c12
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/uzp1_1.c3
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/uzp2_1.c3
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vector-compare-5.c10
-rw-r--r--gcc/testsuite/gcc.target/riscv/pr121937.c66
-rw-r--r--gcc/testsuite/gcc.target/riscv/pr122051.c24
-rw-r--r--gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/math-nearbyint-1.c4
-rw-r--r--gcc/testsuite/gfortran.dg/pdt_52.f0336
-rw-r--r--gcc/testsuite/gfortran.dg/pdt_53.f0328
-rw-r--r--gcc/testsuite/gfortran.dg/pdt_54.f0328
-rw-r--r--gcc/tree-pass.h1
-rw-r--r--gcc/tree-ssa-ccp.cc1442
-rw-r--r--gcc/tree-ssa-forwprop.cc185
-rw-r--r--gcc/tree-ssa-pre.cc35
-rw-r--r--gcc/tree-vect-loop.cc12
-rw-r--r--gcc/tree.h9
-rw-r--r--libbacktrace/Makefile.in3
-rw-r--r--libbacktrace/aclocal.m42
-rwxr-xr-xlibbacktrace/configure406
-rw-r--r--libbacktrace/configure.ac3
-rw-r--r--libcc1/Makefile.in13
-rw-r--r--libcc1/aclocal.m411
-rwxr-xr-xlibcc1/configure405
-rw-r--r--libiberty/aclocal.m41
-rwxr-xr-xlibiberty/configure548
-rw-r--r--libiberty/configure.ac43
-rw-r--r--libstdc++-v3/doc/html/manual/index.html2
-rw-r--r--libstdc++-v3/doc/html/manual/status.html104
-rw-r--r--libstdc++-v3/doc/xml/manual/status_cxx2020.xml4415
-rw-r--r--libtool.m449
-rw-r--r--zlib/Makefile.in3
-rw-r--r--zlib/aclocal.m42
-rwxr-xr-xzlib/configure758
-rw-r--r--zlib/configure.ac2
159 files changed, 11492 insertions, 2577 deletions
diff --git a/Makefile.def b/Makefile.def
index fa60f6e..e5b95d7 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -313,7 +313,6 @@ flags_to_pass = { flag= GNATBIND ; };
flags_to_pass = { flag= GNATMAKE ; };
flags_to_pass = { flag= GDC ; };
flags_to_pass = { flag= GDCFLAGS ; };
-flags_to_pass = { flag= GUILE ; };
// Target tools
flags_to_pass = { flag= AR_FOR_TARGET ; };
@@ -463,9 +462,11 @@ dependencies = { module=all-gdb; on=all-libbacktrace; };
// Host modules specific to gdbserver.
dependencies = { module=configure-gdbserver; on=all-gnulib; };
+dependencies = { module=configure-gdbserver; on=all-libiconv; };
dependencies = { module=all-gdbserver; on=all-gdbsupport; };
dependencies = { module=all-gdbserver; on=all-gnulib; };
dependencies = { module=all-gdbserver; on=all-libiberty; };
+dependencies = { module=all-gdbserver; on=all-libiconv; };
dependencies = { module=configure-libgui; on=configure-tcl; };
dependencies = { module=configure-libgui; on=configure-tk; };
@@ -524,7 +525,7 @@ dependencies = { module=install-bfd; on=install-libsframe; };
dependencies = { module=install-strip-bfd; on=install-strip-libsframe; };
// libopcodes depends on libbfd
-dependencies = { module=configure-opcodes; on=configure-bfd; hard=true; };
+dependencies = { module=configure-opcodes; on=all-bfd; hard=true; };
dependencies = { module=install-opcodes; on=install-bfd; };
dependencies = { module=install-strip-opcodes; on=install-strip-bfd; };
@@ -550,8 +551,8 @@ dependencies = { module=install-gprofng; on=install-opcodes; };
dependencies = { module=install-gprofng; on=install-bfd; };
dependencies = { module=configure-ld; on=configure-gettext; };
+dependencies = { module=configure-ld; on=all-bfd; };
dependencies = { module=all-ld; on=all-libiberty; };
-dependencies = { module=all-ld; on=all-bfd; };
dependencies = { module=all-ld; on=all-opcodes; };
dependencies = { module=all-ld; on=all-build-bison; };
dependencies = { module=all-ld; on=all-build-flex; };
diff --git a/Makefile.in b/Makefile.in
index 12d4395..621e8de 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -3,7 +3,7 @@
#
# Makefile for directory with subdirs to build.
# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2023
+# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
# Free Software Foundation
#
# This file is free software; you can redistribute it and/or modify
@@ -144,8 +144,7 @@ BASE_EXPORTS = \
M4="$(M4)"; export M4; \
SED="$(SED)"; export SED; \
AWK="$(AWK)"; export AWK; \
- MAKEINFO="$(MAKEINFO)"; export MAKEINFO; \
- GUILE="$(GUILE)"; export GUILE;
+ MAKEINFO="$(MAKEINFO)"; export MAKEINFO;
# This is the list of variables to export in the environment when
# configuring subdirectories for the build system.
@@ -434,7 +433,7 @@ DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
LD = @LD@
LIPO = @LIPO@
-NM = @NM@
+NM = @NM@ @NM_PLUGIN_OPTION@
OBJDUMP = @OBJDUMP@
OTOOL = @OTOOL@
RANLIB = @RANLIB@ @RANLIB_PLUGIN_OPTION@
@@ -460,8 +459,6 @@ CRAB1_LIBS = @CRAB1_LIBS@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-GUILE = guile
-
# Pass additional PGO and LTO compiler options to the PGO build.
BUILD_CFLAGS = $(PGO_BUILD_CFLAGS) $(PGO_BUILD_LTO_CFLAGS)
override CFLAGS += $(BUILD_CFLAGS)
@@ -667,7 +664,7 @@ do-compare3 = $(do-compare)
# Programs producing files for the TARGET machine
# -----------------------------------------------
-AR_FOR_TARGET=@AR_FOR_TARGET@
+AR_FOR_TARGET=@AR_FOR_TARGET@ @AR_PLUGIN_OPTION_FOR_TARGET@
AS_FOR_TARGET=@AS_FOR_TARGET@
CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@
@@ -687,11 +684,11 @@ DSYMUTIL_FOR_TARGET=@DSYMUTIL_FOR_TARGET@
LD_FOR_TARGET=@LD_FOR_TARGET@
LIPO_FOR_TARGET=@LIPO_FOR_TARGET@
-NM_FOR_TARGET=@NM_FOR_TARGET@
+NM_FOR_TARGET=@NM_FOR_TARGET@ @NM_PLUGIN_OPTION_FOR_TARGET@
OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@
OBJCOPY_FOR_TARGET=@OBJCOPY_FOR_TARGET@
OTOOL_FOR_TARGET=@OTOOL_FOR_TARGET@
-RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
+RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ @RANLIB_PLUGIN_OPTION_FOR_TARGET@
READELF_FOR_TARGET=@READELF_FOR_TARGET@
STRIP_FOR_TARGET=@STRIP_FOR_TARGET@
WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
@@ -891,7 +888,6 @@ BASE_FLAGS_TO_PASS = \
"GNATMAKE=$(GNATMAKE)" \
"GDC=$(GDC)" \
"GDCFLAGS=$(GDCFLAGS)" \
- "GUILE=$(GUILE)" \
"AR_FOR_TARGET=$(AR_FOR_TARGET)" \
"AS_FOR_TARGET=$(AS_FOR_TARGET)" \
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
@@ -68682,16 +68678,16 @@ install-strip-ld: maybe-install-strip-bfd
install-strip-ld: maybe-install-strip-libctf
install-bfd: maybe-install-libsframe
install-strip-bfd: maybe-install-strip-libsframe
-configure-opcodes: configure-bfd
-configure-stage1-opcodes: configure-stage1-bfd
-configure-stage2-opcodes: configure-stage2-bfd
-configure-stage3-opcodes: configure-stage3-bfd
-configure-stage4-opcodes: configure-stage4-bfd
-configure-stageprofile-opcodes: configure-stageprofile-bfd
-configure-stagetrain-opcodes: configure-stagetrain-bfd
-configure-stagefeedback-opcodes: configure-stagefeedback-bfd
-configure-stageautoprofile-opcodes: configure-stageautoprofile-bfd
-configure-stageautofeedback-opcodes: configure-stageautofeedback-bfd
+configure-opcodes: all-bfd
+configure-stage1-opcodes: all-stage1-bfd
+configure-stage2-opcodes: all-stage2-bfd
+configure-stage3-opcodes: all-stage3-bfd
+configure-stage4-opcodes: all-stage4-bfd
+configure-stageprofile-opcodes: all-stageprofile-bfd
+configure-stagetrain-opcodes: all-stagetrain-bfd
+configure-stagefeedback-opcodes: all-stagefeedback-bfd
+configure-stageautoprofile-opcodes: all-stageautoprofile-bfd
+configure-stageautofeedback-opcodes: all-stageautofeedback-bfd
install-opcodes: maybe-install-bfd
install-strip-opcodes: maybe-install-strip-bfd
configure-gas: maybe-configure-gettext
@@ -68756,6 +68752,16 @@ configure-stagetrain-ld: maybe-configure-stagetrain-gettext
configure-stagefeedback-ld: maybe-configure-stagefeedback-gettext
configure-stageautoprofile-ld: maybe-configure-stageautoprofile-gettext
configure-stageautofeedback-ld: maybe-configure-stageautofeedback-gettext
+configure-ld: maybe-all-bfd
+configure-stage1-ld: maybe-all-stage1-bfd
+configure-stage2-ld: maybe-all-stage2-bfd
+configure-stage3-ld: maybe-all-stage3-bfd
+configure-stage4-ld: maybe-all-stage4-bfd
+configure-stageprofile-ld: maybe-all-stageprofile-bfd
+configure-stagetrain-ld: maybe-all-stagetrain-bfd
+configure-stagefeedback-ld: maybe-all-stagefeedback-bfd
+configure-stageautoprofile-ld: maybe-all-stageautoprofile-bfd
+configure-stageautofeedback-ld: maybe-all-stageautofeedback-bfd
all-ld: maybe-all-libiberty
all-stage1-ld: maybe-all-stage1-libiberty
all-stage2-ld: maybe-all-stage2-libiberty
@@ -68766,16 +68772,6 @@ all-stagetrain-ld: maybe-all-stagetrain-libiberty
all-stagefeedback-ld: maybe-all-stagefeedback-libiberty
all-stageautoprofile-ld: maybe-all-stageautoprofile-libiberty
all-stageautofeedback-ld: maybe-all-stageautofeedback-libiberty
-all-ld: maybe-all-bfd
-all-stage1-ld: maybe-all-stage1-bfd
-all-stage2-ld: maybe-all-stage2-bfd
-all-stage3-ld: maybe-all-stage3-bfd
-all-stage4-ld: maybe-all-stage4-bfd
-all-stageprofile-ld: maybe-all-stageprofile-bfd
-all-stagetrain-ld: maybe-all-stagetrain-bfd
-all-stagefeedback-ld: maybe-all-stagefeedback-bfd
-all-stageautoprofile-ld: maybe-all-stageautoprofile-bfd
-all-stageautofeedback-ld: maybe-all-stageautofeedback-bfd
all-ld: maybe-all-opcodes
all-stage1-ld: maybe-all-stage1-opcodes
all-stage2-ld: maybe-all-stage2-opcodes
@@ -69249,7 +69245,9 @@ all-gdb: maybe-all-opcodes
all-gdb: maybe-all-libdecnumber
all-gdb: maybe-all-libctf
all-gdb: maybe-all-libbacktrace
+configure-gdbserver: maybe-all-libiconv
all-gdbserver: maybe-all-libiberty
+all-gdbserver: maybe-all-libiconv
configure-gdbsupport: maybe-configure-gettext
all-gdbsupport: maybe-all-gettext
configure-gprof: maybe-configure-gettext
diff --git a/Makefile.tpl b/Makefile.tpl
index ddcca55..2ac4d5b 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -6,7 +6,7 @@ in
#
# Makefile for directory with subdirs to build.
# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2023
+# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
# Free Software Foundation
#
# This file is free software; you can redistribute it and/or modify
@@ -147,8 +147,7 @@ BASE_EXPORTS = \
M4="$(M4)"; export M4; \
SED="$(SED)"; export SED; \
AWK="$(AWK)"; export AWK; \
- MAKEINFO="$(MAKEINFO)"; export MAKEINFO; \
- GUILE="$(GUILE)"; export GUILE;
+ MAKEINFO="$(MAKEINFO)"; export MAKEINFO;
# This is the list of variables to export in the environment when
# configuring subdirectories for the build system.
@@ -437,7 +436,7 @@ DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
LD = @LD@
LIPO = @LIPO@
-NM = @NM@
+NM = @NM@ @NM_PLUGIN_OPTION@
OBJDUMP = @OBJDUMP@
OTOOL = @OTOOL@
RANLIB = @RANLIB@ @RANLIB_PLUGIN_OPTION@
@@ -463,8 +462,6 @@ CRAB1_LIBS = @CRAB1_LIBS@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-GUILE = guile
-
# Pass additional PGO and LTO compiler options to the PGO build.
BUILD_CFLAGS = $(PGO_BUILD_CFLAGS) $(PGO_BUILD_LTO_CFLAGS)
override CFLAGS += $(BUILD_CFLAGS)
@@ -590,7 +587,7 @@ do-compare3 = $(do-compare)
# Programs producing files for the TARGET machine
# -----------------------------------------------
-AR_FOR_TARGET=@AR_FOR_TARGET@
+AR_FOR_TARGET=@AR_FOR_TARGET@ @AR_PLUGIN_OPTION_FOR_TARGET@
AS_FOR_TARGET=@AS_FOR_TARGET@
CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@
@@ -610,11 +607,11 @@ DSYMUTIL_FOR_TARGET=@DSYMUTIL_FOR_TARGET@
LD_FOR_TARGET=@LD_FOR_TARGET@
LIPO_FOR_TARGET=@LIPO_FOR_TARGET@
-NM_FOR_TARGET=@NM_FOR_TARGET@
+NM_FOR_TARGET=@NM_FOR_TARGET@ @NM_PLUGIN_OPTION_FOR_TARGET@
OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@
OBJCOPY_FOR_TARGET=@OBJCOPY_FOR_TARGET@
OTOOL_FOR_TARGET=@OTOOL_FOR_TARGET@
-RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
+RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ @RANLIB_PLUGIN_OPTION_FOR_TARGET@
READELF_FOR_TARGET=@READELF_FOR_TARGET@
STRIP_FOR_TARGET=@STRIP_FOR_TARGET@
WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
diff --git a/config/acx.m4 b/config/acx.m4
index c45e55e..db54ccf 100644
--- a/config/acx.m4
+++ b/config/acx.m4
@@ -107,9 +107,9 @@ AC_SUBST([target_subdir]) []dnl
####
-# _NCN_TOOL_PREFIXES: Some stuff that oughtta be done in AC_CANONICAL_SYSTEM
+# _NCN_TOOL_PREFIXES: Some stuff that oughtta be done in AC_CANONICAL_TARGET
# or AC_INIT.
-# These demand that AC_CANONICAL_SYSTEM be called beforehand.
+# These demand that AC_CANONICAL_HOST and AC_CANONICAL_TARGET be called beforehand.
AC_DEFUN([_NCN_TOOL_PREFIXES],
[ncn_tool_prefix=
test -n "$host_alias" && ncn_tool_prefix=$host_alias-
diff --git a/config/clang-plugin.m4 b/config/clang-plugin.m4
new file mode 100644
index 0000000..cc051fe
--- /dev/null
+++ b/config/clang-plugin.m4
@@ -0,0 +1,114 @@
+# clang-plugin.m4 -*- Autoconf -*-
+# Check clang plugin file.
+
+dnl Copyright (C) 2025 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl
+dnl
+dnl CLANG_PLUGIN_FILE
+dnl (SHELL-CODE_HANDLER)
+dnl
+AC_DEFUN([CLANG_PLUGIN_FILE],[dnl
+ AC_CACHE_CHECK([for clang], clang_cv_is_clang, [
+ AC_EGREP_CPP(yes, [
+#ifdef __clang__
+ yes
+#endif
+ ], clang_cv_is_clang=yes, clang_cv_is_clang=no)])
+ plugin_file=
+ if test $clang_cv_is_clang = yes; then
+ AC_MSG_CHECKING([for clang plugin file])
+ plugin_names="LLVMgold.so"
+ for plugin in $plugin_names; do
+ plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin`
+ if test x$plugin_file = x$plugin; then
+ AC_CHECK_TOOL(LLVM_CONFIG, llvm-config)
+ if test "$?" != 0; then
+ AC_MSG_ERROR([Required tool 'llvm-config' not found on PATH.])
+ fi
+ clang_lib_dir=`$LLVM_CONFIG --libdir`
+ if test -f $clang_lib_dir/$plugin; then
+ plugin_file=$clang_lib_dir/$plugin
+ fi
+ if test x$plugin_file != x$plugin; then
+ break;
+ fi
+ fi
+ done
+ if test -z $plugin_file; then
+ AC_MSG_ERROR([Couldn't find clang plugin file for $CC.])
+ fi
+ dnl Check if ${AR} $plugin_option rc works.
+ AC_CHECK_TOOL(AR, ar)
+ if test "${AR}" = "" ; then
+ AC_MSG_ERROR([Required archive tool 'ar' not found on PATH.])
+ fi
+ plugin_option="--plugin $plugin_file"
+ touch conftest.c
+ ${AR} $plugin_option rc conftest.a conftest.c
+ if test "$?" != 0; then
+ AC_MSG_WARN([Failed: $AR $plugin_option rc])
+ plugin_file=
+ fi
+ rm -f conftest.*
+ AC_MSG_RESULT($plugin_file)
+ fi
+ $1="$plugin_file"
+])
+
+dnl
+dnl
+dnl CLANG_PLUGIN_FILE_FOR_TARGET
+dnl (SHELL-CODE_HANDLER)
+dnl
+AC_DEFUN([CLANG_PLUGIN_FILE_FOR_TARGET],[dnl
+ COMPILER_FOR_TARGET="${CC_FOR_TARGET}"
+ if test x"${COMPILER_FOR_TARGET}" = x"\$(CC)"; then
+ COMPILER_FOR_TARGET="$CC"
+ fi
+ saved_CC="$CC"
+ CC="$COMPILER_FOR_TARGET"
+ AC_CACHE_CHECK([for clang for target], clang_target_cv_working, [
+ AC_TRY_COMPILE([
+#ifndef __clang__
+#error Not clang
+#endif
+ ],
+ [],
+ clang_target_cv_working=yes, clang_target_cv_working=no)])
+ CC="$saved_CC"
+ plugin_file=
+ if test $clang_target_cv_working = yes; then
+ AC_MSG_CHECKING([for clang plugin file for target])
+ plugin_names="LLVMgold.so"
+ dnl Check if the host compiler is used.
+ for plugin in $plugin_names; do
+ plugin_file=`${COMPILER_FOR_TARGET} ${CFLAGS_FOR_TARGET} --print-file-name $plugin`
+ if test x$plugin_file = x$plugin; then
+ GCC_TARGET_TOOL(llvm-config, LLVM_CONFIG_FOR_TARGET, LLVM_CONFIG)
+ if test "$?" != 0; then
+ AC_MSG_ERROR([Required target tool 'llvm-config' not found.])
+ fi
+ clang_lib_dir=`$LLVM_CONFIG_FOR_TARGET --libdir`
+ if test -f $clang_lib_dir/$plugin; then
+ plugin_file=$clang_lib_dir/$plugin
+ fi
+ fi
+ if test x$plugin_file != x$plugin; then
+ break;
+ fi
+ plugin_file=
+ done
+ if test -n $plugin_file; then
+ AC_MSG_RESULT($plugin_file)
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+ $1="$plugin_file"
+])
diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4
index c30cfdd..0382147 100644
--- a/config/gcc-plugin.m4
+++ b/config/gcc-plugin.m4
@@ -169,3 +169,46 @@ else
AC_MSG_RESULT([no])
fi
])
+
+dnl
+dnl
+dnl GCC_PLUGIN_OPTION_FOR_TARGET
+dnl (SHELL-CODE_HANDLER)
+dnl
+AC_DEFUN([GCC_PLUGIN_OPTION_FOR_TARGET],[dnl
+COMPILER_FOR_TARGET="${CC_FOR_TARGET}"
+dnl Check if the host compiler is used.
+if test x"${COMPILER_FOR_TARGET}" = x"\$(CC)"; then
+ COMPILER_FOR_TARGET="$CC"
+fi
+saved_CC="$CC"
+CC="$COMPILER_FOR_TARGET"
+AC_CACHE_CHECK([for gcc for target], gcc_target_cv_working, [
+ AC_TRY_COMPILE(
+ [],
+ [],
+ gcc_target_cv_working=yes,
+ gcc_target_cv_working=no)])
+CC="$saved_CC"
+AC_MSG_CHECKING([for -plugin option])
+plugin_option=
+if test $gcc_target_cv_working = yes; then
+ plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+ for plugin in $plugin_names; do
+ plugin_so=`${COMPILER_FOR_TARGET} ${CFLAGS_FOR_TARGET} --print-prog-name $plugin`
+ if test x$plugin_so = x$plugin; then
+ plugin_so=`${COMPILER_FOR_TARGET} ${CFLAGS_FOR_TARGET} --print-file-name $plugin`
+ fi
+ if test x$plugin_so != x$plugin; then
+ plugin_option="--plugin $plugin_so"
+ break
+ fi
+ done
+fi
+if test -n "$plugin_option"; then
+ $1="$plugin_option"
+ AC_MSG_RESULT($plugin_option)
+else
+ AC_MSG_RESULT([no])
+fi
+])
diff --git a/config/lthostflags.m4 b/config/lthostflags.m4
index bc0f59e..4a389a7 100644
--- a/config/lthostflags.m4
+++ b/config/lthostflags.m4
@@ -10,7 +10,7 @@ dnl Defines and AC_SUBSTs lt_host_flags
AC_DEFUN([ACX_LT_HOST_FLAGS], [
-AC_REQUIRE([AC_CANONICAL_SYSTEM])
+AC_REQUIRE([AC_CANONICAL_HOST])
case $host in
*-cygwin* | *-mingw*)
diff --git a/configure b/configure
index ccec3f2..54b71af 100755
--- a/configure
+++ b/configure
@@ -596,6 +596,10 @@ MAINTAINER_MODE_TRUE
COMPILER_NM_FOR_TARGET
COMPILER_LD_FOR_TARGET
COMPILER_AS_FOR_TARGET
+RANLIB_PLUGIN_OPTION_FOR_TARGET
+NM_PLUGIN_OPTION_FOR_TARGET
+AR_PLUGIN_OPTION_FOR_TARGET
+LLVM_CONFIG_FOR_TARGET
FLAGS_FOR_TARGET
RAW_CXX_FOR_TARGET
WINDMC_FOR_TARGET
@@ -621,7 +625,12 @@ GCC_FOR_TARGET
CXX_FOR_TARGET
CC_FOR_TARGET
RANLIB_PLUGIN_OPTION
+NM_PLUGIN_OPTION
AR_PLUGIN_OPTION
+LLVM_CONFIG
+EGREP
+GREP
+CPP
PKG_CONFIG_PATH
GDCFLAGS
READELF
@@ -893,6 +902,7 @@ OBJCOPY
OBJDUMP
OTOOL
READELF
+CPP
CC_FOR_TARGET
CXX_FOR_TARGET
GCC_FOR_TARGET
@@ -1693,6 +1703,7 @@ Some influential environment variables:
OBJDUMP OBJDUMP for the host
OTOOL OTOOL for the host
READELF READELF for the host
+ CPP C preprocessor
CC_FOR_TARGET
CC for the target
CXX_FOR_TARGET
@@ -1985,6 +1996,43 @@ fi
as_fn_set_status $ac_retval
} # ac_fn_c_try_link
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -2343,6 +2391,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
progname=$0
# if PWD already has a value, it is probably wrong.
if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
@@ -2538,7 +2587,6 @@ test -n "$target_alias" &&
test "$program_prefix$program_suffix$program_transform_name" = \
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-
test "$program_prefix" != NONE &&
program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
@@ -4104,10 +4152,6 @@ case "${target}" in
# always build newlib.
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
;;
- # This is temporary until we can link against shared libraries
- powerpcle-*-solaris*)
- noconfigdirs="$noconfigdirs gdb sim tcl tk itcl"
- ;;
powerpc-*-beos*)
noconfigdirs="$noconfigdirs gdb"
;;
@@ -14221,7 +14265,529 @@ fi
GDCFLAGS=${GDCFLAGS-${CFLAGS}}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5
+# Try CLANG_PLUGIN_FILE first since GCC_PLUGIN_OPTION may return the
+# wrong PLUGIN_OPTION with clang.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang" >&5
+$as_echo_n "checking for clang... " >&6; }
+if ${clang_cv_is_clang+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __clang__
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ clang_cv_is_clang=yes
+else
+ clang_cv_is_clang=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5
+$as_echo "$clang_cv_is_clang" >&6; }
+ plugin_file=
+ if test $clang_cv_is_clang = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5
+$as_echo_n "checking for clang plugin file... " >&6; }
+ plugin_names="LLVMgold.so"
+ for plugin in $plugin_names; do
+ plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin`
+ if test x$plugin_file = x$plugin; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LLVM_CONFIG"; then
+ ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LLVM_CONFIG="${ac_tool_prefix}llvm-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
+if test -n "$LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
+$as_echo "$LLVM_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LLVM_CONFIG"; then
+ ac_ct_LLVM_CONFIG=$LLVM_CONFIG
+ # Extract the first word of "llvm-config", so it can be a program name with args.
+set dummy llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LLVM_CONFIG"; then
+ ac_cv_prog_ac_ct_LLVM_CONFIG="$ac_ct_LLVM_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_LLVM_CONFIG="llvm-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LLVM_CONFIG=$ac_cv_prog_ac_ct_LLVM_CONFIG
+if test -n "$ac_ct_LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LLVM_CONFIG" >&5
+$as_echo "$ac_ct_LLVM_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LLVM_CONFIG" = x; then
+ LLVM_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LLVM_CONFIG=$ac_ct_LLVM_CONFIG
+ fi
+else
+ LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG"
+fi
+
+ if test "$?" != 0; then
+ as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5
+ fi
+ clang_lib_dir=`$LLVM_CONFIG --libdir`
+ if test -f $clang_lib_dir/$plugin; then
+ plugin_file=$clang_lib_dir/$plugin
+ fi
+ if test x$plugin_file != x$plugin; then
+ break;
+ fi
+ fi
+ done
+ if test -z $plugin_file; then
+ as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5
+ fi
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+ if test "${AR}" = "" ; then
+ as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5
+ fi
+ plugin_option="--plugin $plugin_file"
+ touch conftest.c
+ ${AR} $plugin_option rc conftest.a conftest.c
+ if test "$?" != 0; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
+$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
+ plugin_file=
+ fi
+ rm -f conftest.*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5
+$as_echo "$plugin_file" >&6; }
+ fi
+ PLUGIN_FILE="$plugin_file"
+
+if test -n "$PLUGIN_FILE"; then
+ PLUGIN_OPTION="--plugin $PLUGIN_FILE"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5
$as_echo_n "checking for -plugin option... " >&6; }
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
@@ -14348,12 +14914,17 @@ else
$as_echo "no" >&6; }
fi
+fi
AR_PLUGIN_OPTION=
+NM_PLUGIN_OPTION=
RANLIB_PLUGIN_OPTION=
if test -n "$PLUGIN_OPTION"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR_PLUGIN_OPTION="$PLUGIN_OPTION"
fi
+ if $NM --help 2>&1 | grep -q "\--plugin"; then
+ NM_PLUGIN_OPTION="$PLUGIN_OPTION"
+ fi
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION"
fi
@@ -14361,6 +14932,7 @@ fi
+
# Target tools.
# Check whether --with-build-time-tools was given.
@@ -20024,6 +20596,182 @@ AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
+# Try CLANG_PLUGIN_FILE_FOR_TARGET first since GCC_PLUGIN_OPTION_FOR_TARGET
+# may return the wrong PLUGIN_OPTION_FOR_TARGET with clang.
+ COMPILER_FOR_TARGET="${CC_FOR_TARGET}"
+ if test x"${COMPILER_FOR_TARGET}" = x"\$(CC)"; then
+ COMPILER_FOR_TARGET="$CC"
+ fi
+ saved_CC="$CC"
+ CC="$COMPILER_FOR_TARGET"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang for target" >&5
+$as_echo_n "checking for clang for target... " >&6; }
+if ${clang_target_cv_working+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifndef __clang__
+#error Not clang
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ clang_target_cv_working=yes
+else
+ clang_target_cv_working=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_target_cv_working" >&5
+$as_echo "$clang_target_cv_working" >&6; }
+ CC="$saved_CC"
+ plugin_file=
+ if test $clang_target_cv_working = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file for target" >&5
+$as_echo_n "checking for clang plugin file for target... " >&6; }
+ plugin_names="LLVMgold.so"
+ for plugin in $plugin_names; do
+ plugin_file=`${COMPILER_FOR_TARGET} ${CFLAGS_FOR_TARGET} --print-file-name $plugin`
+ if test x$plugin_file = x$plugin; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target llvm-config" >&5
+$as_echo_n "checking where to find the target llvm-config... " >&6; }
+if test "x${build}" != "x${host}" ; then
+ if expr "x$LLVM_CONFIG_FOR_TARGET" : "x/" > /dev/null; then
+ # We already found the complete path
+ ac_dir=`dirname $LLVM_CONFIG_FOR_TARGET`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+ else
+ # Canadian cross, just use what we found
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+ fi
+else
+ if expr "x$LLVM_CONFIG_FOR_TARGET" : "x/" > /dev/null; then
+ # We already found the complete path
+ ac_dir=`dirname $LLVM_CONFIG_FOR_TARGET`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ LLVM_CONFIG_FOR_TARGET='$(LLVM_CONFIG)'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
+$as_echo "host tool" >&6; }
+ else
+ # We need a cross tool
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+ fi
+fi
+
+ if test "$?" != 0; then
+ as_fn_error $? "Required target tool 'llvm-config' not found." "$LINENO" 5
+ fi
+ clang_lib_dir=`$LLVM_CONFIG_FOR_TARGET --libdir`
+ if test -f $clang_lib_dir/$plugin; then
+ plugin_file=$clang_lib_dir/$plugin
+ fi
+ fi
+ if test x$plugin_file != x$plugin; then
+ break;
+ fi
+ plugin_file=
+ done
+ if test -n $plugin_file; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5
+$as_echo "$plugin_file" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ fi
+ PLUGIN_FILE_FOR_TARGET="$plugin_file"
+
+if test -n "$PLUGIN_FILE_FOR_TARGET"; then
+ PLUGIN_OPTION_FOR_TARGET="--plugin $PLUGIN_FILE_FOR_TARGET"
+else
+ COMPILER_FOR_TARGET="${CC_FOR_TARGET}"
+if test x"${COMPILER_FOR_TARGET}" = x"\$(CC)"; then
+ COMPILER_FOR_TARGET="$CC"
+fi
+saved_CC="$CC"
+CC="$COMPILER_FOR_TARGET"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc for target" >&5
+$as_echo_n "checking for gcc for target... " >&6; }
+if ${gcc_target_cv_working+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gcc_target_cv_working=yes
+else
+ gcc_target_cv_working=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_target_cv_working" >&5
+$as_echo "$gcc_target_cv_working" >&6; }
+CC="$saved_CC"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5
+$as_echo_n "checking for -plugin option... " >&6; }
+plugin_option=
+if test $gcc_target_cv_working = yes; then
+ plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+ for plugin in $plugin_names; do
+ plugin_so=`${COMPILER_FOR_TARGET} ${CFLAGS_FOR_TARGET} --print-prog-name $plugin`
+ if test x$plugin_so = x$plugin; then
+ plugin_so=`${COMPILER_FOR_TARGET} ${CFLAGS_FOR_TARGET} --print-file-name $plugin`
+ fi
+ if test x$plugin_so != x$plugin; then
+ plugin_option="--plugin $plugin_so"
+ break
+ fi
+ done
+fi
+if test -n "$plugin_option"; then
+ PLUGIN_OPTION_FOR_TARGET="$plugin_option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5
+$as_echo "$plugin_option" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+fi
+if test -n "$PLUGIN_OPTION_FOR_TARGET"; then
+ AR_PLUGIN_OPTION_FOR_TARGET="$PLUGIN_OPTION_FOR_TARGET"
+ NM_PLUGIN_OPTION_FOR_TARGET="$PLUGIN_OPTION_FOR_TARGET"
+ RANLIB_PLUGIN_OPTION_FOR_TARGET="$PLUGIN_OPTION_FOR_TARGET"
+else
+ AR_PLUGIN_OPTION_FOR_TARGET=
+ NM_PLUGIN_OPTION_FOR_TARGET=
+ RANLIB_PLUGIN_OPTION_FOR_TARGET=
+fi
+
+
+
+
# When building target libraries, except in a Canadian cross, we use
# the same toolchain as the compiler we just built.
COMPILER_AS_FOR_TARGET='$(AS_FOR_TARGET)'
diff --git a/configure.ac b/configure.ac
index 89ebe40..2996a12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,6 +24,7 @@ m4_include(config/override.m4)
m4_include(config/proginstall.m4)
m4_include(config/elf.m4)
m4_include(config/ax_cxx_compile_stdcxx.m4)
+m4_include(config/clang-plugin.m4)
m4_include(config/gcc-plugin.m4)
m4_include([libtool.m4])
m4_include([ltoptions.m4])
@@ -32,7 +33,8 @@ m4_include([ltversion.m4])
m4_include([lt~obsolete.m4])
m4_include([config/isl.m4])
-AC_INIT(move-if-change)
+AC_INIT
+AC_CONFIG_SRCDIR([move-if-change])
AC_DISABLE_OPTION_CHECKING
progname=$0
@@ -70,14 +72,14 @@ ACX_NONCANONICAL_TARGET
dnl Autoconf 2.5x and later will set a default program prefix if
dnl --target was used, even if it was the same as --host. Disable
-dnl that behavior. This must be done before AC_CANONICAL_SYSTEM
+dnl that behavior. This must be done before AC_CANONICAL_TARGET
dnl to take effect.
test "$host_noncanonical" = "$target_noncanonical" &&
test "$program_prefix$program_suffix$program_transform_name" = \
NONENONEs,x,x, &&
program_transform_name=s,y,y,
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
AC_ARG_PROGRAM
m4_pattern_allow([^AS_FOR_TARGET$])dnl
@@ -1319,10 +1321,6 @@ case "${target}" in
# always build newlib.
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
;;
- # This is temporary until we can link against shared libraries
- powerpcle-*-solaris*)
- noconfigdirs="$noconfigdirs gdb sim tcl tk itcl"
- ;;
powerpc-*-beos*)
noconfigdirs="$noconfigdirs gdb"
;;
@@ -4015,18 +4013,30 @@ AC_SUBST(GDCFLAGS)
GDCFLAGS=${GDCFLAGS-${CFLAGS}}
AC_SUBST(PKG_CONFIG_PATH)
-GCC_PLUGIN_OPTION(PLUGIN_OPTION)
+# Try CLANG_PLUGIN_FILE first since GCC_PLUGIN_OPTION may return the
+# wrong PLUGIN_OPTION with clang.
+CLANG_PLUGIN_FILE(PLUGIN_FILE)
+if test -n "$PLUGIN_FILE"; then
+ PLUGIN_OPTION="--plugin $PLUGIN_FILE"
+else
+ GCC_PLUGIN_OPTION(PLUGIN_OPTION)
+fi
AR_PLUGIN_OPTION=
+NM_PLUGIN_OPTION=
RANLIB_PLUGIN_OPTION=
if test -n "$PLUGIN_OPTION"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
AR_PLUGIN_OPTION="$PLUGIN_OPTION"
fi
+ if $NM --help 2>&1 | grep -q "\--plugin"; then
+ NM_PLUGIN_OPTION="$PLUGIN_OPTION"
+ fi
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION"
fi
fi
AC_SUBST(AR_PLUGIN_OPTION)
+AC_SUBST(NM_PLUGIN_OPTION)
AC_SUBST(RANLIB_PLUGIN_OPTION)
# Target tools.
@@ -4121,6 +4131,27 @@ AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
+# Try CLANG_PLUGIN_FILE_FOR_TARGET first since GCC_PLUGIN_OPTION_FOR_TARGET
+# may return the wrong PLUGIN_OPTION_FOR_TARGET with clang.
+CLANG_PLUGIN_FILE_FOR_TARGET(PLUGIN_FILE_FOR_TARGET)
+if test -n "$PLUGIN_FILE_FOR_TARGET"; then
+ PLUGIN_OPTION_FOR_TARGET="--plugin $PLUGIN_FILE_FOR_TARGET"
+else
+ GCC_PLUGIN_OPTION_FOR_TARGET(PLUGIN_OPTION_FOR_TARGET)
+fi
+if test -n "$PLUGIN_OPTION_FOR_TARGET"; then
+ AR_PLUGIN_OPTION_FOR_TARGET="$PLUGIN_OPTION_FOR_TARGET"
+ NM_PLUGIN_OPTION_FOR_TARGET="$PLUGIN_OPTION_FOR_TARGET"
+ RANLIB_PLUGIN_OPTION_FOR_TARGET="$PLUGIN_OPTION_FOR_TARGET"
+else
+ AR_PLUGIN_OPTION_FOR_TARGET=
+ NM_PLUGIN_OPTION_FOR_TARGET=
+ RANLIB_PLUGIN_OPTION_FOR_TARGET=
+fi
+AC_SUBST(AR_PLUGIN_OPTION_FOR_TARGET)
+AC_SUBST(NM_PLUGIN_OPTION_FOR_TARGET)
+AC_SUBST(RANLIB_PLUGIN_OPTION_FOR_TARGET)
+
# When building target libraries, except in a Canadian cross, we use
# the same toolchain as the compiler we just built.
COMPILER_AS_FOR_TARGET='$(AS_FOR_TARGET)'
diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4
index 762e949..e44fc5f 100644
--- a/gcc/aclocal.m4
+++ b/gcc/aclocal.m4
@@ -69,6 +69,7 @@ m4_include([../ltversion.m4])
m4_include([../lt~obsolete.m4])
m4_include([../config/acx.m4])
m4_include([../config/cet.m4])
+m4_include([../config/clang-plugin.m4])
m4_include([../config/codeset.m4])
m4_include([../config/depstand.m4])
m4_include([../config/dfp.m4])
diff --git a/gcc/c-family/c-attribs.cc b/gcc/c-family/c-attribs.cc
index df9ff99..5bc5183 100644
--- a/gcc/c-family/c-attribs.cc
+++ b/gcc/c-family/c-attribs.cc
@@ -249,6 +249,29 @@ static const struct attribute_spec::exclusions attr_target_clones_exclusions[] =
ATTR_EXCL ("always_inline", true, true, true),
ATTR_EXCL ("target", TARGET_HAS_FMV_TARGET_ATTRIBUTE,
TARGET_HAS_FMV_TARGET_ATTRIBUTE, TARGET_HAS_FMV_TARGET_ATTRIBUTE),
+ ATTR_EXCL ("omp declare simd", true, true, true),
+ ATTR_EXCL ("simd", true, true, true),
+ ATTR_EXCL (NULL, false, false, false),
+};
+
+static const struct attribute_spec::exclusions attr_target_version_exclusions[] =
+{
+ ATTR_EXCL ("omp declare simd", true, true, true),
+ ATTR_EXCL ("simd", true, true, true),
+ ATTR_EXCL (NULL, false, false, false),
+};
+
+static const struct attribute_spec::exclusions attr_omp_declare_simd_exclusions[] =
+{
+ ATTR_EXCL ("target_version", true, true, true),
+ ATTR_EXCL ("target_clones", true, true, true),
+ ATTR_EXCL (NULL, false, false, false),
+};
+
+static const struct attribute_spec::exclusions attr_simd_exclusions[] =
+{
+ ATTR_EXCL ("target_version", true, true, true),
+ ATTR_EXCL ("target_clones", true, true, true),
ATTR_EXCL (NULL, false, false, false),
};
@@ -536,7 +559,7 @@ const struct attribute_spec c_common_gnu_attributes[] =
attr_target_exclusions },
{ "target_version", 1, 1, true, false, false, false,
handle_target_version_attribute,
- NULL },
+ attr_target_version_exclusions},
{ "target_clones", 1, -1, true, false, false, false,
handle_target_clones_attribute,
attr_target_clones_exclusions },
@@ -563,7 +586,8 @@ const struct attribute_spec c_common_gnu_attributes[] =
{ "returns_nonnull", 0, 0, false, true, true, false,
handle_returns_nonnull_attribute, NULL },
{ "omp declare simd", 0, -1, true, false, false, false,
- handle_omp_declare_simd_attribute, NULL },
+ handle_omp_declare_simd_attribute,
+ attr_omp_declare_simd_exclusions },
{ "omp declare variant base", 0, -1, true, false, false, false,
handle_omp_declare_variant_attribute, NULL },
{ "omp declare variant variant", 0, -1, true, false, false, false,
@@ -572,7 +596,7 @@ const struct attribute_spec c_common_gnu_attributes[] =
false, false,
handle_omp_declare_variant_attribute, NULL },
{ "simd", 0, 1, true, false, false, false,
- handle_simd_attribute, NULL },
+ handle_simd_attribute, attr_simd_exclusions },
{ "omp declare target", 0, -1, true, false, false, false,
handle_omp_declare_target_attribute, NULL },
{ "omp declare target link", 0, 0, true, false, false, false,
diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc
index 7e4c7c2..632bbf0 100644
--- a/gcc/c/c-decl.cc
+++ b/gcc/c/c-decl.cc
@@ -2086,6 +2086,35 @@ previous_tag (tree type)
return NULL_TREE;
}
+/* Subroutine to mark functions as versioned when using the attribute
+ 'target_version'. */
+
+static void
+maybe_mark_function_versioned (tree decl)
+{
+ if (!DECL_FUNCTION_VERSIONED (decl))
+ {
+ /* Check if the name of the function has been overridden. */
+ if (DECL_ASSEMBLER_NAME_SET_P (decl)
+ && IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))[0] == '*')
+ error_at (DECL_SOURCE_LOCATION (decl),
+ "cannot use function multiversioning on a renamed function");
+
+ /* We need to insert function version now to make sure the correct
+ pre-mangled assembler name is recorded. */
+ cgraph_node *node = cgraph_node::get_create (decl);
+
+ if (!node->function_version ())
+ node->insert_new_function_version ();
+
+ DECL_FUNCTION_VERSIONED (decl) = 1;
+
+ tree mangled_name
+ = targetm.mangle_decl_assembler_name (decl, DECL_NAME (decl));
+ SET_DECL_ASSEMBLER_NAME (decl, mangled_name);
+ }
+}
+
/* Subroutine of duplicate_decls. Compare NEWDECL to OLDDECL.
Returns true if the caller should proceed to merge the two, false
if OLDDECL should simply be discarded. As a side effect, issues
@@ -2505,6 +2534,10 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl,
"but not here");
}
}
+ /* Check if these are unmergable overlapping FMV declarations. */
+ if (!TARGET_HAS_FMV_TARGET_ATTRIBUTE
+ && diagnose_versioned_decls (olddecl, newdecl))
+ return false;
}
else if (VAR_P (newdecl))
{
@@ -2971,6 +3004,12 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
if (TREE_CODE (newdecl) == FUNCTION_DECL)
{
+ if (DECL_FUNCTION_VERSIONED (olddecl)
+ || DECL_FUNCTION_VERSIONED (newdecl))
+ {
+ maybe_mark_function_versioned (olddecl);
+ maybe_mark_function_versioned (newdecl);
+ }
/* If we're redefining a function previously defined as extern
inline, make sure we emit debug info for the inline before we
throw it away, in case it was inlined into a function that
@@ -3370,6 +3409,53 @@ pushdecl (tree x)
TREE_TYPE (b_use->decl) = b_use->u.type;
}
}
+
+ /* Check if x is part of a FMV set with b_use. */
+ if (b_use && TREE_CODE (b_use->decl) == FUNCTION_DECL
+ && TREE_CODE (x) == FUNCTION_DECL && DECL_FILE_SCOPE_P (b_use->decl)
+ && DECL_FILE_SCOPE_P (x)
+ && disjoint_version_decls (x, b_use->decl)
+ && comptypes (vistype, type) != 0)
+ {
+ maybe_mark_function_versioned (b_use->decl);
+ maybe_mark_function_versioned (b->decl);
+ maybe_mark_function_versioned (x);
+
+ cgraph_node *b_node = cgraph_node::get_create (b_use->decl);
+ cgraph_function_version_info *b_v = b_node->function_version ();
+ if (!b_v)
+ b_v = b_node->insert_new_function_version ();
+
+ /* Check if this new node conflicts with any previous functions
+ in the set. */
+ cgraph_function_version_info *version = b_v;
+ for (; version; version = version->next)
+ if (!disjoint_version_decls (version->this_node->decl, x))
+ {
+ /* The decls define overlapping version, so attempt to merge
+ or diagnose the conflict. */
+ if (duplicate_decls (x, version->this_node->decl))
+ return version->this_node->decl;
+ else
+ return error_mark_node;
+ }
+
+ /* This is a new version to be added to FMV structure. */
+ cgraph_node::add_function_version (b_v, x);
+
+ /* Get the first node from the structure. */
+ cgraph_function_version_info *default_v = b_v;
+ while (default_v->prev)
+ default_v = default_v->prev;
+ /* Always use the default node for the bindings. */
+ b_use->decl = default_v->this_node->decl;
+ b->decl = default_v->this_node->decl;
+
+ /* Node is not a duplicate, so no need to do the rest of the
+ checks. */
+ return x;
+ }
+
if (duplicate_decls (x, b_use->decl))
{
if (b_use != b)
@@ -4494,6 +4580,12 @@ tree
lookup_name (tree name)
{
struct c_binding *b = I_SYMBOL_BINDING (name);
+ /* Do not resolve non-default function versions. */
+ if (b
+ && TREE_CODE (b->decl) == FUNCTION_DECL
+ && DECL_FUNCTION_VERSIONED (b->decl)
+ && !is_function_default_version (b->decl))
+ return NULL_TREE;
if (b && !b->invisible)
{
maybe_record_typedef_use (b->decl);
@@ -5776,6 +5868,17 @@ start_decl (struct c_declarator *declarator, struct c_declspecs *declspecs,
&& VAR_OR_FUNCTION_DECL_P (decl))
objc_check_global_decl (decl);
+ /* To enable versions to be created across TU's we mark and mangle all
+ non-default versioned functions. */
+ if (TREE_CODE (decl) == FUNCTION_DECL
+ && !TARGET_HAS_FMV_TARGET_ATTRIBUTE
+ && get_target_version (decl).is_valid ())
+ {
+ maybe_mark_function_versioned (decl);
+ if (current_scope != file_scope)
+ error ("versioned declarations are only allowed at file scope");
+ }
+
/* Add this decl to the current scope.
TEM may equal DECL or it may be a previous decl of the same name. */
if (do_push)
@@ -10754,6 +10857,17 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator,
warn_parm_array_mismatch (origloc, old_decl, parms);
}
+ /* To enable versions to be created across TU's we mark and mangle all
+ non-default versioned functions. */
+ if (TREE_CODE (decl1) == FUNCTION_DECL
+ && !TARGET_HAS_FMV_TARGET_ATTRIBUTE
+ && get_target_version (decl1).is_valid ())
+ {
+ maybe_mark_function_versioned (decl1);
+ if (current_scope != file_scope)
+ error ("versioned definitions are only allowed at file scope");
+ }
+
/* Record the decl so that the function name is defined.
If we already have a decl for this name, and it is a FUNCTION_DECL,
use the old decl. */
@@ -13585,6 +13699,10 @@ c_parse_final_cleanups (void)
c_write_global_declarations_1 (BLOCK_VARS (DECL_INITIAL (t)));
c_write_global_declarations_1 (BLOCK_VARS (ext_block));
+ /* Call this to set cpp_implicit_aliases_done on all nodes. This is
+ important for function multiversioning aliases to get resolved. */
+ symtab->process_same_body_aliases ();
+
if (!in_lto_p)
free_attr_access_data ();
diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc
index df44a91..7c24526 100644
--- a/gcc/c/c-parser.cc
+++ b/gcc/c/c-parser.cc
@@ -27776,6 +27776,13 @@ c_finish_omp_declare_simd (c_parser *parser, tree fndecl, tree parms,
clauses[0].type = CPP_EOF;
return;
}
+ if (DECL_FUNCTION_VERSIONED (fndecl))
+ {
+ error_at (DECL_SOURCE_LOCATION (fndecl),
+ "%<#pragma omp declare %s%> cannot be used with function "
+ "multi-versioning", kind);
+ return;
+ }
if (parms == NULL_TREE)
parms = DECL_ARGUMENTS (fndecl);
diff --git a/gcc/cfghooks.cc b/gcc/cfghooks.cc
index 8b33468..25bc5d4 100644
--- a/gcc/cfghooks.cc
+++ b/gcc/cfghooks.cc
@@ -819,7 +819,7 @@ merge_blocks (basic_block a, basic_block b)
/* Pick the more reliable count. If both qualities agrees, pick the larger
one since turning mistakely hot code to cold is more harmful. */
- if (a->count.initialized_p ())
+ if (!a->count.initialized_p ())
a->count = b->count;
else if (a->count.quality () < b->count.quality ())
a->count = b->count;
diff --git a/gcc/config/riscv/predicates.md b/gcc/config/riscv/predicates.md
index 777e71b..056f9e2 100644
--- a/gcc/config/riscv/predicates.md
+++ b/gcc/config/riscv/predicates.md
@@ -607,13 +607,12 @@
(define_predicate "ge_operator"
(match_code "ge,geu"))
-;; pmode_reg_or_uimm5_operand can be used by vsll.vx/vsrl.vx/vsra.vx instructions.
-;; Since it has the same predicate with vector_length_operand which allows register
-;; or immediate (0 ~ 31), we define this predicate same as vector_length_operand here.
-;; We don't use vector_length_operand directly to predicate vsll.vx/vsrl.vx/vsra.vx
-;; since it may be confusing.
+;; pmode_reg_or_uimm5_operand can be used by vsll.vx/vsrl.vx/vsra.vx instructions
+;; It is *not* equivalent to vector_length_operand due to the vector_length_operand
+;; needing to conditionalize some behavior on XTHEADVECTOR.
(define_special_predicate "pmode_reg_or_uimm5_operand"
- (match_operand 0 "vector_length_operand"))
+ (ior (match_operand 0 "pmode_register_operand")
+ (match_operand 0 "const_csr_operand")))
(define_special_predicate "pmode_reg_or_0_operand"
(ior (match_operand 0 "const_0_operand")
diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md
index 843a048..78a01ef 100644
--- a/gcc/config/riscv/riscv.md
+++ b/gcc/config/riscv/riscv.md
@@ -2322,27 +2322,38 @@
else
{
rtx reg;
- rtx label = gen_label_rtx ();
+ rtx label1 = gen_label_rtx ();
+ rtx label2 = gen_label_rtx ();
+ rtx label3 = gen_label_rtx ();
rtx end_label = gen_label_rtx ();
rtx abs_reg = gen_reg_rtx (<ANYF:MODE>mode);
rtx coeff_reg = gen_reg_rtx (<ANYF:MODE>mode);
rtx tmp_reg = gen_reg_rtx (<ANYF:MODE>mode);
- rtx fflags = gen_reg_rtx (SImode);
riscv_emit_move (tmp_reg, operands[1]);
+
+ if (flag_trapping_math)
+ {
+ /* Check if the input is a NaN. */
+ riscv_expand_conditional_branch (label1, EQ,
+ operands[1], operands[1]);
+
+ emit_jump_insn (gen_jump (label3));
+ emit_barrier ();
+
+ emit_label (label1);
+ }
+
riscv_emit_move (coeff_reg,
riscv_vector::get_fp_rounding_coefficient (<ANYF:MODE>mode));
emit_insn (gen_abs<ANYF:mode>2 (abs_reg, operands[1]));
- /* fp compare can set invalid flag for NaN, so backup fflags. */
- if (flag_trapping_math)
- emit_insn (gen_riscv_frflags (fflags));
- riscv_expand_conditional_branch (label, LT, abs_reg, coeff_reg);
+ riscv_expand_conditional_branch (label2, LT, abs_reg, coeff_reg);
emit_jump_insn (gen_jump (end_label));
emit_barrier ();
- emit_label (label);
+ emit_label (label2);
switch (<ANYF:MODE>mode)
{
case SFmode:
@@ -2361,15 +2372,17 @@
emit_insn (gen_copysign<ANYF:mode>3 (tmp_reg, abs_reg, operands[1]));
- emit_label (end_label);
+ emit_jump_insn (gen_jump (end_label));
+ emit_barrier ();
- /* Restore fflags, but after label. This is slightly different
- than glibc implementation which only needs to restore under
- the label, since it checks for NaN first, meaning following fp
- compare can't raise fp exceptons and thus not clobber fflags. */
if (flag_trapping_math)
- emit_insn (gen_riscv_fsflags (fflags));
+ {
+ emit_label (label3);
+ /* Generate a qNaN from an sNaN if needed. */
+ emit_insn (gen_add<ANYF:mode>3 (tmp_reg, operands[1], operands[1]));
+ }
+ emit_label (end_label);
riscv_emit_move (operands[0], tmp_reg);
}
diff --git a/gcc/configure b/gcc/configure
index d6cc7fc..38d8cd9 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -758,6 +758,7 @@ LIPO
NMEDIT
DSYMUTIL
STRIP
+LLVM_CONFIG
OBJDUMP
ac_ct_DUMPBIN
DUMPBIN
@@ -16455,8 +16456,266 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
-plugin_option=
+
+# Try CLANG_PLUGIN_FILE first since GCC_PLUGIN_OPTION may return the
+# wrong plugin_option with clang.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang" >&5
+$as_echo_n "checking for clang... " >&6; }
+if ${clang_cv_is_clang+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __clang__
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ clang_cv_is_clang=yes
+else
+ clang_cv_is_clang=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5
+$as_echo "$clang_cv_is_clang" >&6; }
+ plugin_file=
+ if test $clang_cv_is_clang = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5
+$as_echo_n "checking for clang plugin file... " >&6; }
+ plugin_names="LLVMgold.so"
+ for plugin in $plugin_names; do
+ plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin`
+ if test x$plugin_file = x$plugin; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LLVM_CONFIG"; then
+ ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LLVM_CONFIG="${ac_tool_prefix}llvm-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
+if test -n "$LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
+$as_echo "$LLVM_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LLVM_CONFIG"; then
+ ac_ct_LLVM_CONFIG=$LLVM_CONFIG
+ # Extract the first word of "llvm-config", so it can be a program name with args.
+set dummy llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LLVM_CONFIG"; then
+ ac_cv_prog_ac_ct_LLVM_CONFIG="$ac_ct_LLVM_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_LLVM_CONFIG="llvm-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LLVM_CONFIG=$ac_cv_prog_ac_ct_LLVM_CONFIG
+if test -n "$ac_ct_LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LLVM_CONFIG" >&5
+$as_echo "$ac_ct_LLVM_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LLVM_CONFIG" = x; then
+ LLVM_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LLVM_CONFIG=$ac_ct_LLVM_CONFIG
+ fi
+else
+ LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG"
+fi
+
+ if test "$?" != 0; then
+ as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5
+ fi
+ clang_lib_dir=`$LLVM_CONFIG --libdir`
+ if test -f $clang_lib_dir/$plugin; then
+ plugin_file=$clang_lib_dir/$plugin
+ fi
+ if test x$plugin_file != x$plugin; then
+ break;
+ fi
+ fi
+ done
+ if test -z $plugin_file; then
+ as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5
+ fi
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+ if test "${AR}" = "" ; then
+ as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5
+ fi
+ plugin_option="--plugin $plugin_file"
+ touch conftest.c
+ ${AR} $plugin_option rc conftest.a conftest.c
+ if test "$?" != 0; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
+$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
+ plugin_file=
+ fi
+ rm -f conftest.*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5
+$as_echo "$plugin_file" >&6; }
+ fi
+ plugin_file="$plugin_file"
+
+if test -n "$plugin_file"; then
+ plugin_option="--plugin $plugin_file"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5
+$as_echo_n "checking for -plugin option... " >&6; }
+
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+plugin_option=
for plugin in $plugin_names; do
plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
if test x$plugin_so = x$plugin; then
@@ -16467,7 +16726,119 @@ for plugin in $plugin_names; do
break
fi
done
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test "${AR}" = "" ; then
+ as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5
+fi
+touch conftest.c
+${AR} $plugin_option rc conftest.a conftest.c
+if test "$?" != 0; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
+$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
+ plugin_option=
+fi
+rm -f conftest.*
+if test -n "$plugin_option"; then
+ plugin_option="$plugin_option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5
+$as_echo "$plugin_option" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -16562,17 +16933,15 @@ fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
- if $AR --help 2>&1 | grep -q "\--plugin"; then
- touch conftest.c
- $AR $plugin_option rc conftest.a conftest.c
- if test "$?" != 0; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
-$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
- else
+ case "$AR" in
+ *"$plugin_option"*)
+ ;;
+ *)
+ if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
- rm -f conftest.*
- fi
+ ;;
+ esac
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@@ -16779,9 +17148,15 @@ fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
- if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
- RANLIB="$RANLIB $plugin_option"
- fi
+ case "$RANLIB" in
+ *"$plugin_option"*)
+ ;;
+ *)
+ if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+ RANLIB="$RANLIB $plugin_option"
+ fi
+ ;;
+ esac
fi
@@ -21484,7 +21859,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 21487 "configure"
+#line 21862 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -21590,7 +21965,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 21593 "configure"
+#line 21968 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index 8d1187f..0403148 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -28124,6 +28124,7 @@ cp_parser_class_specifier (cp_parser* parser)
bool in_switch_statement_p;
bool saved_in_unbraced_linkage_specification_p;
bool saved_in_unbraced_export_declaration_p;
+ bool saved_auto_is_implicit_function_template_parm_p;
tree old_scope = NULL_TREE;
tree scope = NULL_TREE;
cp_token *closing_brace;
@@ -28181,6 +28182,10 @@ cp_parser_class_specifier (cp_parser* parser)
saved_in_unbraced_export_declaration_p
= parser->in_unbraced_export_declaration_p;
parser->in_unbraced_export_declaration_p = false;
+ saved_auto_is_implicit_function_template_parm_p
+ = parser->auto_is_implicit_function_template_parm_p;
+ parser->auto_is_implicit_function_template_parm_p = false;
+
/* 'this' from an enclosing non-static member function is unavailable. */
tree saved_ccp = current_class_ptr;
tree saved_ccr = current_class_ref;
@@ -28571,6 +28576,8 @@ cp_parser_class_specifier (cp_parser* parser)
= saved_in_unbraced_linkage_specification_p;
parser->in_unbraced_export_declaration_p
= saved_in_unbraced_export_declaration_p;
+ parser->auto_is_implicit_function_template_parm_p
+ = saved_auto_is_implicit_function_template_parm_p;
current_class_ptr = saved_ccp;
current_class_ref = saved_ccr;
diff --git a/gcc/diagnostics/output-spec.cc b/gcc/diagnostics/output-spec.cc
index 28ea044f..dfde7f0 100644
--- a/gcc/diagnostics/output-spec.cc
+++ b/gcc/diagnostics/output-spec.cc
@@ -73,171 +73,160 @@ struct scheme_name_and_params
class output_factory
{
public:
- output_factory ();
+ output_factory (diagnostics::context &dc);
std::unique_ptr<sink>
make_sink (const context &ctxt,
diagnostics::context &dc,
const scheme_name_and_params &scheme_and_kvs);
- const scheme_handler *get_scheme_handler (const std::string &scheme_name);
+ scheme_handler *get_scheme_handler (const std::string &scheme_name);
private:
std::vector<std::unique_ptr<scheme_handler>> m_scheme_handlers;
};
-class scheme_handler
+enum key_handler::result
+key_handler::parse_bool_value (const context &ctxt,
+ const std::string &key,
+ const std::string &value,
+ bool &out) const
{
-public:
- scheme_handler (std::string scheme_name)
- : m_scheme_name (std::move (scheme_name))
- {}
- virtual ~scheme_handler () {}
-
- const std::string &get_scheme_name () const { return m_scheme_name; }
-
- virtual std::unique_ptr<sink>
- make_sink (const context &ctxt,
- diagnostics::context &dc,
- const scheme_name_and_params &scheme_and_kvs) const = 0;
+ if (value == "yes")
+ {
+ out = true;
+ return result::ok;
+ }
+ else if (value == "no")
+ {
+ out = false;
+ return result::ok;
+ }
+ else
+ {
+ ctxt.report_error
+ ("%<%s%s%>:"
+ " unexpected value %qs for key %qs; expected %qs or %qs",
+ ctxt.get_option_name (), ctxt.get_unparsed_spec (),
+ value.c_str (),
+ key.c_str (),
+ "yes", "no");
+ return result::malformed_value;
+ }
+}
-protected:
- bool
- parse_bool_value (const context &ctxt,
- const std::string &key,
- const std::string &value,
- bool &out) const
- {
- if (value == "yes")
- {
- out = true;
- return true;
- }
- else if (value == "no")
- {
- out = false;
- return true;
- }
- else
+template <typename EnumType, size_t NumValues>
+key_handler::result
+key_handler::parse_enum_value (const context &ctxt,
+ const std::string &key,
+ const std::string &value,
+ const std::array<std::pair<const char *,
+ EnumType>,
+ NumValues> &value_names,
+ EnumType &out) const
+{
+ for (auto &iter : value_names)
+ if (value == iter.first)
{
- ctxt.report_error
- ("%<%s%s%>:"
- " unexpected value %qs for key %qs; expected %qs or %qs",
- ctxt.get_option_name (), ctxt.get_unparsed_spec (),
- value.c_str (),
- key.c_str (),
- "yes", "no");
-
- return false;
+ out = iter.second;
+ return result::ok;
}
- }
- template <typename EnumType, size_t NumValues>
- bool
- parse_enum_value (const context &ctxt,
- const std::string &key,
- const std::string &value,
- const std::array<std::pair<const char *, EnumType>, NumValues> &value_names,
- EnumType &out) const
- {
- for (auto &iter : value_names)
- if (value == iter.first)
- {
- out = iter.second;
- return true;
- }
-
- auto_vec<const char *> known_values;
- for (auto iter : value_names)
- known_values.safe_push (iter.first);
- pp_markup::comma_separated_quoted_strings e (known_values);
- ctxt.report_error
- ("%<%s%s%>:"
- " unexpected value %qs for key %qs; known values: %e",
- ctxt.get_option_name (), ctxt.get_unparsed_spec (),
- value.c_str (),
- key.c_str (),
- &e);
- return false;
- }
-private:
- const std::string m_scheme_name;
-};
+ auto_vec<const char *> known_values;
+ for (auto iter : value_names)
+ known_values.safe_push (iter.first);
+ pp_markup::comma_separated_quoted_strings e (known_values);
+ ctxt.report_error
+ ("%<%s%s%>:"
+ " unexpected value %qs for key %qs; known values: %e",
+ ctxt.get_option_name (), ctxt.get_unparsed_spec (),
+ value.c_str (),
+ key.c_str (),
+ &e);
+ return result::malformed_value;
+}
class text_scheme_handler : public scheme_handler
{
public:
- struct decoded_args
+ text_scheme_handler (diagnostics::context &dc)
+ : scheme_handler ("text"),
+ m_show_color (pp_show_color (dc.get_reference_printer ())),
+ m_show_nesting (true),
+ m_show_locations_in_nesting (true),
+ m_show_levels (false)
{
- bool m_show_color;
- bool m_show_nesting;
- bool m_show_locations_in_nesting;
- bool m_show_levels;
- };
-
- text_scheme_handler () : scheme_handler ("text") {}
+ }
std::unique_ptr<sink>
make_sink (const context &ctxt,
- diagnostics::context &dc,
- const scheme_name_and_params &scheme_and_kvs) const final override;
+ diagnostics::context &dc) final override;
+
+ enum result
+ maybe_handle_kv (const context &ctxt,
+ const std::string &key,
+ const std::string &value) final override;
+
+ void
+ get_keys (auto_vec<const char *> &out) const final override;
- bool
- decode_kv (const context &ctxt,
- const std::string &key,
- const std::string &value,
- decoded_args &out_opts) const;
+private:
+ bool m_show_color;
+ bool m_show_nesting;
+ bool m_show_locations_in_nesting;
+ bool m_show_levels;
};
class sarif_scheme_handler : public scheme_handler
{
public:
- struct decoded_args
+ sarif_scheme_handler ()
+ : scheme_handler ("sarif"),
+ m_serialization_kind (sarif_serialization_kind::json)
{
- label_text m_filename;
- enum sarif_serialization_kind m_serialization_kind;
- sarif_generation_options m_generation_opts;
- };
-
- sarif_scheme_handler () : scheme_handler ("sarif") {}
+ }
std::unique_ptr<sink>
make_sink (const context &ctxt,
- diagnostics::context &dc,
- const scheme_name_and_params &scheme_and_kvs) const final override;
+ diagnostics::context &dc) final override;
- bool
- decode_kv (const context &ctxt,
- const std::string &key,
- const std::string &value,
- decoded_args &out_opts) const;
+ enum result
+ maybe_handle_kv (const context &ctxt,
+ const std::string &key,
+ const std::string &value) final override;
+
+ void
+ get_keys (auto_vec<const char *> &out) const final override;
private:
static std::unique_ptr<sarif_serialization_format>
make_sarif_serialization_object (enum sarif_serialization_kind);
+
+ label_text m_filename;
+ enum sarif_serialization_kind m_serialization_kind;
+ sarif_generation_options m_generation_opts;
};
class html_scheme_handler : public scheme_handler
{
public:
- struct decoded_args
- {
- label_text m_filename;
- html_generation_options m_html_gen_opts;
- };
-
html_scheme_handler () : scheme_handler ("experimental-html") {}
std::unique_ptr<sink>
make_sink (const context &ctxt,
- diagnostics::context &dc,
- const scheme_name_and_params &scheme_and_kvs) const final override;
+ diagnostics::context &dc) final override;
+
+ enum result
+ maybe_handle_kv (const context &ctxt,
+ const std::string &key,
+ const std::string &value) final override;
- bool
- decode_kv (const context &ctxt,
- const std::string &key,
- const std::string &value,
- decoded_args &opts_out) const;
+ void
+ get_keys (auto_vec<const char *> &out) const final override;
+
+private:
+ label_text m_filename;
+ html_generation_options m_html_gen_opts;
};
/* struct context. */
@@ -253,15 +242,38 @@ context::report_error (const char *gmsgid, ...) const
void
context::report_unknown_key (const std::string &key,
- const std::string &scheme_name,
- auto_vec<const char *> &known_keys) const
+ const scheme_handler &scheme) const
{
- pp_markup::comma_separated_quoted_strings e (known_keys);
+ auto_vec<const char *> scheme_key_vec;
+ scheme.get_keys (scheme_key_vec);
+
+ pp_markup::comma_separated_quoted_strings e_scheme_keys (scheme_key_vec);
+
+ const char *scheme_name = scheme.get_scheme_name ().c_str ();
+
+ if (m_client_keys)
+ {
+ auto_vec<const char *> client_key_vec;
+ m_client_keys->get_keys (client_key_vec);
+ if (!client_key_vec.is_empty ())
+ {
+ pp_markup::comma_separated_quoted_strings e_client_keys
+ (client_key_vec);
+ report_error
+ ("%<%s%s%>:"
+ " unknown key %qs for output scheme %qs;"
+ " scheme keys: %e; client keys: %e",
+ get_option_name (), get_unparsed_spec (),
+ key.c_str (), scheme_name,
+ &e_scheme_keys, &e_client_keys);
+ }
+ }
+
report_error
("%<%s%s%>:"
- " unknown key %qs for format %qs; known keys: %e",
+ " unknown key %qs for output scheme %qs; scheme keys: %e",
get_option_name (), get_unparsed_spec (),
- key.c_str (), scheme_name.c_str (), &e);
+ key.c_str (), scheme_name, &e_scheme_keys);
}
void
@@ -348,7 +360,7 @@ context::parse_and_make_sink (diagnostics::context &dc)
if (!parsed_arg)
return nullptr;
- output_factory factory;
+ output_factory factory (dc);
return factory.make_sink (*this, dc, *parsed_arg);
}
@@ -356,14 +368,14 @@ context::parse_and_make_sink (diagnostics::context &dc)
/* class output_factory. */
-output_factory::output_factory ()
+output_factory::output_factory (diagnostics::context &dc)
{
- m_scheme_handlers.push_back (std::make_unique<text_scheme_handler> ());
+ m_scheme_handlers.push_back (std::make_unique<text_scheme_handler> (dc));
m_scheme_handlers.push_back (std::make_unique<sarif_scheme_handler> ());
m_scheme_handlers.push_back (std::make_unique<html_scheme_handler> ());
}
-const scheme_handler *
+scheme_handler *
output_factory::get_scheme_handler (const std::string &scheme_name)
{
for (auto &iter : m_scheme_handlers)
@@ -391,61 +403,91 @@ output_factory::make_sink (const context &ctxt,
return nullptr;
}
- return scheme_handler->make_sink (ctxt, dc, scheme_and_kvs);
-}
-
-/* class text_scheme_handler : public scheme_handler. */
-
-std::unique_ptr<sink>
-text_scheme_handler::make_sink (const context &ctxt,
- diagnostics::context &dc,
- const scheme_name_and_params &scheme_and_kvs) const
-{
- decoded_args opts;
- opts.m_show_color = pp_show_color (dc.get_reference_printer ());
- opts.m_show_nesting = true;
- opts.m_show_locations_in_nesting = true;
- opts.m_show_levels = false;
+ /* Parse key/value pairs. */
for (auto& iter : scheme_and_kvs.m_kvs)
{
const std::string &key = iter.first;
const std::string &value = iter.second;
- if (!decode_kv (ctxt, key, value, opts))
+ if (!ctxt.handle_kv (key, value, *scheme_handler))
return nullptr;
}
+ return scheme_handler->make_sink (ctxt, dc);
+}
+
+bool
+context::handle_kv (const std::string &key,
+ const std::string &value,
+ scheme_handler &scheme) const
+{
+ auto result = scheme.maybe_handle_kv (*this, key, value);
+ switch (result)
+ {
+ default: gcc_unreachable ();
+ case key_handler::result::ok:
+ return true;
+ case key_handler::result::malformed_value:
+ return false;
+ case key_handler::result::unrecognized:
+ /* Key recognized by the scheme; try the client keys. */
+ if (m_client_keys)
+ {
+ result = m_client_keys->maybe_handle_kv (*this, key, value);
+ switch (result)
+ {
+ default: gcc_unreachable ();
+ case key_handler::result::ok:
+ return true;
+ case key_handler::result::malformed_value:
+ return false;
+ case key_handler::result::unrecognized:
+ break;
+ }
+ }
+ report_unknown_key (key, scheme);
+ return false;
+ }
+}
+
+/* class text_scheme_handler : public scheme_handler. */
+
+std::unique_ptr<sink>
+text_scheme_handler::make_sink (const context &,
+ diagnostics::context &dc)
+{
auto sink = std::make_unique<diagnostics::text_sink> (dc);
- sink->set_show_nesting (opts.m_show_nesting);
- sink->set_show_locations_in_nesting (opts.m_show_locations_in_nesting);
- sink->set_show_nesting_levels (opts.m_show_levels);
- pp_show_color (sink->get_printer ()) = opts.m_show_color;
+ sink->set_show_nesting (m_show_nesting);
+ sink->set_show_locations_in_nesting (m_show_locations_in_nesting);
+ sink->set_show_nesting_levels (m_show_levels);
+ pp_show_color (sink->get_printer ()) = m_show_color;
return sink;
}
-bool
-text_scheme_handler::decode_kv (const context &ctxt,
- const std::string &key,
- const std::string &value,
- decoded_args &opts_out) const
+enum key_handler::result
+text_scheme_handler::maybe_handle_kv (const context &ctxt,
+ const std::string &key,
+ const std::string &value)
{
if (key == "color")
- return parse_bool_value (ctxt, key, value, opts_out.m_show_color);
+ return parse_bool_value (ctxt, key, value, m_show_color);
if (key == "show-nesting")
- return parse_bool_value (ctxt, key, value, opts_out.m_show_nesting);
+ return parse_bool_value (ctxt, key, value, m_show_nesting);
if (key == "show-nesting-locations")
return parse_bool_value (ctxt, key, value,
- opts_out.m_show_locations_in_nesting);
+ m_show_locations_in_nesting);
if (key == "show-nesting-levels")
- return parse_bool_value (ctxt, key, value, opts_out.m_show_levels);
-
- /* Key not found. */
- auto_vec<const char *> known_keys;
- known_keys.safe_push ("color");
- known_keys.safe_push ("show-nesting");
- known_keys.safe_push ("show-nesting-locations");
- known_keys.safe_push ("show-nesting-levels");
- ctxt.report_unknown_key (key, get_scheme_name (), known_keys);
- return false;
+ return parse_bool_value (ctxt, key, value, m_show_levels);
+
+ return result::unrecognized;
+}
+
+void
+text_scheme_handler::get_keys (auto_vec<const char *> &out) const
+{
+ out.safe_push ("color");
+ out.safe_push ("show-nesting");
+ out.safe_push ("show-nesting-locations");
+ out.safe_push ("show-nesting-levels");
}
/* class sarif_scheme_handler : public scheme_handler. */
@@ -453,23 +495,11 @@ text_scheme_handler::decode_kv (const context &ctxt,
std::unique_ptr<sink>
sarif_scheme_handler::
make_sink (const context &ctxt,
- diagnostics::context &dc,
- const scheme_name_and_params &scheme_and_kvs) const
+ diagnostics::context &dc)
{
- decoded_args opts;
- opts.m_serialization_kind = sarif_serialization_kind::json;
-
- for (auto& iter : scheme_and_kvs.m_kvs)
- {
- const std::string &key = iter.first;
- const std::string &value = iter.second;
- if (!decode_kv (ctxt, key, value, opts))
- return nullptr;
- }
-
output_file output_file_;
- if (opts.m_filename.get ())
- output_file_ = ctxt.open_output_file (std::move (opts.m_filename));
+ if (m_filename.get ())
+ output_file_ = ctxt.open_output_file (std::move (m_filename));
else
// Default filename
{
@@ -485,33 +515,32 @@ make_sink (const context &ctxt,
= open_sarif_output_file (dc,
ctxt.get_affected_location_mgr (),
basename,
- opts.m_serialization_kind);
+ m_serialization_kind);
}
if (!output_file_)
return nullptr;
auto serialization_obj
- = make_sarif_serialization_object (opts.m_serialization_kind);
+ = make_sarif_serialization_object (m_serialization_kind);
auto sink = make_sarif_sink (dc,
*ctxt.get_affected_location_mgr (),
std::move (serialization_obj),
- opts.m_generation_opts,
+ m_generation_opts,
std::move (output_file_));
return sink;
}
-bool
-sarif_scheme_handler::decode_kv (const context &ctxt,
- const std::string &key,
- const std::string &value,
- decoded_args &opts_out) const
+enum key_handler::result
+sarif_scheme_handler::maybe_handle_kv (const context &ctxt,
+ const std::string &key,
+ const std::string &value)
{
if (key == "file")
{
- opts_out.m_filename = label_text::take (xstrdup (value.c_str ()));
- return true;
+ m_filename = label_text::take (xstrdup (value.c_str ()));
+ return result::ok;
}
if (key == "serialization")
{
@@ -522,7 +551,7 @@ sarif_scheme_handler::decode_kv (const context &ctxt,
(ctxt,
key, value,
value_names,
- opts_out.m_serialization_kind);
+ m_serialization_kind);
}
if (key == "version")
{
@@ -534,20 +563,22 @@ sarif_scheme_handler::decode_kv (const context &ctxt,
(ctxt,
key, value,
value_names,
- opts_out.m_generation_opts.m_version);
+ m_generation_opts.m_version);
}
if (key == "state-graphs")
return parse_bool_value (ctxt, key, value,
- opts_out.m_generation_opts.m_state_graph);
-
- /* Key not found. */
- auto_vec<const char *> known_keys;
- known_keys.safe_push ("file");
- known_keys.safe_push ("serialization");
- known_keys.safe_push ("state-graphs");
- known_keys.safe_push ("version");
- ctxt.report_unknown_key (key, get_scheme_name (), known_keys);
- return false;
+ m_generation_opts.m_state_graph);
+
+ return result::unrecognized;
+}
+
+void
+sarif_scheme_handler::get_keys (auto_vec<const char *> &out) const
+{
+ out.safe_push ("file");
+ out.safe_push ("serialization");
+ out.safe_push ("state-graphs");
+ out.safe_push ("version");
}
std::unique_ptr<sarif_serialization_format>
@@ -569,21 +600,11 @@ make_sarif_serialization_object (enum sarif_serialization_kind kind)
std::unique_ptr<sink>
html_scheme_handler::
make_sink (const context &ctxt,
- diagnostics::context &dc,
- const scheme_name_and_params &scheme_and_kvs) const
+ diagnostics::context &dc)
{
- decoded_args opts;
- for (auto& iter : scheme_and_kvs.m_kvs)
- {
- const std::string &key = iter.first;
- const std::string &value = iter.second;
- if (!decode_kv (ctxt, key, value, opts))
- return nullptr;
- }
-
output_file output_file_;
- if (opts.m_filename.get ())
- output_file_ = ctxt.open_output_file (std::move (opts.m_filename));
+ if (m_filename.get ())
+ output_file_ = ctxt.open_output_file (std::move (m_filename));
else
// Default filename
{
@@ -606,49 +627,47 @@ make_sink (const context &ctxt,
auto sink = make_html_sink (dc,
*ctxt.get_affected_location_mgr (),
- opts.m_html_gen_opts,
+ m_html_gen_opts,
std::move (output_file_));
return sink;
}
-bool
-html_scheme_handler::decode_kv (const context &ctxt,
- const std::string &key,
- const std::string &value,
- decoded_args &opts_out) const
+enum key_handler::result
+html_scheme_handler::maybe_handle_kv (const context &ctxt,
+ const std::string &key,
+ const std::string &value)
{
if (key == "css")
- return parse_bool_value (ctxt, key, value, opts_out.m_html_gen_opts.m_css);
+ return parse_bool_value (ctxt, key, value, m_html_gen_opts.m_css);
if (key == "file")
{
- opts_out.m_filename = label_text::take (xstrdup (value.c_str ()));
- return true;
+ m_filename = label_text::take (xstrdup (value.c_str ()));
+ return result::ok;
}
if (key == "javascript")
return parse_bool_value (ctxt, key, value,
- opts_out.m_html_gen_opts.m_javascript);
+ m_html_gen_opts.m_javascript);
if (key == "show-state-diagrams")
return parse_bool_value (ctxt, key, value,
- opts_out.m_html_gen_opts.m_show_state_diagrams);
+ m_html_gen_opts.m_show_state_diagrams);
if (key == "show-state-diagrams-dot-src")
- return parse_bool_value
- (ctxt, key, value,
- opts_out.m_html_gen_opts.m_show_state_diagrams_dot_src);
+ return parse_bool_value (ctxt, key, value,
+ m_html_gen_opts.m_show_state_diagrams_dot_src);
if (key == "show-state-diagrams-sarif")
- return parse_bool_value
- (ctxt, key, value,
- opts_out.m_html_gen_opts.m_show_state_diagrams_sarif);
-
- /* Key not found. */
- auto_vec<const char *> known_keys;
- known_keys.safe_push ("css");
- known_keys.safe_push ("file");
- known_keys.safe_push ("javascript");
- known_keys.safe_push ("show-state-diagrams");
- known_keys.safe_push ("show-state-diagram-dot-src");
- known_keys.safe_push ("show-state-diagram-sarif");
- ctxt.report_unknown_key (key, get_scheme_name (), known_keys);
- return false;
+ return parse_bool_value (ctxt, key, value,
+ m_html_gen_opts.m_show_state_diagrams_sarif);
+ return result::unrecognized;
+}
+
+void
+html_scheme_handler::get_keys (auto_vec<const char *> &out) const
+{
+ out.safe_push ("css");
+ out.safe_push ("file");
+ out.safe_push ("javascript");
+ out.safe_push ("show-state-diagrams");
+ out.safe_push ("show-state-diagrams-dot-src");
+ out.safe_push ("show-state-diagrams-sarif");
}
} // namespace output_spec
@@ -685,17 +704,19 @@ struct parser_test
class test_spec_context : public diagnostics::output_spec::dc_spec_context
{
public:
- test_spec_context (diagnostics::context &dc,
+ test_spec_context (const char *option_name,
+ const char *unparsed_spec,
+ diagnostics::output_spec::key_handler *client_keys,
line_maps *location_mgr,
- location_t loc,
- const char *option_name,
- const char *unparsed_arg)
- : dc_spec_context (dc,
+ diagnostics::context &dc,
+ location_t loc)
+ : dc_spec_context (option_name,
+ unparsed_spec,
+ client_keys,
location_mgr,
+ dc,
location_mgr,
- loc,
- option_name,
- unparsed_arg)
+ loc)
{
}
@@ -706,9 +727,15 @@ struct parser_test
}
};
- parser_test (const char *unparsed_spec)
+ parser_test (const char *unparsed_spec,
+ diagnostics::output_spec::key_handler *client_keys = nullptr)
: m_dc (),
- m_ctxt (m_dc, line_table, UNKNOWN_LOCATION, "-fOPTION=", unparsed_spec),
+ m_ctxt ("-fOPTION=",
+ unparsed_spec,
+ client_keys,
+ line_table,
+ m_dc,
+ UNKNOWN_LOCATION),
m_fmt (m_dc.get_sink (0))
{
pp_buffer (m_fmt.get_printer ())->m_flush_p = false;
@@ -720,6 +747,12 @@ struct parser_test
return diagnostics::output_spec::parse (m_ctxt);
}
+ std::unique_ptr<diagnostics::sink>
+ parse_and_make_sink ()
+ {
+ return m_ctxt.parse_and_make_sink (m_dc);
+ }
+
bool execution_failed_p () const
{
return m_dc.execution_failed_p ();
@@ -742,9 +775,6 @@ private:
static void
test_output_arg_parsing ()
{
- auto_fix_quotes fix_quotes;
- auto_fix_progname fix_progname;
-
/* Minimal correct example. */
{
parser_test pt ("foo");
@@ -831,12 +861,59 @@ test_output_arg_parsing ()
}
}
+class test_key_handler : public diagnostics::output_spec::key_handler
+{
+public:
+ test_key_handler ()
+ : m_verbose (false),
+ m_strict (false)
+ {
+ }
+
+ enum result
+ maybe_handle_kv (const diagnostics::output_spec::context &ctxt,
+ const std::string &key,
+ const std::string &value) final override
+ {
+ if (key == "verbose")
+ return parse_bool_value (ctxt, key, value, m_verbose);
+ if (key == "strict")
+ return parse_bool_value (ctxt, key, value, m_strict);
+ return result::unrecognized;
+ }
+
+ void
+ get_keys (auto_vec<const char *> &out_known_keys) const final override
+ {
+ out_known_keys.safe_push ("verbose");
+ out_known_keys.safe_push ("strict");
+ }
+
+ bool m_verbose;
+ bool m_strict;
+};
+
+static void
+test_client_arg_parsing ()
+{
+ test_key_handler client_keys;
+ parser_test pt ("text:verbose=yes,strict=no", &client_keys);
+ auto result = pt.parse_and_make_sink ();
+ ASSERT_TRUE (result.get ());
+ ASSERT_TRUE (client_keys.m_verbose);
+ ASSERT_FALSE (client_keys.m_strict);
+}
+
/* Run all of the selftests within this file. */
void
output_spec_cc_tests ()
{
+ auto_fix_quotes fix_quotes;
+ auto_fix_progname fix_progname;
+
test_output_arg_parsing ();
+ test_client_arg_parsing ();
}
} // namespace diagnostics::selftest
diff --git a/gcc/diagnostics/output-spec.h b/gcc/diagnostics/output-spec.h
index e24002b..bfc42c0 100644
--- a/gcc/diagnostics/output-spec.h
+++ b/gcc/diagnostics/output-spec.h
@@ -27,12 +27,71 @@ along with GCC; see the file COPYING3. If not see
namespace diagnostics {
namespace output_spec {
+class context;
+
+/* An abstract base class for schemes, and for client-specific keys. */
+
+class key_handler
+{
+public:
+ enum class result
+ {
+ ok,
+ unrecognized,
+ malformed_value
+ };
+
+ /* Attempt to decode KEY and VALUE, storing the decoded value. */
+ virtual enum result
+ maybe_handle_kv (const context &ctxt,
+ const std::string &key,
+ const std::string &value) = 0;
+
+ virtual void
+ get_keys (auto_vec<const char *> &out) const = 0;
+
+ enum result
+ parse_bool_value (const context &ctxt,
+ const std::string &key,
+ const std::string &value,
+ bool &out) const;
+
+ template <typename EnumType, size_t NumValues>
+ enum result
+ parse_enum_value (const context &ctxt,
+ const std::string &key,
+ const std::string &value,
+ const std::array<std::pair<const char *, EnumType>,
+ NumValues> &value_names,
+ EnumType &out) const;
+};
+
+/* Abstract subclass for handling particular schemes and their keys. */
+
+class scheme_handler : public key_handler
+{
+public:
+ scheme_handler (std::string scheme_name)
+ : m_scheme_name (std::move (scheme_name))
+ {}
+ virtual ~scheme_handler () {}
+
+ const std::string &get_scheme_name () const { return m_scheme_name; }
+
+ virtual std::unique_ptr<sink>
+ make_sink (const context &ctxt,
+ diagnostics::context &dc) = 0;
+
+private:
+ const std::string m_scheme_name;
+};
+
/* An abstract base class for handling the DSL of -fdiagnostics-add-output=
and -fdiagnostics-set-output=. */
class context
{
- public:
+public:
std::unique_ptr<sink>
parse_and_make_sink (diagnostics::context &dc);
@@ -42,8 +101,7 @@ class context
void
report_unknown_key (const std::string &key,
- const std::string &scheme_name,
- auto_vec<const char *> &known_keys) const;
+ const scheme_handler &scheme) const;
void
report_missing_key (const std::string &key,
@@ -70,12 +128,19 @@ class context
virtual const char *
get_base_filename () const = 0;
+ bool
+ handle_kv (const std::string &key,
+ const std::string &value,
+ scheme_handler &scheme) const;
+
protected:
context (const char *option_name,
const char *unparsed_spec,
+ key_handler *client_keys,
line_maps *affected_location_mgr)
: m_option_name (option_name),
m_unparsed_spec (unparsed_spec),
+ m_client_keys (client_keys),
m_affected_location_mgr (affected_location_mgr)
{
}
@@ -86,6 +151,9 @@ protected:
// e.g. "scheme:foo=bar,key=value"
const char *m_unparsed_spec;
+ // Optional borrowed ptr to client-specific keys
+ key_handler *m_client_keys;
+
line_maps *m_affected_location_mgr;
};
@@ -94,13 +162,17 @@ protected:
struct dc_spec_context : public output_spec::context
{
public:
- dc_spec_context (diagnostics::context &dc,
+ dc_spec_context (const char *option_name,
+ const char *unparsed_spec,
+ key_handler *client_keys,
line_maps *affected_location_mgr,
+ diagnostics::context &dc,
line_maps *control_location_mgr,
- location_t loc,
- const char *option_name,
- const char *unparsed_spec)
- : context (option_name, unparsed_spec, affected_location_mgr),
+ location_t loc)
+ : context (option_name,
+ unparsed_spec,
+ client_keys,
+ affected_location_mgr),
m_dc (dc),
m_control_location_mgr (control_location_mgr),
m_loc (loc)
diff --git a/gcc/doc/passes.texi b/gcc/doc/passes.texi
index 282fc1a..f6db15d 100644
--- a/gcc/doc/passes.texi
+++ b/gcc/doc/passes.texi
@@ -735,12 +735,6 @@ cannot be used for branch prediction (though adapting it would
not be difficult). The pass is located in @file{tree-vrp.cc} and is
described by @code{pass_vrp}.
-@item Folding built-in functions
-
-This pass simplifies built-in functions, as applicable, with constant
-arguments or with inferable string lengths. It is located in
-@file{tree-ssa-ccp.cc} and is described by @code{pass_fold_builtins}.
-
@item Split critical edges
This pass identifies critical edges and inserts empty basic blocks
diff --git a/gcc/fortran/decl.cc b/gcc/fortran/decl.cc
index f00f0e1..3761b65 100644
--- a/gcc/fortran/decl.cc
+++ b/gcc/fortran/decl.cc
@@ -4038,7 +4038,15 @@ gfc_get_pdt_instance (gfc_actual_arglist *param_list, gfc_symbol **sym,
}
kind_value = 0;
- gfc_extract_int (kind_expr, &kind_value);
+ /* This can come about during the parsing of nested pdt_templates. An
+ error arises because the KIND parameter expression has not been
+ provided. Use the template instead of an incorrect instance. */
+ if (gfc_extract_int (kind_expr, &kind_value))
+ {
+ gfc_free_actual_arglist (type_param_spec_list);
+ return MATCH_YES;
+ }
+
sprintf (name + strlen (name), "_%d", kind_value);
if (!name_seen && actual_param)
diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc
index 37ca085..2f64de2 100644
--- a/gcc/gimple-fold.cc
+++ b/gcc/gimple-fold.cc
@@ -5252,6 +5252,127 @@ gimple_fold_builtin_assume_aligned (gimple_stmt_iterator *gsi)
return true;
}
+/* If va_list type is a simple pointer and nothing special is needed,
+ optimize __builtin_va_start (&ap, 0) into ap = __builtin_next_arg (0),
+ __builtin_va_end (&ap) out as NOP and __builtin_va_copy into a simple
+ pointer assignment. Returns true if a change happened. */
+
+static bool
+gimple_fold_builtin_stdarg (gimple_stmt_iterator *gsi, gcall *call)
+{
+ /* These shouldn't be folded before pass_stdarg. */
+ if (!(cfun->curr_properties & PROP_last_full_fold))
+ return false;
+
+ tree callee, lhs, rhs, cfun_va_list;
+ bool va_list_simple_ptr;
+ location_t loc = gimple_location (call);
+ gimple *nstmt0, *nstmt;
+ tree tlhs, oldvdef, newvdef;
+
+ callee = gimple_call_fndecl (call);
+
+ cfun_va_list = targetm.fn_abi_va_list (callee);
+ va_list_simple_ptr = POINTER_TYPE_P (cfun_va_list)
+ && (TREE_TYPE (cfun_va_list) == void_type_node
+ || TREE_TYPE (cfun_va_list) == char_type_node);
+
+ switch (DECL_FUNCTION_CODE (callee))
+ {
+ case BUILT_IN_VA_START:
+ if (!va_list_simple_ptr
+ || targetm.expand_builtin_va_start != NULL
+ || !builtin_decl_explicit_p (BUILT_IN_NEXT_ARG))
+ return false;
+
+ if (gimple_call_num_args (call) != 2)
+ return false;
+
+ lhs = gimple_call_arg (call, 0);
+ if (!POINTER_TYPE_P (TREE_TYPE (lhs))
+ || TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (lhs)))
+ != TYPE_MAIN_VARIANT (cfun_va_list))
+ return false;
+ /* Create `tlhs = __builtin_next_arg(0);`. */
+ tlhs = make_ssa_name (cfun_va_list);
+ nstmt0 = gimple_build_call (builtin_decl_explicit (BUILT_IN_NEXT_ARG), 1, integer_zero_node);
+ lhs = fold_build2 (MEM_REF, cfun_va_list, lhs, build_zero_cst (TREE_TYPE (lhs)));
+ gimple_call_set_lhs (nstmt0, tlhs);
+ gimple_set_location (nstmt0, loc);
+ gimple_move_vops (nstmt0, call);
+ gsi_replace (gsi, nstmt0, false);
+ oldvdef = gimple_vdef (nstmt0);
+ newvdef = make_ssa_name (gimple_vop (cfun), nstmt0);
+ gimple_set_vdef (nstmt0, newvdef);
+
+ /* Create `*lhs = tlhs;`. */
+ nstmt = gimple_build_assign (lhs, tlhs);
+ gimple_set_location (nstmt, loc);
+ gimple_set_vuse (nstmt, newvdef);
+ gimple_set_vdef (nstmt, oldvdef);
+ SSA_NAME_DEF_STMT (oldvdef) = nstmt;
+ gsi_insert_after (gsi, nstmt, GSI_NEW_STMT);
+
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "Simplified\n ");
+ print_gimple_stmt (dump_file, call, 0, dump_flags);
+ fprintf (dump_file, "into\n ");
+ print_gimple_stmt (dump_file, nstmt0, 0, dump_flags);
+ fprintf (dump_file, " ");
+ print_gimple_stmt (dump_file, nstmt, 0, dump_flags);
+ }
+ return true;
+
+ case BUILT_IN_VA_COPY:
+ if (!va_list_simple_ptr)
+ return false;
+
+ if (gimple_call_num_args (call) != 2)
+ return false;
+
+ lhs = gimple_call_arg (call, 0);
+ if (!POINTER_TYPE_P (TREE_TYPE (lhs))
+ || TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (lhs)))
+ != TYPE_MAIN_VARIANT (cfun_va_list))
+ return false;
+ rhs = gimple_call_arg (call, 1);
+ if (TYPE_MAIN_VARIANT (TREE_TYPE (rhs))
+ != TYPE_MAIN_VARIANT (cfun_va_list))
+ return false;
+
+ lhs = fold_build2 (MEM_REF, cfun_va_list, lhs, build_zero_cst (TREE_TYPE (lhs)));
+ nstmt = gimple_build_assign (lhs, rhs);
+ gimple_set_location (nstmt, loc);
+ gimple_move_vops (nstmt, call);
+ gsi_replace (gsi, nstmt, false);
+
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "Simplified\n ");
+ print_gimple_stmt (dump_file, call, 0, dump_flags);
+ fprintf (dump_file, "into\n ");
+ print_gimple_stmt (dump_file, nstmt, 0, dump_flags);
+ }
+ return true;
+
+ case BUILT_IN_VA_END:
+ /* No effect, so the statement will be deleted. */
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "Removed\n ");
+ print_gimple_stmt (dump_file, call, 0, dump_flags);
+ }
+ unlink_stmt_vdef (call);
+ release_defs (call);
+ gsi_replace (gsi, gimple_build_nop (), true);
+ return true;
+
+ default:
+ gcc_unreachable ();
+ }
+}
+
/* Fold the non-target builtin at *GSI and return whether any simplification
was made. */
@@ -5270,6 +5391,10 @@ gimple_fold_builtin (gimple_stmt_iterator *gsi)
enum built_in_function fcode = DECL_FUNCTION_CODE (callee);
switch (fcode)
{
+ case BUILT_IN_VA_START:
+ case BUILT_IN_VA_END:
+ case BUILT_IN_VA_COPY:
+ return gimple_fold_builtin_stdarg (gsi, stmt);
case BUILT_IN_BCMP:
return gimple_fold_builtin_bcmp (gsi);
case BUILT_IN_BCOPY:
@@ -5886,6 +6011,12 @@ gimple_fold_call (gimple_stmt_iterator *gsi, bool inplace)
tree overflow = NULL_TREE;
switch (gimple_call_internal_fn (stmt))
{
+ case IFN_ASSUME:
+ /* Remove .ASSUME calls during the last fold since it is no
+ longer needed. */
+ if (cfun->curr_properties & PROP_last_full_fold)
+ replace_call_with_value (gsi, NULL_TREE);
+ break;
case IFN_BUILTIN_EXPECT:
result = fold_builtin_expect (gimple_location (stmt),
gimple_call_arg (stmt, 0),
diff --git a/gcc/gimple-isel.cc b/gcc/gimple-isel.cc
index 0d2efcb..b5dc579 100644
--- a/gcc/gimple-isel.cc
+++ b/gcc/gimple-isel.cc
@@ -39,6 +39,7 @@ along with GCC; see the file COPYING3. If not see
#include "optabs.h"
#include "gimple-fold.h"
#include "internal-fn.h"
+#include "fold-const.h"
/* Expand all ARRAY_REF(VIEW_CONVERT_EXPR) gimple assignments into calls to
internal function based on vector type of selected expansion.
@@ -349,6 +350,15 @@ maybe_duplicate_comparison (gassign *stmt, basic_block bb)
}
}
+/* match.pd function to match atomic_bit_test_and pattern which
+ has nop_convert:
+ _1 = __atomic_fetch_or_4 (&v, 1, 0);
+ _2 = (int) _1;
+ _5 = _2 & 1;
+ */
+extern bool gimple_nop_atomic_bit_test_and_p (tree, tree *,
+ tree (*) (tree));
+extern bool gimple_nop_convert (tree, tree*, tree (*) (tree));
namespace {
@@ -382,6 +392,947 @@ public:
}; // class pass_gimple_isel
+
+/* Convert
+ _1 = __atomic_fetch_or_* (ptr_6, 1, _3);
+ _7 = ~_1;
+ _5 = (_Bool) _7;
+ to
+ _1 = __atomic_fetch_or_* (ptr_6, 1, _3);
+ _8 = _1 & 1;
+ _5 = _8 == 0;
+ and convert
+ _1 = __atomic_fetch_and_* (ptr_6, ~1, _3);
+ _7 = ~_1;
+ _4 = (_Bool) _7;
+ to
+ _1 = __atomic_fetch_and_* (ptr_6, ~1, _3);
+ _8 = _1 & 1;
+ _4 = (_Bool) _8;
+
+ USE_STMT is the gimplt statement which uses the return value of
+ __atomic_fetch_or_*. LHS is the return value of __atomic_fetch_or_*.
+ MASK is the mask passed to __atomic_fetch_or_*.
+ */
+
+static gimple *
+convert_atomic_bit_not (enum internal_fn fn, gimple *use_stmt,
+ tree lhs, tree mask)
+{
+ tree and_mask;
+ if (fn == IFN_ATOMIC_BIT_TEST_AND_RESET)
+ {
+ /* MASK must be ~1. */
+ if (!operand_equal_p (build_int_cst (TREE_TYPE (lhs),
+ ~HOST_WIDE_INT_1), mask, 0))
+ return nullptr;
+ and_mask = build_int_cst (TREE_TYPE (lhs), 1);
+ }
+ else
+ {
+ /* MASK must be 1. */
+ if (!operand_equal_p (build_int_cst (TREE_TYPE (lhs), 1), mask, 0))
+ return nullptr;
+ and_mask = mask;
+ }
+
+ tree use_lhs = gimple_assign_lhs (use_stmt);
+
+ use_operand_p use_p;
+ gimple *use_not_stmt;
+
+ if (!single_imm_use (use_lhs, &use_p, &use_not_stmt)
+ || !is_gimple_assign (use_not_stmt))
+ return nullptr;
+
+ if (!CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (use_not_stmt)))
+ return nullptr;
+
+ tree use_not_lhs = gimple_assign_lhs (use_not_stmt);
+ if (TREE_CODE (TREE_TYPE (use_not_lhs)) != BOOLEAN_TYPE)
+ return nullptr;
+
+ gimple_stmt_iterator gsi;
+ tree var = make_ssa_name (TREE_TYPE (lhs));
+ /* use_stmt need to be removed after use_nop_stmt,
+ so use_lhs can be released. */
+ gimple *use_stmt_removal = use_stmt;
+ use_stmt = gimple_build_assign (var, BIT_AND_EXPR, lhs, and_mask);
+ gsi = gsi_for_stmt (use_not_stmt);
+ gsi_insert_before (&gsi, use_stmt, GSI_NEW_STMT);
+ lhs = gimple_assign_lhs (use_not_stmt);
+ gimple *g = gimple_build_assign (lhs, EQ_EXPR, var,
+ build_zero_cst (TREE_TYPE (mask)));
+ gsi_insert_after (&gsi, g, GSI_NEW_STMT);
+ gsi = gsi_for_stmt (use_not_stmt);
+ gsi_remove (&gsi, true);
+ gsi = gsi_for_stmt (use_stmt_removal);
+ gsi_remove (&gsi, true);
+ return use_stmt;
+}
+
+/* Optimize
+ mask_2 = 1 << cnt_1;
+ _4 = __atomic_fetch_or_* (ptr_6, mask_2, _3);
+ _5 = _4 & mask_2;
+ to
+ _4 = .ATOMIC_BIT_TEST_AND_SET (ptr_6, cnt_1, 0, _3);
+ _5 = _4;
+ If _5 is only used in _5 != 0 or _5 == 0 comparisons, 1
+ is passed instead of 0, and the builtin just returns a zero
+ or 1 value instead of the actual bit.
+ Similarly for __sync_fetch_and_or_* (without the ", _3" part
+ in there), and/or if mask_2 is a power of 2 constant.
+ Similarly for xor instead of or, use ATOMIC_BIT_TEST_AND_COMPLEMENT
+ in that case. And similarly for and instead of or, except that
+ the second argument to the builtin needs to be one's complement
+ of the mask instead of mask. */
+
+static bool
+optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip,
+ enum internal_fn fn, bool has_model_arg,
+ bool after)
+{
+ gimple *call = gsi_stmt (*gsip);
+ tree lhs = gimple_call_lhs (call);
+ use_operand_p use_p;
+ gimple *use_stmt;
+ tree mask;
+ optab optab;
+
+ if (!flag_inline_atomics
+ || optimize_debug
+ || !gimple_call_builtin_p (call, BUILT_IN_NORMAL)
+ || !lhs
+ || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)
+ || !single_imm_use (lhs, &use_p, &use_stmt)
+ || !is_gimple_assign (use_stmt)
+ || !gimple_vdef (call))
+ return false;
+
+ switch (fn)
+ {
+ case IFN_ATOMIC_BIT_TEST_AND_SET:
+ optab = atomic_bit_test_and_set_optab;
+ break;
+ case IFN_ATOMIC_BIT_TEST_AND_COMPLEMENT:
+ optab = atomic_bit_test_and_complement_optab;
+ break;
+ case IFN_ATOMIC_BIT_TEST_AND_RESET:
+ optab = atomic_bit_test_and_reset_optab;
+ break;
+ default:
+ return false;
+ }
+
+ tree bit = nullptr;
+
+ mask = gimple_call_arg (call, 1);
+ tree_code rhs_code = gimple_assign_rhs_code (use_stmt);
+ if (rhs_code != BIT_AND_EXPR)
+ {
+ if (rhs_code != NOP_EXPR && rhs_code != BIT_NOT_EXPR)
+ return false;
+
+ tree use_lhs = gimple_assign_lhs (use_stmt);
+ if (TREE_CODE (use_lhs) == SSA_NAME
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (use_lhs))
+ return false;
+
+ tree use_rhs = gimple_assign_rhs1 (use_stmt);
+ if (lhs != use_rhs)
+ return false;
+
+ if (optab_handler (optab, TYPE_MODE (TREE_TYPE (lhs)))
+ == CODE_FOR_nothing)
+ return false;
+
+ gimple *g;
+ gimple_stmt_iterator gsi;
+ tree var;
+ int ibit = -1;
+
+ if (rhs_code == BIT_NOT_EXPR)
+ {
+ g = convert_atomic_bit_not (fn, use_stmt, lhs, mask);
+ if (!g)
+ return false;
+ use_stmt = g;
+ ibit = 0;
+ }
+ else if (TREE_CODE (TREE_TYPE (use_lhs)) == BOOLEAN_TYPE)
+ {
+ tree and_mask;
+ if (fn == IFN_ATOMIC_BIT_TEST_AND_RESET)
+ {
+ /* MASK must be ~1. */
+ if (!operand_equal_p (build_int_cst (TREE_TYPE (lhs),
+ ~HOST_WIDE_INT_1),
+ mask, 0))
+ return false;
+
+ /* Convert
+ _1 = __atomic_fetch_and_* (ptr_6, ~1, _3);
+ _4 = (_Bool) _1;
+ to
+ _1 = __atomic_fetch_and_* (ptr_6, ~1, _3);
+ _5 = _1 & 1;
+ _4 = (_Bool) _5;
+ */
+ and_mask = build_int_cst (TREE_TYPE (lhs), 1);
+ }
+ else
+ {
+ and_mask = build_int_cst (TREE_TYPE (lhs), 1);
+ if (!operand_equal_p (and_mask, mask, 0))
+ return false;
+
+ /* Convert
+ _1 = __atomic_fetch_or_* (ptr_6, 1, _3);
+ _4 = (_Bool) _1;
+ to
+ _1 = __atomic_fetch_or_* (ptr_6, 1, _3);
+ _5 = _1 & 1;
+ _4 = (_Bool) _5;
+ */
+ }
+ var = make_ssa_name (TREE_TYPE (use_rhs));
+ replace_uses_by (use_rhs, var);
+ g = gimple_build_assign (var, BIT_AND_EXPR, use_rhs,
+ and_mask);
+ gsi = gsi_for_stmt (use_stmt);
+ gsi_insert_before (&gsi, g, GSI_NEW_STMT);
+ use_stmt = g;
+ ibit = 0;
+ }
+ else if (TYPE_PRECISION (TREE_TYPE (use_lhs))
+ <= TYPE_PRECISION (TREE_TYPE (use_rhs)))
+ {
+ gimple *use_nop_stmt;
+ if (!single_imm_use (use_lhs, &use_p, &use_nop_stmt)
+ || (!is_gimple_assign (use_nop_stmt)
+ && gimple_code (use_nop_stmt) != GIMPLE_COND))
+ return false;
+ /* Handle both
+ _4 = _5 < 0;
+ and
+ if (_5 < 0)
+ */
+ tree use_nop_lhs = nullptr;
+ rhs_code = ERROR_MARK;
+ if (is_gimple_assign (use_nop_stmt))
+ {
+ use_nop_lhs = gimple_assign_lhs (use_nop_stmt);
+ rhs_code = gimple_assign_rhs_code (use_nop_stmt);
+ }
+ if (!use_nop_lhs || rhs_code != BIT_AND_EXPR)
+ {
+ /* Also handle
+ if (_5 < 0)
+ */
+ if (use_nop_lhs
+ && TREE_CODE (use_nop_lhs) == SSA_NAME
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (use_nop_lhs))
+ return false;
+ if (use_nop_lhs && rhs_code == BIT_NOT_EXPR)
+ {
+ /* Handle
+ _7 = ~_2;
+ */
+ g = convert_atomic_bit_not (fn, use_nop_stmt, lhs,
+ mask);
+ if (!g)
+ return false;
+ /* Convert
+ _1 = __atomic_fetch_or_4 (ptr_6, 1, _3);
+ _2 = (int) _1;
+ _7 = ~_2;
+ _5 = (_Bool) _7;
+ to
+ _1 = __atomic_fetch_or_4 (ptr_6, ~1, _3);
+ _8 = _1 & 1;
+ _5 = _8 == 0;
+ and convert
+ _1 = __atomic_fetch_and_4 (ptr_6, ~1, _3);
+ _2 = (int) _1;
+ _7 = ~_2;
+ _5 = (_Bool) _7;
+ to
+ _1 = __atomic_fetch_and_4 (ptr_6, 1, _3);
+ _8 = _1 & 1;
+ _5 = _8 == 0;
+ */
+ gsi = gsi_for_stmt (use_stmt);
+ gsi_remove (&gsi, true);
+ use_stmt = g;
+ ibit = 0;
+ }
+ else
+ {
+ tree cmp_rhs1, cmp_rhs2;
+ if (use_nop_lhs)
+ {
+ /* Handle
+ _4 = _5 < 0;
+ */
+ if (TREE_CODE (TREE_TYPE (use_nop_lhs))
+ != BOOLEAN_TYPE)
+ return false;
+ cmp_rhs1 = gimple_assign_rhs1 (use_nop_stmt);
+ cmp_rhs2 = gimple_assign_rhs2 (use_nop_stmt);
+ }
+ else
+ {
+ /* Handle
+ if (_5 < 0)
+ */
+ rhs_code = gimple_cond_code (use_nop_stmt);
+ cmp_rhs1 = gimple_cond_lhs (use_nop_stmt);
+ cmp_rhs2 = gimple_cond_rhs (use_nop_stmt);
+ }
+ if (rhs_code != GE_EXPR && rhs_code != LT_EXPR)
+ return false;
+ if (use_lhs != cmp_rhs1)
+ return false;
+ if (!integer_zerop (cmp_rhs2))
+ return false;
+
+ tree and_mask;
+
+ unsigned HOST_WIDE_INT bytes
+ = tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (use_rhs)));
+ ibit = bytes * BITS_PER_UNIT - 1;
+ unsigned HOST_WIDE_INT highest
+ = HOST_WIDE_INT_1U << ibit;
+
+ if (fn == IFN_ATOMIC_BIT_TEST_AND_RESET)
+ {
+ /* Get the signed maximum of the USE_RHS type. */
+ and_mask = build_int_cst (TREE_TYPE (use_rhs),
+ highest - 1);
+ if (!operand_equal_p (and_mask, mask, 0))
+ return false;
+
+ /* Convert
+ _1 = __atomic_fetch_and_4 (ptr_6, 0x7fffffff, _3);
+ _5 = (signed int) _1;
+ _4 = _5 < 0 or _5 >= 0;
+ to
+ _1 = __atomic_fetch_and_4 (ptr_6, 0x7fffffff, _3);
+ _6 = _1 & 0x80000000;
+ _4 = _6 != 0 or _6 == 0;
+ and convert
+ _1 = __atomic_fetch_and_4 (ptr_6, 0x7fffffff, _3);
+ _5 = (signed int) _1;
+ if (_5 < 0 or _5 >= 0)
+ to
+ _1 = __atomic_fetch_and_4 (ptr_6, 0x7fffffff, _3);
+ _6 = _1 & 0x80000000;
+ if (_6 != 0 or _6 == 0)
+ */
+ and_mask = build_int_cst (TREE_TYPE (use_rhs),
+ highest);
+ }
+ else
+ {
+ /* Get the signed minimum of the USE_RHS type. */
+ and_mask = build_int_cst (TREE_TYPE (use_rhs),
+ highest);
+ if (!operand_equal_p (and_mask, mask, 0))
+ return false;
+
+ /* Convert
+ _1 = __atomic_fetch_or_4 (ptr_6, 0x80000000, _3);
+ _5 = (signed int) _1;
+ _4 = _5 < 0 or _5 >= 0;
+ to
+ _1 = __atomic_fetch_or_4 (ptr_6, 0x80000000, _3);
+ _6 = _1 & 0x80000000;
+ _4 = _6 != 0 or _6 == 0;
+ and convert
+ _1 = __atomic_fetch_or_4 (ptr_6, 0x80000000, _3);
+ _5 = (signed int) _1;
+ if (_5 < 0 or _5 >= 0)
+ to
+ _1 = __atomic_fetch_or_4 (ptr_6, 0x80000000, _3);
+ _6 = _1 & 0x80000000;
+ if (_6 != 0 or _6 == 0)
+ */
+ }
+ var = make_ssa_name (TREE_TYPE (use_rhs));
+ gimple* use_stmt_removal = use_stmt;
+ g = gimple_build_assign (var, BIT_AND_EXPR, use_rhs,
+ and_mask);
+ gsi = gsi_for_stmt (use_nop_stmt);
+ gsi_insert_before (&gsi, g, GSI_NEW_STMT);
+ use_stmt = g;
+ rhs_code = rhs_code == GE_EXPR ? EQ_EXPR : NE_EXPR;
+ tree const_zero = build_zero_cst (TREE_TYPE (use_rhs));
+ if (use_nop_lhs)
+ g = gimple_build_assign (use_nop_lhs, rhs_code,
+ var, const_zero);
+ else
+ g = gimple_build_cond (rhs_code, var, const_zero,
+ nullptr, nullptr);
+ gsi_insert_after (&gsi, g, GSI_NEW_STMT);
+ gsi = gsi_for_stmt (use_nop_stmt);
+ gsi_remove (&gsi, true);
+ gsi = gsi_for_stmt (use_stmt_removal);
+ gsi_remove (&gsi, true);
+ }
+ }
+ else
+ {
+ tree match_op[3];
+ gimple *g;
+ if (!gimple_nop_atomic_bit_test_and_p (use_nop_lhs,
+ &match_op[0], NULL)
+ || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (match_op[2])
+ || !single_imm_use (match_op[2], &use_p, &g)
+ || !is_gimple_assign (g))
+ return false;
+ mask = match_op[0];
+ if (TREE_CODE (match_op[1]) == INTEGER_CST)
+ {
+ ibit = tree_log2 (match_op[1]);
+ gcc_assert (ibit >= 0);
+ }
+ else
+ {
+ g = SSA_NAME_DEF_STMT (match_op[1]);
+ gcc_assert (is_gimple_assign (g));
+ bit = gimple_assign_rhs2 (g);
+ }
+ /* Convert
+ _1 = __atomic_fetch_or_4 (ptr_6, mask, _3);
+ _2 = (int) _1;
+ _5 = _2 & mask;
+ to
+ _1 = __atomic_fetch_or_4 (ptr_6, mask, _3);
+ _6 = _1 & mask;
+ _5 = (int) _6;
+ and convert
+ _1 = ~mask_7;
+ _2 = (unsigned int) _1;
+ _3 = __atomic_fetch_and_4 (ptr_6, _2, 0);
+ _4 = (int) _3;
+ _5 = _4 & mask_7;
+ to
+ _1 = __atomic_fetch_and_* (ptr_6, ~mask_7, _3);
+ _12 = _3 & mask_7;
+ _5 = (int) _12;
+
+ and Convert
+ _1 = __atomic_fetch_and_4 (ptr_6, ~mask, _3);
+ _2 = (short int) _1;
+ _5 = _2 & mask;
+ to
+ _1 = __atomic_fetch_and_4 (ptr_6, ~mask, _3);
+ _8 = _1 & mask;
+ _5 = (short int) _8;
+ */
+ gimple_seq stmts = NULL;
+ match_op[1] = gimple_convert (&stmts,
+ TREE_TYPE (use_rhs),
+ match_op[1]);
+ var = gimple_build (&stmts, BIT_AND_EXPR,
+ TREE_TYPE (use_rhs), use_rhs, match_op[1]);
+ gsi = gsi_for_stmt (use_stmt);
+ gsi_remove (&gsi, true);
+ release_defs (use_stmt);
+ use_stmt = gimple_seq_last_stmt (stmts);
+ gsi = gsi_for_stmt (use_nop_stmt);
+ gsi_insert_seq_before (&gsi, stmts, GSI_SAME_STMT);
+ gimple_assign_set_rhs_with_ops (&gsi, CONVERT_EXPR, var);
+ update_stmt (use_nop_stmt);
+ }
+ }
+ else
+ return false;
+
+ if (!bit)
+ {
+ if (ibit < 0)
+ gcc_unreachable ();
+ bit = build_int_cst (TREE_TYPE (lhs), ibit);
+ }
+ }
+ else if (optab_handler (optab, TYPE_MODE (TREE_TYPE (lhs)))
+ == CODE_FOR_nothing)
+ return false;
+
+ tree use_lhs = gimple_assign_lhs (use_stmt);
+ if (!use_lhs)
+ return false;
+
+ if (!bit)
+ {
+ if (TREE_CODE (mask) == INTEGER_CST)
+ {
+ if (fn == IFN_ATOMIC_BIT_TEST_AND_RESET)
+ mask = const_unop (BIT_NOT_EXPR, TREE_TYPE (mask), mask);
+ mask = fold_convert (TREE_TYPE (lhs), mask);
+ int ibit = tree_log2 (mask);
+ if (ibit < 0)
+ return false;
+ bit = build_int_cst (TREE_TYPE (lhs), ibit);
+ }
+ else if (TREE_CODE (mask) == SSA_NAME)
+ {
+ gimple *g = SSA_NAME_DEF_STMT (mask);
+ tree match_op;
+ if (gimple_nop_convert (mask, &match_op, NULL))
+ {
+ mask = match_op;
+ if (TREE_CODE (mask) != SSA_NAME)
+ return false;
+ g = SSA_NAME_DEF_STMT (mask);
+ }
+ if (!is_gimple_assign (g))
+ return false;
+
+ if (fn == IFN_ATOMIC_BIT_TEST_AND_RESET)
+ {
+ if (gimple_assign_rhs_code (g) != BIT_NOT_EXPR)
+ return false;
+ mask = gimple_assign_rhs1 (g);
+ if (TREE_CODE (mask) != SSA_NAME)
+ return false;
+ g = SSA_NAME_DEF_STMT (mask);
+ }
+
+ if (!is_gimple_assign (g)
+ || gimple_assign_rhs_code (g) != LSHIFT_EXPR
+ || !integer_onep (gimple_assign_rhs1 (g)))
+ return false;
+ bit = gimple_assign_rhs2 (g);
+ }
+ else
+ return false;
+
+ tree cmp_mask;
+ if (gimple_assign_rhs1 (use_stmt) == lhs)
+ cmp_mask = gimple_assign_rhs2 (use_stmt);
+ else
+ cmp_mask = gimple_assign_rhs1 (use_stmt);
+
+ tree match_op;
+ if (gimple_nop_convert (cmp_mask, &match_op, NULL))
+ cmp_mask = match_op;
+
+ if (!operand_equal_p (cmp_mask, mask, 0))
+ return false;
+ }
+
+ bool use_bool = true;
+ bool has_debug_uses = false;
+ imm_use_iterator iter;
+ gimple *g;
+
+ if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (use_lhs))
+ use_bool = false;
+ FOR_EACH_IMM_USE_STMT (g, iter, use_lhs)
+ {
+ enum tree_code code = ERROR_MARK;
+ tree op0 = NULL_TREE, op1 = NULL_TREE;
+ if (is_gimple_debug (g))
+ {
+ has_debug_uses = true;
+ continue;
+ }
+ else if (is_gimple_assign (g))
+ switch (gimple_assign_rhs_code (g))
+ {
+ case COND_EXPR:
+ op1 = gimple_assign_rhs1 (g);
+ code = TREE_CODE (op1);
+ if (TREE_CODE_CLASS (code) != tcc_comparison)
+ break;
+ op0 = TREE_OPERAND (op1, 0);
+ op1 = TREE_OPERAND (op1, 1);
+ break;
+ case EQ_EXPR:
+ case NE_EXPR:
+ code = gimple_assign_rhs_code (g);
+ op0 = gimple_assign_rhs1 (g);
+ op1 = gimple_assign_rhs2 (g);
+ break;
+ default:
+ break;
+ }
+ else if (gimple_code (g) == GIMPLE_COND)
+ {
+ code = gimple_cond_code (g);
+ op0 = gimple_cond_lhs (g);
+ op1 = gimple_cond_rhs (g);
+ }
+
+ if ((code == EQ_EXPR || code == NE_EXPR)
+ && op0 == use_lhs
+ && integer_zerop (op1))
+ {
+ use_operand_p use_p;
+ int n = 0;
+ FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
+ n++;
+ if (n == 1)
+ continue;
+ }
+
+ use_bool = false;
+ break;
+ }
+
+ tree new_lhs = make_ssa_name (TREE_TYPE (lhs));
+ tree flag = build_int_cst (TREE_TYPE (lhs), use_bool);
+ if (has_model_arg)
+ g = gimple_build_call_internal (fn, 5, gimple_call_arg (call, 0),
+ bit, flag, gimple_call_arg (call, 2),
+ gimple_call_fn (call));
+ else
+ g = gimple_build_call_internal (fn, 4, gimple_call_arg (call, 0),
+ bit, flag, gimple_call_fn (call));
+ gimple_call_set_lhs (g, new_lhs);
+ gimple_set_location (g, gimple_location (call));
+ gimple_move_vops (g, call);
+ bool throws = stmt_can_throw_internal (cfun, call);
+ gimple_call_set_nothrow (as_a <gcall *> (g),
+ gimple_call_nothrow_p (as_a <gcall *> (call)));
+ gimple_stmt_iterator gsi = *gsip;
+ gsi_insert_after (&gsi, g, GSI_NEW_STMT);
+ edge e = NULL;
+ if (throws)
+ {
+ maybe_clean_or_replace_eh_stmt (call, g);
+ if (after || (use_bool && has_debug_uses))
+ e = find_fallthru_edge (gsi_bb (gsi)->succs);
+ }
+ if (after)
+ {
+ /* The internal function returns the value of the specified bit
+ before the atomic operation. If we are interested in the value
+ of the specified bit after the atomic operation (makes only sense
+ for xor, otherwise the bit content is compile time known),
+ we need to invert the bit. */
+ tree mask_convert = mask;
+ gimple_seq stmts = NULL;
+ if (!use_bool)
+ mask_convert = gimple_convert (&stmts, TREE_TYPE (lhs), mask);
+ new_lhs = gimple_build (&stmts, BIT_XOR_EXPR, TREE_TYPE (lhs), new_lhs,
+ use_bool ? build_int_cst (TREE_TYPE (lhs), 1)
+ : mask_convert);
+ if (throws)
+ {
+ gsi_insert_seq_on_edge_immediate (e, stmts);
+ gsi = gsi_for_stmt (gimple_seq_last (stmts));
+ }
+ else
+ gsi_insert_seq_after (&gsi, stmts, GSI_NEW_STMT);
+ }
+ if (use_bool && has_debug_uses)
+ {
+ tree temp = NULL_TREE;
+ if (!throws || after || single_pred_p (e->dest))
+ {
+ temp = build_debug_expr_decl (TREE_TYPE (lhs));
+ tree t = build2 (LSHIFT_EXPR, TREE_TYPE (lhs), new_lhs, bit);
+ g = gimple_build_debug_bind (temp, t, g);
+ if (throws && !after)
+ {
+ gsi = gsi_after_labels (e->dest);
+ gsi_insert_before (&gsi, g, GSI_SAME_STMT);
+ }
+ else
+ gsi_insert_after (&gsi, g, GSI_NEW_STMT);
+ }
+ FOR_EACH_IMM_USE_STMT (g, iter, use_lhs)
+ if (is_gimple_debug (g))
+ {
+ use_operand_p use_p;
+ if (temp == NULL_TREE)
+ gimple_debug_bind_reset_value (g);
+ else
+ FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
+ SET_USE (use_p, temp);
+ update_stmt (g);
+ }
+ }
+ SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new_lhs)
+ = SSA_NAME_OCCURS_IN_ABNORMAL_PHI (use_lhs);
+ replace_uses_by (use_lhs, new_lhs);
+ gsi = gsi_for_stmt (use_stmt);
+ gsi_remove (&gsi, true);
+ release_defs (use_stmt);
+ gsi_remove (gsip, true);
+ release_ssa_name (lhs);
+ return true;
+}
+
+/* Optimize
+ _4 = __atomic_add_fetch_* (ptr_6, arg_2, _3);
+ _5 = _4 == 0;
+ to
+ _4 = .ATOMIC_ADD_FETCH_CMP_0 (EQ_EXPR, ptr_6, arg_2, _3);
+ _5 = _4;
+ Similarly for __sync_add_and_fetch_* (without the ", _3" part
+ in there). */
+
+static bool
+optimize_atomic_op_fetch_cmp_0 (gimple_stmt_iterator *gsip,
+ enum internal_fn fn, bool has_model_arg)
+{
+ gimple *call = gsi_stmt (*gsip);
+ tree lhs = gimple_call_lhs (call);
+ use_operand_p use_p;
+ gimple *use_stmt;
+
+ if (!flag_inline_atomics
+ || !gimple_call_builtin_p (call, BUILT_IN_NORMAL)
+ || !lhs
+ || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)
+ || !single_imm_use (lhs, &use_p, &use_stmt)
+ || !gimple_vdef (call))
+ return false;
+
+ optab optab;
+ switch (fn)
+ {
+ case IFN_ATOMIC_ADD_FETCH_CMP_0:
+ optab = atomic_add_fetch_cmp_0_optab;
+ break;
+ case IFN_ATOMIC_SUB_FETCH_CMP_0:
+ optab = atomic_sub_fetch_cmp_0_optab;
+ break;
+ case IFN_ATOMIC_AND_FETCH_CMP_0:
+ optab = atomic_and_fetch_cmp_0_optab;
+ break;
+ case IFN_ATOMIC_OR_FETCH_CMP_0:
+ optab = atomic_or_fetch_cmp_0_optab;
+ break;
+ case IFN_ATOMIC_XOR_FETCH_CMP_0:
+ optab = atomic_xor_fetch_cmp_0_optab;
+ break;
+ default:
+ return false;
+ }
+
+ if (optab_handler (optab, TYPE_MODE (TREE_TYPE (lhs)))
+ == CODE_FOR_nothing)
+ return false;
+
+ tree use_lhs = lhs;
+ if (gimple_assign_cast_p (use_stmt))
+ {
+ use_lhs = gimple_assign_lhs (use_stmt);
+ if (!tree_nop_conversion_p (TREE_TYPE (use_lhs), TREE_TYPE (lhs))
+ || (!INTEGRAL_TYPE_P (TREE_TYPE (use_lhs))
+ && !POINTER_TYPE_P (TREE_TYPE (use_lhs)))
+ || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (use_lhs)
+ || !single_imm_use (use_lhs, &use_p, &use_stmt))
+ return false;
+ }
+ enum tree_code code = ERROR_MARK;
+ tree op0 = NULL_TREE, op1 = NULL_TREE;
+ if (is_gimple_assign (use_stmt))
+ switch (gimple_assign_rhs_code (use_stmt))
+ {
+ case COND_EXPR:
+ op1 = gimple_assign_rhs1 (use_stmt);
+ code = TREE_CODE (op1);
+ if (TREE_CODE_CLASS (code) == tcc_comparison)
+ {
+ op0 = TREE_OPERAND (op1, 0);
+ op1 = TREE_OPERAND (op1, 1);
+ }
+ break;
+ default:
+ code = gimple_assign_rhs_code (use_stmt);
+ if (TREE_CODE_CLASS (code) == tcc_comparison)
+ {
+ op0 = gimple_assign_rhs1 (use_stmt);
+ op1 = gimple_assign_rhs2 (use_stmt);
+ }
+ break;
+ }
+ else if (gimple_code (use_stmt) == GIMPLE_COND)
+ {
+ code = gimple_cond_code (use_stmt);
+ op0 = gimple_cond_lhs (use_stmt);
+ op1 = gimple_cond_rhs (use_stmt);
+ }
+
+ switch (code)
+ {
+ case LT_EXPR:
+ case LE_EXPR:
+ case GT_EXPR:
+ case GE_EXPR:
+ if (!INTEGRAL_TYPE_P (TREE_TYPE (use_lhs))
+ || TREE_CODE (TREE_TYPE (use_lhs)) == BOOLEAN_TYPE
+ || TYPE_UNSIGNED (TREE_TYPE (use_lhs)))
+ return false;
+ /* FALLTHRU */
+ case EQ_EXPR:
+ case NE_EXPR:
+ if (op0 == use_lhs && integer_zerop (op1))
+ break;
+ return false;
+ default:
+ return false;
+ }
+
+ int encoded;
+ switch (code)
+ {
+ /* Use special encoding of the operation. We want to also
+ encode the mode in the first argument and for neither EQ_EXPR
+ etc. nor EQ etc. we can rely it will fit into QImode. */
+ case EQ_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_EQ; break;
+ case NE_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_NE; break;
+ case LT_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_LT; break;
+ case LE_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_LE; break;
+ case GT_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_GT; break;
+ case GE_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_GE; break;
+ default: gcc_unreachable ();
+ }
+
+ tree new_lhs = make_ssa_name (boolean_type_node);
+ gimple *g;
+ tree flag = build_int_cst (TREE_TYPE (lhs), encoded);
+ if (has_model_arg)
+ g = gimple_build_call_internal (fn, 5, flag,
+ gimple_call_arg (call, 0),
+ gimple_call_arg (call, 1),
+ gimple_call_arg (call, 2),
+ gimple_call_fn (call));
+ else
+ g = gimple_build_call_internal (fn, 4, flag,
+ gimple_call_arg (call, 0),
+ gimple_call_arg (call, 1),
+ gimple_call_fn (call));
+ gimple_call_set_lhs (g, new_lhs);
+ gimple_set_location (g, gimple_location (call));
+ gimple_move_vops (g, call);
+ bool throws = stmt_can_throw_internal (cfun, call);
+ gimple_call_set_nothrow (as_a <gcall *> (g),
+ gimple_call_nothrow_p (as_a <gcall *> (call)));
+ gimple_stmt_iterator gsi = *gsip;
+ gsi_insert_after (&gsi, g, GSI_SAME_STMT);
+ if (throws)
+ maybe_clean_or_replace_eh_stmt (call, g);
+ if (is_gimple_assign (use_stmt))
+ switch (gimple_assign_rhs_code (use_stmt))
+ {
+ case COND_EXPR:
+ gimple_assign_set_rhs1 (use_stmt, new_lhs);
+ break;
+ default:
+ gsi = gsi_for_stmt (use_stmt);
+ if (tree ulhs = gimple_assign_lhs (use_stmt))
+ if (useless_type_conversion_p (TREE_TYPE (ulhs),
+ boolean_type_node))
+ {
+ gimple_assign_set_rhs_with_ops (&gsi, SSA_NAME, new_lhs);
+ break;
+ }
+ gimple_assign_set_rhs_with_ops (&gsi, NOP_EXPR, new_lhs);
+ break;
+ }
+ else if (gimple_code (use_stmt) == GIMPLE_COND)
+ {
+ gcond *use_cond = as_a <gcond *> (use_stmt);
+ gimple_cond_set_code (use_cond, NE_EXPR);
+ gimple_cond_set_lhs (use_cond, new_lhs);
+ gimple_cond_set_rhs (use_cond, boolean_false_node);
+ }
+
+ update_stmt (use_stmt);
+ if (use_lhs != lhs)
+ {
+ gsi = gsi_for_stmt (SSA_NAME_DEF_STMT (use_lhs));
+ gsi_remove (&gsi, true);
+ release_ssa_name (use_lhs);
+ }
+ gsi_remove (gsip, true);
+ release_ssa_name (lhs);
+ return true;
+}
+
+/* Process builtin CALL located at GSI.
+ Currently it is only fgr atomic functions optimizations from above. */
+static void
+gimple_isel_builtin_call (gcall *call, gimple_stmt_iterator *gsi)
+{
+ /* Don't handle these in non optimization mode or optimize debug mode. */
+ if (!optimize || optimize_debug)
+ return;
+
+ if (!gimple_call_builtin_p (call, BUILT_IN_NORMAL))
+ return;
+
+ tree callee = gimple_call_fndecl (call);
+
+ switch (DECL_FUNCTION_CODE (callee))
+ {
+#define CASE_ATOMIC(NAME) \
+ case BUILT_IN_##NAME##_1: \
+ case BUILT_IN_##NAME##_2: \
+ case BUILT_IN_##NAME##_4: \
+ case BUILT_IN_##NAME##_8: \
+ case BUILT_IN_##NAME##_16
+#define CASE_ATOMIC_CMP0(ATOMIC, SYNC) \
+ CASE_ATOMIC(ATOMIC_##ATOMIC): \
+ optimize_atomic_op_fetch_cmp_0 (gsi, \
+ IFN_ATOMIC_##ATOMIC##_CMP_0, \
+ true); \
+ break; \
+ CASE_ATOMIC(SYNC_##SYNC): \
+ optimize_atomic_op_fetch_cmp_0 (gsi, \
+ IFN_ATOMIC_##ATOMIC##_CMP_0, \
+ false); \
+ break;
+
+
+ CASE_ATOMIC_CMP0(ADD_FETCH, ADD_AND_FETCH)
+ CASE_ATOMIC_CMP0(SUB_FETCH, SUB_AND_FETCH)
+ CASE_ATOMIC_CMP0(AND_FETCH, AND_AND_FETCH)
+ CASE_ATOMIC_CMP0(OR_FETCH, OR_AND_FETCH)
+#define CASE_ATOMIC_BIT_TEST_AND(ATOMIC, SYNC, FN, AFTER) \
+ CASE_ATOMIC(ATOMIC_##ATOMIC): \
+ optimize_atomic_bit_test_and (gsi, \
+ IFN_ATOMIC_BIT_TEST_AND_##FN, \
+ true, AFTER); \
+ break; \
+ CASE_ATOMIC(SYNC_##SYNC): \
+ optimize_atomic_bit_test_and (gsi, \
+ IFN_ATOMIC_BIT_TEST_AND_##FN, \
+ false, AFTER); \
+ break;
+ CASE_ATOMIC_BIT_TEST_AND(FETCH_OR, FETCH_AND_OR, SET, false)
+ CASE_ATOMIC_BIT_TEST_AND(FETCH_XOR, FETCH_AND_XOR, COMPLEMENT, false)
+ CASE_ATOMIC_BIT_TEST_AND(FETCH_AND, FETCH_AND_AND, RESET, false)
+
+ CASE_ATOMIC(ATOMIC_XOR_FETCH):
+ if (optimize_atomic_bit_test_and
+ (gsi, IFN_ATOMIC_BIT_TEST_AND_COMPLEMENT, true, true))
+ break;
+ optimize_atomic_op_fetch_cmp_0 (gsi,
+ IFN_ATOMIC_XOR_FETCH_CMP_0,
+ true);
+ break;
+ CASE_ATOMIC(SYNC_XOR_AND_FETCH):
+ if (optimize_atomic_bit_test_and
+ (gsi, IFN_ATOMIC_BIT_TEST_AND_COMPLEMENT, false, true))
+ break;
+ optimize_atomic_op_fetch_cmp_0 (gsi,
+ IFN_ATOMIC_XOR_FETCH_CMP_0,
+ false);
+ break;
+
+ default:;
+ }
+}
+
/* Iterate all gimple statements and perform pre RTL expansion
GIMPLE massaging to improve instruction selection. */
@@ -411,6 +1362,11 @@ pass_gimple_isel::execute (struct function *fun)
if (gsi_end_p (gsi))
break;
+ if (gcall *call = dyn_cast <gcall*>(*gsi))
+ {
+ gimple_isel_builtin_call (call, &gsi);
+ continue;
+ }
gassign *stmt = dyn_cast <gassign *> (*gsi);
if (!stmt)
continue;
diff --git a/gcc/libgdiagnostics.cc b/gcc/libgdiagnostics.cc
index 6b269a1..46714ff 100644
--- a/gcc/libgdiagnostics.cc
+++ b/gcc/libgdiagnostics.cc
@@ -2484,7 +2484,8 @@ public:
const char *unparsed_spec,
diagnostic_manager &affected_mgr,
diagnostic_manager &control_mgr)
- : context (option_name, unparsed_spec, affected_mgr.get_line_table ()),
+ : context (option_name, unparsed_spec, nullptr,
+ affected_mgr.get_line_table ()),
m_control_mgr (control_mgr)
{}
diff --git a/gcc/m2/gm2-compiler/M2GCCDeclare.mod b/gcc/m2/gm2-compiler/M2GCCDeclare.mod
index 710976e..24634fd 100644
--- a/gcc/m2/gm2-compiler/M2GCCDeclare.mod
+++ b/gcc/m2/gm2-compiler/M2GCCDeclare.mod
@@ -4447,19 +4447,6 @@ END PrintString ;
(*
- PrintKnown -
-*)
-
-PROCEDURE PrintKnown (sym: CARDINAL) ;
-BEGIN
- IF GccKnowsAbout (sym)
- THEN
- printf0 ("[gcc]")
- END
-END PrintKnown ;
-
-
-(*
PrintVerboseFromList - prints the, i, th element in the list, l.
*)
diff --git a/gcc/m2/gm2-gcc/m2type.cc b/gcc/m2/gm2-gcc/m2type.cc
index 535ab14..184b506 100644
--- a/gcc/m2/gm2-gcc/m2type.cc
+++ b/gcc/m2/gm2-gcc/m2type.cc
@@ -2213,7 +2213,7 @@ gm2_build_enumerator (location_t location, tree name, tree value)
enumvalues, list. It returns a copy of the value. */
tree
-m2type_BuildEnumerator (location_t location, char *name, tree value,
+m2type_BuildEnumerator (location_t location, const char *name, tree value,
tree *enumvalues)
{
tree id = get_identifier (name);
diff --git a/gcc/m2/gm2-gcc/m2type.def b/gcc/m2/gm2-gcc/m2type.def
index 8a72652..6f64c98 100644
--- a/gcc/m2/gm2-gcc/m2type.def
+++ b/gcc/m2/gm2-gcc/m2type.def
@@ -173,7 +173,7 @@ PROCEDURE BuildPointerType (totype: tree) : tree ;
It returns a copy of the value. --fixme-- why do this?
*)
-PROCEDURE BuildEnumerator (location: location_t; name: CharStar; value: tree;
+PROCEDURE BuildEnumerator (location: location_t; name: ConstCharStar; value: tree;
VAR enumvalues: tree) : tree ;
diff --git a/gcc/m2/gm2-gcc/m2type.h b/gcc/m2/gm2-gcc/m2type.h
index afd97f7..68015a0 100644
--- a/gcc/m2/gm2-gcc/m2type.h
+++ b/gcc/m2/gm2-gcc/m2type.h
@@ -183,7 +183,7 @@ EXTERN tree m2type_BuildStartEnumeration (location_t location, char *name,
bool ispacked);
EXTERN tree m2type_BuildEndEnumeration (location_t location, tree enumtype,
tree enumvalues);
-EXTERN tree m2type_BuildEnumerator (location_t location, char *name,
+EXTERN tree m2type_BuildEnumerator (location_t location, const char *name,
tree value, tree *enumvalues);
EXTERN tree m2type_BuildPointerType (tree totype);
EXTERN tree m2type_BuildConstPointerType (tree totype);
diff --git a/gcc/m2/gm2-libs/M2WIDESET.mod b/gcc/m2/gm2-libs/M2WIDESET.mod
index f1b1bed..93df428 100644
--- a/gcc/m2/gm2-libs/M2WIDESET.mod
+++ b/gcc/m2/gm2-libs/M2WIDESET.mod
@@ -490,21 +490,21 @@ PROCEDURE ShiftLeftByteBit (VAR dest: ARRAY OF BYTE; src: ARRAY OF BYTE;
highbit: CARDINAL;
byteshift, bitshift: CARDINAL) ;
VAR
- top, bot, mid : BYTESET ;
- i, h, from, to: CARDINAL ;
+ top, bot, mid : BYTESET ;
+ i, h, fromIdx, toIdx: CARDINAL ;
BEGIN
(* Copy the bytes into dest at the mostly correct position
(modulo byte position). *)
- to := 0 ;
- from := 0 ;
- WHILE to < byteshift DO
- dest[to] := BYTE (0) ;
- INC (to)
+ toIdx := 0 ;
+ fromIdx := 0 ;
+ WHILE toIdx < byteshift DO
+ dest[toIdx] := BYTE (0) ;
+ INC (toIdx)
END ;
- WHILE to <= HIGH (dest) DO
- dest[to] := src[from] ;
- INC (to) ;
- INC (from)
+ WHILE toIdx <= HIGH (dest) DO
+ dest[toIdx] := src[fromIdx] ;
+ INC (toIdx) ;
+ INC (fromIdx)
END ;
(* And adjust by bit shifting. *)
IF bitshift > 0
@@ -567,12 +567,12 @@ PROCEDURE ShiftRightByteBit (VAR dest: ARRAY OF BYTE; src: ARRAY OF BYTE;
highbit: CARDINAL;
byteshift, bitshift: CARDINAL) ;
VAR
- top, bot, mid : BYTESET ;
- i, h, to, from: CARDINAL ;
+ top, bot, mid : BYTESET ;
+ i, h, toIdx, fromIdx: CARDINAL ;
BEGIN
(* Copy the bytes. *)
- to := 0 ;
- from := byteshift ;
+ toIdx := 0 ;
+ fromIdx := byteshift ;
IF EnableDebugging
THEN
printf ("HIGH (dest) = %d\n", HIGH (dest))
@@ -580,15 +580,15 @@ BEGIN
IF byteshift <= HIGH (dest)
THEN
h := HIGH (dest) - byteshift ;
- WHILE to <= h DO
- dest[to] := src[from] ;
- INC (to) ;
- INC (from)
+ WHILE toIdx <= h DO
+ dest[toIdx] := src[fromIdx] ;
+ INC (toIdx) ;
+ INC (fromIdx)
END
END ;
- WHILE to <= HIGH (dest) DO
- dest[to] := BYTE (0) ;
- INC (to)
+ WHILE toIdx <= HIGH (dest) DO
+ dest[toIdx] := BYTE (0) ;
+ INC (toIdx)
END ;
(* And bit shift the remainder. *)
IF EnableDebugging
@@ -691,7 +691,7 @@ VAR
next : BOOLEAN ;
mask,
unused,
- set : BYTESET ;
+ setb : BYTESET ;
BEGIN
IF EnableDebugging
THEN
@@ -704,14 +704,14 @@ BEGIN
bytes. *)
i := 0 ;
WHILE i < high DO
- set := dest[i] ;
- next := MSB IN set ;
- set := SHIFT (set, 1) ; (* Shift left. *)
+ setb := dest[i] ;
+ next := MSB IN setb ;
+ setb := SHIFT (setb, 1) ; (* Shift left. *)
IF carry
THEN
- INCL (set, 0) (* Set bit 0. *)
+ INCL (setb, 0) (* Set bit 0. *)
END ;
- dest[i] := set ;
+ dest[i] := setb ;
carry := next ;
IF EnableDebugging
THEN
@@ -722,27 +722,27 @@ BEGIN
END ;
(* Last byte special case as there may be some unused bits which must be
preserved. *)
- set := dest[high] ;
+ setb := dest[high] ;
unused := BYTESET {} ; (* Will contain all top unused bits of dest[high]. *)
mask := - BYTESET {} ;
topbit := (highbit+1) MOD TBITSIZE (BYTE) ;
WHILE topbit # 0 DO
EXCL (mask, topbit) ;
- IF topbit IN set
+ IF topbit IN setb
THEN
- EXCL (set, topbit) ;
+ EXCL (setb, topbit) ;
INCL (unused, topbit)
END ;
topbit := (topbit+1) MOD TBITSIZE (BYTE)
END ;
- set := SHIFT (set, 1) ; (* Left shift. *)
+ setb := SHIFT (setb, 1) ; (* Left shift. *)
IF carry
THEN
- INCL (set, 0) (* Set bit 0. *)
+ INCL (setb, 0) (* Set bit 0. *)
END ;
- set := set * mask ; (* Remove all unused bits. *)
- set := set + unused ; (* Restore original unused bits. *)
- dest[high] := set ;
+ setb := setb * mask ; (* Remove all unused bits. *)
+ setb := setb + unused ; (* Restore original unused bits. *)
+ dest[high] := setb ;
IF EnableDebugging
THEN
printf ("ArithShiftLeft shifted byte dest[%d]\n", high);
@@ -785,32 +785,32 @@ VAR
next : BOOLEAN ;
mask,
unused,
- set : BYTESET ;
+ setb : BYTESET ;
BEGIN
high := HIGH (dest) ;
(* Clear any unused bits in the highest byte, but save them into unused. *)
- set := dest[high] ;
+ setb := dest[high] ;
unused := BYTESET {} ;
topbit := (highbit+1) MOD TBITSIZE (BYTE) ;
mask := - BYTESET {} ;
WHILE topbit # 0 DO
EXCL (mask, topbit) ;
- IF topbit IN set
+ IF topbit IN setb
THEN
- EXCL (set, topbit) ;
+ EXCL (setb, topbit) ;
INCL (unused, topbit)
END ;
topbit := (topbit+1) MOD TBITSIZE (BYTE)
END ;
(* Start at the top and work down to byte 0. *)
- set := set * mask ; (* Ignore unused bits. *)
- next := 0 IN set ; (* Next carry. *)
- set := SHIFT (set, -1) ; (* Shift right by 1 bit. *)
+ setb := setb * mask ; (* Ignore unused bits. *)
+ next := 0 IN setb ; (* Next carry. *)
+ setb := SHIFT (setb, -1) ; (* Shift right by 1 bit. *)
IF carry
THEN
- INCL (set, highbit MOD TBITSIZE (BYTE))
+ INCL (setb, highbit MOD TBITSIZE (BYTE))
END ;
- dest[high] := set + unused ; (* First byte is a special case as we
+ dest[high] := setb + unused ; (* First byte is a special case as we
have to preserve the unused bits. *)
(* Now we ripple through the remaining bytes, propagating local
carry between bytes. *)
@@ -818,14 +818,14 @@ BEGIN
WHILE i > 0 DO
prev := next ;
DEC (i) ;
- set := dest[i] ;
- next := 0 IN set ;
- set := SHIFT (set, -1) ;
+ setb := dest[i] ;
+ next := 0 IN setb ;
+ setb := SHIFT (setb, -1) ;
IF prev
THEN
- INCL (set, MSB)
+ INCL (setb, MSB)
END ;
- dest[i] := set
+ dest[i] := setb
END
END ArithShiftRightBit ;
@@ -914,7 +914,7 @@ VAR
high,
highplus1,
highbitplus1,
- from, to : CARDINAL ;
+ fromIdx, toIdx: CARDINAL ;
BEGIN
IF EnableDebugging
THEN
@@ -925,21 +925,21 @@ BEGIN
(* Copy the contents rotating on byte granularity, then
arithmetically shift the remaining number of bits. *)
high := HIGH (dest) ;
- from := 0 ;
+ fromIdx := 0 ;
highplus1 := high + 1 ;
highbitplus1 := highbit + 1 ;
- to := RotateCount DIV TBITSIZE (BYTE) ; (* Byte level granularity. *)
+ toIdx := RotateCount DIV TBITSIZE (BYTE) ; (* Byte level granularity. *)
REPEAT
- dest[to] := src[from] ;
+ dest[toIdx] := src[fromIdx] ;
IF EnableDebugging
THEN
printf ("RotateLeft after partial byte movement: dest[%d] := src[%d]\n",
- to, from);
+ toIdx, fromIdx);
DumpSet (dest, highbit)
END ;
- from := (from + 1) MOD highplus1 ;
- to := (to + 1) MOD highplus1 ;
- UNTIL from = 0 ;
+ fromIdx := (fromIdx + 1) MOD highplus1 ;
+ toIdx := (toIdx + 1) MOD highplus1 ;
+ UNTIL fromIdx = 0 ;
IF EnableDebugging
THEN
diff --git a/gcc/opts-diagnostic.cc b/gcc/opts-diagnostic.cc
index 6f459ec..a230c21 100644
--- a/gcc/opts-diagnostic.cc
+++ b/gcc/opts-diagnostic.cc
@@ -49,12 +49,13 @@ public:
location_t loc,
const char *option_name,
const char *option_value)
- : dc_spec_context (dc,
+ : dc_spec_context (option_name,
+ option_value,
+ nullptr,
location_mgr,
+ dc,
location_mgr,
- loc,
- option_name,
- option_value),
+ loc),
m_opts (opts)
{}
diff --git a/gcc/passes.def b/gcc/passes.def
index 3f82847..fac04cd 100644
--- a/gcc/passes.def
+++ b/gcc/passes.def
@@ -369,7 +369,6 @@ along with GCC; see the file COPYING3. If not see
NEXT_PASS (pass_forwprop, /*full_walk=*/false, /*last=*/true);
NEXT_PASS (pass_sink_code, true /* unsplit edges */);
NEXT_PASS (pass_phiopt, false /* early_p */);
- NEXT_PASS (pass_fold_builtins);
NEXT_PASS (pass_optimize_widening_mul);
NEXT_PASS (pass_store_merging);
/* If DCE is not run before checking for uninitialized uses,
@@ -405,12 +404,9 @@ along with GCC; see the file COPYING3. If not see
NEXT_PASS (pass_ccp, true /* nonzero_p */);
NEXT_PASS (pass_post_ipa_warn);
NEXT_PASS (pass_object_sizes);
- /* Fold remaining builtins. */
- NEXT_PASS (pass_fold_builtins);
NEXT_PASS (pass_strlen);
- /* Copy propagation also copy-propagates constants, this is necessary
- to forward object-size and builtin folding results properly. */
- NEXT_PASS (pass_copy_prop);
+ /* Fold remaining builtins. */
+ NEXT_PASS (pass_forwprop, /*full_walk=*/false, /*last=*/true);
NEXT_PASS (pass_dce);
/* Profile count may overflow as a result of inlinining very large
loop nests. This pass should run before any late pass that makes
diff --git a/gcc/simplify-rtx.cc b/gcc/simplify-rtx.cc
index 46f1df6..c4de035 100644
--- a/gcc/simplify-rtx.cc
+++ b/gcc/simplify-rtx.cc
@@ -3465,7 +3465,9 @@ simplify_context::simplify_binary_operation_1 (rtx_code code,
return plus_constant (mode, op0, trunc_int_for_mode (-offset, mode));
/* Don't let a relocatable value get a negative coeff. */
- if (poly_int_rtx_p (op1) && GET_MODE (op0) != VOIDmode)
+ if (is_a <scalar_int_mode> (mode)
+ && poly_int_rtx_p (op1)
+ && GET_MODE (op0) != VOIDmode)
return simplify_gen_binary (PLUS, mode,
op0,
neg_poly_int_rtx (mode, op1));
diff --git a/gcc/testsuite/g++.dg/parse/auto-struct-param.C b/gcc/testsuite/g++.dg/parse/auto-struct-param.C
new file mode 100644
index 0000000..78573c6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/auto-struct-param.C
@@ -0,0 +1,4 @@
+// PR c++/122112
+// { dg-do compile { target c++20 } }
+
+void func(struct { auto x; }); // { dg-error "" }
diff --git a/gcc/testsuite/gcc.dg/builtin-unreachable-5.c b/gcc/testsuite/gcc.dg/builtin-unreachable-5.c
index ba87bdd..91e6dcc 100644
--- a/gcc/testsuite/gcc.dg/builtin-unreachable-5.c
+++ b/gcc/testsuite/gcc.dg/builtin-unreachable-5.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab1" } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
int
foo (int a)
@@ -16,7 +16,7 @@ foo (int a)
return a > 0;
}
-/* { dg-final { scan-tree-dump-times "if \\(" 0 "fab1" } } */
-/* { dg-final { scan-tree-dump-times "goto" 0 "fab1" } } */
-/* { dg-final { scan-tree-dump-times "L1:" 0 "fab1" } } */
-/* { dg-final { scan-tree-dump-times "__builtin_unreachable" 0 "fab1" } } */
+/* { dg-final { scan-tree-dump-times "if \\(" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "goto" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "L1:" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "__builtin_unreachable" 0 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-unreachable-6.c b/gcc/testsuite/gcc.dg/builtin-unreachable-6.c
index 4c3b9bb..c896ad4 100644
--- a/gcc/testsuite/gcc.dg/builtin-unreachable-6.c
+++ b/gcc/testsuite/gcc.dg/builtin-unreachable-6.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab1 -fno-tree-dominator-opts -fno-tree-vrp" } */
+/* { dg-options "-O2 -fdump-tree-optimized -fno-tree-dominator-opts -fno-tree-vrp" } */
/* { dg-require-effective-target label_values } */
void
@@ -17,5 +17,5 @@ lab2:
goto *x;
}
-/* { dg-final { scan-tree-dump-times "lab:" 1 "fab1" } } */
-/* { dg-final { scan-tree-dump-times "__builtin_unreachable" 1 "fab1" } } */
+/* { dg-final { scan-tree-dump-times "lab:" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "__builtin_unreachable" 1 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-unreachable-6a.c b/gcc/testsuite/gcc.dg/builtin-unreachable-6a.c
index f527f2e..5306235 100644
--- a/gcc/testsuite/gcc.dg/builtin-unreachable-6a.c
+++ b/gcc/testsuite/gcc.dg/builtin-unreachable-6a.c
@@ -1,7 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab1" } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
#include "builtin-unreachable-6.c"
-/* { dg-final { scan-tree-dump-times "lab:" 1 "fab1" } } */
-/* { dg-final { scan-tree-dump-not "__builtin_unreachable" "fab1" } } */
+/* { dg-final { scan-tree-dump-times "lab:" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-not "__builtin_unreachable" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-unreachable-7.c b/gcc/testsuite/gcc.dg/builtin-unreachable-7.c
index a6c078f..0ff60b6 100644
--- a/gcc/testsuite/gcc.dg/builtin-unreachable-7.c
+++ b/gcc/testsuite/gcc.dg/builtin-unreachable-7.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab1 -fno-tree-dominator-opts -fno-tree-vrp" } */
+/* { dg-options "-O2 -fdump-tree-optimized -fno-tree-dominator-opts -fno-tree-vrp" } */
/* { dg-require-effective-target label_values } */
void foo (int b, int c)
@@ -18,7 +18,7 @@ lab2:
/* Fab should still able to remove the conditional but leave the bb there. */
-/* { dg-final { scan-tree-dump-times "lab:" 1 "fab1" } } */
-/* { dg-final { scan-tree-dump-times "__builtin_unreachable" 1 "fab1" } } */
-/* { dg-final { scan-tree-dump-not "if " "fab1" } } */
+/* { dg-final { scan-tree-dump-times "lab:" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "__builtin_unreachable" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-not "if " "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/c2y-init-2.c b/gcc/testsuite/gcc.dg/c2y-init-2.c
new file mode 100644
index 0000000..cf62eaa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c2y-init-2.c
@@ -0,0 +1,33 @@
+/* Test invalid initializers that are consistent with the syntax: undefined
+ behavior ("shall" in Semantics not Constraints) before C2y, constraint
+ violation in C2y. Structure and union cases. */
+/* { dg-do compile } */
+/* { dg-options "-std=c2y -pedantic-errors" } */
+
+struct s1 { int a, b; };
+struct s2 { struct s1 x; };
+struct s3 { struct s2 x; };
+union u1 { int a; };
+union u2 { union u1 x; };
+union u3 { union u2 x; };
+
+struct s1 s1v;
+volatile struct s2 s2v;
+union u1 u1v;
+const union u2 u2v;
+
+void
+f ()
+{
+ struct s1 ts1a = {}, ts1b = s1v, ts1c = { 1, 2 };
+ const struct s2 ts2a = {}, ts2b = s2v, ts2c = { s1v }, ts2d = { 1 };
+ volatile struct s3 ts3a = { s2v }, ts3b = { s1v };
+ union u1 tu1a = {}, tu1b = u1v, tu1c = { 1 };
+ const union u2 tu2a = {}, tu2b = u2v, tu2c = { u1v }, tu2d = { 1 };
+ volatile union u3 tu3a = { u2v }, tu3b = { u1v };
+ struct s2 es2a = 1; /* { dg-error "invalid initializer" } */
+ struct s2 es2b = s1v; /* { dg-error "invalid initializer" } */
+ struct s1 es1a = s2v; /* { dg-error "invalid initializer" } */
+ union u2 eu2a = u1v; /* { dg-error "invalid initializer" } */
+ union u1 eu1a = 1; /* { dg-error "invalid initializer" } */
+}
diff --git a/gcc/testsuite/gcc.dg/c2y-init-3.c b/gcc/testsuite/gcc.dg/c2y-init-3.c
new file mode 100644
index 0000000..1dd0607
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c2y-init-3.c
@@ -0,0 +1,106 @@
+/* Test invalid initializers that are consistent with the syntax: undefined
+ behavior ("shall" in Semantics not Constraints) before C2y, constraint
+ violation in C2y. Array cases. */
+/* { dg-do compile } */
+/* { dg-options "-std=c2y -pedantic-errors" } */
+
+typedef __WCHAR_TYPE__ wchar_t;
+typedef __CHAR8_TYPE__ char8_t;
+typedef __CHAR16_TYPE__ char16_t;
+typedef __CHAR32_TYPE__ char32_t;
+
+const char c1[] = "", c2[] = { "" }, c3[] = { "", };
+char c4[] = u8"", c5[] = { u8"" }, c6[] = { u8"", };
+
+signed char sc1[] = "", sc2[] = { "" }, sc3[] = { "", };
+volatile signed char sc4[] = u8"", sc5[] = { u8"" }, sc6[] = { u8"", };
+
+unsigned char uc1[] = "", uc2[] = { "" }, uc3[] = { "", };
+unsigned char uc4[] = u8"", uc5[] = { u8"" }, uc6[] = { u8"", };
+
+char8_t c8_1[] = "", c8_2[] = { "" }, c8_3[] = { "", };
+char8_t c8_4[] = u8"", c8_5[] = { u8"" }, c8_6[] = { u8"", };
+
+wchar_t w1[] = L"", w2[] = { L"" }, w3[] = { L"", };
+char16_t c16_1[] = u"", c16_2[] = { u"" }, c16_3[] = { u"", };
+char32_t c32_1[] = U"", c32_2[] = { U"" }, c32_3[] = { U"", };
+
+int ia[] = { 1, 2, 3 };
+
+_Atomic char ac[] = ""; /* { dg-error "inappropriate type" } */
+_Atomic wchar_t aw[] = L""; /* { dg-error "inappropriate type" } */
+_Atomic char8_t ac8[] = u8""; /* { dg-error "inappropriate type" } */
+_Atomic char16_t ac16[] = u""; /* { dg-error "inappropriate type" } */
+_Atomic char32_t ac32[] = U""; /* { dg-error "inappropriate type" } */
+
+#if __WCHAR_WIDTH__ > __SCHAR_WIDTH__
+typedef char char_not_wchar;
+typedef wchar_t wchar_not_char;
+#else
+typedef long long int char_not_wchar;
+typedef long long int wchar_not_char;
+#endif
+char_not_wchar cnw[] = L""; /* { dg-error "cannot initialize|inappropriate type" } */
+char_not_wchar cnwb[] = { L"" }; /* { dg-error "cannot initialize|inappropriate type" } */
+wchar_not_char wnc[] = ""; /* { dg-error "cannot initialize|inappropriate type" } */
+wchar_not_char wncb[] = { "" }; /* { dg-error "cannot initialize|inappropriate type" } */
+wchar_not_char wnc8[] = u8""; /* { dg-error "cannot initialize|inappropriate type" } */
+wchar_not_char wnc8b[] = { u8"" }; /* { dg-error "cannot initialize|inappropriate type" } */
+
+#if __INT_LEAST16_WIDTH__ > __SCHAR_WIDTH__
+typedef char char_not_char16;
+typedef char16_t char16_not_char;
+#else
+typedef long long int char_not_char16;
+typedef long long int char16_not_char;
+#endif
+char_not_char16 cn16[] = u""; /* { dg-error "cannot initialize|inappropriate type" } */
+char_not_char16 cn16b[] = { u"" }; /* { dg-error "cannot initialize|inappropriate type" } */
+char16_not_char c16nc[] = ""; /* { dg-error "cannot initialize|inappropriate type" } */
+char16_not_char c16ncb[] = { "" }; /* { dg-error "cannot initialize|inappropriate type" } */
+char16_not_char c16nc8[] = u8""; /* { dg-error "cannot initialize|inappropriate type" } */
+char16_not_char c16nc8b[] = { u8"" }; /* { dg-error "cannot initialize|inappropriate type" } */
+
+#if __INT_LEAST32_WIDTH__ > __SCHAR_WIDTH__
+typedef char char_not_char32;
+typedef char32_t char32_not_char;
+#else
+typedef long long int char_not_char32;
+typedef long long int char32_not_char;
+#endif
+char_not_char32 cn32[] = U""; /* { dg-error "cannot initialize|inappropriate type" } */
+char_not_char32 cn32b[] = { U"" }; /* { dg-error "cannot initialize|inappropriate type" } */
+char32_not_char c32nc[] = ""; /* { dg-error "cannot initialize|inappropriate type" } */
+char32_not_char c32ncb[] = { "" }; /* { dg-error "cannot initialize|inappropriate type" } */
+char32_not_char c32nc8[] = u8""; /* { dg-error "cannot initialize|inappropriate type" } */
+char32_not_char c32nc8b[] = { u8"" }; /* { dg-error "cannot initialize|inappropriate type" } */
+
+#if __WCHAR_WIDTH__ == __INT_LEAST16_WIDTH__
+typedef long long int wchar_not_char16;
+typedef long long int char16_not_wchar;
+#else
+typedef wchar_t wchar_not_char16;
+typedef char16_t char16_not_wchar;
+#endif
+wchar_not_char16 wcn16[] = u""; /* { dg-error "cannot initialize|inappropriate type" } */
+wchar_not_char16 wcn16b[] = { u"" }; /* { dg-error "cannot initialize|inappropriate type" } */
+char16_not_wchar c16nwc[] = L""; /* { dg-error "cannot initialize|inappropriate type" } */
+char16_not_wchar c16nwcb[] = { L"" }; /* { dg-error "cannot initialize|inappropriate type" } */
+
+#if __WCHAR_WIDTH__ == __INT_LEAST32_WIDTH__
+typedef long long int wchar_not_char32;
+typedef long long int char32_not_wchar;
+#else
+typedef wchar_t wchar_not_char32;
+typedef char32_t char32_not_wchar;
+#endif
+wchar_not_char32 wcn32[] = U""; /* { dg-error "cannot initialize|inappropriate type" } */
+wchar_not_char32 wcn32b[] = { U"" }; /* { dg-error "cannot initialize|inappropriate type" } */
+char32_not_wchar c32nwc[] = L""; /* { dg-error "cannot initialize|inappropriate type" } */
+char32_not_wchar c32nwcb[] = { L"" }; /* { dg-error "cannot initialize|inappropriate type" } */
+
+void
+f ()
+{
+ int ic[] = ia; /* { dg-error "invalid initializer" } */
+}
diff --git a/gcc/testsuite/gcc.dg/plugin/start_unit_plugin.cc b/gcc/testsuite/gcc.dg/plugin/start_unit_plugin.cc
index 7b4f40e..3b3406e 100644
--- a/gcc/testsuite/gcc.dg/plugin/start_unit_plugin.cc
+++ b/gcc/testsuite/gcc.dg/plugin/start_unit_plugin.cc
@@ -2,7 +2,7 @@
* By the time a PLUGIN_START_UNIT callback is invoked, the frontend
* initialization should have completed. At least the different *_type_nodes
* should have been created. This plugin creates an artificial global
- * interger variable.
+ * integer variable.
*
*/
#include "gcc-plugin.h"
diff --git a/gcc/testsuite/gcc.dg/pr78408-2.c b/gcc/testsuite/gcc.dg/pr78408-2.c
index 89c9b7e..cad1285 100644
--- a/gcc/testsuite/gcc.dg/pr78408-2.c
+++ b/gcc/testsuite/gcc.dg/pr78408-2.c
@@ -1,7 +1,7 @@
/* PR c/78408 */
/* { dg-do compile { target size32plus } } */
-/* { dg-options "-O2 -fdump-tree-fab1-details" } */
-/* { dg-final { scan-tree-dump-not "after previous" "fab1" } } */
+/* { dg-options "-O2 -fdump-tree-forwprop1-details" } */
+/* { dg-final { scan-tree-dump-not "after previous" "forwprop1" } } */
struct S { char a[32]; };
struct T { char a[65536]; };
diff --git a/gcc/testsuite/gcc.dg/torture/pr122079-1.c b/gcc/testsuite/gcc.dg/torture/pr122079-1.c
new file mode 100644
index 0000000..0af01a5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr122079-1.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-fcode-hoisting" } */
+
+int a, b, c;
+void e(int *f) {
+ int d = 0;
+ if (f)
+ goto g;
+ goto h;
+i:
+ d = 1 + f[0];
+j:
+ if (c)
+ goto h;
+k:
+ if (b)
+ goto i;
+ if (a)
+ goto j;
+g:
+ if (d + f[0])
+ goto k;
+h:
+ int l[] = {f[0]};
+ if (a)
+ e(l);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr122079-2.c b/gcc/testsuite/gcc.dg/torture/pr122079-2.c
new file mode 100644
index 0000000..40c36b0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr122079-2.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+
+int a, b, *c = &a, d, e, f;
+void g(int *p) { a = p[0]; }
+int main() {
+ int h = 0;
+i:
+ d = c[0];
+ c[0] = h;
+ if (a)
+ goto j;
+k:
+ h = c[0] - 1;
+ while (1) {
+ if (b)
+ goto i;
+ if (f)
+ goto k;
+ j:
+ if (!e) {
+ int m[] = {c[0]};
+ g(m);
+ break;
+ }
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr122079-3.c b/gcc/testsuite/gcc.dg/torture/pr122079-3.c
new file mode 100644
index 0000000..df95c71
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr122079-3.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-fno-tree-loop-im" } */
+
+int a, b, c;
+void d(int[]);
+void e(int f[][2]) {
+g:
+ b = f[0][1];
+ if (c)
+ goto h;
+i:
+ if (a)
+ goto g;
+ if (f[1][1])
+ goto j;
+h:
+ if (f[1][1])
+ goto i;
+ goto k;
+j:
+ b--;
+ if (b + f[0][1])
+ goto i;
+k:
+ int l[] = {f[0][1]};
+ d(l);
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c
index 9e45014..31d7f70 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab1" } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
typedef struct { int i; } FILE;
FILE *fp;
@@ -29,12 +29,12 @@ void test (void)
vi9 = 0;
}
-/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi4.*fwrite.*\"hello\".*1, 5, fp.*vi5" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi5.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi6" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi6.*fputc.*fp.*vi7" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi7.*fputc.*fp.*vi8" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi8.*fprintf.*fp.*\"%d%d\".*vi9" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi4.*fwrite.*\"hello\".*1, 5, fp.*vi5" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi5.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi6" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi6.*fputc.*fp.*vi7" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi7.*fputc.*fp.*vi8" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi8.*fprintf.*fp.*\"%d%d\".*vi9" "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c
index f3de73a..f4f18e8 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab1" } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
typedef struct { int i; } FILE;
FILE *fp;
@@ -29,12 +29,12 @@ void test (void)
vi9 = 0;
}
-/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi4.*fwrite.*\"hello\".*1, 5, fp.*vi5" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi5.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi6" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi6.*fputc.*fp.*vi7" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi7.*fputc.*fp.*vi8" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi8.*__fprintf_chk.*fp.*1.*\"%d%d\".*vi9" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi4.*fwrite.*\"hello\".*1, 5, fp.*vi5" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi5.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi6" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi6.*fputc.*fp.*vi7" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi7.*fputc.*fp.*vi8" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi8.*__fprintf_chk.*fp.*1.*\"%d%d\".*vi9" "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c
index bd119e0..056edea 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab1" } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
extern int printf (const char *, ...);
volatile int vi0, vi1, vi2, vi3, vi4, vi5, vi6, vi7, vi8, vi9, via;
@@ -29,13 +29,13 @@ void test (void)
via = 0;
}
-/* { dg-final { scan-tree-dump "vi0.*printf.*\"hello\".*vi1" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi4.*printf.*\"hello\".*vi5" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi5.*puts.*\"hello\".*vi6" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi6.*putchar.*vi7" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi7 ={v} 0\[^\(\)\]*vi8 ={v} 0" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi8.*putchar.*vi9" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi9.*puts.*\"hello\\\\n\".*via" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi0.*printf.*\"hello\".*vi1" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi4.*printf.*\"hello\".*vi5" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi5.*puts.*\"hello\".*vi6" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi6.*putchar.*vi7" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi7 ={v} 0\[^\(\)\]*vi8 ={v} 0" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi8.*putchar.*vi9" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi9.*puts.*\"hello\\\\n\".*via" "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c
index a0c0ef9..1a9690f 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab1" } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
extern int __printf_chk (int, const char *, ...);
volatile int vi0, vi1, vi2, vi3, vi4, vi5, vi6, vi7, vi8, vi9, via;
@@ -29,13 +29,13 @@ void test (void)
via = 0;
}
-/* { dg-final { scan-tree-dump "vi0.*__printf_chk.*1.*\"hello\".*vi1" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi4.*__printf_chk.*1.*\"hello\".*vi5" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi5.*puts.*\"hello\".*vi6" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi6.*putchar.*vi7" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi7 ={v} 0\[^\(\)\]*vi8 ={v} 0" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi8.*putchar.*vi9" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi9.*puts.*\"hello\\\\n\".*via" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi0.*__printf_chk.*1.*\"hello\".*vi1" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi4.*__printf_chk.*1.*\"hello\".*vi5" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi5.*puts.*\"hello\".*vi6" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi6.*putchar.*vi7" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi7 ={v} 0\[^\(\)\]*vi8 ={v} 0" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi8.*putchar.*vi9" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi9.*puts.*\"hello\\\\n\".*via" "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c
index 29b4a4b..3124309 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab1" } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
#include <stdarg.h>
@@ -29,10 +29,10 @@ test (va_list ap1, va_list ap2, va_list ap3, va_list ap4, va_list ap5,
vi7 = 0;
}
-/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi4.*vfprintf.*\"%s\".*vi5" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi5.*vfprintf.*\"%c\".*vi6" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi6.*vfprintf.*\"%s\\\\n\".*vi7" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi4.*vfprintf.*\"%s\".*vi5" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi5.*vfprintf.*\"%c\".*vi6" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi6.*vfprintf.*\"%s\\\\n\".*vi7" "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c
index c91c709..15ee7f9 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab1" } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
#include <stdarg.h>
@@ -29,10 +29,10 @@ test (va_list ap1, va_list ap2, va_list ap3, va_list ap4, va_list ap5,
vi7 = 0;
}
-/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi4.*__vfprintf_chk.*fp.*1.*\"%s\".*vi5" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi5.*__vfprintf_chk.*fp.*1.*\"%c\".*vi6" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi6.*__vfprintf_chk.*fp.*1.*\"%s\\\\n\".*vi7" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi4.*__vfprintf_chk.*fp.*1.*\"%s\".*vi5" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi5.*__vfprintf_chk.*fp.*1.*\"%c\".*vi6" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi6.*__vfprintf_chk.*fp.*1.*\"%s\\\\n\".*vi7" "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c
index 023384a..ed7a4ae 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab1" } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
#include <stdarg.h>
@@ -27,10 +27,10 @@ test (va_list ap1, va_list ap2, va_list ap3, va_list ap4, va_list ap5,
vi7 = 0;
}
-/* { dg-final { scan-tree-dump "vi0.*vprintf.*\"hello\".*vi1" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi4.*vprintf.*\"%s\".*vi5" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi5.*vprintf.*\"%c\".*vi6" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi6.*vprintf.*\"%s\\\\n\".*vi7" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi0.*vprintf.*\"hello\".*vi1" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi4.*vprintf.*\"%s\".*vi5" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi5.*vprintf.*\"%c\".*vi6" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi6.*vprintf.*\"%s\\\\n\".*vi7" "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c
index 2b21f7b..b86fe33 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab1" } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
#include <stdarg.h>
@@ -27,10 +27,10 @@ test (va_list ap1, va_list ap2, va_list ap3, va_list ap4, va_list ap5,
vi7 = 0;
}
-/* { dg-final { scan-tree-dump "vi0.*__vprintf_chk.*1.*\"hello\".*vi1" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi4.*__vprintf_chk.*1.*\"%s\".*vi5" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi5.*__vprintf_chk.*1.*\"%c\".*vi6" "fab1"} } */
-/* { dg-final { scan-tree-dump "vi6.*__vprintf_chk.*1.*\"%s\\\\n\".*vi7" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi0.*__vprintf_chk.*1.*\"hello\".*vi1" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi4.*__vprintf_chk.*1.*\"%s\".*vi5" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi5.*__vprintf_chk.*1.*\"%c\".*vi6" "optimized"} } */
+/* { dg-final { scan-tree-dump "vi6.*__vprintf_chk.*1.*\"%s\\\\n\".*vi7" "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr122033-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr122033-1.c
new file mode 100644
index 0000000..4ef8c6c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr122033-1.c
@@ -0,0 +1,18 @@
+/* PR middle-end/122033 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+void bar1 (char *, int);
+void bar3(void) __attribute__((noreturn));
+void foo1 (int size)
+{
+ {
+ char temp[size];
+ temp[size-1] = '\0';
+ bar1 (temp, size);
+ }
+ bar3 ();
+}
+
+/* { dg-final { scan-tree-dump-not "__builtin_stack_save" "optimized"} } */
+/* { dg-final { scan-tree-dump-not "__builtin_stack_restore" "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr122033-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr122033-2.c
new file mode 100644
index 0000000..f429324
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr122033-2.c
@@ -0,0 +1,23 @@
+/* PR middle-end/122033 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+void g(int*);
+void h();
+double t;
+void f(int a, int b)
+{
+ {
+ int array0[a];
+ {
+ int array1[b];
+ g(array0);
+ g(array1);
+ }
+ t = __builtin_sin(t);
+ }
+ h ();
+}
+
+/* { dg-final { scan-tree-dump-times "__builtin_stack_save" 2 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "__builtin_stack_restore" 2 "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr79691.c b/gcc/testsuite/gcc.dg/tree-ssa/pr79691.c
index bf88931..43770c9 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr79691.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr79691.c
@@ -34,4 +34,4 @@ int f4 (int i)
/* { dg-final { scan-tree-dump-times "sprintf" 1 "optimized" } }
{ dg-final { scan-tree-dump-times "snprintf" 1 "optimized" } }
- { dg-final { scan-tree-dump " = 9;" "optimized" } } */
+ { dg-final { scan-tree-dump "return 9;" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-10.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-10.c
index d6126a3..dc87a56 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-10.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-10.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-fab1" } */
+/* { dg-options "-O1 -fdump-tree-optimized" } */
/* Check that we fold strlen of equally long strings, and that we do not
fail to terminate when there is a nontrivial cycle in the corresponding
@@ -32,4 +32,4 @@ middle:
}
/* There should be no calls to strlen. */
-/* { dg-final { scan-tree-dump-times "strlen" 0 "fab1"} } */
+/* { dg-final { scan-tree-dump-times "strlen" 0 "optimized"} } */
diff --git a/gcc/testsuite/gcc.target/aarch64/asm-flag-1.c b/gcc/testsuite/gcc.target/aarch64/asm-flag-1.c
index 49901e5..7b07cdd 100644
--- a/gcc/testsuite/gcc.target/aarch64/asm-flag-1.c
+++ b/gcc/testsuite/gcc.target/aarch64/asm-flag-1.c
@@ -30,6 +30,6 @@ void f(char *out)
/* { dg-final { scan-assembler "cset.*, hi" } } */
/* { dg-final { scan-assembler "cset.*, ls" } } */
/* { dg-final { scan-assembler "cset.*, ge" } } */
-/* { dg-final { scan-assembler "cset.*, ls" } } */
+/* { dg-final { scan-assembler "cset.*, lt" } } */
/* { dg-final { scan-assembler "cset.*, gt" } } */
/* { dg-final { scan-assembler "cset.*, le" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/builtin_pld_pli.c b/gcc/testsuite/gcc.target/aarch64/builtin_pld_pli.c
index 8cbaa97..0e60baf 100644
--- a/gcc/testsuite/gcc.target/aarch64/builtin_pld_pli.c
+++ b/gcc/testsuite/gcc.target/aarch64/builtin_pld_pli.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-march=armv8-a -O2" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
#include <arm_acle.h>
@@ -38,23 +39,27 @@ prefetch_for_read_write (void *a)
__pldx (PST, SLC, KEEP, a);
__pldx (PST, SLC, STRM, a);
}
-
-/* { dg-final { scan-assembler "prfm\tPLDL1KEEP, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPLDL1STRM, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPLDL2KEEP, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPLDL2STRM, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPLDL3KEEP, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPLDL3STRM, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPLDSLCKEEP, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPLDSLCSTRM, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPSTL1KEEP, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPSTL1STRM, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPSTL2KEEP, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPSTL2STRM, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPSTL3KEEP, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPSTL3STRM, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPSTSLCKEEP, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPSTSLCSTRM, \\\[x\[0-9\]+\\\]" } } */
+/*
+** prefetch_for_read_write:
+** ...
+** prfm\tPLDL1KEEP, \[x[0-9]+\]
+** prfm\tPLDL1STRM, \[x[0-9]+\]
+** prfm\tPLDL2KEEP, \[x[0-9]+\]
+** prfm\tPLDL2STRM, \[x[0-9]+\]
+** prfm\tPLDL3KEEP, \[x[0-9]+\]
+** prfm\tPLDL3STRM, \[x[0-9]+\]
+** prfm\tPLDSLCKEEP, \[x[0-9]+\]
+** prfm\tPLDSLCSTRM, \[x[0-9]+\]
+** prfm\tPSTL1KEEP, \[x[0-9]+\]
+** prfm\tPSTL1STRM, \[x[0-9]+\]
+** prfm\tPSTL2KEEP, \[x[0-9]+\]
+** prfm\tPSTL2STRM, \[x[0-9]+\]
+** prfm\tPSTL3KEEP, \[x[0-9]+\]
+** prfm\tPSTL3STRM, \[x[0-9]+\]
+** prfm\tPSTSLCKEEP, \[x[0-9]+\]
+** prfm\tPSTSLCSTRM, \[x[0-9]+\]
+** ...
+*/
void
prefetch_simple (void *a)
@@ -62,9 +67,13 @@ prefetch_simple (void *a)
__pld (a);
__pli (a);
}
-
-/* { dg-final { scan-assembler "prfm\tPLDL1KEEP, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPLIL1KEEP, \\\[x\[0-9\]+\\\]" } } */
+/*
+** prefetch_simple:
+** ...
+** prfm\tPLDL1KEEP, \[x[0-9]+\]
+** prfm\tPLIL1KEEP, \[x[0-9]+\]
+** ...
+*/
void
prefetch_instructions (void *a)
@@ -78,13 +87,16 @@ prefetch_instructions (void *a)
__plix (SLC, KEEP, a);
__plix (SLC, STRM, a);
}
-
-/* { dg-final { scan-assembler "prfm\tPLIL1KEEP, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPLIL1STRM, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPLIL2KEEP, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPLIL2STRM, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPLIL3KEEP, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPLIL3STRM, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPLISLCKEEP, \\\[x\[0-9\]+\\\]" } } */
-/* { dg-final { scan-assembler "prfm\tPLISLCSTRM, \\\[x\[0-9\]+\\\]" } } */
-
+/*
+** prefetch_instructions:
+** ...
+** prfm\tPLIL1KEEP, \[x[0-9]+\]
+** prfm\tPLIL1STRM, \[x[0-9]+\]
+** prfm\tPLIL2KEEP, \[x[0-9]+\]
+** prfm\tPLIL2STRM, \[x[0-9]+\]
+** prfm\tPLIL3KEEP, \[x[0-9]+\]
+** prfm\tPLIL3STRM, \[x[0-9]+\]
+** prfm\tPLISLCKEEP, \[x[0-9]+\]
+** prfm\tPLISLCSTRM, \[x[0-9]+\]
+** ...
+*/
diff --git a/gcc/testsuite/gcc.target/aarch64/csinc-1.c b/gcc/testsuite/gcc.target/aarch64/csinc-1.c
index 132a0f6..53e1ae2 100644
--- a/gcc/testsuite/gcc.target/aarch64/csinc-1.c
+++ b/gcc/testsuite/gcc.target/aarch64/csinc-1.c
@@ -1,16 +1,22 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
unsigned int
test_csinc32_ifcvt(unsigned int w0,
unsigned int w1,
unsigned int w2) {
- /* { dg-final { scan-assembler "csinc\tw\[0-9\]*.*ne" } } */
if (w0 == w1)
++ w2;
return w2;
}
+/*
+** test_csinc32_ifcvt:
+** cmp\tw0, w1
+** cinc\tw0, w2, eq
+** ret
+*/
unsigned int
test_csinc32_condasn1(unsigned int w0,
@@ -19,10 +25,15 @@ test_csinc32_condasn1(unsigned int w0,
unsigned int w3) {
unsigned int w4;
- /* { dg-final { scan-assembler "csinc\tw\[0-9\]*.*ne" } } */
w4 = (w0 == w1) ? (w3 + 1) : w2;
return w4;
}
+/*
+** test_csinc32_condasn1:
+** cmp\tw0, w1
+** csinc\tw0, w2, w3, ne
+** ret
+*/
unsigned int
test_csinc32_condasn2(unsigned int w0,
@@ -31,21 +42,31 @@ test_csinc32_condasn2(unsigned int w0,
unsigned int w3) {
unsigned int w4;
- /* { dg-final { scan-assembler "csinc\tw\[0-9\]*.*eq" } } */
w4 = (w0 == w1) ? w2 : (w3 + 1);
return w4;
}
+/*
+** test_csinc32_condasn2:
+** cmp\tw0, w1
+** csinc\tw0, w2, w3, eq
+** ret
+*/
unsigned long long
test_csinc64_ifcvt(unsigned long long x0,
unsigned long long x1,
unsigned long long x2) {
- /* { dg-final { scan-assembler "csinc\tx\[0-9\]*.*ne" } } */
if (x0 == x1)
++ x2;
return x2;
}
+/*
+** test_csinc64_ifcvt:
+** cmp\tx0, x1
+** cinc\tx0, x2, eq
+** ret
+*/
unsigned long long
test_csinc64_condasn1(unsigned long long x0,
@@ -54,10 +75,15 @@ test_csinc64_condasn1(unsigned long long x0,
unsigned long long x3) {
unsigned long long x4;
- /* { dg-final { scan-assembler "csinc\tx\[0-9\]*.*ne" } } */
x4 = (x0 == x1) ? (x3 + 1) : x2;
return x4;
}
+/*
+** test_csinc64_condasn1:
+** cmp\tx0, x1
+** csinc\tx0, x2, x3, ne
+** ret
+*/
unsigned long long
test_csinc64_condasn2(unsigned long long x0,
@@ -66,7 +92,12 @@ test_csinc64_condasn2(unsigned long long x0,
unsigned long long x3) {
unsigned long long x4;
- /* { dg-final { scan-assembler "csinc\tx\[0-9\]*.*eq" } } */
x4 = (x0 == x1) ? x2 : (x3 + 1);
return x4;
}
+/*
+** test_csinc64_condasn2:
+** cmp\tx0, x1
+** csinc\tx0, x2, x3, eq
+** ret
+*/
diff --git a/gcc/testsuite/gcc.target/aarch64/csneg-1.c b/gcc/testsuite/gcc.target/aarch64/csneg-1.c
index 4860d64..2533e7b 100644
--- a/gcc/testsuite/gcc.target/aarch64/csneg-1.c
+++ b/gcc/testsuite/gcc.target/aarch64/csneg-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
int
test_csneg32_condasn1(int w0,
@@ -8,10 +9,15 @@ test_csneg32_condasn1(int w0,
int w3) {
int w4;
- /* { dg-final { scan-assembler "csneg\tw\[0-9\]*.*ne" } } */
w4 = (w0 == w1) ? -w3 : w2;
return w4;
}
+/*
+** test_csneg32_condasn1:
+** cmp\tw0, w1
+** csneg\tw0, w2, w3, ne
+** ret
+*/
int
test_csneg32_condasn2(int w0,
@@ -20,10 +26,15 @@ test_csneg32_condasn2(int w0,
int w3) {
int w4;
- /* { dg-final { scan-assembler "csneg\tw\[0-9\]*.*eq" } } */
w4 = (w0 == w1) ? w3 : -w2;
return w4;
}
+/*
+** test_csneg32_condasn2:
+** cmp\tw0, w1
+** csneg\tw0, w3, w2, eq
+** ret
+*/
long long
test_csneg64_condasn1(long long x0,
@@ -32,10 +43,15 @@ test_csneg64_condasn1(long long x0,
long long x3) {
long long x4;
- /* { dg-final { scan-assembler "csneg\tx\[0-9\]*.*ne" } } */
x4 = (x0 == x1) ? -x3 : x2;
return x4;
}
+/*
+** test_csneg64_condasn1:
+** cmp\tx0, x1
+** csneg\tx0, x2, x3, ne
+** ret
+*/
long long
test_csneg64_condasn2(long long x0,
@@ -44,27 +60,41 @@ test_csneg64_condasn2(long long x0,
long long x3) {
long long x4;
- /* { dg-final { scan-assembler "csneg\tx\[0-9\]*.*eq" } } */
x4 = (x0 == x1) ? x3 : -x2;
return x4;
}
+/*
+** test_csneg64_condasn2:
+** cmp\tx0, x1
+** csneg\tx0, x3, x2, eq
+** ret
+*/
int test_csneg_cmp(int x)
{
- /* { dg-final { scan-assembler "csneg\tw\[0-9\]" } } */
if (x > 3)
x = -x;
return x;
}
+/*
+** test_csneg_cmp:
+** cmp\tw0, 3
+** csneg\tw0, w0, w0, le
+** ret
+*/
unsigned long long
test_csneg_uxtw (unsigned int a,
unsigned int b,
unsigned int c)
{
- /* { dg-final { scan-assembler "csneg\tw\[0-9\]*.*ne" } } */
- /* { dg-final { scan-assembler-not "uxtw\tw\[0-9\]*.*" } } */
unsigned int val;
val = a ? b: -c;
return val;
}
+/*
+** test_csneg_uxtw:
+** cmp\tw0, 0
+** csneg\tw0, w1, w2, ne
+** ret
+*/
diff --git a/gcc/testsuite/gcc.target/aarch64/declare-simd-2.c b/gcc/testsuite/gcc.target/aarch64/declare-simd-2.c
index 2f4d3a8..595a172 100644
--- a/gcc/testsuite/gcc.target/aarch64/declare-simd-2.c
+++ b/gcc/testsuite/gcc.target/aarch64/declare-simd-2.c
@@ -51,11 +51,10 @@ void f05 (short a, short *b, short c)
*b += a + c;
}
-/* { dg-final { scan-assembler {_ZGVnN4ul2v_f05:} } } */
-/* { dg-final { scan-assembler {_ZGVnN4ul2v_f05:} } } */
-/* { dg-final { scan-assembler {_ZGVnM8ul2v_f05:} } } */
+/* { dg-final { scan-assembler {_ZGVnM4ul2v_f05:} } } */
/* { dg-final { scan-assembler {_ZGVnM8ul2v_f05:} } } */
+/* { dg-final { scan-assembler {_ZGVnN4ul2v_f05:} } } */
+/* { dg-final { scan-assembler {_ZGVnN8ul2v_f05:} } } */
#ifdef __cplusplus
}
#endif
-
diff --git a/gcc/testsuite/gcc.target/aarch64/flt_mov_immediate_1.c b/gcc/testsuite/gcc.target/aarch64/flt_mov_immediate_1.c
index 7b92a5a..36a1e34 100644
--- a/gcc/testsuite/gcc.target/aarch64/flt_mov_immediate_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/flt_mov_immediate_1.c
@@ -1,52 +1,74 @@
/* { dg-do compile } */
/* { dg-options "-O3" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
float f0(void)
{
float x = 0.0f;
return x;
}
+/*
+** f0:
+** movi\tv0.2s, #?0
+** ret
+*/
float fn1(void)
{
float x = -0.0f;
return x;
}
+/*
+** fn1:
+** movi\tv0.2s, 0x80, lsl 24
+** ret
+*/
float f1(void)
{
float x = 256.0f;
return x;
}
+/*
+** f1:
+** mov\t(w[0-9]+), 1132462080
+** fmov\ts0, \1
+** ret
+*/
float f2(void)
{
float x = 123256.0f;
return x;
}
+/*
+** f2:
+** mov\t(w[0-9]+), 48128
+** movk\t\1, 0x47f0, lsl 16
+** fmov\ts0, \1
+** ret
+*/
float f3(void)
{
float x = 2.0f;
return x;
}
+/*
+** f3:
+** fmov\ts0, 2\.0e\+0
+** ret
+*/
float f4(void)
{
float x = -20000.1;
return x;
}
-
-
-/* { dg-final { scan-assembler-times "movi\tv\[0-9\]+\\\.2s, ?#0" 1 } } */
-/* { dg-final { scan-assembler-times "movi\tv\[0-9\]+\\\.2s, 0x80, lsl 24" 1 } } */
-/* { dg-final { scan-assembler-times "movi\tv\[0-9\]+\\\.2s, 0x80, lsl 24" 1 } } */
-
-/* { dg-final { scan-assembler-times "mov\tw\[0-9\]+, 48128" 1 } } */
-/* { dg-final { scan-assembler-times "movk\tw\[0-9\]+, 0x47f0, lsl 16" 1 } } */
-
-/* { dg-final { scan-assembler-times "fmov\ts\[0-9\]+, 2\\\.0e\\\+0" 1 } } */
-
-/* { dg-final { scan-assembler-times "mov\tw\[0-9\]+, 16435" 1 } } */
-/* { dg-final { scan-assembler-times "movk\tw\[0-9\]+, 0xc69c, lsl 16" 1 } } */
-
+/*
+** f4:
+** mov\t(w[0-9]+), 16435
+** movk\t\1, 0xc69c, lsl 16
+** fmov\ts0, \1
+** ret
+*/
diff --git a/gcc/testsuite/gcc.target/aarch64/ldp_stp_18.c b/gcc/testsuite/gcc.target/aarch64/ldp_stp_18.c
index ea9fffc..49aa0b2 100644
--- a/gcc/testsuite/gcc.target/aarch64/ldp_stp_18.c
+++ b/gcc/testsuite/gcc.target/aarch64/ldp_stp_18.c
@@ -107,7 +107,7 @@ CONS4_FN (1, double);
CONS4_FN (2, double);
/*
-** cons2_8_double:
+** cons4_4_double:
** ...
** stp q[0-9]+, .*
** ret
@@ -115,7 +115,7 @@ CONS4_FN (2, double);
CONS4_FN (4, double);
/*
-** cons2_8_double:
+** cons4_8_double:
** ...
** stp q[0-9]+, .*
** ret
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-1.c b/gcc/testsuite/gcc.target/aarch64/mv-1.c
new file mode 100644
index 0000000..6f095ec
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-1.c
@@ -0,0 +1,43 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("default"))) int
+foo ()
+{
+ return 1;
+}
+
+__attribute__ ((target_version ("rng"))) int
+foo ()
+{
+ return 2;
+}
+
+__attribute__ ((target_version ("flagm"))) int
+foo ()
+{
+ return 3;
+}
+
+__attribute__ ((target_version ("rng+flagm"))) int
+foo ()
+{
+ return 4;
+}
+
+int
+bar ()
+{
+ return foo ();
+}
+
+/* Check usage of the first two FMV features, in case of off-by-one errors. */
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mrng:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MrngMflagm:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mflagm:\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-and-mvc-error1.c b/gcc/testsuite/gcc.target/aarch64/mv-and-mvc-error1.c
new file mode 100644
index 0000000..b08de29
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-and-mvc-error1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("dotprod"))) int
+foo () { return 3; } /* { dg-message "previous definition of .foo \\\[\\\[target_version\\(.dotprod.\\)\\\]\\\]. with type .int\\(void\\)." } */
+
+__attribute__ ((target_clones ("dotprod", "sve"))) int
+foo () { return 1; } /* { dg-error "redefinition of .foo \\\[\\\[target_clones\\(.dotprod., .sve.\\)\\\]\\\]." } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-and-mvc-error2.c b/gcc/testsuite/gcc.target/aarch64/mv-and-mvc-error2.c
new file mode 100644
index 0000000..d34b246
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-and-mvc-error2.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("default"))) int
+foo () { return 1; } /* { dg-message "previous definition of .foo \\\[\\\[target_version\\(.default.\\)\\\]\\\]. with type .int\\(void\\)." } */
+
+__attribute__ ((target_clones ("dotprod", "sve"))) float
+foo () { return 3; } /* { dg-error "conflicting types for .foo \\\[\\\[target_clones\\(.dotprod., .sve.\\)\\\]\\\].; have .float\\(void\\)." } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-and-mvc-error3.c b/gcc/testsuite/gcc.target/aarch64/mv-and-mvc-error3.c
new file mode 100644
index 0000000..a6a45bd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-and-mvc-error3.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+float foo () { return 1; } /* { dg-message "previous definition of .foo." } */
+
+__attribute__ ((target_clones ("default", "dotprod", "sve"))) float
+foo () { return 3; } /* { dg-error "redefinition of .foo \\\[\\\[target_clones\\(.default., .dotprod., .sve.\\)\\\]\\\]." } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-and-mvc1.c b/gcc/testsuite/gcc.target/aarch64/mv-and-mvc1.c
new file mode 100644
index 0000000..39ed306
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-and-mvc1.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__((target_version("default")))
+int foo ()
+{
+ return 0;
+}
+
+__attribute__((target_clones("dotprod", "sve+sve2")))
+int foo ()
+{
+ return 1;
+}
+
+__attribute__((target_clones("sve", "sve2")))
+int foo ()
+{
+ return 2;
+}
+
+int bar()
+{
+ return foo ();
+}
+
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Msve:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Msve2:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-and-mvc2.c b/gcc/testsuite/gcc.target/aarch64/mv-and-mvc2.c
new file mode 100644
index 0000000..17c7cbd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-and-mvc2.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__((target_version("default")))
+int foo ();
+
+__attribute__((target_clones("dotprod", "sve+sve2")))
+int foo ()
+{
+ return 1;
+}
+
+__attribute__((target_clones("sve", "sve2")))
+int foo ()
+{
+ return 2;
+}
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Msve:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Msve2:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 0 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 0 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-and-mvc3.c b/gcc/testsuite/gcc.target/aarch64/mv-and-mvc3.c
new file mode 100644
index 0000000..8325c8e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-and-mvc3.c
@@ -0,0 +1,40 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__((target_clones("dotprod", "sve+sve2")))
+int foo ();
+
+__attribute__((target_version("default")))
+int foo ()
+{
+ return 0;
+}
+
+__attribute__((target_clones("sve", "sve2")))
+int foo ()
+{
+ return 2;
+}
+
+int bar()
+{
+ return foo ();
+}
+
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Msve:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Msve2:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */
+// { dg-final { scan-assembler-times "\n\tadrp\tx\[0-9\]+, foo\.default\n" 1 } }
+/* { dg-final { scan-assembler-times "\n\tadrp\tx\[0-9\]+, foo\._Mdotprod\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx\[0-9\]+, foo\._MsveMsve2\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx\[0-9\]+, foo\._Msve\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx\[0-9\]+, foo\._Msve2\n" 1 } } */
+
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-and-mvc4.c b/gcc/testsuite/gcc.target/aarch64/mv-and-mvc4.c
new file mode 100644
index 0000000..951c950
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-and-mvc4.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__((target_version("dotprod")))
+int foo ()
+{
+ return 0;
+}
+
+__attribute__((target_clones("default", "sve+sve2")))
+int foo ()
+{
+ return 1;
+}
+
+__attribute__((target_clones("sve", "sve2")))
+int foo ()
+{
+ return 2;
+}
+
+int bar()
+{
+ return foo ();
+}
+
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Msve:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Msve2:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-error1.c b/gcc/testsuite/gcc.target/aarch64/mv-error1.c
new file mode 100644
index 0000000..61c9af2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-error1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("default"))) int
+foo ();
+
+__attribute__ ((target_version ("default"))) int
+foo () { return 1; } /* { dg-message "previous definition of .foo \\\[\\\[target_version\\(.default.\\)\\\]\\\]. with type .int\\(void\\)." } */
+
+__attribute__ ((target_version ("dotprod"))) float
+foo () { return 3; } /* { dg-error "conflicting types for .foo \\\[\\\[target_version\\(.dotprod.\\)\\\]\\\].; have .float\\(void\\)." } */
+
+__attribute__ ((target_version ("sve"))) int
+foo2 () { return 1; } /* { dg-message "previous definition of .foo2 \\\[\\\[target_version\\(.sve.\\)\\\]\\\]. with type .int\\(void\\)." } */
+
+__attribute__ ((target_version ("dotprod"))) float
+foo2 () { return 3; } /* { dg-error "conflicting types for .foo2 \\\[\\\[target_version\\(.dotprod.\\)\\\]\\\].; have .float\\(void\\)." } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-error10.c b/gcc/testsuite/gcc.target/aarch64/mv-error10.c
new file mode 100644
index 0000000..218f103
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-error10.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+void
+bar ()
+{
+ __attribute__ ((target_version ("dotprod"))) int
+ foo1 (); /* { dg-message "versioned declarations are only allowed at file scope" } */
+
+ __attribute__ ((target_version ("simd"))) int
+ foo2 () { return 1; } /* { dg-message "versioned definitions are only allowed at file scope" } */
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-error11.c b/gcc/testsuite/gcc.target/aarch64/mv-error11.c
new file mode 100644
index 0000000..0fdd660
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-error11.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+int fn () asm("name");
+int fn () { return 1; } /* { dg-error "cannot use function multiversioning on a renamed function" } */
+int fn [[gnu::target_version("sve")]] () { return 1; }
+
+int fn2 [[gnu::target_version("sve")]] () asm("name"); /* { dg-warning ".asm. declaration ignored due to conflict with previous rename" } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-error12.c b/gcc/testsuite/gcc.target/aarch64/mv-error12.c
new file mode 100644
index 0000000..45da85a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-error12.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+/* { dg-require-ifunc "" } */
+
+#pragma omp declare simd
+int fn [[gnu::target_version("sve")]] () { return 1; } /* { dg-error ".#pragma omp declare simd. cannot be used with function multi-versioning" } */
+
+#pragma omp declare simd
+int fn2 () { return 1; }
+
+int fn2 [[gnu::target_version("sve")]] (); /* { dg-warning "ignoring attribute .target_version. because it conflicts with attribute .omp declare simd." } */
+
+int fn3 [[gnu::target_version("sve")]] [[gnu::simd]] () { return 1; } /* { dg-warning "ignoring attribute .simd. because it conflicts with attribute .target_version." } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-error2.c b/gcc/testsuite/gcc.target/aarch64/mv-error2.c
new file mode 100644
index 0000000..19d961d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-error2.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("dotprod"))) float
+foo () { return 3; } /* { dg-message "previous definition of .foo \\\[\\\[target_version\\(.dotprod.\\)\\\]\\\]. with type .float\\(void\\)." } */
+
+__attribute__ ((target_version ("dotprod"))) float
+foo () { return 3; } /* { dg-error "redefinition of .foo \\\[\\\[target_version\\(.dotprod.\\)\\\]\\\]." } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-error3.c b/gcc/testsuite/gcc.target/aarch64/mv-error3.c
new file mode 100644
index 0000000..451ce02
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-error3.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("dotprod"))) float
+foo () { return 3; }
+
+__attribute__ ((target_version ("default"))) float
+foo () { return 3; } /* { dg-message "previous definition of .foo \\\[\\\[target_version\\(.default.\\)\\\]\\\]. with type .float\\(void\\)." } */
+
+__attribute__ ((target_version ("default"))) float
+foo () { return 3; } /* { dg-error "redefinition of .foo \\\[\\\[target_version\\(.default.\\)\\\]\\\]." } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-error4.c b/gcc/testsuite/gcc.target/aarch64/mv-error4.c
new file mode 100644
index 0000000..44d3195
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-error4.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("test"))) float
+foo () { return 3; } /* { dg-error "invalid feature modifier .test. of value .test. in .target_version. attribute" } */
+
+__attribute__ ((target_version ("sve+test"))) float
+foo2 () { return 3; } /* { dg-error "invalid feature modifier .test. of value .sve.test. in .target_version. attribute" } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-error5.c b/gcc/testsuite/gcc.target/aarch64/mv-error5.c
new file mode 100644
index 0000000..776b80a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-error5.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("sve+sve2"))) int
+foo(); /* { dg-message "previous declaration of .foo \\\[\\\[target_version\\(.sve\\\+sve2.\\)\\\]\\\]. with type .int\\(void\\)." } */
+
+int bar () { return foo (); } /* { dg-error "implicit declaration of function .foo." } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-error6.c b/gcc/testsuite/gcc.target/aarch64/mv-error6.c
new file mode 100644
index 0000000..afc71a4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-error6.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("sve+sve2"))) int
+foo () {
+ return 1;
+}
+
+__attribute__ ((target_version ("sve"))) int
+foo () { /* { dg-message "previous definition of .foo \\\[\\\[target_version\\(.sve.\\)\\\]\\\]. with type .int\\(void\\)." } */
+ return 1;
+}
+
+int bar () { return foo (); } /* { dg-error "implicit declaration of function .foo." } */
+
+__attribute__ ((target_version ("sve+sve2"))) int
+foo2(); /* { dg-message "previous declaration of .foo2 \\\[\\\[target_version\\(.sve\\\+sve2.\\)\\\]\\\]. with type .int\\(void\\)." } */
+
+int bar2 () { return foo2 (); } /* { dg-error "implicit declaration of function .foo2." } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-error7.c b/gcc/testsuite/gcc.target/aarch64/mv-error7.c
new file mode 100644
index 0000000..68db978
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-error7.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("dotprod"))) int
+foo (); /* { dg-message "previous declaration of .foo \\\[\\\[target_version\\(.dotprod.\\)\\\]\\\]. with type .int\\(void\\)." } */
+
+__attribute__ ((target_version ("sve+sve2"))) int
+foo ();
+
+int bar () { return foo (); } /* { dg-error "implicit declaration of function .foo." } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-error8.c b/gcc/testsuite/gcc.target/aarch64/mv-error8.c
new file mode 100644
index 0000000..7599df1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-error8.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("default"))) int
+foo (int a, int (*b)[4]) { return 1; }
+
+int bar(void) {
+ __attribute__ ((target_version ("dotprod"))) int
+ foo (int a, int (*b)[5]) { return 3; } /* { dg-error "versioned definitions are only allowed at file scope" } */
+
+ return 1;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-error9.c b/gcc/testsuite/gcc.target/aarch64/mv-error9.c
new file mode 100644
index 0000000..dc982e9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-error9.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("dotprod"))) int
+foo (); /* { dg-message "previous declaration of .foo \\\[\\\[target_version\\(.dotprod.\\)\\\]\\\]. with type .int\\(void\\)." } */
+
+int
+bar ()
+{
+ return foo (); /* { dg-error "implicit declaration of function .foo." } */
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols1.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols1.c
new file mode 100644
index 0000000..7982278
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols1.c
@@ -0,0 +1,38 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+// Basic case of fmv correctness with all functions and use in one TU.
+
+__attribute__ ((target_version ("default"))) int
+foo ()
+{
+ return 1;
+}
+
+__attribute__ ((target_version ("dotprod"))) int
+foo ()
+{
+ return 3;
+}
+__attribute__ ((target_version ("sve+sve2"))) int
+foo ()
+{
+ return 5;
+}
+
+int
+bar ()
+{
+ return foo ();
+}
+
+/* When updating any of the symbol names in these tests, make sure to also
+ update any tests for their absence in mv-symbolsN.C */
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols10.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols10.c
new file mode 100644
index 0000000..d525638
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols10.c
@@ -0,0 +1,42 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+int
+foo ();
+
+int
+foo ()
+{
+ return 1;
+}
+
+__attribute__ ((target_version ("dotprod"))) int
+foo ()
+{
+ return 3;
+}
+__attribute__ ((target_version ("sve+sve2"))) int
+foo ()
+{
+ return 5;
+}
+
+int
+bar ()
+{
+ return foo ();
+}
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx., foo\._MsveMsve2\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx., foo\._Mdotprod\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx., foo\.default\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols11.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols11.c
new file mode 100644
index 0000000..fd3dc34
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols11.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+// Check that types can be combined
+
+__attribute__ ((target_version ("default"))) int
+foo (int a, int (*b)[4]) { return 1; }
+
+__attribute__ ((target_version ("dotprod"))) int
+foo (int a, int (*b)[]) { return 3; }
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols12.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols12.c
new file mode 100644
index 0000000..1a0b667
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols12.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("default"))) int
+foo () { return 1; }
+
+__attribute__ ((target_version ("dotprod"))) int
+foo () { return 3; }
+
+int bar ()
+{
+ int (*test)() = foo;
+
+ test();
+}
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx\[0-9\], foo\._Mdotprod\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx\[0-9\], foo\.default\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\n\tadrp\tx\[0-9\]+, foo\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols13.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols13.c
new file mode 100644
index 0000000..308dace
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols13.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("default"))) int
+foo ();
+
+int bar ()
+{
+ int (*test)() = foo;
+
+ test();
+}
+
+__attribute__ ((target_version ("dotprod"))) int
+foo () { return 3; }
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx\[0-9\], foo\._Mdotprod\n" 0 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx\[0-9\], foo\.default\n" 0 } } */
+
+/* { dg-final { scan-assembler-times "\n\tadrp\tx\[0-9\]+, foo\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 0 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 0 } } */
+
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols14.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols14.c
new file mode 100644
index 0000000..d1af69f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols14.c
@@ -0,0 +1,34 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+int foo ();
+
+__attribute__ ((target_version ("default"))) int
+foo ()
+{
+ return 1;
+}
+
+__attribute__ ((target_version ("dotprod"))) int
+foo ()
+{
+ return 3;
+}
+
+int
+bar ()
+{
+ return foo ();
+}
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx., foo\._Mdotprod\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx., foo\.default\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols2.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols2.c
new file mode 100644
index 0000000..a8732ca
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols2.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+// FMV correctness with definitions but no call
+
+__attribute__ ((target_version ("default"))) int
+foo ()
+{
+ return 1;
+}
+
+__attribute__ ((target_version ("dotprod"))) int
+foo ()
+{
+ return 3;
+}
+__attribute__ ((target_version ("sve+sve2"))) int
+foo ()
+{
+ return 5;
+}
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols3.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols3.c
new file mode 100644
index 0000000..962bae9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols3.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+// FMV correctness with declarations but no implementation
+
+__attribute__ ((target_version ("default"))) int
+foo ();
+
+__attribute__ ((target_version ("dotprod"))) int
+foo ();
+
+__attribute__ ((target_version ("sve+sve2"))) int
+foo ();
+
+int
+bar ()
+{
+ return foo ();
+}
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 0 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 0 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols4.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols4.c
new file mode 100644
index 0000000..a476800
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols4.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+// FMV correctness with a default implementation and declarations of other
+// versions
+
+__attribute__ ((target_version ("default"))) int
+foo ()
+{
+ return 1;
+}
+
+__attribute__ ((target_version ("dotprod"))) int
+foo ();
+
+__attribute__ ((target_version ("sve+sve2"))) int
+foo ();
+
+int
+bar ()
+{
+ return foo ();
+}
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols5.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols5.c
new file mode 100644
index 0000000..4df2000
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols5.c
@@ -0,0 +1,36 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+// FMV correctness with default declaration, and implementations of other
+// versions.
+
+__attribute__ ((target_version ("default"))) int
+foo ();
+
+__attribute__ ((target_version ("dotprod"))) int
+foo ()
+{
+ return 3;
+}
+__attribute__ ((target_version ("sve+sve2"))) int
+foo ()
+{
+ return 5;
+}
+
+int
+bar ()
+{
+ return foo ();
+}
+
+/* When updating any of the symbol names in these tests, make sure to also
+ update any tests for their absence in mvc-symbolsN.C */
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 0 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 0 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols6.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols6.c
new file mode 100644
index 0000000..cbf8bca
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols6.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("default"))) int
+foo ()
+{
+ return 1;
+}
+
+int bar()
+{
+ return foo();
+}
+
+/* { dg-final { scan-assembler-times "\nfoo:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 0 } } */
+/* { dg-final { scan-assembler-times "bl\tfoo.default\n" 1 } } */
+/* { dg-final { scan-assembler-times ".global\tfoo\n" 1 } } */
+/* { dg-final { scan-assembler-times ".set\tfoo,foo.default\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols7.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols7.c
new file mode 100644
index 0000000..2ea4d2e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols7.c
@@ -0,0 +1,47 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("dotprod"))) int
+foo ();
+
+__attribute__ ((target_version ("sve+sve2"))) int
+foo ();
+
+__attribute__ ((target_version ("default"))) int
+foo ();
+
+int
+bar ()
+{
+ return foo ();
+}
+
+__attribute__ ((target_version ("sve+sve2"))) int
+foo ()
+{
+ return 5;
+}
+__attribute__ ((target_version ("dotprod"))) int
+foo ()
+{
+ return 3;
+}
+__attribute__ ((target_version ("default"))) int
+foo ()
+{
+ return 1;
+}
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx., foo\._MsveMsve2\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx., foo\._Mdotprod\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx., foo\.default\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols8.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols8.c
new file mode 100644
index 0000000..3e3eaf2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols8.c
@@ -0,0 +1,47 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("dotprod"))) int
+foo ();
+
+__attribute__ ((target_version ("sve+sve2"))) int
+foo ();
+
+__attribute__ ((target_version ("default"))) int
+foo ();
+
+__attribute__ ((target_version ("sve+sve2"))) int
+foo ()
+{
+ return 5;
+}
+__attribute__ ((target_version ("dotprod"))) int
+foo ()
+{
+ return 3;
+}
+__attribute__ ((target_version ("default"))) int
+foo ()
+{
+ return 1;
+}
+
+int
+bar ()
+{
+ return foo ();
+}
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx., foo\._MsveMsve2\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx., foo\._Mdotprod\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx., foo\.default\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols9.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols9.c
new file mode 100644
index 0000000..8e0864f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols9.c
@@ -0,0 +1,44 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_version ("dotprod"))) int
+foo ();
+__attribute__ ((target_version ("sve+sve2"))) int
+foo ();
+
+int
+foo ()
+{
+ return 1;
+}
+
+__attribute__ ((target_version ("dotprod"))) int
+foo ()
+{
+ return 3;
+}
+__attribute__ ((target_version ("sve+sve2"))) int
+foo ()
+{
+ return 5;
+}
+
+int
+bar ()
+{
+ return foo ();
+}
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx., foo\._MsveMsve2\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx., foo\._Mdotprod\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tadrp\tx., foo\.default\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */
+
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mvc-error1.c b/gcc/testsuite/gcc.target/aarch64/mvc-error1.c
new file mode 100644
index 0000000..482d0a7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mvc-error1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_clones ("default, dotprod"))) float
+foo (); /* { dg-message "previous declaration of .foo \\\[\\\[target_clones\\(.default., .dotprod.\\)\\\]\\\]." } */
+
+__attribute__ ((target_clones ("dotprod", "sve"))) float
+foo () { return 3; } /* { dg-error ".foo \\\[\\\[target_clones\\(.dotprod., .sve.\\)\\\]\\\]. conflicts with overlapping .target_clone. declaration" } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mvc-error2.c b/gcc/testsuite/gcc.target/aarch64/mvc-error2.c
new file mode 100644
index 0000000..482d0a7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mvc-error2.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_clones ("default, dotprod"))) float
+foo (); /* { dg-message "previous declaration of .foo \\\[\\\[target_clones\\(.default., .dotprod.\\)\\\]\\\]." } */
+
+__attribute__ ((target_clones ("dotprod", "sve"))) float
+foo () { return 3; } /* { dg-error ".foo \\\[\\\[target_clones\\(.dotprod., .sve.\\)\\\]\\\]. conflicts with overlapping .target_clone. declaration" } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mvc-symbols1.c b/gcc/testsuite/gcc.target/aarch64/mvc-symbols1.c
new file mode 100644
index 0000000..3ad15e5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mvc-symbols1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_clones ("default", "dotprod", "sve+sve2"))) int
+foo ()
+{
+ return 1;
+}
+
+int
+bar ()
+{
+ return foo ();
+}
+
+/* When updating any of the symbol names in these tests, make sure to also
+ update any tests for their absence in mvc-symbolsN.C */
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mvc-symbols2.c b/gcc/testsuite/gcc.target/aarch64/mvc-symbols2.c
new file mode 100644
index 0000000..78385ed
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mvc-symbols2.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_clones ("default", "dotprod", "sve+sve2"))) int
+foo ()
+{
+ return 1;
+}
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mvc-symbols3.c b/gcc/testsuite/gcc.target/aarch64/mvc-symbols3.c
new file mode 100644
index 0000000..1cbe3fd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mvc-symbols3.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_clones ("default", "dotprod", "sve+sve2"))) int
+foo ();
+
+int
+bar ()
+{
+ return foo ();
+}
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 0 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 0 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mvc-symbols4.c b/gcc/testsuite/gcc.target/aarch64/mvc-symbols4.c
new file mode 100644
index 0000000..abaf60f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mvc-symbols4.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+__attribute__ ((target_clones ("default", "dotprod", "sve+sve2"))) int
+foo ();
+
+/* { dg-final { scan-assembler-times "\nfoo\.default:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 0 } } */
+/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 0 } } */
+/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 0 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mvc-warning1.c b/gcc/testsuite/gcc.target/aarch64/mvc-warning1.c
new file mode 100644
index 0000000..1bae38c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mvc-warning1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O0" } */
+
+__attribute__((target_clones("default", "dotprod", "sve+sve2")))
+int foo () {
+ return 1;
+}
+
+__attribute__((target_clones("invalid1")))
+int foo () { /* { dg-warning "invalid feature modifier .invalid1. in version .invalid1. for .target_clones. attribute" } */
+ return 2;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/ror_2.c b/gcc/testsuite/gcc.target/aarch64/ror_2.c
index 796c122..fbea839 100644
--- a/gcc/testsuite/gcc.target/aarch64/ror_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/ror_2.c
@@ -175,8 +175,8 @@ tst2 (unsigned x, unsigned y)
int
tst3 (unsigned x, unsigned y)
{
- /* { dg-final { scan-assembler "tst\tw\[0-9\]+, w\[0-9\]+, ror 20\n" } } */
- return ((unsigned long)x & ROR (y, 20)) == 0;
+ /* { dg-final { scan-assembler "tst\tw\[0-9\]+, w\[0-9\]+, ror 21\n" } } */
+ return ((unsigned long)x & ROR (y, 21)) == 0;
}
int
@@ -189,15 +189,15 @@ bics1 (unsigned x, unsigned y)
int
bics2 (unsigned x, unsigned y)
{
- /* { dg-final { scan-assembler "bics\twzr, w\[0-9\]+, w\[0-9\]+, ror 21\n" } } */
- return (x & ~ROR (y, 21)) == 0;
+ /* { dg-final { scan-assembler "bics\twzr, w\[0-9\]+, w\[0-9\]+, ror 22\n" } } */
+ return (x & ~ROR (y, 22)) == 0;
}
int
bics3 (unsigned x, unsigned y)
{
- /* { dg-final { scan-assembler "bics\twzr, w\[0-9\]+, w\[0-9\]+, ror 21\n" } } */
- return (x & (unsigned long)~ROR (y, 21)) == 0;
+ /* { dg-final { scan-assembler "bics\twzr, w\[0-9\]+, w\[0-9\]+, ror 23\n" } } */
+ return (x & (unsigned long)~ROR (y, 23)) == 0;
}
/* { dg-final { scan-assembler-not "cmp" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c b/gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c
index dcf9dc7..094aaff 100644
--- a/gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c
+++ b/gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c
@@ -913,7 +913,7 @@ test_vrsrad_n_s64 (int64_t a, int64_t b)
return vrsrad_n_s64 (a, b, 3);
}
-/* { dg-final { scan-assembler-times "\\tsrsra\\td\[0-9\]+" 1 } } */
+/* { dg-final { scan-assembler-times "\\tursra\\td\[0-9\]+" 1 } } */
uint64_t
test_vrsrad_n_u64 (uint64_t a, uint64_t b)
diff --git a/gcc/testsuite/gcc.target/aarch64/scalar_shift_1.c b/gcc/testsuite/gcc.target/aarch64/scalar_shift_1.c
index 7be1b12..e715f19 100644
--- a/gcc/testsuite/gcc.target/aarch64/scalar_shift_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/scalar_shift_1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -fno-inline -save-temps" } */
-
+/* { dg-final { check-function-bodies "**" "" "" } } */
extern void abort ();
#define force_simd_di(v) asm volatile ("mov %d0, %1.d[0]" :"=w" (v) :"w" (v) :)
@@ -23,8 +23,13 @@ test_lshift_left_sisd_di (UInt64x1 b, UInt64x1 c)
force_simd_di (a);
return a;
}
-/* { dg-final { scan-assembler "shl\td\[0-9\]+,\ d\[0-9\]+,\ 8" } } */
-/* { dg-final { scan-assembler "ushl\td\[0-9\]+,\ d\[0-9\]+,\ d\[0-9\]+" } } */
+/*
+** test_lshift_left_sisd_di:
+** ...
+** shl\t(d[0-9]+), d[0-9]+, 8
+** ushl\td[0-9]+, \1, d[0-9]+
+** ...
+*/
UInt32x1
test_lshift_left_sisd_si (UInt32x1 b, UInt32x1 c)
@@ -38,8 +43,13 @@ test_lshift_left_sisd_si (UInt32x1 b, UInt32x1 c)
force_simd_si (a);
return a;
}
-/* { dg-final { scan-assembler "shl\tv\[0-9\]+\.2s,\ v\[0-9\]+\.2s,\ 4" } } */
-/* "ushl\tv\[0-9\]+\.2s,\ v\[0-9\]+\.2s,\ v\[0-9\]+\.2s" (counted later) */
+/*
+** test_lshift_left_sisd_si:
+** ...
+** shl\t(v[0-9]+\.2s), v[0-9]+\.2s, 4
+** ushl\tv[0-9]+\.2s, \1, v[0-9]+\.2s
+** ...
+*/
UInt64x1
test_lshift_right_sisd_di (UInt64x1 b, UInt64x1 c)
@@ -53,9 +63,14 @@ test_lshift_right_sisd_di (UInt64x1 b, UInt64x1 c)
force_simd_di (a);
return a;
}
-/* { dg-final { scan-assembler "ushr\td\[0-9\]+,\ d\[0-9\]+,\ 8" } } */
-/* "neg\td\[0-9\]+,\ d\[0-9\]+" (counted later) */
-/* { dg-final { scan-assembler "ushl\td\[0-9\]+,\ d\[0-9\]+,\ d\[0-9\]+" } } */
+/*
+** test_lshift_right_sisd_di:
+** ...
+** ushr\t(d[0-9]+), d[0-9]+, 8
+** neg\t(d[0-9]+), d[0-9]+
+** ushl\td[0-9]+, \1, \2
+** ...
+*/
UInt64x1
test_lshift_right_sisd_si (UInt32x1 b, UInt32x1 c)
@@ -69,9 +84,14 @@ test_lshift_right_sisd_si (UInt32x1 b, UInt32x1 c)
force_simd_si (a);
return a;
}
-/* { dg-final { scan-assembler "ushr\tv\[0-9\]+\.2s,\ v\[0-9\]+\.2s,\ 4" } } */
-/* "neg\td\[0-9\]+,\ d\[0-9\]+" (counted later) */
-/* { dg-final { scan-assembler-times "ushl\tv\[0-9\]+\.2s,\ v\[0-9\]+\.2s,\ v\[0-9\]+\.2s" 2 } } */
+/*
+** test_lshift_right_sisd_si:
+** ...
+** ushr\t(v[0-9]+\.2s), v[0-9]+\.2s, 4
+** neg\td([0-9]+), d[0-9]+
+** ushl\tv[0-9]+\.2s, \1, v\2\.2s
+** ...
+*/
Int64x1
test_ashift_right_sisd_di (Int64x1 b, Int64x1 c)
@@ -85,9 +105,14 @@ test_ashift_right_sisd_di (Int64x1 b, Int64x1 c)
force_simd_di (a);
return a;
}
-/* { dg-final { scan-assembler "sshr\td\[0-9\]+,\ d\[0-9\]+,\ 8" } } */
-/* "neg\td\[0-9\]+,\ d\[0-9\]+" (counted later) */
-/* { dg-final { scan-assembler "sshl\td\[0-9\]+,\ d\[0-9\]+,\ d\[0-9\]+" } } */
+/*
+** test_ashift_right_sisd_di:
+** ...
+** sshr\t(d[0-9]+), d[0-9]+, 8
+** neg\t(d[0-9]+), d[0-9]+
+** sshl\td[0-9]+, \1, \2
+** ...
+*/
Int32x1
test_ashift_right_sisd_si (Int32x1 b, Int32x1 c)
@@ -101,10 +126,14 @@ test_ashift_right_sisd_si (Int32x1 b, Int32x1 c)
force_simd_si (a);
return a;
}
-/* { dg-final { scan-assembler "sshr\tv\[0-9\]+\.2s,\ v\[0-9\]+\.2s,\ 4" } } */
-/* { dg-final { scan-assembler-times "neg\td\[0-9\]+,\ d\[0-9\]+" 4 } } */
-/* { dg-final { scan-assembler "sshl\tv\[0-9\]+\.2s,\ v\[0-9\]+\.2s,\ v\[0-9\]+\.2s" } } */
-
+/*
+** test_ashift_right_sisd_si:
+** ...
+** sshr\t(v[0-9]+\.2s), v[0-9]+\.2s, 4
+** neg\td([0-9]+), d[0-9]+
+** sshl\tv[0-9]+\.2s, \1, v\2\.2s
+** ...
+*/
/* The following are to make sure if the integer instructions lsl/lsr/asr are
generated in non-vector scenarios */
@@ -118,8 +147,12 @@ test_lshift_left_int_di (UInt64x1 b, UInt64x1 c)
a = a << c;
return a;
}
-/* { dg-final { scan-assembler "lsl\tx\[0-9\]+,\ x\[0-9\]+,\ 8" } } */
-/* { dg-final { scan-assembler "lsl\tx\[0-9\]+,\ x\[0-9\]+,\ x\[0-9\]+" } } */
+/*
+** test_lshift_left_int_di:
+** lsl\t(x[0-9]+), x0, 8
+** lsl\tx0, \1, x1
+** ret
+*/
UInt32x1
test_lshift_left_int_si (UInt32x1 b, UInt32x1 c)
@@ -130,8 +163,12 @@ test_lshift_left_int_si (UInt32x1 b, UInt32x1 c)
a = a << c;
return a;
}
-/* { dg-final { scan-assembler "lsl\tw\[0-9\]+,\ w\[0-9\]+,\ 4" } } */
-/* { dg-final { scan-assembler "lsl\tw\[0-9\]+,\ w\[0-9\]+,\ w\[0-9\]+" } } */
+/*
+** test_lshift_left_int_si:
+** lsl\t(w[0-9]+), w0, 4
+** lsl\tw0, \1, w1
+** ret
+*/
UInt64x1
test_lshift_right_int_di (UInt64x1 b, UInt64x1 c)
@@ -142,8 +179,12 @@ test_lshift_right_int_di (UInt64x1 b, UInt64x1 c)
a = a >> c;
return a;
}
-/* { dg-final { scan-assembler "lsr\tx\[0-9\]+,\ x\[0-9\]+,\ 8" } } */
-/* { dg-final { scan-assembler "lsr\tx\[0-9\]+,\ x\[0-9\]+,\ x\[0-9\]+" } } */
+/*
+** test_lshift_right_int_di:
+** lsr\t(x[0-9]+), x0, 8
+** lsr\tx0, \1, x1
+** ret
+*/
UInt32x1
test_lshift_right_int_si (UInt32x1 b, UInt32x1 c)
@@ -154,8 +195,12 @@ test_lshift_right_int_si (UInt32x1 b, UInt32x1 c)
a = a >> c;
return a;
}
-/* { dg-final { scan-assembler "lsr\tw\[0-9\]+,\ w\[0-9\]+,\ 4" } } */
-/* { dg-final { scan-assembler "lsr\tw\[0-9\]+,\ w\[0-9\]+,\ w\[0-9\]+" } } */
+/*
+** test_lshift_right_int_si:
+** lsr\t(w[0-9]+), w0, 4
+** lsr\tw0, \1, w1
+** ret
+*/
Int64x1
test_ashift_right_int_di (Int64x1 b, Int64x1 c)
@@ -166,8 +211,12 @@ test_ashift_right_int_di (Int64x1 b, Int64x1 c)
a = a >> c;
return a;
}
-/* { dg-final { scan-assembler "asr\tx\[0-9\]+,\ x\[0-9\]+,\ 8" } } */
-/* { dg-final { scan-assembler "asr\tx\[0-9\]+,\ x\[0-9\]+,\ x\[0-9\]+" } } */
+/*
+** test_ashift_right_int_di:
+** asr\t(x[0-9]+), x0, 8
+** asr\tx0, \1, x1
+** ret
+*/
Int32x1
test_ashift_right_int_si (Int32x1 b, Int32x1 c)
@@ -178,8 +227,12 @@ test_ashift_right_int_si (Int32x1 b, Int32x1 c)
a = a >> c;
return a;
}
-/* { dg-final { scan-assembler "asr\tw\[0-9\]+,\ w\[0-9\]+,\ 4" } } */
-/* { dg-final { scan-assembler "asr\tw\[0-9\]+,\ w\[0-9\]+,\ w\[0-9\]+" } } */
+/*
+** test_ashift_right_int_si:
+** asr\t(w[0-9]+), w0, 4
+** asr\tw0, \1, w1
+** ret
+*/
#define CHECK(var,val) \
do \
@@ -225,4 +278,3 @@ main ()
return 0;
}
-
diff --git a/gcc/testsuite/gcc.target/aarch64/simd/fold_to_highpart_5.c b/gcc/testsuite/gcc.target/aarch64/simd/fold_to_highpart_5.c
index 4f39b67..1b72527 100644
--- a/gcc/testsuite/gcc.target/aarch64/simd/fold_to_highpart_5.c
+++ b/gcc/testsuite/gcc.target/aarch64/simd/fold_to_highpart_5.c
@@ -68,8 +68,8 @@
/* { dg-final { scan-assembler-times {ssubl2\t} 3} } */
/* { dg-final { scan-assembler-times {usubl2\t} 3} } */
-/* { dg-final { scan-assembler-times {sabdl2\t} 3} } */
-/* { dg-final { scan-assembler-times {uabdl2\t} 3} } */
+/* { dg-final { scan-assembler-times {sabal2\t} 3} } */
+/* { dg-final { scan-assembler-times {uabal2\t} 3} } */
/* { dg-final { scan-assembler-times {saddw2\t} 3} } */
/* { dg-final { scan-assembler-times {uaddw2\t} 3} } */
diff --git a/gcc/testsuite/gcc.target/aarch64/singleton_intrinsics_1.c b/gcc/testsuite/gcc.target/aarch64/singleton_intrinsics_1.c
index 1f21bd3..2736015 100644
--- a/gcc/testsuite/gcc.target/aarch64/singleton_intrinsics_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/singleton_intrinsics_1.c
@@ -298,7 +298,7 @@ test_vrsra_n_s64 (int64x1_t a, int64x1_t b)
return vrsra_n_s64 (a, b, 3);
}
-/* { dg-final { scan-assembler-times "\\tsrsra\\td\[0-9\]+" 1 } } */
+/* { dg-final { scan-assembler-times "\\tursra\\td\[0-9\]+" 1 } } */
uint64x1_t
test_vrsra_n_u64 (uint64x1_t a, uint64x1_t b)
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/arith_1.c b/gcc/testsuite/gcc.target/aarch64/sve/arith_1.c
index c2e1f6c..785b4cc 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/arith_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/arith_1.c
@@ -85,7 +85,7 @@ DO_ARITH_OPS (int64_t, -, minus)
/* { dg-final { scan-assembler-not {\tadd\tz[0-9]+\.d, z[0-9]+\.d, #-1\n} } } */
/* { dg-final { scan-assembler-times {\tsub\tz[0-9]+\.d, z[0-9]+\.d, #1\n} 1 } } */
-/* { dg-final { scan-assembler-not {\tsub\tz[0-9]+\.b, z[0-9]+\.b, #1\n} } } */
+/* Asserted above { scan-assembler-not {\tsub\tz[0-9]+\.b, z[0-9]+\.b, #1\n} } */
/* { dg-final { scan-assembler-not {\tsub\tz[0-9]+\.b, z[0-9]+\.b, #5\n} } } */
/* { dg-final { scan-assembler-not {\tsub\tz[0-9]+\.b, z[0-9]+\.b, #255\n} } } */
/* { dg-final { scan-assembler-not {\tsub\tz[0-9]+\.b, z[0-9]+\.b, #256\n} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_1.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_1.c
index d0db090..e68d5a4 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_1.c
@@ -38,10 +38,6 @@ TEST_ALL (DEF_LOOP)
/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #1\.0\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
-
/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.h, #2\.0} 1 } } */
/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.s, #2\.0} 1 } } */
/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.d, #2\.0} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_3.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_3.c
index 741f8f6..0ef8991 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_3.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_3.c
@@ -47,8 +47,8 @@ TEST_ALL (DEF_LOOP)
/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, z[0-9]+\.d\n} 1 } } */
/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
-/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
-/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.s, p[0-7], z[0-9]+\.s, z[0-9]+\.s\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.d, p[0-7], z[0-9]+\.d, z[0-9]+\.d\n} 3 } } */
/* { dg-final { scan-assembler-not {\tmovprfx\t} } } */
/* { dg-final { scan-assembler-not {\tmov\tz} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_5.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_5.c
index 4bae7e0..836cd2c 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_5.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_5.c
@@ -11,10 +11,6 @@
/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #1\.0\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
-
/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.h, #2\.0} 1 } } */
/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.s, #2\.0} 1 } } */
/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.d, #2\.0} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_7.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_7.c
index 30f07f6..9331d9e 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_7.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_7.c
@@ -20,8 +20,8 @@
/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, z[0-9]+\.d\n} 1 } } */
/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
-/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
-/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.s, p[0-7], z[0-9]+\.s, z[0-9]+\.s\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.d, p[0-7], z[0-9]+\.d, z[0-9]+\.d\n} 3 } } */
/* { dg-final { scan-assembler-not {\tmovprfx\t} } } */
/* { dg-final { scan-assembler-not {\tmov\tz} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_1.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_1.c
index d667b20..f6f5839 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_1.c
@@ -12,10 +12,6 @@
/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #1\.0\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
-
/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.h, #2\.0} 1 } } */
/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.s, #2\.0} 1 } } */
/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.d, #2\.0} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_3.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_3.c
index d39dd18..01d96ec 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_3.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_3.c
@@ -21,8 +21,8 @@
/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, z[0-9]+\.d\n} 1 } } */
/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
-/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
-/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.s, p[0-7], z[0-9]+\.s, z[0-9]+\.s\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.d, p[0-7], z[0-9]+\.d, z[0-9]+\.d\n} 3 } } */
/* { dg-final { scan-assembler-not {\tmovprfx\t} } } */
/* { dg-final { scan-assembler-not {\tmov\tz} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_5.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_5.c
index 290c4be..9865f08 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_5.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_5.c
@@ -12,10 +12,6 @@
/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #1\.0\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
-
/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.h, #2\.0} 1 } } */
/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.s, #2\.0} 1 } } */
/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.d, #2\.0} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_7.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_7.c
index 347a1a3..eae52cd 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_7.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_7.c
@@ -21,8 +21,8 @@
/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, z[0-9]+\.d\n} 1 } } */
/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
-/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
-/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.s, p[0-7], z[0-9]+\.s, z[0-9]+\.s\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.d, p[0-7], z[0-9]+\.d, z[0-9]+\.d\n} 3 } } */
/* { dg-final { scan-assembler-not {\tmovprfx\t} } } */
/* { dg-final { scan-assembler-not {\tmov\tz} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmul_3.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmul_3.c
index 4da147e..549950d 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmul_3.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmul_3.c
@@ -43,8 +43,8 @@ TEST_ALL (DEF_LOOP)
/* { dg-final { scan-assembler-times {\tfmul\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, z[0-9]+\.d\n} 1 } } */
/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
-/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
-/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.s, p[0-7], z[0-9]+\.s, z[0-9]+\.s\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.d, p[0-7], z[0-9]+\.d, z[0-9]+\.d\n} 3 } } */
/* { dg-final { scan-assembler-not {\tmovprfx\t} } } */
/* { dg-final { scan-assembler-not {\tmov\tz} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fsubr_3.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fsubr_3.c
index 328af57..91eee80 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/cond_fsubr_3.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fsubr_3.c
@@ -43,8 +43,8 @@ TEST_ALL (DEF_LOOP)
/* { dg-final { scan-assembler-times {\tfsub\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, z[0-9]+\.d\n} 1 } } */
/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
-/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
-/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.s, p[0-7], z[0-9]+\.s, z[0-9]+\.s\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.d, p[0-7], z[0-9]+\.d, z[0-9]+\.d\n} 3 } } */
/* { dg-final { scan-assembler-not {\tmovprfx\t} } } */
/* { dg-final { scan-assembler-not {\tmov\tz} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/mixed_size_6.c b/gcc/testsuite/gcc.target/aarch64/sve/mixed_size_6.c
index 837edec..da77820 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/mixed_size_6.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/mixed_size_6.c
@@ -39,9 +39,9 @@ f3 (uint64_t *restrict ptr1, uint32_t *restrict ptr2, uint32_t start)
}
/* { dg-final { scan-assembler {\tindex\tz[0-9]+\.d, x[0-9]+, #1\n} } } */
-/* { dg-final { scan-assembler {\tindex\tz[0-9]+\.d, x[0-9]+, #1\n} } } */
+/* { dg-final { scan-assembler {\tindex\tz[0-9]+\.d, x[0-9]+, #2\n} } } */
/* { dg-final { scan-assembler {\tindex\tz[0-9]+\.d, x[0-9]+, #4\n} } } */
/* { dg-final { scan-assembler-not {\tindex\tz[0-9]+\.d, w[0-9]+, #1\n} } } */
-/* { dg-final { scan-assembler-not {\tindex\tz[0-9]+\.d, w[0-9]+, #1\n} } } */
+/* { dg-final { scan-assembler-not {\tindex\tz[0-9]+\.d, w[0-9]+, #2\n} } } */
/* { dg-final { scan-assembler-not {\tindex\tz[0-9]+\.d, w[0-9]+, #4\n} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pcs/annotate_1.c b/gcc/testsuite/gcc.target/aarch64/sve/pcs/annotate_1.c
index a85d068..6430980 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/pcs/annotate_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pcs/annotate_1.c
@@ -96,7 +96,6 @@ svfloat64x4_t ret_f64x4 (void) { return svundef4_f64 (); }
/* { dg-final { scan-assembler {\t\.variant_pcs\tret_s8x3\n} } } */
/* { dg-final { scan-assembler {\t\.variant_pcs\tret_s16x3\n} } } */
-/* { dg-final { scan-assembler {\t\.variant_pcs\tret_s16x3\n} } } */
/* { dg-final { scan-assembler {\t\.variant_pcs\tret_s32x3\n} } } */
/* { dg-final { scan-assembler {\t\.variant_pcs\tret_s64x3\n} } } */
/* { dg-final { scan-assembler {\t\.variant_pcs\tret_u8x3\n} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pcs/return_6.c b/gcc/testsuite/gcc.target/aarch64/sve/pcs/return_6.c
index 81c0a41..bf7308d 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/pcs/return_6.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pcs/return_6.c
@@ -55,7 +55,7 @@ CALLEE (s8, svint8_t)
CALLEE (u8, svuint8_t)
/*
-** callee_u8:
+** callee_mf8:
** (
** ld1 ({v.*}), \[x0\]
** st1 \1, \[x8\]
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/struct_move_3.c b/gcc/testsuite/gcc.target/aarch64/sve/struct_move_3.c
index 1901138..d6092e7 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/struct_move_3.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/struct_move_3.c
@@ -37,7 +37,7 @@ typedef struct { vnx2df a[4]; } vnx8df;
TEST_TYPE (vnx64qi, z0, z4)
TEST_TYPE (vnx32hi, z6, z2)
TEST_TYPE (vnx16si, z12, z16)
-TEST_TYPE (vnx8di, z17, z13)
+TEST_TYPE (vnx8di, z17, z12)
TEST_TYPE (vnx32hf, z18, z1)
TEST_TYPE (vnx16sf, z20, z16)
TEST_TYPE (vnx8df, z24, z28)
@@ -92,11 +92,11 @@ TEST_TYPE (vnx8df, z24, z28)
/* { dg-final { scan-assembler {\tld1d\tz19.d, p[0-7]/z, \[x0, #2, mul vl\]\n} } } */
/* { dg-final { scan-assembler {\tld1d\tz20.d, p[0-7]/z, \[x0, #3, mul vl\]\n} } } */
/* { dg-final { scan-assembler { test vnx8di 1 z17\n} } } */
-/* { dg-final { scan-assembler {\tmov\tz13.d, z17.d\n} } } */
-/* { dg-final { scan-assembler {\tmov\tz14.d, z18.d\n} } } */
-/* { dg-final { scan-assembler {\tmov\tz15.d, z19.d\n} } } */
-/* { dg-final { scan-assembler {\tmov\tz16.d, z20.d\n} } } */
-/* { dg-final { scan-assembler { test vnx8di 2 z17, z17, z13\n} } } */
+/* { dg-final { scan-assembler {\tmov\tz12.d, z17.d\n} } } */
+/* { dg-final { scan-assembler {\tmov\tz13.d, z18.d\n} } } */
+/* { dg-final { scan-assembler {\tmov\tz14.d, z19.d\n} } } */
+/* { dg-final { scan-assembler {\tmov\tz15.d, z20.d\n} } } */
+/* { dg-final { scan-assembler { test vnx8di 2 z17, z17, z12\n} } } */
/* { dg-final { scan-assembler {\tst1d\tz17.d, p[0-7], \[x0, #4, mul vl\]\n} } } */
/* { dg-final { scan-assembler {\tst1d\tz18.d, p[0-7], \[x0, #5, mul vl\]\n} } } */
/* { dg-final { scan-assembler {\tst1d\tz19.d, p[0-7], \[x0, #6, mul vl\]\n} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/struct_move_6.c b/gcc/testsuite/gcc.target/aarch64/sve/struct_move_6.c
index 8336e3f..12b7144 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/struct_move_6.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/struct_move_6.c
@@ -34,7 +34,7 @@ typedef struct { vnx2df a[4]; } vnx8df;
TEST_TYPE (vnx64qi, z0, z4)
TEST_TYPE (vnx32hi, z6, z2)
TEST_TYPE (vnx16si, z12, z16)
-TEST_TYPE (vnx8di, z17, z13)
+TEST_TYPE (vnx8di, z17, z12)
TEST_TYPE (vnx16sf, z20, z16)
TEST_TYPE (vnx8df, z24, z28)
@@ -88,11 +88,11 @@ TEST_TYPE (vnx8df, z24, z28)
/* { dg-final { scan-assembler {\tldr\tz19, \[x0, #2, mul vl\]\n} } } */
/* { dg-final { scan-assembler {\tldr\tz20, \[x0, #3, mul vl\]\n} } } */
/* { dg-final { scan-assembler { test vnx8di 1 z17\n} } } */
-/* { dg-final { scan-assembler {\tmov\tz13.d, z17.d\n} } } */
-/* { dg-final { scan-assembler {\tmov\tz14.d, z18.d\n} } } */
-/* { dg-final { scan-assembler {\tmov\tz15.d, z19.d\n} } } */
-/* { dg-final { scan-assembler {\tmov\tz16.d, z20.d\n} } } */
-/* { dg-final { scan-assembler { test vnx8di 2 z17, z17, z13\n} } } */
+/* { dg-final { scan-assembler {\tmov\tz12.d, z17.d\n} } } */
+/* { dg-final { scan-assembler {\tmov\tz13.d, z18.d\n} } } */
+/* { dg-final { scan-assembler {\tmov\tz14.d, z19.d\n} } } */
+/* { dg-final { scan-assembler {\tmov\tz15.d, z20.d\n} } } */
+/* { dg-final { scan-assembler { test vnx8di 2 z17, z17, z12\n} } } */
/* { dg-final { scan-assembler {\tstr\tz17, \[x0, #4, mul vl\]\n} } } */
/* { dg-final { scan-assembler {\tstr\tz18, \[x0, #5, mul vl\]\n} } } */
/* { dg-final { scan-assembler {\tstr\tz19, \[x0, #6, mul vl\]\n} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/uzp1_1.c b/gcc/testsuite/gcc.target/aarch64/sve/uzp1_1.c
index 84c6c6f..83451db 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/uzp1_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/uzp1_1.c
@@ -32,9 +32,6 @@ UZP1 (vnx8hf, ((vnx8hi) { 0, 2, 4, 6, 8, 10, 12, 14,
16, 18, 20, 22, 24, 26, 28, 30 }));
/* { dg-final { scan-assembler-not {\ttbl\t} } } */
-/* { dg-final { scan-assembler-not {\ttbl\t} } } */
-/* { dg-final { scan-assembler-not {\ttbl\t} } } */
-/* { dg-final { scan-assembler-not {\ttbl\t} } } */
/* { dg-final { scan-assembler-times {\tuzp1\tz[0-9]+\.d, z[0-9]+\.d, z[0-9]+\.d\n} 2 } } */
/* { dg-final { scan-assembler-times {\tuzp1\tz[0-9]+\.s, z[0-9]+\.s, z[0-9]+\.s\n} 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/uzp2_1.c b/gcc/testsuite/gcc.target/aarch64/sve/uzp2_1.c
index 1336caf..bfdee40 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/uzp2_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/uzp2_1.c
@@ -31,9 +31,6 @@ UZP2 (vnx8hf, ((vnx8hi) { 1, 3, 5, 7, 9, 11, 13, 15,
17, 19, 21, 23, 25, 27, 29, 31 }));
/* { dg-final { scan-assembler-not {\ttbl\t} } } */
-/* { dg-final { scan-assembler-not {\ttbl\t} } } */
-/* { dg-final { scan-assembler-not {\ttbl\t} } } */
-/* { dg-final { scan-assembler-not {\ttbl\t} } } */
/* { dg-final { scan-assembler-times {\tuzp2\tz[0-9]+\.d, z[0-9]+\.d, z[0-9]+\.d\n} 2 } } */
/* { dg-final { scan-assembler-times {\tuzp2\tz[0-9]+\.s, z[0-9]+\.s, z[0-9]+\.s\n} 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vector-compare-5.c b/gcc/testsuite/gcc.target/aarch64/vector-compare-5.c
index a1a601d..7becd56 100644
--- a/gcc/testsuite/gcc.target/aarch64/vector-compare-5.c
+++ b/gcc/testsuite/gcc.target/aarch64/vector-compare-5.c
@@ -53,15 +53,13 @@ n (v4i *x, v4i const *y, v4i *z, v4i *t)
}
+/* { dg-final { scan-tree-dump-times "\\s*\\*tD\\.\\d+\\s*=\\s*\\{\\s*-1(?:,\\s*-1){3}\\s*\\}\\s*;" 1 "original" } } */
+/* { dg-final { scan-tree-dump-times "\\s*\\*tD\\.\\d+\\s*=\\s*\\{\\s*0(?:,\\s*0){3}\\s*\\}\\s*;" 3 "original" } } */
+/* { dg-final { scan-tree-dump-times "\\s*\\*zD\\.\\d+\\s*=\\s*\\{\\s*-1(?:,\\s*-1){3}\\s*\\}\\s*;" 2 "original" } } */
+
/* { dg-final { scan-tree-dump ".*\\*zD\\.\\d+\\s*=\\s*VEC_COND_EXPR\\s*<\\s*\\*xD\\.\\d+\\s*>=\\s*VIEW_CONVERT_EXPR<v4iD\\.\\d+>\\(\\*yD\\.\\d+\\)\\s*,\\s*\\{\\s*-1(,\\s*-1){3}\\s*\\}\\s*,\\s*\\{\\s*0(,\\s*0){3}\\s*\\}\\s*>\\s*;" "original" } } */
-/* { dg-final { scan-tree-dump ".*\\*tD\\.\\d+\\s*=\\s*\\{\\s*-1(,\\s*-1){3}\\s*\\}\\s*;" "original" } } */
/* { dg-final { scan-tree-dump ".*\\*zD\\.\\d+\\s*=\\s*VEC_COND_EXPR\\s*<\\s*\\*xD\\.\\d+\\s*==\\s*VIEW_CONVERT_EXPR<v4iD\\.\\d+>\\(\\*yD\\.\\d+\\)\\s*,\\s*\\{\\s*-1(,\\s*-1){3}\\s*\\}\\s*,\\s*\\{\\s*0(,\\s*0){3}\\s*\\}\\s*>\\s*;" "original" } } */
/* { dg-final { scan-tree-dump ".*\\*tD\\.\\d+\\s*=\\s*VEC_COND_EXPR\\s*<\\s*\\*xD\\.\\d+\\s*<\\s*VIEW_CONVERT_EXPR<v4iD\\.\\d+>\\(\\*yD\\.\\d+\\)\\s*,\\s*\\{\\s*-1(,\\s*-1){3}\\s*\\}\\s*,\\s*\\{\\s*0(,\\s*0){3}\\s*\\}\\s*>\\s*;" "original" } } */
-/* { dg-final { scan-tree-dump ".*\\*zD\\.\\d+\\s*=\\s*\\{\\s*-1(,\\s*-1){3}\\s*\\}\\s*;" "original" } } */
-/* { dg-final { scan-tree-dump ".*\\*tD\\.\\d+\\s*=\\s*\\{\\s*0(,\\s*0){3}\\s*\\}\\s*;" "original" } } */
/* { dg-final { scan-tree-dump ".*\\*zD\\.\\d+\\s*=\\s*VEC_COND_EXPR\\s*<\\s*\\*xD\\.\\d+\\s*<=\\s*VIEW_CONVERT_EXPR<v4iD\\.\\d+>\\(\\*yD\\.\\d+\\)\\s*,\\s*\\{\\s*-1(,\\s*-1){3}\\s*\\}\\s*,\\s*\\{\\s*0(,\\s*0){3}\\s*\\}\\s*>\\s*;" "original" } } */
-/* { dg-final { scan-tree-dump ".*\\*tD\\.\\d+\\s*=\\s*\\{\\s*0(,\\s*0){3}\\s*\\}\\s*;" "original" } } */
/* { dg-final { scan-tree-dump ".*\\*zD\\.\\d+\\s*=\\s*VEC_COND_EXPR\\s*<\\s*\\*xD\\.\\d+\\s*!=\\s*VIEW_CONVERT_EXPR<v4iD\\.\\d+>\\(\\*yD\\.\\d+\\)\\s*,\\s*\\{\\s*-1(,\\s*-1){3}\\s*\\}\\s*,\\s*\\{\\s*0(,\\s*0){3}\\s*\\}\\s*>\\s*;" "original" } } */
/* { dg-final { scan-tree-dump ".*\\*tD\\.\\d+\\s*=\\s*VEC_COND_EXPR\\s*<\\s*\\*xD\\.\\d+\\s*>=\\s*VIEW_CONVERT_EXPR<v4iD\\.\\d+>\\(\\*yD\\.\\d+\\)\\s*,\\s*\\{\\s*-1(,\\s*-1){3}\\s*\\}\\s*,\\s*\\{\\s*0(,\\s*0){3}\\s*\\}\\s*>\\s*;" "original" } } */
-/* { dg-final { scan-tree-dump ".*\\*zD\\.\\d+\\s*=\\s*\\{\\s*-1(,\\s*-1){3}\\s*\\}\\s*;" "original" } } */
-/* { dg-final { scan-tree-dump ".*\\*tD\\.\\d+\\s*=\\s*\\{\\s*0(,\\s*0){3}\\s*\\}\\s*;" "original" } } */
diff --git a/gcc/testsuite/gcc.target/riscv/pr121937.c b/gcc/testsuite/gcc.target/riscv/pr121937.c
new file mode 100644
index 0000000..3c0389c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/pr121937.c
@@ -0,0 +1,66 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-w -march=rv64gcv -mabi=lp64d" { target rv64 } } */
+/* { dg-additional-options "-w -march=rv32gcv -mabi=ilp32" { target rv32 } } */
+
+#include <stdint-gcc.h>
+#define BS_VEC(type, num) type __attribute__((vector_size(num * sizeof(type))))
+typedef int16_t int16;
+typedef uint16_t uint16;
+typedef int32_t int32;
+typedef uint64_t uint64;
+int32_t g_69, g_539;
+int32_t *g_68;
+void func_59(int32_t p_60) {
+ BS_VEC(uint64, 2) BS_VAR_4;
+ BS_VEC(int16, 8) BS_VAR_6;
+ uint64 *LOCAL_CHECKSUM;
+ int32_t *l_108 = &g_69;
+ int64_t l_829 = 10;
+ int32_t l_844 = -1;
+ for (; g_69;) {
+ int32_t l_924;
+ if (p_60 * 2u) {
+ BS_LABEL_0:
+ *LOCAL_CHECKSUM ^= BS_VAR_4[3];
+ for (l_924 = 3; l_924; l_924 -= 1) {
+ BS_VEC(uint64, 8)
+ BS_TEMP_600 = -__builtin_convertvector(BS_VAR_6, BS_VEC(uint64, 8));
+ BS_VEC(uint64, 8)
+ BS_TEMP_601 = __builtin_convertvector((BS_VEC(int32, 8)){p_60},
+ BS_VEC(uint64, 8));
+ BS_VAR_4[356358257141730375] =
+ __builtin_convertvector(
+ __builtin_shufflevector((BS_VEC(uint16, 2))0,
+ (BS_VEC(uint16, 2))0, 1, 3, 0, 1, 2, 0,
+ 0, 2, 0, 0, 1, 2, 3, 3, 3, 2),
+ BS_VEC(uint64, 16))[BS_VAR_6[4]] >
+ (BS_VEC(uint64, 8)){0, BS_TEMP_600[1] ? BS_TEMP_601[1]
+ : 0}[l_829 != 0];
+ }
+ }
+ if (*l_108)
+ *g_68 |= g_539;
+ __asm goto("" : : : : BS_LABEL_0);
+ BS_VEC(int16, 4)
+ BS_TEMP_681 = __builtin_shufflevector(
+ (BS_VEC(int16, 2))__builtin_shufflevector(
+ __builtin_convertvector(
+ __builtin_shufflevector(BS_VAR_6, BS_VAR_6, 8, 6, 5, 8, 1, 3, 6,
+ 2, 0, 1, 2, 5, 8, 6, 5, 1, 5, 0, 3, 5,
+ 8, 2, 2, 4, 6, 0, 6, 4, 3, 3, 1, 2),
+ BS_VEC(uint16, 32)),
+ __builtin_convertvector((BS_VEC(int32, 32)){}, BS_VEC(uint16, 32)),
+ 42, 52) -
+ __builtin_convertvector((BS_VEC(int32, 2)){l_844},
+ BS_VEC(uint16, 2)) *
+ ~0,
+ ~(0 < __builtin_shufflevector(
+ __builtin_convertvector((BS_VEC(int32, 16)){p_60},
+ BS_VEC(uint16, 16)),
+ (BS_VEC(uint16, 16)){20489, 3, 2, 4}, 19, 6)),
+ 1, 2, 0, 3);
+ BS_VAR_6[0] =
+ BS_TEMP_681[0] ^ BS_TEMP_681[1] ^ BS_TEMP_681[2] ^ BS_TEMP_681[3];
+ }
+}
+
diff --git a/gcc/testsuite/gcc.target/riscv/pr122051.c b/gcc/testsuite/gcc.target/riscv/pr122051.c
new file mode 100644
index 0000000..c2f4b87
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/pr122051.c
@@ -0,0 +1,24 @@
+/* { dg-do compile { target int128 } } */
+/* { dg-additional-options "-mrvv-vector-bits=zvl -mcpu=xt-c920 -w" } */
+
+typedef __attribute__((__vector_size__(4))) char B;
+typedef __attribute__((__vector_size__(16))) long V;
+typedef __attribute__((__vector_size__(32))) double W;
+typedef __attribute__((__vector_size__(32))) char U;
+unsigned u;
+B o;
+char *p;
+int q;
+V v;
+W w;
+
+void
+foo(__int128, __int128, __int128, __int128, B a, B b, B c, B d, B e, B f, B g, B h) {
+ do {
+ w -= q;
+ v ^= u;
+ } while (__builtin_memcmp(p, 1 + p, 7));
+ o = ((U)w)[0] + c + d + e + f + g + h + a + b;
+}
+
+
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/math-nearbyint-1.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/math-nearbyint-1.c
index 89af160..bb62ce2 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/math-nearbyint-1.c
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/math-nearbyint-1.c
@@ -54,5 +54,5 @@ DEF_OP_V (nearbyint, 512, double, __builtin_nearbyint)
/* { dg-final { scan-tree-dump-not "4096,4096" "optimized" } } */
/* { dg-final { scan-assembler-times {vfcvt\.x\.f\.v\s+v[0-9]+,\s*v[0-9]+,\s*v0\.t} 30 } } */
/* { dg-final { scan-assembler-times {vfcvt\.f\.x\.v\s+v[0-9]+,\s*v[0-9]+,\s*v0\.t} 30 } } */
-/* { dg-final { scan-assembler-times {frflags\s+[atx][0-9]+} 32 } } */
-/* { dg-final { scan-assembler-times {fsflags\s+[atx][0-9]+} 32 } } */
+/* { dg-final { scan-assembler-times {frflags\s+[atx][0-9]+} 30 } } */
+/* { dg-final { scan-assembler-times {fsflags\s+[atx][0-9]+} 30 } } */
diff --git a/gcc/testsuite/gfortran.dg/pdt_52.f03 b/gcc/testsuite/gfortran.dg/pdt_52.f03
new file mode 100644
index 0000000..5acdecb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pdt_52.f03
@@ -0,0 +1,36 @@
+! { dg-do compile }
+!
+! Test the fix for PR122089 in which an error occured in compiling the module
+! because a spurious REAL(KIND=0) was being produced for 'values_'.
+!
+! Other failures are indicated by the comments. For reasons that are not to me,
+! they didn't fail when combined with this test.
+!
+! Contributed by Damian Rouson <damian@archaeologic.codes>
+!
+module tensor_m
+ implicit none
+
+ type tensor_t(k)
+ integer, kind :: k = kind(1.)
+ real(k), allocatable :: values_ ! ICE if not allocatable
+ end type
+
+ type input_output_pair_t(k)
+ integer, kind :: k
+ type(tensor_t(k)) inputs_, expected_outputs_ ! ICE if 2nd component dropped
+ end type
+
+ type mini_batch_t(k)
+ integer, kind :: k
+ type(input_output_pair_t(k)) input_output_pairs_
+ end type
+
+end module tensor_m
+
+ use tensor_m
+ type (mini_batch_t(k = kind(1d0))) :: x
+ allocate (x%input_output_pairs_%inputs_%values_, source = 42d0)
+ print *, kind (x%input_output_pairs_%inputs_%values_), x%input_output_pairs_%inputs_%values_
+ deallocate (x%input_output_pairs_%inputs_%values_)
+end
diff --git a/gcc/testsuite/gfortran.dg/pdt_53.f03 b/gcc/testsuite/gfortran.dg/pdt_53.f03
new file mode 100644
index 0000000..9f3b4ca
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pdt_53.f03
@@ -0,0 +1,28 @@
+! { dg-do compile }
+!
+! Test the fix for PR122089 in which an error occured in compiling the module
+! because a spurious REAL(KIND=0) was being produced for 'values_'.
+!
+! This is a variant of pdt_52.f03. See the comments in that test.
+!
+! Contributed by Damian Rouson <damian@archaeologic.codes>
+!
+module tensor_m
+ implicit none
+
+ type tensor_t(k)
+ integer, kind :: k = kind(1.)
+ real(k) :: values_ ! Used to ICE
+ end type
+
+ type input_output_pair_t(k)
+ integer, kind :: k
+ type(tensor_t(k)) inputs_, expected_outputs_
+ end type
+
+ type mini_batch_t(k)
+ integer, kind :: k
+ type(input_output_pair_t(k)) input_output_pairs_
+ end type
+
+end module tensor_m
diff --git a/gcc/testsuite/gfortran.dg/pdt_54.f03 b/gcc/testsuite/gfortran.dg/pdt_54.f03
new file mode 100644
index 0000000..9631dad
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pdt_54.f03
@@ -0,0 +1,28 @@
+! { dg-do compile }
+!
+! Test the fix for PR122089 in which an error occured in compiling the module
+! because a spurious REAL(KIND=0) was being produced for 'values_'.
+!
+! This is a variant of pdt_52.f03. See the comments in that test.
+!
+! Contributed by Damian Rouson <damian@archaeologic.codes>
+!
+module tensor_m
+ implicit none
+
+ type tensor_t(k)
+ integer, kind :: k = kind(1.)
+ real(k), allocatable :: values_
+ end type
+
+ type input_output_pair_t(k)
+ integer, kind :: k
+ type(tensor_t(k)) inputs_ ! Used to ICE if 2nd component dropped
+ end type
+
+ type mini_batch_t(k)
+ integer, kind :: k
+ type(input_output_pair_t(k)) input_output_pairs_
+ end type
+
+end module tensor_m
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index 61cec52..410341d 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -447,7 +447,6 @@ extern gimple_opt_pass *make_pass_warn_access (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_warn_printf (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_warn_recursion (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_strlen (gcc::context *ctxt);
-extern gimple_opt_pass *make_pass_fold_builtins (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_post_ipa_warn (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_stdarg (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_early_warn_uninitialized (gcc::context *ctxt);
diff --git a/gcc/tree-ssa-ccp.cc b/gcc/tree-ssa-ccp.cc
index 4165e59..6de02e5 100644
--- a/gcc/tree-ssa-ccp.cc
+++ b/gcc/tree-ssa-ccp.cc
@@ -3085,1448 +3085,6 @@ make_pass_ccp (gcc::context *ctxt)
return new pass_ccp (ctxt);
}
-
-
-/* Try to optimize out __builtin_stack_restore. Optimize it out
- if there is another __builtin_stack_restore in the same basic
- block and no calls or ASM_EXPRs are in between, or if this block's
- only outgoing edge is to EXIT_BLOCK and there are no calls or
- ASM_EXPRs after this __builtin_stack_restore. */
-
-static tree
-optimize_stack_restore (gimple_stmt_iterator i)
-{
- tree callee;
- gimple *stmt;
-
- basic_block bb = gsi_bb (i);
- gimple *call = gsi_stmt (i);
-
- if (gimple_code (call) != GIMPLE_CALL
- || gimple_call_num_args (call) != 1
- || TREE_CODE (gimple_call_arg (call, 0)) != SSA_NAME
- || !POINTER_TYPE_P (TREE_TYPE (gimple_call_arg (call, 0))))
- return NULL_TREE;
-
- for (gsi_next (&i); !gsi_end_p (i); gsi_next (&i))
- {
- stmt = gsi_stmt (i);
- if (gimple_code (stmt) == GIMPLE_ASM)
- return NULL_TREE;
- if (gimple_code (stmt) != GIMPLE_CALL)
- continue;
-
- callee = gimple_call_fndecl (stmt);
- if (!callee
- || !fndecl_built_in_p (callee, BUILT_IN_NORMAL)
- /* All regular builtins are ok, just obviously not alloca. */
- || ALLOCA_FUNCTION_CODE_P (DECL_FUNCTION_CODE (callee))
- /* Do not remove stack updates before strub leave. */
- || fndecl_built_in_p (callee, BUILT_IN___STRUB_LEAVE))
- return NULL_TREE;
-
- if (fndecl_built_in_p (callee, BUILT_IN_STACK_RESTORE))
- goto second_stack_restore;
- }
-
- if (!gsi_end_p (i))
- return NULL_TREE;
-
- /* Allow one successor of the exit block, or zero successors. */
- switch (EDGE_COUNT (bb->succs))
- {
- case 0:
- break;
- case 1:
- if (single_succ_edge (bb)->dest != EXIT_BLOCK_PTR_FOR_FN (cfun))
- return NULL_TREE;
- break;
- default:
- return NULL_TREE;
- }
- second_stack_restore:
-
- /* If there's exactly one use, then zap the call to __builtin_stack_save.
- If there are multiple uses, then the last one should remove the call.
- In any case, whether the call to __builtin_stack_save can be removed
- or not is irrelevant to removing the call to __builtin_stack_restore. */
- if (has_single_use (gimple_call_arg (call, 0)))
- {
- gimple *stack_save = SSA_NAME_DEF_STMT (gimple_call_arg (call, 0));
- if (is_gimple_call (stack_save))
- {
- callee = gimple_call_fndecl (stack_save);
- if (callee && fndecl_built_in_p (callee, BUILT_IN_STACK_SAVE))
- {
- gimple_stmt_iterator stack_save_gsi;
- tree rhs;
-
- stack_save_gsi = gsi_for_stmt (stack_save);
- rhs = build_int_cst (TREE_TYPE (gimple_call_arg (call, 0)), 0);
- replace_call_with_value (&stack_save_gsi, rhs);
- }
- }
- }
-
- /* No effect, so the statement will be deleted. */
- return integer_zero_node;
-}
-
-/* If va_list type is a simple pointer and nothing special is needed,
- optimize __builtin_va_start (&ap, 0) into ap = __builtin_next_arg (0),
- __builtin_va_end (&ap) out as NOP and __builtin_va_copy into a simple
- pointer assignment. */
-
-static tree
-optimize_stdarg_builtin (gimple *call)
-{
- tree callee, lhs, rhs, cfun_va_list;
- bool va_list_simple_ptr;
- location_t loc = gimple_location (call);
-
- callee = gimple_call_fndecl (call);
-
- cfun_va_list = targetm.fn_abi_va_list (callee);
- va_list_simple_ptr = POINTER_TYPE_P (cfun_va_list)
- && (TREE_TYPE (cfun_va_list) == void_type_node
- || TREE_TYPE (cfun_va_list) == char_type_node);
-
- switch (DECL_FUNCTION_CODE (callee))
- {
- case BUILT_IN_VA_START:
- if (!va_list_simple_ptr
- || targetm.expand_builtin_va_start != NULL
- || !builtin_decl_explicit_p (BUILT_IN_NEXT_ARG))
- return NULL_TREE;
-
- if (gimple_call_num_args (call) != 2)
- return NULL_TREE;
-
- lhs = gimple_call_arg (call, 0);
- if (!POINTER_TYPE_P (TREE_TYPE (lhs))
- || TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (lhs)))
- != TYPE_MAIN_VARIANT (cfun_va_list))
- return NULL_TREE;
-
- lhs = build_fold_indirect_ref_loc (loc, lhs);
- rhs = build_call_expr_loc (loc, builtin_decl_explicit (BUILT_IN_NEXT_ARG),
- 1, integer_zero_node);
- rhs = fold_convert_loc (loc, TREE_TYPE (lhs), rhs);
- return build2 (MODIFY_EXPR, TREE_TYPE (lhs), lhs, rhs);
-
- case BUILT_IN_VA_COPY:
- if (!va_list_simple_ptr)
- return NULL_TREE;
-
- if (gimple_call_num_args (call) != 2)
- return NULL_TREE;
-
- lhs = gimple_call_arg (call, 0);
- if (!POINTER_TYPE_P (TREE_TYPE (lhs))
- || TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (lhs)))
- != TYPE_MAIN_VARIANT (cfun_va_list))
- return NULL_TREE;
-
- lhs = build_fold_indirect_ref_loc (loc, lhs);
- rhs = gimple_call_arg (call, 1);
- if (TYPE_MAIN_VARIANT (TREE_TYPE (rhs))
- != TYPE_MAIN_VARIANT (cfun_va_list))
- return NULL_TREE;
-
- rhs = fold_convert_loc (loc, TREE_TYPE (lhs), rhs);
- return build2 (MODIFY_EXPR, TREE_TYPE (lhs), lhs, rhs);
-
- case BUILT_IN_VA_END:
- /* No effect, so the statement will be deleted. */
- return integer_zero_node;
-
- default:
- gcc_unreachable ();
- }
-}
-
-/* Attemp to make the block of __builtin_unreachable I unreachable by changing
- the incoming jumps. Return true if at least one jump was changed. */
-
-static bool
-optimize_unreachable (gimple_stmt_iterator i)
-{
- basic_block bb = gsi_bb (i);
- gimple_stmt_iterator gsi;
- gimple *stmt;
- edge_iterator ei;
- edge e;
- bool ret;
-
- if (flag_sanitize & SANITIZE_UNREACHABLE)
- return false;
- gsi = gsi_start_nondebug_after_labels_bb (bb);
- /* Only handle the case that __builtin_unreachable is the first
- statement in the block. We rely on DCE to remove stmts
- without side-effects before __builtin_unreachable. */
- if (*gsi != *i)
- return false;
-
- ret = false;
- FOR_EACH_EDGE (e, ei, bb->preds)
- {
- gsi = gsi_last_bb (e->src);
- if (gsi_end_p (gsi))
- continue;
-
- stmt = gsi_stmt (gsi);
- if (gcond *cond_stmt = dyn_cast <gcond *> (stmt))
- {
- if (e->flags & EDGE_TRUE_VALUE)
- gimple_cond_make_false (cond_stmt);
- else if (e->flags & EDGE_FALSE_VALUE)
- gimple_cond_make_true (cond_stmt);
- else
- gcc_unreachable ();
- update_stmt (cond_stmt);
- }
- else
- {
- /* Todo: handle other cases. Note that unreachable switch case
- statements have already been removed. */
- continue;
- }
-
- ret = true;
- }
-
- return ret;
-}
-
-/* Convert
- _1 = __atomic_fetch_or_* (ptr_6, 1, _3);
- _7 = ~_1;
- _5 = (_Bool) _7;
- to
- _1 = __atomic_fetch_or_* (ptr_6, 1, _3);
- _8 = _1 & 1;
- _5 = _8 == 0;
- and convert
- _1 = __atomic_fetch_and_* (ptr_6, ~1, _3);
- _7 = ~_1;
- _4 = (_Bool) _7;
- to
- _1 = __atomic_fetch_and_* (ptr_6, ~1, _3);
- _8 = _1 & 1;
- _4 = (_Bool) _8;
-
- USE_STMT is the gimplt statement which uses the return value of
- __atomic_fetch_or_*. LHS is the return value of __atomic_fetch_or_*.
- MASK is the mask passed to __atomic_fetch_or_*.
- */
-
-static gimple *
-convert_atomic_bit_not (enum internal_fn fn, gimple *use_stmt,
- tree lhs, tree mask)
-{
- tree and_mask;
- if (fn == IFN_ATOMIC_BIT_TEST_AND_RESET)
- {
- /* MASK must be ~1. */
- if (!operand_equal_p (build_int_cst (TREE_TYPE (lhs),
- ~HOST_WIDE_INT_1), mask, 0))
- return nullptr;
- and_mask = build_int_cst (TREE_TYPE (lhs), 1);
- }
- else
- {
- /* MASK must be 1. */
- if (!operand_equal_p (build_int_cst (TREE_TYPE (lhs), 1), mask, 0))
- return nullptr;
- and_mask = mask;
- }
-
- tree use_lhs = gimple_assign_lhs (use_stmt);
-
- use_operand_p use_p;
- gimple *use_not_stmt;
-
- if (!single_imm_use (use_lhs, &use_p, &use_not_stmt)
- || !is_gimple_assign (use_not_stmt))
- return nullptr;
-
- if (!CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (use_not_stmt)))
- return nullptr;
-
- tree use_not_lhs = gimple_assign_lhs (use_not_stmt);
- if (TREE_CODE (TREE_TYPE (use_not_lhs)) != BOOLEAN_TYPE)
- return nullptr;
-
- gimple_stmt_iterator gsi;
- tree var = make_ssa_name (TREE_TYPE (lhs));
- /* use_stmt need to be removed after use_nop_stmt,
- so use_lhs can be released. */
- gimple *use_stmt_removal = use_stmt;
- use_stmt = gimple_build_assign (var, BIT_AND_EXPR, lhs, and_mask);
- gsi = gsi_for_stmt (use_not_stmt);
- gsi_insert_before (&gsi, use_stmt, GSI_NEW_STMT);
- lhs = gimple_assign_lhs (use_not_stmt);
- gimple *g = gimple_build_assign (lhs, EQ_EXPR, var,
- build_zero_cst (TREE_TYPE (mask)));
- gsi_insert_after (&gsi, g, GSI_NEW_STMT);
- gsi = gsi_for_stmt (use_not_stmt);
- gsi_remove (&gsi, true);
- gsi = gsi_for_stmt (use_stmt_removal);
- gsi_remove (&gsi, true);
- return use_stmt;
-}
-
-/* match.pd function to match atomic_bit_test_and pattern which
- has nop_convert:
- _1 = __atomic_fetch_or_4 (&v, 1, 0);
- _2 = (int) _1;
- _5 = _2 & 1;
- */
-extern bool gimple_nop_atomic_bit_test_and_p (tree, tree *,
- tree (*) (tree));
-extern bool gimple_nop_convert (tree, tree*, tree (*) (tree));
-
-/* Optimize
- mask_2 = 1 << cnt_1;
- _4 = __atomic_fetch_or_* (ptr_6, mask_2, _3);
- _5 = _4 & mask_2;
- to
- _4 = .ATOMIC_BIT_TEST_AND_SET (ptr_6, cnt_1, 0, _3);
- _5 = _4;
- If _5 is only used in _5 != 0 or _5 == 0 comparisons, 1
- is passed instead of 0, and the builtin just returns a zero
- or 1 value instead of the actual bit.
- Similarly for __sync_fetch_and_or_* (without the ", _3" part
- in there), and/or if mask_2 is a power of 2 constant.
- Similarly for xor instead of or, use ATOMIC_BIT_TEST_AND_COMPLEMENT
- in that case. And similarly for and instead of or, except that
- the second argument to the builtin needs to be one's complement
- of the mask instead of mask. */
-
-static bool
-optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip,
- enum internal_fn fn, bool has_model_arg,
- bool after)
-{
- gimple *call = gsi_stmt (*gsip);
- tree lhs = gimple_call_lhs (call);
- use_operand_p use_p;
- gimple *use_stmt;
- tree mask;
- optab optab;
-
- if (!flag_inline_atomics
- || optimize_debug
- || !gimple_call_builtin_p (call, BUILT_IN_NORMAL)
- || !lhs
- || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)
- || !single_imm_use (lhs, &use_p, &use_stmt)
- || !is_gimple_assign (use_stmt)
- || !gimple_vdef (call))
- return false;
-
- switch (fn)
- {
- case IFN_ATOMIC_BIT_TEST_AND_SET:
- optab = atomic_bit_test_and_set_optab;
- break;
- case IFN_ATOMIC_BIT_TEST_AND_COMPLEMENT:
- optab = atomic_bit_test_and_complement_optab;
- break;
- case IFN_ATOMIC_BIT_TEST_AND_RESET:
- optab = atomic_bit_test_and_reset_optab;
- break;
- default:
- return false;
- }
-
- tree bit = nullptr;
-
- mask = gimple_call_arg (call, 1);
- tree_code rhs_code = gimple_assign_rhs_code (use_stmt);
- if (rhs_code != BIT_AND_EXPR)
- {
- if (rhs_code != NOP_EXPR && rhs_code != BIT_NOT_EXPR)
- return false;
-
- tree use_lhs = gimple_assign_lhs (use_stmt);
- if (TREE_CODE (use_lhs) == SSA_NAME
- && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (use_lhs))
- return false;
-
- tree use_rhs = gimple_assign_rhs1 (use_stmt);
- if (lhs != use_rhs)
- return false;
-
- if (optab_handler (optab, TYPE_MODE (TREE_TYPE (lhs)))
- == CODE_FOR_nothing)
- return false;
-
- gimple *g;
- gimple_stmt_iterator gsi;
- tree var;
- int ibit = -1;
-
- if (rhs_code == BIT_NOT_EXPR)
- {
- g = convert_atomic_bit_not (fn, use_stmt, lhs, mask);
- if (!g)
- return false;
- use_stmt = g;
- ibit = 0;
- }
- else if (TREE_CODE (TREE_TYPE (use_lhs)) == BOOLEAN_TYPE)
- {
- tree and_mask;
- if (fn == IFN_ATOMIC_BIT_TEST_AND_RESET)
- {
- /* MASK must be ~1. */
- if (!operand_equal_p (build_int_cst (TREE_TYPE (lhs),
- ~HOST_WIDE_INT_1),
- mask, 0))
- return false;
-
- /* Convert
- _1 = __atomic_fetch_and_* (ptr_6, ~1, _3);
- _4 = (_Bool) _1;
- to
- _1 = __atomic_fetch_and_* (ptr_6, ~1, _3);
- _5 = _1 & 1;
- _4 = (_Bool) _5;
- */
- and_mask = build_int_cst (TREE_TYPE (lhs), 1);
- }
- else
- {
- and_mask = build_int_cst (TREE_TYPE (lhs), 1);
- if (!operand_equal_p (and_mask, mask, 0))
- return false;
-
- /* Convert
- _1 = __atomic_fetch_or_* (ptr_6, 1, _3);
- _4 = (_Bool) _1;
- to
- _1 = __atomic_fetch_or_* (ptr_6, 1, _3);
- _5 = _1 & 1;
- _4 = (_Bool) _5;
- */
- }
- var = make_ssa_name (TREE_TYPE (use_rhs));
- replace_uses_by (use_rhs, var);
- g = gimple_build_assign (var, BIT_AND_EXPR, use_rhs,
- and_mask);
- gsi = gsi_for_stmt (use_stmt);
- gsi_insert_before (&gsi, g, GSI_NEW_STMT);
- use_stmt = g;
- ibit = 0;
- }
- else if (TYPE_PRECISION (TREE_TYPE (use_lhs))
- <= TYPE_PRECISION (TREE_TYPE (use_rhs)))
- {
- gimple *use_nop_stmt;
- if (!single_imm_use (use_lhs, &use_p, &use_nop_stmt)
- || (!is_gimple_assign (use_nop_stmt)
- && gimple_code (use_nop_stmt) != GIMPLE_COND))
- return false;
- /* Handle both
- _4 = _5 < 0;
- and
- if (_5 < 0)
- */
- tree use_nop_lhs = nullptr;
- rhs_code = ERROR_MARK;
- if (is_gimple_assign (use_nop_stmt))
- {
- use_nop_lhs = gimple_assign_lhs (use_nop_stmt);
- rhs_code = gimple_assign_rhs_code (use_nop_stmt);
- }
- if (!use_nop_lhs || rhs_code != BIT_AND_EXPR)
- {
- /* Also handle
- if (_5 < 0)
- */
- if (use_nop_lhs
- && TREE_CODE (use_nop_lhs) == SSA_NAME
- && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (use_nop_lhs))
- return false;
- if (use_nop_lhs && rhs_code == BIT_NOT_EXPR)
- {
- /* Handle
- _7 = ~_2;
- */
- g = convert_atomic_bit_not (fn, use_nop_stmt, lhs,
- mask);
- if (!g)
- return false;
- /* Convert
- _1 = __atomic_fetch_or_4 (ptr_6, 1, _3);
- _2 = (int) _1;
- _7 = ~_2;
- _5 = (_Bool) _7;
- to
- _1 = __atomic_fetch_or_4 (ptr_6, ~1, _3);
- _8 = _1 & 1;
- _5 = _8 == 0;
- and convert
- _1 = __atomic_fetch_and_4 (ptr_6, ~1, _3);
- _2 = (int) _1;
- _7 = ~_2;
- _5 = (_Bool) _7;
- to
- _1 = __atomic_fetch_and_4 (ptr_6, 1, _3);
- _8 = _1 & 1;
- _5 = _8 == 0;
- */
- gsi = gsi_for_stmt (use_stmt);
- gsi_remove (&gsi, true);
- use_stmt = g;
- ibit = 0;
- }
- else
- {
- tree cmp_rhs1, cmp_rhs2;
- if (use_nop_lhs)
- {
- /* Handle
- _4 = _5 < 0;
- */
- if (TREE_CODE (TREE_TYPE (use_nop_lhs))
- != BOOLEAN_TYPE)
- return false;
- cmp_rhs1 = gimple_assign_rhs1 (use_nop_stmt);
- cmp_rhs2 = gimple_assign_rhs2 (use_nop_stmt);
- }
- else
- {
- /* Handle
- if (_5 < 0)
- */
- rhs_code = gimple_cond_code (use_nop_stmt);
- cmp_rhs1 = gimple_cond_lhs (use_nop_stmt);
- cmp_rhs2 = gimple_cond_rhs (use_nop_stmt);
- }
- if (rhs_code != GE_EXPR && rhs_code != LT_EXPR)
- return false;
- if (use_lhs != cmp_rhs1)
- return false;
- if (!integer_zerop (cmp_rhs2))
- return false;
-
- tree and_mask;
-
- unsigned HOST_WIDE_INT bytes
- = tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (use_rhs)));
- ibit = bytes * BITS_PER_UNIT - 1;
- unsigned HOST_WIDE_INT highest
- = HOST_WIDE_INT_1U << ibit;
-
- if (fn == IFN_ATOMIC_BIT_TEST_AND_RESET)
- {
- /* Get the signed maximum of the USE_RHS type. */
- and_mask = build_int_cst (TREE_TYPE (use_rhs),
- highest - 1);
- if (!operand_equal_p (and_mask, mask, 0))
- return false;
-
- /* Convert
- _1 = __atomic_fetch_and_4 (ptr_6, 0x7fffffff, _3);
- _5 = (signed int) _1;
- _4 = _5 < 0 or _5 >= 0;
- to
- _1 = __atomic_fetch_and_4 (ptr_6, 0x7fffffff, _3);
- _6 = _1 & 0x80000000;
- _4 = _6 != 0 or _6 == 0;
- and convert
- _1 = __atomic_fetch_and_4 (ptr_6, 0x7fffffff, _3);
- _5 = (signed int) _1;
- if (_5 < 0 or _5 >= 0)
- to
- _1 = __atomic_fetch_and_4 (ptr_6, 0x7fffffff, _3);
- _6 = _1 & 0x80000000;
- if (_6 != 0 or _6 == 0)
- */
- and_mask = build_int_cst (TREE_TYPE (use_rhs),
- highest);
- }
- else
- {
- /* Get the signed minimum of the USE_RHS type. */
- and_mask = build_int_cst (TREE_TYPE (use_rhs),
- highest);
- if (!operand_equal_p (and_mask, mask, 0))
- return false;
-
- /* Convert
- _1 = __atomic_fetch_or_4 (ptr_6, 0x80000000, _3);
- _5 = (signed int) _1;
- _4 = _5 < 0 or _5 >= 0;
- to
- _1 = __atomic_fetch_or_4 (ptr_6, 0x80000000, _3);
- _6 = _1 & 0x80000000;
- _4 = _6 != 0 or _6 == 0;
- and convert
- _1 = __atomic_fetch_or_4 (ptr_6, 0x80000000, _3);
- _5 = (signed int) _1;
- if (_5 < 0 or _5 >= 0)
- to
- _1 = __atomic_fetch_or_4 (ptr_6, 0x80000000, _3);
- _6 = _1 & 0x80000000;
- if (_6 != 0 or _6 == 0)
- */
- }
- var = make_ssa_name (TREE_TYPE (use_rhs));
- gimple* use_stmt_removal = use_stmt;
- g = gimple_build_assign (var, BIT_AND_EXPR, use_rhs,
- and_mask);
- gsi = gsi_for_stmt (use_nop_stmt);
- gsi_insert_before (&gsi, g, GSI_NEW_STMT);
- use_stmt = g;
- rhs_code = rhs_code == GE_EXPR ? EQ_EXPR : NE_EXPR;
- tree const_zero = build_zero_cst (TREE_TYPE (use_rhs));
- if (use_nop_lhs)
- g = gimple_build_assign (use_nop_lhs, rhs_code,
- var, const_zero);
- else
- g = gimple_build_cond (rhs_code, var, const_zero,
- nullptr, nullptr);
- gsi_insert_after (&gsi, g, GSI_NEW_STMT);
- gsi = gsi_for_stmt (use_nop_stmt);
- gsi_remove (&gsi, true);
- gsi = gsi_for_stmt (use_stmt_removal);
- gsi_remove (&gsi, true);
- }
- }
- else
- {
- tree match_op[3];
- gimple *g;
- if (!gimple_nop_atomic_bit_test_and_p (use_nop_lhs,
- &match_op[0], NULL)
- || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (match_op[2])
- || !single_imm_use (match_op[2], &use_p, &g)
- || !is_gimple_assign (g))
- return false;
- mask = match_op[0];
- if (TREE_CODE (match_op[1]) == INTEGER_CST)
- {
- ibit = tree_log2 (match_op[1]);
- gcc_assert (ibit >= 0);
- }
- else
- {
- g = SSA_NAME_DEF_STMT (match_op[1]);
- gcc_assert (is_gimple_assign (g));
- bit = gimple_assign_rhs2 (g);
- }
- /* Convert
- _1 = __atomic_fetch_or_4 (ptr_6, mask, _3);
- _2 = (int) _1;
- _5 = _2 & mask;
- to
- _1 = __atomic_fetch_or_4 (ptr_6, mask, _3);
- _6 = _1 & mask;
- _5 = (int) _6;
- and convert
- _1 = ~mask_7;
- _2 = (unsigned int) _1;
- _3 = __atomic_fetch_and_4 (ptr_6, _2, 0);
- _4 = (int) _3;
- _5 = _4 & mask_7;
- to
- _1 = __atomic_fetch_and_* (ptr_6, ~mask_7, _3);
- _12 = _3 & mask_7;
- _5 = (int) _12;
-
- and Convert
- _1 = __atomic_fetch_and_4 (ptr_6, ~mask, _3);
- _2 = (short int) _1;
- _5 = _2 & mask;
- to
- _1 = __atomic_fetch_and_4 (ptr_6, ~mask, _3);
- _8 = _1 & mask;
- _5 = (short int) _8;
- */
- gimple_seq stmts = NULL;
- match_op[1] = gimple_convert (&stmts,
- TREE_TYPE (use_rhs),
- match_op[1]);
- var = gimple_build (&stmts, BIT_AND_EXPR,
- TREE_TYPE (use_rhs), use_rhs, match_op[1]);
- gsi = gsi_for_stmt (use_stmt);
- gsi_remove (&gsi, true);
- release_defs (use_stmt);
- use_stmt = gimple_seq_last_stmt (stmts);
- gsi = gsi_for_stmt (use_nop_stmt);
- gsi_insert_seq_before (&gsi, stmts, GSI_SAME_STMT);
- gimple_assign_set_rhs_with_ops (&gsi, CONVERT_EXPR, var);
- update_stmt (use_nop_stmt);
- }
- }
- else
- return false;
-
- if (!bit)
- {
- if (ibit < 0)
- gcc_unreachable ();
- bit = build_int_cst (TREE_TYPE (lhs), ibit);
- }
- }
- else if (optab_handler (optab, TYPE_MODE (TREE_TYPE (lhs)))
- == CODE_FOR_nothing)
- return false;
-
- tree use_lhs = gimple_assign_lhs (use_stmt);
- if (!use_lhs)
- return false;
-
- if (!bit)
- {
- if (TREE_CODE (mask) == INTEGER_CST)
- {
- if (fn == IFN_ATOMIC_BIT_TEST_AND_RESET)
- mask = const_unop (BIT_NOT_EXPR, TREE_TYPE (mask), mask);
- mask = fold_convert (TREE_TYPE (lhs), mask);
- int ibit = tree_log2 (mask);
- if (ibit < 0)
- return false;
- bit = build_int_cst (TREE_TYPE (lhs), ibit);
- }
- else if (TREE_CODE (mask) == SSA_NAME)
- {
- gimple *g = SSA_NAME_DEF_STMT (mask);
- tree match_op;
- if (gimple_nop_convert (mask, &match_op, NULL))
- {
- mask = match_op;
- if (TREE_CODE (mask) != SSA_NAME)
- return false;
- g = SSA_NAME_DEF_STMT (mask);
- }
- if (!is_gimple_assign (g))
- return false;
-
- if (fn == IFN_ATOMIC_BIT_TEST_AND_RESET)
- {
- if (gimple_assign_rhs_code (g) != BIT_NOT_EXPR)
- return false;
- mask = gimple_assign_rhs1 (g);
- if (TREE_CODE (mask) != SSA_NAME)
- return false;
- g = SSA_NAME_DEF_STMT (mask);
- }
-
- if (!is_gimple_assign (g)
- || gimple_assign_rhs_code (g) != LSHIFT_EXPR
- || !integer_onep (gimple_assign_rhs1 (g)))
- return false;
- bit = gimple_assign_rhs2 (g);
- }
- else
- return false;
-
- tree cmp_mask;
- if (gimple_assign_rhs1 (use_stmt) == lhs)
- cmp_mask = gimple_assign_rhs2 (use_stmt);
- else
- cmp_mask = gimple_assign_rhs1 (use_stmt);
-
- tree match_op;
- if (gimple_nop_convert (cmp_mask, &match_op, NULL))
- cmp_mask = match_op;
-
- if (!operand_equal_p (cmp_mask, mask, 0))
- return false;
- }
-
- bool use_bool = true;
- bool has_debug_uses = false;
- imm_use_iterator iter;
- gimple *g;
-
- if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (use_lhs))
- use_bool = false;
- FOR_EACH_IMM_USE_STMT (g, iter, use_lhs)
- {
- enum tree_code code = ERROR_MARK;
- tree op0 = NULL_TREE, op1 = NULL_TREE;
- if (is_gimple_debug (g))
- {
- has_debug_uses = true;
- continue;
- }
- else if (is_gimple_assign (g))
- switch (gimple_assign_rhs_code (g))
- {
- case COND_EXPR:
- op1 = gimple_assign_rhs1 (g);
- code = TREE_CODE (op1);
- if (TREE_CODE_CLASS (code) != tcc_comparison)
- break;
- op0 = TREE_OPERAND (op1, 0);
- op1 = TREE_OPERAND (op1, 1);
- break;
- case EQ_EXPR:
- case NE_EXPR:
- code = gimple_assign_rhs_code (g);
- op0 = gimple_assign_rhs1 (g);
- op1 = gimple_assign_rhs2 (g);
- break;
- default:
- break;
- }
- else if (gimple_code (g) == GIMPLE_COND)
- {
- code = gimple_cond_code (g);
- op0 = gimple_cond_lhs (g);
- op1 = gimple_cond_rhs (g);
- }
-
- if ((code == EQ_EXPR || code == NE_EXPR)
- && op0 == use_lhs
- && integer_zerop (op1))
- {
- use_operand_p use_p;
- int n = 0;
- FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
- n++;
- if (n == 1)
- continue;
- }
-
- use_bool = false;
- break;
- }
-
- tree new_lhs = make_ssa_name (TREE_TYPE (lhs));
- tree flag = build_int_cst (TREE_TYPE (lhs), use_bool);
- if (has_model_arg)
- g = gimple_build_call_internal (fn, 5, gimple_call_arg (call, 0),
- bit, flag, gimple_call_arg (call, 2),
- gimple_call_fn (call));
- else
- g = gimple_build_call_internal (fn, 4, gimple_call_arg (call, 0),
- bit, flag, gimple_call_fn (call));
- gimple_call_set_lhs (g, new_lhs);
- gimple_set_location (g, gimple_location (call));
- gimple_move_vops (g, call);
- bool throws = stmt_can_throw_internal (cfun, call);
- gimple_call_set_nothrow (as_a <gcall *> (g),
- gimple_call_nothrow_p (as_a <gcall *> (call)));
- gimple_stmt_iterator gsi = *gsip;
- gsi_insert_after (&gsi, g, GSI_NEW_STMT);
- edge e = NULL;
- if (throws)
- {
- maybe_clean_or_replace_eh_stmt (call, g);
- if (after || (use_bool && has_debug_uses))
- e = find_fallthru_edge (gsi_bb (gsi)->succs);
- }
- if (after)
- {
- /* The internal function returns the value of the specified bit
- before the atomic operation. If we are interested in the value
- of the specified bit after the atomic operation (makes only sense
- for xor, otherwise the bit content is compile time known),
- we need to invert the bit. */
- tree mask_convert = mask;
- gimple_seq stmts = NULL;
- if (!use_bool)
- mask_convert = gimple_convert (&stmts, TREE_TYPE (lhs), mask);
- new_lhs = gimple_build (&stmts, BIT_XOR_EXPR, TREE_TYPE (lhs), new_lhs,
- use_bool ? build_int_cst (TREE_TYPE (lhs), 1)
- : mask_convert);
- if (throws)
- {
- gsi_insert_seq_on_edge_immediate (e, stmts);
- gsi = gsi_for_stmt (gimple_seq_last (stmts));
- }
- else
- gsi_insert_seq_after (&gsi, stmts, GSI_NEW_STMT);
- }
- if (use_bool && has_debug_uses)
- {
- tree temp = NULL_TREE;
- if (!throws || after || single_pred_p (e->dest))
- {
- temp = build_debug_expr_decl (TREE_TYPE (lhs));
- tree t = build2 (LSHIFT_EXPR, TREE_TYPE (lhs), new_lhs, bit);
- g = gimple_build_debug_bind (temp, t, g);
- if (throws && !after)
- {
- gsi = gsi_after_labels (e->dest);
- gsi_insert_before (&gsi, g, GSI_SAME_STMT);
- }
- else
- gsi_insert_after (&gsi, g, GSI_NEW_STMT);
- }
- FOR_EACH_IMM_USE_STMT (g, iter, use_lhs)
- if (is_gimple_debug (g))
- {
- use_operand_p use_p;
- if (temp == NULL_TREE)
- gimple_debug_bind_reset_value (g);
- else
- FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
- SET_USE (use_p, temp);
- update_stmt (g);
- }
- }
- SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new_lhs)
- = SSA_NAME_OCCURS_IN_ABNORMAL_PHI (use_lhs);
- replace_uses_by (use_lhs, new_lhs);
- gsi = gsi_for_stmt (use_stmt);
- gsi_remove (&gsi, true);
- release_defs (use_stmt);
- gsi_remove (gsip, true);
- release_ssa_name (lhs);
- return true;
-}
-
-/* Optimize
- _4 = __atomic_add_fetch_* (ptr_6, arg_2, _3);
- _5 = _4 == 0;
- to
- _4 = .ATOMIC_ADD_FETCH_CMP_0 (EQ_EXPR, ptr_6, arg_2, _3);
- _5 = _4;
- Similarly for __sync_add_and_fetch_* (without the ", _3" part
- in there). */
-
-static bool
-optimize_atomic_op_fetch_cmp_0 (gimple_stmt_iterator *gsip,
- enum internal_fn fn, bool has_model_arg)
-{
- gimple *call = gsi_stmt (*gsip);
- tree lhs = gimple_call_lhs (call);
- use_operand_p use_p;
- gimple *use_stmt;
-
- if (!flag_inline_atomics
- || optimize_debug
- || !gimple_call_builtin_p (call, BUILT_IN_NORMAL)
- || !lhs
- || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)
- || !single_imm_use (lhs, &use_p, &use_stmt)
- || !gimple_vdef (call))
- return false;
-
- optab optab;
- switch (fn)
- {
- case IFN_ATOMIC_ADD_FETCH_CMP_0:
- optab = atomic_add_fetch_cmp_0_optab;
- break;
- case IFN_ATOMIC_SUB_FETCH_CMP_0:
- optab = atomic_sub_fetch_cmp_0_optab;
- break;
- case IFN_ATOMIC_AND_FETCH_CMP_0:
- optab = atomic_and_fetch_cmp_0_optab;
- break;
- case IFN_ATOMIC_OR_FETCH_CMP_0:
- optab = atomic_or_fetch_cmp_0_optab;
- break;
- case IFN_ATOMIC_XOR_FETCH_CMP_0:
- optab = atomic_xor_fetch_cmp_0_optab;
- break;
- default:
- return false;
- }
-
- if (optab_handler (optab, TYPE_MODE (TREE_TYPE (lhs)))
- == CODE_FOR_nothing)
- return false;
-
- tree use_lhs = lhs;
- if (gimple_assign_cast_p (use_stmt))
- {
- use_lhs = gimple_assign_lhs (use_stmt);
- if (!tree_nop_conversion_p (TREE_TYPE (use_lhs), TREE_TYPE (lhs))
- || (!INTEGRAL_TYPE_P (TREE_TYPE (use_lhs))
- && !POINTER_TYPE_P (TREE_TYPE (use_lhs)))
- || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (use_lhs)
- || !single_imm_use (use_lhs, &use_p, &use_stmt))
- return false;
- }
- enum tree_code code = ERROR_MARK;
- tree op0 = NULL_TREE, op1 = NULL_TREE;
- if (is_gimple_assign (use_stmt))
- switch (gimple_assign_rhs_code (use_stmt))
- {
- case COND_EXPR:
- op1 = gimple_assign_rhs1 (use_stmt);
- code = TREE_CODE (op1);
- if (TREE_CODE_CLASS (code) == tcc_comparison)
- {
- op0 = TREE_OPERAND (op1, 0);
- op1 = TREE_OPERAND (op1, 1);
- }
- break;
- default:
- code = gimple_assign_rhs_code (use_stmt);
- if (TREE_CODE_CLASS (code) == tcc_comparison)
- {
- op0 = gimple_assign_rhs1 (use_stmt);
- op1 = gimple_assign_rhs2 (use_stmt);
- }
- break;
- }
- else if (gimple_code (use_stmt) == GIMPLE_COND)
- {
- code = gimple_cond_code (use_stmt);
- op0 = gimple_cond_lhs (use_stmt);
- op1 = gimple_cond_rhs (use_stmt);
- }
-
- switch (code)
- {
- case LT_EXPR:
- case LE_EXPR:
- case GT_EXPR:
- case GE_EXPR:
- if (!INTEGRAL_TYPE_P (TREE_TYPE (use_lhs))
- || TREE_CODE (TREE_TYPE (use_lhs)) == BOOLEAN_TYPE
- || TYPE_UNSIGNED (TREE_TYPE (use_lhs)))
- return false;
- /* FALLTHRU */
- case EQ_EXPR:
- case NE_EXPR:
- if (op0 == use_lhs && integer_zerop (op1))
- break;
- return false;
- default:
- return false;
- }
-
- int encoded;
- switch (code)
- {
- /* Use special encoding of the operation. We want to also
- encode the mode in the first argument and for neither EQ_EXPR
- etc. nor EQ etc. we can rely it will fit into QImode. */
- case EQ_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_EQ; break;
- case NE_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_NE; break;
- case LT_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_LT; break;
- case LE_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_LE; break;
- case GT_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_GT; break;
- case GE_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_GE; break;
- default: gcc_unreachable ();
- }
-
- tree new_lhs = make_ssa_name (boolean_type_node);
- gimple *g;
- tree flag = build_int_cst (TREE_TYPE (lhs), encoded);
- if (has_model_arg)
- g = gimple_build_call_internal (fn, 5, flag,
- gimple_call_arg (call, 0),
- gimple_call_arg (call, 1),
- gimple_call_arg (call, 2),
- gimple_call_fn (call));
- else
- g = gimple_build_call_internal (fn, 4, flag,
- gimple_call_arg (call, 0),
- gimple_call_arg (call, 1),
- gimple_call_fn (call));
- gimple_call_set_lhs (g, new_lhs);
- gimple_set_location (g, gimple_location (call));
- gimple_move_vops (g, call);
- bool throws = stmt_can_throw_internal (cfun, call);
- gimple_call_set_nothrow (as_a <gcall *> (g),
- gimple_call_nothrow_p (as_a <gcall *> (call)));
- gimple_stmt_iterator gsi = *gsip;
- gsi_insert_after (&gsi, g, GSI_SAME_STMT);
- if (throws)
- maybe_clean_or_replace_eh_stmt (call, g);
- if (is_gimple_assign (use_stmt))
- switch (gimple_assign_rhs_code (use_stmt))
- {
- case COND_EXPR:
- gimple_assign_set_rhs1 (use_stmt, new_lhs);
- break;
- default:
- gsi = gsi_for_stmt (use_stmt);
- if (tree ulhs = gimple_assign_lhs (use_stmt))
- if (useless_type_conversion_p (TREE_TYPE (ulhs),
- boolean_type_node))
- {
- gimple_assign_set_rhs_with_ops (&gsi, SSA_NAME, new_lhs);
- break;
- }
- gimple_assign_set_rhs_with_ops (&gsi, NOP_EXPR, new_lhs);
- break;
- }
- else if (gimple_code (use_stmt) == GIMPLE_COND)
- {
- gcond *use_cond = as_a <gcond *> (use_stmt);
- gimple_cond_set_code (use_cond, NE_EXPR);
- gimple_cond_set_lhs (use_cond, new_lhs);
- gimple_cond_set_rhs (use_cond, boolean_false_node);
- }
-
- update_stmt (use_stmt);
- if (use_lhs != lhs)
- {
- gsi = gsi_for_stmt (SSA_NAME_DEF_STMT (use_lhs));
- gsi_remove (&gsi, true);
- release_ssa_name (use_lhs);
- }
- gsi_remove (gsip, true);
- release_ssa_name (lhs);
- return true;
-}
-
-/* A simple pass that attempts to fold all builtin functions. This pass
- is run after we've propagated as many constants as we can. */
-
-namespace {
-
-const pass_data pass_data_fold_builtins =
-{
- GIMPLE_PASS, /* type */
- "fab", /* name */
- OPTGROUP_NONE, /* optinfo_flags */
- TV_NONE, /* tv_id */
- ( PROP_cfg | PROP_ssa ), /* properties_required */
- 0, /* properties_provided */
- 0, /* properties_destroyed */
- 0, /* todo_flags_start */
- TODO_update_ssa, /* todo_flags_finish */
-};
-
-class pass_fold_builtins : public gimple_opt_pass
-{
-public:
- pass_fold_builtins (gcc::context *ctxt)
- : gimple_opt_pass (pass_data_fold_builtins, ctxt)
- {}
-
- /* opt_pass methods: */
- opt_pass * clone () final override { return new pass_fold_builtins (m_ctxt); }
- unsigned int execute (function *) final override;
-
-}; // class pass_fold_builtins
-
-/* Optimize memcmp STMT into memcmp_eq if it is only used with
- `== 0` or `!= 0`. */
-
-static void
-optimize_memcmp_eq (gcall *stmt)
-{
- /* Make sure memcmp arguments are the correct type. */
- if (gimple_call_num_args (stmt) != 3)
- return;
- tree arg1 = gimple_call_arg (stmt, 0);
- tree arg2 = gimple_call_arg (stmt, 1);
- tree len = gimple_call_arg (stmt, 2);
-
- if (!POINTER_TYPE_P (TREE_TYPE (arg1)))
- return;
- if (!POINTER_TYPE_P (TREE_TYPE (arg2)))
- return;
- if (!INTEGRAL_TYPE_P (TREE_TYPE (len)))
- return;
- /* The return value of the memcmp has to be used
- equality comparison to zero. */
- tree res = gimple_call_lhs (stmt);
-
- if (!res || !use_in_zero_equality (res))
- return;
-
- gimple_call_set_fndecl (stmt, builtin_decl_explicit (BUILT_IN_MEMCMP_EQ));
- update_stmt (stmt);
-}
-
-unsigned int
-pass_fold_builtins::execute (function *fun)
-{
- bool cfg_changed = false;
- basic_block bb;
- unsigned int todoflags = 0;
-
- /* Set last full fold prop if not already set. */
- fun->curr_properties |= PROP_last_full_fold;
-
- FOR_EACH_BB_FN (bb, fun)
- {
- gimple_stmt_iterator i;
- for (i = gsi_start_bb (bb); !gsi_end_p (i); )
- {
- gimple *stmt, *old_stmt;
- tree callee;
- enum built_in_function fcode;
-
- stmt = gsi_stmt (i);
-
- if (gimple_code (stmt) != GIMPLE_CALL)
- {
- gsi_next (&i);
- continue;
- }
-
- callee = gimple_call_fndecl (stmt);
- if (!callee
- && gimple_call_internal_p (stmt, IFN_ASSUME))
- {
- gsi_remove (&i, true);
- continue;
- }
- if (!callee || !fndecl_built_in_p (callee, BUILT_IN_NORMAL))
- {
- gsi_next (&i);
- continue;
- }
-
- fcode = DECL_FUNCTION_CODE (callee);
- if (fold_stmt (&i))
- ;
- else
- {
- tree result = NULL_TREE;
- switch (DECL_FUNCTION_CODE (callee))
- {
-
- case BUILT_IN_STACK_RESTORE:
- result = optimize_stack_restore (i);
- if (result)
- break;
- gsi_next (&i);
- continue;
-
- case BUILT_IN_MEMCMP:
- optimize_memcmp_eq (as_a<gcall*>(stmt));
- break;
-
- case BUILT_IN_UNREACHABLE:
- if (optimize_unreachable (i))
- cfg_changed = true;
- break;
-
- case BUILT_IN_ATOMIC_ADD_FETCH_1:
- case BUILT_IN_ATOMIC_ADD_FETCH_2:
- case BUILT_IN_ATOMIC_ADD_FETCH_4:
- case BUILT_IN_ATOMIC_ADD_FETCH_8:
- case BUILT_IN_ATOMIC_ADD_FETCH_16:
- optimize_atomic_op_fetch_cmp_0 (&i,
- IFN_ATOMIC_ADD_FETCH_CMP_0,
- true);
- break;
- case BUILT_IN_SYNC_ADD_AND_FETCH_1:
- case BUILT_IN_SYNC_ADD_AND_FETCH_2:
- case BUILT_IN_SYNC_ADD_AND_FETCH_4:
- case BUILT_IN_SYNC_ADD_AND_FETCH_8:
- case BUILT_IN_SYNC_ADD_AND_FETCH_16:
- optimize_atomic_op_fetch_cmp_0 (&i,
- IFN_ATOMIC_ADD_FETCH_CMP_0,
- false);
- break;
-
- case BUILT_IN_ATOMIC_SUB_FETCH_1:
- case BUILT_IN_ATOMIC_SUB_FETCH_2:
- case BUILT_IN_ATOMIC_SUB_FETCH_4:
- case BUILT_IN_ATOMIC_SUB_FETCH_8:
- case BUILT_IN_ATOMIC_SUB_FETCH_16:
- optimize_atomic_op_fetch_cmp_0 (&i,
- IFN_ATOMIC_SUB_FETCH_CMP_0,
- true);
- break;
- case BUILT_IN_SYNC_SUB_AND_FETCH_1:
- case BUILT_IN_SYNC_SUB_AND_FETCH_2:
- case BUILT_IN_SYNC_SUB_AND_FETCH_4:
- case BUILT_IN_SYNC_SUB_AND_FETCH_8:
- case BUILT_IN_SYNC_SUB_AND_FETCH_16:
- optimize_atomic_op_fetch_cmp_0 (&i,
- IFN_ATOMIC_SUB_FETCH_CMP_0,
- false);
- break;
-
- case BUILT_IN_ATOMIC_FETCH_OR_1:
- case BUILT_IN_ATOMIC_FETCH_OR_2:
- case BUILT_IN_ATOMIC_FETCH_OR_4:
- case BUILT_IN_ATOMIC_FETCH_OR_8:
- case BUILT_IN_ATOMIC_FETCH_OR_16:
- optimize_atomic_bit_test_and (&i,
- IFN_ATOMIC_BIT_TEST_AND_SET,
- true, false);
- break;
- case BUILT_IN_SYNC_FETCH_AND_OR_1:
- case BUILT_IN_SYNC_FETCH_AND_OR_2:
- case BUILT_IN_SYNC_FETCH_AND_OR_4:
- case BUILT_IN_SYNC_FETCH_AND_OR_8:
- case BUILT_IN_SYNC_FETCH_AND_OR_16:
- optimize_atomic_bit_test_and (&i,
- IFN_ATOMIC_BIT_TEST_AND_SET,
- false, false);
- break;
-
- case BUILT_IN_ATOMIC_FETCH_XOR_1:
- case BUILT_IN_ATOMIC_FETCH_XOR_2:
- case BUILT_IN_ATOMIC_FETCH_XOR_4:
- case BUILT_IN_ATOMIC_FETCH_XOR_8:
- case BUILT_IN_ATOMIC_FETCH_XOR_16:
- optimize_atomic_bit_test_and
- (&i, IFN_ATOMIC_BIT_TEST_AND_COMPLEMENT, true, false);
- break;
- case BUILT_IN_SYNC_FETCH_AND_XOR_1:
- case BUILT_IN_SYNC_FETCH_AND_XOR_2:
- case BUILT_IN_SYNC_FETCH_AND_XOR_4:
- case BUILT_IN_SYNC_FETCH_AND_XOR_8:
- case BUILT_IN_SYNC_FETCH_AND_XOR_16:
- optimize_atomic_bit_test_and
- (&i, IFN_ATOMIC_BIT_TEST_AND_COMPLEMENT, false, false);
- break;
-
- case BUILT_IN_ATOMIC_XOR_FETCH_1:
- case BUILT_IN_ATOMIC_XOR_FETCH_2:
- case BUILT_IN_ATOMIC_XOR_FETCH_4:
- case BUILT_IN_ATOMIC_XOR_FETCH_8:
- case BUILT_IN_ATOMIC_XOR_FETCH_16:
- if (optimize_atomic_bit_test_and
- (&i, IFN_ATOMIC_BIT_TEST_AND_COMPLEMENT, true, true))
- break;
- optimize_atomic_op_fetch_cmp_0 (&i,
- IFN_ATOMIC_XOR_FETCH_CMP_0,
- true);
- break;
- case BUILT_IN_SYNC_XOR_AND_FETCH_1:
- case BUILT_IN_SYNC_XOR_AND_FETCH_2:
- case BUILT_IN_SYNC_XOR_AND_FETCH_4:
- case BUILT_IN_SYNC_XOR_AND_FETCH_8:
- case BUILT_IN_SYNC_XOR_AND_FETCH_16:
- if (optimize_atomic_bit_test_and
- (&i, IFN_ATOMIC_BIT_TEST_AND_COMPLEMENT, false, true))
- break;
- optimize_atomic_op_fetch_cmp_0 (&i,
- IFN_ATOMIC_XOR_FETCH_CMP_0,
- false);
- break;
-
- case BUILT_IN_ATOMIC_FETCH_AND_1:
- case BUILT_IN_ATOMIC_FETCH_AND_2:
- case BUILT_IN_ATOMIC_FETCH_AND_4:
- case BUILT_IN_ATOMIC_FETCH_AND_8:
- case BUILT_IN_ATOMIC_FETCH_AND_16:
- optimize_atomic_bit_test_and (&i,
- IFN_ATOMIC_BIT_TEST_AND_RESET,
- true, false);
- break;
- case BUILT_IN_SYNC_FETCH_AND_AND_1:
- case BUILT_IN_SYNC_FETCH_AND_AND_2:
- case BUILT_IN_SYNC_FETCH_AND_AND_4:
- case BUILT_IN_SYNC_FETCH_AND_AND_8:
- case BUILT_IN_SYNC_FETCH_AND_AND_16:
- optimize_atomic_bit_test_and (&i,
- IFN_ATOMIC_BIT_TEST_AND_RESET,
- false, false);
- break;
-
- case BUILT_IN_ATOMIC_AND_FETCH_1:
- case BUILT_IN_ATOMIC_AND_FETCH_2:
- case BUILT_IN_ATOMIC_AND_FETCH_4:
- case BUILT_IN_ATOMIC_AND_FETCH_8:
- case BUILT_IN_ATOMIC_AND_FETCH_16:
- optimize_atomic_op_fetch_cmp_0 (&i,
- IFN_ATOMIC_AND_FETCH_CMP_0,
- true);
- break;
- case BUILT_IN_SYNC_AND_AND_FETCH_1:
- case BUILT_IN_SYNC_AND_AND_FETCH_2:
- case BUILT_IN_SYNC_AND_AND_FETCH_4:
- case BUILT_IN_SYNC_AND_AND_FETCH_8:
- case BUILT_IN_SYNC_AND_AND_FETCH_16:
- optimize_atomic_op_fetch_cmp_0 (&i,
- IFN_ATOMIC_AND_FETCH_CMP_0,
- false);
- break;
-
- case BUILT_IN_ATOMIC_OR_FETCH_1:
- case BUILT_IN_ATOMIC_OR_FETCH_2:
- case BUILT_IN_ATOMIC_OR_FETCH_4:
- case BUILT_IN_ATOMIC_OR_FETCH_8:
- case BUILT_IN_ATOMIC_OR_FETCH_16:
- optimize_atomic_op_fetch_cmp_0 (&i,
- IFN_ATOMIC_OR_FETCH_CMP_0,
- true);
- break;
- case BUILT_IN_SYNC_OR_AND_FETCH_1:
- case BUILT_IN_SYNC_OR_AND_FETCH_2:
- case BUILT_IN_SYNC_OR_AND_FETCH_4:
- case BUILT_IN_SYNC_OR_AND_FETCH_8:
- case BUILT_IN_SYNC_OR_AND_FETCH_16:
- optimize_atomic_op_fetch_cmp_0 (&i,
- IFN_ATOMIC_OR_FETCH_CMP_0,
- false);
- break;
-
- case BUILT_IN_VA_START:
- case BUILT_IN_VA_END:
- case BUILT_IN_VA_COPY:
- /* These shouldn't be folded before pass_stdarg. */
- result = optimize_stdarg_builtin (stmt);
- break;
-
- default:;
- }
-
- if (!result)
- {
- gsi_next (&i);
- continue;
- }
-
- gimplify_and_update_call_from_tree (&i, result);
- }
-
- todoflags |= TODO_update_address_taken;
-
- if (dump_file && (dump_flags & TDF_DETAILS))
- {
- fprintf (dump_file, "Simplified\n ");
- print_gimple_stmt (dump_file, stmt, 0, dump_flags);
- }
-
- old_stmt = stmt;
- stmt = gsi_stmt (i);
- update_stmt (stmt);
-
- if (maybe_clean_or_replace_eh_stmt (old_stmt, stmt)
- && gimple_purge_dead_eh_edges (bb))
- cfg_changed = true;
-
- if (dump_file && (dump_flags & TDF_DETAILS))
- {
- fprintf (dump_file, "to\n ");
- print_gimple_stmt (dump_file, stmt, 0, dump_flags);
- fprintf (dump_file, "\n");
- }
-
- /* Retry the same statement if it changed into another
- builtin, there might be new opportunities now. */
- if (gimple_code (stmt) != GIMPLE_CALL)
- {
- gsi_next (&i);
- continue;
- }
- callee = gimple_call_fndecl (stmt);
- if (!callee
- || !fndecl_built_in_p (callee, fcode))
- gsi_next (&i);
- }
- }
-
- /* Delete unreachable blocks. */
- if (cfg_changed)
- todoflags |= TODO_cleanup_cfg;
-
- return todoflags;
-}
-
-} // anon namespace
-
-gimple_opt_pass *
-make_pass_fold_builtins (gcc::context *ctxt)
-{
- return new pass_fold_builtins (ctxt);
-}
-
/* A simple pass that emits some warnings post IPA. */
namespace {
diff --git a/gcc/tree-ssa-forwprop.cc b/gcc/tree-ssa-forwprop.cc
index 4c438a0..2c6e1ea 100644
--- a/gcc/tree-ssa-forwprop.cc
+++ b/gcc/tree-ssa-forwprop.cc
@@ -1842,7 +1842,15 @@ simplify_builtin_memcmp (gimple_stmt_iterator *gsi_p, gcall *stmt)
return true;
}
}
- return false;
+
+ /* Replace memcmp with memcmp_eq if the above fails. */
+ if (DECL_FUNCTION_CODE (gimple_call_fndecl (stmt)) == BUILT_IN_MEMCMP_EQ)
+ return false;
+ if (!(cfun->curr_properties & (PROP_last_full_fold)))
+ return false;
+ gimple_call_set_fndecl (stmt, builtin_decl_explicit (BUILT_IN_MEMCMP_EQ));
+ update_stmt (stmt);
+ return true;
}
/* Optimizes builtin memchrs for small constant sizes with a const string.
@@ -2124,6 +2132,116 @@ simplify_builtin_memcpy_memset (gimple_stmt_iterator *gsi_p, gcall *stmt2)
}
}
+
+/* Try to optimize out __builtin_stack_restore. Optimize it out
+ if there is another __builtin_stack_restore in the same basic
+ block and no calls or ASM_EXPRs are in between, or if this block's
+ only outgoing edge is to EXIT_BLOCK and there are no calls or
+ ASM_EXPRs after this __builtin_stack_restore.
+ Note restore right before a noreturn function is not needed.
+ And skip some cheap calls that will most likely become an instruction.
+ Restoring the stack before a call is important to be able to keep
+ stack usage down so that call does not run out of stack. */
+
+
+static bool
+optimize_stack_restore (gimple_stmt_iterator *gsi, gimple *call)
+{
+ if (!(cfun->curr_properties & PROP_last_full_fold))
+ return false;
+ tree callee;
+ gimple *stmt;
+
+ basic_block bb = gsi_bb (*gsi);
+
+ if (gimple_call_num_args (call) != 1
+ || TREE_CODE (gimple_call_arg (call, 0)) != SSA_NAME
+ || !POINTER_TYPE_P (TREE_TYPE (gimple_call_arg (call, 0))))
+ return false;
+
+ gimple_stmt_iterator i = *gsi;
+ for (gsi_next (&i); !gsi_end_p (i); gsi_next (&i))
+ {
+ stmt = gsi_stmt (i);
+ if (is_a<gasm*> (stmt))
+ return false;
+ gcall *call = dyn_cast<gcall*>(stmt);
+ if (!call)
+ continue;
+
+ /* We can remove the restore in front of noreturn
+ calls. Since the restore will happen either
+ via an unwind/longjmp or not at all. */
+ if (gimple_call_noreturn_p (call))
+ break;
+
+ /* Internal calls are ok, to bypass
+ check first since fndecl will be null. */
+ if (gimple_call_internal_p (call))
+ continue;
+
+ callee = gimple_call_fndecl (call);
+ /* Non-builtin calls are not ok. */
+ if (!callee
+ || !fndecl_built_in_p (callee))
+ return false;
+
+ /* Do not remove stack updates before strub leave. */
+ if (fndecl_built_in_p (callee, BUILT_IN___STRUB_LEAVE)
+ /* Alloca calls are not ok either. */
+ || fndecl_builtin_alloc_p (callee))
+ return false;
+
+ if (fndecl_built_in_p (callee, BUILT_IN_STACK_RESTORE))
+ goto second_stack_restore;
+
+ /* If not a simple or inexpensive builtin, then it is not ok either. */
+ if (!is_simple_builtin (callee)
+ && !is_inexpensive_builtin (callee))
+ return false;
+ }
+
+ /* Allow one successor of the exit block, or zero successors. */
+ switch (EDGE_COUNT (bb->succs))
+ {
+ case 0:
+ break;
+ case 1:
+ if (single_succ_edge (bb)->dest != EXIT_BLOCK_PTR_FOR_FN (cfun))
+ return false;
+ break;
+ default:
+ return false;
+ }
+ second_stack_restore:
+
+ /* If there's exactly one use, then zap the call to __builtin_stack_save.
+ If there are multiple uses, then the last one should remove the call.
+ In any case, whether the call to __builtin_stack_save can be removed
+ or not is irrelevant to removing the call to __builtin_stack_restore. */
+ if (has_single_use (gimple_call_arg (call, 0)))
+ {
+ gimple *stack_save = SSA_NAME_DEF_STMT (gimple_call_arg (call, 0));
+ if (is_gimple_call (stack_save))
+ {
+ callee = gimple_call_fndecl (stack_save);
+ if (callee && fndecl_built_in_p (callee, BUILT_IN_STACK_SAVE))
+ {
+ gimple_stmt_iterator stack_save_gsi;
+ tree rhs;
+
+ stack_save_gsi = gsi_for_stmt (stack_save);
+ rhs = build_int_cst (TREE_TYPE (gimple_call_arg (call, 0)), 0);
+ replace_call_with_value (&stack_save_gsi, rhs);
+ }
+ }
+ }
+
+ /* No effect, so the statement will be deleted. */
+ replace_call_with_value (gsi, NULL_TREE);
+ return true;
+}
+
/* *GSI_P is a GIMPLE_CALL to a builtin function.
Optimize
memcpy (p, "abcd", 4);
@@ -2155,6 +2273,8 @@ simplify_builtin_call (gimple_stmt_iterator *gsi_p, tree callee2, bool full_walk
switch (DECL_FUNCTION_CODE (callee2))
{
+ case BUILT_IN_STACK_RESTORE:
+ return optimize_stack_restore (gsi_p, as_a<gcall*>(stmt2));
case BUILT_IN_MEMCMP:
case BUILT_IN_MEMCMP_EQ:
return simplify_builtin_memcmp (gsi_p, as_a<gcall*>(stmt2));
@@ -4786,6 +4906,49 @@ public:
bool m_full_walk = false;
}; // class pass_forwprop
+/* Attemp to make the BB block of __builtin_unreachable unreachable by changing
+ the incoming jumps. Return true if at least one jump was changed. */
+
+static bool
+optimize_unreachable (basic_block bb)
+{
+ gimple_stmt_iterator gsi;
+ gimple *stmt;
+ edge_iterator ei;
+ edge e;
+ bool ret;
+
+ ret = false;
+ FOR_EACH_EDGE (e, ei, bb->preds)
+ {
+ gsi = gsi_last_bb (e->src);
+ if (gsi_end_p (gsi))
+ continue;
+
+ stmt = gsi_stmt (gsi);
+ if (gcond *cond_stmt = dyn_cast <gcond *> (stmt))
+ {
+ if (e->flags & EDGE_TRUE_VALUE)
+ gimple_cond_make_false (cond_stmt);
+ else if (e->flags & EDGE_FALSE_VALUE)
+ gimple_cond_make_true (cond_stmt);
+ else
+ gcc_unreachable ();
+ update_stmt (cond_stmt);
+ }
+ else
+ {
+ /* Todo: handle other cases. Note that unreachable switch case
+ statements have already been removed. */
+ continue;
+ }
+
+ ret = true;
+ }
+
+ return ret;
+}
+
unsigned int
pass_forwprop::execute (function *fun)
{
@@ -4853,6 +5016,21 @@ pass_forwprop::execute (function *fun)
if (!any)
continue;
+ /* Remove conditions that go directly to unreachable when this is the last forwprop. */
+ if (last_p
+ && !(flag_sanitize & SANITIZE_UNREACHABLE))
+ {
+ gimple_stmt_iterator gsi;
+ gsi = gsi_start_nondebug_after_labels_bb (bb);
+ if (!gsi_end_p (gsi)
+ && gimple_call_builtin_p (*gsi, BUILT_IN_UNREACHABLE)
+ && optimize_unreachable (bb))
+ {
+ cfg_changed = true;
+ continue;
+ }
+ }
+
/* Record degenerate PHIs in the lattice. */
for (gphi_iterator si = gsi_start_phis (bb); !gsi_end_p (si);
gsi_next (&si))
@@ -5285,6 +5463,11 @@ pass_forwprop::execute (function *fun)
if (fold_stmt (&gsi, fwprop_ssa_val, simple_dce_worklist))
{
changed = true;
+ /* There is no updating of the address
+ taken after the last forwprop so update
+ the addresses when a folding happened. */
+ if (last_p)
+ todoflags |= TODO_update_address_taken;
stmt = gsi_stmt (gsi);
/* Cleanup the CFG if we simplified a condition to
true or false. */
diff --git a/gcc/tree-ssa-pre.cc b/gcc/tree-ssa-pre.cc
index 64ffaca..2a7dcbe 100644
--- a/gcc/tree-ssa-pre.cc
+++ b/gcc/tree-ssa-pre.cc
@@ -2049,8 +2049,12 @@ prune_clobbered_mems (bitmap_set_t set, basic_block block, bool clean_traps)
the bitmap_find_leader way to see if there's still an expression
for it. For some ratio of to be removed values and number of
values/expressions in the set this might be faster than rebuilding
- the value-set. */
- if (any_removed)
+ the value-set.
+ Note when there's a MAX solution on one edge (clean_traps) do not
+ prune values as we need to consider the resulting expression set MAX
+ as well. This avoids a later growing ANTIC_IN value-set during
+ iteration, when the explicitly represented expression set grows. */
+ if (any_removed && !clean_traps)
{
bitmap_clear (&set->values);
FOR_EACH_EXPR_ID_IN_SET (set, i, bi)
@@ -2080,6 +2084,7 @@ compute_antic_aux (basic_block block, bool block_has_abnormal_pred_edge)
edge e;
edge_iterator ei;
+ bool was_visited = BB_VISITED (block);
bool changed = ! BB_VISITED (block);
bool any_max_on_edge = false;
@@ -2215,6 +2220,32 @@ compute_antic_aux (basic_block block, bool block_has_abnormal_pred_edge)
/* clean (ANTIC_IN (block)) is defered to after the iteration converged
because it can cause non-convergence, see for example PR81181. */
+ if (was_visited
+ && bitmap_and_into (&ANTIC_IN (block)->values, &old->values))
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ fprintf (dump_file, "warning: intersecting with old ANTIC_IN "
+ "shrinks the set\n");
+ /* Prune expressions not in the value set. */
+ bitmap_iterator bi;
+ unsigned int i;
+ unsigned int to_clear = -1U;
+ FOR_EACH_EXPR_ID_IN_SET (ANTIC_IN (block), i, bi)
+ {
+ if (to_clear != -1U)
+ {
+ bitmap_clear_bit (&ANTIC_IN (block)->expressions, to_clear);
+ to_clear = -1U;
+ }
+ pre_expr expr = expression_for_id (i);
+ unsigned int value_id = get_expr_value_id (expr);
+ if (!bitmap_bit_p (&ANTIC_IN (block)->values, value_id))
+ to_clear = i;
+ }
+ if (to_clear != -1U)
+ bitmap_clear_bit (&ANTIC_IN (block)->expressions, to_clear);
+ }
+
if (!bitmap_set_equal (old, ANTIC_IN (block)))
changed = true;
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index 1d549e4..df45adb 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -7177,6 +7177,15 @@ vectorizable_reduction (loop_vec_info loop_vinfo,
tree vectype_out = SLP_TREE_VECTYPE (slp_for_stmt_info);
VECT_REDUC_INFO_VECTYPE (reduc_info) = vectype_out;
+ /* We do not handle mask reductions correctly in the epilogue. */
+ if (VECTOR_BOOLEAN_TYPE_P (vectype_out))
+ {
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "mask reduction not supported.\n");
+ return false;
+ }
+
gimple_match_op op;
if (!gimple_extract_op (stmt_info->stmt, &op))
gcc_unreachable ();
@@ -7187,8 +7196,7 @@ vectorizable_reduction (loop_vec_info loop_vinfo,
return false;
/* Do not try to vectorize bit-precision reductions. */
- if (!VECTOR_BOOLEAN_TYPE_P (vectype_out)
- && !type_has_mode_precision_p (op.type)
+ if (!type_has_mode_precision_p (op.type)
&& op.code != BIT_AND_EXPR
&& op.code != BIT_IOR_EXPR
&& op.code != BIT_XOR_EXPR)
diff --git a/gcc/tree.h b/gcc/tree.h
index 4c8ad98..6e46374 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -7005,6 +7005,15 @@ fndecl_built_in_p (const_tree node, built_in_function name1, F... names)
name1, names...));
}
+/* Returns true if the function decl NODE is an alloca. */
+inline bool
+fndecl_builtin_alloc_p (const_tree node)
+{
+ if (!fndecl_built_in_p (node, BUILT_IN_NORMAL))
+ return false;
+ return ALLOCA_FUNCTION_CODE_P (DECL_FUNCTION_CODE (node));
+}
+
/* A struct for encapsulating location information about an operator
and the operation built from it.
diff --git a/libbacktrace/Makefile.in b/libbacktrace/Makefile.in
index 9a9b8a4..43d9bb5 100644
--- a/libbacktrace/Makefile.in
+++ b/libbacktrace/Makefile.in
@@ -171,7 +171,9 @@ TESTS = $(am__append_4) $(MAKETESTS) $(am__EXEEXT_17)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/cet.m4 \
+ $(top_srcdir)/../config/clang-plugin.m4 \
$(top_srcdir)/../config/enable.m4 \
+ $(top_srcdir)/../config/gcc-plugin.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/override.m4 \
@@ -904,6 +906,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
+LLVM_CONFIG = @LLVM_CONFIG@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
diff --git a/libbacktrace/aclocal.m4 b/libbacktrace/aclocal.m4
index 528e617..df92f64 100644
--- a/libbacktrace/aclocal.m4
+++ b/libbacktrace/aclocal.m4
@@ -853,7 +853,9 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([../config/cet.m4])
+m4_include([../config/clang-plugin.m4])
m4_include([../config/enable.m4])
+m4_include([../config/gcc-plugin.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/multi.m4])
m4_include([../config/override.m4])
diff --git a/libbacktrace/configure b/libbacktrace/configure
index 85be043..b956afe 100755
--- a/libbacktrace/configure
+++ b/libbacktrace/configure
@@ -691,6 +691,7 @@ LIPO
NMEDIT
DSYMUTIL
AR
+LLVM_CONFIG
OBJDUMP
LN_S
NM
@@ -2739,7 +2740,6 @@ test -n "$target_alias" &&
test "$program_prefix$program_suffix$program_transform_name" = \
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-
target_alias=${target_alias-$host_alias}
# Expand $ac_aux_dir to an absolute path.
@@ -6606,8 +6606,266 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
-plugin_option=
+
+# Try CLANG_PLUGIN_FILE first since GCC_PLUGIN_OPTION may return the
+# wrong plugin_option with clang.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang" >&5
+$as_echo_n "checking for clang... " >&6; }
+if ${clang_cv_is_clang+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __clang__
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ clang_cv_is_clang=yes
+else
+ clang_cv_is_clang=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5
+$as_echo "$clang_cv_is_clang" >&6; }
+ plugin_file=
+ if test $clang_cv_is_clang = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5
+$as_echo_n "checking for clang plugin file... " >&6; }
+ plugin_names="LLVMgold.so"
+ for plugin in $plugin_names; do
+ plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin`
+ if test x$plugin_file = x$plugin; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LLVM_CONFIG"; then
+ ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LLVM_CONFIG="${ac_tool_prefix}llvm-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
+if test -n "$LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
+$as_echo "$LLVM_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LLVM_CONFIG"; then
+ ac_ct_LLVM_CONFIG=$LLVM_CONFIG
+ # Extract the first word of "llvm-config", so it can be a program name with args.
+set dummy llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LLVM_CONFIG"; then
+ ac_cv_prog_ac_ct_LLVM_CONFIG="$ac_ct_LLVM_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_LLVM_CONFIG="llvm-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LLVM_CONFIG=$ac_cv_prog_ac_ct_LLVM_CONFIG
+if test -n "$ac_ct_LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LLVM_CONFIG" >&5
+$as_echo "$ac_ct_LLVM_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LLVM_CONFIG" = x; then
+ LLVM_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LLVM_CONFIG=$ac_ct_LLVM_CONFIG
+ fi
+else
+ LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG"
+fi
+
+ if test "$?" != 0; then
+ as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5
+ fi
+ clang_lib_dir=`$LLVM_CONFIG --libdir`
+ if test -f $clang_lib_dir/$plugin; then
+ plugin_file=$clang_lib_dir/$plugin
+ fi
+ if test x$plugin_file != x$plugin; then
+ break;
+ fi
+ fi
+ done
+ if test -z $plugin_file; then
+ as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5
+ fi
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+ if test "${AR}" = "" ; then
+ as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5
+ fi
+ plugin_option="--plugin $plugin_file"
+ touch conftest.c
+ ${AR} $plugin_option rc conftest.a conftest.c
+ if test "$?" != 0; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
+$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
+ plugin_file=
+ fi
+ rm -f conftest.*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5
+$as_echo "$plugin_file" >&6; }
+ fi
+ plugin_file="$plugin_file"
+
+if test -n "$plugin_file"; then
+ plugin_option="--plugin $plugin_file"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5
+$as_echo_n "checking for -plugin option... " >&6; }
+
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+plugin_option=
for plugin in $plugin_names; do
plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
if test x$plugin_so = x$plugin; then
@@ -6618,7 +6876,119 @@ for plugin in $plugin_names; do
break
fi
done
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test "${AR}" = "" ; then
+ as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5
+fi
+touch conftest.c
+${AR} $plugin_option rc conftest.a conftest.c
+if test "$?" != 0; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
+$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
+ plugin_option=
+fi
+rm -f conftest.*
+if test -n "$plugin_option"; then
+ plugin_option="$plugin_option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5
+$as_echo "$plugin_option" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6713,17 +7083,15 @@ fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
- if $AR --help 2>&1 | grep -q "\--plugin"; then
- touch conftest.c
- $AR $plugin_option rc conftest.a conftest.c
- if test "$?" != 0; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
-$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
- else
+ case "$AR" in
+ *"$plugin_option"*)
+ ;;
+ *)
+ if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
- rm -f conftest.*
- fi
+ ;;
+ esac
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@@ -6930,9 +7298,15 @@ fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
- if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
- RANLIB="$RANLIB $plugin_option"
- fi
+ case "$RANLIB" in
+ *"$plugin_option"*)
+ ;;
+ *)
+ if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+ RANLIB="$RANLIB $plugin_option"
+ fi
+ ;;
+ esac
fi
@@ -11636,7 +12010,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11639 "configure"
+#line 12013 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11742,7 +12116,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11745 "configure"
+#line 12119 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/libbacktrace/configure.ac b/libbacktrace/configure.ac
index 6549cde..0a5e04f 100644
--- a/libbacktrace/configure.ac
+++ b/libbacktrace/configure.ac
@@ -37,7 +37,8 @@ if test -n "${with_target_subdir}"; then
AM_ENABLE_MULTILIB(, ..)
fi
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
target_alias=${target_alias-$host_alias}
AC_USE_SYSTEM_EXTENSIONS
diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
index 9d56a83..6d5ae72 100644
--- a/libcc1/Makefile.in
+++ b/libcc1/Makefile.in
@@ -92,17 +92,17 @@ target_triplet = @target@
@DARWIN_DYNAMIC_LOOKUP_TRUE@am__append_1 = -Wl,-undefined,dynamic_lookup
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
- $(top_srcdir)/../config/cet.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
+ $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
+ $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
+ $(top_srcdir)/../config/acx.m4 $(top_srcdir)/../config/cet.m4 \
+ $(top_srcdir)/../config/clang-plugin.m4 \
$(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/enable.m4 \
$(top_srcdir)/../config/gcc-plugin.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/override.m4 \
- $(top_srcdir)/../config/warnings.m4 \
- $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
- $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
- $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/../config/warnings.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
@@ -284,6 +284,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
+LLVM_CONFIG = @LLVM_CONFIG@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
diff --git a/libcc1/aclocal.m4 b/libcc1/aclocal.m4
index 2348721..b565498 100644
--- a/libcc1/aclocal.m4
+++ b/libcc1/aclocal.m4
@@ -1167,16 +1167,17 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
+m4_include([../libtool.m4])
+m4_include([../ltoptions.m4])
+m4_include([../ltsugar.m4])
+m4_include([../ltversion.m4])
+m4_include([../lt~obsolete.m4])
m4_include([../config/acx.m4])
m4_include([../config/cet.m4])
+m4_include([../config/clang-plugin.m4])
m4_include([../config/depstand.m4])
m4_include([../config/enable.m4])
m4_include([../config/gcc-plugin.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/override.m4])
m4_include([../config/warnings.m4])
-m4_include([../libtool.m4])
-m4_include([../ltoptions.m4])
-m4_include([../ltsugar.m4])
-m4_include([../ltversion.m4])
-m4_include([../lt~obsolete.m4])
diff --git a/libcc1/configure b/libcc1/configure
index ea689a3..685f2ab 100755
--- a/libcc1/configure
+++ b/libcc1/configure
@@ -660,6 +660,7 @@ NMEDIT
DSYMUTIL
RANLIB
AR
+LLVM_CONFIG
OBJDUMP
LN_S
NM
@@ -5861,8 +5862,266 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
-plugin_option=
+
+# Try CLANG_PLUGIN_FILE first since GCC_PLUGIN_OPTION may return the
+# wrong plugin_option with clang.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang" >&5
+$as_echo_n "checking for clang... " >&6; }
+if ${clang_cv_is_clang+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __clang__
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ clang_cv_is_clang=yes
+else
+ clang_cv_is_clang=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5
+$as_echo "$clang_cv_is_clang" >&6; }
+ plugin_file=
+ if test $clang_cv_is_clang = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5
+$as_echo_n "checking for clang plugin file... " >&6; }
+ plugin_names="LLVMgold.so"
+ for plugin in $plugin_names; do
+ plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin`
+ if test x$plugin_file = x$plugin; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LLVM_CONFIG"; then
+ ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LLVM_CONFIG="${ac_tool_prefix}llvm-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
+if test -n "$LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
+$as_echo "$LLVM_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LLVM_CONFIG"; then
+ ac_ct_LLVM_CONFIG=$LLVM_CONFIG
+ # Extract the first word of "llvm-config", so it can be a program name with args.
+set dummy llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LLVM_CONFIG"; then
+ ac_cv_prog_ac_ct_LLVM_CONFIG="$ac_ct_LLVM_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_LLVM_CONFIG="llvm-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LLVM_CONFIG=$ac_cv_prog_ac_ct_LLVM_CONFIG
+if test -n "$ac_ct_LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LLVM_CONFIG" >&5
+$as_echo "$ac_ct_LLVM_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LLVM_CONFIG" = x; then
+ LLVM_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LLVM_CONFIG=$ac_ct_LLVM_CONFIG
+ fi
+else
+ LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG"
+fi
+
+ if test "$?" != 0; then
+ as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5
+ fi
+ clang_lib_dir=`$LLVM_CONFIG --libdir`
+ if test -f $clang_lib_dir/$plugin; then
+ plugin_file=$clang_lib_dir/$plugin
+ fi
+ if test x$plugin_file != x$plugin; then
+ break;
+ fi
+ fi
+ done
+ if test -z $plugin_file; then
+ as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5
+ fi
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+ if test "${AR}" = "" ; then
+ as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5
+ fi
+ plugin_option="--plugin $plugin_file"
+ touch conftest.c
+ ${AR} $plugin_option rc conftest.a conftest.c
+ if test "$?" != 0; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
+$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
+ plugin_file=
+ fi
+ rm -f conftest.*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5
+$as_echo "$plugin_file" >&6; }
+ fi
+ plugin_file="$plugin_file"
+
+if test -n "$plugin_file"; then
+ plugin_option="--plugin $plugin_file"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5
+$as_echo_n "checking for -plugin option... " >&6; }
+
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+plugin_option=
for plugin in $plugin_names; do
plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
if test x$plugin_so = x$plugin; then
@@ -5873,7 +6132,119 @@ for plugin in $plugin_names; do
break
fi
done
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test "${AR}" = "" ; then
+ as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5
+fi
+touch conftest.c
+${AR} $plugin_option rc conftest.a conftest.c
+if test "$?" != 0; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
+$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
+ plugin_option=
+fi
+rm -f conftest.*
+if test -n "$plugin_option"; then
+ plugin_option="$plugin_option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5
+$as_echo "$plugin_option" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -5968,17 +6339,15 @@ fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
- if $AR --help 2>&1 | grep -q "\--plugin"; then
- touch conftest.c
- $AR $plugin_option rc conftest.a conftest.c
- if test "$?" != 0; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
-$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
- else
+ case "$AR" in
+ *"$plugin_option"*)
+ ;;
+ *)
+ if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
- rm -f conftest.*
- fi
+ ;;
+ esac
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@@ -6185,9 +6554,15 @@ fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
- if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
- RANLIB="$RANLIB $plugin_option"
- fi
+ case "$RANLIB" in
+ *"$plugin_option"*)
+ ;;
+ *)
+ if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+ RANLIB="$RANLIB $plugin_option"
+ fi
+ ;;
+ esac
fi
@@ -10890,7 +11265,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10893 "configure"
+#line 11268 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10996,7 +11371,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10999 "configure"
+#line 11374 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/libiberty/aclocal.m4 b/libiberty/aclocal.m4
index 364fb6b..5151f5f 100644
--- a/libiberty/aclocal.m4
+++ b/libiberty/aclocal.m4
@@ -14,6 +14,7 @@
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_include([../config/acx.m4])
m4_include([../config/cet.m4])
+m4_include([../config/clang-plugin.m4])
m4_include([../config/enable.m4])
m4_include([../config/gcc-plugin.m4])
m4_include([../config/hwcaps.m4])
diff --git a/libiberty/configure b/libiberty/configure
index 02fbaab..8996b6e 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -640,6 +640,9 @@ INSTALL_PROGRAM
OUTPUT_OPTION
NO_MINUS_C_MINUS_O
ac_libiberty_warn_cflags
+RANLIB_PLUGIN_OPTION
+AR_PLUGIN_OPTION
+LLVM_CONFIG
EGREP
GREP
CPP
@@ -650,8 +653,6 @@ CPPFLAGS
LDFLAGS
CFLAGS
CC
-RANLIB_PLUGIN_OPTION
-AR_PLUGIN_OPTION
RANLIB
AR
host_os
@@ -2947,144 +2948,6 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5
-$as_echo_n "checking for -plugin option... " >&6; }
-
-plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
-plugin_option=
-for plugin in $plugin_names; do
- plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
- if test x$plugin_so = x$plugin; then
- plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
- fi
- if test x$plugin_so != x$plugin; then
- plugin_option="--plugin $plugin_so"
- break
- fi
-done
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AR"; then
- ac_ct_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AR="ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_AR" = x; then
- AR=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- AR=$ac_ct_AR
- fi
-else
- AR="$ac_cv_prog_AR"
-fi
-
-if test "${AR}" = "" ; then
- as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5
-fi
-touch conftest.c
-${AR} $plugin_option rc conftest.a conftest.c
-if test "$?" != 0; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
-$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
- plugin_option=
-fi
-rm -f conftest.*
-if test -n "$plugin_option"; then
- PLUGIN_OPTION="$plugin_option"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5
-$as_echo "$plugin_option" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-if test -n "$PLUGIN_OPTION"; then
- if $AR --help 2>&1 | grep -q "\--plugin"; then
- AR_PLUGIN_OPTION="$PLUGIN_OPTION"
-
- fi
- if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
- RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION"
-
- fi
-fi
-
# Add --enable-multilib to configure.
# Default to --enable-multilib
# Check whether --enable-multilib was given.
@@ -4616,6 +4479,411 @@ fi
ac_c_preproc_warn_flag=yes
+# Try CLANG_PLUGIN_FILE first since GCC_PLUGIN_OPTION may return the
+# wrong PLUGIN_OPTION with clang.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang" >&5
+$as_echo_n "checking for clang... " >&6; }
+if ${clang_cv_is_clang+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __clang__
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ clang_cv_is_clang=yes
+else
+ clang_cv_is_clang=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5
+$as_echo "$clang_cv_is_clang" >&6; }
+ plugin_file=
+ if test $clang_cv_is_clang = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5
+$as_echo_n "checking for clang plugin file... " >&6; }
+ plugin_names="LLVMgold.so"
+ for plugin in $plugin_names; do
+ plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin`
+ if test x$plugin_file = x$plugin; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LLVM_CONFIG"; then
+ ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LLVM_CONFIG="${ac_tool_prefix}llvm-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
+if test -n "$LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
+$as_echo "$LLVM_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LLVM_CONFIG"; then
+ ac_ct_LLVM_CONFIG=$LLVM_CONFIG
+ # Extract the first word of "llvm-config", so it can be a program name with args.
+set dummy llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LLVM_CONFIG"; then
+ ac_cv_prog_ac_ct_LLVM_CONFIG="$ac_ct_LLVM_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_LLVM_CONFIG="llvm-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LLVM_CONFIG=$ac_cv_prog_ac_ct_LLVM_CONFIG
+if test -n "$ac_ct_LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LLVM_CONFIG" >&5
+$as_echo "$ac_ct_LLVM_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LLVM_CONFIG" = x; then
+ LLVM_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LLVM_CONFIG=$ac_ct_LLVM_CONFIG
+ fi
+else
+ LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG"
+fi
+
+ if test "$?" != 0; then
+ as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5
+ fi
+ clang_lib_dir=`$LLVM_CONFIG --libdir`
+ if test -f $clang_lib_dir/$plugin; then
+ plugin_file=$clang_lib_dir/$plugin
+ fi
+ if test x$plugin_file != x$plugin; then
+ break;
+ fi
+ fi
+ done
+ if test -z $plugin_file; then
+ as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5
+ fi
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+ if test "${AR}" = "" ; then
+ as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5
+ fi
+ plugin_option="--plugin $plugin_file"
+ touch conftest.c
+ ${AR} $plugin_option rc conftest.a conftest.c
+ if test "$?" != 0; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
+$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
+ plugin_file=
+ fi
+ rm -f conftest.*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5
+$as_echo "$plugin_file" >&6; }
+ fi
+ PLUGIN_FILE="$plugin_file"
+
+if test -n "$PLUGIN_FILE"; then
+ PLUGIN_OPTION="--plugin $PLUGIN_FILE"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5
+$as_echo_n "checking for -plugin option... " >&6; }
+
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+plugin_option=
+for plugin in $plugin_names; do
+ plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+ if test x$plugin_so = x$plugin; then
+ plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+ fi
+ if test x$plugin_so != x$plugin; then
+ plugin_option="--plugin $plugin_so"
+ break
+ fi
+done
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test "${AR}" = "" ; then
+ as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5
+fi
+touch conftest.c
+${AR} $plugin_option rc conftest.a conftest.c
+if test "$?" != 0; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
+$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
+ plugin_option=
+fi
+rm -f conftest.*
+if test -n "$plugin_option"; then
+ PLUGIN_OPTION="$plugin_option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5
+$as_echo "$plugin_option" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+fi
+if test -n "$PLUGIN_OPTION"; then
+ case "$AR" in
+ *"$PLUGIN_OPTION"*)
+ ;;
+ *)
+ if $AR --help 2>&1 | grep -q "\--plugin"; then
+ AR_PLUGIN_OPTION="$PLUGIN_OPTION"
+
+ fi
+ ;;
+ esac
+ case "$RANLIB" in
+ *"$PLUGIN_OPTION"*)
+ ;;
+ *)
+ if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+ RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION"
+
+ fi
+ ;;
+ esac
+fi
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
index 3de5eca..199fa19 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
@@ -114,18 +114,6 @@ dnl to call AC_CHECK_PROG.
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
-GCC_PLUGIN_OPTION(PLUGIN_OPTION)
-if test -n "$PLUGIN_OPTION"; then
- if $AR --help 2>&1 | grep -q "\--plugin"; then
- AR_PLUGIN_OPTION="$PLUGIN_OPTION"
- AC_SUBST(AR_PLUGIN_OPTION)
- fi
- if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
- RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION"
- AC_SUBST(RANLIB_PLUGIN_OPTION)
- fi
-fi
-
dnl When switching to automake, replace the following with AM_ENABLE_MULTILIB.
# Add --enable-multilib to configure.
# Default to --enable-multilib
@@ -176,6 +164,37 @@ AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_PROG_CPP_WERROR
+# Try CLANG_PLUGIN_FILE first since GCC_PLUGIN_OPTION may return the
+# wrong PLUGIN_OPTION with clang.
+CLANG_PLUGIN_FILE(PLUGIN_FILE)
+if test -n "$PLUGIN_FILE"; then
+ PLUGIN_OPTION="--plugin $PLUGIN_FILE"
+else
+ GCC_PLUGIN_OPTION(PLUGIN_OPTION)
+fi
+if test -n "$PLUGIN_OPTION"; then
+ case "$AR" in
+ *"$PLUGIN_OPTION"*)
+ ;;
+ *)
+ if $AR --help 2>&1 | grep -q "\--plugin"; then
+ AR_PLUGIN_OPTION="$PLUGIN_OPTION"
+ AC_SUBST(AR_PLUGIN_OPTION)
+ fi
+ ;;
+ esac
+ case "$RANLIB" in
+ *"$PLUGIN_OPTION"*)
+ ;;
+ *)
+ if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+ RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION"
+ AC_SUBST(RANLIB_PLUGIN_OPTION)
+ fi
+ ;;
+ esac
+fi
+
ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wc++-compat \
-Wstrict-prototypes \
-Wshadow=local], [ac_libiberty_warn_cflags])
diff --git a/libstdc++-v3/doc/html/manual/index.html b/libstdc++-v3/doc/html/manual/index.html
index 816a87a..fb61205 100644
--- a/libstdc++-v3/doc/html/manual/index.html
+++ b/libstdc++-v3/doc/html/manual/index.html
@@ -145,7 +145,7 @@ Support for C++11 dialect.
</a></dt><dt>21.10. <a href="policy_data_structures_design.html#id-1.3.5.8.4.3.3.3.23">Non-unique Mapping Containers</a></dt><dt>21.11. <a href="policy_data_structures_design.html#id-1.3.5.8.4.3.4.3.5">Point Iterator Hierarchy</a></dt><dt>21.12. <a href="policy_data_structures_design.html#id-1.3.5.8.4.3.4.4.5">Invalidation Guarantee Tags Hierarchy</a></dt><dt>21.13. <a href="policy_data_structures_design.html#id-1.3.5.8.4.3.5.7.4">Container Tag Hierarchy</a></dt><dt>21.14. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.2.2.3">Hash functions, ranged-hash functions, and
range-hashing functions</a></dt><dt>21.15. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.2.5.3.4">Insert hash sequence diagram</a></dt><dt>21.16. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.2.5.3.6">Insert hash sequence diagram with a null policy</a></dt><dt>21.17. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.2.5.5.5">Hash policy class diagram</a></dt><dt>21.18. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.3.4.7">Balls and bins</a></dt><dt>21.19. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.3.5.3.6">Insert resize sequence diagram</a></dt><dt>21.20. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.3.5.3.9">Standard resize policy trigger sequence
diagram</a></dt><dt>21.21. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.3.5.3.10">Standard resize policy size sequence
- diagram</a></dt><dt>21.22. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.3.3.2.5">Tree node invariants</a></dt><dt>21.23. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.3.3.2.8">Tree node invalidation</a></dt><dt>21.24. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.3.3.2.11.3">A tree and its update policy</a></dt><dt>21.25. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.3.3.2.11.8">Restoring node invariants</a></dt><dt>21.26. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.3.3.2.11.10">Insert update sequence</a></dt><dt>21.27. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.3.3.2.11.20">Useless update path</a></dt><dt>21.28. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.4.3.2.10">A PATRICIA trie</a></dt><dt>21.29. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.4.3.3.5">A trie and its update policy</a></dt><dt>21.30. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.5.3.3.3">A simple list</a></dt><dt>21.31. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.5.3.3.6">The counter algorithm</a></dt><dt>21.32. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.6.3.3.3">Underlying Priority-Queue Data-Structures.</a></dt><dt>21.33. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.6.3.4.4">Priority-Queue Data-Structure Tags.</a></dt><dt>B.1. <a href="appendix_porting.html#fig.build_hacking.deps">Configure and Build File Dependencies</a></dt></dl></div><div class="list-of-tables"><p><strong>List of Tables</strong></p><dl><dt>1.1. <a href="status.html#table.cxx98_status">C++ 1998/2003 Implementation Status</a></dt><dt>1.2. <a href="status.html#table.cxx11_status">C++ 2011 Implementation Status</a></dt><dt>1.3. <a href="status.html#table.cxx14_status">C++ 2014 Implementation Status</a></dt><dt>1.4. <a href="status.html#table.ts_status">C++ Technical Specifications Implementation Status</a></dt><dt>1.5. <a href="status.html#table.cxx17_features">C++ 2017 Library Features</a></dt><dt>1.6. <a href="status.html#table.cxx17_status">C++ 2017 Implementation Status</a></dt><dt>1.7. <a href="status.html#table.cxx17_ts_status">C++ Technical Specifications Implementation Status</a></dt><dt>1.8. <a href="status.html#table.par2ts_simd_support">Support for Extended ABI Tags</a></dt><dt>1.9. <a href="status.html#table.cxx20_features">C++ 2020 Library Features</a></dt><dt>1.10. <a href="status.html#table.cxx23_features">C++ 2023 Library Features</a></dt><dt>1.11. <a href="status.html#table.tr1_status">C++ TR1 Implementation Status</a></dt><dt>1.12. <a href="status.html#table.decfp_status">C++ TR 24733 Implementation Status</a></dt><dt>1.13. <a href="status.html#table.specfun_status">C++ Special Functions Implementation Status</a></dt><dt>3.1. <a href="using.html#table.cmd_options">C++ Command Options</a></dt><dt>3.2. <a href="using_headers.html#table.cxx98_headers">C++ 1998 Library Headers</a></dt><dt>3.3. <a href="using_headers.html#table.cxx98_cheaders">C++ 1998 Library Headers for C Library Facilities</a></dt><dt>3.4. <a href="using_headers.html#table.cxx98_deprheaders">C++ 1998 Deprecated Library Header</a></dt><dt>3.5. <a href="using_headers.html#table.cxx11_headers">C++ 2011 Library Headers</a></dt><dt>3.6. <a href="using_headers.html#table.cxx11_cheaders">C++ 2011 Library Headers for C Library Facilities</a></dt><dt>3.7. <a href="using_headers.html#table.cxx14_headers">C++ 2014 Library Header</a></dt><dt>3.8. <a href="using_headers.html#table.cxx17_headers">C++ 2017 Library Headers</a></dt><dt>3.9. <a href="using_headers.html#table.cxx20_headers">C++ 2020 Library Headers</a></dt><dt>3.10. <a href="using_headers.html#table.cxx20_deprheaders">C++ 2020 Obsolete Headers</a></dt><dt>3.11. <a href="using_headers.html#table.cxx23_headers">C++ 2023 Library Headers</a></dt><dt>3.12. <a href="using_headers.html#table.cxx26_headers">C++ 2026 Library Headers</a></dt><dt>3.13. <a href="using_headers.html#table.filesystemts_headers">File System TS Header</a></dt><dt>3.14. <a href="using_headers.html#table.libfundts_headers">Library Fundamentals TS Headers</a></dt><dt>3.15. <a href="using_headers.html#table.networkingts_headers">Networking TS Headers</a></dt><dt>3.16. <a href="using_headers.html#table.tr1_headers">C++ TR 1 Library Headers</a></dt><dt>3.17. <a href="using_headers.html#table.tr1_cheaders">C++ TR 1 Library Headers for C Library Facilities</a></dt><dt>3.18. <a href="using_headers.html#table.decfp_headers">C++ TR 24733 Decimal Floating-Point Header</a></dt><dt>3.19. <a href="using_headers.html#table.abi_headers">C++ ABI Headers</a></dt><dt>3.20. <a href="using_headers.html#table.ext_headers">Extension Headers</a></dt><dt>3.21. <a href="using_headers.html#table.debug_headers">Extension Debug Headers</a></dt><dt>3.22. <a href="using_headers.html#table.parallel_headers">Extension Parallel Headers</a></dt><dt>17.1. <a href="debug_mode_using.html#table.debug_mode_containers">Debugging Containers</a></dt><dt>17.2. <a href="debug_mode_using.html#table.debug_mode_containers_cxx11">Debugging Containers C++11</a></dt><dt>18.1. <a href="parallel_mode_using.html#table.parallel_algos">Parallel Algorithms</a></dt><dt>20.1. <a href="bitmap_allocator_impl.html#table.bitmap_alloc">Bitmap Allocator Memory Map</a></dt><dt>B.1. <a href="documentation_hacking.html#table.doxygen_prereq">Doxygen Prerequisites</a></dt><dt>B.2. <a href="documentation_hacking.html#table.doxygen_cmp">HTML to Doxygen Markup Comparison</a></dt><dt>B.3. <a href="documentation_hacking.html#table.docbook_prereq">Docbook Prerequisites</a></dt><dt>B.4. <a href="documentation_hacking.html#table.docbook_cmp">HTML to Docbook XML Markup Comparison</a></dt><dt>B.5. <a href="documentation_hacking.html#table.docbook_elem">Docbook XML Element Use</a></dt><dt>B.6. <a href="api.html#table.extension_allocators">Extension Allocators</a></dt><dt>B.7. <a href="api.html#table.extension_allocators2">Extension Allocators Continued</a></dt></dl></div><div class="list-of-equations"><p><strong>List of Equations</strong></p><dl><dt>21.1. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.2.2.15">Ranged Hash Function</a></dt><dt>21.2. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.2.3.3">Range-Hashing, Division Method</a></dt><dt>21.3. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.2.3.9">Division via Prime Modulo</a></dt><dt>21.4. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.2.3.11">Division via Bit Mask</a></dt><dt>21.5. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.2.4.7">
+ diagram</a></dt><dt>21.22. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.3.3.2.5">Tree node invariants</a></dt><dt>21.23. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.3.3.2.8">Tree node invalidation</a></dt><dt>21.24. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.3.3.2.11.3">A tree and its update policy</a></dt><dt>21.25. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.3.3.2.11.8">Restoring node invariants</a></dt><dt>21.26. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.3.3.2.11.10">Insert update sequence</a></dt><dt>21.27. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.3.3.2.11.20">Useless update path</a></dt><dt>21.28. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.4.3.2.10">A PATRICIA trie</a></dt><dt>21.29. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.4.3.3.5">A trie and its update policy</a></dt><dt>21.30. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.5.3.3.3">A simple list</a></dt><dt>21.31. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.5.3.3.6">The counter algorithm</a></dt><dt>21.32. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.6.3.3.3">Underlying Priority-Queue Data-Structures.</a></dt><dt>21.33. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.6.3.4.4">Priority-Queue Data-Structure Tags.</a></dt><dt>B.1. <a href="appendix_porting.html#fig.build_hacking.deps">Configure and Build File Dependencies</a></dt></dl></div><div class="list-of-tables"><p><strong>List of Tables</strong></p><dl><dt>1.1. <a href="status.html#table.cxx98_status">C++ 1998/2003 Implementation Status</a></dt><dt>1.2. <a href="status.html#table.cxx11_status">C++ 2011 Implementation Status</a></dt><dt>1.3. <a href="status.html#table.cxx14_status">C++ 2014 Implementation Status</a></dt><dt>1.4. <a href="status.html#table.ts_status">C++ Technical Specifications Implementation Status</a></dt><dt>1.5. <a href="status.html#table.cxx17_features">C++ 2017 Library Features</a></dt><dt>1.6. <a href="status.html#table.cxx17_status">C++ 2017 Implementation Status</a></dt><dt>1.7. <a href="status.html#table.cxx17_ts_status">C++ Technical Specifications Implementation Status</a></dt><dt>1.8. <a href="status.html#table.par2ts_simd_support">Support for Extended ABI Tags</a></dt><dt>1.9. <a href="status.html#table.cxx20_features">C++ 2020 Library Features</a></dt><dt>1.10. <a href="status.html#table.cxx20_status">C++ 2020 Implementation Status</a></dt><dt>1.11. <a href="status.html#table.cxx23_features">C++ 2023 Library Features</a></dt><dt>1.12. <a href="status.html#table.tr1_status">C++ TR1 Implementation Status</a></dt><dt>1.13. <a href="status.html#table.decfp_status">C++ TR 24733 Implementation Status</a></dt><dt>1.14. <a href="status.html#table.specfun_status">C++ Special Functions Implementation Status</a></dt><dt>3.1. <a href="using.html#table.cmd_options">C++ Command Options</a></dt><dt>3.2. <a href="using_headers.html#table.cxx98_headers">C++ 1998 Library Headers</a></dt><dt>3.3. <a href="using_headers.html#table.cxx98_cheaders">C++ 1998 Library Headers for C Library Facilities</a></dt><dt>3.4. <a href="using_headers.html#table.cxx98_deprheaders">C++ 1998 Deprecated Library Header</a></dt><dt>3.5. <a href="using_headers.html#table.cxx11_headers">C++ 2011 Library Headers</a></dt><dt>3.6. <a href="using_headers.html#table.cxx11_cheaders">C++ 2011 Library Headers for C Library Facilities</a></dt><dt>3.7. <a href="using_headers.html#table.cxx14_headers">C++ 2014 Library Header</a></dt><dt>3.8. <a href="using_headers.html#table.cxx17_headers">C++ 2017 Library Headers</a></dt><dt>3.9. <a href="using_headers.html#table.cxx20_headers">C++ 2020 Library Headers</a></dt><dt>3.10. <a href="using_headers.html#table.cxx20_deprheaders">C++ 2020 Obsolete Headers</a></dt><dt>3.11. <a href="using_headers.html#table.cxx23_headers">C++ 2023 Library Headers</a></dt><dt>3.12. <a href="using_headers.html#table.cxx26_headers">C++ 2026 Library Headers</a></dt><dt>3.13. <a href="using_headers.html#table.filesystemts_headers">File System TS Header</a></dt><dt>3.14. <a href="using_headers.html#table.libfundts_headers">Library Fundamentals TS Headers</a></dt><dt>3.15. <a href="using_headers.html#table.networkingts_headers">Networking TS Headers</a></dt><dt>3.16. <a href="using_headers.html#table.tr1_headers">C++ TR 1 Library Headers</a></dt><dt>3.17. <a href="using_headers.html#table.tr1_cheaders">C++ TR 1 Library Headers for C Library Facilities</a></dt><dt>3.18. <a href="using_headers.html#table.decfp_headers">C++ TR 24733 Decimal Floating-Point Header</a></dt><dt>3.19. <a href="using_headers.html#table.abi_headers">C++ ABI Headers</a></dt><dt>3.20. <a href="using_headers.html#table.ext_headers">Extension Headers</a></dt><dt>3.21. <a href="using_headers.html#table.debug_headers">Extension Debug Headers</a></dt><dt>3.22. <a href="using_headers.html#table.parallel_headers">Extension Parallel Headers</a></dt><dt>17.1. <a href="debug_mode_using.html#table.debug_mode_containers">Debugging Containers</a></dt><dt>17.2. <a href="debug_mode_using.html#table.debug_mode_containers_cxx11">Debugging Containers C++11</a></dt><dt>18.1. <a href="parallel_mode_using.html#table.parallel_algos">Parallel Algorithms</a></dt><dt>20.1. <a href="bitmap_allocator_impl.html#table.bitmap_alloc">Bitmap Allocator Memory Map</a></dt><dt>B.1. <a href="documentation_hacking.html#table.doxygen_prereq">Doxygen Prerequisites</a></dt><dt>B.2. <a href="documentation_hacking.html#table.doxygen_cmp">HTML to Doxygen Markup Comparison</a></dt><dt>B.3. <a href="documentation_hacking.html#table.docbook_prereq">Docbook Prerequisites</a></dt><dt>B.4. <a href="documentation_hacking.html#table.docbook_cmp">HTML to Docbook XML Markup Comparison</a></dt><dt>B.5. <a href="documentation_hacking.html#table.docbook_elem">Docbook XML Element Use</a></dt><dt>B.6. <a href="api.html#table.extension_allocators">Extension Allocators</a></dt><dt>B.7. <a href="api.html#table.extension_allocators2">Extension Allocators Continued</a></dt></dl></div><div class="list-of-equations"><p><strong>List of Equations</strong></p><dl><dt>21.1. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.2.2.15">Ranged Hash Function</a></dt><dt>21.2. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.2.3.3">Range-Hashing, Division Method</a></dt><dt>21.3. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.2.3.9">Division via Prime Modulo</a></dt><dt>21.4. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.2.3.11">Division via Bit Mask</a></dt><dt>21.5. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.2.4.7">
A Standard String Hash Function
</a></dt><dt>21.6. <a href="policy_data_structures_design.html#id-1.3.5.8.4.4.2.3.2.4.12">
Only k String DNA Hash
diff --git a/libstdc++-v3/doc/html/manual/status.html b/libstdc++-v3/doc/html/manual/status.html
index 164faeb..465bc6c 100644
--- a/libstdc++-v3/doc/html/manual/status.html
+++ b/libstdc++-v3/doc/html/manual/status.html
@@ -1759,7 +1759,101 @@ Note 1: This feature is supported in older releases but the
Note 2: The C++20 calendar types are supported since 11.1,
time zones and UTC are supported since 13.1,
and <code class="function">chrono::parse</code> is supported since 14.1.
-</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="iso.2020.specific"></a>Implementation Specific Behavior</h4></div></div></div><p>For behaviour which is also specified by previous standards,
+</p><p>
+The following status table is based on the table of contents of
+ISO/IEC 14882:2020.
+Some subclauses are not shown in the table where the content is unchanged
+since C++17 and the implementation is complete.
+</p><div class="table"><a id="table.cxx20_status"></a><p class="title"><strong>Table 1.10. C++ 2020 Implementation Status</strong></p><div class="table-contents"><table class="table" summary="C++ 2020 Implementation Status" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left">
+ <span class="emphasis"><em>17</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Language support library</em></span>
+ </td></tr><tr><td align="left">17.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">17.2</td><td align="left">Common definitions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">17.2.1</td><td align="left">Header <code class="code">&lt;cstddef&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.2.2</td><td align="left">Header <code class="code">&lt;cstdlib&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.2.3</td><td align="left">Null pointers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.2.4</td><td align="left">Sizes, alignments, and offsets</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.2.5</td><td align="left"><code class="code">byte</code> type operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.3</td><td align="left">Implementation properties</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">17.3.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">17.3.2</td><td align="left">Header <code class="code">&lt;version&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.3.3</td><td align="left">Header <code class="code">&lt;limits&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.3.4</td><td align="left">Floating-point type properties</td><td align="left"> </td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">17.3.4.1</td><td align="left">Type <code class="code">float_round_style</code></td><td align="left">N</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">17.3.4.2</td><td align="left">Type <code class="code">float_denorm_style</code></td><td align="left">N</td><td align="left"> </td></tr><tr><td align="left">17.3.5</td><td align="left">Class template <code class="code">numeric_limits</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.3.6</td><td align="left">Header <code class="code">&lt;climits&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.3.7</td><td align="left">Header <code class="code">&lt;cfloat&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.4</td><td align="left">Integer types</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">17.4.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">17.4.2</td><td align="left">Header <code class="code">&lt;cstdint&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">17.5</td><td align="left">Startup and termination</td><td align="left">Partial</td><td align="left">C library dependency for quick_exit, at_quick_exit</td></tr><tr><td align="left">17.6</td><td align="left">Dynamic memory management</td><td align="left">Y</td><td class="auto-generated"> </td></tr><tr><td align="left">17.7</td><td align="left">Type identification</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.8</td><td align="left">Source location</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">17.8.1</td><td align="left">Header <code class="code">&lt;source_location&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.8.2</td><td align="left">Class <code class="code">source_location</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.9</td><td align="left">Exception handling</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.10</td><td align="left">Initializer lists</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.11</td><td align="left">Comparisons</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">17.11.1</td><td align="left">Header <code class="code">&lt;compare&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.11.2</td><td align="left">Comparison category types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.11.3</td><td align="left">Class template <code class="code">common_comparison_category</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.11.4</td><td align="left">Concept <code class="code">three_way_comparable</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.11.5</td><td align="left">Result of three-way comparison</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.11.6</td><td align="left">Comparison algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.12</td><td align="left">Coroutines</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">17.12.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">17.12.2</td><td align="left">Header <code class="code">&lt;coroutine&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.12.3</td><td align="left">Coroutine traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.12.4</td><td align="left">Class template <code class="code">coroutine_handle</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.12.5</td><td align="left">No-op coroutines</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">17.13</td><td align="left">Other runtime support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
+ <span class="emphasis"><em>18</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Concepts library</em></span>
+ </td></tr><tr><td align="left">18.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.2</td><td align="left">Equality preservation</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.3</td><td align="left">Header <code class="code">&lt;concepts&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.4</td><td align="left">Language-related concepts</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.4.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.4.2</td><td align="left">Concept <code class="code">same_as</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.4.3</td><td align="left">Concept <code class="code">derived_from</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.4.4</td><td align="left">Concept <code class="code">convertible_to</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.4.5</td><td align="left">Concept <code class="code">common_reference_with</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.4.6</td><td align="left">Concept <code class="code">common_with</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.4.7</td><td align="left">Arithmetic concepts</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.4.8</td><td align="left">Concept <code class="code">assignable_from</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.4.9</td><td align="left">Concept <code class="code">swappable</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.4.10</td><td align="left">Concept <code class="code">destructible</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.4.11</td><td align="left">Concept <code class="code">constructible_from</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.4.12</td><td align="left">Concept <code class="code">default_initializable</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.4.13</td><td align="left">Concept <code class="code">move_constructible</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.4.14</td><td align="left">Concept <code class="code">copy_constructible</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.5</td><td align="left">Comparison concepts</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.5.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.5.2</td><td align="left">Boolean testability</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.5.3</td><td align="left">Concept <code class="code">equality_comparable</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.5.4</td><td align="left">Concept <code class="code">totally_ordered</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.6</td><td align="left">Object concepts</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.7</td><td align="left">Callable concepts</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.7.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">18.7.2</td><td align="left">Concept <code class="code">invocable</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.7.3</td><td align="left">Concept <code class="code">regular_invocable</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.7.4</td><td align="left">Concept <code class="code">predicate</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.7.5</td><td align="left">Concept <code class="code">relation</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.7.6</td><td align="left">Concept <code class="code">equivalence_relation</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">18.7.7</td><td align="left">Concept <code class="code">strict_weak_order</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
+ <span class="emphasis"><em>19</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Diagnostics library</em></span>
+ </td></tr><tr><td align="left">19.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">19.2</td><td align="left">Exception classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">19.3</td><td align="left">Assertions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">19.4</td><td align="left">Error numbers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">19.5</td><td align="left">System error support</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">19.5.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">19.5.2</td><td align="left">Header <code class="code">&lt;system_error&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">19.5.3</td><td align="left">Class <code class="code">error_category</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">19.5.4</td><td align="left">Class <code class="code">error_code</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">19.5.5</td><td align="left">Class <code class="code">error_condition</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">19.5.6</td><td align="left">Comparison operator functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">19.5.7</td><td align="left">System error hash support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">19.5.8</td><td align="left">Class <code class="code">system_error</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
+ <span class="emphasis"><em>20</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>General utilities library</em></span>
+ </td></tr><tr><td align="left">20.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.2</td><td align="left">Utility components</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.2.1</td><td align="left">Header <code class="code">&lt;utility&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.2</td><td align="left"><code class="code">swap</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.3</td><td align="left"><code class="code">exchange</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.4</td><td align="left">Forward/move helpers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.5</td><td align="left">Function template <code class="code">as_const</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.6</td><td align="left">Function template <code class="code">declval</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.2.7</td><td align="left">Integer comparison functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.3</td><td align="left">Compile-time integer sequences</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.4</td><td align="left">Pairs</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.5</td><td align="left">Tuples</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.6</td><td align="left">Optional objects</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.7</td><td align="left">Variants</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.8</td><td align="left">Storage for any type</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.9</td><td align="left">Bitsets</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.10</td><td align="left">Memory</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11</td><td align="left">Smart pointers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.11.1</td><td align="left">Class template <code class="code">unique_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.2</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.3</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left">Y</td><td align="left">Uses code from boost::shared_ptr.</td></tr><tr><td align="left">20.11.4</td><td align="left">Class template <code class="code">weak_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.5</td><td align="left">Class template <code class="code">owner_less</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.6</td><td align="left">Class template <code class="code">enable_shared_from_this</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.11.7</td><td align="left">Smart pointer hash support</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.12</td><td align="left">Memory resources</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.12.1</td><td align="left">Header <code class="code">&lt;memory_resource&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.12.2</td><td align="left">Class <code class="code">memory_resource</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.12.3</td><td align="left">Class template <code class="code">polymorphic_allocator</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.12.4</td><td align="left">Access to program-wide <code class="code">memory_resource</code> objects</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.12.5</td><td align="left">Pool resource classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.12.6</td><td align="left">Class <code class="code">monotonic_buffer_resource</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.13</td><td align="left">Class template <code class="code">scoped_allocator_adaptor</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.14</td><td align="left">Function objects</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.14.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.14.2</td><td align="left">Header <code class="code">&lt;functional&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.14.3</td><td align="left">Definitions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.14.4</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.14.5</td><td align="left">Function template <code class="code">invoke</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.14.6</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.14.7</td><td align="left">Arithmetic operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.14.8</td><td align="left">Comparisons</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.14.9</td><td align="left">Concept-constrained comparisons</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.14.10</td><td align="left">Logical operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.14.11</td><td align="left">Bitwise operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.14.12</td><td align="left">Class <code class="code">identity</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.14.13</td><td align="left">Function template <code class="code">not_fn</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.14.14</td><td align="left">Function template <code class="code">bind_front</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.14.15</td><td align="left">Function object binders</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.14.16</td><td align="left">Function template <code class="code">mem_fn</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.14.17</td><td align="left">Polymorphic function wrappers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.14.17.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.14.17.2</td><td align="left">Class <code class="code">bad_function_call</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.14.17.3</td><td align="left">Class template <code class="code">function</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.14.18</td><td align="left">Searchers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.15</td><td align="left">Metaprogramming and type traits</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.15.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.15.2</td><td align="left">Requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.15.3</td><td align="left">Header <code class="code">&lt;type_traits&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.15.4</td><td align="left">Helper classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.15.5</td><td align="left">Unary type traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.15.6</td><td align="left">Type property queries</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.15.7</td><td align="left">Relationships between types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.15.8</td><td align="left">Transformations between types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.15.9</td><td align="left">Logical operator traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.15.10</td><td align="left">Member relationships</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.15.11</td><td align="left">Constant evaluation context</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.16</td><td align="left">Compile-time rational arithmetic</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.17</td><td align="left">Class <code class="code">type_index</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.18</td><td align="left">Execution policies</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.19</td><td align="left">Primitive numeric conversions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.19.1</td><td align="left">Header <code class="code">&lt;charconv&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.19.2</td><td align="left">Primitive numeric output conversion</td><td align="left">Y</td><td align="left">
+ Floating-point types up to 64-bit are formatted using
+ <a class="link" href="https://github.com/ulfjack/ryu" target="_top">Ryu</a>.
+ Types with greater precision are formatted using the C library
+ (<code class="function">sprintf</code> and conditionally
+ <code class="function">strfromf128</code>).
+ For powerpc64le-unknown-linux-gnu <code class="function">__sprintfieee128</code>
+ must be provided by Glibc.
+ </td></tr><tr><td align="left">20.19.3</td><td align="left">Primitive numeric input conversion</td><td align="left">Y</td><td align="left">
+ Floating-point types up to 64-bit are parsed using
+ <a class="link" href="https://github.com/fastfloat/fast_float" target="_top">fast_float</a>.
+ Types with greater precision are parsed using the C library
+ (<code class="function">strtold</code>).
+ For powerpc64le-unknown-linux-gnu <code class="function">__strtoieee128</code>
+ must be provided by Glibc.
+ </td></tr><tr><td align="left">20.20</td><td align="left">Formatting</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.20.1</td><td align="left">Header <code class="code">&lt;format&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.20.2</td><td align="left">Format string</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.20.2.1</td><td align="left"> In general</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.20.2.2</td><td align="left">Standard format specifiers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.20.3</td><td align="left">Error reporting</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.20.4</td><td align="left">Formatting functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.20.5</td><td align="left">Formatter</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.20.5.1</td><td align="left">Formatter requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.20.5.2</td><td align="left">Formatter specializations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.20.5.3</td><td align="left">Class template <code class="code">basic_format_parse_context</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.20.5.4</td><td align="left">Class template <code class="code">basic_format_context</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.20.6</td><td align="left">Arguments</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.20.6.1</td><td align="left">Class template <code class="code">basic_format_arg</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.20.6.2</td><td align="left">Class template <span class="emphasis"><em>format-arg-store</em></span></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.20.6.3</td><td align="left">Class template <code class="code">basic_format_args</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">20.20.7</td><td align="left">Class <code class="code">format_error</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
+ <span class="emphasis"><em>21</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Strings library</em></span>
+ </td></tr><tr><td align="left">21.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">21.2</td><td align="left">Character traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.3</td><td align="left">String classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">21.4</td><td align="left">String view classes</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">21.5</td><td align="left">Null-terminated sequence utilities</td><td align="left">Partial</td><td align="left">C library dependency.</td></tr><tr><td align="left">
+ <span class="emphasis"><em>22</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Containers library</em></span>
+ </td></tr><tr><td align="left">22.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">22.2</td><td align="left">Container requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.3</td><td align="left">Sequence containers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.4</td><td align="left">Associative containers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.5</td><td align="left">Unordered associative containers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.6</td><td align="left">Container adaptors</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.7</td><td align="left">Views</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">22.7.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">22.7.2</td><td align="left">Header <code class="code">&lt;span&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">22.7.3</td><td align="left">Class template <code class="code">span</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
+ <span class="emphasis"><em>23</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Iterators library</em></span>
+ </td></tr><tr><td align="left">23.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2</td><td align="left">Header <code class="code">&lt;iterator&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.3</td><td align="left">Iterator requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.3.1</td><td align="left">In general</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.3.2</td><td align="left">Associated types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.3.3</td><td align="left">Customization points</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.3.4</td><td align="left">Iterator concepts</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.3.5</td><td align="left">C++17 iterator requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.3.6</td><td align="left">Indirect callable requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.3.7</td><td align="left">Common algorithm requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.4</td><td align="left">Iterator primitives</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.2</td><td align="left">Standard iterator tags</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.4.3</td><td align="left">Iterator operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.4.4</td><td align="left">Range iterator operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5</td><td align="left">Iterator adaptors</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.5.1</td><td align="left">Reverse iterators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5.2</td><td align="left">Insert iterators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5.3</td><td align="left">Move iterators and sentinels</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5.4</td><td align="left">Common iterators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5.5</td><td align="left">Default sentinel</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5.6</td><td align="left">Counted iterators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5.7</td><td align="left"> Unreachable sentinel</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.6</td><td align="left"> Stream iterators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.6.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.6.2</td><td align="left"> Class template <code class="code">istream_iterator</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.6.3</td><td align="left">Class template <code class="code">ostream_iterator</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.6.4</td><td align="left">Class template <code class="code">istreambuf_iterator</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.6.5</td><td align="left">Class template <code class="code">ostreambuf_iterator</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.7</td><td align="left">Range access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
+ <span class="emphasis"><em>24</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Ranges library</em></span>
+ </td></tr><tr><td align="left">24.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">24.2</td><td align="left">Header <code class="code">&lt;ranges&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.3</td><td align="left">Range access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.4</td><td align="left">Range requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">24.4.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">24.4.2</td><td align="left">Ranges</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.4.3</td><td align="left">Sized ranges</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.4.4</td><td align="left">Views</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.4.5</td><td align="left">Other range refinements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.5</td><td align="left">Range utilities</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">24.5.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">24.5.2</td><td align="left">Helper concepts</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.5.3</td><td align="left">View interface</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.5.4</td><td align="left">Sub-ranges</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.5.5</td><td align="left">Dangling iterator handling</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.6</td><td align="left">Range factories</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">24.6.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">24.6.2</td><td align="left">Empty view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.6.3</td><td align="left">Single view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.6.4</td><td align="left">Iota view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.6.5</td><td align="left">Istream view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.7</td><td align="left">Range adaptors</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">24.7.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">24.7.2</td><td align="left">Range adaptor objects</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.7.3</td><td align="left">Semiregular wrapper</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.7.4</td><td align="left">All view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.7.5</td><td align="left">Filter view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.7.6</td><td align="left">Transform view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.7.7</td><td align="left">Take view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.7.8</td><td align="left">Take while view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.7.9</td><td align="left">Drop view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.7.10</td><td align="left">Drop while view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.7.11</td><td align="left">Join view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.7.12</td><td align="left">Split view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.7.13</td><td align="left">Counted view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.7.14</td><td align="left">Common view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.7.15</td><td align="left">Reverse view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">24.7.16</td><td align="left">Elements view</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
+ <span class="emphasis"><em>25</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Algorithms library</em></span>
+ </td></tr><tr><td align="left">25.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">25.2</td><td align="left">Algorithms requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.3</td><td align="left">Parallel algorithms</td><td align="left"> </td><td align="left">Using <a class="link" href="https://github.com/llvm/llvm-project/tree/main/pstl" target="_top">PSTL</a></td></tr><tr><td align="left">25.4</td><td align="left">Header <code class="code">&lt;algorithm&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.5</td><td align="left">Algorithm result types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.6</td><td align="left">Non-modifying sequence operations</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">25.6.1</td><td align="left">All of</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.6.2</td><td align="left">Any of</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.6.3</td><td align="left">None of</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.6.4</td><td align="left">For each</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.6.5</td><td align="left">Find</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.6.6</td><td align="left">Find end</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.6.7</td><td align="left">Find first</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.6.8</td><td align="left">Adjacent find</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.6.9</td><td align="left">Count</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.6.10</td><td align="left">Mismatch</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.6.11</td><td align="left">Equal</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.6.12</td><td align="left">Is permutation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.6.13</td><td align="left">Search</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.7</td><td align="left">Mutating sequence operations</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">25.7.1</td><td align="left">Copy</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.7.2</td><td align="left">Move</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.7.3</td><td align="left">Swap</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.7.4</td><td align="left">Transform</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.7.5</td><td align="left">Replace</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.7.6</td><td align="left">Fill</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.7.7</td><td align="left">Generate</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.7.8</td><td align="left">Remove</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.7.9</td><td align="left">Unique</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.7.10</td><td align="left">Reverse</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.7.11</td><td align="left">Rotate</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.7.12</td><td align="left">Sample</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.7.13</td><td align="left">Shuffle</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.7.14</td><td align="left">Shift</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.8</td><td align="left">Sorting and related operations</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">25.8.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.8.2</td><td align="left">Sorting</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.8.3</td><td align="left">Nth element</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.8.4</td><td align="left">Binary search</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.8.5</td><td align="left">Partitions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.8.6</td><td align="left">Merge</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.8.7</td><td align="left">Set operations on sorted structures</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.8.8</td><td align="left">Heap operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.8.9</td><td align="left">Minimum and maximum</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.8.10</td><td align="left">Bounded value</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.8.11</td><td align="left">Lexicographical comparison</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.8.12</td><td align="left">Three-way comparison algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.8.13</td><td align="left">Permutation generators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.9</td><td align="left">Header <code class="code">&lt;numeric&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.10</td><td align="left">Generalized numeric operations</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">25.10.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">25.10.2</td><td align="left">Definitions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">25.10.3</td><td align="left">Accumulate</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.10.4</td><td align="left">Reduce</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.10.5</td><td align="left">Inner product</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.10.6</td><td align="left">Transform reduce</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.10.7</td><td align="left">Partial sum</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.10.8</td><td align="left">Exclusive scan</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.10.9</td><td align="left">Inclusive scan</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.10.10</td><td align="left">Transform exclusive scan</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.10.11</td><td align="left">Transform inclusive scan</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.10.12</td><td align="left">Adjacent difference</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.10.13</td><td align="left">Iota</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.10.14</td><td align="left">Greatest common divisor</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.10.15</td><td align="left">Least common multiple</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.10.16</td><td align="left">Midpoint</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.11</td><td align="left">Specialized <code class="code">&lt;memory&gt;</code> algorithms</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">25.11.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">25.11.2</td><td align="left">Special memory concepts</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.11.3</td><td align="left"><code class="code">uninitialized_default_construct</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.11.4</td><td align="left"><code class="code">uninitialized_value_construct</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.11.5</td><td align="left"><code class="code">uninitialized_copy</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.11.6</td><td align="left"><code class="code">uninitialized_move</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.11.7</td><td align="left"><code class="code">uninitialized_fill</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.11.8</td><td align="left"><code class="code">construct_at</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.11.9</td><td align="left"><code class="code">destroy</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">25.12</td><td align="left">C library algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
+ <span class="emphasis"><em>26</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Numerics library</em></span>
+ </td></tr><tr><td align="left">26.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.2</td><td align="left">Numeric type requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.3</td><td align="left">The floating-point environment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.4</td><td align="left">Complex numbers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5</td><td align="left">Bit manipulation</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.5.2</td><td align="left">Header <code class="code">&lt;bit&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.3</td><td align="left">Function template <code class="code">bit_cast</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.4</td><td align="left">Integral powers of 2</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.5</td><td align="left">Rotating</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.6</td><td align="left">Counting</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.5.7</td><td align="left">Endian</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.6</td><td align="left">Random number generation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.7</td><td align="left">Numeric arrays</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.8</td><td align="left">Mathematical functions for floating-point types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.9</td><td align="left">Numbers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.9.1</td><td align="left">Header <code class="code">&lt;numbers&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">26.9.2</td><td align="left">Mathematical constants</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
+ <span class="emphasis"><em>27</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Time library</em></span>
+ </td></tr><tr><td align="left">27.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">27.2</td><td align="left">Header <code class="code">&lt;chrono&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.3</td><td align="left"><span class="emphasis"><em>Cpp17Clock</em></span> requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.4</td><td align="left">Time-related traits</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">27.4.1</td><td align="left"><code class="code">treat_as_floating_point</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.4.2</td><td align="left"><code class="code">duration_values</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.4.3</td><td align="left">Specializations of <code class="code">common_type</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.4.4</td><td align="left">Class template <code class="code">is_clock</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.5</td><td align="left">Class template <code class="code">duration</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">27.5.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.5.2</td><td align="left">Constructors</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.5.3</td><td align="left">Observer</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.5.4</td><td align="left">Arithmetic</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.5.5</td><td align="left">Special values</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.5.6</td><td align="left">Non-member arithmetic</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.5.7</td><td align="left">Comparisons</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.5.8</td><td align="left">Conversions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.5.9</td><td align="left">Suffixes for duration literals</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.5.10</td><td align="left">Algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.5.11</td><td align="left">I/O</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.6</td><td align="left">Class template <code class="code">time_point</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.7</td><td align="left">Clocks</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">27.7.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.7.2</td><td align="left">Class <code class="code">system_clock</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.7.3</td><td align="left">Class <code class="code">utc_clock</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.7.4</td><td align="left">Class <code class="code">tai_clock</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.7.5</td><td align="left">Class <code class="code">gps_clock</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.7.6</td><td align="left">Type <code class="code">file_clock</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.7.7</td><td align="left">Class <code class="code">steady_clock</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.7.8</td><td align="left">Class <code class="code">high_resolution_clock</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.7.9</td><td align="left">Local time</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.7.10</td><td align="left"><code class="code">time_point</code> conversions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.8</td><td align="left">The civil calendar</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">27.8.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">27.8.2</td><td align="left">Class <code class="code">last_spec</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.8.3</td><td align="left">Class <code class="code">day</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.8.4</td><td align="left">Class <code class="code">month</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.8.5</td><td align="left">Class <code class="code">year</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.8.6</td><td align="left">Class <code class="code">weekday</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.8.7</td><td align="left">Class <code class="code">weekday_indexed</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.8.8</td><td align="left">Class <code class="code">weekday_last</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.8.9</td><td align="left">Class <code class="code">month_day</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.8.10</td><td align="left">Class <code class="code">month_day_last</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.8.11</td><td align="left">Class <code class="code">month_weekday</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.8.12</td><td align="left">Class <code class="code">month_weekday_last</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.8.13</td><td align="left">Class <code class="code">year_month</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.8.14</td><td align="left">Class <code class="code">year_month_day</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.8.15</td><td align="left">Class <code class="code">year_month_day_last</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.8.16</td><td align="left">Class <code class="code">year_month_weekday</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.8.17</td><td align="left">Class <code class="code">year_month_weekday_last</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.9</td><td align="left">Class template <code class="code">hh_mm_ss</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.10</td><td align="left">12/24 hours functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.11</td><td align="left">Time zones</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">27.11.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">27.11.2</td><td align="left">Time zone database</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.11.3</td><td align="left">Exception classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.11.4</td><td align="left">Information classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.11.5</td><td align="left">Class <code class="code">time_zone</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.11.6</td><td align="left">Class template <code class="code">zoned_traits</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.11.7</td><td align="left">Class template <code class="code">zoned_time</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.11.8</td><td align="left">Class <code class="code">leap_second</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.11.9</td><td align="left">Class <code class="code">time_zone_link</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.12</td><td align="left">Formatting</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.13</td><td align="left">Parsing</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">27.14</td><td align="left">Header <code class="code">&lt;ctime&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
+ <span class="emphasis"><em>28</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Localization library</em></span>
+ </td></tr><tr><td align="left">28.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">28.2</td><td align="left">Header <code class="code">&lt;locale&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">28.3</td><td align="left">Locales</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">28.3.1</td><td align="left">Class <code class="code">locale</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">28.3.2</td><td align="left"><code class="code">locale</code> globals</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">28.3.3</td><td align="left">Convenience interfaces</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">28.3.3.1</td><td align="left">Character classification</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">28.3.3.2</td><td align="left">Character conversions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">28.4</td><td align="left">Standard <code class="code">locale</code> categories</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">28.4.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">28.4.2</td><td align="left">The <code class="code">ctype</code> category</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">28.4.3</td><td align="left">The numeric category</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">28.4.4</td><td align="left">The numeric punctuation facet</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">28.4.5</td><td align="left">The collate category</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">28.4.6</td><td align="left">The time category</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">28.4.7</td><td align="left">The monetary category</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">28.4.8</td><td align="left">The message retrieval category</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">28.5</td><td align="left">C library locales</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
+ <span class="emphasis"><em>29</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Input/output library</em></span>
+ </td></tr><tr><td align="left">29.1</td><td align="left"> General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.2</td><td align="left">Iostreams requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">29.2.1</td><td align="left">Imbue limitations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.2.2</td><td align="left">Positioning type limitations</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">29.2.3</td><td align="left">Thread safety</td><td align="left">Partial</td><td align="left"> </td></tr><tr><td align="left">29.3</td><td align="left">Forward declarations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.4</td><td align="left">Standard iostream objects</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.5</td><td align="left">Iostreams base classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.6</td><td align="left">Stream buffers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.7</td><td align="left">Formatting and manipulators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.8</td><td align="left">String-based streams</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.9</td><td align="left">File-based streams</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.10</td><td align="left">Synchronized output streams</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">29.10.1</td><td align="left">Header <code class="code">&lt;syncstream&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.10.2</td><td align="left">Class template <code class="code">basic_syncbuf</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.10.3</td><td align="left">Class template <code class="code">basic_osyncstream</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11</td><td align="left">File systems</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">29.11.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">29.11.2</td><td align="left">Conformance</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11.3</td><td align="left">Requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11.4</td><td align="left">Header <code class="code">&lt;filesystem&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11.5</td><td align="left">Error reporting</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11.6</td><td align="left">Class <code class="code">path</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11.7</td><td align="left">Class <code class="code">filesystem_error</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11.8</td><td align="left">Enumerations</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">29.11.8.1</td><td align="left">Enum <code class="code">path::format</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11.8.2</td><td align="left">Enum class <code class="code">file_type</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11.8.3</td><td align="left">Enum class <code class="code">copy_options</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11.8.4</td><td align="left">Enum class <code class="code">perms</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11.8.5</td><td align="left">Enum class <code class="code">perm_options</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11.8.6</td><td align="left">Enum class <code class="code">directory_options</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11.9</td><td align="left">Class <code class="code">file_status</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11.10</td><td align="left">Class <code class="code">directory_entry</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11.11</td><td align="left">Class <code class="code">directory_iterator</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11.12</td><td align="left">Class <code class="code">recursive_directory_iterator</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.11.13</td><td align="left">Filesystem operation functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.12</td><td align="left">C library files</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">29.12.1</td><td align="left">Header <code class="code">&lt;cstdio&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">29.12.2</td><td align="left">Header <code class="code">&lt;cinttypes&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
+ <span class="emphasis"><em>30</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Regular expressions library</em></span>
+ </td></tr><tr><td align="left">30.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">30.2</td><td align="left">Requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">30.3</td><td align="left">Header <code class="code">&lt;regex&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">30.4</td><td align="left">Namespace <code class="code">std::regex_constants</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">30.5</td><td align="left">Class <code class="code">regex_error</code></td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">30.6</td><td align="left">Class template <code class="code">regex_traits</code></td><td align="left">Partial</td><td align="left"><code class="code">transform_primary</code> is not correctly implemented</td></tr><tr><td align="left">30.7</td><td align="left">Class template <code class="code">basic_regex</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">30.8</td><td align="left">Class template <code class="code">sub_match</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">30.9</td><td align="left">Class template <code class="code">match_results</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">30.10</td><td align="left">Regular expression algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">30.11</td><td align="left">Regular expression iterators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">30.12</td><td align="left">Modified ECMAScript regular expression grammar</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
+ <span class="emphasis"><em>31</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Atomics library</em></span>
+ </td></tr><tr><td align="left">31.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">31.2</td><td align="left">Header <code class="code">&lt;atomic&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">31.3</td><td align="left">Type aliases</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">31.4</td><td align="left">Order and consistency</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">31.5</td><td align="left">Lock-free property</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">31.6</td><td align="left">Waiting and notifying</td><td align="left">Partial</td><td align="left">Waiting and notifying is not supported for volatile objects.</td></tr><tr><td align="left">31.7</td><td align="left">Class template <code class="code">atomic_ref</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">31.7.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">31.7.2</td><td align="left">Operations</td><td align="left">Partial</td><td align="left">
+ volatile-qualified overloads for <code class="code">wait</code>,
+ <code class="code">notify_one</code>, and <code class="code">notify_all</code> are not provided.
+ </td></tr><tr><td align="left">31.7.3</td><td align="left">Specializations for integral types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">31.7.4</td><td align="left">Specializations for floating-point types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">31.7.5</td><td align="left">Partial specialization for pointers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">31.8</td><td align="left">Class template <code class="code">atomic</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">31.8.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">31.8.2</td><td align="left">Operations on atomic types</td><td align="left">Partial</td><td align="left">Waiting and notifying is not supported for volatile objects.</td></tr><tr><td align="left">31.8.3</td><td align="left">Specializations for integers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">31.8.4</td><td align="left">Specializations for floating-point types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">31.8.5</td><td align="left">Partial specialization for pointers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">31.8.6</td><td align="left">Member operators common to integers and pointers to objects</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">31.8.7</td><td align="left">Partial specializations for smart pointers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">31.8.7.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">31.8.7.2</td><td align="left">Partial specialization for <code class="code">shared_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">31.8.7.3</td><td align="left">Partial specialization for <code class="code">weak_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">31.9</td><td align="left">Non-member functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">31.10</td><td align="left">Flag type and operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">31.11</td><td align="left">Fences</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
+ <span class="emphasis"><em>32</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Threads library</em></span>
+ </td></tr><tr><td align="left">32.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.2</td><td align="left">Requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.3</td><td align="left">Stop tokens</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.3.1</td><td align="left">Introduction</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.3.2</td><td align="left">Header <code class="code">&lt;stop_token&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.3.3</td><td align="left">Class <code class="code">stop_token</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.3.4</td><td align="left">Class <code class="code">stop_source</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.3.5</td><td align="left">Class template <code class="code">stop_callback</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.4</td><td align="left">Threads</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.4.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.4.2</td><td align="left">Header <code class="code">&lt;thread&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">32.4.3</td><td align="left">Class <code class="code">thread</code></td><td align="left">Partial</td><td align="left"><code class="code">thread::id</code> comparisons not well-defined</td></tr><tr><td align="left">32.4.4</td><td align="left">Class <code class="code">jthread</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.4.5</td><td align="left">Namespace <code class="code">this_thread</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.5</td><td align="left">Mutual exclusion</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.5.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.5.2</td><td align="left">Header <code class="code">&lt;mutex&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.5.3</td><td align="left">Header <code class="code">&lt;shared_mutex&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.5.4</td><td align="left">Mutex requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.5.4.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.5.4.2</td><td align="left">Mutex types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.5.4.3</td><td align="left">Timed mutex types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.5.4.4</td><td align="left">Shared mutex types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.5.4.5</td><td align="left">Shared timed mutex types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.5.5</td><td align="left">Locks</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.5.6</td><td align="left">Generic locking algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.5.7</td><td align="left">Call once</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.5.7.1</td><td align="left">Struct <code class="code">once_flag</code></td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">32.5.7.2</td><td align="left">Function <code class="code">call_once</code></td><td align="left">Partial</td><td align="left">Exception support is broken.
+ See <a class="link" href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146" target="_top">PR
+ 66146</a>.
+ </td></tr><tr><td align="left">32.6</td><td align="left">Condition variables</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.7</td><td align="left">Semaphore</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.7.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.7.2</td><td align="left">Header <code class="code">&lt;semaphore&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.7.3</td><td align="left">Class template <code class="code">counting_semaphore</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.8</td><td align="left">Coordination types</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.8.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.8.2</td><td align="left">Latches</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.8.2.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.8.2.2</td><td align="left">Header <code class="code">&lt;latch&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.8.2.3</td><td align="left">Class <code class="code">latch</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.8.3</td><td align="left">Barriers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.8.3.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">32.8.3.2</td><td align="left">Header <code class="code">&lt;barrier&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.8.3.3</td><td align="left">Class template <code class="code">barrier</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">32.9</td><td align="left">Futures</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">
+ <span class="emphasis"><em>Appendix D</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Compatibility features</em></span>
+ </td></tr><tr><td align="left">D.10</td><td align="left">C headers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.10.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.10.2</td><td align="left">Header <code class="code">&lt;complex.h&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.10.3</td><td align="left">Header <code class="code">&lt;iso646.h&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.10.4</td><td align="left">Header <code class="code">&lt;stdalign.h&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.10.5</td><td align="left">Header <code class="code">&lt;stdbool.h&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.10.6</td><td align="left">Header <code class="code">&lt;tgmath.h&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.10.7</td><td align="left">Other C headers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.12</td><td align="left">Relational operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.13</td><td align="left"><code class="code">char*</code> streams</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.13.1</td><td align="left">Header <code class="code">&lt;strstream&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.13.2</td><td align="left">Class <code class="code">strstreambuf</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.13.3</td><td align="left">Class <code class="code">istrstream</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.13.4</td><td align="left">Class <code class="code">ostrstream</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.13.5</td><td align="left">Class <code class="code">strstream</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.14</td><td align="left">Deprecated type traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.15</td><td align="left">Tuple</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.16</td><td align="left">Variant</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.17</td><td align="left">Deprecated <code class="code">iterator</code> class template</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.18</td><td align="left">Deprecated <code class="code">move_iterator</code> access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.19</td><td align="left">Deprecated <code class="code">shared_ptr</code> atomic access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.20</td><td align="left">Deprecated <code class="code">basic_string</code> capacity</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.21</td><td align="left">Deprecated standard code conversion facets</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.21.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.21.2</td><td align="left">Header <code class="code">&lt;codecvt&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.21.3</td><td align="left">Requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.22</td><td align="left">Deprecated convenience conversion interfaces</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.22.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.22.2</td><td align="left">Class template <code class="code">wstring_convert</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.22.3</td><td align="left">Class template <code class="code">wbuffer_convert</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.23</td><td align="left">Deprecated locale category facets</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.24</td><td align="left">Deprecated filesystem path factory functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.25</td><td align="left">Deprecated atomic operations</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.25.1</td><td align="left">General</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.25.2</td><td align="left">Volatile access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.25.3</td><td align="left">Non-member functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.25.4</td><td align="left">Operations on atomic types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">D.25.5</td><td align="left">Flag type and operations</td><td align="left">Y</td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="iso.2020.specific"></a>Implementation Specific Behavior</h4></div></div></div><p>For behaviour which is also specified by previous standards,
see <a class="link" href="status.html#iso.1998.specific" title="Implementation Specific Behavior">C++ 1998/2003 Implementation
Specific Behavior</a>, <a class="link" href="status.html#iso.2011.specific" title="Implementation Specific Behavior">C++
2011 Implementation Specific Behavior</a>, and
@@ -1840,7 +1934,7 @@ The "SD-6 Feature Test / Notes" column shows the corresponding macro or header f
<a class="link" href="https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations" target="_top">SD-6:
Feature-testing recommendations for C++</a> (where applicable)
or any notes about the implementation.
-</p><div class="table"><a id="table.cxx23_features"></a><p class="title"><strong>Table 1.10. C++ 2023 Library Features</strong></p><div class="table-contents"><table class="table" summary="C++ 2023 Library Features" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /></colgroup><thead><tr><th align="left">Library Feature</th><th align="left">Proposal</th><th align="left">Status</th><th align="left">SD-6 Feature Test / Notes</th></tr></thead><tbody><tr><td colspan="4" align="left">
+</p><div class="table"><a id="table.cxx23_features"></a><p class="title"><strong>Table 1.11. C++ 2023 Library Features</strong></p><div class="table-contents"><table class="table" summary="C++ 2023 Library Features" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /></colgroup><thead><tr><th align="left">Library Feature</th><th align="left">Proposal</th><th align="left">Status</th><th align="left">SD-6 Feature Test / Notes</th></tr></thead><tbody><tr><td colspan="4" align="left">
<span class="bold"><strong>Ranges and Views</strong></span>
</td></tr><tr><td align="left"> Range constructor for std::string_view </td><td align="left">
<a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1989r2.pdf" target="_top">
@@ -2320,7 +2414,7 @@ In this implementation the header names are prefixed by
</p><p>
This page describes the TR1 support in
mainline GCC, not in any particular release.
-</p><div class="table"><a id="table.tr1_status"></a><p class="title"><strong>Table 1.11. C++ TR1 Implementation Status</strong></p><div class="table-contents"><table class="table" summary="C++ TR1 Implementation Status" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left"><span class="emphasis"><em>2</em></span></td><td colspan="3" align="left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td align="left">2.1</td><td align="left">Reference wrappers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.1</td><td align="left">Additions to header <code class="code">&lt;functional&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.1</td><td align="left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.2</td><td align="left"><code class="code">reference_wrapper</code> assignment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.3</td><td align="left"><code class="code">reference_wrapper</code> access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.4</td><td align="left"><code class="code">reference_wrapper</code> invocation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.5</td><td align="left"><code class="code">reference_wrapper</code> helper functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2</td><td align="left">Smart pointers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.1</td><td align="left">Additions to header <code class="code">&lt;memory&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2.2</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2.3</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left"> </td><td align="left">
+</p><div class="table"><a id="table.tr1_status"></a><p class="title"><strong>Table 1.12. C++ TR1 Implementation Status</strong></p><div class="table-contents"><table class="table" summary="C++ TR1 Implementation Status" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left"><span class="emphasis"><em>2</em></span></td><td colspan="3" align="left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td align="left">2.1</td><td align="left">Reference wrappers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.1</td><td align="left">Additions to header <code class="code">&lt;functional&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.1</td><td align="left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.2</td><td align="left"><code class="code">reference_wrapper</code> assignment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.3</td><td align="left"><code class="code">reference_wrapper</code> access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.4</td><td align="left"><code class="code">reference_wrapper</code> invocation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.5</td><td align="left"><code class="code">reference_wrapper</code> helper functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2</td><td align="left">Smart pointers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.1</td><td align="left">Additions to header <code class="code">&lt;memory&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2.2</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2.3</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left"> </td><td align="left">
<p>
Uses code from
<a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">boost::shared_ptr</a>.
@@ -2341,7 +2435,7 @@ decimal floating-point arithmetic".
</p><p>
This page describes the TR 24733 support in
mainline GCC, not in any particular release.
-</p><div class="table"><a id="table.decfp_status"></a><p class="title"><strong>Table 1.12. C++ TR 24733 Implementation Status</strong></p><div class="table-contents"><table class="table" summary="C++ TR 24733 Implementation Status" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left">
+</p><div class="table"><a id="table.decfp_status"></a><p class="title"><strong>Table 1.13. C++ TR 24733 Implementation Status</strong></p><div class="table-contents"><table class="table" summary="C++ TR 24733 Implementation Status" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left">
<span class="emphasis"><em>0</em></span>
</td><td colspan="3" align="left">
<span class="emphasis"><em>Introduction</em></span>
@@ -2381,7 +2475,7 @@ non-strict modes (i.e. <code class="code">-std=gnu++NN</code> modes) the
hypergeometric functions and confluent hypergeometric functions
from TR1 are also provided, defined in namespace
<code class="code">__gnu_cxx</code>.
-</p><div class="table"><a id="table.specfun_status"></a><p class="title"><strong>Table 1.13. C++ Special Functions Implementation Status</strong></p><div class="table-contents"><table class="table" summary="C++ Special Functions Implementation Status" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td align="left">7</td><td align="left">Macro names</td><td align="left">Partial</td><td align="left">No diagnostic for inconsistent definitions of
+</p><div class="table"><a id="table.specfun_status"></a><p class="title"><strong>Table 1.14. C++ Special Functions Implementation Status</strong></p><div class="table-contents"><table class="table" summary="C++ Special Functions Implementation Status" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td align="left">7</td><td align="left">Macro names</td><td align="left">Partial</td><td align="left">No diagnostic for inconsistent definitions of
<code class="code">__STDCPP_WANT_MATH_SPEC_FUNCS__</code></td></tr><tr><td align="left">8</td><td align="left">Mathematical special functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1</td><td align="left">Additions to header <code class="code">&lt;cmath&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.1</td><td align="left">associated Laguerre polynomials</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.2</td><td align="left">associated Legendre functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.3</td><td align="left">beta function</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.4</td><td align="left">(complete) elliptic integral of the first kind</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.5</td><td align="left">(complete) elliptic integral of the second kind</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.6</td><td align="left">(complete) elliptic integral of the third kind</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.7</td><td align="left">regular modified cylindrical Bessel functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.8</td><td align="left">cylindrical Bessel functions (of the first kind)</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.9</td><td align="left">irregular modified cylindrical Bessel functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.10</td><td align="left">cylindrical Neumann functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.11</td><td align="left">(incomplete) elliptic integral of the first kind</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.12</td><td align="left">(incomplete) elliptic integral of the second kind</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.13</td><td align="left">(incomplete) elliptic integral of the third kind</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.14</td><td align="left">exponential integral</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.15</td><td align="left">Hermite polynomials</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.16</td><td align="left">Laguerre polynomials</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.17</td><td align="left">Legendre polynomials</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.18</td><td align="left">Riemann zeta function</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.19</td><td align="left">spherical Bessel functions (of the first kind)</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.20</td><td align="left">spherical associated Legendre functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.1.21</td><td align="left">spherical Neumann functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">8.2</td><td align="left">Additions to header <code class="code">&lt;math.h&gt;</code></td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">8.3</td><td align="left">The header <code class="code">&lt;ctgmath&gt;</code></td><td align="left">Partial</td><td align="left">Conflicts with C++ 2011 requirements.</td></tr><tr bgcolor="#C8B0B0"><td align="left">8.4</td><td align="left">The header <code class="code">&lt;tgmath.h&gt;</code></td><td align="left">N</td><td align="left">Conflicts with C++ 2011 requirements.</td></tr></tbody></table></div></div><br class="table-break" /><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="iso.specfun.specific"></a>Implementation Specific Behavior</h4></div></div></div><p>For behaviour which is specified by the 2011 standard,
see <a class="link" href="status.html#iso.2011.specific" title="Implementation Specific Behavior">C++ 2011 Implementation
Specific Behavior</a>. This section documents behaviour which
diff --git a/libstdc++-v3/doc/xml/manual/status_cxx2020.xml b/libstdc++-v3/doc/xml/manual/status_cxx2020.xml
index 9cee44f..ab44d72 100644
--- a/libstdc++-v3/doc/xml/manual/status_cxx2020.xml
+++ b/libstdc++-v3/doc/xml/manual/status_cxx2020.xml
@@ -1453,6 +1453,4421 @@ time zones and UTC are supported since 13.1,
and <function>chrono::parse</function> is supported since 14.1.
</para>
+<para>
+The following status table is based on the table of contents of
+ISO/IEC 14882:2020.
+Some subclauses are not shown in the table where the content is unchanged
+since C++17 and the implementation is complete.
+</para>
+
+<table frame="all" xml:id="table.cxx20_status">
+<title>C++ 2020 Implementation Status</title>
+
+<tgroup cols="4" align="left" colsep="0" rowsep="1">
+<colspec colname="c1"/>
+<colspec colname="c2"/>
+<colspec colname="c3"/>
+<colspec colname="c4"/>
+ <thead>
+ <row>
+ <entry>Section</entry>
+ <entry>Description</entry>
+ <entry>Status</entry>
+ <entry>Comments</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <emphasis>17</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Language support library</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>17.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.2</entry>
+ <entry>Common definitions</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.2.1</entry>
+ <entry>Header <code>&lt;cstddef&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.2.2</entry>
+ <entry>Header <code>&lt;cstdlib&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.2.3</entry>
+ <entry>Null pointers</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.2.4</entry>
+ <entry>Sizes, alignments, and offsets</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.2.5</entry>
+ <entry><code>byte</code> type operations</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.3</entry>
+ <entry>Implementation properties</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.3.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.3.2</entry>
+ <entry>Header <code>&lt;version&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.3.3</entry>
+ <entry>Header <code>&lt;limits&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.3.4</entry>
+ <entry>Floating-point type properties</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <?dbhtml bgcolor="#C8B0B0" ?>
+ <entry>17.3.4.1</entry>
+ <entry>Type <code>float_round_style</code></entry>
+ <entry>N</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <?dbhtml bgcolor="#C8B0B0" ?>
+ <entry>17.3.4.2</entry>
+ <entry>Type <code>float_denorm_style</code></entry>
+ <entry>N</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.3.5</entry>
+ <entry>Class template <code>numeric_limits</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.3.6</entry>
+ <entry>Header <code>&lt;climits&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.3.7</entry>
+ <entry>Header <code>&lt;cfloat&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.4</entry>
+ <entry>Integer types</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.4.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.4.2</entry>
+ <entry>Header <code>&lt;cstdint&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <?dbhtml bgcolor="#B0B0B0" ?>
+ <entry>17.5</entry>
+ <entry>Startup and termination</entry>
+ <entry>Partial</entry>
+ <entry>C library dependency for quick_exit, at_quick_exit</entry>
+ </row>
+
+ <row>
+ <entry>17.6</entry>
+ <entry>Dynamic memory management</entry>
+ <entry>Y</entry>
+ </row>
+
+ <row>
+ <entry>17.7</entry>
+ <entry>Type identification</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.8</entry>
+ <entry>Source location</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.8.1</entry>
+ <entry>Header <code>&lt;source_location&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.8.2</entry>
+ <entry>Class <code>source_location</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.9</entry>
+ <entry>Exception handling</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.10</entry>
+ <entry>Initializer lists</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.11</entry>
+ <entry>Comparisons</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.11.1</entry>
+ <entry>Header <code>&lt;compare&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.11.2</entry>
+ <entry>Comparison category types</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.11.3</entry>
+ <entry>Class template <code>common_comparison_category</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.11.4</entry>
+ <entry>Concept <code>three_way_comparable</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.11.5</entry>
+ <entry>Result of three-way comparison</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.11.6</entry>
+ <entry>Comparison algorithms</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.12</entry>
+ <entry>Coroutines</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.12.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.12.2</entry>
+ <entry>Header <code>&lt;coroutine&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.12.3</entry>
+ <entry>Coroutine traits</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.12.4</entry>
+ <entry>Class template <code>coroutine_handle</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.12.5</entry>
+ <entry>No-op coroutines</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>17.13</entry>
+ <entry>Other runtime support</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>18</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Concepts library</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>18.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.2</entry>
+ <entry>Equality preservation</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.3</entry>
+ <entry>Header <code>&lt;concepts&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.4</entry>
+ <entry>Language-related concepts</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.4.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.4.2</entry>
+ <entry>Concept <code>same_as</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.4.3</entry>
+ <entry>Concept <code>derived_from</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.4.4</entry>
+ <entry>Concept <code>convertible_to</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.4.5</entry>
+ <entry>Concept <code>common_reference_with</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.4.6</entry>
+ <entry>Concept <code>common_with</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.4.7</entry>
+ <entry>Arithmetic concepts</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.4.8</entry>
+ <entry>Concept <code>assignable_from</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.4.9</entry>
+ <entry>Concept <code>swappable</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.4.10</entry>
+ <entry>Concept <code>destructible</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.4.11</entry>
+ <entry>Concept <code>constructible_from</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.4.12</entry>
+ <entry>Concept <code>default_initializable</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.4.13</entry>
+ <entry>Concept <code>move_constructible</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.4.14</entry>
+ <entry>Concept <code>copy_constructible</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.5</entry>
+ <entry>Comparison concepts</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.5.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.5.2</entry>
+ <entry>Boolean testability</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.5.3</entry>
+ <entry>Concept <code>equality_comparable</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.5.4</entry>
+ <entry>Concept <code>totally_ordered</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.6</entry>
+ <entry>Object concepts</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.7</entry>
+ <entry>Callable concepts</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.7.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.7.2</entry>
+ <entry>Concept <code>invocable</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.7.3</entry>
+ <entry>Concept <code>regular_invocable</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.7.4</entry>
+ <entry>Concept <code>predicate</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.7.5</entry>
+ <entry>Concept <code>relation</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.7.6</entry>
+ <entry>Concept <code>equivalence_relation</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>18.7.7</entry>
+ <entry>Concept <code>strict_weak_order</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>19</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Diagnostics library</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>19.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>19.2</entry>
+ <entry>Exception classes</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>19.3</entry>
+ <entry>Assertions</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>19.4</entry>
+ <entry>Error numbers</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>19.5</entry>
+ <entry>System error support</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>19.5.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>19.5.2</entry>
+ <entry>Header <code>&lt;system_error&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>19.5.3</entry>
+ <entry>Class <code>error_category</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>19.5.4</entry>
+ <entry>Class <code>error_code</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>19.5.5</entry>
+ <entry>Class <code>error_condition</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>19.5.6</entry>
+ <entry>Comparison operator functions</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>19.5.7</entry>
+ <entry>System error hash support</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>19.5.8</entry>
+ <entry>Class <code>system_error</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>20</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>General utilities library</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>20.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.2</entry>
+ <entry>Utility components</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.2.1</entry>
+ <entry>Header <code>&lt;utility&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.2.2</entry>
+ <entry><code>swap</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.2.3</entry>
+ <entry><code>exchange</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.2.4</entry>
+ <entry>Forward/move helpers</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.2.5</entry>
+ <entry>Function template <code>as_const</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.2.6</entry>
+ <entry>Function template <code>declval</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.2.7</entry>
+ <entry>Integer comparison functions</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.3</entry>
+ <entry>Compile-time integer sequences</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.4</entry>
+ <entry>Pairs</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.5</entry>
+ <entry>Tuples</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.6</entry>
+ <entry>Optional objects</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.7</entry>
+ <entry>Variants</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.8</entry>
+ <entry>Storage for any type</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.9</entry>
+ <entry>Bitsets</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.10</entry>
+ <entry>Memory</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.11</entry>
+ <entry>Smart pointers</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.11.1</entry>
+ <entry>Class template <code>unique_ptr</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.11.2</entry>
+ <entry>Class <code>bad_weak_ptr</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.11.3</entry>
+ <entry>Class template <code>shared_ptr</code></entry>
+ <entry>Y</entry>
+ <entry>Uses code from boost::shared_ptr.</entry>
+ </row>
+
+ <row>
+ <entry>20.11.4</entry>
+ <entry>Class template <code>weak_ptr</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.11.5</entry>
+ <entry>Class template <code>owner_less</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.11.6</entry>
+ <entry>Class template <code>enable_shared_from_this</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.11.7</entry>
+ <entry>Smart pointer hash support</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.12</entry>
+ <entry>Memory resources</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.12.1</entry>
+ <entry>Header <code>&lt;memory_resource&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.12.2</entry>
+ <entry>Class <code>memory_resource</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.12.3</entry>
+ <entry>Class template <code>polymorphic_allocator</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.12.4</entry>
+ <entry>Access to program-wide <code>memory_resource</code> objects</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.12.5</entry>
+ <entry>Pool resource classes</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.12.6</entry>
+ <entry>Class <code>monotonic_buffer_resource</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.13</entry>
+ <entry>Class template <code>scoped_allocator_adaptor</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14</entry>
+ <entry>Function objects</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.2</entry>
+ <entry>Header <code>&lt;functional&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.3</entry>
+ <entry>Definitions</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.4</entry>
+ <entry>Requirements</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.5</entry>
+ <entry>Function template <code>invoke</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.6</entry>
+ <entry>Class template <code>reference_wrapper</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.7</entry>
+ <entry>Arithmetic operations</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.8</entry>
+ <entry>Comparisons</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.9</entry>
+ <entry>Concept-constrained comparisons</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.10</entry>
+ <entry>Logical operations</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.11</entry>
+ <entry>Bitwise operations</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.12</entry>
+ <entry>Class <code>identity</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.13</entry>
+ <entry>Function template <code>not_fn</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.14</entry>
+ <entry>Function template <code>bind_front</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.15</entry>
+ <entry>Function object binders</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.16</entry>
+ <entry>Function template <code>mem_fn</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.17</entry>
+ <entry>Polymorphic function wrappers</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.17.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.17.2</entry>
+ <entry>Class <code>bad_function_call</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.17.3</entry>
+ <entry>Class template <code>function</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.14.18</entry>
+ <entry>Searchers</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.15</entry>
+ <entry>Metaprogramming and type traits</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.15.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.15.2</entry>
+ <entry>Requirements</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.15.3</entry>
+ <entry>Header <code>&lt;type_traits&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.15.4</entry>
+ <entry>Helper classes</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.15.5</entry>
+ <entry>Unary type traits</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.15.6</entry>
+ <entry>Type property queries</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.15.7</entry>
+ <entry>Relationships between types</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.15.8</entry>
+ <entry>Transformations between types</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.15.9</entry>
+ <entry>Logical operator traits</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.15.10</entry>
+ <entry>Member relationships</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.15.11</entry>
+ <entry>Constant evaluation context</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.16</entry>
+ <entry>Compile-time rational arithmetic</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.17</entry>
+ <entry>Class <code>type_index</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.18</entry>
+ <entry>Execution policies</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.19</entry>
+ <entry>Primitive numeric conversions</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.19.1</entry>
+ <entry>Header <code>&lt;charconv&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.19.2</entry>
+ <entry>Primitive numeric output conversion</entry>
+ <entry>Y</entry>
+ <entry>
+ Floating-point types up to 64-bit are formatted using
+ <link xmlns:xlink="http://www.w3.org/1999/xlink"
+ xlink:href="https://github.com/ulfjack/ryu">Ryu</link>.
+ Types with greater precision are formatted using the C library
+ (<function>sprintf</function> and conditionally
+ <function>strfromf128</function>).
+ For powerpc64le-unknown-linux-gnu <function>__sprintfieee128</function>
+ must be provided by Glibc.
+ </entry>
+ </row>
+
+ <row>
+ <entry>20.19.3</entry>
+ <entry>Primitive numeric input conversion</entry>
+ <entry>Y</entry>
+ <entry>
+ Floating-point types up to 64-bit are parsed using
+ <link xmlns:xlink="http://www.w3.org/1999/xlink"
+ xlink:href="https://github.com/fastfloat/fast_float">fast_float</link>.
+ Types with greater precision are parsed using the C library
+ (<function>strtold</function>).
+ For powerpc64le-unknown-linux-gnu <function>__strtoieee128</function>
+ must be provided by Glibc.
+ </entry>
+ </row>
+
+ <row>
+ <entry>20.20</entry>
+ <entry>Formatting</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.20.1</entry>
+ <entry>Header <code>&lt;format&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.20.2</entry>
+ <entry>Format string</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.20.2.1</entry>
+ <entry> In general</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.20.2.2</entry>
+ <entry>Standard format specifiers</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.20.3</entry>
+ <entry>Error reporting</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.20.4</entry>
+ <entry>Formatting functions</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.20.5</entry>
+ <entry>Formatter</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.20.5.1</entry>
+ <entry>Formatter requirements</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.20.5.2</entry>
+ <entry>Formatter specializations</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.20.5.3</entry>
+ <entry>Class template <code>basic_format_parse_context</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.20.5.4</entry>
+ <entry>Class template <code>basic_format_context</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.20.6</entry>
+ <entry>Arguments</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.20.6.1</entry>
+ <entry>Class template <code>basic_format_arg</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.20.6.2</entry>
+ <entry>Class template <emphasis>format-arg-store</emphasis></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.20.6.3</entry>
+ <entry>Class template <code>basic_format_args</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>20.20.7</entry>
+ <entry>Class <code>format_error</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>21</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Strings library</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>21.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>21.2</entry>
+ <entry>Character traits</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>21.3</entry>
+ <entry>String classes</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>21.4</entry>
+ <entry>String view classes</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <?dbhtml bgcolor="#B0B0B0" ?>
+ <entry>21.5</entry>
+ <entry>Null-terminated sequence utilities</entry>
+ <entry>Partial</entry>
+ <entry>C library dependency.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>22</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Containers library</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>22.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>22.2</entry>
+ <entry>Container requirements</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>22.3</entry>
+ <entry>Sequence containers</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>22.4</entry>
+ <entry>Associative containers</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>22.5</entry>
+ <entry>Unordered associative containers</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>22.6</entry>
+ <entry>Container adaptors</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>22.7</entry>
+ <entry>Views</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>22.7.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>22.7.2</entry>
+ <entry>Header <code>&lt;span&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>22.7.3</entry>
+ <entry>Class template <code>span</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>23</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Iterators library</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>23.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.2</entry>
+ <entry>Header <code>&lt;iterator&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.3</entry>
+ <entry>Iterator requirements</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.3.1</entry>
+ <entry>In general</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.3.2</entry>
+ <entry>Associated types</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.3.3</entry>
+ <entry>Customization points</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.3.4</entry>
+ <entry>Iterator concepts</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.3.5</entry>
+ <entry>C++17 iterator requirements</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.3.6</entry>
+ <entry>Indirect callable requirements</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.3.7</entry>
+ <entry>Common algorithm requirements</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.4</entry>
+ <entry>Iterator primitives</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.4.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.4.2</entry>
+ <entry>Standard iterator tags</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.4.3</entry>
+ <entry>Iterator operations</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.4.4</entry>
+ <entry>Range iterator operations</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.5</entry>
+ <entry>Iterator adaptors</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.5.1</entry>
+ <entry>Reverse iterators</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.5.2</entry>
+ <entry>Insert iterators</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.5.3</entry>
+ <entry>Move iterators and sentinels</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.5.4</entry>
+ <entry>Common iterators</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.5.5</entry>
+ <entry>Default sentinel</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.5.6</entry>
+ <entry>Counted iterators</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.5.7</entry>
+ <entry> Unreachable sentinel</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.6</entry>
+ <entry> Stream iterators</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.6.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.6.2</entry>
+ <entry> Class template <code>istream_iterator</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.6.3</entry>
+ <entry>Class template <code>ostream_iterator</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.6.4</entry>
+ <entry>Class template <code>istreambuf_iterator</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.6.5</entry>
+ <entry>Class template <code>ostreambuf_iterator</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>23.7</entry>
+ <entry>Range access</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>24</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Ranges library</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>24.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.2</entry>
+ <entry>Header <code>&lt;ranges&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.3</entry>
+ <entry>Range access</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.4</entry>
+ <entry>Range requirements</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.4.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.4.2</entry>
+ <entry>Ranges</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.4.3</entry>
+ <entry>Sized ranges</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.4.4</entry>
+ <entry>Views</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.4.5</entry>
+ <entry>Other range refinements</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.5</entry>
+ <entry>Range utilities</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.5.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.5.2</entry>
+ <entry>Helper concepts</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.5.3</entry>
+ <entry>View interface</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.5.4</entry>
+ <entry>Sub-ranges</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.5.5</entry>
+ <entry>Dangling iterator handling</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.6</entry>
+ <entry>Range factories</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.6.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.6.2</entry>
+ <entry>Empty view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.6.3</entry>
+ <entry>Single view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.6.4</entry>
+ <entry>Iota view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.6.5</entry>
+ <entry>Istream view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7</entry>
+ <entry>Range adaptors</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7.2</entry>
+ <entry>Range adaptor objects</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7.3</entry>
+ <entry>Semiregular wrapper</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7.4</entry>
+ <entry>All view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7.5</entry>
+ <entry>Filter view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7.6</entry>
+ <entry>Transform view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7.7</entry>
+ <entry>Take view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7.8</entry>
+ <entry>Take while view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7.9</entry>
+ <entry>Drop view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7.10</entry>
+ <entry>Drop while view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7.11</entry>
+ <entry>Join view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7.12</entry>
+ <entry>Split view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7.13</entry>
+ <entry>Counted view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7.14</entry>
+ <entry>Common view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7.15</entry>
+ <entry>Reverse view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>24.7.16</entry>
+ <entry>Elements view</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>25</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Algorithms library</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>25.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.2</entry>
+ <entry>Algorithms requirements</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.3</entry>
+ <entry>Parallel algorithms</entry>
+ <entry/>
+ <entry>Using <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://github.com/llvm/llvm-project/tree/main/pstl">PSTL</link></entry>
+ </row>
+
+ <row>
+ <entry>25.4</entry>
+ <entry>Header <code>&lt;algorithm&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.5</entry>
+ <entry>Algorithm result types</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.6</entry>
+ <entry>Non-modifying sequence operations</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.6.1</entry>
+ <entry>All of</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.6.2</entry>
+ <entry>Any of</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.6.3</entry>
+ <entry>None of</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.6.4</entry>
+ <entry>For each</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.6.5</entry>
+ <entry>Find</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.6.6</entry>
+ <entry>Find end</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.6.7</entry>
+ <entry>Find first</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.6.8</entry>
+ <entry>Adjacent find</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.6.9</entry>
+ <entry>Count</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.6.10</entry>
+ <entry>Mismatch</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.6.11</entry>
+ <entry>Equal</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.6.12</entry>
+ <entry>Is permutation</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.6.13</entry>
+ <entry>Search</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.7</entry>
+ <entry>Mutating sequence operations</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.7.1</entry>
+ <entry>Copy</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.7.2</entry>
+ <entry>Move</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.7.3</entry>
+ <entry>Swap</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.7.4</entry>
+ <entry>Transform</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.7.5</entry>
+ <entry>Replace</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.7.6</entry>
+ <entry>Fill</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.7.7</entry>
+ <entry>Generate</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.7.8</entry>
+ <entry>Remove</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.7.9</entry>
+ <entry>Unique</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.7.10</entry>
+ <entry>Reverse</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.7.11</entry>
+ <entry>Rotate</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.7.12</entry>
+ <entry>Sample</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.7.13</entry>
+ <entry>Shuffle</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.7.14</entry>
+ <entry>Shift</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.8</entry>
+ <entry>Sorting and related operations</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.8.1</entry>
+ <entry>General</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.8.2</entry>
+ <entry>Sorting</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.8.3</entry>
+ <entry>Nth element</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.8.4</entry>
+ <entry>Binary search</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.8.5</entry>
+ <entry>Partitions</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.8.6</entry>
+ <entry>Merge</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.8.7</entry>
+ <entry>Set operations on sorted structures</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.8.8</entry>
+ <entry>Heap operations</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.8.9</entry>
+ <entry>Minimum and maximum</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.8.10</entry>
+ <entry>Bounded value</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.8.11</entry>
+ <entry>Lexicographical comparison</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.8.12</entry>
+ <entry>Three-way comparison algorithms</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.8.13</entry>
+ <entry>Permutation generators</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.9</entry>
+ <entry>Header <code>&lt;numeric&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10</entry>
+ <entry>Generalized numeric operations</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10.2</entry>
+ <entry>Definitions</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10.3</entry>
+ <entry>Accumulate</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10.4</entry>
+ <entry>Reduce</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10.5</entry>
+ <entry>Inner product</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10.6</entry>
+ <entry>Transform reduce</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10.7</entry>
+ <entry>Partial sum</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10.8</entry>
+ <entry>Exclusive scan</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10.9</entry>
+ <entry>Inclusive scan</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10.10</entry>
+ <entry>Transform exclusive scan</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10.11</entry>
+ <entry>Transform inclusive scan</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10.12</entry>
+ <entry>Adjacent difference</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10.13</entry>
+ <entry>Iota</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10.14</entry>
+ <entry>Greatest common divisor</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10.15</entry>
+ <entry>Least common multiple</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.10.16</entry>
+ <entry>Midpoint</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.11</entry>
+ <entry>Specialized <code>&lt;memory&gt;</code> algorithms</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.11.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.11.2</entry>
+ <entry>Special memory concepts</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.11.3</entry>
+ <entry><code>uninitialized_default_construct</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.11.4</entry>
+ <entry><code>uninitialized_value_construct</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.11.5</entry>
+ <entry><code>uninitialized_copy</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.11.6</entry>
+ <entry><code>uninitialized_move</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.11.7</entry>
+ <entry><code>uninitialized_fill</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.11.8</entry>
+ <entry><code>construct_at</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.11.9</entry>
+ <entry><code>destroy</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>25.12</entry>
+ <entry>C library algorithms</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>26</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Numerics library</emphasis>
+ </entry>
+ </row>
+
+
+ <row>
+ <entry>26.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.2</entry>
+ <entry>Numeric type requirements</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.3</entry>
+ <entry>The floating-point environment</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.4</entry>
+ <entry>Complex numbers</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.5</entry>
+ <entry>Bit manipulation</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.5.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.5.2</entry>
+ <entry>Header <code>&lt;bit&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.5.3</entry>
+ <entry>Function template <code>bit_cast</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.5.4</entry>
+ <entry>Integral powers of 2</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.5.5</entry>
+ <entry>Rotating</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.5.6</entry>
+ <entry>Counting</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.5.7</entry>
+ <entry>Endian</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.6</entry>
+ <entry>Random number generation</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.7</entry>
+ <entry>Numeric arrays</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.8</entry>
+ <entry>Mathematical functions for floating-point types</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.9</entry>
+ <entry>Numbers</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.9.1</entry>
+ <entry>Header <code>&lt;numbers&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>26.9.2</entry>
+ <entry>Mathematical constants</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>27</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Time library</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>27.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.2</entry>
+ <entry>Header <code>&lt;chrono&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.3</entry>
+ <entry><emphasis>Cpp17Clock</emphasis> requirements</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.4</entry>
+ <entry>Time-related traits</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.4.1</entry>
+ <entry><code>treat_as_floating_point</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.4.2</entry>
+ <entry><code>duration_values</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.4.3</entry>
+ <entry>Specializations of <code>common_type</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.4.4</entry>
+ <entry>Class template <code>is_clock</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.5</entry>
+ <entry>Class template <code>duration</code></entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.5.1</entry>
+ <entry>General</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.5.2</entry>
+ <entry>Constructors</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.5.3</entry>
+ <entry>Observer</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.5.4</entry>
+ <entry>Arithmetic</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.5.5</entry>
+ <entry>Special values</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.5.6</entry>
+ <entry>Non-member arithmetic</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.5.7</entry>
+ <entry>Comparisons</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.5.8</entry>
+ <entry>Conversions</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.5.9</entry>
+ <entry>Suffixes for duration literals</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.5.10</entry>
+ <entry>Algorithms</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.5.11</entry>
+ <entry>I/O</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.6</entry>
+ <entry>Class template <code>time_point</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.7</entry>
+ <entry>Clocks</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.7.1</entry>
+ <entry>General</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.7.2</entry>
+ <entry>Class <code>system_clock</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.7.3</entry>
+ <entry>Class <code>utc_clock</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.7.4</entry>
+ <entry>Class <code>tai_clock</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.7.5</entry>
+ <entry>Class <code>gps_clock</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.7.6</entry>
+ <entry>Type <code>file_clock</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.7.7</entry>
+ <entry>Class <code>steady_clock</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.7.8</entry>
+ <entry>Class <code>high_resolution_clock</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.7.9</entry>
+ <entry>Local time</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.7.10</entry>
+ <entry><code>time_point</code> conversions</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8</entry>
+ <entry>The civil calendar</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.1</entry>
+ <entry>In general</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.2</entry>
+ <entry>Class <code>last_spec</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.3</entry>
+ <entry>Class <code>day</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.4</entry>
+ <entry>Class <code>month</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.5</entry>
+ <entry>Class <code>year</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.6</entry>
+ <entry>Class <code>weekday</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.7</entry>
+ <entry>Class <code>weekday_indexed</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.8</entry>
+ <entry>Class <code>weekday_last</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.9</entry>
+ <entry>Class <code>month_day</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.10</entry>
+ <entry>Class <code>month_day_last</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.11</entry>
+ <entry>Class <code>month_weekday</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.12</entry>
+ <entry>Class <code>month_weekday_last</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.13</entry>
+ <entry>Class <code>year_month</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.14</entry>
+ <entry>Class <code>year_month_day</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.15</entry>
+ <entry>Class <code>year_month_day_last</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.16</entry>
+ <entry>Class <code>year_month_weekday</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.8.17</entry>
+ <entry>Class <code>year_month_weekday_last</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.9</entry>
+ <entry>Class template <code>hh_mm_ss</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.10</entry>
+ <entry>12/24 hours functions</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.11</entry>
+ <entry>Time zones</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.11.1</entry>
+ <entry>In general</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.11.2</entry>
+ <entry>Time zone database</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.11.3</entry>
+ <entry>Exception classes</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.11.4</entry>
+ <entry>Information classes</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.11.5</entry>
+ <entry>Class <code>time_zone</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.11.6</entry>
+ <entry>Class template <code>zoned_traits</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.11.7</entry>
+ <entry>Class template <code>zoned_time</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.11.8</entry>
+ <entry>Class <code>leap_second</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.11.9</entry>
+ <entry>Class <code>time_zone_link</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.12</entry>
+ <entry>Formatting</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.13</entry>
+ <entry>Parsing</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>27.14</entry>
+ <entry>Header <code>&lt;ctime&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>28</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Localization library</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>28.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.2</entry>
+ <entry>Header <code>&lt;locale&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.3</entry>
+ <entry>Locales</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.3.1</entry>
+ <entry>Class <code>locale</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.3.2</entry>
+ <entry><code>locale</code> globals</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.3.3</entry>
+ <entry>Convenience interfaces</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.3.3.1</entry>
+ <entry>Character classification</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.3.3.2</entry>
+ <entry>Character conversions</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.4</entry>
+ <entry>Standard <code>locale</code> categories</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.4.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.4.2</entry>
+ <entry>The <code>ctype</code> category</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.4.3</entry>
+ <entry>The numeric category</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.4.4</entry>
+ <entry>The numeric punctuation facet</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.4.5</entry>
+ <entry>The collate category</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.4.6</entry>
+ <entry>The time category</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.4.7</entry>
+ <entry>The monetary category</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.4.8</entry>
+ <entry>The message retrieval category</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>28.5</entry>
+ <entry>C library locales</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>29</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Input/output library</emphasis>
+ </entry>
+ </row>
+
+
+
+ <row>
+ <entry>29.1</entry>
+ <entry> General</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.2</entry>
+ <entry>Iostreams requirements</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.2.1</entry>
+ <entry>Imbue limitations</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.2.2</entry>
+ <entry>Positioning type limitations</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <?dbhtml bgcolor="#B0B0B0" ?>
+ <entry>29.2.3</entry>
+ <entry>Thread safety</entry>
+ <entry>Partial</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.3</entry>
+ <entry>Forward declarations</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.4</entry>
+ <entry>Standard iostream objects</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.5</entry>
+ <entry>Iostreams base classes</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.6</entry>
+ <entry>Stream buffers</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.7</entry>
+ <entry>Formatting and manipulators</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.8</entry>
+ <entry>String-based streams</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.9</entry>
+ <entry>File-based streams</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.10</entry>
+ <entry>Synchronized output streams</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.10.1</entry>
+ <entry>Header <code>&lt;syncstream&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.10.2</entry>
+ <entry>Class template <code>basic_syncbuf</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.10.3</entry>
+ <entry>Class template <code>basic_osyncstream</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11</entry>
+ <entry>File systems</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.2</entry>
+ <entry>Conformance</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.3</entry>
+ <entry>Requirements</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.4</entry>
+ <entry>Header <code>&lt;filesystem&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.5</entry>
+ <entry>Error reporting</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.6</entry>
+ <entry>Class <code>path</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.7</entry>
+ <entry>Class <code>filesystem_error</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.8</entry>
+ <entry>Enumerations</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.8.1</entry>
+ <entry>Enum <code>path::format</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.8.2</entry>
+ <entry>Enum class <code>file_type</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.8.3</entry>
+ <entry>Enum class <code>copy_options</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.8.4</entry>
+ <entry>Enum class <code>perms</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.8.5</entry>
+ <entry>Enum class <code>perm_options</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.8.6</entry>
+ <entry>Enum class <code>directory_options</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.9</entry>
+ <entry>Class <code>file_status</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.10</entry>
+ <entry>Class <code>directory_entry</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.11</entry>
+ <entry>Class <code>directory_iterator</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.12</entry>
+ <entry>Class <code>recursive_directory_iterator</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.11.13</entry>
+ <entry>Filesystem operation functions</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.12</entry>
+ <entry>C library files</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.12.1</entry>
+ <entry>Header <code>&lt;cstdio&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>29.12.2</entry>
+ <entry>Header <code>&lt;cinttypes&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>30</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Regular expressions library</emphasis>
+ </entry>
+ </row>
+
+
+ <row>
+ <entry>30.1</entry>
+ <entry>General</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>30.2</entry>
+ <entry>Requirements</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>30.3</entry>
+ <entry>Header <code>&lt;regex&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>30.4</entry>
+ <entry>Namespace <code>std::regex_constants</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>30.5</entry>
+ <entry>Class <code>regex_error</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <?dbhtml bgcolor="#B0B0B0" ?>
+ <entry>30.6</entry>
+ <entry>Class template <code>regex_traits</code></entry>
+ <entry>Partial</entry>
+ <entry><code>transform_primary</code> is not correctly implemented</entry>
+ </row>
+
+ <row>
+ <entry>30.7</entry>
+ <entry>Class template <code>basic_regex</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>30.8</entry>
+ <entry>Class template <code>sub_match</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>30.9</entry>
+ <entry>Class template <code>match_results</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>30.10</entry>
+ <entry>Regular expression algorithms</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>30.11</entry>
+ <entry>Regular expression iterators</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>30.12</entry>
+ <entry>Modified ECMAScript regular expression grammar</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>31</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Atomics library</emphasis>
+ </entry>
+ </row>
+
+
+ <row>
+ <entry>31.1</entry>
+ <entry>General</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.2</entry>
+ <entry>Header <code>&lt;atomic&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.3</entry>
+ <entry>Type aliases</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.4</entry>
+ <entry>Order and consistency</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.5</entry>
+ <entry>Lock-free property</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <?dbhtml bgcolor="#B0B0B0" ?>
+ <entry>31.6</entry>
+ <entry>Waiting and notifying</entry>
+ <entry>Partial</entry>
+ <entry>Waiting and notifying is not supported for volatile objects.</entry>
+ </row>
+
+ <row>
+ <entry>31.7</entry>
+ <entry>Class template <code>atomic_ref</code></entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.7.1</entry>
+ <entry>General</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <?dbhtml bgcolor="#B0B0B0" ?>
+ <entry>31.7.2</entry>
+ <entry>Operations</entry>
+ <entry>Partial</entry>
+ <entry>
+ volatile-qualified overloads for <code>wait</code>,
+ <code>notify_one</code>, and <code>notify_all</code> are not provided.
+ </entry>
+ </row>
+
+ <row>
+ <entry>31.7.3</entry>
+ <entry>Specializations for integral types</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.7.4</entry>
+ <entry>Specializations for floating-point types</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.7.5</entry>
+ <entry>Partial specialization for pointers</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.8</entry>
+ <entry>Class template <code>atomic</code></entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.8.1</entry>
+ <entry>General</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <?dbhtml bgcolor="#B0B0B0" ?>
+ <entry>31.8.2</entry>
+ <entry>Operations on atomic types</entry>
+ <entry>Partial</entry>
+ <entry>Waiting and notifying is not supported for volatile objects.</entry>
+ </row>
+
+ <row>
+ <entry>31.8.3</entry>
+ <entry>Specializations for integers</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.8.4</entry>
+ <entry>Specializations for floating-point types</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.8.5</entry>
+ <entry>Partial specialization for pointers</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.8.6</entry>
+ <entry>Member operators common to integers and pointers to objects</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.8.7</entry>
+ <entry>Partial specializations for smart pointers</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.8.7.1</entry>
+ <entry>General</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.8.7.2</entry>
+ <entry>Partial specialization for <code>shared_ptr</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.8.7.3</entry>
+ <entry>Partial specialization for <code>weak_ptr</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.9</entry>
+ <entry>Non-member functions</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.10</entry>
+ <entry>Flag type and operations</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>31.11</entry>
+ <entry>Fences</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>32</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Threads library</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>32.1</entry>
+ <entry>General</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.2</entry>
+ <entry>Requirements</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.3</entry>
+ <entry>Stop tokens</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.3.1</entry>
+ <entry>Introduction</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.3.2</entry>
+ <entry>Header <code>&lt;stop_token&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.3.3</entry>
+ <entry>Class <code>stop_token</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.3.4</entry>
+ <entry>Class <code>stop_source</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.3.5</entry>
+ <entry>Class template <code>stop_callback</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.4</entry>
+ <entry>Threads</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.4.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.4.2</entry>
+ <entry>Header <code>&lt;thread&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <?dbhtml bgcolor="#B0B0B0" ?>
+ <entry>32.4.3</entry>
+ <entry>Class <code>thread</code></entry>
+ <entry>Partial</entry>
+ <entry><code>thread::id</code> comparisons not well-defined</entry>
+ </row>
+
+ <row>
+ <entry>32.4.4</entry>
+ <entry>Class <code>jthread</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.4.5</entry>
+ <entry>Namespace <code>this_thread</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.5</entry>
+ <entry>Mutual exclusion</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.5.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.5.2</entry>
+ <entry>Header <code>&lt;mutex&gt;</code> synopsis</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.5.3</entry>
+ <entry>Header <code>&lt;shared_mutex&gt;</code> synopsis</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.5.4</entry>
+ <entry>Mutex requirements</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.5.4.1</entry>
+ <entry>In general</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.5.4.2</entry>
+ <entry>Mutex types</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.5.4.3</entry>
+ <entry>Timed mutex types</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.5.4.4</entry>
+ <entry>Shared mutex types</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.5.4.5</entry>
+ <entry>Shared timed mutex types</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.5.5</entry>
+ <entry>Locks</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.5.6</entry>
+ <entry>Generic locking algorithms</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.5.7</entry>
+ <entry>Call once</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.5.7.1</entry>
+ <entry>Struct <code>once_flag</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <?dbhtml bgcolor="#B0B0B0" ?>
+ <entry>32.5.7.2</entry>
+ <entry>Function <code>call_once</code></entry>
+ <entry>Partial</entry>
+ <entry>Exception support is broken.
+ See <link xmlns:xlink="http://www.w3.org/1999/xlink"
+ xlink:href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146">PR
+ 66146</link>.
+ </entry>
+ </row>
+
+ <row>
+ <entry>32.6</entry>
+ <entry>Condition variables</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.7</entry>
+ <entry>Semaphore</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.7.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.7.2</entry>
+ <entry>Header <code>&lt;semaphore&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.7.3</entry>
+ <entry>Class template <code>counting_semaphore</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.8</entry>
+ <entry>Coordination types</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.8.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.8.2</entry>
+ <entry>Latches</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.8.2.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.8.2.2</entry>
+ <entry>Header <code>&lt;latch&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.8.2.3</entry>
+ <entry>Class <code>latch</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.8.3</entry>
+ <entry>Barriers</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.8.3.1</entry>
+ <entry>General</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.8.3.2</entry>
+ <entry>Header <code>&lt;barrier&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.8.3.3</entry>
+ <entry>Class template <code>barrier</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>32.9</entry>
+ <entry>Futures</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>Appendix D</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Compatibility features</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>D.10</entry>
+ <entry>C headers</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.10.1</entry>
+ <entry>General</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.10.2</entry>
+ <entry>Header <code>&lt;complex.h&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.10.3</entry>
+ <entry>Header <code>&lt;iso646.h&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.10.4</entry>
+ <entry>Header <code>&lt;stdalign.h&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.10.5</entry>
+ <entry>Header <code>&lt;stdbool.h&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.10.6</entry>
+ <entry>Header <code>&lt;tgmath.h&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.10.7</entry>
+ <entry>Other C headers</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.12</entry>
+ <entry>Relational operators</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.13</entry>
+ <entry><code>char*</code> streams</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.13.1</entry>
+ <entry>Header <code>&lt;strstream&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.13.2</entry>
+ <entry>Class <code>strstreambuf</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.13.3</entry>
+ <entry>Class <code>istrstream</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.13.4</entry>
+ <entry>Class <code>ostrstream</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.13.5</entry>
+ <entry>Class <code>strstream</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.14</entry>
+ <entry>Deprecated type traits</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.15</entry>
+ <entry>Tuple</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.16</entry>
+ <entry>Variant</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.17</entry>
+ <entry>Deprecated <code>iterator</code> class template</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.18</entry>
+ <entry>Deprecated <code>move_iterator</code> access</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.19</entry>
+ <entry>Deprecated <code>shared_ptr</code> atomic access</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.20</entry>
+ <entry>Deprecated <code>basic_string</code> capacity</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.21</entry>
+ <entry>Deprecated standard code conversion facets</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.21.1</entry>
+ <entry>General</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.21.2</entry>
+ <entry>Header <code>&lt;codecvt&gt;</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.21.3</entry>
+ <entry>Requirements</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.22</entry>
+ <entry>Deprecated convenience conversion interfaces</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.22.1</entry>
+ <entry>General</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.22.2</entry>
+ <entry>Class template <code>wstring_convert</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.22.3</entry>
+ <entry>Class template <code>wbuffer_convert</code></entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.23</entry>
+ <entry>Deprecated locale category facets</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.24</entry>
+ <entry>Deprecated filesystem path factory functions</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.25</entry>
+ <entry>Deprecated atomic operations</entry>
+ <entry/>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.25.1</entry>
+ <entry>General</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.25.2</entry>
+ <entry>Volatile access</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.25.3</entry>
+ <entry>Non-member functions</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.25.4</entry>
+ <entry>Operations on atomic types</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ <row>
+ <entry>D.25.5</entry>
+ <entry>Flag type and operations</entry>
+ <entry>Y</entry>
+ <entry/>
+ </row>
+
+ </tbody>
+</tgroup>
+</table>
+
<section xml:id="iso.2020.specific" xreflabel="Implementation Specific"><info><title>Implementation Specific Behavior</title></info>
<para>For behaviour which is also specified by previous standards,
diff --git a/libtool.m4 b/libtool.m4
index add2d4a..0e639dc 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -1372,32 +1372,27 @@ need_locks="$enable_libtool_lock"
# _LT_CMD_OLD_ARCHIVE
# -------------------
m4_defun([_LT_CMD_OLD_ARCHIVE],
-[plugin_option=
-plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
-for plugin in $plugin_names; do
- plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
- if test x$plugin_so = x$plugin; then
- plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
- fi
- if test x$plugin_so != x$plugin; then
- plugin_option="--plugin $plugin_so"
- break
- fi
-done
-
+[
+# Try CLANG_PLUGIN_FILE first since GCC_PLUGIN_OPTION may return the
+# wrong plugin_option with clang.
+CLANG_PLUGIN_FILE(plugin_file)
+if test -n "$plugin_file"; then
+ plugin_option="--plugin $plugin_file"
+else
+ GCC_PLUGIN_OPTION(plugin_option)
+fi
AC_CHECK_TOOL(AR, ar, false)
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
- if $AR --help 2>&1 | grep -q "\--plugin"; then
- touch conftest.c
- $AR $plugin_option rc conftest.a conftest.c
- if test "$?" != 0; then
- AC_MSG_WARN([Failed: $AR $plugin_option rc])
- else
+ case "$AR" in
+ *"$plugin_option"*)
+ ;;
+ *)
+ if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
- rm -f conftest.*
- fi
+ ;;
+ esac
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
_LT_DECL([], [AR], [1], [The archiver])
@@ -1410,9 +1405,15 @@ _LT_DECL([], [STRIP], [1], [A symbol stripping program])
AC_CHECK_TOOL(RANLIB, ranlib, :)
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
- if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
- RANLIB="$RANLIB $plugin_option"
- fi
+ case "$RANLIB" in
+ *"$plugin_option"*)
+ ;;
+ *)
+ if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+ RANLIB="$RANLIB $plugin_option"
+ fi
+ ;;
+ esac
fi
_LT_DECL([], [RANLIB], [1],
[Commands used to install an old-style archive])
diff --git a/zlib/Makefile.in b/zlib/Makefile.in
index 80fe3b6..23b5afe 100644
--- a/zlib/Makefile.in
+++ b/zlib/Makefile.in
@@ -93,8 +93,10 @@ target_triplet = @target@
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/cet.m4 \
+ $(top_srcdir)/../config/clang-plugin.m4 \
$(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/enable.m4 \
+ $(top_srcdir)/../config/gcc-plugin.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/override.m4 \
@@ -305,6 +307,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
+LLVM_CONFIG = @LLVM_CONFIG@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
diff --git a/zlib/aclocal.m4 b/zlib/aclocal.m4
index f3676e7..b8f66c5 100644
--- a/zlib/aclocal.m4
+++ b/zlib/aclocal.m4
@@ -1168,8 +1168,10 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([../config/cet.m4])
+m4_include([../config/clang-plugin.m4])
m4_include([../config/depstand.m4])
m4_include([../config/enable.m4])
+m4_include([../config/gcc-plugin.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/multi.m4])
m4_include([../config/override.m4])
diff --git a/zlib/configure b/zlib/configure
index 202c15f..9aae635 100755
--- a/zlib/configure
+++ b/zlib/configure
@@ -643,7 +643,6 @@ toolexeclibdir
toolexecdir
ENABLE_DARWIN_AT_RPATH_FALSE
ENABLE_DARWIN_AT_RPATH_TRUE
-CPP
OTOOL64
OTOOL
LIPO
@@ -651,6 +650,8 @@ NMEDIT
DSYMUTIL
RANLIB
AR
+LLVM_CONFIG
+CPP
OBJDUMP
LN_S
NM
@@ -1573,6 +1574,43 @@ fi
} # ac_fn_c_try_compile
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -1650,43 +1688,6 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_c_check_header_compile
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
# ac_fn_c_try_run LINENO
# ----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
@@ -2425,7 +2426,6 @@ test -n "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-
# This works around an automake problem.
mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"
@@ -5524,8 +5524,404 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
-plugin_option=
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Try CLANG_PLUGIN_FILE first since GCC_PLUGIN_OPTION may return the
+# wrong plugin_option with clang.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang" >&5
+$as_echo_n "checking for clang... " >&6; }
+if ${clang_cv_is_clang+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __clang__
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ clang_cv_is_clang=yes
+else
+ clang_cv_is_clang=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5
+$as_echo "$clang_cv_is_clang" >&6; }
+ plugin_file=
+ if test $clang_cv_is_clang = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5
+$as_echo_n "checking for clang plugin file... " >&6; }
+ plugin_names="LLVMgold.so"
+ for plugin in $plugin_names; do
+ plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin`
+ if test x$plugin_file = x$plugin; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LLVM_CONFIG"; then
+ ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LLVM_CONFIG="${ac_tool_prefix}llvm-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
+if test -n "$LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
+$as_echo "$LLVM_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LLVM_CONFIG"; then
+ ac_ct_LLVM_CONFIG=$LLVM_CONFIG
+ # Extract the first word of "llvm-config", so it can be a program name with args.
+set dummy llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LLVM_CONFIG"; then
+ ac_cv_prog_ac_ct_LLVM_CONFIG="$ac_ct_LLVM_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_LLVM_CONFIG="llvm-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LLVM_CONFIG=$ac_cv_prog_ac_ct_LLVM_CONFIG
+if test -n "$ac_ct_LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LLVM_CONFIG" >&5
+$as_echo "$ac_ct_LLVM_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LLVM_CONFIG" = x; then
+ LLVM_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LLVM_CONFIG=$ac_ct_LLVM_CONFIG
+ fi
+else
+ LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG"
+fi
+
+ if test "$?" != 0; then
+ as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5
+ fi
+ clang_lib_dir=`$LLVM_CONFIG --libdir`
+ if test -f $clang_lib_dir/$plugin; then
+ plugin_file=$clang_lib_dir/$plugin
+ fi
+ if test x$plugin_file != x$plugin; then
+ break;
+ fi
+ fi
+ done
+ if test -z $plugin_file; then
+ as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5
+ fi
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+ if test "${AR}" = "" ; then
+ as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5
+ fi
+ plugin_option="--plugin $plugin_file"
+ touch conftest.c
+ ${AR} $plugin_option rc conftest.a conftest.c
+ if test "$?" != 0; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
+$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
+ plugin_file=
+ fi
+ rm -f conftest.*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5
+$as_echo "$plugin_file" >&6; }
+ fi
+ plugin_file="$plugin_file"
+
+if test -n "$plugin_file"; then
+ plugin_option="--plugin $plugin_file"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5
+$as_echo_n "checking for -plugin option... " >&6; }
+
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+plugin_option=
for plugin in $plugin_names; do
plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
if test x$plugin_so = x$plugin; then
@@ -5536,7 +5932,119 @@ for plugin in $plugin_names; do
break
fi
done
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test "${AR}" = "" ; then
+ as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5
+fi
+touch conftest.c
+${AR} $plugin_option rc conftest.a conftest.c
+if test "$?" != 0; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
+$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
+ plugin_option=
+fi
+rm -f conftest.*
+if test -n "$plugin_option"; then
+ plugin_option="$plugin_option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5
+$as_echo "$plugin_option" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -5631,17 +6139,15 @@ fi
test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
- if $AR --help 2>&1 | grep -q "\--plugin"; then
- touch conftest.c
- $AR $plugin_option rc conftest.a conftest.c
- if test "$?" != 0; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
-$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
- else
+ case "$AR" in
+ *"$plugin_option"*)
+ ;;
+ *)
+ if $AR --help 2>&1 | grep -q "\--plugin"; then
AR="$AR $plugin_option"
fi
- rm -f conftest.*
- fi
+ ;;
+ esac
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru
@@ -5848,9 +6354,15 @@ fi
test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
- if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
- RANLIB="$RANLIB $plugin_option"
- fi
+ case "$RANLIB" in
+ *"$plugin_option"*)
+ ;;
+ *)
+ if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+ RANLIB="$RANLIB $plugin_option"
+ fi
+ ;;
+ esac
fi
@@ -7008,144 +7520,6 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
;;
esac
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
if ${ac_cv_header_stdc+:} false; then :
@@ -10854,7 +11228,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10857 "configure"
+#line 11231 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10960,7 +11334,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10963 "configure"
+#line 11337 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/zlib/configure.ac b/zlib/configure.ac
index 736b760..434bfcb 100644
--- a/zlib/configure.ac
+++ b/zlib/configure.ac
@@ -7,7 +7,7 @@ if test -n "${with_target_subdir}"; then
AM_ENABLE_MULTILIB(, ..)
fi
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
# This works around an automake problem.
mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"