-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Flang][OpenMP][Sema] More gracefully handle undefined symbol in a no…
… implicit module for declare target Prior to this change, if you define a module as such with a declare target in it: module test_0 implicit none !$omp declare target(no_implicit_materialization_1) end module test_0 The compiler will crash rather than give some form of reasonable diagnostic. This patch attempts to fix that. Reviewers: kiranchandramohan Differential Revision: https://reviews.llvm.org/D149913
- Loading branch information
Showing
3 changed files
with
68 additions
and
3 deletions.
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
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
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,23 @@ | ||
! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp | ||
! OpenMP Version 5.1 | ||
! Check OpenMP construct validity for the following directives: | ||
! 2.14.7 Declare Target Directive | ||
! When used in an implicit none context. | ||
|
||
module test_0 | ||
implicit none | ||
!ERROR: The given DECLARE TARGET directive clause has an invalid argument | ||
!ERROR: No explicit type declared for 'no_implicit_materialization_1' | ||
!$omp declare target(no_implicit_materialization_1) | ||
|
||
!ERROR: The given DECLARE TARGET directive clause has an invalid argument | ||
!ERROR: No explicit type declared for 'no_implicit_materialization_2' | ||
!$omp declare target link(no_implicit_materialization_2) | ||
|
||
!ERROR: The given DECLARE TARGET directive clause has an invalid argument | ||
!ERROR: No explicit type declared for 'no_implicit_materialization_3' | ||
!$omp declare target to(no_implicit_materialization_3) | ||
|
||
INTEGER :: data_int = 10 | ||
!$omp declare target(data_int) | ||
end module test_0 |