PR tree-optimization/86650 - -Warray-bounds missing inlining context
commita2e93b74a8f9e122be92da96512fc7ecd22a84d7
authormsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Aug 2018 23:39:35 +0000 (1 23:39 +0000)
committermsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Aug 2018 23:39:35 +0000 (1 23:39 +0000)
tree26db1a736bc6394312b1820c7cdecd89d3a75fdf
parent572fe631b38261417313c73159fcd1df6b072724
PR tree-optimization/86650 - -Warray-bounds missing inlining context

gcc/c/ChangeLog:

PR tree-optimization/86650
* c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
and TREE_BLOCK (t) from within percent_K_format to this callsite.

gcc/c-family/ChangeLog:

PR tree-optimization/86650
* c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
(gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
  (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
  * c-format.h (T89_G): Update to be "gimple *" rather than
  "gcall *".
(local_gcall_ptr_node): Rename...
  (local_gimple_ptr_node): ...to this.

gcc/cp/ChangeLog:

PR tree-optimization/86650
* error.c (cp_printer): Move usage of EXPR_LOCATION (t) and
TREE_BLOCK (t) from within percent_K_format to this callsite.

gcc/ChangeLog:

PR tree-optimization/86650
* gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
rather than a "gcall *".  Directly pass the data of interest
  to percent_K_format, rather than building a temporary CALL_EXPR
  to hold it.
* gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
(gimple_fold_builtin_strncat): Adjust.
* gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
gcall* argument with gimple*.
* gimple-ssa-warn-restrict.c (check_call): Same.
(wrestrict_dom_walker::before_dom_children): Same.
(builtin_access::builtin_access): Same.
(check_bounds_or_overlap): Same
(maybe_diag_overlap): Same.
(maybe_diag_offset_bounds): Same.
* tree-diagnostic.c (default_tree_printer): Move usage of
EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
to this callsite.
* tree-pretty-print.c (percent_K_format): Add argument.
* tree-pretty-print.h: Add argument.
* tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
(maybe_diag_stxncpy_trunc): Same.
(handle_builtin_stxncpy): Same.
(handle_builtin_strcat): Same.

gcc/testsuite/ChangeLog:

PR tree-optimization/86650
* gcc.dg/format/gcc_diag-10.c: Adjust.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263239 138bc75d-0d04-0410-961f-82ee72b054a4
19 files changed:
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-format.c
gcc/c-family/c-format.h
gcc/c/ChangeLog
gcc/c/c-objc-common.c
gcc/cp/ChangeLog
gcc/cp/error.c
gcc/gimple-fold.c
gcc/gimple-pretty-print.c
gcc/gimple-ssa-warn-restrict.c
gcc/gimple-ssa-warn-restrict.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/format/gcc_diag-10.c
gcc/tree-diagnostic.c
gcc/tree-pretty-print.c
gcc/tree-pretty-print.h
gcc/tree-ssa-ccp.c
gcc/tree-ssa-strlen.c