[flang] [llvm] [flang] implement show_descriptor intrinsic, a non-standard extension (PR #169137)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 24 10:13:46 PST 2025
https://github.com/jeanPerier commented:
Thanks for adding this, just some high level feedback:
I think I would slightly favor it being defined in an interface in some new intrinsic `flang_debug` module for better control/error messages when people are switching between compilers (@klausler for opinions).
I understand that defining it fully via Fortran without some interception in semantics is likely hard (probably require some combo of IGNORE_TKR).
However, maybe defining it via renaming to a builtin is an option (see how this is done for __builtin_c_loc for instance).
Second point is that POINTER/ALLOCATABLE descriptors will print the address of a copy (because of the fir.load) and I think it may be useful to get the real address for those. However, this can be easily be improved later by updating lowering (adding an entry point if needed to satisfy FIR type between fir.box and fir.ref<fir.box>) and is not a blocking point.
https://github.com/llvm/llvm-project/pull/169137
More information about the llvm-commits
mailing list