Bug 115577 - [OpenMP] COMMON names rejected in MAP clauses
Summary: [OpenMP] COMMON names rejected in MAP clauses
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 15.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: openmp, rejects-valid
Depends on:
Blocks:
 
Reported: 2024-06-21 09:53 UTC by Tobias Burnus
Modified: 2024-07-29 09:59 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2024-06-21 09:53:49 UTC
Using  map(/common/)  is rejected in gfortran but is valid:

   10 |    !$omp target enter data map(/mycommon/)
      |                                1
Error: Syntax error in OpenMP variable list at (1)

( Example from PR fortran/115559
  Please update libgomp.fortran/declare-target-link-2.f90 once fixed )

subroutine one
   integer :: A(2),C
   real :: B
   common /mycommon/ A,B,C
   !$omp declare target link(/mycommon/)

   A = [1,2]; B = 2.0; C = 7
   !$omp target enter data map(/mycommon/)
end
Comment 1 Tobias Burnus 2024-07-29 09:59:14 UTC
From the other issue, now fixed:

(B) Issues found when writing a testcase:

* COMMON blocks: Using map(a,b,c) instead of map(/mycommon/) fails with:
     error: undefined symbol: mycommon_
  TESTCASE: attachment 58478 [details]


ISSUE (A) is (→ comment 0):

   10 |    !$omp target enter data map(/mycommon/)
      |                                1
Error: Syntax error in OpenMP variable list at (1)