Go to file
Jakub Jelinek 81958cd6ad c++: Fix ICE during constexpr virtual call evaluation [PR93633]
The first (valid) testcase ICEs because for
  A *a = new B ();
  a->foo (); // virtual method call
we actually see &heap  and the "heap " objects don't have the class or
whatever else type was used in new expression, but an array type containing
one (or more of those for array new) and so when using TYPE_BINFO (objtype)
on it we ICE.
This patch handles this special case, and otherwise punts (as shown e.g. in
the second testcase, where because the heap object is already deleted,
we don't really want to allow it to be used.

2020-02-09  Jakub Jelinek  <jakub@redhat.com>

	PR c++/93633
	* constexpr.c (cxx_eval_constant_expression): If obj is heap var with
	ARRAY_TYPE, use the element type.  Punt if objtype after that is not
	a class type.

	* g++.dg/cpp2a/constexpr-new11.C: New test.
	* g++.dg/cpp2a/constexpr-new12.C: New test.
	* g++.dg/cpp2a/constexpr-new13.C: New test.
2020-02-09 12:32:22 +01:00
config
contrib
fixincludes
gcc c++: Fix ICE during constexpr virtual call evaluation [PR93633] 2020-02-09 12:32:22 +01:00
gnattools
gotools
include libiberty/hashtab: More const parameters 2020-02-05 13:01:06 +00:00
INSTALL
intl
libada
libatomic
libbacktrace libbacktrace: always pass -g when compiling test code 2020-02-03 18:13:28 -08:00
libcc1
libcpp Regenerate .pot files. 2020-02-07 22:35:59 +00:00
libdecnumber
libffi
libgcc arm: Fix up arm installed unwind.h for use in pedantic modes [PR93615] 2020-02-07 11:01:14 +01:00
libgfortran
libgo syscall: fix riscv64 GNU/Linux build 2020-02-03 18:14:19 -08:00
libgomp openmp: Optimize DECL_IN_CONSTANT_POOL vars in target regions 2020-02-09 08:17:10 +01:00
libhsail-rt
libiberty libiberty/hashtab: More const parameters 2020-02-05 13:01:06 +00:00
libitm
libobjc
liboffloadmic
libphobos
libquadmath
libsanitizer
libssp
libstdc++-v3 libstdc++: Implement P1878R1 "Constraining Readable Types" 2020-02-07 16:58:43 +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.