Go to file
Jakub Jelinek 4ac9ab60f0 cgraphunit: Avoid code generation differences based on -w/TREE_NO_WARNING [PR94277]
The following testcase FAILs with -fcompare-debug, but not because -g vs.
-g0 would make a difference, but because the second compilation is done with
-w in order not to emit warnings twice and -w seems to affect the *.gkd dump
content.
This is because TREE_NO_WARNING flag, or warn_unused_function does affect
not just whether a warning/pedwarn is printed, but also whether we set
TREE_PUBLIC on such decls.
The following patch makes sure we set it regardless of anything warning
related (TREE_NO_WARNING or warn_unused_function).

2020-03-24  Jakub Jelinek  <jakub@redhat.com>

	PR debug/94277
	* cgraphunit.c (check_global_declaration): For DECL_EXTERNAL and
	non-TREE_PUBLIC non-DECL_ARTIFICIAL FUNCTION_DECLs, set TREE_PUBLIC
	regardless of whether TREE_NO_WARNING is set on it or whether
	warn_unused_function is true or not.

	* gcc.dg/pr94277.c: New test.
2020-04-07 20:55:11 +02:00
config Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
contrib Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
fixincludes Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
gcc cgraphunit: Avoid code generation differences based on -w/TREE_NO_WARNING [PR94277] 2020-04-07 20:55:11 +02:00
gnattools Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
gotools Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
include Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
INSTALL
intl Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libada Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libatomic Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libbacktrace Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libcc1 Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libcpp Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libdecnumber Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libffi Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libgcc aarch64: Configure for sys/auxv.h in libgcc for lse-init.c 2020-04-01 12:13:39 +01:00
libgfortran Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libgo
libgomp c++: Fix up handling of captured vars in lambdas in OpenMP clauses [PR93931] 2020-04-07 20:55:10 +02:00
libhsail-rt Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libiberty Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libitm Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libobjc Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
liboffloadmic Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libphobos Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libquadmath Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libsanitizer Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libssp Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
libstdc++-v3 libstdc++: Fix std::to_address for debug iterators (PR 93960) 2020-04-03 12:00:07 +01:00
libvtv Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
lto-plugin Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
maintainer-scripts maintainer-scripts: Fix up gcc_release without -l, where mkdir was using umask 077 after migration 2020-03-17 18:21:24 +01:00
zlib Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Update ChangeLog and version files for release 2020-03-12 11:08:05 +00:00
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.