devel/llvm17: backport flang fixes for llvm19
The FLANG option is off by default so this wasn't noted in the llvm19
import. Backport 7bc7672925f81 from upstream LLVM.
The patches to fold-real.cpp and reduction-templates.h were hand
applied.
PR: 283966, 285195
Reported by: ohartmann@walstatt.org
Submitted by: milios@ccsys.com
(cherry picked from commit 62739e5a874c4114b4e049dbbd655e7f88c017a3)