This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/28908] [4.1/4.2 Regression]: fold_convert fails for Fortran operator
- From: "hjl at lucon dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2006 18:08:00 -0000
- Subject: [Bug fortran/28908] [4.1/4.2 Regression]: fold_convert fails for Fortran operator
- References: <bug-28908-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #14 from hjl at lucon dot org 2006-08-31 18:08 -------
I don't think it is specific to operator. I got the same failure with function:
[hjl@gnu-16 wrf-1]$ cat yyy.f90
! { dg-do compile }
! Tests the fix for a further regression caused by the
! fix for PR28788 and posted as PR28908. The problem was
! caused by the patch preventing interface derived types
! from associating with identical derived types in the
! containing namespaces.
!
! Contributed by HJ Lu <hjl@lucon.org>
!
module bar
implicit none
public
type ESMF_Time
integer :: DD
end type
end module bar
module foo
use bar
implicit none
private
type ESMF_Clock
type(ESMF_Time) :: CurrTime
end type
interface
function add (x, y)
use bar
type(ESMF_Time) :: add
type(ESMF_Time), intent(in) :: x
type(ESMF_Time), intent(in) :: y
end function add
end interface
contains
subroutine ESMF_ClockAdvance(clock)
type(ESMF_Clock), intent(inout) :: clock
clock%CurrTime = add (clock%CurrTime, clock%CurrTime)
end subroutine ESMF_ClockAdvance
end module foo
! { dg-final { cleanup-modules "foo bar" } }
[hjl@gnu-16 wrf-1]$ make yyy.s
/export/build/gnu/gcc/build-x86_64-linux/gcc/gfortran
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -S -o yyy.s yyy.f90
yyy.f90: In function ?esmf_clockadvance?:
yyy.f90:34: internal compiler error: in fold_convert, at fold-const.c:2098
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make: *** [yyy.s] Error 1
[hjl@gnu-16 wrf-1]$
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28908