re PR c++/66676 (pragma omp simd aligned(x) results in "internal compiler error:...
authorJakub Jelinek <jakub@gcc.gnu.org>
Tue, 29 Jan 2019 21:09:41 +0000 (22:09 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 29 Jan 2019 21:09:41 +0000 (22:09 +0100)
PR c++/66676
PR ipa/89104
* omp-simd-clone.c (simd_clone_clauses_extract)
<case OMP_CLAUSE_ALIGNED>: Ignore clauses with NULL
OMP_CLAUSE_ALIGNED_ALIGNMENT.

* gcc.dg/gomp/pr89104.c: New test.

From-SVN: r268370

gcc/ChangeLog
gcc/omp-simd-clone.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/gomp/pr89104.c [new file with mode: 0644]

index dbaf55022096bf6d8642447048adf80e0d2ee1bf..4c5c47a8b6bdf2ad4c9bba8e4712454188bb8ca2 100644 (file)
@@ -1,6 +1,14 @@
+2019-01-29  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/66676
+       PR ipa/89104
+       * omp-simd-clone.c (simd_clone_clauses_extract)
+       <case OMP_CLAUSE_ALIGNED>: Ignore clauses with NULL
+       OMP_CLAUSE_ALIGNED_ALIGNMENT.
+
 2019-01-29  Vineet Gupta  <vgupta@synopsys.com>
 
-       * gcc/config.gcc: Force .init_array for ARC.
+       * config.gcc: Force .init_array for ARC.
 
 2019-01-29  Richard Biener  <rguenther@suse.de>
 
 
        * config/aarch64/aarch64-option-extensions.def: Define
        AARCH64_OPT_EXTENSION for memtag, rng, sb, ssbs and predres.
-       * gcc/config/aarch64/aarch64.h (AARCH64_FL_RNG): New.
+       * config/aarch64/aarch64.h (AARCH64_FL_RNG): New.
        (AARCH64_FL_MEMTAG, ARCH64_FL_SB, AARCH64_FL_SSBS): New.
        (AARCH64_FL_PREDRES): New.
        (AARCH64_FL_FOR_ARCH8_5): Add AARCH64_FL_SB, AARCH64_FL_SSBS and
        AARCH64_FL_PREDRES by default.
-       * gcc/doc/invoke.texi: Document rng, memtag, sb, ssbs and predres.
+       * doc/invoke.texi: Document rng, memtag, sb, ssbs and predres.
 
 2018-01-09  Sudakshina Das  <sudi.das@arm.com>
 
        * config/aarch64/aarch64-arches.def: Define AARCH64_ARCH for
        ARMv8.5-A.
-       * gcc/config/aarch64/aarch64.h (AARCH64_FL_V8_5): New.
+       * config/aarch64/aarch64.h (AARCH64_FL_V8_5): New.
        (AARCH64_FL_FOR_ARCH8_5, AARCH64_ISA_V8_5): New.
-       * gcc/doc/invoke.texi: Document ARMv8.5-A.
+       * doc/invoke.texi: Document ARMv8.5-A.
 
 2019-01-09  Alejandro Martinez  <alejandro.martinezvicente@arm.com>
 
        * gdbinit.in: Turn off pagination for the skip commands, restore
        it to previous state afterwards.
 
-2019-01-04  Sam Tebbs  <sam.tebbs@arm.com>
-
-       PR gcc/87763
-       * gcc.target/aarch64/combine_bfxil.c: Change scan-assembler-times bfxil
-       count to 18.
-
 2019-01-04  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/88594
index 9b8111c0a4db9b9f3879357e4ca266e615674342..388198b4dd4b4b743495593cafdb57da7e272b93 100644 (file)
@@ -242,6 +242,10 @@ simd_clone_clauses_extract (struct cgraph_node *node, tree clauses,
          }
        case OMP_CLAUSE_ALIGNED:
          {
+           /* Ignore aligned (x) for declare simd, for the ABI we really
+              need an alignment specified.  */
+           if (OMP_CLAUSE_ALIGNED_ALIGNMENT (t) == NULL_TREE)
+             break;
            tree decl = OMP_CLAUSE_DECL (t);
            int argno = tree_to_uhwi (decl);
            clone_info->args[argno].alignment
index c4a8e594de3490c9b48696dd9114df4f01dfb9e0..749ac361178bbbd7096aeae9050a8d4199dd3d95 100644 (file)
@@ -1,3 +1,9 @@
+2019-01-29  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/66676
+       PR ipa/89104
+       * gcc.dg/gomp/pr89104.c: New test.
+
 2019-01-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * gdc.dg/pr89042a.d: Mark as compile test.
        PR c/88363
        * c-c++-common/attributes-4.c: New test.
 
+2019-01-04  Sam Tebbs  <sam.tebbs@arm.com>
+
+       PR gcc/87763
+       * gcc.target/aarch64/combine_bfxil.c: Change scan-assembler-times bfxil
+       count to 18.
+
 2019-01-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR fortran/48543
diff --git a/gcc/testsuite/gcc.dg/gomp/pr89104.c b/gcc/testsuite/gcc.dg/gomp/pr89104.c
new file mode 100644 (file)
index 0000000..505fdda
--- /dev/null
@@ -0,0 +1,11 @@
+/* PR c++/66676 */
+/* PR ipa/89104 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fopenmp-simd" } */
+
+#pragma omp declare simd uniform (x) aligned (x)
+int
+foo (int *x, int y)
+{
+  return x[y];
+}