Thanks for the analysis. FYI: I don’t intend to follow up on that middle-end part, it’s much out of my league, and I focus my limited hacking time to the Fortran front-end and runtime library. I’ve filed the PR, so at least the problem is documented. I will affect gfortran in the form of missed optimizations in routines using the IEEE modules, so at least it’s not wrong code for us :)
Cheers, FX