Hi,
This bug seems not very different from bug #20244 but happens at a different
line in the same function. 

during compilation of my code I get the following error mesage:
[EMAIL PROTECTED] 5common]$ /usr/local/bin/gfortran  -c 
../../../src/5common/funcofrho_tfw.F90
../../../src/5common/funcofrho_tfw.F90: In function ‘init_eneofrho_tfw’:
../../../src/5common/funcofrho_tfw.F90:82: internal compiler error: in
fold_convert, at fold-const.c:2028
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Sorry but I can't reduce the code more than that. It's in three files of which
onlys the first result in an error:
FUNCOFRHO_TFW.F90:
module funcofrho_tfw
  use defs_basis
  use defs_datatypes
  implicit none
  !! common variables copied from input
  integer :: ngfft(18),nfftf
  real(dp):: ucvol
  type(MPI_type) :: mpi_enreg
  real(dp),allocatable::deltaW(:,:)
  real(dp),allocatable::lavnlfft(:,:)
  real(dp),allocatable::vtrial(:,:)
  !! common variables computed
  logical :: ok=.false.  
  integer :: nfftot
  real(dp):: alpha
  !! initialisation routine
contains
  !!-------------------------------------------------------------------!!
  !! initialisation subroutine
  !!-------------------------------------------------------------------!!
  subroutine
init_eneofrho_tfw(ngfft_in,nfftf_in,mpi_enreg_in,ucvol_in,deltaW_in,&
       &lavnlfft_in,vtrial_in )
    use defs_basis
    use defs_datatypes
    implicit none
    !Arguments ------------------------------------
    integer,intent(in) :: ngfft_in(18),nfftf_in
    type(MPI_type),intent(in) :: mpi_enreg_in
    real(dp),intent(in):: ucvol_in
    real(dp),dimension(:,:),intent(in)::deltaW_in(:,:)
    real(dp),dimension(:,:),intent(in)::lavnlfft_in(:,:)
    real(dp),dimension(:,:),intent(in)::vtrial_in(:,:)   
    !Local variables------------------------------- 
    !!allocation and array transfer
    allocate(deltaW(size(deltaW_in,1),size(deltaW_in,2)),&
         &lavnlfft(size(lavnlfft_in,1),size(lavnlfft_in,2)),&
         &vtrial(size(vtrial_in,1),size(vtrial_in,2)))
    deltaW=deltaW_in
    lavnlfft=lavnlfft_in
    vtrial=vtrial_in
    ngfft=ngfft_in
    nfftf=nfftf_in
    ucvol=ucvol_in
    mpi_enreg=mpi_enreg_in 
    !! set ok to 1 which allow using eneofrho_tfw
    ok = .true.
    !! alpha is a constant factor used many times in the tfw calculation of
energy
    alpha=(3._dp*pi*pi)**two_thirds
    !!total number of grid point (from energy.F90)
    nfftot=ngfft(1)*ngfft(2)*ngfft(3)
  end subroutine init_eneofrho_tfw
end module funcofrho_tfw
DEFS_BASIS.F90
module defs_basis
 implicit none
 integer, parameter :: i1b=selected_int_kind(2)
 integer, parameter :: i2b=selected_int_kind(4)
 integer, parameter :: i4b=selected_int_kind(9)
 integer, parameter :: dp=kind(1.0d0)
 integer, parameter :: dpc=kind((1.0d0,1.0d0))  
 integer, parameter :: lgt=kind(.true.)
 integer, parameter :: fnlen=132    ! maximum length of file name variables
 integer, parameter :: strlen=32000 ! maximum length of input string
 integer, parameter :: integer_not_used=0
 logical, parameter :: logical_not_used=.true.
 integer, parameter :: std_in=5,ab_in=5 
 integer, parameter :: std_out=6         
 integer, parameter :: ab_out=7
 integer, parameter :: tmp_unit=9,tmp_unit2=10
 real(dp), parameter :: zero=0._dp
 real(dp), parameter :: one=1._dp
 real(dp), parameter :: two=2._dp
 real(dp), parameter :: three=3._dp
 real(dp), parameter :: four=4._dp
 real(dp), parameter :: five=5._dp
 real(dp), parameter :: six=6._dp
 real(dp), parameter :: seven=7._dp
 real(dp), parameter :: eight=8._dp
 real(dp), parameter :: nine=9._dp
 real(dp), parameter :: ten=10._dp

!Fractionary real constants
 real(dp), parameter :: half=0.50_dp
 real(dp), parameter :: third=one/three
 real(dp), parameter :: quarter=0.25_dp
 real(dp), parameter :: fifth=0.20_dp
 real(dp), parameter :: sixth=one/six
 real(dp), parameter :: seventh=one/seven
 real(dp), parameter :: eighth=0.125_dp
 real(dp), parameter :: ninth=one/nine
 real(dp), parameter :: two_thirds=two*third
 real(dp), parameter :: four_thirds=four*third
 real(dp), parameter :: five_thirds=five*third
 real(dp), parameter :: three_quarters=0.75_dp
 real(dp), parameter :: three_fifth=three/five

!Real constants derived from pi
 real(dp), parameter :: gold=1.618033988749894848204586834365638117720309179_dp
 real(dp), parameter :: goldenratio=two-gold
 real(dp), parameter :: pi=3.141592653589793238462643383279502884197_dp
 real(dp), parameter :: two_pi=two*pi
 real(dp), parameter :: four_pi=four*pi
 real(dp), parameter :: piinv=one/pi
end module defs_basis
DEFS_DATATYPES.F90
module defs_datatypes

 use defs_basis
#if defined MPIO
               include 'mpif.h'
#endif


 implicit none
!----------------------------------------------------------------------

!!****t* defs_datatypes/MPI_type
!! NAME
!! MPI_type
!!
!! FUNCTION
!! The MPI_type structured datatype gather different information
!! about the MPI parallelisation : number of processors,
!! the index of my processor, the different groups of processors, etc ...
!!
!! SOURCE

#if defined HAVE_CONFIG_H
#include "config.h"
#endif

 type MPI_type
! Integer scalar
  integer :: paral_compil_kpt
  integer :: paral_compil_fft
  integer :: paral_compil_mpio
  integer :: paral_level
  integer :: paralbd
  integer :: me             
  integer :: nproc            ! number of processors
  integer :: me_group         ! number of my processor in my group of kpt
  integer :: nproc_group      ! number of processors in my group of kpt
  integer :: me_fft           ! number of my processor in my group of FFT
  integer :: nproc_fft        ! number of processors in my group of FFT
  integer :: master_fft     
  integer :: paral_fft        ! set to 1 if the FFT parallelisation is active
  integer :: me_g0          
  integer :: num_group_fft    
  integer :: num_group       
  integer :: nproc_per_kpt    ! number of processors per kpt
  integer :: world_group      
  integer :: fft_master_group
  integer :: fft_master_comm
  integer, pointer :: fft_group(:)
  integer, pointer :: fft_comm(:)
  integer, pointer :: proc_distrb(:,:,:)
  integer, pointer :: kpt_group(:)
  integer, pointer :: kpt_comm(:)
  integer, pointer :: kptdstrb(:,:,:)
  integer, pointer :: kptdstrbi(:,:,:)
  integer :: parareel
  integer :: npara     
  integer :: ipara       
  integer :: jpara  
  integer :: me_group_para    
  integer :: nproc_group_para   
  integer :: num_group_para     
  integer :: nproc_per_para     
  integer :: master_group_para    
  integer, pointer :: proc_distrb_para(:,:)
  integer, pointer :: kpt_group_para(:)
  integer, pointer :: kpt_comm_para(:)
 end type MPI_type
!--------------------------------------------

end module defs_datatypes


-- 
           Summary: internal compiler error in fold_convert, at fold-
                    const.c:2028
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anglade at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24673

Reply via email to