tree: add to clobber_kind
commitde072b52292dc5218845904eee709c35a1418c3b
authorJason Merrill <jason@redhat.com>
Mon, 11 Dec 2023 16:35:31 +0000 (11 11:35 -0500)
committerJason Merrill <jason@redhat.com>
Tue, 12 Dec 2023 17:47:21 +0000 (12 12:47 -0500)
tree60041fe234d123a58da39eb7656367131dd7771c
parent321477fc3a0f8de18c4452f431309f896ae3a854
tree: add to clobber_kind

In discussion of PR71093 it came up that more clobber_kind options would be
useful within the C++ front-end.

gcc/ChangeLog:

* tree-core.h (enum clobber_kind): Rename CLOBBER_EOL to
CLOBBER_STORAGE_END.  Add CLOBBER_STORAGE_BEGIN,
CLOBBER_OBJECT_BEGIN, CLOBBER_OBJECT_END.
* gimple-lower-bitint.cc
* gimple-ssa-warn-access.cc
* gimplify.cc
* tree-inline.cc
* tree-ssa-ccp.cc: Adjust for rename.
* tree-pretty-print.cc: And handle new values.

gcc/cp/ChangeLog:

* call.cc (build_trivial_dtor_call): Use CLOBBER_OBJECT_END.
* decl.cc (build_clobber_this): Take clobber_kind argument.
(start_preparsed_function): Pass CLOBBER_OBJECT_BEGIN.
(begin_destructor_body): Pass CLOBBER_OBJECT_END.

gcc/testsuite/ChangeLog:

* gcc.dg/pr87052.c: Adjust expected CLOBBER output.

Co-authored-by: Nathaniel Shead <nathanieloshead@gmail.com>
gcc/cp/call.cc
gcc/cp/decl.cc
gcc/gimple-lower-bitint.cc
gcc/gimple-ssa-warn-access.cc
gcc/gimplify.cc
gcc/testsuite/gcc.dg/pr87052.c
gcc/tree-core.h
gcc/tree-inline.cc
gcc/tree-pretty-print.cc
gcc/tree-ssa-ccp.cc