brintos

brintos / llvm-project-archived public Read only

0
0
Text · 949 B · 18f068a Raw
21 lines · plain
1! Verify that the driver correctly processes `-fsyntax-only`.2!3! By default, the compiler driver (`flang`) will create actions/phases to4! generate machine code (i.e. object files). The `-fsyntax-only` flag is a5! "phase-control" flag that controls this behavior and makes the driver stop6! once the semantic checks have been run. The frontend driver (`flang -fc1`)7! runs `-fsyntax-only` by default (i.e. that's the default action), so the flag8! can be skipped.9 10! RUN: %flang -fsyntax-only %s 2>&1 | FileCheck %s --allow-empty11! RUN: %flang_fc1 %s 2>&1 | FileCheck %s --allow-empty12 13! RUN: rm -rf %t/non-existent-dir/14! RUN: not %flang -c %s -o %t/non-existent-dir/syntax-only.o 2>&1 | FileCheck %s --check-prefix=NO_FSYNTAX_ONLY15! RUN: not %flang_fc1 -emit-obj %s -o %t/non-existent-dir/syntax-only.o 2>&1 | FileCheck %s --check-prefix=NO_FSYNTAX_ONLY16 17! CHECK-NOT: error18! NO_FSYNTAX_ONLY: error: failed to create the output file19 20end program21