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/69659] [6 Regression] ICE on using option -frepack-arrays, in gfc_conv_descriptor_data_get


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69659

--- Comment #3 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Responsible is the class declaration of "x" :

$ cat z1.f90
program p
  type t
    integer :: a
  end type
contains
  subroutine s (x)
    class(t), intent(inout) :: x(:)
    print *, x(1)%a
  end
end


$ gfortran-6 -frepack-arrays -c z1.f90
z1.f90:6:0:

   subroutine s (x)

internal compiler error: in gfc_conv_descriptor_data_get, at
fortran/trans-array.c:144

---


Replacing "class" with "type" :

$ cat z2.f90
program p
  type t
    integer :: a
  end type
contains
  subroutine s (x)
    type(t), intent(inout) :: x(:)
    print *, x(1)%a
  end
end


$ gfortran-6 -frepack-arrays -c z2.f90
# ok

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