Go to file
Patrick Palka cf59c8983e c++: get_nsdmi in template context [PR108116]
Here during ahead of time checking of C{}, we indirectly call get_nsdmi
for C::m from finish_compound_literal, which in turn calls
break_out_target_exprs for C::m's (non-templated) initializer, during
which we build a call to A::~A and check expr_noexcept_p for it (from
build_vec_delete_1).  But this is all done with processing_template_decl
set, so the built A::~A call is templated (whose form was recently
changed by r12-6897-gdec8d0e5fa00ceb2) which expr_noexcept_p doesn't
expect, and we crash.

This patch fixes this by clearing processing_template_decl before
the call to break_out_target_exprs from get_nsdmi.  And since it more
generally seems we shouldn't be seeing (or producing) non-templated
trees in break_out_target_exprs, this patch also adds an assert to
that effect.

	PR c++/108116

gcc/cp/ChangeLog:

	* constexpr.cc (maybe_constant_value): Clear
	processing_template_decl before calling break_out_target_exprs.
	* init.cc (get_nsdmi): Likewise.
	* tree.cc (break_out_target_exprs): Assert processing_template_decl
	is cleared.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/nsdmi-template24.C: New test.
2022-12-23 11:17:45 -05:00
c++tools
config
contrib contrib: Add dg-out-generator.pl 2022-12-22 19:44:07 -05:00
fixincludes
gcc c++: get_nsdmi in template context [PR108116] 2022-12-23 11:17:45 -05:00
gnattools
gotools
include Daily bump. 2022-12-22 00:17:29 +00:00
INSTALL
intl
libada
libatomic
libbacktrace Daily bump. 2022-12-18 00:16:57 +00:00
libcc1
libcody
libcpp
libdecnumber
libffi Daily bump. 2022-12-22 00:17:29 +00:00
libgcc Daily bump. 2022-12-17 00:17:56 +00:00
libgfortran Daily bump. 2022-12-16 00:17:46 +00:00
libgm2
libgo libgo: check for makecontext in -lucontext 2022-12-20 19:34:55 -08:00
libgomp Daily bump. 2022-12-22 00:17:29 +00:00
libiberty
libitm
libobjc
libphobos
libquadmath
libsanitizer Daily bump. 2022-12-20 00:17:00 +00:00
libssp
libstdc++-v3 libstdc++: Fix Darwin bootstrap error in src/c++20/tzdb.cc 2022-12-23 13:45:30 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2022-12-22 00:17:29 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure [PATCH] Use toplevel configure for GMP and MPFR for gdb 2022-12-21 17:18:53 +00:00
configure.ac [PATCH] Use toplevel configure for GMP and MPFR for gdb 2022-12-21 17:18:53 +00:00
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 [PATCH] Use toplevel configure for GMP and MPFR for gdb 2022-12-21 17:18:53 +00:00
Makefile.in [PATCH] Use toplevel configure for GMP and MPFR for gdb 2022-12-21 17:18:53 +00:00
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.