diff options
author | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-01-29 22:09:41 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-01-29 22:09:41 +0100 |
commit | b33d65e3023d5366404e99e4a06e6452d1204b83 (patch) | |
tree | e3a269ce330ab0384175910032b26d48999fe1d4 /gcc/omp-simd-clone.c | |
parent | fddbc19325a3e93a5f72668baa4e4bdeea9ebc7f (diff) | |
download | gcc-b33d65e3023d5366404e99e4a06e6452d1204b83.zip gcc-b33d65e3023d5366404e99e4a06e6452d1204b83.tar.gz gcc-b33d65e3023d5366404e99e4a06e6452d1204b83.tar.bz2 |
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)
<case OMP_CLAUSE_ALIGNED>: Ignore clauses with NULL
OMP_CLAUSE_ALIGNED_ALIGNMENT.
* gcc.dg/gomp/pr89104.c: New test.
From-SVN: r268370
Diffstat (limited to 'gcc/omp-simd-clone.c')
-rw-r--r-- | gcc/omp-simd-clone.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/omp-simd-clone.c b/gcc/omp-simd-clone.c index 9b8111c..388198b 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 |