re PR tree-optimization/89566 (ICE on compilable C++ code: in gimple_call_arg, at...
authorJakub Jelinek <jakub@redhat.com>
Tue, 5 Mar 2019 08:43:16 +0000 (09:43 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 5 Mar 2019 08:43:16 +0000 (09:43 +0100)
commitd6f7829a1fa2577bac1bd8815acd31730affcb92
tree8002b8c05a197626eed6b4dcc4b741aa9980a0ed
parentda7382442e127e54ba65edeab4d9444e786ffd73
re PR tree-optimization/89566 (ICE on compilable C++ code: in gimple_call_arg, at gimple.h:3166)

PR tree-optimization/89566
* gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call):
Set info.fncode to BUILT_IN_NONE if gimple_call_builtin_p failed.
Punt if get_user_idx_format succeeds, but idx_format argument is
not provided or doesn't have pointer type, or if idx_args is above
number of provided arguments.

* c-c++-common/pr89566.c: New test.

From-SVN: r269384
gcc/ChangeLog
gcc/gimple-ssa-sprintf.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/pr89566.c [new file with mode: 0644]