Issue 64315
Summary [flang][hlfir] fir.char_convert verification failure
Labels flang:ir, crash
Assignees cabreraam
Reporter vzakhari
    Reproducer:
```
subroutine test(c,n)
  character(*,4),intent(in) :: c(:)
  integer,intent(in) :: n
  interface
     subroutine callee(c)
 character(*),intent(in) :: c(:)
     end subroutine callee
  end interface
  call show([character(n)::c])
end subroutine test

subroutine test2(x)
  integer,intent(in) :: x
 character(kind=4) :: cx
  cx = achar(x)
end subroutine test2
```

flang-new -flang-experimental-hlfir repro.f90:
```
error: loc("repro.f90":9:3): 'fir.char_convert' op operand #0 must be any reference, but got '!fir.boxchar<4>'
error: loc("repro.f90":15:3): 'fir.char_convert' op operand #0 must be any reference, but got '!hlfir.expr<!fir.char<1>>'
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to