summaryrefslogtreecommitdiff
path: root/flang/test/Driver/underscoring.f90
blob: a19b193df39fe4760be069ad5d761bff49e80a15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
! Test the -funderscoring flag

! RUN: %flang_fc1 -S %s -o - 2>&1 | FileCheck %s --check-prefix=UNDERSCORING
! RUN: %flang_fc1 -S -fno-underscoring %s -o - 2>&1 | FileCheck %s --check-prefix=NO-UNDERSCORING

subroutine test()
  common /comblk/ a, b
  external :: ext_sub
  call ext_sub()
end

! UNDERSCORING: test_
! UNDERSCORING: ext_sub_
! UNDERSCORING: comblk_

! NO-UNDERSCORING-NOT: test_
! NO-UNDERSCORING-NOT: _QPtest
! NO-UNDERSCORING: test
! NO-UNDERSCORING-NOT: ext_sub_
! NO-UNDERSCORING-NOT: _QPext_sub
! NO-UNDERSCORING: ext_sub
! NO-UNDERSCORING-NOT: comblk_
! NO-UNDERSCORING-NOT: _QBcomblk
! NO-UNDERSCORING: comblk