diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2021-01-03 21:40:04 +0100 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2021-01-03 21:40:04 +0100 |
commit | afae4a55ccaa0de95ea11e5f634084db6ab2f444 (patch) | |
tree | d632cc867d10410ba9fb750523be790b86846ac4 /gcc/tree-nested.c | |
parent | 9d9a82ec8478ff52c7a9d61f58cd2a7b6295b5f9 (diff) | |
parent | d2eb616a0f7bea78164912aa438c29fe1ef5774a (diff) | |
download | gcc-afae4a55ccaa0de95ea11e5f634084db6ab2f444.zip gcc-afae4a55ccaa0de95ea11e5f634084db6ab2f444.tar.gz gcc-afae4a55ccaa0de95ea11e5f634084db6ab2f444.tar.bz2 |
Merge branch 'master' into devel/coarray_native
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r-- | gcc/tree-nested.c | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c index 788883f..a4d82174 100644 --- a/gcc/tree-nested.c +++ b/gcc/tree-nested.c @@ -65,8 +65,11 @@ nested_function_info * nested_function_info::get_create (cgraph_node *node) { if (!nested_function_sum) - nested_function_sum = new function_summary <nested_function_info *> - (symtab); + { + nested_function_sum = new function_summary <nested_function_info *> + (symtab); + nested_function_sum->disable_insertion_hook (); + } return nested_function_sum->get_create (node); } @@ -124,6 +127,9 @@ nested_function_info::release () void maybe_record_nested_function (cgraph_node *node) { + /* All nested functions gets lowered during the construction of symtab. */ + if (symtab->state > CONSTRUCTION) + return; if (DECL_CONTEXT (node->decl) && TREE_CODE (DECL_CONTEXT (node->decl)) == FUNCTION_DECL) { @@ -1435,6 +1441,7 @@ convert_nonlocal_omp_clauses (tree *pclauses, struct walk_stmt_info *wi) } /* FALLTHRU */ case OMP_CLAUSE_NONTEMPORAL: + do_decl_clause_no_supp: /* Like do_decl_clause, but don't add any suppression. */ decl = OMP_CLAUSE_DECL (clause); if (VAR_P (decl) @@ -1447,6 +1454,16 @@ convert_nonlocal_omp_clauses (tree *pclauses, struct walk_stmt_info *wi) } break; + case OMP_CLAUSE_ALLOCATE: + if (OMP_CLAUSE_ALLOCATE_ALLOCATOR (clause)) + { + wi->val_only = true; + wi->is_lhs = false; + convert_nonlocal_reference_op + (&OMP_CLAUSE_ALLOCATE_ALLOCATOR (clause), &dummy, wi); + } + goto do_decl_clause_no_supp; + case OMP_CLAUSE_NOWAIT: case OMP_CLAUSE_ORDERED: case OMP_CLAUSE_DEFAULT: @@ -2197,6 +2214,7 @@ convert_local_omp_clauses (tree *pclauses, struct walk_stmt_info *wi) } /* FALLTHRU */ case OMP_CLAUSE_NONTEMPORAL: + do_decl_clause_no_supp: /* Like do_decl_clause, but don't add any suppression. */ decl = OMP_CLAUSE_DECL (clause); if (VAR_P (decl) @@ -2215,6 +2233,16 @@ convert_local_omp_clauses (tree *pclauses, struct walk_stmt_info *wi) } break; + case OMP_CLAUSE_ALLOCATE: + if (OMP_CLAUSE_ALLOCATE_ALLOCATOR (clause)) + { + wi->val_only = true; + wi->is_lhs = false; + convert_local_reference_op + (&OMP_CLAUSE_ALLOCATE_ALLOCATOR (clause), &dummy, wi); + } + goto do_decl_clause_no_supp; + case OMP_CLAUSE_NOWAIT: case OMP_CLAUSE_ORDERED: case OMP_CLAUSE_DEFAULT: |