diff options
author | Martin Sebor <msebor@redhat.com> | 2019-07-09 04:15:42 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2019-07-08 22:15:42 -0600 |
commit | aac9480da1ffd037ceb21790fe341b3ec23283d9 (patch) | |
tree | 4951dd2f7b63d615f0746cec0cc0235637d4b588 /libgcc | |
parent | 7d64aec499687f593a1bab4ae7cac843bc1d47af (diff) | |
download | gcc-aac9480da1ffd037ceb21790fe341b3ec23283d9.zip gcc-aac9480da1ffd037ceb21790fe341b3ec23283d9.tar.gz gcc-aac9480da1ffd037ceb21790fe341b3ec23283d9.tar.bz2 |
PR middle-end/71924 - missing -Wreturn-local-addr returning alloca result
PR middle-end/71924 - missing -Wreturn-local-addr returning alloca result
PR middle-end/90549 - missing -Wreturn-local-addr maybe returning an address of a local array plus offset
gcc/ChangeLog:
PR middle-end/71924
PR middle-end/90549
* gimple-ssa-isolate-paths.c (isolate_path): Add attribute. Update
comment.
(args_loc_t): New type.
(args_loc_t, locmap_t): same.
(diag_returned_locals): New function.
(is_addr_local): Same.
(handle_return_addr_local_phi_arg, warn_return_addr_local): Same.
(find_implicit_erroneous_behavior): Call warn_return_addr_local_phi_arg.
(find_explicit_erroneous_behavior): Call warn_return_addr_local.
gcc/testsuite/ChangeLog:
PR middle-end/71924
PR middle-end/90549
* gcc.c-torture/execute/return-addr.c: New test.
* gcc.dg/Wreturn-local-addr-2.c: New test.
* gcc.dg/Wreturn-local-addr-4.c: New test.
* gcc.dg/Wreturn-local-addr-5.c: New test.
* gcc.dg/Wreturn-local-addr-6.c: New test.
* gcc.dg/Wreturn-local-addr-7.c: New test.
* gcc.dg/Wreturn-local-addr-8.c: New test.
* gcc.dg/Wreturn-local-addr-9.c: New test.
* gcc.dg/Wreturn-local-addr-10.c: New test.
* gcc.dg/Walloca-4.c: Handle expected warnings.
* gcc.dg/pr41551.c: Same.
* gcc.dg/pr59523.c: Same.
* gcc.dg/tree-ssa/pr88775-2.c: Same.
* gcc.dg/tree-ssa/alias-37.c: Same.
* gcc.dg/winline-7.c: Same.
From-SVN: r273261
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/generic-morestack.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libgcc/generic-morestack.c b/libgcc/generic-morestack.c index 0f6f000..2dc3733 100644 --- a/libgcc/generic-morestack.c +++ b/libgcc/generic-morestack.c @@ -23,6 +23,8 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ +#pragma GCC optimize ("no-isolate-erroneous-paths-dereference") + /* powerpc 32-bit not supported. */ #if !defined __powerpc__ || defined __powerpc64__ |