Skip to content

[flang][debug] Wrong signature for functions with complex return type. #108711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
abidh opened this issue Sep 14, 2024 · 2 comments · Fixed by #114418
Closed

[flang][debug] Wrong signature for functions with complex return type. #108711

abidh opened this issue Sep 14, 2024 · 2 comments · Fixed by #114418
Assignees

Comments

@abidh
Copy link
Contributor

abidh commented Sep 14, 2024

See the following example. The type of the fn as shown by GDB is wrong. It shows integer as return type.

complex function fn(a)
    complex, intent(in) :: a
    fn = a
end function

program function_calls
    implicit none
    interface
        complex function fn(a)
            complex, intent(in) :: a
        end function
    end interface
    complex :: b, c
    c = fn(b)
    print *, c
end program
(gdb) ptype fn
type = integer (complex)
@abidh abidh self-assigned this Sep 14, 2024
@github-actions github-actions bot added the flang Flang issues not falling into any other category label Sep 14, 2024
@EugeneZelenko EugeneZelenko added debuginfo flang:ir and removed flang Flang issues not falling into any other category labels Sep 14, 2024
@llvmbot
Copy link
Member

llvmbot commented Sep 14, 2024

@llvm/issue-subscribers-debuginfo

Author: Abid Qadeer (abidh)

See the following example. The type of the `fn` as shown by GDB is wrong. It shows integer as return type.
complex function fn(a)
    complex, intent(in) :: a
    fn = a
end function

program function_calls
    implicit none
    interface
        complex function fn(a)
            complex, intent(in) :: a
        end function
    end interface
    complex :: b, c
    c = fn(b)
    print *, c
end program
(gdb) ptype fn
type = integer (complex)

@llvmbot
Copy link
Member

llvmbot commented Sep 14, 2024

@llvm/issue-subscribers-flang-ir

Author: Abid Qadeer (abidh)

See the following example. The type of the `fn` as shown by GDB is wrong. It shows integer as return type.
complex function fn(a)
    complex, intent(in) :: a
    fn = a
end function

program function_calls
    implicit none
    interface
        complex function fn(a)
            complex, intent(in) :: a
        end function
    end interface
    complex :: b, c
    c = fn(b)
    print *, c
end program
(gdb) ptype fn
type = integer (complex)

abidh added a commit to abidh/llvm-project that referenced this issue Oct 31, 2024
This help us generate debug info that better represents the actual
Fortran source code.

Fixes llvm#108711.
abidh added a commit that referenced this issue Nov 5, 2024
This help us generate debug info that better represents the actual
Fortran source code. It was briefly discussed
[here](#113917 (review)).
    
Fixes #108711.
PhilippRados pushed a commit to PhilippRados/llvm-project that referenced this issue Nov 6, 2024
This help us generate debug info that better represents the actual
Fortran source code. It was briefly discussed
[here](llvm#113917 (review)).
    
Fixes llvm#108711.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants