diff options
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
| -rw-r--r-- | flang/lib/Frontend/CompilerInvocation.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 893121fe01f2..0c32f3914e04 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -1403,11 +1403,18 @@ static bool parseFloatingPointArgs(CompilerInvocation &invoc, opts.ReciprocalMath = true; opts.ApproxFunc = true; opts.NoSignedZeros = true; + opts.FastRealMod = true; opts.setFPContractMode(Fortran::common::LangOptions::FPM_Fast); } - if (args.hasArg(clang::options::OPT_fno_fast_real_mod)) - opts.NoFastRealMod = true; + if (llvm::opt::Arg *arg = + args.getLastArg(clang::options::OPT_ffast_real_mod, + clang::options::OPT_fno_fast_real_mod)) { + if (arg->getOption().matches(clang::options::OPT_ffast_real_mod)) + opts.FastRealMod = true; + if (arg->getOption().matches(clang::options::OPT_fno_fast_real_mod)) + opts.FastRealMod = false; + } return true; } |
