aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/omp-low.c4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/gomp/pr92557.c13
4 files changed, 26 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3bd0622..3b9e7a8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-11-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/92557
+ * omp-low.c (omp_clause_aligned_alignment): Punt if TYPE_MODE is not
+ vmode rather than asserting it always is.
+
2019-11-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/92554
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 3e470af..19132f7 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -4086,8 +4086,8 @@ omp_clause_aligned_alignment (tree clause)
if (type == NULL_TREE || TYPE_MODE (type) != mode)
continue;
type = build_vector_type_for_mode (type, vmode);
- /* The functions above are not allowed to return invalid modes. */
- gcc_assert (TYPE_MODE (type) == vmode);
+ if (TYPE_MODE (type) != vmode)
+ continue;
if (TYPE_ALIGN_UNIT (type) > al)
al = TYPE_ALIGN_UNIT (type);
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 22b54da..193a8d8 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-11-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/92557
+ * gcc.dg/gomp/pr92557.c: New test.
+
2019-11-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/92554
diff --git a/gcc/testsuite/gcc.dg/gomp/pr92557.c b/gcc/testsuite/gcc.dg/gomp/pr92557.c
new file mode 100644
index 0000000..3d80ca2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/pr92557.c
@@ -0,0 +1,13 @@
+/* PR tree-optimization/92557 */
+/* { dg-do compile } */
+/* { dg-additional-options "-maltivec" { target powerpc*-*-* } } */
+
+void
+foo (double *p)
+{
+ int i;
+
+#pragma omp simd aligned (p)
+ for (i = 0; i < 1; ++i)
+ p[i] = 7.0;
+}