On 8/9/24 6:58 AM, Surya Kumari Jangala wrote:
> I am looking into this failure.
Also note that it appears that this change is causing either an infinite
loop or severe compile-time regression for Wrestrict.
Build a cross for xstormy16-elf. You don't need a full toolchain, just
compiler should be enough to see the before/after compile time behavior.
I've attached the cpp output so you don't need any header files.
Compile the attached code with -O2. It should complete in a second or
less, it seems to be in an infinite loop in LRA.
Jeff
# 0 "j.c"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "j.c"
# 1 "range.h" 1
# 11 "range.h"
typedef long int int32_t;
typedef int ptrdiff_t;
typedef unsigned int size_t;
static inline ptrdiff_t signed_value (void)
{
extern volatile ptrdiff_t signed_value_source;
return signed_value_source;
}
static inline size_t unsigned_value (void)
{
extern volatile size_t unsigned_value_source;
return unsigned_value_source;
}
static inline ptrdiff_t signed_range (ptrdiff_t min, ptrdiff_t max)
{
ptrdiff_t val = signed_value ();
return val < min || max < val ? min : val;
}
static inline ptrdiff_t signed_anti_range (ptrdiff_t min, ptrdiff_t max)
{
ptrdiff_t val = signed_value ();
return min <= val && val <= max ? min == (-0x7fff - 1) ? max + 1 : min - 1 : val;
}
static inline size_t unsigned_range (size_t min, size_t max)
{
size_t val = unsigned_value ();
return val < min || max < val ? min : val;
}
static inline size_t unsigned_anti_range (size_t min, size_t max)
{
size_t val = unsigned_value ();
return min <= val && val <= max ? min == 0 ? max + 1 : min - 1 : val;
}
# 6 "j.c" 2
# 16 "j.c"
extern void* memcpy (void* restrict, const void* restrict, size_t);
extern void* mempcpy (void* restrict, const void* restrict, size_t);
extern void* memmove (void*, const void*, size_t);
extern char* stpcpy (char* restrict, const char* restrict);
extern char* strcat (char* restrict, const char* restrict);
extern char* strcpy (char* restrict, const char* restrict);
extern char* strncpy (char* restrict, const char* restrict, size_t);
void sink (void*, ...);
struct MemArrays
{
char a8[8];
char a16[16];
char ax[];
};
void test_memcpy_cst (void *d, const void *s)
{
# 54 "j.c"
do { if (!0 || 0 == 54) { char a[9] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; void *pd = (a); const void *ps = (a); memcpy (pd, ps, (0)); sink (a, pd, ps); } } while (0);
# 64 "j.c"
do { if (!0 || 0 == 64) { char a[9] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; void *pd = (a); const void *ps = (a + 1); memcpy (pd, ps, (1)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 65) { char a[9] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; void *pd = (a); const void *ps = (a + 3); memcpy (pd, ps, (3)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 66) { char a[9] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; void *pd = (a); const void *ps = (a + 3); memcpy (pd, ps, (5)); sink (a, pd, ps); } } while (0);
{
char a[3][7];
sink (a);
void *d = a[0];
const void *s = a[1];
memcpy (d, s, sizeof a[0]);
sink (&a);
d = a[0];
s = a[1];
memcpy (d, s, sizeof a[0] + 2);
sink (&a);
d = a[0] + 1;
s = a[1] + 1;
memcpy (d, s, sizeof a[0]);
sink (&a);
d = a[0] + 1;
s = a[1] + 1;
memcpy (d, s, sizeof a[0] + 2);
sink (&a);
}
{
struct {
char a[7];
char b[7];
char c[7];
} x;
sink (&x);
void *d = x.a;
const void *s = x.b;
memcpy (d, s, sizeof x.a);
sink (&x);
d = x.a + 4;
s = x.b;
memcpy (d, s, sizeof x.a);
sink (&x);
d = x.a + 6;
s = x.b;
memcpy (d, s, 1);
sink (&x);
d = x.a + 7;
s = x.b;
memcpy (d, s, 3);
sink (&x);
d = x.a + 7;
s = x.b + 1;
memcpy (d, s, 1);
sink (&x);
d = x.b;
s = x.a;
memcpy (d, s, 1);
sink (&x);
d = x.b;
s = x.a;
memcpy (d, s, sizeof x.b);
sink (&x);
d = x.b + 2;
s = x.a + 1;
memcpy (d, s, sizeof x.b);
sink (&x);
d = x.b + 2;
s = x.a + 2;
memcpy (d, s, sizeof x.b);
sink (&x);
d = x.b + 2;
s = x.a + 3;
memcpy (d, s, sizeof x.b);
sink (&x);
}
{
# 166 "j.c"
do { if (!0 || 0 == 166) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; memcpy ((a), (a + 1), (5)); sink (a); } } while (0);
do { if (!0 || 0 == 167) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; memcpy ((a), (a + 2), (5)); sink (a); } } while (0);
do { if (!0 || 0 == 168) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; memcpy ((a), (a + 3), (5)); sink (a); } } while (0);
do { if (!0 || 0 == 170) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; memcpy ((a + 1), (a), (5)); sink (a); } } while (0);
do { if (!0 || 0 == 171) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; memcpy ((a + 2), (a), (5)); sink (a); } } while (0);
do { if (!0 || 0 == 172) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; memcpy ((a + 3), (a), (5)); sink (a); } } while (0);
}
}
void test_memcpy_range (char *d, size_t sz)
{
# 192 "j.c"
ptrdiff_t ir = signed_range ((2), (3));
do { if (!0 || 0 == 193) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + ir); const void *ps = (a); memcpy (pd, ps, (0)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 194) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + ir); const void *ps = (a); memcpy (pd, ps, (1)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 195) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + ir); const void *ps = (a); memcpy (pd, ps, (2)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 196) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + ir); const void *ps = (a); memcpy (pd, ps, (3)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 198) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + ir); const void *ps = (a); memcpy (pd, ps, (4)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 199) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + ir); const void *ps = (a); memcpy (pd, ps, (5)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 201) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + ir); const void *ps = (d); memcpy (pd, ps, (0)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 202) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + ir); const void *ps = (d); memcpy (pd, ps, (1)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 203) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + ir); const void *ps = (d); memcpy (pd, ps, (2)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 204) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + ir); const void *ps = (d); memcpy (pd, ps, (3)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 205) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + ir); const void *ps = (d); memcpy (pd, ps, (4)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 206) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + ir); const void *ps = (d); memcpy (pd, ps, (5)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 210) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + ir); const void *ps = (d); memcpy (pd, ps, (4)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 211) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + ir); const void *ps = (d); memcpy (pd, ps, (5)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 214) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + sz); const void *ps = (d); memcpy (pd, ps, (0)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 215) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + sz); const void *ps = (d); memcpy (pd, ps, (1)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 216) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + sz); const void *ps = (d); memcpy (pd, ps, (9)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 218) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a); const void *ps = (a + 1); memcpy (pd, ps, (signed_range ((0), (1)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 219) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a); const void *ps = (a + 1); memcpy (pd, ps, (signed_range ((0), (2)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 220) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a); const void *ps = (a + 1); memcpy (pd, ps, (signed_range ((1), (2)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 221) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a); const void *ps = (a + 1); memcpy (pd, ps, (signed_range ((2), (3)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 222) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a); const void *ps = (a + 1); memcpy (pd, ps, (unsigned_range ((2), (0x7fff + (size_t)1)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 223) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a); const void *ps = (a + 1); memcpy (pd, ps, (unsigned_range ((2), (0xffffU - 1)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 224) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a); const void *ps = (a + 2); memcpy (pd, ps, (signed_range ((2), (3)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 225) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a); const void *ps = (a + 2); memcpy (pd, ps, (signed_range ((3), (4)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 226) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a); const void *ps = (a + 3); memcpy (pd, ps, (signed_range ((3), (4)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 227) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a); const void *ps = (a + 3); memcpy (pd, ps, (signed_range ((4), (5)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 228) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a); const void *ps = (a + 3); memcpy (pd, ps, (signed_range ((5), (6)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 230) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + 1); const void *ps = (a); memcpy (pd, ps, (signed_range ((0), (1)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 231) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + 1); const void *ps = (a); memcpy (pd, ps, (signed_range ((0), (2)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 232) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + 1); const void *ps = (a); memcpy (pd, ps, (signed_range ((1), (2)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 233) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + 1); const void *ps = (a); memcpy (pd, ps, (signed_range ((2), (3)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 234) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + 1); const void *ps = (a); memcpy (pd, ps, (unsigned_range ((2), (0x7fff + (size_t)1)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 235) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + 1); const void *ps = (a); memcpy (pd, ps, (unsigned_range ((2), (0xffffU - 1)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 236) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + 2); const void *ps = (a); memcpy (pd, ps, (signed_range ((2), (3)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 237) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + 2); const void *ps = (a); memcpy (pd, ps, (signed_range ((3), (4)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 238) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + 3); const void *ps = (a); memcpy (pd, ps, (signed_range ((3), (4)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 239) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + 3); const void *ps = (a); memcpy (pd, ps, (signed_range ((4), (5)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 240) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + 3); const void *ps = (a); memcpy (pd, ps, (signed_range ((5), (6)))); sink (a, pd, ps); } } while (0);
ir = signed_range ((2), (5));
do { if (!0 || 0 == 243) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a); const void *ps = (a + ir); memcpy (pd, ps, (4)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 244) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a); const void *ps = (a + ir); memcpy (pd, ps, (5)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 245) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a); const void *ps = (a + ir); memcpy (pd, ps, (6)); sink (a, pd, ps); } } while (0);
# 255 "j.c"
do { if (!0 || 0 == 255) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + unsigned_range ((0x7fff - 3), (0xffffU - 7))); memcpy (pd, ps, (5)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 256) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + unsigned_range ((0x7fff - 3), (0xffffU - 7))); memcpy (pd, ps, (6)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 257) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + unsigned_range ((0x7fff - 3), (0xffffU - 7))); memcpy (pd, ps, (7)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 258) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + unsigned_range ((0x7fff - 3), (0xffffU - 7))); memcpy (pd, ps, (9)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 260) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + unsigned_range ((0x7fff - 3), (0xffffU - 7))); const void *ps = (d); memcpy (pd, ps, (5)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 261) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + unsigned_range ((0x7fff - 3), (0xffffU - 7))); const void *ps = (d); memcpy (pd, ps, (6)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 262) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + unsigned_range ((0x7fff - 3), (0xffffU - 7))); const void *ps = (d); memcpy (pd, ps, (7)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 263) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + unsigned_range ((0x7fff - 3), (0xffffU - 7))); const void *ps = (d); memcpy (pd, ps, (9)); sink (a, pd, ps); } } while (0);
{
size_t o = sz << 1;
do { if (!0 || 0 == 269) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + o); memcpy (pd, ps, (1234)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 270) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + o); const void *ps = (d); memcpy (pd, ps, (2345)); sink (a, pd, ps); } } while (0);
}
size_t n = unsigned_range ((3), (4));
do { if (!0 || 0 == 280) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + signed_range ((1), (3))); const void *ps = (a + signed_range ((1), (3))); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
# 295 "j.c"
do { if (!0 || 0 == 295) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + signed_range ((1), (3))); const void *ps = (a + signed_range ((2), (3))); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 296) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + signed_range ((1), (3))); const void *ps = (a + signed_range ((3), (4))); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 298) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + signed_range ((2), (3))); const void *ps = (a + signed_range ((3), (4))); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 300) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + signed_range ((1), (3))); const void *ps = (a + signed_range ((4), (5))); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 301) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + signed_range ((2), (3))); const void *ps = (a + signed_range ((4), (5))); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 302) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + signed_range ((3), (4))); const void *ps = (a + signed_range ((4), (5))); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 305) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + sz); memcpy (pd, ps, (0)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 306) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + sz); memcpy (pd, ps, (1)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 307) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + sz); memcpy (pd, ps, (9)); sink (a, pd, ps); } } while (0);
}
void test_memcpy_anti_range (char *d, const char *s)
{
do { if (!0 || 0 == 314) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + signed_anti_range ((0), (3))); memcpy (pd, ps, (1)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 315) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + signed_anti_range ((0), (3))); memcpy (pd, ps, (2)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 316) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + signed_anti_range ((0), (3))); memcpy (pd, ps, (3)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 317) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + signed_anti_range ((0), (3))); memcpy (pd, ps, (0x7fff - 2)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 318) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + signed_anti_range ((0), (3))); memcpy (pd, ps, (0x7fff - 1)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 319) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + signed_anti_range ((0), (3))); memcpy (pd, ps, (0x7fff)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 321) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + signed_anti_range ((0), (3))); memcpy (pd, ps, (unsigned_range ((0x7fff - 2), (0x7fff)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 329) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (s); memcpy (pd, ps, (unsigned_anti_range ((1), (0x7fff / 2 - 1)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 330) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (s); memcpy (pd, ps, (unsigned_anti_range ((1), (0x7fff - 1)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 331) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (s); memcpy (pd, ps, (unsigned_anti_range ((1), (0x7fff)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 332) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (s); memcpy (pd, ps, (unsigned_anti_range ((1), (0xffffU - 1)))); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 333) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (s); memcpy (pd, ps, (unsigned_anti_range ((1), (0xffffU)))); sink (a, pd, ps); } } while (0);
}
void test_memcpy_range_exceed (char *d, const char *s)
{
ptrdiff_t i = signed_range ((3), (5));
size_t n = unsigned_range ((4), (6));
do { if (!0 || 0 == 351) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a); const void *ps = (a + i); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 352) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (a + i); const void *ps = (a); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 354) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + i); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 355) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + i); const void *ps = (d); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 360) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (s); memcpy (pd, ps, (0x7fff / 2)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 361) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (s); memcpy (pd, ps, (0x7fff / 2 + 1)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 362) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (s); memcpy (pd, ps, (0x7fff / 2 + 2)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 363) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (s); memcpy (pd, ps, (0x7fff / 2 + 3)); sink (a, pd, ps); } } while (0);
i = signed_range ((0x7fff - 2), (0x7fff));
do { if (!0 || 0 == 369) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (d + i); memcpy (pd, ps, (3)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 370) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + i); const void *ps = (d); memcpy (pd, ps, (3)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 372) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + 1); const void *ps = (d + i); memcpy (pd, ps, (3)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 373) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + i); const void *ps = (d + 1); memcpy (pd, ps, (3)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 377) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d); const void *ps = (s + i); memcpy (pd, ps, (3)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 378) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + i); const void *ps = (s); memcpy (pd, ps, (3)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 380) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + 1); const void *ps = (s + i); memcpy (pd, ps, (3)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 381) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + i); const void *ps = (s + 1); memcpy (pd, ps, (3)); sink (a, pd, ps); } } while (0);
# 400 "j.c"
ptrdiff_t j = signed_range ((0x7fff - 9), (0x7fff - 1));
i = signed_range ((0x7fff - 5), (0x7fff - 1));
n = unsigned_range ((4), (5));
do { if (!0 || 0 == 403) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + i); const void *ps = (d + j); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
n = unsigned_range ((4), (0x7fff - 1));
do { if (!0 || 0 == 406) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + i); const void *ps = (d + j); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
n = unsigned_range ((4), (0xffffU - 1));
do { if (!0 || 0 == 409) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + i); const void *ps = (d + j); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
j = signed_range ((0x7fff - 8), (0x7fff - 1));
do { if (!0 || 0 == 412) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + i); const void *ps = (d + j); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
j = signed_range ((0x7fff - 7), (0x7fff - 1));
do { if (!0 || 0 == 415) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + i); const void *ps = (d + j); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
j = signed_range ((0x7fff - 6), (0x7fff - 1));
do { if (!0 || 0 == 418) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + i); const void *ps = (d + j); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
n = unsigned_range ((3), (0x7fff));
do { if (!0 || 0 == 421) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + i); const void *ps = (d + j); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
j = signed_range ((0x7fff - 6), (0x7fff - 1));
do { if (!0 || 0 == 424) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + i); const void *ps = (d + j); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
j = signed_range ((0x7fff - 5), (0x7fff - 1));
do { if (!0 || 0 == 427) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + i); const void *ps = (d + j); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
j = signed_range ((0x7fff - 4), (0x7fff - 1));
do { if (!0 || 0 == 430) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + i); const void *ps = (d + j); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
j = signed_range ((0x7fff - 2), (0x7fff - 1));
do { if (!0 || 0 == 433) { char a[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void *pd = (d + i); const void *ps = (d + j); memcpy (pd, ps, (n)); sink (a, pd, ps); } } while (0);
}
void test_memcpy_var (char *d, const char *s)
{
size_t n = unsigned_value ();
memcpy (d, d, 0);
sink (d);
s = d + 1;
memcpy (d, s, n);
sink (d);
s = d + n;
memcpy (d, s, n);
sink (d);
s = d + signed_value ();
memcpy (d, s, unsigned_value ());
sink (d);
s = d + 3;
n = 1;
memcpy (d, s, n);
sink (d);
s = d + 3;
n = 2;
memcpy (d, s, n);
sink (d);
s = d + 3;
n = 3;
memcpy (d, s, n);
sink (d);
s = d + 3;
n = 4;
memcpy (d, s, n);
sink (d);
s = d + 5;
n = 7;
memcpy (d, s, n);
}
void test_memcpy_memarrray (struct MemArrays *p)
{
# 497 "j.c"
do { if (!0 || 0 == 497) { void *pd = (p->a8); const void *ps = (p->a8); memcpy (pd, ps, (0)); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 498) { void *pd = (p->a8); const void *ps = (p->a8 + 1); memcpy (pd, ps, (1)); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 499) { void *pd = (p->a8); const void *ps = (p->a8 + 2); memcpy (pd, ps, (2)); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 500) { void *pd = (p->a8); const void *ps = (p->a8 + 8); memcpy (pd, ps, (1)); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 502) { void *pd = (p->a8); const void *ps = (p->a8 + 2); memcpy (pd, ps, (3)); sink (pd, ps); } } while (0);
}
void test_memmove (void)
{
{
char d[7];
sink (d);
const void *s = d;
memmove (d, s, 7);
sink (d);
s = d + 1;
memmove (d, s, 6);
sink (d);
s = d + 2;
memmove (d + 1, s, 5);
sink (d);
}
}
void test_strcat_cst (const char *s)
{
# 542 "j.c"
do { if (!0 || 0 == 542) { char a[9] = "0"; char *pd = (a); const char *ps = (a); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 543) { char a[9] = "01"; char *pd = (a); const char *ps = (a); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 544) { char a[9] = "012"; char *pd = (a); const char *ps = (a); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 546) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 1); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 547) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 2); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 550) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 3); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 552) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 4); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 553) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 5); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 554) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 6); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 555) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 7); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 556) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 8); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 558) { char a[9] = "0"; char *pd = (a + 1); const char *ps = (a); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 559) { char a[9] = "0"; char *pd = (a + 2); const char *ps = (a); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 564) { char a[9] = "01"; char *pd = (a + 1); const char *ps = (a); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 565) { char a[9] = "01"; char *pd = (a + 2); const char *ps = (a); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 566) { char a[9] = "01"; char *pd = (a + 3); const char *ps = (a); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 568) { char a[9] = "012"; char *pd = (a + 1); const char *ps = (a); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 569) { char a[9] = "012"; char *pd = (a + 2); const char *ps = (a); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 570) { char a[9] = "012"; char *pd = (a + 3); const char *ps = (a); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 571) { char a[9] = "012"; char *pd = (a + 4); const char *ps = (a); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 572) { char a[9] = "012"; char *pd = (a + 5); const char *ps = (a); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 575) { char a[9] = "012"; char *pd = (a); const char *ps = ("012"); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 576) { char a[9] = "012"; char *pd = (a); const char *ps = (s); strcat (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 577) { char a[9] = "01234567"; char *pd = (a); const char *ps = (s); strcat (pd, ps); sink (a, pd, ps); } } while (0);
}
void test_strcat_var (char *d, const char *s)
{
# 594 "j.c"
do { if (!0 || 0 == 594) { char *pd = (d); const char *ps = (d); strcat (pd, ps); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 595) { char *pd = (d); const char *ps = (d + 1); strcat (pd, ps); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 596) { char *pd = (d); const char *ps = (d + 2); strcat (pd, ps); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 597) { char *pd = (d); const char *ps = (d + 999); strcat (pd, ps); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 601) { char *pd = (d); const char *ps = (d + -99); strcat (pd, ps); sink (pd, ps); } } while (0);
size_t n = unsigned_value ();
do { if (!0 || 0 == 605) { char *pd = (d + n); const char *ps = (d + n); strcat (pd, ps); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 608) { char *pd = (d); const char *ps = ("012"); strcat (pd, ps); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 609) { char *pd = (d + 1); const char *ps = ("0123"); strcat (pd, ps); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 610) { char *pd = (d + n); const char *ps = ("01234"); strcat (pd, ps); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 611) { char *pd = (d); const char *ps = (s); strcat (pd, ps); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 612) { char *pd = (d + 1); const char *ps = (s); strcat (pd, ps); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 613) { char *pd = (d + n); const char *ps = (s); strcat (pd, ps); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 621) { char *pd = (d); const char *ps = (d + n); strcat (pd, ps); sink (pd, ps); } } while (0);
}
void test_strcpy_cst (ptrdiff_t i)
{
# 639 "j.c"
do { if (!0 || 0 == 639) { char a[8] = "012"; char *pd = (a); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 640) { char a[8] = "012"; char *pd = (a); const char *ps = (a + 1); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 641) { char a[8] = "012"; char *pd = (a); const char *ps = (a + 2); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 642) { char a[8] = "012"; char *pd = (a); const char *ps = (a + 3); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 643) { char a[8] = "012"; char *pd = (a); const char *ps = (a + sizeof a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 646) { char a[8] = "0123"; char *pd = (a); const char *ps = (a + 2); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 649) { char a[8] = "01234"; char *pd = (a); const char *ps = (a + 2); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 652) { char a[8] = "012"; char *pd = (a); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 654) { char a[8] = "012"; char *pd = (a + 1); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 655) { char a[8] = "012"; char *pd = (a + 2); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 656) { char a[8] = "012"; char *pd = (a + 3); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 657) { char a[8] = "012"; char *pd = (a + 4); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 660) { char a[8] = "012"; char *pd = (a + sizeof a); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
}
void test_strcpy_range (void)
{
# 681 "j.c"
ptrdiff_t r;
r = signed_range ((0), (1));
do { if (!0 || 0 == 684) { char a[8] = "0"; char *pd = (a + r); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
r = signed_range ((2), (5));
do { if (!0 || 0 == 687) { char a[8] = "01"; char *pd = (a + r); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 688) { char a[8] = "012"; char *pd = (a + r); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 692) { char a[8] = "0123"; char *pd = (a + r); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 696) { char a[9] = "0123"; char *pd = (a + r); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 701) { char a[10] = "0123"; char *pd = (a + r); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
r = signed_range ((3), (4));
do { if (!0 || 0 == 705) { char a[8] = "01"; char *pd = (a + r); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 706) { char a[8] = "012"; char *pd = (a + r); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 710) { char a[8] = "0123"; char *pd = (a + r); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 714) { char a[9] = "0123"; char *pd = (a + r); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 719) { char a[10] = "0123"; char *pd = (a + r); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 721) { char a[8] = "01"; char *pd = (a); const char *ps = (a + r); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 722) { char a[8] = "012"; char *pd = (a); const char *ps = (a + r); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 723) { char a[8] = "0123"; char *pd = (a); const char *ps = (a + r); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 724) { char a[8] = "01234"; char *pd = (a); const char *ps = (a + r); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 730) { char a[8] = "012345"; char *pd = (a); const char *ps = (a + r); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 731) { char a[8] = "0123456"; char *pd = (a); const char *ps = (a + r); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
r = signed_range ((3), (0x7fff - 3));
do { if (!0 || 0 == 734) { char a[8] = "01"; char *pd = (a + r); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 741) { char a[8] = "012"; char *pd = (a + r); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
r = signed_range ((0x7fff - 2), (0x7fff - 1));
do { if (!0 || 0 == 744) { char a[8] = "012"; char *pd = (a + r); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
r = signed_value ();
do { if (!0 || 0 == 751) { char a[8] = ""; char *pd = (a); const char *ps = (a + r); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 752) { char a[8] = "0"; char *pd = (a + r); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 753) { char a[8] = "012"; char *pd = (a + r); const char *ps = (a); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 755) { char a[8] = ""; char *pd = (a); const char *ps = (a + r); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 756) { char a[8] = "0"; char *pd = (a); const char *ps = (a + r); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 757) { char a[8] = "012"; char *pd = (a); const char *ps = (a + r); strcpy (pd, ps); sink (a, pd, ps); } } while (0);
}
void test_strcpy_var (char *d, const char *s)
{
# 774 "j.c"
do { if (!0 || 0 == 774) { char *pd = (d); const char *ps = (s); strcpy (pd, ps); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 776) { char *pd = (d); const char *ps = (&d[0]); strcpy (pd, ps); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 777) { char *pd = (&d[0]); const char *ps = (d); strcpy (pd, ps); sink (pd, ps); } } while (0);
s = d;
do { if (!0 || 0 == 780) { char *pd = (d); const char *ps = (s); strcpy (pd, ps); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 784) { char *pd = (d); const char *ps = (d + 1); strcpy (pd, ps); sink (pd, ps); } } while (0);
int r = signed_range ((2), (3));
do { if (!0 || 0 == 789) { char *pd = (d); const char *ps = (d + r); strcpy (pd, ps); sink (pd, ps); } } while (0);
s = d + signed_value ();
do { if (!0 || 0 == 794) { char *pd = (d); const char *ps = (s); strcpy (pd, ps); sink (pd, ps); } } while (0);
}
void test_strncpy_cst (void)
{
# 812 "j.c"
do { if (!0 || 0 == 812) { char a[9] = "012"; char *pd = (a); const char *ps = (a); strncpy (pd, ps, (0)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 813) { char a[9] = "012"; char *pd = (a); const char *ps = (a); strncpy (pd, ps, (1)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 815) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 1); strncpy (pd, ps, (1)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 816) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 1); strncpy (pd, ps, (2)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 817) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 1); strncpy (pd, ps, (3)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 818) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 1); strncpy (pd, ps, (4)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 819) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 1); strncpy (pd, ps, (5)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 820) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 1); strncpy (pd, ps, (6)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 822) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 2); strncpy (pd, ps, (1)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 823) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 2); strncpy (pd, ps, (2)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 825) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 2); strncpy (pd, ps, (3)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 826) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 2); strncpy (pd, ps, (4)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 827) { char a[9] = "012"; char *pd = (a); const char *ps = (a + 2); strncpy (pd, ps, (5)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 829) { char a[9] = "0123"; char *pd = (a); const char *ps = (a + 2); strncpy (pd, ps, (1)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 830) { char a[9] = "0123"; char *pd = (a); const char *ps = (a + 2); strncpy (pd, ps, (2)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 832) { char a[9] = "0123"; char *pd = (a); const char *ps = (a + 2); strncpy (pd, ps, (3)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 833) { char a[9] = "0123"; char *pd = (a); const char *ps = (a + 2); strncpy (pd, ps, (4)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 834) { char a[9] = "0123"; char *pd = (a); const char *ps = (a + 2); strncpy (pd, ps, (5)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 835) { char a[9] = "0123"; char *pd = (a); const char *ps = (a + 2); strncpy (pd, ps, (6)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 837) { char a[9] = "01234"; char *pd = (a); const char *ps = (a + 2); strncpy (pd, ps, (1)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 838) { char a[9] = "01234"; char *pd = (a); const char *ps = (a + 2); strncpy (pd, ps, (2)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 839) { char a[9] = "01234"; char *pd = (a); const char *ps = (a + 2); strncpy (pd, ps, (3)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 841) { char a[9] = "01234"; char *pd = (a); const char *ps = (a + 2); strncpy (pd, ps, (4)); sink (a, pd, ps); } } while (0);
do { if (!0 || 0 == 842) { char a[9] = "01234"; char *pd = (a); const char *ps = (a + 2); strncpy (pd, ps, (5)); sink (a, pd, ps); } } while (0);
}
void test_strncpy_range (char *d, size_t n)
{
# 859 "j.c"
ptrdiff_t i;
i = signed_range ((0), (1));
do { if (!0 || 0 == 862) { char a[9] = "0123"; strncpy ((a), (a + i), (0)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 863) { char a[9] = "0123"; strncpy ((a), (a + i), (1)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 867) { char a[9] = "0123"; strncpy ((a), (a + i), (2)); sink (a, (a), (a + i)); } } while (0);
i = signed_range ((1), (5));
do { if (!0 || 0 == 870) { char a[9] = "0123"; strncpy ((a), (a + i), (0)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 871) { char a[9] = "0123"; strncpy ((a), (a + i), (1)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 872) { char a[9] = "0123"; strncpy ((a), (a + i), (2)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 873) { char a[9] = "0123"; strncpy ((a), (a + i), (3)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 874) { char a[9] = "0123"; strncpy ((a), (a + i), (4)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 875) { char a[9] = "0123"; strncpy ((a), (a + i), (5)); sink (a, (a), (a + i)); } } while (0);
i = signed_range ((2), (5));
do { if (!0 || 0 == 878) { char a[9] = "0123"; strncpy ((a), (a + i), (0)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 879) { char a[9] = "0123"; strncpy ((a), (a + i), (1)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 880) { char a[9] = "0123"; strncpy ((a), (a + i), (2)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 881) { char a[9] = "0123"; strncpy ((a), (a + i), (3)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 882) { char a[9] = "0123"; strncpy ((a), (a + i), (4)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 883) { char a[9] = "0123"; strncpy ((a), (a + i), (5)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 887) { char a[9] = "0123"; strncpy ((a), (a + i), (6)); sink (a, (a), (a + i)); } } while (0);
i = signed_range ((3), (5));
do { if (!0 || 0 == 890) { char a[9] = "0123"; strncpy ((a), (a + i), (0)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 891) { char a[9] = "0123"; strncpy ((a), (a + i), (1)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 892) { char a[9] = "0123"; strncpy ((a), (a + i), (2)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 893) { char a[9] = "0123"; strncpy ((a), (a + i), (3)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 894) { char a[9] = "0123"; strncpy ((a), (a + i), (4)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 895) { char a[9] = "0123"; strncpy ((a), (a + i), (5)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 902) { char a[9] = "0123"; strncpy ((a), (a + i), (6)); sink (a, (a), (a + i)); } } while (0);
i = signed_range ((4), (5));
do { if (!0 || 0 == 905) { char a[9] = "0123"; strncpy ((a), (a + i), (0)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 906) { char a[9] = "0123"; strncpy ((a), (a + i), (1)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 907) { char a[9] = "0123"; strncpy ((a), (a + i), (2)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 908) { char a[9] = "0123"; strncpy ((a), (a + i), (3)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 909) { char a[9] = "0123"; strncpy ((a), (a + i), (4)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 910) { char a[9] = "0123"; strncpy ((a), (a + i), (5)); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 915) { char a[9] = "0123"; strncpy ((a), (a + i), (6)); sink (a, (a), (a + i)); } } while (0);
# 929 "j.c"
do { if (!0 || 0 == 929) { char a[9] = "01234567"; strncpy ((a), (a + i), (unsigned_range ((4), (6)))); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 932) { char a[9] = "01234567"; strncpy ((d), (d + i), (unsigned_range ((4), (6)))); sink (a, (d), (d + i)); } } while (0);
do { if (!0 || 0 == 934) { char a[9] = "01234567"; strncpy ((a), (a + i), (unsigned_range ((6), (7)))); sink (a, (a), (a + i)); } } while (0);
do { if (!0 || 0 == 938) { char a[9] = "012"; strncpy ((a), (a), (n)); sink (a, (a), (a)); } } while (0);
}
void test_strncpy_var (char *d, const char *s, size_t n)
{
# 956 "j.c"
do { if (!0 || 0 == 956) { char *pd = (d); const char *ps = (s); strncpy (pd, ps, (1)); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 957) { char *pd = (d); const char *ps = (s); strncpy (pd, ps, (n)); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 959) { char *pd = (d); const char *ps = (d); strncpy (pd, ps, (1)); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 960) { char *pd = (d); const char *ps = (d); strncpy (pd, ps, (n)); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 962) { char *pd = (d); const char *ps = (d + 1); strncpy (pd, ps, (1)); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 963) { char *pd = (d); const char *ps = (d + 1); strncpy (pd, ps, (2)); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 964) { char *pd = (d + 1); const char *ps = (d); strncpy (pd, ps, (1)); sink (pd, ps); } } while (0);
do { if (!0 || 0 == 965) { char *pd = (d + 1); const char *ps = (d); strncpy (pd, ps, (2)); sink (pd, ps); } } while (0);
}
struct MemberArrays
{
char a[7];
char b[8];
char c[9];
};
void test_strncpy_strcpy_var (struct MemberArrays *ar, const char *s)
{
strncpy (ar->b, s, sizeof ar->b - 1);
ar->b[sizeof ar->b - 1] = '\0';
strcpy (ar->a, ar->b);
sink (ar);
strncpy (ar->c, s, sizeof ar->c - 1);
ar->c[sizeof ar->c - 1] = '\0';
strcpy (ar->a, ar->c);
sink (ar);
}