Go to file
Patrick Palka 66de517b1c c++: placeholder type constraint in structured binding [PR99899]
In this PR, we're crashing because the constraint handling inside
do_auto_deduction doesn't expect to see an adc_decomp_type context.
This patch fixes this by treating adc_decomp_type like adc_variable_type
or adc_return_type during placeholder type constraint checking.

Meanwhile, I noticed we weren't checking constraints at all when binding
an array via a structured binding, since do_auto_deduction would exit
early and bypass the constraint check.  This patch fixes this by
replacing the early exit with an appropriate setup of the 'targs'
vector.

gcc/cp/ChangeLog:

	PR c++/99899
	* pt.c (do_auto_deduction): Don't exit early when deducing the
	array type of a structured binding.  Also handle adc_decomp_type
	during constraint checking.

gcc/testsuite/ChangeLog:

	PR c++/99899
	* g++.dg/cpp2a/concepts-placeholder7.C: New test.
	* g++.dg/cpp2a/concepts-placeholder8.C: New test.
2021-04-05 23:35:56 -04:00
c++tools Daily bump. 2021-04-02 00:16:26 +00:00
config
contrib
fixincludes
gcc c++: placeholder type constraint in structured binding [PR99899] 2021-04-05 23:35:56 -04:00
gnattools
gotools
include Daily bump. 2021-04-01 00:16:39 +00:00
INSTALL
intl
libada
libatomic
libbacktrace
libcc1
libcody
libcpp
libdecnumber
libffi
libgcc Daily bump. 2021-04-06 00:16:43 +00:00
libgfortran
libgo
libgomp
libhsail-rt
libiberty Daily bump. 2021-04-01 00:16:39 +00:00
libitm
libobjc
liboffloadmic
libphobos Daily bump. 2021-04-04 00:16:26 +00:00
libquadmath
libsanitizer
libssp
libstdc++-v3 Daily bump. 2021-04-01 00:16:39 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.