This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/42051] ICE on allocatable array TBP result



------- Comment #1 from janus at gcc dot gnu dot org  2009-11-15 18:30 -------
(In reply to comment #0)
> field_grid.f03:27:0: internal compiler error: in gfc_conv_variable, at
> fortran/trans-expr.c:550

Here is a reduced test case which gives the same ICE:


  type grid
  end type 

contains

  function return_x(this) result(this_x)
    class(grid) :: this
    real  ,dimension(1) :: this_x
  end function

  subroutine output()
    type(grid) :: mesh
    real ,dimension(1) :: x
    x = return_x(mesh)
  end subroutine

end


So it seems this is neither connected to TBPs, nor to ALLOCATABLE.

The ICE goes away however, if I remove the DIMENSION attributes, or if I make
the CLASS argument a TYPE.


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]