summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-03-09 21:05:40 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2016-03-09 21:05:40 +0100
commit2bd8090ff56fdf1ca9ed76a9668a30f4e7d8f949 (patch)
treef35508be294e118a3e7415d51eb9fb7035a843fa /gcc/testsuite/gcc.c-torture
parent96b3c82df1fffef2f30045d571589be8d866aaf4 (diff)
downloadgcc-2bd8090ff56fdf1ca9ed76a9668a30f4e7d8f949.tar.gz
re PR middle-end/70127 (wrong code on x86_64-linux-gnu at -O3 in 32-bit and 64-bit modes)
PR tree-optimization/70127 * fold-const.c (operand_equal_p): Revert the 2015-10-28 change. * gcc.c-torture/execute/pr70127.c: New test. From-SVN: r234090
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr70127.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr70127.c b/gcc/testsuite/gcc.c-torture/execute/pr70127.c
new file mode 100644
index 00000000000..a0bf3c02830
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr70127.c
@@ -0,0 +1,23 @@
+/* PR tree-optimization/70127 */
+
+struct S { int f; signed int g : 2; } a[1], c = {5, 1}, d;
+short b;
+
+__attribute__((noinline, noclone)) void
+foo (int x)
+{
+ if (x != 1)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ while (b++ <= 0)
+ {
+ struct S e = {1, 1};
+ d = e = a[0] = c;
+ }
+ foo (a[0].g);
+ return 0;
+}