summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/module_naming_1.f90
blob: 7b9df0a99a94ac330dc523539b80551a0caeb583 (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
25
26
27
28
29
30
31
32
! { dg-do assemble }
! PR 31144
! Makes sure that our name mangling scheme can't be outwitted

! old scheme
module m1
contains
  subroutine m2__m3()
  end subroutine m2__m3
end module m1

module m1__m2
contains
  subroutine m3()
  end subroutine m3
end module m1__m2

! New scheme, relies on capitalization
module m2
contains
  subroutine m2_MOD_m3()
    ! mangled to __m2_MOD_m2_mod_m3
  end subroutine m2_MOD_m3
end module m2

module m2_MOD_m2
contains
  subroutine m3()
    ! mangled to __m2_mod_m2_MOD_m3
  end subroutine m3
end module m2_MOD_m2
! { dg-final { cleanup-modules "m1 m1__m2 m2 m2_MOD_m2" } }