There was a bug with the -funderscoring / -fno-underscoring options from (https://reviews.llvm.org/D140795) that prevented the driver option from controlling the underscoring behaviour and instead the behaviour could only be controlled by the pass option instead of the driver option. The driver test case did not catch the bug and also needed to be updated. Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D155042
25 lines
643 B
Fortran
25 lines
643 B
Fortran
! 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-NOT: {{test:$}}
|
|
! UNDERSCORING: ext_sub_
|
|
! UNDERSCORING-NOT: {{ext_sub[^_]*$}}
|
|
! UNDERSCORING: comblk_
|
|
! UNDERSCORING-NOT: comblk,
|
|
|
|
! NO-UNDERSCORING-NOT: test_
|
|
! NO-UNDERSCORING: test:
|
|
! NO-UNDERSCORING-NOT: ext_sub_
|
|
! NO-UNDERSCORING: {{ext_sub[^_]*$}}
|
|
! NO-UNDERSCORING-NOT: comblk_
|
|
! NO-UNDERSCORING: comblk,
|