aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-11-19 09:51:31 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-11-19 09:51:31 +0100
commitb51d4ebc38cf4852b9c7746647526097f5bd00e9 (patch)
treef14057267b4c9ba30d91f5b371ec18c814ee1be5 /gcc
parent04c4599d30b1eb7c21d39b15a685aa1d9b8bf968 (diff)
downloadgcc-b51d4ebc38cf4852b9c7746647526097f5bd00e9.zip
gcc-b51d4ebc38cf4852b9c7746647526097f5bd00e9.tar.gz
gcc-b51d4ebc38cf4852b9c7746647526097f5bd00e9.tar.bz2
re PR tree-optimization/92557 (ICE in omp_clause_aligned_alignment, at omp-low.c:4090)
PR tree-optimization/92557 * omp-low.c (omp_clause_aligned_alignment): Punt if TYPE_MODE is not vmode rather than asserting it always is. * gcc.dg/gomp/pr92557.c: New test. From-SVN: r278432
Diffstat (limited to 'gcc')
-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;
+}