-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Flang][OpenMP][Parser] Resolve Declare Target Directive Symbols
Currently symbols are not resolved for declare target after they've been modified by prior passes. This can lead to missing or incorrect symbols in subsequent compiler phases when declare target is used with more complex types e.g. common block. This patch should allow these symbols to be resolved appropriately. Reviewers: kiranchandramohan Differential Revision: https://reviews.llvm.org/D151993
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
flang/test/Semantics/OpenMP/declare-target-common-block.f90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
! RUN: %flang_fc1 -fopenmp -fdebug-dump-symbols %s | FileCheck %s | ||
|
||
PROGRAM main | ||
!CHECK: one (OmpDeclareTarget) size=4 offset=0: ObjectEntity type: REAL(4) | ||
!CHECK: two (OmpDeclareTarget) size=4 offset=4: ObjectEntity type: REAL(4) | ||
!CHECK: numbers size=8 offset=0: CommonBlockDetails alignment=4: one two | ||
REAL :: one, two | ||
COMMON /numbers/ one, two | ||
!$omp declare target(/numbers/) | ||
END |