re PR c++/83045 (-Wreturn-type regression in C++)
authorJakub Jelinek <jakub@gcc.gnu.org>
Tue, 21 Nov 2017 17:40:34 +0000 (18:40 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 21 Nov 2017 17:40:34 +0000 (18:40 +0100)
commit826eccc6fd8bebfafa3ac02d9755bb2e59f465b7
tree39a19feeb4e8a2c41e98c603252802db36730aeb
parent8fccb0a6b606aacc1bcb3e02b400c5d6455196cc
re PR c++/83045 (-Wreturn-type regression in C++)

PR c++/83045
* tree-cfg.c (pass_warn_function_return::execute): Formatting fix.
Also warn if seen __builtin_unreachable () call with BUILTINS_LOCATION.
Use LOCATION_LOCUS when comparing against UNKNOWN_LOCATION.

* c-c++-common/pr61405.c (fn0, fn1): Add return stmts.
* c-c++-common/Wlogical-op-2.c (fn): Likewise.
* g++.dg/debug/pr53466.C: Add -Wno-return-type to dg-options.
* g++.dg/opt/combine.C: Likewise.
* g++.dg/ubsan/return-3.C: Likewise.
* g++.dg/pr59445.C: Likewise.
* g++.dg/pr49847.C: Likewise.
* g++.dg/ipa/pr61800.C: Likewise.
* g++.dg/ipa/pr63470.C: Likewise.
* g++.dg/ipa/pr68672-1.C: Likewise.
* g++.dg/pr58438.C: Likewise.
* g++.dg/torture/pr59265.C: Likewise.
* g++.dg/tree-ssa/ssa-dse-2.C: Likewise.
* g++.old-deja/g++.eh/catch13.C: Likewise.
* g++.old-deja/g++.eh/crash1.C: Likewise.
* g++.dg/tm/pr60004.C: Expect -Wreturn-type warning.
* g++.dg/torture/pr55740.C: Likewise.
* g++.dg/torture/pr43257.C: Likewise.
* g++.dg/torture/pr64280.C: Likewise.
* g++.dg/torture/pr54684.C: Likewise.
* g++.dg/torture/pr56694.C: Likewise.
* g++.dg/torture/pr68470.C: Likewise.
* g++.dg/torture/pr60648.C: Likewise.
* g++.dg/torture/pr71281.C: Likewise.
* g++.dg/torture/pr52772.C: Add -Wno-return-type dg-additional-options.
* g++.dg/torture/pr64669.C: Likewise.
* g++.dg/torture/pr58369.C: Likewise.
* g++.dg/torture/pr33627.C: Likewise.
* g++.dg/torture/predcom-1.C: Add
#pragma GCC diagnostic ignored "-Wreturn-type".
* g++.dg/lto/20090221_0.C: Likewise.
* g++.dg/lto/20091026-1_1.C: Likewise.
* g++.dg/lto/pr54625-1_1.C: Likewise.
* g++.dg/warn/pr83045.C: New test.

From-SVN: r255018
36 files changed:
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wlogical-op-2.c
gcc/testsuite/c-c++-common/pr61405.c
gcc/testsuite/g++.dg/debug/pr53466.C
gcc/testsuite/g++.dg/ipa/pr61800.C
gcc/testsuite/g++.dg/ipa/pr63470.C
gcc/testsuite/g++.dg/ipa/pr68672-1.C
gcc/testsuite/g++.dg/lto/20090221_0.C
gcc/testsuite/g++.dg/lto/20091026-1_1.C
gcc/testsuite/g++.dg/lto/pr54625-1_1.C
gcc/testsuite/g++.dg/opt/combine.C
gcc/testsuite/g++.dg/pr49847.C
gcc/testsuite/g++.dg/pr58438.C
gcc/testsuite/g++.dg/pr59445.C
gcc/testsuite/g++.dg/tm/pr60004.C
gcc/testsuite/g++.dg/torture/pr33627.C
gcc/testsuite/g++.dg/torture/pr43257.C
gcc/testsuite/g++.dg/torture/pr52772.C
gcc/testsuite/g++.dg/torture/pr54684.C
gcc/testsuite/g++.dg/torture/pr55740.C
gcc/testsuite/g++.dg/torture/pr56694.C
gcc/testsuite/g++.dg/torture/pr58369.C
gcc/testsuite/g++.dg/torture/pr59265.C
gcc/testsuite/g++.dg/torture/pr60648.C
gcc/testsuite/g++.dg/torture/pr64280.C
gcc/testsuite/g++.dg/torture/pr64669.C
gcc/testsuite/g++.dg/torture/pr68470.C
gcc/testsuite/g++.dg/torture/pr71281.C
gcc/testsuite/g++.dg/torture/predcom-1.C
gcc/testsuite/g++.dg/tree-ssa/ssa-dse-2.C
gcc/testsuite/g++.dg/ubsan/return-3.C
gcc/testsuite/g++.dg/warn/pr83045.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.eh/catch13.C
gcc/testsuite/g++.old-deja/g++.eh/crash1.C
gcc/tree-cfg.c