Skip to content

[flang][hlfir] fir.char_convert verification failure #64315

Closed
@vzakhari

Description

@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>>'

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviorcrashPrefer [crash-on-valid] or [crash-on-invalid]flang:ir

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions