diff options
Diffstat (limited to 'ld/testsuite/ld-plugin/pr12758b.c')
-rw-r--r-- | ld/testsuite/ld-plugin/pr12758b.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ld/testsuite/ld-plugin/pr12758b.c b/ld/testsuite/ld-plugin/pr12758b.c new file mode 100644 index 00000000000..5bcf116bc9c --- /dev/null +++ b/ld/testsuite/ld-plugin/pr12758b.c @@ -0,0 +1,12 @@ +#include <string.h> + +int memcmp(const void *cs, const void *ct, size_t count) +{ + const unsigned char *su1, *su2; + int res = 0; + + for (su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--) + if ((res = *su1 - *su2) != 0) + break; + return res; +} |