summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-08-13 20:28:12 +0100
committerRichard Sandiford <richard.sandiford@linaro.org>2017-11-20 11:42:55 +0000
commitc1802e041d9b69f83ff072a323840bb0deaa5a60 (patch)
tree85206e008adce16875efb582671748d8553a282a
parent5469f7dda621b93d195ed0b8d770a89021b99414 (diff)
downloadgcc-c1802e041d9b69f83ff072a323840bb0deaa5a60.tar.gz
Work around PR81082
-rw-r--r--gcc/fold-const.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-15.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr23294.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr63586-2.c2
4 files changed, 7 insertions, 5 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index cd278756b14..912411f820f 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -7187,6 +7187,8 @@ fold_plusminus_mult_expr (location_t loc, enum tree_code code, tree type,
fold_convert_loc (loc, type, alt1)),
fold_convert_loc (loc, type, same));
+ return NULL_TREE;
+
/* Same may be zero and thus the operation 'code' may overflow. Likewise
same may be minus one and thus the multiplication may overflow. Perform
the operations in an unsigned type. */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-15.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-15.c
index dce6ad57a04..b437518487d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-15.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-15.c
@@ -19,7 +19,7 @@ int bla(void)
}
/* Since the loop is removed, there should be no addition. */
-/* { dg-final { scan-tree-dump-times " \\+ " 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \\+ " 0 "optimized" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
/* The if from the loop header copying remains in the code. */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr23294.c b/gcc/testsuite/gcc.dg/tree-ssa/pr23294.c
index 8f9fffb1647..f6b51907d6c 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr23294.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr23294.c
@@ -31,6 +31,6 @@ int f6(int a, int b)
return 6*a - 2*b;
}
-/* { dg-final { scan-tree-dump-times "a_..D. \\\* 5" 3 "optimized" } } */
-/* { dg-final { scan-tree-dump-times " \\\* 2" 3 "optimized" } } */
-/* { dg-final { scan-tree-dump-not "\\\* 6" "optimized" } } */
+/* { dg-final { scan-tree-dump-times "a_..D. \\\* 5" 3 "optimized" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times " \\\* 2" 3 "optimized" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-not "\\\* 6" "optimized" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr63586-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr63586-2.c
index 0dcfe327358..578ca10fb38 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr63586-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr63586-2.c
@@ -28,5 +28,5 @@ int f1_int (int x)
/* { dg-final { scan-tree-dump-times "\\\* 8\\\.0e\\\+0" 1 "reassoc1" } } */
/* { dg-final { scan-tree-dump-times "\\\* 5\\\.0e\\\+0" 1 "reassoc1" } } */
-/* { dg-final { scan-tree-dump-times "\\\* 6" 1 "reassoc1" } } */
+/* { dg-final { scan-tree-dump-times "\\\* 6" 1 "reassoc1" { xfail *-*-* } } } */