2020-05-12 02:38:53 +08:00
|
|
|
! RUN: %S/test_modfile.sh %s %t %f18
|
2019-08-27 22:11:54 +08:00
|
|
|
! Test 7.6 enum values
|
|
|
|
|
|
|
|
module m1
|
|
|
|
integer, parameter :: x(1) = [4]
|
|
|
|
enum, bind(C)
|
|
|
|
enumerator :: red, green
|
|
|
|
enumerator blue
|
|
|
|
enumerator yellow
|
|
|
|
enumerator :: purple = 2
|
|
|
|
enumerator :: brown
|
|
|
|
end enum
|
|
|
|
|
|
|
|
enum, bind(C)
|
|
|
|
enumerator :: oak, beech = -rank(x)*x(1), pine, poplar = brown
|
|
|
|
end enum
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
!Expect: m1.mod
|
|
|
|
!module m1
|
2020-01-07 06:04:17 +08:00
|
|
|
!integer(4),parameter::x(1_8:1_8)=[INTEGER(4)::4_4]
|
2019-08-27 22:11:54 +08:00
|
|
|
!integer(4),parameter::red=0_4
|
|
|
|
!integer(4),parameter::green=1_4
|
|
|
|
!integer(4),parameter::blue=2_4
|
|
|
|
!integer(4),parameter::yellow=3_4
|
|
|
|
!integer(4),parameter::purple=2_4
|
|
|
|
!integer(4),parameter::brown=3_4
|
|
|
|
!integer(4),parameter::oak=0_4
|
|
|
|
!integer(4),parameter::beech=-4_4
|
2019-12-26 04:29:50 +08:00
|
|
|
!intrinsic::rank
|
2019-08-27 22:11:54 +08:00
|
|
|
!integer(4),parameter::pine=-3_4
|
|
|
|
!integer(4),parameter::poplar=3_4
|
|
|
|
!end
|
|
|
|
|