File: pic-flags.f90

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (74 lines) | stat: -rw-r--r-- 3,386 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
! RUN: %if aarch64-registered-target %{ %flang -v -S -emit-llvm -o - %s --target=aarch64-linux-gnu -fno-pie 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-STATIC,CHECK-STATIC-IR %}

! RUN: %if aarch64-registered-target %{ %flang -v -S -emit-llvm -o - %s --target=aarch64-linux-gnu 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-PIE-LEVEL2,CHECK-PIE-LEVEL2-IR %}
! RUN: %if aarch64-registered-target %{ %flang -v -S -emit-llvm -o - %s --target=aarch64-linux-gnu -fpie 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-PIE-LEVEL1,CHECK-PIE-LEVEL1-IR %}
! RUN: %if aarch64-registered-target %{ %flang -v -S -emit-llvm -o - %s --target=aarch64-linux-gnu -fPIE 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-PIE-LEVEL2,CHECK-PIE-LEVEL2-IR %}

! RUN: %if aarch64-registered-target %{ %flang -v -S -emit-llvm -o - %s --target=aarch64-linux-gnu -fpic 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-PIC-LEVEL1,CHECK-PIC-LEVEL1-IR %}
! RUN: %if aarch64-registered-target %{ %flang -v -S -emit-llvm -o - %s --target=aarch64-linux-gnu -fPIC 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-PIC-LEVEL2,CHECK-PIC-LEVEL2-IR %}

! RUN: %if x86-registered-target %{ %flang -v -### -o - %s --target=i386-apple-darwin -mdynamic-no-pic 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-DYNAMIC-NO-PIC-32 %}
! RUN: %if x86-registered-target %{ %flang -v -### -o - %s --target=x86_64-apple-darwin -mdynamic-no-pic 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-DYNAMIC-NO-PIC-64 %}

! RUN: %if arm-registered-target %{ %flang -v -### -o - %s --target=arm-none-eabi -fropi 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-ROPI %}
! RUN: %if arm-registered-target %{ %flang -v -### -o - %s --target=arm-none-eabi -frwpi 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-RWPI %}
! RUN: %if arm-registered-target %{ %flang -v -### -o - %s --target=arm-none-eabi -fropi -frwpi 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-ROPI-RWPI %}

! CHECK: -fc1


!! -fno-pie.
! CHECK-STATIC: -mrelocation-model static
! CHECK-STATIC-NOT: -pic

! CHECK-STATIC-IR-NOT: {{PIE|PIC}} Level


!! -fpic.
! CHECK-PIC-LEVEL1: -mrelocation-model pic -pic-level 1
! CHECK-PIC-LEVEL1-NOT: -pic-is-pie

! CHECK-PIC-LEVEL1-IR-NOT: "PIE Level"
! CHECK-PIC-LEVEL1-IR: !"PIC Level", i32 1}
! CHECK-PIC-LEVEL1-IR-NOT: "PIE Level"


!! -fPIC.
! CHECK-PIC-LEVEL2: -mrelocation-model pic -pic-level 2
! CHECK-PIC-LEVEL2-NOT: -pic-is-pie

! CHECK-PIC-LEVEL2-IR-NOT: "PIE Level"
! CHECK-PIC-LEVEL2-IR: !"PIC Level", i32 2}
! CHECK-PIC-LEVEL2-IR-NOT: "PIE Level"


!! -fpie.
! CHECK-PIE-LEVEL1: -mrelocation-model pic -pic-level 1 -pic-is-pie
! CHECK-PIE-LEVEL1-IR: !"PIC Level", i32 1}
! CHECK-PIE-LEVEL1-IR: !"PIE Level", i32 1}


!! -fPIE.
! CHECK-PIE-LEVEL2: -mrelocation-model pic -pic-level 2 -pic-is-pie
! CHECK-PIE-LEVEL2-IR: !"PIC Level", i32 2}
! CHECK-PIE-LEVEL2-IR: !"PIE Level", i32 2}


!! -mdynamic-no-pic
! CHECK-DYNAMIC-NO-PIC-32: "-mrelocation-model" "dynamic-no-pic"
! CHECK-DYNAMIC-NO-PIC-32-NOT: "-pic-level"
! CHECK-DYNAMIC-NO-PIC-32-NOT: "-pic-is-pie"

! CHECK-DYNAMIC-NO-PIC-64: "-mrelocation-model" "dynamic-no-pic" "-pic-level" "2"
! CHECK-DYNAMIC-NO-PIC-64-NOT: "-pic-is-pie"


!! -fropi -frwpi
! CHECK-ROPI: "-mrelocation-model" "ropi"
! CHECK-ROPI-NOT: "-pic

! CHECK-RWPI: "-mrelocation-model" "rwpi"
! CHECK-RWPI-NOT: "-pic

! CHECK-ROPI-RWPI: "-mrelocation-model" "ropi-rwpi"
! CHECK-ROPI-RWPI-NOT: "-pic