[ was: Re: [PATCH,WIP] Use functional parameters for data mappings in
OpenACC child functions ]
On 02/06/2018 12:46 PM, Tom de Vries wrote:
On 12/21/2017 10:46 PM, Cesar Philippidis wrote:
I've committed this patch to openacc-gcc-7-branch.
diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c
index bf1f127d8d6..f674c74ec82 100644
--- a/gcc/omp-expand.c
+++ b/gcc/omp-expand.c
offloaded = is_gimple_omp_offloaded (entry_stmt);
switch (gimple_omp_target_kind (entry_stmt))
{
+ case GF_OMP_TARGET_KIND_OACC_PARALLEL:
+ oacc_parallel = true;
case GF_OMP_TARGET_KIND_REGION:
case GF_OMP_TARGET_KIND_UPDATE:
case GF_OMP_TARGET_KIND_ENTER_DATA:
case GF_OMP_TARGET_KIND_EXIT_DATA:
- case GF_OMP_TARGET_KIND_OACC_PARALLEL:
case GF_OMP_TARGET_KIND_OACC_KERNELS:
case GF_OMP_TARGET_KIND_OACC_UPDATE:
case GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA:
This broke openacc-gcc-7-branch bootstrap:
...
gcc/omp-expand.c: In function 'void expand_omp_target(omp_region*)':
gcc/omp-expand.c:7110:21: error: this statement may fall through
[-Werror=implicit-fallthrough=]
oacc_parallel = true;
~~~~~~~~~~~~~~^~~~~~
gcc/omp-expand.c:7111:5: note: here
case GF_OMP_TARGET_KIND_REGION:
^~~~
...
Fixed in attached patch. Committed.
Thanks,
- Tom
Fix implicit fallthrough warning in expand_omp_target
2018-02-06 Tom de Vries <t...@codesourcery.com>
* omp-expand.c (expand_omp_target): Fix implicit fallthrough warning.
---
gcc/omp-expand.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c
index f674c74..d6ddf6e 100644
--- a/gcc/omp-expand.c
+++ b/gcc/omp-expand.c
@@ -7108,6 +7108,7 @@ expand_omp_target (struct omp_region *region)
{
case GF_OMP_TARGET_KIND_OACC_PARALLEL:
oacc_parallel = true;
+ gcc_fallthrough ();
case GF_OMP_TARGET_KIND_REGION:
case GF_OMP_TARGET_KIND_UPDATE:
case GF_OMP_TARGET_KIND_ENTER_DATA: