From: Andrew Pinski Date: Sun, 16 Nov 2014 08:01:09 +0000 (+0000) Subject: memset-4.c: New test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=24b5038632010c92013aa66078c207a28fb09f51;p=gcc.git memset-4.c: New test. 2014-11-16 Andrew Pinski * gcc.c-torture/execute/memset-4.c: New test. * gcc.c-torture/execute/20110418-1.c: New test. * gcc.c-torture/execute/20141022-1.c: New test. * gcc.c-torture/execute/strcpy-2.c: New test. * gcc.c-torture/execute/20140212-2.c: New test. * gcc.c-torture/compile/20120913-1.c: New test. * gcc.c-torture/compile/20121010-1.c: New test. * gcc.c-torture/compile/20120917-1.c: New test. * gcc.c-torture/compile/20140110-1.c: New test. * gcc.c-torture/compile/20121220-1.c: New test. * gcc.c-torture/compile/20120822-1.c: New test. * gcc.c-torture/compile/20121027-1.c: New test. * gcc.c-torture/compile/20120830-2.c: New test. From-SVN: r217625 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fdb726568d6..87cb8d8c191 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,19 @@ +2014-11-16 Andrew Pinski + + * gcc.c-torture/execute/memset-4.c: New test. + * gcc.c-torture/execute/20110418-1.c: New test. + * gcc.c-torture/execute/20141022-1.c: New test. + * gcc.c-torture/execute/strcpy-2.c: New test. + * gcc.c-torture/execute/20140212-2.c: New test. + * gcc.c-torture/compile/20120913-1.c: New test. + * gcc.c-torture/compile/20121010-1.c: New test. + * gcc.c-torture/compile/20120917-1.c: New test. + * gcc.c-torture/compile/20140110-1.c: New test. + * gcc.c-torture/compile/20121220-1.c: New test. + * gcc.c-torture/compile/20120822-1.c: New test. + * gcc.c-torture/compile/20121027-1.c: New test. + * gcc.c-torture/compile/20120830-2.c: New test. + 2014-11-15 Maciej W. Rozycki * g++.dg/guality/guality.exp (check_guality): Fix `test_counts' diff --git a/gcc/testsuite/gcc.c-torture/compile/20120822-1.c b/gcc/testsuite/gcc.c-torture/compile/20120822-1.c new file mode 100644 index 00000000000..0298c606b31 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20120822-1.c @@ -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; +} diff --git a/gcc/testsuite/gcc.c-torture/compile/20120830-2.c b/gcc/testsuite/gcc.c-torture/compile/20120830-2.c new file mode 100644 index 00000000000..27479b687a7 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20120830-2.c @@ -0,0 +1,5 @@ +ubidi_writeReordered_49( int *dest, const unsigned char *dirProps) +{ + if (!(1&(1UL<<*dirProps))) + *dest=1; +} diff --git a/gcc/testsuite/gcc.c-torture/compile/20120913-1.c b/gcc/testsuite/gcc.c-torture/compile/20120913-1.c new file mode 100644 index 00000000000..f63babd9758 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20120913-1.c @@ -0,0 +1,17 @@ +struct list_head { + struct list_head *next, *prev; +}; +struct dm_exception { + struct list_head hash_list; + unsigned long long old_chunk; + unsigned long long new_chunk; +}; +struct dm_exception *dm_lookup_exception(struct list_head *table, unsigned long long chunk) { + struct list_head *slot; + struct dm_exception *e; + slot = &table[0]; + e = (struct dm_exception *)slot->next; + for (; &e->hash_list != (slot);) + if (chunk <= (e->new_chunk>>56)) + return e; +} diff --git a/gcc/testsuite/gcc.c-torture/compile/20120917-1.c b/gcc/testsuite/gcc.c-torture/compile/20120917-1.c new file mode 100644 index 00000000000..b469514fa09 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20120917-1.c @@ -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; + } + } +} diff --git a/gcc/testsuite/gcc.c-torture/compile/20121010-1.c b/gcc/testsuite/gcc.c-torture/compile/20121010-1.c new file mode 100644 index 00000000000..9fac9b820e3 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20121010-1.c @@ -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); +} diff --git a/gcc/testsuite/gcc.c-torture/compile/20121027-1.c b/gcc/testsuite/gcc.c-torture/compile/20121027-1.c new file mode 100644 index 00000000000..3d3ff31f69b --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20121027-1.c @@ -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 0) + reserve1(); +} diff --git a/gcc/testsuite/gcc.c-torture/execute/20110418-1.c b/gcc/testsuite/gcc.c-torture/execute/20110418-1.c new file mode 100644 index 00000000000..df2636080e3 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20110418-1.c @@ -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<