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

damian at rouson dot net gcc-bugzilla@gcc.gnu.org
Sun Nov 15 16:25:00 GMT 2009


Gfortran 4.5.0 20091106 (with Janus's patch for PR42048) produces the following
on the code below:

gfortran -c field_grid.f03 
field_grid.f03: In function ‘output’:
field_grid.f03:27:0: internal compiler error: in gfc_conv_variable, at
fortran/trans-expr.c:550
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


module grid_module
  implicit none 

  type grid
    real ,dimension(1) :: x=1.
  contains
    procedure :: return_x
  end type 

contains

  function return_x(this) result(this_x)
    class(grid) ,intent(in) :: this
    real  ,dimension(1) :: this_x
    this_x = this%x
  end function

end module 

module field_module
  use grid_module, only : grid 
  implicit none 

  type field
    type(grid) :: mesh
  contains
    procedure :: output
  end type 

contains

  subroutine output(this)
    class(field) ,intent(in) :: this
    real ,dimension(:) ,allocatable :: x
    x=this%mesh%return_x()
  end subroutine

end module


-- 
           Summary: ICE on allocatable array TBP result
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: damian at rouson dot net
 GCC build triplet: Mac OS X 10.5
  GCC host triplet: Mac OS X 10.5
GCC target triplet: Mac OS X 10.5


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



More information about the Gcc-bugs mailing list