| 1 |
! Test the -funderscoring flag |
| 2 |
|
| 3 |
! RUN: %flang_fc1 -S %s -o - 2>&1 | FileCheck %s --check-prefix=UNDERSCORING |
| 4 |
! RUN: %flang_fc1 -S -fno-underscoring %s -o - 2>&1 | FileCheck %s --check-prefix=NO-UNDERSCORING |
| 5 |
|
| 6 |
subroutine test() |
| 7 |
common /comblk/ a, b |
| 8 |
external :: ext_sub |
| 9 |
call ext_sub() |
| 10 |
end |
| 11 |
|
| 12 |
! UNDERSCORING: test_ |
| 13 |
! UNDERSCORING-NOT: {{test:$}} |
| 14 |
! UNDERSCORING: ext_sub_ |
| 15 |
! UNDERSCORING-NOT: {{ext_sub[^_]*$}} |
| 16 |
! UNDERSCORING: comblk_ |
| 17 |
! UNDERSCORING-NOT: comblk, |
| 18 |
|
| 19 |
! NO-UNDERSCORING-NOT: test_ |
| 20 |
! NO-UNDERSCORING: test: |
| 21 |
! NO-UNDERSCORING-NOT: ext_sub_ |
| 22 |
! NO-UNDERSCORING: {{ext_sub[^_]*$}} |
| 23 |
! NO-UNDERSCORING-NOT: comblk_ |
| 24 |
! NO-UNDERSCORING: {{comblk[^_]*$}} |