diff options
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | flang/lib/Frontend/CompilerInvocation.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 88e6298..0ad63b0 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -826,6 +826,14 @@ void CompilerInvocation::setSemanticsOpts( .set_warnOnNonstandardUsage(getEnableConformanceChecks()) .set_warningsAreErrors(getWarnAsErr()) .set_moduleFileSuffix(getModuleFileSuffix()); + + llvm::Triple targetTriple{llvm::Triple(this->targetOpts.triple)}; + // FIXME: Handle real(3) ? + if (targetTriple.getArch() != llvm::Triple::ArchType::x86 && + targetTriple.getArch() != llvm::Triple::ArchType::x86_64) { + semanticsContext->targetCharacteristics().DisableType( + Fortran::common::TypeCategory::Real, /*kind=*/10); + } } /// Set \p loweringOptions controlling lowering behavior based |