-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DebugInfo] Fix bug in multi-entry procedures
When the compiler generates debuginfo for a procedure, it does not consider that if is an ENTRY statement, the number of arguments will increase by one. We can fix this problem by using the new number of arguments as returned by the process_ll_abi_func_ftn_mod function.
- Loading branch information
1 parent
08b46d7
commit bd2d4ba
Showing
4 changed files
with
60 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
!RUN: %flang -g -S -emit-llvm %s -o - | FileCheck %s | ||
|
||
!CHECK: [[N1:![0-9]+]] = distinct !DISubprogram | ||
!CHECK: !DILocalVariable(arg: 1, scope: [[N1]] | ||
!CHECK: !DILocalVariable(arg: 2, scope: [[N1]] | ||
!CHECK: !DILocalVariable(name: "a", arg: 3, scope: [[N1]] | ||
|
||
module test | ||
contains | ||
subroutine sub(a) | ||
implicit none | ||
integer(kind = 4) :: m | ||
real(kind = 8), intent(inout) :: a(:,:) | ||
m = size(a, 1) | ||
entry subsub(a) | ||
m = size(a, 1) + 1 | ||
entry subsub1(a) | ||
m = size(a, 1) + 2 | ||
end subroutine sub | ||
end module |
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