I fully agree, and we are actively working on making it work (and work nicer at that), but the actual plugin interface for flang-new is only just landing right now[1], so I would deem it too early to use for now.
An alternative way to use Enzyme with Fortran is by writing the compilation pipeline out manually in the Makefile:
- Obtain
.firwith the bbc compiler - Run first round of optimizations with
opt - Combine the IR with
llvm-link - Apply Enzyme with
opt - 2nd optimization pass, and compile executable with
clang++
Let me know if I can be of any help!