RISC-V: Refactor Dynamic LMUL codes
[official-gcc.git] / gcc / testsuite / gfortran.dg / namelist_76.f90
blob9c233fb5bcbe0c4329354518a62a76fcd96c853a
1 ! { dg-do compile }
3 ! PR 55352: [4.7/4.8 Regression] Erroneous gfortran warning of unused module variable when variable is only used in namelist
5 ! Contributed by <AstroFloyd@gmail.com>
7 module data
8 implicit none
9 integer :: a
10 end module data
12 program test
13 use data, only: a
14 implicit none
15 a = 1
16 call write_data()
17 end program test
19 subroutine write_data()
20 use data, only: a
21 implicit none
22 namelist /write_data_list/ a
23 open(unit=10,form='formatted',status='replace',action='write',file='test.dat')
24 write(10, nml=write_data_list)
25 close(10)
26 end subroutine write_data