- 
                Notifications
    You must be signed in to change notification settings 
- Fork 15k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcrashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]flang:ir
Description
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>>'
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcrashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]flang:ir