Hi!
This function accesses arguments of builtin call without checking
the right arguments are actually provided. Fixed thusly,
bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
The is_gimple_call in there is meant as a performance thing, we could
call gimple_call_builtin_p first and then only check
gimple_call_with_bounds_p, but that would unnecessarily test compatibility
of arguments even for calls without bounds.
2017-02-21 Jakub Jelinek <jakub@redhat.com>
PR target/79633
* tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
Use gimple_call_builtin_p.
* gcc.target/i386/mpx/pr79633.c: New test.