aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2017-08-08 12:52:22 +0000
committerWilliam Schmidt <wschmidt@gcc.gnu.org>2017-08-08 12:52:22 +0000
commitb115e80367277d58bc5476c3c748cf7ec2432a10 (patch)
treeee1285d136d13ca5a855ccee90ea0165ff209691 /gcc/testsuite
parent51bd28edcbf49844d696c38af4945ce5fc25ba15 (diff)
downloadgcc-b115e80367277d58bc5476c3c748cf7ec2432a10.zip
gcc-b115e80367277d58bc5476c3c748cf7ec2432a10.tar.gz
gcc-b115e80367277d58bc5476c3c748cf7ec2432a10.tar.bz2
re PR tree-optimization/81354 (Segmentation fault in SSA Strength Reduction using -O3)
[gcc] 2017-08-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR tree-optimization/81354 * gimple-ssa-strength-reduction.c (create_add_on_incoming_edge): Insert on edges rather than explicitly creating landing pads. (analyze_candidates_and_replace): Commit edge inserts. [gcc/testsuite] 2017-08-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR tree-optimization/81354 * g++.dg/torture/pr81354.C: New file. From-SVN: r250955
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/torture/pr81354.C24
2 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 1fec0ec..e2d081d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2017-08-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/81354
+ * g++.dg/torture/pr81354.C: New file.
+
2017-08-08 Richard Biener <rguenther@suse.de>
PR middle-end/81719
diff --git a/gcc/testsuite/g++.dg/torture/pr81354.C b/gcc/testsuite/g++.dg/torture/pr81354.C
new file mode 100644
index 0000000..b3ba8f0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr81354.C
@@ -0,0 +1,24 @@
+// PR81354 reported this test as crashing in a limited range of revisions.
+// { dg-do compile }
+
+struct T { double a; double b; };
+
+void foo(T Ad[], int As[2])
+{
+ int j;
+ int i;
+ int Bs[2] = {0,0};
+ T Bd[16];
+
+ for (j = 0; j < 4; j++) {
+ for (i = 0; i + 1 <= j + 1; i++) {
+ Ad[i + As[0] * j] = Bd[i + Bs[0] * j];
+ }
+
+ i = j + 1; // <- comment out this line and it does not crash
+ for (; i + 1 < 5; i++) {
+ Ad[i + As[0] * j].a = 0.0;
+ Ad[i + As[0] * j].b = 0.0;
+ }
+ }
+}