brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · ad871e0 Raw
39 lines · plain
1! Check that the pie/pic/PIE/PIC macros are defined properly through the frontend driver2 3! RUN: %flang_fc1 -dM -E -o - %s \4! RUN:   | FileCheck %s5! CHECK-NOT: #define __PIC__6! CHECK-NOT: #define __PIE__7! CHECK-NOT: #define __pic__8! CHECK-NOT: #define __pie__9!10! RUN: %flang_fc1 -pic-level 1 -dM -E -o - %s \11! RUN:   | FileCheck --check-prefix=CHECK-PIC1 %s12! CHECK-PIC1: #define __PIC__ 113! CHECK-PIC1-NOT: #define __PIE__14! CHECK-PIC1: #define __pic__ 115! CHECK-PIC1-NOT: #define __pie__16!17! RUN: %flang_fc1 -pic-level 2 -dM -E -o - %s \18! RUN:   | FileCheck --check-prefix=CHECK-PIC2 %s19! CHECK-PIC2: #define __PIC__ 220! CHECK-PIC2-NOT: #define __PIE__21! CHECK-PIC2: #define __pic__ 222! CHECK-PIC2-NOT: #define __pie__23!24! RUN: %flang_fc1 -pic-level 1 -pic-is-pie -dM -E -o - %s \25! RUN:   | FileCheck --check-prefix=CHECK-PIE1 %s26! CHECK-PIE1: #define __PIC__ 127! CHECK-PIE1: #define __PIE__ 128! CHECK-PIE1: #define __pic__ 129! CHECK-PIE1: #define __pie__ 130!31! RUN: %flang_fc1 -pic-level 2 -pic-is-pie -dM -E -o - %s \32! RUN:   | FileCheck --check-prefix=CHECK-PIE2 %s33! CHECK-PIE2: #define __PIC__ 234! CHECK-PIE2: #define __PIE__ 235! CHECK-PIE2: #define __pic__ 236! CHECK-PIE2: #define __pie__ 237 38integer, parameter :: pic_level = __pic__39