openmp: Add support for allocator and align modifiers on allocate clauses

As the allocate-2.c testcase shows, this change isn't 100% backwards compatible,
one could have allocate and/or align functions that return an OpenMP allocator
handle and previously it would call those functions and now would use those
names as keywords for the modifiers.  But it allows specify extra alignment
requirements for the allocations.

2021-09-22  Jakub Jelinek  <jakub@redhat.com>

gcc/
	* tree.h (OMP_CLAUSE_ALLOCATE_ALIGN): Define.
	* tree.c (omp_clause_num_ops): Change number of OMP_CLAUSE_ALLOCATE
	arguments from 2 to 3.
	* tree-pretty-print.c (dump_omp_clause): Print allocator() around
	allocate clause allocator and print align if present.
	* omp-low.c (scan_sharing_clauses): Force allocate_map entry even
	for omp_default_mem_alloc if align modifier is present.  If align
	modifier is present, use TREE_LIST to encode both allocator and
	align.
	(lower_private_allocate, lower_rec_input_clauses, create_task_copyfn):
	Handle align modifier on allocator clause if present.
gcc/c-family/
	* c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
gcc/c/
	* c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
	modifiers.
gcc/cp/
	* parser.c (cp_parser_omp_clause_allocate): Parse allocate clause
	modifiers.
	* semantics.c (finish_omp_clauses) <OMP_CLAUSE_ALLOCATE>: Perform
	semantic analysis of OMP_CLAUSE_ALLOCATE_ALIGN.
	* pt.c (tsubst_omp_clauses) <case OMP_CLAUSE_ALLOCATE>: Handle
	also OMP_CLAUSE_ALLOCATE_ALIGN.
gcc/testsuite/
	* c-c++-common/gomp/allocate-6.c: New test.
	* c-c++-common/gomp/allocate-7.c: New test.
	* g++.dg/gomp/allocate-4.C: New test.
libgomp/
	* testsuite/libgomp.c-c++-common/allocate-2.c: New test.
	* testsuite/libgomp.c-c++-common/allocate-3.c: New test.
14 files changed