Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang] Enforce C1552, no binding labels allowed for internal procedures
If BIND(C) appears on an internal procedure, it must have a null binding label, i.e. BIND(C,NAME=""). Also address conflicts with D127725 which was merged during development. Differential Revision: https://reviews.llvm.org/D128676
- Loading branch information
Showing
7 changed files
with
43 additions
and
23 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
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,13 @@ | ||
! RUN: %python %S/test_errors.py %s %flang_fc1 | ||
! Check for C1552 | ||
program main | ||
contains | ||
subroutine internal1() bind(c) ! ok | ||
end subroutine | ||
!ERROR: An internal procedure may not have a BIND(C,NAME=) binding label | ||
subroutine internal2() bind(c,name="internal2") | ||
end subroutine | ||
!ERROR: An internal procedure may not have a BIND(C,NAME=) binding label | ||
subroutine internal3() bind(c,name="") | ||
end subroutine | ||
end |
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