Index: clang/lib/Driver/ToolChains/Clang.cpp =================================================================== --- clang/lib/Driver/ToolChains/Clang.cpp +++ clang/lib/Driver/ToolChains/Clang.cpp @@ -2899,7 +2899,8 @@ // -ffp-model=precise sets PreciseFPModel to on and Val to // "precise". FPContract is set. ; - } else if (Val.equals("fast") || Val.equals("on") || Val.equals("off")) { + } else if (Val.equals("fast") || Val.equals("on") || Val.equals("off") || + Val.equals("fast-honor-pragmas")) { FPContract = Val; LastSeenFfpContractOption = Val; } else Index: clang/test/Driver/fp-contract.c =================================================================== --- clang/test/Driver/fp-contract.c +++ clang/test/Driver/fp-contract.c @@ -21,6 +21,10 @@ // RUN: %clang -### -ffast-math -ffp-contract=fast -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-FPC-FAST %s +// RUN: %clang -### -ffast-math -ffp-contract=fast-honor-pragmas -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-FPC-FAST-HONOR %s +// CHECK-FPC-FAST-HONOR: "-ffp-contract=fast-honor-pragmas" + // RUN: %clang -### -ffp-contract=fast -ffast-math -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-FPC-FAST %s // RUN: %clang -### -ffp-contract=on -ffast-math -c %s 2>&1 \