aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/simplify.c
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2018-10-30 21:58:35 +0000
committerMartin Sebor <msebor@gcc.gnu.org>2018-10-30 15:58:35 -0600
commit91e3ec29af2b20d26a97b4b80c88eac9ad95e011 (patch)
treed20422e7e859155af3641fb4809c1ccabcd62586 /gcc/fortran/simplify.c
parent448af20a27c9a1706712eba8500f5f81f5f6a46d (diff)
downloadgcc-91e3ec29af2b20d26a97b4b80c88eac9ad95e011.zip
gcc-91e3ec29af2b20d26a97b4b80c88eac9ad95e011.tar.gz
gcc-91e3ec29af2b20d26a97b4b80c88eac9ad95e011.tar.bz2
PR middle-end/87041 - -Wformat reading through null pointer on unreachable code
gcc/ChangeLog: PR middle-end/87041 * gimple-ssa-sprintf.c (format_directive): Use %G to include inlining context. (sprintf_dom_walker::compute_format_length): Avoid setting POSUNDER4K here. (get_destination_size): Handle null argument values. (get_user_idx_format): New function. (sprintf_dom_walker::handle_gimple_call): Handle all printf-like functions, including user-defined with attribute format printf. Use %G to include inlining context. Set POSUNDER4K here. gcc/c-family/ChangeLog: PR middle-end/87041 * c-format.c (check_format_types): Avoid diagnosing null pointer arguments to printf-family of functions. gcc/testsuite/ChangeLog: PR middle-end/87041 * gcc.c-torture/execute/fprintf-2.c: New test. * gcc.c-torture/execute/printf-2.c: Same. * gcc.c-torture/execute/user-printf.c: Same. * gcc.dg/tree-ssa/builtin-fprintf-warn-1.c: Same. * gcc.dg/tree-ssa/builtin-printf-2.c: Same. * gcc.dg/tree-ssa/builtin-printf-warn-1.c: Same. * gcc.dg/tree-ssa/user-printf-warn-1.c: Same. From-SVN: r265648
Diffstat (limited to 'gcc/fortran/simplify.c')
0 files changed, 0 insertions, 0 deletions