aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gfortran.dg/pr101026.f11
-rw-r--r--gcc/tree-vect-slp.c4
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/testsuite/gfortran.dg/pr101026.f b/gcc/testsuite/gfortran.dg/pr101026.f
new file mode 100644
index 0000000..9576d88
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr101026.f
@@ -0,0 +1,11 @@
+! { dg-do compile }
+! { dg-options "-Ofast -frounding-math" }
+ SUBROUTINE PASSB4 (CC,CH)
+ DIMENSION CC(IDO,4,L1), CH(IDO,L1,*)
+ DO 103 I=2,IDO,2
+ TI4 = CC0-CC(I,4,K)
+ CI4 = TI1-TI4
+ CH(I-1,K,4) = CI4
+ CH(I,K,4) = CI4
+ 103 CONTINUE
+ END
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 6237a61..897bd6f 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -1860,7 +1860,9 @@ vect_build_slp_tree_2 (vec_info *vinfo, slp_tree node,
chains.quick_push (chain.copy ());
chain.truncate (0);
}
- if (chains.length () == group_size)
+ if (chains.length () == group_size
+ /* We cannot yet use SLP_TREE_CODE to communicate the operation. */
+ && op_stmt_info)
{
/* Now we have a set of chains with the same length. */
/* 1. pre-sort according to def_type and operation. */