Closed
Description
Crash itself is reproducible on Godbolt:
https://godbolt.org/z/MTEKP7f7b
Reproducer:
$ cat test.f03
module m1
type base
type(base), pointer :: next => null()
end type
end module
module m2
use m1
type, extends(base) :: child
integer :: i
end type
end module
program p
use m2
type(base) :: b
type(child), target :: c
b = base(c%next)
end
If assertion is turned on, I can get the following message:
flang-new: /path_to_llvm_project/llvm-project/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From *) [To = mlir::omp::OutlineableOpenMPOpInterface, From = mlir::Operation]: Assertion `detail::isPresent(Val) && "dyn_cast on a non-existent value"' failed.
By specifying -flang-deprecated-no-hlfir
, I can avoid the crash.