Issue 107998
Summary [flang][debug] Incorrect value for some Character type dummy arguments.
Labels flang
Assignees abidh
Reporter abidh
    If a dummy argument has a type `character (len=*)`, the debugger does not show the value correctly. See the example below.

```
subroutine test (str)
  character (len=*) :: str
  print *, str
end subroutine test

program main
  call test('flang')
  call test('flang' // '-new')
end program main

When stopped at line 3, GDB shows the following:

(gdb) p str
$1 = 1851878502
```

Similar code when compiled with gfortran shows the correct value of the `str` variable.

```
(gdb) p str
$1 = 'flang'
```

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to