From: Jakub Jelinek Date: Tue, 29 Jan 2019 21:09:41 +0000 (+0100) Subject: re PR c++/66676 (pragma omp simd aligned(x) results in "internal compiler error:... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b33d65e3023d5366404e99e4a06e6452d1204b83;p=gcc.git re PR c++/66676 (pragma omp simd aligned(x) results in "internal compiler error: Segmentation fault") PR c++/66676 PR ipa/89104 * omp-simd-clone.c (simd_clone_clauses_extract) : Ignore clauses with NULL OMP_CLAUSE_ALIGNED_ALIGNMENT. * gcc.dg/gomp/pr89104.c: New test. From-SVN: r268370 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dbaf5502209..4c5c47a8b6b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,14 @@ +2019-01-29 Jakub Jelinek + + PR c++/66676 + PR ipa/89104 + * omp-simd-clone.c (simd_clone_clauses_extract) + : Ignore clauses with NULL + OMP_CLAUSE_ALIGNED_ALIGNMENT. + 2019-01-29 Vineet Gupta - * gcc/config.gcc: Force .init_array for ARC. + * config.gcc: Force .init_array for ARC. 2019-01-29 Richard Biener @@ -1863,20 +1871,20 @@ * 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 * 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 @@ -2266,12 +2274,6 @@ * gdbinit.in: Turn off pagination for the skip commands, restore it to previous state afterwards. -2019-01-04 Sam Tebbs - - PR gcc/87763 - * gcc.target/aarch64/combine_bfxil.c: Change scan-assembler-times bfxil - count to 18. - 2019-01-04 Jakub Jelinek PR target/88594 diff --git a/gcc/omp-simd-clone.c b/gcc/omp-simd-clone.c index 9b8111c0a4d..388198b4dd4 100644 --- a/gcc/omp-simd-clone.c +++ b/gcc/omp-simd-clone.c @@ -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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c4a8e594de3..749ac361178 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-01-29 Jakub Jelinek + + PR c++/66676 + PR ipa/89104 + * gcc.dg/gomp/pr89104.c: New test. + 2019-01-29 Rainer Orth * gdc.dg/pr89042a.d: Mark as compile test. @@ -1416,6 +1422,12 @@ PR c/88363 * c-c++-common/attributes-4.c: New test. +2019-01-04 Sam Tebbs + + PR gcc/87763 + * gcc.target/aarch64/combine_bfxil.c: Change scan-assembler-times bfxil + count to 18. + 2019-01-04 Thomas Koenig 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 index 00000000000..505fdda9002 --- /dev/null +++ b/gcc/testsuite/gcc.dg/gomp/pr89104.c @@ -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]; +}