diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst index 93805b65689ca1..f14f986c646a4a 100644 --- a/clang/docs/LanguageExtensions.rst +++ b/clang/docs/LanguageExtensions.rst @@ -3552,7 +3552,7 @@ same spelling and syntax. For pragmas specified at file scope, a stack is supported so that the ``pragma float_control`` settings can be pushed or popped. When ``pragma float_control(precise, on)`` is enabled, the section of code -governed by the pragma uses precise floating-point semantics, effectively +governed by the pragma uses precise floating point semantics, effectively ``-ffast-math`` is disabled and ``-ffp-contract=on`` (fused multiply add) is enabled. @@ -3563,29 +3563,8 @@ when ``pragma float_control(precise, off)`` is enabled, the section of code governed by the pragma behaves as though the command-line option ``-ffp-exception-behavior=ignore`` is enabled. -When ``pragma float_control(source, on)`` is enabled, the section of code governed -by the pragma behaves as though the command-line option -``-ffp-eval-method=source`` is enabled. Note: The default -floating-point evaluation method is target-specific, typically ``source``. - -When ``pragma float_control(double, on)`` is enabled, the section of code governed -by the pragma behaves as though the command-line option -``-ffp-eval-method=double`` is enabled. - -When ``pragma float_control(extended, on)`` is enabled, the section of code governed -by the pragma behaves as though the command-line option -``-ffp-eval-method=extended`` is enabled. - -When ``pragma float_control(source, off)`` or -``pragma float_control(double, off)`` or -``pragma float_control(extended, off)`` is enabled, -the section of code governed -by the pragma behaves as though the command-line option -``-ffp-eval-method=source`` is enabled, returning floating-point evaluation -method to the default setting. - The full syntax this pragma supports is -``float_control(except|precise|source|double|extended, on|off [, push])`` and +``float_control(except|precise, on|off [, push])`` and ``float_control(push|pop)``. The ``push`` and ``pop`` forms, including using ``push`` as the optional third argument, can only occur at file scope. diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst index c47c3cdb4207fa..f7f76ed3f3e209 100644 --- a/clang/docs/UsersManual.rst +++ b/clang/docs/UsersManual.rst @@ -1478,17 +1478,6 @@ Note that floating-point operations performed as part of constant initialization * ``maytrap`` The compiler avoids transformations that may raise exceptions that would not have been raised by the original code. Constant folding performed by the compiler is exempt from this option. * ``strict`` The compiler ensures that all transformations strictly preserve the floating point exception semantics of the original code. -.. option:: -ffp-eval-method= - - Specify the floating-point evaluation method. - - Valid values are: ``source``, ``double``, and ``extended``. - The default value is target-specific, typically ``source``. Details: - - * ``source`` The compiler uses the floating-point type declared in the source program as the evaluation method. - * ``double`` The compiler uses ``double`` as the floating-point evaluation method for all float expressions of type that is narrower than ``double``. - * ``extended`` The compiler uses ``long double`` as the floating-point evaluation method for all float expressions of type that is narrower than ``long double``. - .. option:: -f[no-]protect-parens: This option pertains to floating-point types, complex types with diff --git a/clang/include/clang/Basic/FPOptions.def b/clang/include/clang/Basic/FPOptions.def index 224c1827144f55..a93fa475cd5f65 100644 --- a/clang/include/clang/Basic/FPOptions.def +++ b/clang/include/clang/Basic/FPOptions.def @@ -23,5 +23,4 @@ OPTION(NoHonorInfs, bool, 1, NoHonorNaNs) OPTION(NoSignedZero, bool, 1, NoHonorInfs) OPTION(AllowReciprocal, bool, 1, NoSignedZero) OPTION(AllowApproxFunc, bool, 1, AllowReciprocal) -OPTION(FPEvalMethod, LangOptions::FPEvalMethodKind, 2, AllowApproxFunc) #undef OPTION diff --git a/clang/include/clang/Basic/LangOptions.def b/clang/include/clang/Basic/LangOptions.def index 3de16661502800..8420a97376c38b 100644 --- a/clang/include/clang/Basic/LangOptions.def +++ b/clang/include/clang/Basic/LangOptions.def @@ -295,7 +295,6 @@ BENIGN_ENUM_LANGOPT(DefaultFPContractMode, FPModeKind, 2, FPM_Off, "FP contracti COMPATIBLE_LANGOPT(ExpStrictFP, 1, false, "Enable experimental strict floating point") BENIGN_ENUM_LANGOPT(FPRoundingMode, RoundingMode, 3, RoundingMode::NearestTiesToEven, "FP Rounding Mode type") BENIGN_ENUM_LANGOPT(FPExceptionMode, FPExceptionModeKind, 2, FPE_Ignore, "FP Exception Behavior Mode type") -BENIGN_ENUM_LANGOPT(FPEvalMethod, FPEvalMethodKind, 2, FEM_TargetDefault, "FP type used for floating point arithmetic") LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field type alignment") LANGOPT(HexagonQdsp6Compat , 1, 0, "hexagon-qdsp6 backward compatibility") LANGOPT(ObjCAutoRefCount , 1, 0, "Objective-C automated reference counting") diff --git a/clang/include/clang/Basic/LangOptions.h b/clang/include/clang/Basic/LangOptions.h index 97766e059c0404..71cf0c65e69248 100644 --- a/clang/include/clang/Basic/LangOptions.h +++ b/clang/include/clang/Basic/LangOptions.h @@ -233,19 +233,6 @@ class LangOptions : public LangOptionsBase { /// Possible exception handling behavior. enum class ExceptionHandlingKind { None, SjLj, WinEH, DwarfCFI, Wasm }; - /// Possible float expression evaluation method choices. - enum FPEvalMethodKind { - /// Use the declared type for fp arithmetic. - FEM_Source, - /// Use the type double for fp arithmetic. - FEM_Double, - /// Use extended type for fp arithmetic. - FEM_Extended, - /// Use the default float eval method specified by Target: - // most targets are defined with evaluation method FEM_Source. - FEM_TargetDefault - }; - enum class LaxVectorConversionKind { /// Permit no implicit vector bitcasts. None, @@ -537,7 +524,6 @@ class FPOptions { setAllowFEnvAccess(true); else setAllowFEnvAccess(LangOptions::FPM_Off); - setFPEvalMethod(LO.getFPEvalMethod()); } bool allowFPContractWithinStatement() const { diff --git a/clang/include/clang/Basic/PragmaKinds.h b/clang/include/clang/Basic/PragmaKinds.h index 24b6858e8c2371..82c0d5f0a551c1 100644 --- a/clang/include/clang/Basic/PragmaKinds.h +++ b/clang/include/clang/Basic/PragmaKinds.h @@ -32,10 +32,7 @@ enum PragmaFloatControlKind { PFC_Except, // #pragma float_control(except [,on]) PFC_NoExcept, // #pragma float_control(except, off) PFC_Push, // #pragma float_control(push) - PFC_Pop, // #pragma float_control(pop) - PFC_Source, // #pragma float_control(source, {on|off} [,push]) - PFC_Double, // #pragma float_control(double, {on|off} [,push]) - PFC_Extended, // #pragma float_control(extended, {on|off} [,push]) + PFC_Pop // #pragma float_control(pop) }; } diff --git a/clang/include/clang/Basic/TargetInfo.h b/clang/include/clang/Basic/TargetInfo.h index c7a57a7dba9a8c..4f0cbf986b31be 100644 --- a/clang/include/clang/Basic/TargetInfo.h +++ b/clang/include/clang/Basic/TargetInfo.h @@ -687,8 +687,7 @@ class TargetInfo : public virtual TransferrableTargetInfo, } /// Return the value for the C99 FLT_EVAL_METHOD macro. - // Note: implementation defined values may be negative. - virtual int getFPEvalMethod() const { return 0; } + virtual unsigned getFloatEvalMethod() const { return 0; } // getLargeArrayMinWidth/Align - Return the minimum array size that is // 'large' and its alignment. diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 76bc794a0a9e35..79955f4fa4f08e 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -1434,11 +1434,6 @@ def : Flag<["-"], "fextended-identifiers">, Group; def : Flag<["-"], "fno-extended-identifiers">, Group, Flags<[Unsupported]>; def fhosted : Flag<["-"], "fhosted">, Group; def fdenormal_fp_math_EQ : Joined<["-"], "fdenormal-fp-math=">, Group, Flags<[CC1Option]>; -def ffp_eval_method_EQ : Joined<["-"], "ffp-eval-method=">, Group, Flags<[CC1Option]>, - HelpText<"Specifies the evaluation method to use for floating-point arithmetic.">, - Values<"source,double,extended">, NormalizedValuesScope<"LangOptions">, - NormalizedValues<["FEM_Source", "FEM_Double", "FEM_Extended"]>, - MarshallingInfoEnum, "FEM_TargetDefault">; def ffp_model_EQ : Joined<["-"], "ffp-model=">, Group, Flags<[NoXarchOption]>, HelpText<"Controls the semantics of floating-point calculations.">; def ffp_exception_behavior_EQ : Joined<["-"], "ffp-exception-behavior=">, Group, Flags<[CC1Option]>, diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h index a089d166caaa92..7ab13640ce2c05 100644 --- a/clang/include/clang/Lex/Preprocessor.h +++ b/clang/include/clang/Lex/Preprocessor.h @@ -178,17 +178,12 @@ class Preprocessor { IdentifierInfo *Ident__is_target_vendor; // __is_target_vendor IdentifierInfo *Ident__is_target_os; // __is_target_os IdentifierInfo *Ident__is_target_environment; // __is_target_environment - IdentifierInfo *Ident__FLT_EVAL_METHOD__ = nullptr; // __FLT_EVAL_METHOD__ // Weak, only valid (and set) while InMacroArgs is true. Token* ArgMacro; SourceLocation DATELoc, TIMELoc; - // Corresponding to __FLT_EVAL_METHOD__. Initialized from TargetInfo - // or the command line. Implementation-defined values can be negative. - int CurrentFPEvalMethod = 0; - // Next __COUNTER__ value, starts at 0. unsigned CounterValue = 0; @@ -1993,8 +1988,6 @@ class Preprocessor { } unsigned getCounterValue() const { return CounterValue; } void setCounterValue(unsigned V) { CounterValue = V; } - int getCurrentFPEvalMethod() const { return CurrentFPEvalMethod; } - void setCurrentFPEvalMethod(int V) { CurrentFPEvalMethod = V; } /// Retrieves the module that we're currently building, if any. Module *getCurrentModule(); diff --git a/clang/include/clang/Lex/PreprocessorOptions.h b/clang/include/clang/Lex/PreprocessorOptions.h index 4ad7305e3b39a6..99085b98fc7ad7 100644 --- a/clang/include/clang/Lex/PreprocessorOptions.h +++ b/clang/include/clang/Lex/PreprocessorOptions.h @@ -146,9 +146,6 @@ class PreprocessorOptions { /// When enabled, the preprocessor will construct editor placeholder tokens. bool LexEditorPlaceholders = true; - /// When enabled, the preprocessor will expand special builtin macros. - bool LexExpandSpecialBuiltins = true; - /// True if the SourceManager should report the original file name for /// contents of files that were remapped to other files. Defaults to true. bool RemappedFilesKeepOriginalName = true; @@ -252,7 +249,6 @@ class PreprocessorOptions { ImplicitPCHInclude.clear(); SingleFileParseMode = false; LexEditorPlaceholders = true; - LexExpandSpecialBuiltins = true; RetainRemappedFileBuffers = true; PrecompiledPreambleBytes.first = 0; PrecompiledPreambleBytes.second = false; diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index b2d1b5fbf06de3..4ade04992a5f49 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -1501,15 +1501,19 @@ class Sema final { /// statements. class FPFeaturesStateRAII { public: - FPFeaturesStateRAII(Sema &S); - ~FPFeaturesStateRAII(); + FPFeaturesStateRAII(Sema &S) : S(S), OldFPFeaturesState(S.CurFPFeatures) { + OldOverrides = S.FpPragmaStack.CurrentValue; + } + ~FPFeaturesStateRAII() { + S.CurFPFeatures = OldFPFeaturesState; + S.FpPragmaStack.CurrentValue = OldOverrides; + } FPOptionsOverride getOverrides() { return OldOverrides; } private: Sema& S; FPOptions OldFPFeaturesState; FPOptionsOverride OldOverrides; - int OldEvalMethod; }; void addImplicitTypedef(StringRef Name, QualType T); diff --git a/clang/lib/Basic/Targets/OSTargets.h b/clang/lib/Basic/Targets/OSTargets.h index 43e92cbde91886..31f8b4bea30d90 100644 --- a/clang/lib/Basic/Targets/OSTargets.h +++ b/clang/lib/Basic/Targets/OSTargets.h @@ -735,7 +735,7 @@ class AIXTargetInfo : public OSTargetInfo { } // AIX sets FLT_EVAL_METHOD to be 1. - int getFPEvalMethod() const override { return 1; } + unsigned getFloatEvalMethod() const override { return 1; } bool hasInt128Type() const override { return false; } bool defaultsToAIXPowerAlignment() const override { return true; } diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index c5ddd0067235a6..fcaaf50624e92b 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -165,7 +165,7 @@ class LLVM_LIBRARY_VISIBILITY X86TargetInfo : public TargetInfo { return LongDoubleFormat == &llvm::APFloat::IEEEquad() ? "g" : "e"; } - int getFPEvalMethod() const override { + unsigned getFloatEvalMethod() const override { // X87 evaluates with 80 bits "long double" precision. return SSELevel == NoSSE ? 2 : 0; } @@ -468,12 +468,12 @@ class LLVM_LIBRARY_VISIBILITY NetBSDI386TargetInfo NetBSDI386TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : NetBSDTargetInfo(Triple, Opts) {} - int getFPEvalMethod() const override { + unsigned getFloatEvalMethod() const override { unsigned Major, Minor, Micro; getTriple().getOSVersion(Major, Minor, Micro); // New NetBSD uses the default rounding mode. if (Major >= 7 || (Major == 6 && Minor == 99 && Micro >= 26) || Major == 0) - return X86_32TargetInfo::getFPEvalMethod(); + return X86_32TargetInfo::getFloatEvalMethod(); // NetBSD before 6.99.26 defaults to "double" rounding. return 1; } diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index 641c053227f270..837ead86d62026 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -2630,8 +2630,6 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, StringRef FPModel = ""; // -ffp-exception-behavior options: strict, maytrap, ignore StringRef FPExceptionBehavior = ""; - // -ffp-eval-method options: double, extended, source - StringRef FPEvalMethod = ""; const llvm::DenormalMode DefaultDenormalFPMath = TC.getDefaultDenormalModeForType(Args, JA); const llvm::DenormalMode DefaultDenormalFP32Math = @@ -2823,18 +2821,6 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, break; } - // Validate and pass through -ffp-eval-method option. - case options::OPT_ffp_eval_method_EQ: { - StringRef Val = A->getValue(); - if (Val.equals("double") || Val.equals("extended") || - Val.equals("source")) - FPEvalMethod = Val; - else - D.Diag(diag::err_drv_unsupported_option_argument) - << A->getOption().getName() << Val; - break; - } - case options::OPT_ffinite_math_only: HonorINFs = false; HonorNaNs = false; @@ -2979,9 +2965,6 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, CmdArgs.push_back(Args.MakeArgString("-ffp-exception-behavior=" + FPExceptionBehavior)); - if (!FPEvalMethod.empty()) - CmdArgs.push_back(Args.MakeArgString("-ffp-eval-method=" + FPEvalMethod)); - ParseMRecip(D, Args, CmdArgs); // -ffast-math enables the __FAST_MATH__ preprocessor macro, but check for the diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 4c266f54e82c34..2c696b53945389 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -4239,13 +4239,8 @@ static bool ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args, // Always avoid lexing editor placeholders when we're just running the // preprocessor as we never want to emit the // "editor placeholder in source file" error in PP only mode. - // Certain predefined macros which depend upon semantic processing, - // for example __FLT_EVAL_METHOD__, are not expanded in PP mode, they - // appear in the preprocessed output as an unexpanded macro name. - if (isStrictlyPreprocessorAction(Action)) { + if (isStrictlyPreprocessorAction(Action)) Opts.LexEditorPlaceholders = false; - Opts.LexExpandSpecialBuiltins = false; - } return Diags.getNumErrors() == NumErrorsBefore; } diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 7a77332b6a7116..676421552a757f 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -1078,8 +1078,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI, } // Macros to control C99 numerics and - // Note: __FLT_EVAL_METHOD__ is not defined here since it is a special - // builtin macro, its value may fluctuate during compilation. + Builder.defineMacro("__FLT_EVAL_METHOD__", Twine(TI.getFloatEvalMethod())); Builder.defineMacro("__FLT_RADIX__", "2"); Builder.defineMacro("__DECIMAL_DIG__", "__LDBL_DECIMAL_DIG__"); diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index 589d3c33588503..8728ac9e2166e9 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/lib/Lex/PPMacroExpansion.cpp @@ -345,11 +345,6 @@ void Preprocessor::RegisterBuiltinMacros() { Ident__TIME__ = RegisterBuiltinMacro(*this, "__TIME__"); Ident__COUNTER__ = RegisterBuiltinMacro(*this, "__COUNTER__"); Ident_Pragma = RegisterBuiltinMacro(*this, "_Pragma"); - if (PPOpts->LexExpandSpecialBuiltins) - // Suppress macro expansion if compiler stops before semantic analysis, - // the macro identifier will appear in the preprocessed output. - Ident__FLT_EVAL_METHOD__ = - RegisterBuiltinMacro(*this, "__FLT_EVAL_METHOD__"); // C++ Standing Document Extensions. if (getLangOpts().CPlusPlus) @@ -1612,10 +1607,6 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // Surround the string with " and strip the trailing newline. OS << '"' << StringRef(Result).drop_back() << '"'; Tok.setKind(tok::string_literal); - } else if (II == Ident__FLT_EVAL_METHOD__) { - // __FLT_EVAL_METHOD__ expands to a simple numeric value. - OS << getCurrentFPEvalMethod(); - Tok.setKind(tok::numeric_constant); } else if (II == Ident__COUNTER__) { // __COUNTER__ expands to a simple numeric value. OS << CounterValue++; @@ -1713,7 +1704,8 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { return false; }); - } else if (II == Ident__has_cpp_attribute || II == Ident__has_c_attribute) { + } else if (II == Ident__has_cpp_attribute || + II == Ident__has_c_attribute) { bool IsCXX = II == Ident__has_cpp_attribute; EvaluateFeatureLikeBuiltinMacro( OS, Tok, II, *this, [&](Token &Tok, bool &HasLexedNextToken) -> int { @@ -1740,7 +1732,8 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { getLangOpts()) : 0; }); - } else if (II == Ident__has_include || II == Ident__has_include_next) { + } else if (II == Ident__has_include || + II == Ident__has_include_next) { // The argument to these two builtins should be a parenthesized // file name string literal using angle brackets (<>) or // double-quotes (""). diff --git a/clang/lib/Parse/ParsePragma.cpp b/clang/lib/Parse/ParsePragma.cpp index 58bfb0870abf01..42072fe63fc887 100644 --- a/clang/lib/Parse/ParsePragma.cpp +++ b/clang/lib/Parse/ParsePragma.cpp @@ -2667,27 +2667,21 @@ void PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, // Read the identifier. PP.Lex(Tok); - PragmaFloatControlKind Kind; - if (Tok.is(tok::kw_double)) { - Kind = PFC_Double; - } else { - if (Tok.isNot(tok::identifier)) { - PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed); - return; - } + if (Tok.isNot(tok::identifier)) { + PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed); + return; + } - // Verify that this is one of the float control options. - IdentifierInfo *II = Tok.getIdentifierInfo(); - Kind = llvm::StringSwitch(II->getName()) - .Case("precise", PFC_Precise) - .Case("except", PFC_Except) - .Case("push", PFC_Push) - .Case("pop", PFC_Pop) - .Case("source", PFC_Source) - .Case("extended", PFC_Extended) - .Default(PFC_Unknown); - } - PP.Lex(Tok); // the first pragma token + // Verify that this is one of the float control options. + IdentifierInfo *II = Tok.getIdentifierInfo(); + PragmaFloatControlKind Kind = + llvm::StringSwitch(II->getName()) + .Case("precise", PFC_Precise) + .Case("except", PFC_Except) + .Case("push", PFC_Push) + .Case("pop", PFC_Pop) + .Default(PFC_Unknown); + PP.Lex(Tok); // the identifier if (Kind == PFC_Unknown) { PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed); return; @@ -2716,21 +2710,10 @@ void PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, // Kind is set correctly ; else if (PushOnOff == "off") { - switch (Kind) { - default: - break; - case PFC_Precise: + if (Kind == PFC_Precise) Kind = PFC_NoPrecise; - break; - case PFC_Except: + if (Kind == PFC_Except) Kind = PFC_NoExcept; - break; - case PFC_Double: - case PFC_Extended: - // Reset eval mode to 'source' - Kind = PFC_Source; - break; - } } else if (PushOnOff == "push") { Action = Sema::PSK_Push_Set; } else { diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 2df4004eab6e11..704b631f94003c 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -212,12 +212,6 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer, SemaPPCallbackHandler = Callbacks.get(); PP.addPPCallbacks(std::move(Callbacks)); SemaPPCallbackHandler->set(*this); - if (getLangOpts().getFPEvalMethod() == LangOptions::FEM_TargetDefault) - // Use setting from TargetInfo. - PP.setCurrentFPEvalMethod(ctxt.getTargetInfo().getFPEvalMethod()); - else - // Set initial value of __FLT_EVAL_METHOD__ from the command line. - PP.setCurrentFPEvalMethod(getLangOpts().getFPEvalMethod()); } // Anchor Sema's type info to this TU. @@ -2499,14 +2493,3 @@ const llvm::MapVector & Sema::getMismatchingDeleteExpressions() const { return DeleteExprs; } - -Sema::FPFeaturesStateRAII::FPFeaturesStateRAII(Sema &S) - : S(S), OldFPFeaturesState(S.CurFPFeatures), - OldOverrides(S.FpPragmaStack.CurrentValue), - OldEvalMethod(S.PP.getCurrentFPEvalMethod()) {} - -Sema::FPFeaturesStateRAII::~FPFeaturesStateRAII() { - S.CurFPFeatures = OldFPFeaturesState; - S.FpPragmaStack.CurrentValue = OldOverrides; - S.PP.setCurrentFPEvalMethod(OldEvalMethod); -} diff --git a/clang/lib/Sema/SemaAttr.cpp b/clang/lib/Sema/SemaAttr.cpp index 43752636104ea8..fe8f02f0236850 100644 --- a/clang/lib/Sema/SemaAttr.cpp +++ b/clang/lib/Sema/SemaAttr.cpp @@ -483,21 +483,6 @@ void Sema::ActOnPragmaFloatControl(SourceLocation Loc, switch (Value) { default: llvm_unreachable("invalid pragma float_control kind"); - case PFC_Source: - PP.setCurrentFPEvalMethod(LangOptions::FEM_Source); - NewFPFeatures.setFPEvalMethodOverride(LangOptions::FEM_Source); - FpPragmaStack.Act(Loc, Action, StringRef(), NewFPFeatures); - break; - case PFC_Double: - PP.setCurrentFPEvalMethod(LangOptions::FEM_Double); - NewFPFeatures.setFPEvalMethodOverride(LangOptions::FEM_Double); - FpPragmaStack.Act(Loc, Action, StringRef(), NewFPFeatures); - break; - case PFC_Extended: - PP.setCurrentFPEvalMethod(LangOptions::FEM_Extended); - NewFPFeatures.setFPEvalMethodOverride(LangOptions::FEM_Extended); - FpPragmaStack.Act(Loc, Action, StringRef(), NewFPFeatures); - break; case PFC_Precise: NewFPFeatures.setFPPreciseEnabled(true); FpPragmaStack.Act(Loc, Action, StringRef(), NewFPFeatures); diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 6639efc9183391..80f9c1e1b372aa 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -768,37 +768,6 @@ ExprResult Sema::UsualUnaryConversions(Expr *E) { QualType Ty = E->getType(); assert(!Ty.isNull() && "UsualUnaryConversions - missing type"); - LangOptions::FPEvalMethodKind EvalMethod = CurFPFeatures.getFPEvalMethod(); - if (EvalMethod != LangOptions::FEM_Source && Ty->isFloatingType()) { - switch (EvalMethod) { - default: - llvm_unreachable("Unrecognized float evaluation method"); - break; - case LangOptions::FEM_TargetDefault: - // Float evaluation method not defined, use FEM_Source. - break; - case LangOptions::FEM_Double: - if (Context.getFloatingTypeOrder(Context.DoubleTy, Ty) > 0) - // Widen the expression to double. - return Ty->isComplexType() - ? ImpCastExprToType(E, - Context.getComplexType(Context.DoubleTy), - CK_FloatingComplexCast) - : ImpCastExprToType(E, Context.DoubleTy, CK_FloatingCast); - break; - case LangOptions::FEM_Extended: - if (Context.getFloatingTypeOrder(Context.LongDoubleTy, Ty) > 0) - // Widen the expression to long double. - return Ty->isComplexType() - ? ImpCastExprToType( - E, Context.getComplexType(Context.LongDoubleTy), - CK_FloatingComplexCast) - : ImpCastExprToType(E, Context.LongDoubleTy, - CK_FloatingCast); - break; - } - } - // Half FP have to be promoted to float unless it is natively supported if (Ty->isHalfType() && !getLangOpts().NativeHalfType) return ImpCastExprToType(Res.get(), Context.FloatTy, CK_FloatingCast); diff --git a/clang/test/CodeGen/fp-floatcontrol-pragma.cpp b/clang/test/CodeGen/fp-floatcontrol-pragma.cpp index aadf127f479b2c..ef29d24de1dbca 100644 --- a/clang/test/CodeGen/fp-floatcontrol-pragma.cpp +++ b/clang/test/CodeGen/fp-floatcontrol-pragma.cpp @@ -1,14 +1,7 @@ // RUN: %clang_cc1 -fexperimental-strict-floating-point -DEXCEPT=1 -fcxx-exceptions -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-NS %s -// RUN: %clang_cc1 -fexperimental-strict-floating-point -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK-DEFAULT +// RUN: %clang_cc1 -fexperimental-strict-floating-point -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -fexperimental-strict-floating-point -DFENV_ON=1 -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-FENV %s // RUN: %clang_cc1 -fexperimental-strict-floating-point -triple %itanium_abi_triple -O3 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-O3 %s -// RUN: %clang_cc1 -fexperimental-strict-floating-point -triple x86_64-linux-gnu -emit-llvm -o - %s -ffp-eval-method=source | FileCheck %s -check-prefix=CHECK-SOURCE -// RUN: %clang_cc1 -fexperimental-strict-floating-point -triple x86_64-linux-gnu -emit-llvm -o - %s -ffp-eval-method=double | FileCheck %s -check-prefix=CHECK-DOUBLE -// RUN: %clang_cc1 -fexperimental-strict-floating-point -triple x86_64-linux-gnu -emit-llvm -o - %s -ffp-eval-method=extended -mlong-double-80 | FileCheck %s -check-prefix=CHECK-EXTENDED -// RUN: %clang_cc1 -fexperimental-strict-floating-point -triple i386-linux-gnu -emit-llvm -o - %s -ffp-eval-method=source | FileCheck %s -check-prefix=CHECK-SOURCE -// RUN: %clang_cc1 -fexperimental-strict-floating-point -triple i386-linux-gnu -emit-llvm -o - %s -ffp-eval-method=double | FileCheck %s -check-prefix=CHECK-DOUBLE -// RUN: %clang_cc1 -fexperimental-strict-floating-point -triple i386-linux-gnu -emit-llvm -o - %s -ffp-eval-method=extended -mlong-double-80 | FileCheck %s -check-prefix=CHECK-EXTENDED -// RUN: %clang_cc1 -triple powerpc-unknown-aix -DPPC -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK-AIX // Verify float_control(precise, off) enables fast math flags on fp operations. float fp_precise_1(float a, float b, float c) { @@ -236,86 +229,3 @@ float try_lam(float x, unsigned n) { result = x + t; return result; } - -float mySub(float x, float y) { - // CHECK: define {{.*}}float {{.*}}mySub{{.*}} - // CHECK-NS: fsub float - // CHECK-SOURCE: fsub float - // CHECK-DOUBLE: fpext float - // CHECK-DOUBLE: fpext float - // CHECK-DOUBLE: fsub double - // CHECK-DOUBLE: fptrunc double {{.*}} to float - // CHECK-EXTENDED: fpext float - // CHECK-EXTENDED: fpext float - // CHECK-EXTENDED: fsub double - // CHECK-EXTENDED: fptrunc double {{.*}} to float - return x - y; -} - -float mySubSource(float x, float y) { -// CHECK: define {{.*}}float {{.*}}mySubSource{{.*}} -#pragma float_control(source) - return x - y; - // CHECK: fsub float -} - -float mySubExtended(float x, float y) { -// CHECK: define {{.*}}float {{.*}}mySubExtended{{.*}} -#pragma float_control(extended) - return x - y; - // CHECK: fpext float - // CHECK: fpext float - // CHECK: fsub x86_fp80 - // CHECK: fptrunc x86_fp80 {{.*}} to float -} - -float mySubDouble(float x, float y) { -// CHECK: define {{.*}}float {{.*}}mySubDouble{{.*}} -#pragma float_control(double) - return x - y; - // CHECK: fpext float - // CHECK: fpext float - // CHECK: fsub double - // CHECK: fptrunc double {{.*}} to float -} - -#ifndef PPC -__float128 mySub128(__float128 x, __float128 y) { - // CHECK: define {{.*}}mySub128{{.*}} - // Expect no fpext since fp128 is already widest - // CHECK: load fp128 - // CHECK-NEXT: load fp128 - // CHECK-NEXT: fsub fp128 - // CHECK-NEXT: ret fp128 - return x - y; -} -#endif - -void mySubfp16(__fp16 *res, __fp16 *x, __fp16 *y) { - // CHECK: define {{.*}}mySubfp16{{.*}} - *res = *x - *y; - // CHECK: load half - // CHECK-NEXT: load half - // CHECK-NEXT: fpext half{{.*}} - // CHECK-NEXT: load half - // CHECK-NEXT: load half - // CHECK-NS: fpext half{{.*}} to float - // CHECK-DEFAULT: fpext half{{.*}} to float - // CHECK-DOUBLE: fpext half{{.*}} to double - // CHECK-EXTENDED: fpext half{{.*}} to x86_fp80 - // CHECK-NEXT: fsub - // CHECK-NEXT: fptrunc {{.*}}to half - // CHECK-NS: fptrunc float {{.*}} to half - // CHECK-DOUBLE: fptrunc double {{.*}} to half - // CHECK-EXTENDED: fptrunc x86_fp80 {{.*}} to half -} - -int getFEM() { - // CHECK: define {{.*}}getFEM{{.*}} - return __FLT_EVAL_METHOD__; - // CHECK-NS: ret {{.*}} 0 - // CHECK-AIX: ret {{.*}} 1 - // CHECK-SOURCE: ret {{.*}} 0 - // CHECK-DOUBLE: ret {{.*}} 1 - // CHECK-EXTENDED: ret {{.*}} 2 -} diff --git a/clang/test/Preprocessor/init-aarch64.c b/clang/test/Preprocessor/init-aarch64.c index b38319c9b2ff5b..3b6f4ddaabde8b 100644 --- a/clang/test/Preprocessor/init-aarch64.c +++ b/clang/test/Preprocessor/init-aarch64.c @@ -91,6 +91,7 @@ // AARCH64-NEXT: #define __FLT_DENORM_MIN__ 1.40129846e-45F // AARCH64-NEXT: #define __FLT_DIG__ 6 // AARCH64-NEXT: #define __FLT_EPSILON__ 1.19209290e-7F +// AARCH64-NEXT: #define __FLT_EVAL_METHOD__ 0 // AARCH64-NEXT: #define __FLT_HAS_DENORM__ 1 // AARCH64-NEXT: #define __FLT_HAS_INFINITY__ 1 // AARCH64-NEXT: #define __FLT_HAS_QUIET_NAN__ 1 @@ -372,6 +373,7 @@ // AARCH64-DARWIN: #define __FLT_DENORM_MIN__ 1.40129846e-45F // AARCH64-DARWIN: #define __FLT_DIG__ 6 // AARCH64-DARWIN: #define __FLT_EPSILON__ 1.19209290e-7F +// AARCH64-DARWIN: #define __FLT_EVAL_METHOD__ 0 // AARCH64-DARWIN: #define __FLT_HAS_DENORM__ 1 // AARCH64-DARWIN: #define __FLT_HAS_INFINITY__ 1 // AARCH64-DARWIN: #define __FLT_HAS_QUIET_NAN__ 1 @@ -587,6 +589,7 @@ // AARCH64-MSVC: #define __FLT_DENORM_MIN__ 1.40129846e-45F // AARCH64-MSVC: #define __FLT_DIG__ 6 // AARCH64-MSVC: #define __FLT_EPSILON__ 1.19209290e-7F +// AARCH64-MSVC: #define __FLT_EVAL_METHOD__ 0 // AARCH64-MSVC: #define __FLT_HAS_DENORM__ 1 // AARCH64-MSVC: #define __FLT_HAS_INFINITY__ 1 // AARCH64-MSVC: #define __FLT_HAS_QUIET_NAN__ 1 diff --git a/clang/test/Preprocessor/init-arm.c b/clang/test/Preprocessor/init-arm.c index 2d1503c18560ed..32eb2c513f8b01 100644 --- a/clang/test/Preprocessor/init-arm.c +++ b/clang/test/Preprocessor/init-arm.c @@ -35,6 +35,7 @@ // ARM:#define __FLT_DENORM_MIN__ 1.40129846e-45F // ARM:#define __FLT_DIG__ 6 // ARM:#define __FLT_EPSILON__ 1.19209290e-7F +// ARM:#define __FLT_EVAL_METHOD__ 0 // ARM:#define __FLT_HAS_DENORM__ 1 // ARM:#define __FLT_HAS_INFINITY__ 1 // ARM:#define __FLT_HAS_QUIET_NAN__ 1 @@ -234,6 +235,7 @@ // ARM-BE:#define __FLT_DENORM_MIN__ 1.40129846e-45F // ARM-BE:#define __FLT_DIG__ 6 // ARM-BE:#define __FLT_EPSILON__ 1.19209290e-7F +// ARM-BE:#define __FLT_EVAL_METHOD__ 0 // ARM-BE:#define __FLT_HAS_DENORM__ 1 // ARM-BE:#define __FLT_HAS_INFINITY__ 1 // ARM-BE:#define __FLT_HAS_QUIET_NAN__ 1 @@ -426,6 +428,7 @@ // ARMEABISOFTFP:#define __FLT_DENORM_MIN__ 1.40129846e-45F // ARMEABISOFTFP:#define __FLT_DIG__ 6 // ARMEABISOFTFP:#define __FLT_EPSILON__ 1.19209290e-7F +// ARMEABISOFTFP:#define __FLT_EVAL_METHOD__ 0 // ARMEABISOFTFP:#define __FLT_HAS_DENORM__ 1 // ARMEABISOFTFP:#define __FLT_HAS_INFINITY__ 1 // ARMEABISOFTFP:#define __FLT_HAS_QUIET_NAN__ 1 @@ -620,6 +623,7 @@ // ARMEABIHARDFP:#define __FLT_DENORM_MIN__ 1.40129846e-45F // ARMEABIHARDFP:#define __FLT_DIG__ 6 // ARMEABIHARDFP:#define __FLT_EPSILON__ 1.19209290e-7F +// ARMEABIHARDFP:#define __FLT_EVAL_METHOD__ 0 // ARMEABIHARDFP:#define __FLT_HAS_DENORM__ 1 // ARMEABIHARDFP:#define __FLT_HAS_INFINITY__ 1 // ARMEABIHARDFP:#define __FLT_HAS_QUIET_NAN__ 1 @@ -817,6 +821,7 @@ // ARM-NETBSD:#define __FLT_DENORM_MIN__ 1.40129846e-45F // ARM-NETBSD:#define __FLT_DIG__ 6 // ARM-NETBSD:#define __FLT_EPSILON__ 1.19209290e-7F +// ARM-NETBSD:#define __FLT_EVAL_METHOD__ 0 // ARM-NETBSD:#define __FLT_HAS_DENORM__ 1 // ARM-NETBSD:#define __FLT_HAS_INFINITY__ 1 // ARM-NETBSD:#define __FLT_HAS_QUIET_NAN__ 1 diff --git a/clang/test/Preprocessor/init-mips.c b/clang/test/Preprocessor/init-mips.c index a07cee64e6848d..d76396aa35c91f 100644 --- a/clang/test/Preprocessor/init-mips.c +++ b/clang/test/Preprocessor/init-mips.c @@ -37,6 +37,7 @@ // MIPS32BE:#define __FLT_DENORM_MIN__ 1.40129846e-45F // MIPS32BE:#define __FLT_DIG__ 6 // MIPS32BE:#define __FLT_EPSILON__ 1.19209290e-7F +// MIPS32BE:#define __FLT_EVAL_METHOD__ 0 // MIPS32BE:#define __FLT_HAS_DENORM__ 1 // MIPS32BE:#define __FLT_HAS_INFINITY__ 1 // MIPS32BE:#define __FLT_HAS_QUIET_NAN__ 1 @@ -246,6 +247,7 @@ // MIPS32EL:#define __FLT_DENORM_MIN__ 1.40129846e-45F // MIPS32EL:#define __FLT_DIG__ 6 // MIPS32EL:#define __FLT_EPSILON__ 1.19209290e-7F +// MIPS32EL:#define __FLT_EVAL_METHOD__ 0 // MIPS32EL:#define __FLT_HAS_DENORM__ 1 // MIPS32EL:#define __FLT_HAS_INFINITY__ 1 // MIPS32EL:#define __FLT_HAS_QUIET_NAN__ 1 @@ -465,6 +467,7 @@ // MIPSN32BE: #define __FLT_DENORM_MIN__ 1.40129846e-45F // MIPSN32BE: #define __FLT_DIG__ 6 // MIPSN32BE: #define __FLT_EPSILON__ 1.19209290e-7F +// MIPSN32BE: #define __FLT_EVAL_METHOD__ 0 // MIPSN32BE: #define __FLT_HAS_DENORM__ 1 // MIPSN32BE: #define __FLT_HAS_INFINITY__ 1 // MIPSN32BE: #define __FLT_HAS_QUIET_NAN__ 1 @@ -771,6 +774,7 @@ // MIPSN32EL: #define __FLT_DENORM_MIN__ 1.40129846e-45F // MIPSN32EL: #define __FLT_DIG__ 6 // MIPSN32EL: #define __FLT_EPSILON__ 1.19209290e-7F +// MIPSN32EL: #define __FLT_EVAL_METHOD__ 0 // MIPSN32EL: #define __FLT_HAS_DENORM__ 1 // MIPSN32EL: #define __FLT_HAS_INFINITY__ 1 // MIPSN32EL: #define __FLT_HAS_QUIET_NAN__ 1 @@ -1070,6 +1074,7 @@ // MIPS64BE:#define __FLT_DENORM_MIN__ 1.40129846e-45F // MIPS64BE:#define __FLT_DIG__ 6 // MIPS64BE:#define __FLT_EPSILON__ 1.19209290e-7F +// MIPS64BE:#define __FLT_EVAL_METHOD__ 0 // MIPS64BE:#define __FLT_HAS_DENORM__ 1 // MIPS64BE:#define __FLT_HAS_INFINITY__ 1 // MIPS64BE:#define __FLT_HAS_QUIET_NAN__ 1 @@ -1279,6 +1284,7 @@ // MIPS64EL:#define __FLT_DENORM_MIN__ 1.40129846e-45F // MIPS64EL:#define __FLT_DIG__ 6 // MIPS64EL:#define __FLT_EPSILON__ 1.19209290e-7F +// MIPS64EL:#define __FLT_EVAL_METHOD__ 0 // MIPS64EL:#define __FLT_HAS_DENORM__ 1 // MIPS64EL:#define __FLT_HAS_INFINITY__ 1 // MIPS64EL:#define __FLT_HAS_QUIET_NAN__ 1 diff --git a/clang/test/Preprocessor/init-ppc.c b/clang/test/Preprocessor/init-ppc.c index 55e5a6f58bd5e8..4803a8511c7ed3 100644 --- a/clang/test/Preprocessor/init-ppc.c +++ b/clang/test/Preprocessor/init-ppc.c @@ -30,6 +30,7 @@ // PPC603E:#define __FLT_DENORM_MIN__ 1.40129846e-45F // PPC603E:#define __FLT_DIG__ 6 // PPC603E:#define __FLT_EPSILON__ 1.19209290e-7F +// PPC603E:#define __FLT_EVAL_METHOD__ 0 // PPC603E:#define __FLT_HAS_DENORM__ 1 // PPC603E:#define __FLT_HAS_INFINITY__ 1 // PPC603E:#define __FLT_HAS_QUIET_NAN__ 1 @@ -223,6 +224,7 @@ // PPC:#define __FLT_DENORM_MIN__ 1.40129846e-45F // PPC:#define __FLT_DIG__ 6 // PPC:#define __FLT_EPSILON__ 1.19209290e-7F +// PPC:#define __FLT_EVAL_METHOD__ 0 // PPC:#define __FLT_HAS_DENORM__ 1 // PPC:#define __FLT_HAS_INFINITY__ 1 // PPC:#define __FLT_HAS_QUIET_NAN__ 1 @@ -420,6 +422,7 @@ // PPC-AIX:#define __FLT_DENORM_MIN__ 1.40129846e-45F // PPC-AIX:#define __FLT_DIG__ 6 // PPC-AIX:#define __FLT_EPSILON__ 1.19209290e-7F +// PPC-AIX:#define __FLT_EVAL_METHOD__ 1 // PPC-AIX:#define __FLT_HAS_DENORM__ 1 // PPC-AIX:#define __FLT_HAS_INFINITY__ 1 // PPC-AIX:#define __FLT_HAS_QUIET_NAN__ 1 @@ -784,6 +787,7 @@ // PPC-LINUX:#define __FLT_DENORM_MIN__ 1.40129846e-45F // PPC-LINUX:#define __FLT_DIG__ 6 // PPC-LINUX:#define __FLT_EPSILON__ 1.19209290e-7F +// PPC-LINUX:#define __FLT_EVAL_METHOD__ 0 // PPC-LINUX:#define __FLT_HAS_DENORM__ 1 // PPC-LINUX:#define __FLT_HAS_INFINITY__ 1 // PPC-LINUX:#define __FLT_HAS_QUIET_NAN__ 1 @@ -991,6 +995,7 @@ // PPC-DARWIN:#define __FLT_DENORM_MIN__ 1.40129846e-45F // PPC-DARWIN:#define __FLT_DIG__ 6 // PPC-DARWIN:#define __FLT_EPSILON__ 1.19209290e-7F +// PPC-DARWIN:#define __FLT_EVAL_METHOD__ 0 // PPC-DARWIN:#define __FLT_HAS_DENORM__ 1 // PPC-DARWIN:#define __FLT_HAS_INFINITY__ 1 // PPC-DARWIN:#define __FLT_HAS_QUIET_NAN__ 1 diff --git a/clang/test/Preprocessor/init-ppc64.c b/clang/test/Preprocessor/init-ppc64.c index 45a43b6328d999..6aed0e7daa96b7 100644 --- a/clang/test/Preprocessor/init-ppc64.c +++ b/clang/test/Preprocessor/init-ppc64.c @@ -35,6 +35,7 @@ // PPC64:#define __FLT_DENORM_MIN__ 1.40129846e-45F // PPC64:#define __FLT_DIG__ 6 // PPC64:#define __FLT_EPSILON__ 1.19209290e-7F +// PPC64:#define __FLT_EVAL_METHOD__ 0 // PPC64:#define __FLT_HAS_DENORM__ 1 // PPC64:#define __FLT_HAS_INFINITY__ 1 // PPC64:#define __FLT_HAS_QUIET_NAN__ 1 @@ -239,6 +240,7 @@ // PPC64LE:#define __FLT_DENORM_MIN__ 1.40129846e-45F // PPC64LE:#define __FLT_DIG__ 6 // PPC64LE:#define __FLT_EPSILON__ 1.19209290e-7F +// PPC64LE:#define __FLT_EVAL_METHOD__ 0 // PPC64LE:#define __FLT_HAS_DENORM__ 1 // PPC64LE:#define __FLT_HAS_INFINITY__ 1 // PPC64LE:#define __FLT_HAS_QUIET_NAN__ 1 @@ -712,6 +714,7 @@ // PPC64-AIX:#define __FLT_DENORM_MIN__ 1.40129846e-45F // PPC64-AIX:#define __FLT_DIG__ 6 // PPC64-AIX:#define __FLT_EPSILON__ 1.19209290e-7F +// PPC64-AIX:#define __FLT_EVAL_METHOD__ 1 // PPC64-AIX:#define __FLT_HAS_DENORM__ 1 // PPC64-AIX:#define __FLT_HAS_INFINITY__ 1 // PPC64-AIX:#define __FLT_HAS_QUIET_NAN__ 1 @@ -909,6 +912,7 @@ // PPC64-LINUX:#define __FLT_DENORM_MIN__ 1.40129846e-45F // PPC64-LINUX:#define __FLT_DIG__ 6 // PPC64-LINUX:#define __FLT_EPSILON__ 1.19209290e-7F +// PPC64-LINUX:#define __FLT_EVAL_METHOD__ 0 // PPC64-LINUX:#define __FLT_HAS_DENORM__ 1 // PPC64-LINUX:#define __FLT_HAS_INFINITY__ 1 // PPC64-LINUX:#define __FLT_HAS_QUIET_NAN__ 1 diff --git a/clang/test/Preprocessor/init-s390x.c b/clang/test/Preprocessor/init-s390x.c index 6c646527f50f74..b0e45b5348ce95 100644 --- a/clang/test/Preprocessor/init-s390x.c +++ b/clang/test/Preprocessor/init-s390x.c @@ -23,6 +23,7 @@ // S390X:#define __FLT_DENORM_MIN__ 1.40129846e-45F // S390X:#define __FLT_DIG__ 6 // S390X:#define __FLT_EPSILON__ 1.19209290e-7F +// S390X:#define __FLT_EVAL_METHOD__ 0 // S390X:#define __FLT_HAS_DENORM__ 1 // S390X:#define __FLT_HAS_INFINITY__ 1 // S390X:#define __FLT_HAS_QUIET_NAN__ 1 diff --git a/clang/test/Preprocessor/init-v7k-compat.c b/clang/test/Preprocessor/init-v7k-compat.c index ff5d4bbdea53ad..482c7ad6ff6878 100644 --- a/clang/test/Preprocessor/init-v7k-compat.c +++ b/clang/test/Preprocessor/init-v7k-compat.c @@ -28,6 +28,7 @@ // CHECK: #define __FLT_DENORM_MIN__ 1.40129846e-45F // CHECK: #define __FLT_DIG__ 6 // CHECK: #define __FLT_EPSILON__ 1.19209290e-7F +// CHECK: #define __FLT_EVAL_METHOD__ 0 // CHECK: #define __FLT_HAS_DENORM__ 1 // CHECK: #define __FLT_HAS_INFINITY__ 1 // CHECK: #define __FLT_HAS_QUIET_NAN__ 1 diff --git a/clang/test/Preprocessor/init-x86.c b/clang/test/Preprocessor/init-x86.c index 287de8d90937c1..527cd395088898 100644 --- a/clang/test/Preprocessor/init-x86.c +++ b/clang/test/Preprocessor/init-x86.c @@ -24,6 +24,7 @@ // I386:#define __FLT_DENORM_MIN__ 1.40129846e-45F // I386:#define __FLT_DIG__ 6 // I386:#define __FLT_EPSILON__ 1.19209290e-7F +// I386:#define __FLT_EVAL_METHOD__ 2 // I386:#define __FLT_HAS_DENORM__ 1 // I386:#define __FLT_HAS_INFINITY__ 1 // I386:#define __FLT_HAS_QUIET_NAN__ 1 @@ -212,6 +213,7 @@ // I386-LINUX:#define __FLT_DENORM_MIN__ 1.40129846e-45F // I386-LINUX:#define __FLT_DIG__ 6 // I386-LINUX:#define __FLT_EPSILON__ 1.19209290e-7F +// I386-LINUX:#define __FLT_EVAL_METHOD__ 0 // I386-LINUX:#define __FLT_HAS_DENORM__ 1 // I386-LINUX:#define __FLT_HAS_INFINITY__ 1 // I386-LINUX:#define __FLT_HAS_QUIET_NAN__ 1 @@ -414,6 +416,7 @@ // I386-NETBSD:#define __FLT_DENORM_MIN__ 1.40129846e-45F // I386-NETBSD:#define __FLT_DIG__ 6 // I386-NETBSD:#define __FLT_EPSILON__ 1.19209290e-7F +// I386-NETBSD:#define __FLT_EVAL_METHOD__ 2 // I386-NETBSD:#define __FLT_HAS_DENORM__ 1 // I386-NETBSD:#define __FLT_HAS_INFINITY__ 1 // I386-NETBSD:#define __FLT_HAS_QUIET_NAN__ 1 @@ -587,6 +590,12 @@ // I386-NETBSD:#define __i386__ 1 // I386-NETBSD:#define i386 1 +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=i386-netbsd -target-feature +sse2 < /dev/null | FileCheck -match-full-lines -check-prefix I386-NETBSD-SSE %s +// I386-NETBSD-SSE:#define __FLT_EVAL_METHOD__ 0 +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=i386-netbsd6 < /dev/null | FileCheck -match-full-lines -check-prefix I386-NETBSD6 %s +// I386-NETBSD6:#define __FLT_EVAL_METHOD__ 1 +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=i386-netbsd6 -target-feature +sse2 < /dev/null | FileCheck -match-full-lines -check-prefix I386-NETBSD6-SSE %s +// I386-NETBSD6-SSE:#define __FLT_EVAL_METHOD__ 1 // RUN: %clang_cc1 -E -dM -triple=i686-pc-mingw32 < /dev/null | FileCheck -match-full-lines -check-prefix I386-DECLSPEC %s // RUN: %clang_cc1 -E -dM -fms-extensions -triple=i686-pc-mingw32 < /dev/null | FileCheck -match-full-lines -check-prefix I386-DECLSPEC %s @@ -622,6 +631,7 @@ // X86_64:#define __FLT_DENORM_MIN__ 1.40129846e-45F // X86_64:#define __FLT_DIG__ 6 // X86_64:#define __FLT_EPSILON__ 1.19209290e-7F +// X86_64:#define __FLT_EVAL_METHOD__ 0 // X86_64:#define __FLT_HAS_DENORM__ 1 // X86_64:#define __FLT_HAS_INFINITY__ 1 // X86_64:#define __FLT_HAS_QUIET_NAN__ 1 @@ -829,6 +839,7 @@ // X32:#define __FLT_DENORM_MIN__ 1.40129846e-45F // X32:#define __FLT_DIG__ 6 // X32:#define __FLT_EPSILON__ 1.19209290e-7F +// X32:#define __FLT_EVAL_METHOD__ 0 // X32:#define __FLT_HAS_DENORM__ 1 // X32:#define __FLT_HAS_INFINITY__ 1 // X32:#define __FLT_HAS_QUIET_NAN__ 1 @@ -1035,6 +1046,7 @@ // X86_64-CLOUDABI:#define __FLT_DENORM_MIN__ 1.40129846e-45F // X86_64-CLOUDABI:#define __FLT_DIG__ 6 // X86_64-CLOUDABI:#define __FLT_EPSILON__ 1.19209290e-7F +// X86_64-CLOUDABI:#define __FLT_EVAL_METHOD__ 0 // X86_64-CLOUDABI:#define __FLT_HAS_DENORM__ 1 // X86_64-CLOUDABI:#define __FLT_HAS_INFINITY__ 1 // X86_64-CLOUDABI:#define __FLT_HAS_QUIET_NAN__ 1 @@ -1329,6 +1341,7 @@ // X86_64-LINUX:#define __FLT_DENORM_MIN__ 1.40129846e-45F // X86_64-LINUX:#define __FLT_DIG__ 6 // X86_64-LINUX:#define __FLT_EPSILON__ 1.19209290e-7F +// X86_64-LINUX:#define __FLT_EVAL_METHOD__ 0 // X86_64-LINUX:#define __FLT_HAS_DENORM__ 1 // X86_64-LINUX:#define __FLT_HAS_INFINITY__ 1 // X86_64-LINUX:#define __FLT_HAS_QUIET_NAN__ 1 @@ -1541,6 +1554,7 @@ // X86_64-NETBSD:#define __FLT_DENORM_MIN__ 1.40129846e-45F // X86_64-NETBSD:#define __FLT_DIG__ 6 // X86_64-NETBSD:#define __FLT_EPSILON__ 1.19209290e-7F +// X86_64-NETBSD:#define __FLT_EVAL_METHOD__ 0 // X86_64-NETBSD:#define __FLT_HAS_DENORM__ 1 // X86_64-NETBSD:#define __FLT_HAS_INFINITY__ 1 // X86_64-NETBSD:#define __FLT_HAS_QUIET_NAN__ 1 diff --git a/clang/test/Preprocessor/init.c b/clang/test/Preprocessor/init.c index 65d737352cad00..20ab2c05596b38 100644 --- a/clang/test/Preprocessor/init.c +++ b/clang/test/Preprocessor/init.c @@ -323,6 +323,7 @@ // MSP430:#define __FLT_DENORM_MIN__ 1.40129846e-45F // MSP430:#define __FLT_DIG__ 6 // MSP430:#define __FLT_EPSILON__ 1.19209290e-7F +// MSP430:#define __FLT_EVAL_METHOD__ 0 // MSP430:#define __FLT_HAS_DENORM__ 1 // MSP430:#define __FLT_HAS_INFINITY__ 1 // MSP430:#define __FLT_HAS_QUIET_NAN__ 1 @@ -510,6 +511,7 @@ // NVPTX32:#define __FLT_DENORM_MIN__ 1.40129846e-45F // NVPTX32:#define __FLT_DIG__ 6 // NVPTX32:#define __FLT_EPSILON__ 1.19209290e-7F +// NVPTX32:#define __FLT_EVAL_METHOD__ 0 // NVPTX32:#define __FLT_HAS_DENORM__ 1 // NVPTX32:#define __FLT_HAS_INFINITY__ 1 // NVPTX32:#define __FLT_HAS_QUIET_NAN__ 1 @@ -698,6 +700,7 @@ // NVPTX64:#define __FLT_DENORM_MIN__ 1.40129846e-45F // NVPTX64:#define __FLT_DIG__ 6 // NVPTX64:#define __FLT_EPSILON__ 1.19209290e-7F +// NVPTX64:#define __FLT_EVAL_METHOD__ 0 // NVPTX64:#define __FLT_HAS_DENORM__ 1 // NVPTX64:#define __FLT_HAS_INFINITY__ 1 // NVPTX64:#define __FLT_HAS_QUIET_NAN__ 1 @@ -901,6 +904,7 @@ // SPARC:#define __FLT_DENORM_MIN__ 1.40129846e-45F // SPARC:#define __FLT_DIG__ 6 // SPARC:#define __FLT_EPSILON__ 1.19209290e-7F +// SPARC:#define __FLT_EVAL_METHOD__ 0 // SPARC:#define __FLT_HAS_DENORM__ 1 // SPARC:#define __FLT_HAS_INFINITY__ 1 // SPARC:#define __FLT_HAS_QUIET_NAN__ 1 @@ -1101,6 +1105,7 @@ // TCE:#define __FLT_DENORM_MIN__ 1.40129846e-45F // TCE:#define __FLT_DIG__ 6 // TCE:#define __FLT_EPSILON__ 1.19209290e-7F +// TCE:#define __FLT_EVAL_METHOD__ 0 // TCE:#define __FLT_HAS_DENORM__ 1 // TCE:#define __FLT_HAS_INFINITY__ 1 // TCE:#define __FLT_HAS_QUIET_NAN__ 1 @@ -1267,6 +1272,7 @@ // PS4:#define __FLT_DENORM_MIN__ 1.40129846e-45F // PS4:#define __FLT_DIG__ 6 // PS4:#define __FLT_EPSILON__ 1.19209290e-7F +// PS4:#define __FLT_EVAL_METHOD__ 0 // PS4:#define __FLT_HAS_DENORM__ 1 // PS4:#define __FLT_HAS_INFINITY__ 1 // PS4:#define __FLT_HAS_QUIET_NAN__ 1 @@ -1558,6 +1564,7 @@ // WEBASSEMBLY-NEXT:#define __FLT_DENORM_MIN__ 1.40129846e-45F // WEBASSEMBLY-NEXT:#define __FLT_DIG__ 6 // WEBASSEMBLY-NEXT:#define __FLT_EPSILON__ 1.19209290e-7F +// WEBASSEMBLY-NEXT:#define __FLT_EVAL_METHOD__ 0 // WEBASSEMBLY-NEXT:#define __FLT_HAS_DENORM__ 1 // WEBASSEMBLY-NEXT:#define __FLT_HAS_INFINITY__ 1 // WEBASSEMBLY-NEXT:#define __FLT_HAS_QUIET_NAN__ 1 @@ -1909,6 +1916,7 @@ // AVR:#define __FLT_DENORM_MIN__ 1.40129846e-45F // AVR:#define __FLT_DIG__ 6 // AVR:#define __FLT_EPSILON__ 1.19209290e-7F +// AVR:#define __FLT_EVAL_METHOD__ 0 // AVR:#define __FLT_HAS_DENORM__ 1 // AVR:#define __FLT_HAS_INFINITY__ 1 // AVR:#define __FLT_HAS_QUIET_NAN__ 1 @@ -2191,6 +2199,7 @@ // RISCV32: #define __FLT_DENORM_MIN__ 1.40129846e-45F // RISCV32: #define __FLT_DIG__ 6 // RISCV32: #define __FLT_EPSILON__ 1.19209290e-7F +// RISCV32: #define __FLT_EVAL_METHOD__ 0 // RISCV32: #define __FLT_HAS_DENORM__ 1 // RISCV32: #define __FLT_HAS_INFINITY__ 1 // RISCV32: #define __FLT_HAS_QUIET_NAN__ 1 @@ -2398,6 +2407,7 @@ // RISCV64: #define __FLT_DENORM_MIN__ 1.40129846e-45F // RISCV64: #define __FLT_DIG__ 6 // RISCV64: #define __FLT_EPSILON__ 1.19209290e-7F +// RISCV64: #define __FLT_EVAL_METHOD__ 0 // RISCV64: #define __FLT_HAS_DENORM__ 1 // RISCV64: #define __FLT_HAS_INFINITY__ 1 // RISCV64: #define __FLT_HAS_QUIET_NAN__ 1 diff --git a/clang/test/Preprocessor/predefined-flteval-macro.c b/clang/test/Preprocessor/predefined-flteval-macro.c deleted file mode 100644 index eba837a523b5e3..00000000000000 --- a/clang/test/Preprocessor/predefined-flteval-macro.c +++ /dev/null @@ -1,346 +0,0 @@ -// RUN: %clang_cc1 -std=c11 -E -triple=aarch64 -xc %s | FileCheck %s -// RUN: %clang_cc1 -std=c11 -triple=aarch64 -xc -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple=arm64 -xc -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple=aarch64_be -xc -fsyntax-only %s -// RUN: %clang_cc1 -triple=arm64 -xc++ -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=aarch64-apple-ios7.0 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=aarch64-windows-msvc -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple=aarch64 -mcmodel=small -xc -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple=aarch64 -mcmodel=tiny -xc -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple=aarch64 -mcmodel=large -xc -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=thumbv7-windows-msvc -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=arm-none-none -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=arm-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple arm-none-none -target-abi apcs-gnu -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=armeb-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=arm-none-linux-gnueabi -target-feature +soft-float -target-feature +soft-float-abi -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=arm-none-linux-gnueabi -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=armv6-unknown-cloudabi-eabihf -fsyntax-only %s -// RUN: %clang -c -ffreestanding -target arm-netbsd-eabi -fsyntax-only %s -// RUN: %clang -c -ffreestanding -target arm-netbsd-eabihf -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=arm-none-eabi -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=arm-none-eabihf -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=aarch64-none-eabi -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=aarch64-none-eabihf -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=aarch64-none-elf -fsyntax-only %s -// RUN: %clang -target x86_64-apple-darwin -arch armv7s -x c -fsyntax-only %s -// RUN: %clang -target x86_64-apple-darwin -arch armv6m -x c -fsyntax-only %s -// RUN: %clang -target x86_64-apple-darwin -arch armv7m -x c -fsyntax-only %s -// RUN: %clang -target x86_64-apple-darwin -arch armv7em -x c -fsyntax-only %s -// RUN: %clang -target x86_64-apple-darwin -arch armv7 -x c -fsyntax-only %s -// RUN: %clang -c -target arm -mhwdiv=arm -x c -fsyntax-only %s -// RUN: %clang -c -target arm -mthumb -mhwdiv=thumb -x c -fsyntax-only %s -// RUN: %clang -c -target arm -x c -fsyntax-only %s -// RUN: %clang -c -target arm -mthumb -x c -fsyntax-only %s -// RUN: %clang -c -target arm -mhwdiv=thumb -x c -fsyntax-only %s -// RUN: %clang -c -target arm -mthumb -mhwdiv=arm -x c -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=armv8-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=armebv8-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=thumbv8 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=thumbebv8 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=thumbv5 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=thumbv6t2 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=thumbv7 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=thumbebv7 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=thumbv7-pc-windows-gnu -exception-model=dwarf -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc-none-none -target-cpu 603e -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=powerpc-none-none -target-cpu 603e -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc-none-none -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=1 -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=1 -triple=powerpc-ibm-aix7.2.0.0 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=1 -triple=powerpc-ibm-aix7.1.0.0 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=1 -triple=powerpc-ibm-aix6.1.0.0 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=1 -triple=powerpc-ibm-aix5.3.0.0 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=1 -triple=powerpc-ibm-aix5.2.0.0 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=1 -triple=powerpc-ibm-aix5.1.0.0 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=1 -triple=powerpc-ibm-aix5.0.0.0 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=1 -triple=powerpc-ibm-aix4.3.0.0 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=1 -triple=powerpc-ibm-aix4.1.0.0 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=1 -triple=powerpc-ibm-aix3.2.0.0 -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -DFEM=1 -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -fno-wchar -ffreestanding -DFEM=1 -triple=powerpc-ibm-aix7.1.0.0 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -x c -ffreestanding -DFEM=1 -triple=powerpc-ibm-aix7.1.0.0 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=1 -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char -pthread -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=1 -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc-unknown-linux-gnu -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc-unknown-linux-gnu -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc-unknown-linux-gnu -target-feature +spe -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc-unknown-linux-gnu -target-cpu 8548 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc-apple-darwin8 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mipsel-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips64-none-none -target-abi n32 -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=mips64-none-none -target-abi n32 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips64el-none-none -target-abi n32 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips64-none-none -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=mips64-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips64el-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips-none-nones -target-cpu mips32 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips-none-none -target-cpu mips32r2 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips-none-none -target-cpu mips32r3 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips-none-none -target-cpu mips32r5 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips-none-none -target-cpu mips32r6 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips64-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips64-none-none -target-cpu mips64 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips64-none-none -target-cpu mips64r2 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips64-none-none -target-cpu mips64r3 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips64-none-none -target-cpu mips64r5 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips64-none-none -target-cpu mips64r6 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips64-none-none -target-cpu octeon -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips64-none-none -target-cpu octeon+ -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature +soft-float -ffreestanding -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature +single-float -ffreestanding -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature +soft-float -target-feature +single-float -ffreestanding -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature +mips16 -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature -mips16 -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature +micromips -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature -micromips -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature +dsp -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature +dspr2 -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature +msa -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature +nomadd4 -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-cpu mips32r3 -target-feature +nan2008 -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-cpu mips32r3 -target-feature -nan2008 -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-cpu mips32r3 -target-feature +abs2008 -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-cpu mips32r3 -target-feature -abs2008 -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature +fpxx -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-cpu mips32r6 -target-feature +fpxx -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple=mips64-none-none -fsyntax-only %s -// RUN: not %clang_cc1 -std=c11 -target-feature -fp64 -triple=mips64-none-none 2>&1 -fsyntax-only %s -// RUN: not %clang_cc1 -std=c11 -target-feature +fpxx -triple=mips64-none-none 2>&1 -fsyntax-only %s -// RUN: not %clang_cc1 -std=c11 -target-cpu mips64r6 -target-feature +fpxx -triple=mips64-none-none 2>&1 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature -fp64 -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature +fp64 -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature +single-float -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature +fp64 -triple=mips64-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-feature -fp64 -target-feature +single-float -triple=mips64-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-cpu mips32r6 -triple=mips-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-cpu mips64r6 -triple=mips64-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-cpu mips32 -triple=mips-unknown-netbsd -mrelocation-model pic -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-cpu mips64 -triple=mips64-unknown-netbsd -mrelocation-model pic -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-cpu mips32 -triple=mips-unknown-freebsd -mrelocation-model pic -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-cpu mips64 -triple=mips64-unknown-freebsd -mrelocation-model pic -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-cpu mips32 -triple=mips-unknown-openbsd -mrelocation-model pic -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -target-cpu mips64 -triple=mips64-unknown-openbsd -mrelocation-model pic -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu pwr7 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=powerpc64-none-none -target-cpu pwr7 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64le-none-none -target-cpu pwr7 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu 630 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu pwr3 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu power3 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu pwr4 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu power4 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu pwr5 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu power5 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu pwr5x -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu power5x -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu pwr6 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu power6 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu pwr6x -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu power6x -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu pwr7 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu power7 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu pwr8 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu power8 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64le-none-none -target-cpu ppc64le -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu pwr9 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu power9 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu pwr10 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu power10 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-cpu future -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-feature +mma -target-cpu power10 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-none-none -target-feature +float128 -target-cpu power9 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=1 -triple=powerpc64-ibm-aix7.1.0.0 -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-unknown-linux-gnu -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-unknown-linux-gnu -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-unknown-linux-gnu -target-abi elfv1 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-unknown-linux-gnu -target-abi elfv2 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64le-unknown-linux-gnu -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64le-unknown-linux-gnu -target-abi elfv1 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64le-unknown-linux-gnu -target-abi elfv2 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-unknown-freebsd11 -target-abi elfv1 -xc -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-unknown-freebsd12 -target-abi elfv1 -xc -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-unknown-freebsd13 -target-abi elfv2 -xc -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64le-unknown-freebsd13 -target-abi elfv2 -xc -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-unknown-openbsd -target-abi elfv2 -xc -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-linux-musl -target-abi elfv2 -xc -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64le-unknown-linux-gnu -target-abi elfv2 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-unknown-freebsd -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64le-unknown-freebsd -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=s390x-none-none -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=s390x-none-none -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=s390x-none-zos -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=gnu++14 -ffreestanding -triple=s390x-none-zos -fno-signed-char -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=arm64_32-apple-ios7.0 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=thumbv7k-apple-watchos2.0 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=2 -triple=i386-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=i386-pc-linux-gnu -target-cpu pentium4 -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=i386-pc-linux-gnu -target-cpu pentium4 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=i386-pc-linux-gnu -target-cpu pentium4 -malign-double -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=2 -triple=i386-netbsd -target-cpu i486 -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -DFEM=2 -triple=i386-netbsd -target-cpu i486 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=2 -triple=i386-netbsd -target-cpu i486 -malign-double -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=i386-netbsd -target-feature +sse2 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=1 -triple=i386-netbsd6 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=1 -triple=i386-netbsd6 -target-feature +sse2 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -DFEM=2 -triple=i686-pc-mingw32 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -DFEM=2 -fms-extensions -triple=i686-pc-mingw32 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -DFEM=2 -triple=i686-unknown-cygwin -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -DFEM=2 -fms-extensions -triple=i686-unknown-cygwin -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=x86_64-none-none -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=x86_64-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=x86_64h-none-none -fsyntax-only %s -// RUN: %clang_cc1 -xc -mcmodel=medium -DFEM=2 -triple=i386-unknown-linux -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=x86_64-none-none-gnux32 -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=x86_64-none-none-gnux32 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=x86_64-unknown-cloudabi -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=x86_64-pc-linux-gnu -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=x86_64-unknown-freebsd9.1 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=x86_64-netbsd -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -x assembler-with-cpp -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -fblocks -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=c++2b -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=c++20 -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=c++2a -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=c++17 -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=c++1z -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=c++14 -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=c++1y -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=c++11 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -fdeprecated-macro -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -std=c99 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -std=c11 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -std=c1x -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -std=iso9899:2011 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -std=iso9899:201x -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple=x86_64-pc-win32 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple=x86_64-pc-linux-gnu -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple=x86_64-apple-darwin -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple=armv7a-apple-darwin -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=gnu++2b -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=gnu++20 -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=gnu++2a -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=gnu++17 -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=gnu++1z -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=gnu++14 -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=gnu++1y -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -std=gnu++11 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -std=iso9899:199409 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -DFEM=2 -fms-extensions -triple i686-pc-win32 -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -DFEM=2 -fms-extensions -triple i686-pc-win32 -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -fno-wchar -DFEM=2 -fms-extensions -triple i686-pc-win32 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -x objective-c -fsyntax-only %s -// RUN: %clang_cc1 -x objective-c++ -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -x objective-c -fobjc-gc -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -x objective-c -fobjc-exceptions -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -fno-inline -O3 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -O1 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -Og -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -Os -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -Oz -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -fpascal-strings -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -fwchar-type=short -fno-signed-wchar -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -fwchar-type=short -fno-signed-wchar -triple=x86_64-w64-mingw32 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -fwchar-type=short -fno-signed-wchar -triple=x86_64-unknown-windows-cygnus -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -fwchar-type=int -DFEM=2 -triple=i686-unknown-unknown -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -fwchar-type=int -triple=x86_64-unknown-unknown -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=msp430-none-none -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=msp430-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=nvptx-none-none -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=nvptx-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=nvptx64-none-none -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=nvptx64-none-none -fsyntax-only %s -// RUN: %clang_cc1 -x cl -ffreestanding -triple=amdgcn -fsyntax-only %s -// RUN: %clang_cc1 -x cl -ffreestanding -triple=r600 -target-cpu caicos -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=sparc-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=sparc-rtems-elf -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=sparc-none-netbsd -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=sparc-none-openbsd -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=sparc-none-none -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=sparc-none-openbsd -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=tce-none-none -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=tce-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=x86_64-scei-ps4 -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -ffreestanding -triple=x86_64-scei-ps4 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple=x86_64-pc-mingw32 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -fms-extensions -triple=x86_64-unknown-mingw32 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=sparc64-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=sparc64-none-openbsd -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=x86_64-pc-kfreebsd-gnu -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=2 -triple=i686-pc-kfreebsd-gnu -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -DFEM=2 -triple i686-pc-linux-gnu -fobjc-runtime=gcc -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -triple sparc-rtems-elf -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -x objective-c -DFEM=2 -triple i386-unknown-freebsd -fobjc-runtime=gnustep-1.9 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -x objective-c -DFEM=2 -triple i386-unknown-freebsd -fobjc-runtime=gnustep-2.5 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple arm-linux-androideabi -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -DFEM=2 -triple i686-linux-android -fsyntax-only %s -// RUN: %clang_cc1 -x c++ -triple x86_64-linux-android -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple arm-linux-androideabi20 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple lanai-unknown-unknown -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=amd64-unknown-openbsd6.1 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=aarch64-unknown-openbsd6.1 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=arm-unknown-openbsd6.1-gnueabi -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=2 -triple=i386-unknown-openbsd6.1 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc-unknown-openbsd6.1 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64-unknown-openbsd6.1 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=powerpc64le-unknown-openbsd6.1 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips64-unknown-openbsd6.1 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=mips64el-unknown-openbsd6.1 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=sparc64-unknown-openbsd6.1 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=riscv64-unknown-openbsd6.1 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=xcore-none-none -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=wasm32-unknown-unknown -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=wasm64-unknown-unknown -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=wasm32-wasi -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=wasm64-wasi -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -DFEM=2 -triple i686-windows-cygnus -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple x86_64-windows-cygnus -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=avr -fsyntax-only %s -// RUN: %clang_cc1 -ffreestanding -DFEM=2 -triple i686-windows-msvc -fms-compatibility -x c++ -fsyntax-only %s -// RUN: %clang_cc1 -ffreestanding -triple x86_64-windows-msvc -fms-compatibility -x c++ -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=aarch64-apple-ios9 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=aarch64-apple-macosx10.12 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -DFEM=2 -triple i386-apple-macosx -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple x86_64-apple-macosx -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -DFEM=2 -triple i386-apple-ios-simulator -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple armv7-apple-ios -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple x86_64-apple-ios-simulator -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple arm64-apple-ios -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -DFEM=2 -triple i386-apple-tvos-simulator -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple armv7-apple-tvos -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple x86_64-apple-tvos-simulator -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple arm64-apple-tvos -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -DFEM=2 -triple i386-apple-watchos-simulator -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple armv7k-apple-watchos -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple x86_64-apple-watchos-simulator -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple arm64-apple-watchos -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple armv7-apple-none-macho -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -triple arm64-apple-none-macho -ffreestanding -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=riscv32 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=riscv32-unknown-linux -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=riscv32 -fforce-enable-int128 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=riscv64 -fsyntax-only %s -// RUN: %clang_cc1 -std=c11 -ffreestanding -triple=riscv64-unknown-linux -fsyntax-only %s -#ifndef FEM -#define FEM 0 -#endif -#ifdef __cplusplus -#define SASSERT static_assert -#else -#define SASSERT _Static_assert -#endif -int getFEM() { - SASSERT(__FLT_EVAL_METHOD__ == FEM, "Unexpected macro value"); - return __FLT_EVAL_METHOD__; - // Note, the preprocessor in -E mode no longer expands this macro. - // CHECK: __FLT_EVAL_METHOD__ -}