Issue 124829
Summary [Flang] Failure at `fir.convert` when a procedure pointer points to an external function with character type result
Labels flang:fir-hlfir
Assignees
Reporter DanielCChen
    Consider the following code:
```
  PROGRAM main
  IMPLICIT NONE

  INTERFACE
 CHARACTER(1) FUNCTION FOO()
    END FUNCTION
  END INTERFACE

 PROCEDURE(FOO), POINTER ::  ProcPtr

  CONTAINS
  SUBROUTINE SUB()
 ProcPtr => foo
  END SUBROUTINE

  END
```

Flang fails at
```
error: loc("/home/cdchen/temp/t.f":13:5): 'fir.convert' op invalid type conversion'!fir.boxproc<() -> ()>' / 'tuple<!fir.boxproc<() -> ()>, i64>'
error: verification of lowering to FIR failed
```

All ifort, gfortran and XLF compiled the code successfully.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to