This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34854] New: Valid USE statement is rejected
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jan 2008 17:46:52 -0000
- Subject: [Bug fortran/34854] New: Valid USE statement is rejected
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I think both testcases below are valid, but gfortran rejects the
second one. They only differ in the order of USE statements.
$ cat test.f90
module common_init_conf
integer, allocatable, dimension(:,:) :: Nmoltype_phase
end module common_init_conf
subroutine read_initial_config_nml()
use common_init_conf, nmoltype_phase_com => nmoltype_phase
use common_init_conf
implicit none
integer :: nmoltype_phase
namelist /confNmoltypePhase/ nmoltype_phase
end subroutine read_initial_config_nml
$ gfortran -c test.f90 && echo OK
OK
$ cat test2.f90
module common_init_conf
integer, allocatable, dimension(:,:) :: Nmoltype_phase
end module common_init_conf
subroutine read_initial_config_nml()
use common_init_conf
use common_init_conf, nmoltype_phase_com => nmoltype_phase
implicit none
integer :: nmoltype_phase
namelist /confNmoltypePhase/ nmoltype_phase
end subroutine read_initial_config_nml
$ gfortran -c test2.f90
test2.f90:9.27:
integer :: nmoltype_phase
1
Error: Symbol 'nmoltype_phase' at (1) already has basic type of INTEGER
test2.f90:10.45:
namelist /confNmoltypePhase/ nmoltype_phase
1
Error: NAMELIST attribute conflicts with ALLOCATABLE attribute in
'nmoltype_phase' at (1)
--
Summary: Valid USE statement is rejected
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34854