On 12/11/2017 03:54 PM, Martin Sebor wrote: > The attr-nonstring-3.c test fails on targets that expand > the calls to some of the tested string functions in builtins.c, > before they reach the checker in calls.c. The failures were > reported on powrrpc64le but tests can be constructed that fail > even on other targets (including x86_64). > > To fix these failures the checker needs to be invoked both > in builtins.c when the expansion takes place and in calls.c > otherwise. > > The attached patch does that. Since it also adjusts > the indentation in the changed functions, I used diff -w > to leave the whitespace changes out of it. > > Bootstrapped and tested on x86_64-linux. I verified the tests > pass using a powerpc64le-linux cross-compiler. > > Martin > > gcc-83131.diff-w > > > PR testsuite/83131 - c-c++/common/attr-nonstring-3 failure for strcmp tests > on PowerPC > > gcc/ChangeLog: > > PR testsuite/83131 > * builtins.c (expand_builtin_strlen): Use get_callee_fndecl. > (expand_builtin_strcmp): Call maybe_warn_nonstring_arg. > (expand_builtin_strncmp): Same. > > gcc/testsuite/ChangeLog: > > PR testsuite/83131 > * c-c++-common/attr-nonstring-4.c: New test. OK. Thanks for the -w output, it certainly makes this one easier to read.
jeff