Thomas Schwinge [Thu, 26 Mar 2020 16:34:01 +0000 (17:34 +0100)]
Really fix og9 "Fix hang when running oacc exec with CUDA 9.0 nvprof"
In my yesterday's commit 9ae129017c7fc1fa638d6beedd3802b515ca692b 'Fix og9 "Fix
hang when running oacc exec with CUDA 9.0 nvprof"', I wrongly blamed the og9
"Fix hang when running oacc exec with CUDA 9.0 nvprof" to be responsible for
the hang being back, when in fact it's only the later og9 "OpenACC Profiling
Interface (incomplete)" backport from trunk that introduced the problem.
The confusing thing was that the og9 "Fix hang when running oacc exec with CUDA
9.0 nvprof" commit appears *before* the og9 "OpenACC Profiling Interface
(incomplete)" backport that it relates to.
And, in addition to that, I pushed the wrong (incomplete) version of my fix.
libgomp/
* oacc-init.c (acc_init_1): Move other 'acc_init_state' logic to
where it belongs.
Thomas Schwinge [Wed, 25 Mar 2020 16:57:02 +0000 (17:57 +0100)]
Fix og9 "Fix hang when running oacc exec with CUDA 9.0 nvprof"
Compared to the original og7 version, and still-good og8 version, the og9
version of this patch did get its code altered in a way so that it no longer
resolves the problem it's meant to resolve -- the hang was back.
libgomp/
* oacc-init.c (acc_init_1): Move 'acc_init_state' logic to where
it belongs.
This merges all patches after releases/gcc-9.1.0 until and including
to the commit belonging to the tag 'releases/gcc-9.2.0'. That's r9-7613-ga0c06cc27d2146b7d86758ffa236516c6143d62c on the releases/gcc-9
branch.
Paul Thomas [Thu, 5 Mar 2020 10:01:59 +0000 (11:01 +0100)]
Fix ICE in trans_associate_var
2020-03-05 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/92976
* match.c (select_type_set_tmp): Variable 'selector' to replace
select_type_stack->selector. If the selector array spec has
explicit bounds, make the temporary's bounds deferred.
2020-03-05 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/92976
* gfortran.dg/select_type_48.f90 : New test.
Marek Polacek [Wed, 4 Mar 2020 23:49:37 +0000 (18:49 -0500)]
c++: Fix mismatch in template argument deduction [PR90505]
2020-03-03 Jason Merrill <jason@redhat.com>
Marek Polacek <polacek@redhat.com>
PR c++/90505 - mismatch in template argument deduction.
* pt.c (tsubst): Don't reduce the template level of template
parameters when tf_partial.
* g++.dg/template/deduce4.C: New test.
* g++.dg/template/deduce5.C: New test.
* g++.dg/template/deduce6.C: New test.
* g++.dg/template/deduce7.C: New test.
Jakub Jelinek [Thu, 27 Feb 2020 08:38:12 +0000 (09:38 +0100)]
maintainer-scripts: Speed up git clone in gcc_release
When doing the 8.4-rc1, I've noticed (probably also because of the dying
disk on sourceware) that git clone is extremely slow, and furthermore when
all of us have some local snapshots, it is a waste of resources to download
everything again. Especially for the -f runs when we'll need to wait until
git tag -s asks us for a gpg password interactively.
The following patch adds an option through which one can point the script
at a local gcc .git directory from which it can --dissociate --reference ...
during cloning to speed it up.
2020-02-27 Jakub Jelinek <jakub@redhat.com>
* gcc_release: Add support for -b local-git-repo argument.
gcc/
* ira.c (setup_alloc_regs): Setup no_unit_alloc_regs for
frame pointer in multiple registers.
(ira_setup_eliminable_regset): Setup eliminable_regset,
ira_no_alloc_regs and regs_ever_live for frame pointer in
multiple registers.
gcc/
* config/gcn/gcn.c (gcn_regno_reg_class): Return VCC_CONDITIONAL_REG
register class for VCC_LO and VCC_HI.
(gcn_spill_class): Use SGPR_REGS to spill registers in
VCC_CONDITIONAL_REG.
gcc/
* config/gcn/gcn.c (default_requested_args): New.
(gcn_parse_amdgpu_hsa_kernel_attribute): Initialize requested args
set with default_requested_args.
(gcn_conditional_register_usage): Limit register usage of non-kernel
functions. Reassign fixed registers if a non-standard set of args is
requested.
* config/gcn/gcn.h (FIXED_REGISTERS): Fix registers according to ABI.
gcc/
* config/gcn/gcn.c (MAX_NORMAL_SGPR_COUNT, MAX_NORMAL_VGPR_COUNT): New.
(gcn_conditional_register_usage): Use constants in place of hard-coded
values.
(gcn_hsa_declare_function_name): Set lower bound for number of
SGPRs/VGPRs in non-leaf kernels to MAX_NORMAL_SGPR_COUNT and
MAX_NORMAL_VGPR_COUNT.
Julian Brown [Mon, 14 Oct 2019 20:12:39 +0000 (13:12 -0700)]
[og9] Re-do OpenACC private variable resolution
gcc/
* config/gcn/gcn-protos.h (gcn_goacc_adjust_gangprivate_decl): Rename
to...
(gcn_goacc_adjust_private_decl): ...this.
* config/gcn/gcn-tree.c (diagnostic-core.h): Include.
(gcn_goacc_adjust_gangprivate_decl): Rename to...
(gcn_goacc_adjust_private_decl): ...this. Add LEVEL parameter.
* config/gcn/gcn.c (TARGET_GOACC_ADJUST_GANGPRIVATE_DECL): Rename to...
(TARGET_GOACC_ADJUST_PRIVATE_DECL): ...this.
* config/nvptx/nvptx.c (tree-pretty-print.h): Include.
(nvptx_goacc_adjust_private_decl): New function.
(TARGET_GOACC_ADJUST_PRIVATE_DECL): Define hook using above function.
* doc/tm.texi.in (TARGET_GOACC_ADJUST_GANGPRIVATE_DECL): Rename to...
(TARGET_GOACC_ADJUST_PRIVATE_DECL): ...this.
* doc/tm.texi: Regenerated.
* internal-fn.c (expand_UNIQUE): Handle IFN_UNIQUE_OACC_PRIVATE.
* internal-fn.h (IFN_UNIQUE_CODES): Add OACC_PRIVATE.
* omp-low.c (omp_context): Remove oacc_partitioning_levels field.
(lower_oacc_reductions): Add PRIVATE_MARKER parameter. Insert before
fork.
(lower_oacc_head_tail): Add PRIVATE_MARKER parameter. Modify its
gimple call arguments as appropriate. Don't set
oacc_partitioning_levels in omp_context. Pass private_marker to
lower_oacc_reductions.
(oacc_record_private_var_clauses): Don't check for NULL ctx.
(make_oacc_private_marker): New function.
(lower_omp_for): Only call oacc_record_vars_in_bind for
OpenACC contexts. Create private marker and pass to
lower_oacc_head_tail.
(lower_omp_target): Remove unnecessary call to
oacc_record_private_var_clauses. Remove call to mark_oacc_gangprivate.
Create private marker and pass to lower_oacc_reductions.
(process_oacc_gangprivate_1): Remove.
(lower_omp_1): Only call oacc_record_vars_in_bind for OpenACC. Don't
iterate over contexts calling process_oacc_gangprivate_1.
(omp-offload.c (oacc_loop_xform_head_tail): Treat
private-variable markers like fork/join when transforming head/tail
sequences.
(execute_oacc_device_lower): Use IFN_UNIQUE_OACC_PRIVATE instead of
"oacc gangprivate" attributes to determine partitioning level of
variables.
* omp-sese.c (find_gangprivate_vars): New function.
(find_local_vars_to_propagate): Use GANGPRIVATE_VARS parameter instead
of "oacc gangprivate" attribute to determine which variables are
gang-private.
(oacc_do_neutering): Use find_gangprivate_vars.
* target.def (adjust_gangprivate_decl): Rename to...
(adjust_private_decl): ...this. Update documentation (briefly).
libgomp/
* testsuite/libgomp.oacc-fortran/gangprivate-attrib-1.f90: Use
oaccdevlow dump and update scanned output.
* testsuite/libgomp.oacc-fortran/gangprivate-attrib-2.f90: Likewise.
Add missing atomic to force worker partitioning for test variable.
Tobias Burnus [Tue, 8 Oct 2019 12:08:49 +0000 (14:08 +0200)]
Fortran - Improve OpenMP/OpenACC diagnostic
Backported from mainline.
gcc/fortran/
* match.h (gfc_match_omp_eos_error): Renamed from gfc_match_omp_eos.
* openmp.c (gfc_match_omp_eos): Make static.
(gfc_match_omp_eos_error): New.
* parse.c (matchs, matchdo, matchds): Do as done for 'matcho' -
if error occurred after OpenMP/OpenACC directive matched, do not
try other directives.
(decode_oacc_directive, decode_omp_directive): Call new function
instead.
Backported from mainline
2019-10-02 Tobias Burnus <tobias@codesourcery.com>
* openmp.c (gfc_match_omp_clauses): Show a clause-parsing
error if none was rised before.
* parse.c (matcha, matcho): If error occurred after
OpenMP/OpenACC directive matched, do not try other directives.
Julian Brown [Fri, 20 Sep 2019 20:53:10 +0000 (13:53 -0700)]
[og9] Handle references in OpenACC "private" clauses
gcc/
* gimplify.c (localize_reductions): Rewrite references for
OMP_CLAUSE_PRIVATE also.
libgomp/
* testsuite/libgomp.oacc-fortran/privatized-ref-1.f95: New test.
* testsuite/libgomp.oacc-c++/privatized-ref-2.C: New test.
* testsuite/libgomp.oacc-c++/privatized-ref-3.C: New test.
* openmp.c (gfc_resolve_oacc_declare): Reject all
non variables but accept function result variables.
* trans-openmp.c (gfc_trans_omp_clauses): Handle
function-result variables for remaing cases.
* gfortran.dg/goacc/parameter.f95: Change
dg-error as it is now detected earlier.
* gfortran.dg/goacc/pr85701.f90: Modify to
use a separate result variable.
* gfortran.dg/goacc/pr78260.f90: New.
* gfortran.dg/goacc/pr78260-2.f90: New.
* gfortran.dg/gomp/pr78260.f90: New.
* gfortran.dg/gomp/pr78260-2.f90: New.
* gfortran.dg/gomp/pr78260-3.f90: New.
* gfortran.dg/goacc/classify-kernels-unparallelized.f95: Add
one dg-message for additional -fopt-info-optimized-omp output.
* gfortran.dg/goacc/classify-kernels.f95: Likewise.
* gfortran.dg/goacc/kernels-decompose-1.f95: Change 'note' to
'optimized' in dg-message.
Julian Brown [Wed, 11 Sep 2019 15:31:38 +0000 (08:31 -0700)]
[og9] A couple of GCN-specific test fixes
libgomp/
* testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Only run
NVidia-specific test on NVidia hardware.
* testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c (main):
Initialise for acc_device_gcn if testing on AMD GCN.
* testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c: Support
AMD GCN.
* testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c (check): Skip
vector dimension test for AMD GCN.
Julian Brown [Sun, 8 Sep 2019 23:04:54 +0000 (16:04 -0700)]
[og9] Improve async serialize implementation for AMD GCN libgomp plugin
libgomp/
* plugin/plugin-gcn.c (struct placeholder, struct asyncwait_info,
enum entry_type): New.
(queue_entry): Use entry_type enum for tag. Add asyncwait and
placeholder event type fields.
(wait_for_queue_nonfull): New function.
(queue_push_launch): Use above function instead of raising a fatal
error on queue-full condition. Use KERNEL_LAUNCH instead of hardwired
0.
(queue_push_callback): Use wait_for_queue_nonfull instead of open-coded
wait sequence. Use CALLBACK instead of hardwired 1.
(queue_push_asyncwait, queue_push_placeholder): New.
(execute_queue_entry): Implement ASYNC_WAIT and ASYNC_PLACEHOLDER event
types.
(GOMP_OFFLOAD_openacc_async_serialize): Use queue_push_placeholder and
queue_push_asyncwait instead of host-synchronized wait_queue calls.
* testsuite/libgomp.oacc-c-c++-common/data-2-lib.c (main): Add missing
asynchronous waits.
* testsuite/libgomp.oacc-c-c++-common/data-2.c (main): Likewise.
Andrew Stubbs [Fri, 19 Jul 2019 14:45:07 +0000 (15:45 +0100)]
Fix relocations with multiple devices.
2019-09-10 Andrew Stubbs <ams@codesourcery.com>
libgomp/
* plugin/plugin-gcn.c (obstack_chunk_alloc): Delete.
(obstack_chunk_free): Delete.
(obstack.h): Remove include.
(create_and_finalize_hsa_program): Remove all unmodified_sections_os
and use sections directly from the issue.
Use "or 0x80" instead of SHT_NOTE to hide relocations, and then
simply recognise that ourselves.
Andrew Stubbs [Fri, 19 Jul 2019 11:00:53 +0000 (12:00 +0100)]
Move offload data into GPU memory.
2019-09-09 Andrew Stubbs <ams@codesourcery.com>
gcc/
* config/gcn/gcn-run.c (heap_region): New global variable.
(struct hsa_runtime_fn_info): Add hsa_memory_assign_agent_fn.
(init_hsa_runtime_functions): Initialize hsa_memory_assign_agent.
(get_kernarg_region): Move contents to ....
(get_memory_region): .... here.
(get_heap_region): New function.
(init_device): Initialize the heap_region.
(device_malloc): Add region parameter.
(struct kernargs): Move heap ....
(heap): ... to global scope.
(main): Allocate heap separate to kernargs.
libgomp/
* plugin/plugin-gcn.c (struct hsa_runtime_fn_info): Add
hsa_memory_assign_agent_fn.
(struct agent_info): Add data_region.
(init_hsa_runtime_functions): Initialize hsa_memory_assign_agent.
(get_kernarg_memory_region): Move contents to new function ...
(get_memory_region): ... here.
(get_data_memory_region): New function.
(GOMP_OFFLOAD_get_property): Use data_region, not kernarg_region.
(GOMP_OFFLOAD_init_device): Initialize data_region.
(create_and_finalize_hsa_program): Use data_region, not
kernarg_region, and assign heap to device agent.
(GOMP_OFFLOAD_alloc_by_agent): Likewise.
(image_address_p): Delete function.
(struct copy_data): Remove use_hsa_memory_copy.
(copy_data): Always use hsa_memory_copy.
(queue_push_copy): Remove use_hsa_memory_copy.
(GOMP_OFFLOAD_dev2host): Always use hsa_memory_copy.
(GOMP_OFFLOAD_host2dev): Likewise.
(GOMP_OFFLOAD_dev2dev): Likewise.
(gcn_exec): Use hsa_memory_copy.
(GOMP_OFFLOAD_openacc_async_host2dev): Always use hsa_memory_copy.
(GOMP_OFFLOAD_openacc_async_dev2host): Likewise.
Julian Brown [Fri, 9 Aug 2019 20:01:33 +0000 (13:01 -0700)]
[og9] Wait at end of OpenACC asynchronous kernels regions
gcc/
* omp-oacc-kernels.c (add_wait): New function, split out of...
(add_async_clauses_and_wait): ...here. Call new outlined function.
(decompose_kernels_region_body): Add wait at the end of
explicitly-asynchronous kernels regions.
Julian Brown [Wed, 31 Jul 2019 12:38:42 +0000 (05:38 -0700)]
[og9] Update parallel-dims.c and serial-dims.c warning line numbering.
* testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Use relative
line numbers for warning.
* testsuite/libgomp.oacc-c-c++-common/serial-dims.c: Likewise.
libatomic/
PR other/79543
* acinclude.m4 (LIBAT_CHECK_LINKER_FEATURES): Fix GNU ld --version
scanning to conform to the GNU Coding Standards.
* configure: Regenerate.
libffi/
PR other/79543
* acinclude.m4 (LIBAT_CHECK_LINKER_FEATURES): Fix GNU ld --version
scanning to conform to the GNU Coding Standards.
* configure: Regenerate.
libgomp/
PR other/79543
* acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Fix GNU ld --version
scanning to conform to the GNU Coding Standards.
* configure: Regenerate.
libitm/
PR other/79543
* acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Fix GNU ld --version
scanning to conform to the GNU Coding Standards.
* configure: Regenerate.
libstdc++-v3/
PR other/79543
* acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
scanning to conform to the GNU Coding Standards.
* configure: Regenerate.
Julian Brown [Fri, 5 Jul 2019 01:14:41 +0000 (18:14 -0700)]
Assumed-size arrays with non-lexical data mappings
gcc/
* gimplify.c (gimplify_adjust_omp_clauses_1): Raise error for
assumed-size arrays in map clauses for Fortran/OpenMP.
* omp-low.c (lower_omp_target): Set the size of assumed-size Fortran
arrays to one to allow use of data already mapped on the offload device.
gcc/fortran/
* trans-openmp.c (gfc_omp_finish_clause): Change clauses mapping
assumed-size arrays to use the GOMP_MAP_FORCE_PRESENT map type.
Julian Brown [Wed, 20 Feb 2019 13:21:15 +0000 (05:21 -0800)]
Support Fortran 2003 class pointers in OpenACC
gcc/
* gimplify.c (insert_struct_comp_map): Handle GOMP_MAP_ATTACH_DETACH.
(gimplify_scan_omp_clauses): Separate out handling of OACC_ENTER_DATA
and OACC_EXIT_DATA. Remove GOMP_MAP_POINTER and GOMP_MAP_TO_PSET
mappings, apart from those following GOMP_MAP_DECLARE_{,DE}ALLOCATE.
Handle GOMP_MAP_ATTACH_DETACH.
* tree-pretty-print.c (dump_omp_clause): Support GOMP_MAP_ATTACH_DETACH.
Print "bias" not "len" for attach/detach clause types.
libgomp/
* oacc-parallel.c (GOACC_enter_exit_data): Fix optional arguments for
changes to clause stripping in enter data/exit data directives.
* testsuite/libgomp.oacc-fortran/class-ptr-param.f95: New test.
* testsuite/libgomp.oacc-fortran/classtypes-1.f95: New test.
* testsuite/libgomp.oacc-fortran/classtypes-2.f95: New test.
* testsuite/libgomp.oacc-fortran/derivedtype-1.f95: New test.
* testsuite/libgomp.oacc-fortran/derivedtype-2.f95: New test.
* testsuite/libgomp.oacc-fortran/multidim-slice.f95: New test.
Julian Brown [Tue, 28 May 2019 15:42:10 +0000 (08:42 -0700)]
Apply gangprivate attribute to innermost decl
...and fix parallelism-level calculation when applying the attribute.
gcc/
* omp-low.c (mark_oacc_gangprivate): Add CTX parameter. Use to look up
correct decl to add attribute to.
(lower_omp_for): Move "oacc gangprivate" processing from here...
(process_oacc_gangprivate_1): ...to here. New function.
(lower_omp_target): Update call to mark_oacc_gangprivate.
(execute_lower_omp): Call process_oacc_gangprivate_1 for each OMP
context.
libgomp/
* testsuite/libgomp.oacc-fortran/gangprivate-attrib-2.f90: New test.
Andrew Jenner [Wed, 30 Jan 2019 17:38:46 +0000 (09:38 -0800)]
Link libquadmath in Fortran libgomp tests
When invoking gcc to compile fortran code, fortran.exp is currently adding the
options -lgfortran -foffload=-lgfortran to the gcc command line. libgfortran
statically links to libquadmath and the gfortran driver invokes the linker
with -lquadmath as well as -lgfortran so fortran.exp should do so too.
Julian Brown [Mon, 20 May 2019 23:31:41 +0000 (16:31 -0700)]
Fix warning syntax and typos in two libgomp tests
libgomp/
* testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c: Expect
"optimized:" not "note:" in warnings.
* testsuite/libgomp.oacc-c-c++-common/serial-dims.c: Fix typos in
warnings.
Julian Brown [Sun, 19 May 2019 17:42:20 +0000 (10:42 -0700)]
Fix references declared in lexically-enclosing OpenACC data region
gcc/fortran/
* trans-openmp.c (gfc_omp_finish_clause): Guard addition of clauses for
pointers with DECL_P.
gcc/
* gimplify.c (oacc_array_mapping_info): Add REF field.
(gimplify_scan_omp_clauses): Initialise above field for data blocks
passed by reference.
(gomp_oacc_needs_data_present): Handle references.
(gimplify_adjust_omp_clauses_1): Handle references and optional
arguments for variables declared in lexically-enclosing OpenACC data
region.
Julian Brown [Thu, 16 May 2019 12:45:35 +0000 (05:45 -0700)]
Avoid introducing 'create' mapping clauses for loop index variables in kernels regions
gcc/
* omp-oacc-kernels.c (find_omp_for_index_vars_1,
find_omp_for_index_vars): New functions.
(maybe_build_inner_data_region): Add IDX_VARS argument. Don't add
CREATE mapping clauses for loop index variables. Set TREE_ADDRESSABLE
flag on newly-mapped declarations as a side effect.
(decompose_kernels_region_body): Call find_omp_for_index_vars. Don't
create PRESENT clause for loop index variables. Pass index variable
set to maybe_build_inner_data_region.
Julian Brown [Wed, 9 Jan 2019 11:41:04 +0000 (03:41 -0800)]
Update OpenACC version to 2.6
gcc/c-family/
* c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
gcc/doc/
* invoke.texi: Update mention of OpenACC version to 2.6.
gcc/fortran/
* cpp.c (cpp_define_builtins): Update _OPENACC define to 201711.
* gfortran.texi: Update mentions of OpenACC version to 2.6.
* intrinsic.texi: Likewise.
gcc/testsuite/
* c-c++-common/cpp/openacc-define-3.c: Update expected value for
_OPENACC define.
* gfortran.dg/openacc-define-3.f90: Likewise.
libgomp/
* libgomp.texi: Update mentions of OpenACC version to 2.6. Update
section numbers to match version 2.6 of the spec.
* openacc.f90 (openacc_version): Update to 201711.
* openacc_lib.h (openacc_version): Update to 201711.
* testsuite/libgomp.oacc-fortran/openacc_version-1.f: Update expected
openacc_version to 201711.
* testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise.
Thomas Schwinge [Tue, 8 Jan 2019 14:21:35 +0000 (15:21 +0100)]
Add OpenACC 2.6 `acc_get_property' support: restore Intel MIC offloading
The "OpenACC 2.6 `acc_get_property' support" changes regressed the relevant
libgomp OpenMP execution test cases to no longer consider Intel MIC offloading
because of:
libgomp: while loading libgomp-plugin-intelmic.so.1: [...]/libgomp-plugin-intelmic.so.1: undefined symbol: GOMP_OFFLOAD_get_property
liboffloadmic/
* plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_get_property):
New function.
Thomas Schwinge [Fri, 1 Feb 2019 17:12:05 +0000 (18:12 +0100)]
Adjust parallelism of loops in gang-single parts of OpenACC kernels regions: "struct adjust_nested_loop_clauses_wi_info"
The current code apparently is too freaky at least for for GCC 4.6:
[...]/gcc/omp-oacc-kernels.c: In function 'tree_node* transform_kernels_loop_clauses(gimple*, tree, tree, tree, tree)':
[...]/gcc/omp-oacc-kernels.c:584:10: error: expected identifier before numeric constant
[...]/gcc/omp-oacc-kernels.c: In lambda function:
[...]/gcc/omp-oacc-kernels.c:584:25: error: expected '{' before '=' token
[...]/gcc/omp-oacc-kernels.c: In function 'tree_node* transform_kernels_loop_clauses(gimple*, tree, tree, tree, tree)':
[...]/gcc/omp-oacc-kernels.c:584:25: warning: lambda expressions only available with -std=c++0x or -std=gnu++0x [enabled by default]
[...]/gcc/omp-oacc-kernels.c:584:28: error: no match for 'operator=' in '{} = & loop_gang_clause'
[...]
gcc/
* omp-oacc-kernels.c (struct adjust_nested_loop_clauses_wi_info): New.
(adjust_nested_loop_clauses, transform_kernels_loop_clauses): Use it.