54 lines · plain
1! Test that flang forwards -f{no-}color-diagnostics and2! -f{no-}diagnostics-color options to flang -fc1 as expected.3 4! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 -fcolor-diagnostics \5! RUN: | FileCheck %s --check-prefix=CHECK-CD6! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 -fdiagnostics-color \7! RUN: | FileCheck %s --check-prefix=CHECK-CD8! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 -fdiagnostics-color=always \9! RUN: | FileCheck %s --check-prefix=CHECK-CD10! CHECK-CD: "-fc1"{{.*}} "-fcolor-diagnostics"11 12! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 -fno-color-diagnostics \13! RUN: | FileCheck %s --check-prefix=CHECK-NCD14! RUN: %flang -fsyntax-only -### %s -o %t -fno-diagnostics-color 2>&1 \15! RUN: | FileCheck %s --check-prefix=CHECK-NCD16! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 -fdiagnostics-color=never \17! RUN: | FileCheck %s --check-prefix=CHECK-NCD18! CHECK-NCD-NOT: "-fc1"{{.*}} "-fcolor-diagnostics"19 20! Check that the last flag wins.21! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 \22! RUN: -fno-color-diagnostics -fcolor-diagnostics \23! RUN: | FileCheck %s --check-prefix=CHECK-NCD_CD_S24! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 \25! RUN: -fno-diagnostics-color -fdiagnostics-color \26! RUN: | FileCheck %s --check-prefix=CHECK-NCD_CD_S27! RUN: %flang -fsyntax-only -### %s -o %t \28! RUN: -fno-color-diagnostics -fdiagnostics-color=always 2>&1 \29! RUN: | FileCheck %s --check-prefix=CHECK-NCD_CD_S30! RUN: %flang -fsyntax-only -### %s -o %t \31! RUN: -fdiagnostics-color=never -fdiagnostics-color=always 2>&1 \32! RUN: | FileCheck %s --check-prefix=CHECK-NCD_CD_S33! RUN: %flang -fsyntax-only -### %s -o %t \34! RUN: -fdiagnostics-color=never -fcolor-diagnostics 2>&1 \35! RUN: | FileCheck %s --check-prefix=CHECK-NCD_CD_S36! CHECK-NCD_CD_S: "-fc1"{{.*}} "-fcolor-diagnostics"37 38! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 \39! RUN: -fcolor-diagnostics -fno-color-diagnostics \40! RUN: | FileCheck %s --check-prefix=CHECK-CD_NCD_S41! RUN: %flang -fsyntax-only -### %s -o %t \42! RUN: -fdiagnostics-color -fno-diagnostics-color 2>&1 \43! RUN: | FileCheck %s --check-prefix=CHECK-CD_NCD_S44! RUN: %flang -fsyntax-only -### %s -o %t \45! RUN: -fdiagnostics-color=always -fno-color-diagnostics 2>&1 \46! RUN: | FileCheck %s --check-prefix=CHECK-CD_NCD_S47! RUN: %flang -fsyntax-only -### %s -o %t \48! RUN: -fdiagnostics-color=always -fdiagnostics-color=never 2>&1 \49! RUN: | FileCheck %s --check-prefix=CHECK-CD_NCD_S50! RUN: %flang -fsyntax-only -### %s -o %t \51! RUN: -fcolor-diagnostics -fdiagnostics-color=never 2>&1 \52! RUN: | FileCheck %s --check-prefix=CHECK-CD_NCD_S53! CHECK-CD_NCD_S-NOT: "-fc1"{{.*}} "-fcolor-diagnostics"54