diff options
author | Jakub Jelinek <jakub@redhat.com> | 2013-08-27 11:24:52 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2013-08-27 11:24:52 +0200 |
commit | d15774b6318e7d7b1781eed30a1e3703bc450b98 (patch) | |
tree | 4c922b264117547b3c17e43e8b175d98d71033bf | |
parent | 11729fa7a08b3b36007ab2754dad18ce73f1a69c (diff) | |
download | gcc-d15774b6318e7d7b1781eed30a1e3703bc450b98.zip gcc-d15774b6318e7d7b1781eed30a1e3703bc450b98.tar.gz gcc-d15774b6318e7d7b1781eed30a1e3703bc450b98.tar.bz2 |
re PR rtl-optimization/57860 (wrong code for bitwise ops with long long literal on x86_64-linux (32-bit mode))
PR rtl-optimization/57860
PR rtl-optimization/57861
PR rtl-optimization/57875
PR rtl-optimization/57876
PR rtl-optimization/57877
* gcc.c-torture/execute/pr57860.c: New test.
* gcc.c-torture/execute/pr57861.c: New test.
* gcc.c-torture/execute/pr57875.c: New test.
* gcc.c-torture/execute/pr57876.c: New test.
* gcc.c-torture/execute/pr57877.c: New test.
From-SVN: r202018
-rw-r--r-- | gcc/testsuite/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/pr57860.c | 25 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/pr57861.c | 33 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/pr57875.c | 21 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/pr57876.c | 27 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/pr57877.c | 28 |
6 files changed, 147 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1d1e274..5310441 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,16 @@ +2013-08-27 Jakub Jelinek <jakub@redhat.com> + + PR rtl-optimization/57860 + PR rtl-optimization/57861 + PR rtl-optimization/57875 + PR rtl-optimization/57876 + PR rtl-optimization/57877 + * gcc.c-torture/execute/pr57860.c: New test. + * gcc.c-torture/execute/pr57861.c: New test. + * gcc.c-torture/execute/pr57875.c: New test. + * gcc.c-torture/execute/pr57876.c: New test. + * gcc.c-torture/execute/pr57877.c: New test. + 2013-08-26 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/58146 diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57860.c b/gcc/testsuite/gcc.c-torture/execute/pr57860.c new file mode 100644 index 0000000..6cef63e --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr57860.c @@ -0,0 +1,25 @@ +/* PR rtl-optimization/57860 */ + +extern void abort (void); +int a, *b = &a, c, d, e, *f = &e, g, *h = &d, k[1] = { 1 }; + +int +foo (int p) +{ + for (;; g++) + { + for (; c; c--); + *f = *h = p > ((0x1FFFFFFFFLL ^ a) & *b); + if (k[g]) + return 0; + } +} + +int +main () +{ + foo (1); + if (d != 1) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57861.c b/gcc/testsuite/gcc.c-torture/execute/pr57861.c new file mode 100644 index 0000000..138eb61 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr57861.c @@ -0,0 +1,33 @@ +/* PR rtl-optimization/57861 */ + +extern void abort (void); +short a = 1, f; +int b, c, d, *g = &b, h, i, j; +unsigned int e; + +static int +foo (char p) +{ + int k; + for (c = 0; c < 2; c++) + { + i = (j = 0) || p; + k = i * p; + if (e < k) + { + short *l = &f; + a = d && h; + *l = 0; + } + } + return 0; +} + +int +main () +{ + *g = foo (a); + if (a != 0) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57875.c b/gcc/testsuite/gcc.c-torture/execute/pr57875.c new file mode 100644 index 0000000..c3ae51b --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr57875.c @@ -0,0 +1,21 @@ +/* PR rtl-optimization/57875 */ + +extern void abort (void); +int a[1], b, c, d, f, i; +char e[1]; + +int +main () +{ + for (; i < 1; i++) + if (!d) + { + if (!c) + f = 2; + e[0] &= f ^= 0; + } + b = a[e[0] >> 1 & 1]; + if (b != 0) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57876.c b/gcc/testsuite/gcc.c-torture/execute/pr57876.c new file mode 100644 index 0000000..bcf6912 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr57876.c @@ -0,0 +1,27 @@ +/* PR rtl-optimization/57876 */ + +extern void abort (void); +int a, b = 1, c, *d = &c, f, *g, h, j; +static int e; + +int +main () +{ + int i; + for (i = 0; i < 2; i++) + { + long long k = b; + int l; + for (f = 0; f < 8; f++) + { + int *m = &e; + j = *d; + h = a * j - 1; + *m = (h == 0) < k; + g = &l; + } + } + if (e != 1) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57877.c b/gcc/testsuite/gcc.c-torture/execute/pr57877.c new file mode 100644 index 0000000..2d6ce44 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr57877.c @@ -0,0 +1,28 @@ +/* PR rtl-optimization/57877 */ + +extern void abort (void); +int a, b, *c = &b, e, f = 6, g, h; +short d; + +static unsigned char +foo (unsigned long long p1, int *p2) +{ + for (; g <= 0; g++) + { + short *i = &d; + int *j = &e; + h = *c; + *i = h; + *j = (*i == *p2) < p1; + } + return 0; +} + +int +main () +{ + foo (f, &a); + if (e != 1) + abort (); + return 0; +} |