re PR sanitizer/81212 (-Wreturn-type is disabled when used together with -fsanitize...
authorJakub Jelinek <jakub@redhat.com>
Sat, 2 Dec 2017 07:57:04 +0000 (08:57 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 2 Dec 2017 07:57:04 +0000 (08:57 +0100)
commit38651b523d2df78a62489911e1c0036847c116bd
treea6a292ec23bf2fe057bf4eb6a51b0cffc2b86ed9
parente034c5c895722e0092d2239cd8c2991db77d6d39
re PR sanitizer/81212 (-Wreturn-type is disabled when used together with -fsanitize=return)

PR c++/81212
* tree-cfg.c (pass_warn_function_return::execute): Handle
__builtin_ubsan_handle_missing_return like __builtin_unreachable
with BUILTINS_LOCATION.

* g++.dg/ubsan/pr81212.C: New test.
* g++.dg/ubsan/return-1.C: Add -Wno-return-type to dg-options.
* g++.dg/ubsan/return-2.C: Likewise.
* g++.dg/ubsan/return-7.C: Likewise.

From-SVN: r255354
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ubsan/pr81212.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ubsan/return-1.C
gcc/testsuite/g++.dg/ubsan/return-2.C
gcc/testsuite/g++.dg/ubsan/return-7.C
gcc/tree-cfg.c