On 12/19/2016 08:02 PM, Aaron Sawdey wrote:
This patch adds tests gcc.dg/memcmp-1.c and gcc.dg/strncmp-1.c that
test builtin expansion of memcmp and strncmp for short strings and also
varying alignment of one arg. The strncmp test checks that things work
when one of the strings crosses a 4k boundary as well.

I've included interested parties from targets that have a strncmp
builtin.

The tests pass on ppc64le and x86_64. OK for trunk?
I think the tests need to be restricted to ports with 32bit or larger pointers -- they're likely to overflow the address space on the small embedded targets.

Adding this ought to do the trick:

/* { dg-require-effective-target ptr32plus } */

I'd drop the printfs as long as doing so does not compromise the tests.

And you need a ChangeLog.

OK with those fixes.

Jeff


Reply via email to