[R-pkg-devel] flang doesn't support derived types

Othman El Hammouchi othm@n@e|@h@mmouch| @end|ng |rom protonm@||@com
Wed May 8 18:52:51 CEST 2024


Hello everyone, this is my first post on the mailing list (as well as the first package I'm attempting to publish), so please forgive any obvious errors.

I'm using a lot of Fortran code which relies on derived types to manage data structures. The package compiles fine on Windows, Linux and Mac and passes all checks, including the CI pipeline on GitHub provided by the RStudio folks. However, upon submission I received an automatic reply shortly afterwards saying the build had failed on CRAN's servers for Debian. The log gives the following error:

flang/lib/Lower/CallInterface.cpp:949: not yet implemented: support for polymorphic types

I tried searching this mailing list as well as the llvm docs for a precedent or explanation, without much success. The baffling thing is that my code doesn't use polymorphism at all as far as I can tell, they're just DTs with bound procedures (I don't think the Fortran standard considers this polymorphic?). My question is: what can I do about it? This is a compiler issue, but I doesn't seem from "Writing R Extensions" that CRAN allows you to check the installed compiler and abort the install if an unsupported one is detected. However, it's not really a package developer's fault that the compiler doesn't support the standard.

Thanks in advance,

Othman El Hammouchi
	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list