diff options
author | Jakub Jelinek <jakub@redhat.com> | 2018-01-24 17:28:47 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2018-01-24 17:28:47 +0100 |
commit | f1542d9aee3d96366a680a470e2754912f0e8ce7 (patch) | |
tree | 174665a92f7c4715370c978fc58ff9d4a0673587 /gcc/omp-simd-clone.c | |
parent | 556d3a2433a6e2207c6f36fe292d89d81f46f924 (diff) | |
download | gcc-f1542d9aee3d96366a680a470e2754912f0e8ce7.zip gcc-f1542d9aee3d96366a680a470e2754912f0e8ce7.tar.gz gcc-f1542d9aee3d96366a680a470e2754912f0e8ce7.tar.bz2 |
re PR middle-end/83977 (ICE in simd_clone_clauses_extract, at omp-simd-clone.c:184)
PR middle-end/83977
* tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
here.
* omp-low.c (create_omp_child_function): Remove "omp declare simd"
attributes from DECL_ATTRIBUTES (decl) without affecting
DECL_ATTRIBUTES (current_function_decl).
* omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
functions with non-NULL DECL_ABSTRACT_ORIGIN.
* c-c++-common/gomp/pr83977-1.c: New test.
* c-c++-common/gomp/pr83977-2.c: New test.
* c-c++-common/gomp/pr83977-3.c: New test.
* gfortran.dg/gomp/pr83977.f90: New test.
From-SVN: r257023
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 b7737a2..fbcb92b 100644 --- a/gcc/omp-simd-clone.c +++ b/gcc/omp-simd-clone.c @@ -1574,6 +1574,10 @@ expand_simd_clones (struct cgraph_node *node) tree attr = lookup_attribute ("omp declare simd", DECL_ATTRIBUTES (node->decl)); if (attr == NULL_TREE + /* Ignore artificial decls with an abstract origin, results of function + cloning, versioning etc. We want to handle certain builtins + with simd attribute, like __builtin_sin. */ + || (DECL_ARTIFICIAL (node->decl) && DECL_ABSTRACT_ORIGIN (node->decl)) || node->global.inlined_to || lookup_attribute ("noclone", DECL_ATTRIBUTES (node->decl))) return; |