------- Comment #31 from dominiq at lps dot ens dot fr  2009-06-02 09:29 -------
With the patch in comment #28, I have a dozen new ICEs in my test suite.  They
seems to be in two classes:

[ibook-dhum] f90/bug% cat pr33295.f90
module A
  type A_type
    real comp
  end type
end module A
module B
contains
  function initA()
    use A
    implicit none
    type(A_type):: initA
    initA%comp=1.0
  end function
end module B
program C
  use B
  use A
  implicit none
  type(A_type):: A_var
  A_var = initA()
end program C
[ibook-dhum] f90/bug% gfc pr33295.f90
pr33295.f90: In function 'c':
pr33295.f90:24: internal compiler error: in fold_convert, at fold-const.c:2687

and

[ibook-dhum] f90/bug% cat test_point.f90
module global
 type                                ::  mytype
    type(mytype),pointer   ::  this
 end type mytype
 type(mytype),target        :: base
end module global
program test_equi
 use global
 call check()
 print *, "base%this%this=>base?"  ,  associated(base%this%this,base)
 print *, "base%this%this=>?" ,          associated(base%this%this)
 print *, "base%this=>?" ,                   associated(base%this)
contains
 subroutine check()
 type(mytype),target        :: j
 base%this => j                      !have the variables point
 j%this => base                      !to one another
 end subroutine check             !take j out of scope
end program test_equi
[ibook-dhum] f90/bug% gfc test_point.f90
gfc: Internal error: Segmentation fault (program f951)

Concerning gfortran.dg/default_initialization_3.f90, I cannot say if the
problem is with the front-end or the middle-end, but it is certainly tricky to
do the correct inlining. I think the problem should go to another pr.


-- 


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

Reply via email to