Open abidh opened 4 weeks ago
@jeanPerier this is the problem which I mentioned in the comments in https://github.com/llvm/llvm-project/pull/112398#issuecomment-2422162240 where having argument number on DeclareOp
would save us from pattern matching IR.
@llvm/issue-subscribers-flang-ir
Author: Abid Qadeer (abidh)
@llvm/issue-subscribers-debuginfo
Author: Abid Qadeer (abidh)
Consider the following example code.
When stopped at line 3 (print *, str1), here is what GDB shows
The debug info is describing
str1
as local and not argument. This makes function type wrong too.This seems to happen because our detection of arguments depends on the
memRef
of the fir.declare being directly pointing at theBlockArgument
. If there is any intermediate nodes like in this case (fir.unboxchar, fir.emboxchar
) then this detection fails.