flang
flang copied to clipboard
flang support for pointers to scalar variables during debug info generation
This fix handles pointer to scalar variable (of symbol type:ST_VAR) during debug info generation. It address 2 issues.
- flang is not emitting DW_AT_name attribute for pointer variable DIE, hence inside GDB, "print cqe_int_allocatable_scalar" command fails as shown below
- flang is emitting DW_TAG_array_type for a pointer variable instead of DW_TAG_pointer_type
Test case:
program test_cqe integer, allocatable :: cqe_int_allocatable_scalar cqe_int_allocatable_scalar=5 print *,cqe_int_allocatable_scalar print *,"End of printing" end program test_cqe
sample GDB session:
-
without fix : (gdb) p cqe_int_allocatable_scalar No symbol "cqe_int_allocatable_scalar" in current context.
-
with fix : (gdb) p cqe_int_allocatable_scalar $1 = (PTR TO -> ( integer )) 0x21be90 (gdb) p *cqe_int_allocatable_scalar $2 = 5
@schweitzpgi FYI
Gentle reminder for review request
@jiel-nv, Thanks a lot for the review. @schweitzpgi, Gentle reminder for review request.
@jiel-nv, @schweitzpgi, Thanks a lot for the review.
Hi all,
Sent: Wednesday, June 10, 2020 11:26 AM Subject: Re: [flang-compiler/flang] flang support for pointers to scalar variables during debug info generation (#887) @bhuvanendrakumarn pushed 1 commit. • 38f0962 flang support for Assumed length string type during debug info generation
i have accidentally pushed some other changes to feature-pointertoscalar branch which was created for approved PR (887). is there anyway i can revert it back under feature-pointertoscalar branch?
any help/suggestion in this regard will be helpful
@bhuvanendrakumarn Is this PR still relevant? Would you like to update it, or close it?
@bhuvanendrakumarn Should we close this PR?
@shivaramaarao As discussed, please check the status of this PR and determine whether we should try to merge it.
@bryanpkc Hi, the fix for this issue(#887) is already merged. hence closing this ticket
Fix for this issue already merged