#include "flang/Parser/parsing.h"
#include "flang/Parser/provenance.h"
#include "flang/Semantics/semantics.h"
+#include "llvm/ADT/Triple.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
bool CompilerInstance::executeAction(FrontendAction &act) {
auto &invoc = this->getInvocation();
+ llvm::Triple targetTriple{llvm::Triple(invoc.getTargetOpts().triple)};
+ if (targetTriple.getArch() == llvm::Triple::ArchType::x86_64) {
+ invoc.getDefaultKinds().set_quadPrecisionKind(10);
+ }
+
// Set some sane defaults for the frontend.
invoc.setDefaultFortranOpts();
// Update the fortran options based on user-based input.
-! RUN: %python %S/test_errors.py %s %flang_fc1
+! RUN: %python %S/test_errors.py %s %flang_fc1 -triple x86_64-unknown-linux-gnu
! C716 If both kind-param and exponent-letter appear, exponent-letter
! shall be E. (As an extension we also allow an exponent-letter which matches
! the kind-param)
!
! This test is for x86_64, where exponent-letter 'q' is for
! 10-byte extended precision
-! REQUIRES: x86-registered-target
! UNSUPPORTED: system-windows
-! XFAIL: *
-!WARNING: THIS TEST HAS BEEN DISABLED UNTIL IT CAN BE PROPERLY CONFIGURED
+
subroutine s(var)
real :: realvar1 = 4.0E6_4
real :: realvar2 = 4.0D6