This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
ICE with user type initialisation
- From: Martin Tee <aovb94 at dsl dot pipex dot com>
- To: "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>
- Date: Tue, 22 Aug 2006 19:31:08 +0100
- Subject: ICE with user type initialisation
Hi,
This code ICEs as given, but using the alternatives in comments works.
I'm no expert so this could be my mis-interpretation of how INTENT is
supposed to work, but I thought INTENT(OUT) would apply any default
initialisation to the dummy argument. I'm also fairly convinced that
this code worked between last Thursday and about the following Sunday.
---------------------------------------------------------
MODULE bar
!
TYPE x
INTEGER :: y = 0 ! fails
! INTEGER :: y ! works
END TYPE x
!
END MODULE bar
!
MODULE ice_mod
CONTAINS
!
SUBROUTINE ice (z)
USE bar
!
TYPE (x) :: z(:)
!
CALL foo (z(1))
RETURN
!
END SUBROUTINE ice
!
SUBROUTINE foo (z)
USE bar
!
TYPE (x), INTENT(OUT) :: z ! fails
! TYPE (x), INTENT(INOUT) :: z ! works
! TYPE (x) :: z ! works
!
z % y = 1
RETURN
END SUBROUTINE foo
!
END MODULE ice_mod
-------------------------------------------------------------
ice.f95: In function 'ice':
ice.f95:31: 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.
GNU Fortran 95 (GCC) 4.2.0 20060820 (experimental)
Copyright (C) 2006 Free Software Foundation, Inc.
Linux 2.6.17-1.2157_FC5 x86_64
--------------------------------------------------------------
I couldn't find any existing PR, shall I submit one?
Cheers,
Martin