Go to file
Jonathan Wakely 258bd1d63a PR libstdc++/89130 restore support for non-MoveConstructible types
The changes to "relocate" std::vector elements can lead to new errors
outside the immediate context, because moving the elements to new
storage no longer makes use of the move-if-noexcept utilities. This
means that types with deleted moves no longer degenerate to copies, but
are just ill-formed. The errors happen while instantiating the
noexcept-specifier for __relocate_object_a, when deciding whether to try
to relocate.

This patch introduces indirections to avoid the ill-formed
instantiations of std::__relocate_object_a. In order to avoid using
if-constexpr prior to C++17 this is done by tag dispatching. After this
patch all uses of std::__relocate_a are guarded by checks that will
support sensible code (i.e. code not using custom allocators that fool
the new checks).

	PR libstdc++/89130
	* include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
	__is_alloc_insertable_impl. Replace single type member with two
	members, one for each of copy and move insertable.
	(__is_move_insertable): New trait for internal use.
	* include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
	(vector::_S_nothrow_relocate(true_type)): New functions to
	conditionally check if __relocate_a can throw.
	(vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
	on __is_move_insertable.
	(vector::_S_do_relocate): New overloaded functions to conditionally
	call __relocate_a.
	(vector::_S_relocate): New function that dispatches to _S_do_relocate
	based on _S_use_relocate.
	* include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
	(vector::_M_default_append): Call _S_relocate instead of __relocate_a.
	* testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.

From-SVN: r268537
2019-02-05 14:45:00 +00:00
INSTALL
config
contrib contrib/dg-extract-results: Handle timeout warnings 2019-02-04 09:55:00 +01:00
fixincludes
gcc GCOV: remove misleading branches and calls info for -f option (PR gcov-profile/89000). 2019-02-05 12:17:45 +00:00
gnattools
gotools Makefile.in: Really regenerate. 2019-01-28 23:14:19 +01:00
include PR other/16615 [2/5] 2019-01-09 16:39:49 -05:00
intl
libada Update copyright years. 2019-01-01 13:31:55 +01:00
libatomic Update copyright years. 2019-01-01 13:31:55 +01:00
libbacktrace [libbacktrace] Fix .gnu_debugaltlink build-id check 2019-01-31 12:17:32 +00:00
libcc1 Update copyright years. 2019-01-01 13:31:55 +01:00
libcpp Regenerate .pot files. 2019-02-01 23:04:22 +00:00
libdecnumber Update copyright years. 2019-01-01 13:31:55 +01:00
libffi
libgcc t-linux: Add -mfp-rounding-mode=d to HOST_LIBGCC2_CFLAGS. 2019-01-31 21:49:02 +01:00
libgfortran * libgfortran/ChangeLog: Better commit message for my last commit. 2019-01-31 23:59:36 +01:00
libgo runtime: add hurd netpoll and semaphore support 2019-02-01 23:57:08 +00:00
libgomp re PR c++/88988 (ICE: Segmentation fault (in lookup_name_real_1)) 2019-01-31 00:28:53 +01:00
libhsail-rt Update copyright years. 2019-01-01 13:31:55 +01:00
libiberty re PR lto/88422 (collect2.exe: fatal error: lto-wrapper returned 1 exit status: file not recognized: file truncated) 2019-01-22 09:47:52 +00:00
libitm Update copyright years. 2019-01-01 13:31:55 +01:00
libobjc PR other/16615 [4/5] 2019-01-09 16:44:56 -05:00
liboffloadmic PR other/16615 [1/5] 2019-01-09 16:37:45 -05:00
libphobos libphobos: Merge phobos and druntime with upstream. 2019-01-26 13:41:26 +00:00
libquadmath Update copyright years. 2019-01-01 13:31:55 +01:00
libsanitizer re PR sanitizer/89010 (Update URLs in libsanitizer/README.gcc) 2019-01-23 14:18:50 +01:00
libssp Update copyright years. 2019-01-01 13:31:55 +01:00
libstdc++-v3 PR libstdc++/89130 restore support for non-MoveConstructible types 2019-02-05 14:45:00 +00:00
libvtv Update copyright years. 2019-01-01 13:31:55 +01:00
lto-plugin Update copyright years. 2019-01-01 13:31:55 +01:00
maintainer-scripts
zlib Makefile.am (noinst_LTLIBRARIES): Rename libzgcj_convience.la to libz_convenience.la. 2019-01-21 17:23:58 +00:00
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog Add myself to MAINTAINERS 2019-01-26 20:12:45 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
MAINTAINERS Add myself to MAINTAINERS 2019-01-26 20:12:45 +00:00
Makefile.def
Makefile.in Lower sampling rate for autofdo bootstrap 2019-01-15 03:49:45 +00:00
Makefile.tpl Lower sampling rate for autofdo bootstrap 2019-01-15 03:49:45 +00:00
README
ar-lib
compile
config-ml.in
config.guess Update config.guess, config.sub (PR target/88535) 2019-01-03 11:28:27 +00:00
config.rpath
config.sub Update config.guess, config.sub (PR target/88535) 2019-01-03 11:28:27 +00:00
configure GCN back-end config 2019-01-17 12:34:28 +00:00
configure.ac GCN back-end config 2019-01-17 12:34:28 +00:00
depcomp
install-sh
libtool-ldflags
libtool.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
symlink-tree
test-driver
ylwrap

README

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.