1! Verify that in contrast to Clang, Flang does not default to generating position independent executables/code 2 3! RUN: %flang -### %s --target=aarch64-linux-gnu 2>&1 | FileCheck %s --check-prefix=CHECK-NOPIE 4! RUN: %flang -### %s --target=aarch64-linux-gnu -fno-pie 2>&1 | FileCheck %s --check-prefix=CHECK-NOPIE 5 6! RUN: %flang -### %s --target=aarch64-linux-gnu -fpie 2>&1 | FileCheck %s --check-prefix=CHECK-PIE 7 8! CHECK-NOPIE: "-fc1" 9! CHECk-NOPIE-NOT: "-fpic" 10! CHECK-NOPIE: "{{.*}}ld" 11! CHECK-NOPIE-NOT: "-pie" 12 13! CHECK-PIE: "-fc1" 14!! TODO Once Flang supports `-fpie`, it //should// use -fpic when invoking `flang -fc1`. Update the following line once `-fpie` is 15! available. 16! CHECk-PIE-NOT: "-fpic" 17! CHECK-PIE: "{{.*}}ld" 18! CHECK-PIE-NOT: "-pie" 19