Go to file
Martin Sebor 937a86b49e PR middle-end/83688 - check if buffers may overlap when copying strings using sprintf
gcc/ChangeLog:

	PR middle-end/83688
	* gimple-ssa-sprintf.c (format_result::alias_info): New struct.
	(directive::argno): New member.
	(format_result::aliases, format_result::alias_count): New data members.
	(format_result::append_alias): New member function.
	(fmtresult::dst_offset): New data member.
	(pass_sprintf_length::call_info::dst_origin): New data member.
	(pass_sprintf_length::call_info::dst_field, dst_offset): Same.
	(char_type_p, array_elt_at_offset, field_at_offset): New functions.
	(get_origin_and_offset): Same.
	(format_string): Call it.
	(format_directive): Call append_alias and set directive argument
	number.
	(maybe_warn_overlap): New function.
	(pass_sprintf_length::compute_format_length): Call it.
	(pass_sprintf_length::handle_gimple_call): Initialize new members.
	* gcc/tree-ssa-strlen.c (): Also enable when -Wrestrict is on.

gcc/testsuite/ChangeLog:

	PR tree-optimization/35503
	* gcc.dg/tree-ssa/builtin-sprintf-warn-23.c: New test.

From-SVN: r278098
2019-11-12 10:18:37 -07:00
config
contrib Make mklog more robust. 2019-11-08 08:39:17 +00:00
fixincludes
gcc PR middle-end/83688 - check if buffers may overlap when copying strings using sprintf 2019-11-12 10:18:37 -07:00
gnattools
gotools
include
INSTALL
intl
libada
libatomic
libbacktrace
libcc1
libcpp PR c++/91370 - Implement P1041R4 and P1139R2 - Stronger Unicode reqs 2019-11-07 21:24:38 +01:00
libdecnumber
libffi
libgcc Support 64-bit double and 64-bit long double configurations. 2019-11-07 09:19:31 +00:00
libgfortran PR fortran/92142 - CFI_setpointer corrupts descriptor 2019-11-11 11:18:14 +01:00
libgo libgo: fix DejaGNU testsuite compiler when using build sysroot 2019-11-11 23:28:54 +00:00
libgomp Add OpenACC 2.6 `serial' construct support 2019-11-12 08:45:35 +00:00
libhsail-rt
libiberty PR c++/91979 - mangling nullptr expression 2019-11-04 18:24:25 -05:00
libitm
libobjc
liboffloadmic
libphobos
libquadmath
libsanitizer Update LOCAL_PATCHES. 2019-11-07 09:34:42 +00:00
libssp
libstdc++-v3 Update link to "Why not LGPL". 2019-11-11 13:35:33 +00:00
libvtv
lto-plugin
maintainer-scripts crontab: Disable snapshots from gcc-7-branch. 2019-11-05 07:58:51 +00:00
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Bump minimum MPFR version to 3.1.0 2019-11-11 17:59:48 +02:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure Bump minimum MPFR version to 3.1.0 2019-11-11 17:59:48 +02:00
configure.ac Bump minimum MPFR version to 3.1.0 2019-11-11 17:59:48 +02: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
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.