Skip to content

Commit 94722a3

Browse files
committed
Add tests where -no-pie and -pie are both present. Also add tests for the default
1 parent 312a7ee commit 94722a3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

flang/test/Driver/linker-options.f90

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
! Make sure that `-L' is "visible" to Flang's driver
1111
! RUN: %flang -L/ -### %s
1212

13-
! Check that '-pie' is "visible" to Flang's driver and is passed on to the
14-
! linker.
13+
! Check that '-pie' and '-no-pie' are "visible" to Flang's driver. Check that
14+
! the correct option is added to the link line. The default is '-pie'.
15+
! RUN: %flang -### %s 2>&1 | FileCheck %s --check-prefix=PIE
1516
! RUN: %flang -pie -### %s 2>&1 | FileCheck %s --check-prefix=PIE
16-
! PIE: "-pie"
17-
18-
! Check that '-no-pie' is "visible" to Flang's driver and that "-pie" is *not*
19-
! passed to the linker.
2017
! RUN: %flang -no-pie -### %s 2>&1 | FileCheck %s --check-prefix=NO-PIE
18+
! RUN: %flang -pie -no-pie -### %s 2>&1 | FileCheck %s --check-prefix=NO-PIE
19+
! RUN: %flang -no-pie -pie -### %s 2>&1 | FileCheck %s --check-prefix=PIE
20+
! PIE: "-pie"
2121
! NO-PIE-NOT: "-pie"
2222

2323
program hello

0 commit comments

Comments
 (0)