Index: gcc.c-torture/execute/memset-4.c =================================================================== --- gcc.c-torture/execute/memset-4.c (revision 0) +++ gcc.c-torture/execute/memset-4.c (revision 0) @@ -0,0 +1,27 @@ +/* Test to make sure memset of small old size works + correctly. */ +#define SIZE 15 + +void f(char *a) __attribute__((noinline)); +void f(char *a) +{ + __builtin_memset (a, 0, SIZE); +} + + +int main(void) +{ + int i; + char b[SIZE]; + for(i = 0; i < sizeof(b); i++) + { + b[i] = i; + } + f(b); + for(i = 0; i < sizeof(b); i++) + { + if (0 != b[i]) + __builtin_abort (); + } + return 0; +} Index: gcc.c-torture/execute/20110418-1.c =================================================================== --- gcc.c-torture/execute/20110418-1.c (revision 0) +++ gcc.c-torture/execute/20110418-1.c (revision 0) @@ -0,0 +1,29 @@ +typedef unsigned long long uint64_t; +void f(uint64_t *a, uint64_t aa) __attribute__((noinline)); +void f(uint64_t *a, uint64_t aa) +{ + uint64_t new_value = aa; + uint64_t old_value = *a; + int bit_size = 32; + uint64_t mask = (uint64_t)(unsigned)(-1); + uint64_t tmp = old_value & mask; + new_value &= mask; + /* On overflow we need to add 1 in the upper bits */ + if (tmp > new_value) + new_value += 1ull<next; + for (; &e->hash_list != (slot);) + if (chunk <= (e->new_chunk>>56)) + return e; +} Index: gcc.c-torture/compile/20121010-1.c =================================================================== --- gcc.c-torture/compile/20121010-1.c (revision 0) +++ gcc.c-torture/compile/20121010-1.c (revision 0) @@ -0,0 +1,10 @@ +int _IO_getc(int*); +read_long(int *fp) +{ + unsigned char b0, b1, b2, b3; + b0 = _IO_getc (fp); + b1 = _IO_getc (fp); + b2 = _IO_getc (fp); + b3 = _IO_getc (fp); + return ((int)(((((b3 << 8) | b2) << 8) | b1) << 8) | b0); +} Index: gcc.c-torture/compile/20120917-1.c =================================================================== --- gcc.c-torture/compile/20120917-1.c (revision 0) +++ gcc.c-torture/compile/20120917-1.c (revision 0) @@ -0,0 +1,13 @@ +typedef long long curl_off_t; +int tool_seek_cb(void *userdata, curl_off_t offset, int whence) +{ + if(offset > 0x7FFFFFFFLL - 0x1LL) +{ + curl_off_t left = offset; + while(left) +{ + long step = (left > 0x7FFFFFFFLL - 0x1LL) ? 2147483647L - 1L : (long)left; + left -= step; + } + } +} Index: gcc.c-torture/compile/20140110-1.c =================================================================== --- gcc.c-torture/compile/20140110-1.c (revision 0) +++ gcc.c-torture/compile/20140110-1.c (revision 0) @@ -0,0 +1,14 @@ +typedef long unsigned int size_t; +struct RangeMapRange { + unsigned fromMin; + unsigned fromMax; + unsigned toMin; +}; +void reserve1(void); +void f(struct RangeMapRange *q1, size_t t) +{ + const struct RangeMapRange *q2 = q1 + t; + size_t n = q2 - q1; + if (n > 0) + reserve1(); +} Index: gcc.c-torture/compile/20121220-1.c =================================================================== --- gcc.c-torture/compile/20121220-1.c (revision 0) +++ gcc.c-torture/compile/20121220-1.c (revision 0) @@ -0,0 +1,14 @@ +typedef unsigned char uint8_t; +typedef unsigned int uint32_t; +static __attribute__ (( always_inline )) __inline__ +void rop_8_notsrc_or_dst(uint8_t *dst, uint8_t src) +{ + *dst = (~(src)) | (*dst); +} +void cirrus_colorexpand_notsrc_or_dst_8 (uint8_t * dst, int bits) +{ + uint8_t src; + uint32_t colors[2]; + src = colors[bits]; + rop_8_notsrc_or_dst(dst, src); +} Index: gcc.c-torture/compile/20120822-1.c =================================================================== --- gcc.c-torture/compile/20120822-1.c (revision 0) +++ gcc.c-torture/compile/20120822-1.c (revision 0) @@ -0,0 +1,11 @@ +int a; +int c; +int b; +void shr_long(int d, unsigned char s) +{ + long long dvd, div, mod; + dvd = b; + mod = dvd % s; + if (((c >> ((mod & 0xff) % 32)) & 1) == 0) + a = 1; +} Index: gcc.c-torture/compile/20121027-1.c =================================================================== --- gcc.c-torture/compile/20121027-1.c (revision 0) +++ gcc.c-torture/compile/20121027-1.c (revision 0) @@ -0,0 +1,13 @@ +extern int nc; +void f(void) +{ + unsigned char resp[1024]; + int c; + int bl = 0; + unsigned long long *dwords = (unsigned long long *)(resp + 5); + for (c=0; c