gcc/fortran/
[official-gcc.git] / gcc / testsuite / gfortran.dg / public_private_module_5.f90
blob9c9d15dbd760a3f9cb35d8b9cfa4f3c0e13f2910
1 ! { dg-do compile }
2 ! { dg-options "-O3" }
4 ! PR fortran/53175
7 MODULE ENERGY_FUNCTION
8 IMPLICIT NONE
10 TYPE PARAM
11 PRIVATE
12 INTEGER :: WHICH_VECTOR
13 END TYPE PARAM
15 INTEGER, PRIVATE :: DIM2
16 INTEGER, PRIVATE :: DIM5
18 private :: specific
19 interface gen
20 module procedure specific
21 end interface gen
23 CONTAINS
25 FUNCTION ENERGY_FUNCTION_CURRENT_ARGS()
26 INTEGER, DIMENSION(DIM2) :: ENERGY_FUNCTION_CURRENT_ARGS
27 END FUNCTION ENERGY_FUNCTION_CURRENT_ARGS
29 FUNCTION ENERGY_FUNCTION_GET_PARAMS()
30 TYPE(PARAM), DIMENSION(DIM2) :: ENERGY_FUNCTION_GET_PARAMS
31 END FUNCTION ENERGY_FUNCTION_GET_PARAMS
33 function specific()
34 character(len=dim5) :: specific
35 end function specific
36 END MODULE ENERGY_FUNCTION
38 ! { dg-final { scan-assembler "__energy_function_MOD_dim2" } }
39 ! { dg-final { scan-assembler "__energy_function_MOD_dim5" } }