------- Additional Comments From arnold dot moene at wur dot nl 2005-04-07 22:44 ------- The following (4 files :( ) example from the WRF weather model seems to be related. I can't see if it is really triggered by the same bug:
prompt> cat ESMF_TimeInterval.f module ESMF_TimeIntervalMod implicit none private type ESMF_TimeInterval sequence ! match C++ storage order integer :: YR ! calendar interval number of days end type public ESMF_TimeInterval end module ESMF_TimeIntervalMod prompt> cat ESMF_Time.f module ESMF_TimeMod use ESMF_TimeIntervalMod implicit none private type ESMF_Time sequence integer :: DD end type public ESMF_Time public operator(+) private ESMF_TimeInc interface operator(+) module procedure ESMF_TimeInc end interface contains function ESMF_TimeInc(time, timeinterval) type(ESMF_Time) :: ESMF_TimeInc type(ESMF_Time), intent(in) :: time type(ESMF_TimeInterval), intent(in) :: timeinterval ! Do nothing end function ESMF_TimeInc end module ESMF_TimeMod prompt> cat ESMF_Alarm.f module ESMF_AlarmMod use ESMF_TimeIntervalMod, only : ESMF_TimeInterval use ESMF_TimeMod, only : ESMF_Time implicit none type ESMF_Alarm sequence type(ESMF_TimeInterval) :: RingInterval type(ESMF_Time) :: PrevRingTime end type ESMF_Alarm public ESMF_Alarm end module ESMF_AlarmMod prompt> cat ESMF_Clock.f module ESMF_ClockMod use ESMF_AlarmMod contains subroutine ESMF_ClockAdvance() use ESMF_TimeMod type(ESMF_Alarm) :: alarm alarm%PrevRingTime = alarm%PrevRingTime + alarm%RingInterval end subroutine ESMF_ClockAdvance end module ESMF_ClockMod Attempt to compile gives: prompt> gfortran -c ESMF_TimeInterval.f ESMF_Time.f ESMF_Alarm.f ESMF_Clock.f Warning: ESMF_TimeInterval.f:6: Line is being truncated ESMF_Time.f: In function 'esmf_timeinc': ESMF_Time.f:12: warning: unused variable 'timeinterval' ESMF_Time.f:12: warning: unused variable 'time' ESMF_Time.f:12: warning: Function return value not set ESMF_Time.f:12: warning: control reaches end of non-void function ESMF_Clock.f: In function 'esmf_clockadvance': ESMF_Clock.f:7: internal compiler error: in fold_convert, at fold-const.c:2002 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. gfortran is recently downloaded prebuilt version: prompt> gfortran -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc/configure --enable-languages=c,f95 --prefix=/home/work/gfortran/build/irun Thread model: posix gcc version 4.1.0 20050314 (experimental) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19362