aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-manip.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-03-24 09:33:17 +0100
committerJakub Jelinek <jakub@redhat.com>2020-03-24 09:33:17 +0100
commit047811579f09048ed538674fd5251b35e5a92025 (patch)
treebac35c8aefea3535b343e6c82f465d2772a46401 /gcc/tree-ssa-loop-manip.c
parent75c24a08d697d6442fe6c26142f0559f803af977 (diff)
downloadgcc-047811579f09048ed538674fd5251b35e5a92025.zip
gcc-047811579f09048ed538674fd5251b35e5a92025.tar.gz
gcc-047811579f09048ed538674fd5251b35e5a92025.tar.bz2
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.
Diffstat (limited to 'gcc/tree-ssa-loop-manip.c')
0 files changed, 0 insertions, 0 deletions