Bug 91762 - OpenMP omp target exit data directive not working with gfortran
Summary: OpenMP omp target exit data directive not working with gfortran
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: libgomp (show other bugs)
Version: 9.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: openmp
Depends on:
Blocks:
 
Reported: 2019-09-12 22:29 UTC by Edoardo Apra
Modified: 2020-01-29 18:04 UTC (History)
2 users (show)

See Also:
Host: x86_64
Target: nvptx-none
Build: x86_64
Known to work:
Known to fail: 7.4.0, 9.2.0
Last reconfirmed: 2020-01-29 00:00:00


Attachments
Fortran code to test the OpenMP directive target exit data map(release) (188 bytes, text/plain)
2019-09-12 22:29 UTC, Edoardo Apra
Details
Fortran code to test the OpenMP directive target exit data map(release) without subroutines (189 bytes, text/plain)
2020-01-29 18:01 UTC, Edoardo Apra
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Edoardo Apra 2019-09-12 22:29:44 UTC
Created attachment 46879 [details]
Fortran code to test the OpenMP directive target exit data map(release)

The attached test program tests the  OpenMP directive target exit data map(release).
While a similar C code compiled with gcc shows no execution problem, the compilation with gfortran results in the error code "libgomp: GOMP_target_enter_exit_data unhandled kind 0x04"

Here are the instructions for running the attached test code and its only ouput


gfortran -fopenmp example1.f ; ./a.out 

libgomp: GOMP_target_enter_exit_data unhandled kind 0x04
Comment 1 Martin Liška 2020-01-29 12:23:17 UTC
@Jakub: Can you please take a look?
Comment 2 Jakub Jelinek 2020-01-29 12:27:51 UTC
The OpenMP 4.5 support is still unfinished; though, this isn't a regression and therefore will need to wait for GCC 11.
Comment 3 Edoardo Apra 2020-01-29 18:01:16 UTC
Created attachment 47732 [details]
Fortran code to test the OpenMP directive target exit data map(release) without subroutines

Same test as previous attachment, but with the OpenMP target directives in the main program, while the previous reproducer had the OpenMP target directives in subroutines called by the main program.
Comment 4 Edoardo Apra 2020-01-29 18:04:28 UTC
@Jakub Thanks for the update.
Please keep in mind that this bug shows up only when OpenMP target directives are used in subroutines are called by the main program.
I have just upload a new test that tests the same OpenMP target directives, but with the OpenMP target directives in the main program, while the previous reproducer had the OpenMP target directives in subroutines called by the main program. 
This new reproducer does not fail with the gcc versions that support OpenMP target offloading