This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: RFC: Revamp fortran array types


Michael,

I have applied your patch on top of 150825 and I have 27 more ICEs in
my test suite.  For instance the following test:

Program test_constructor

    implicit none

    type :: thytype
        integer(4) :: a(2,2)
    end type thytype

    type :: mytype
        integer(4), allocatable :: a(:, :)
        type(thytype), allocatable :: q(:)
    end type mytype

    type (mytype) :: x
!    integer(8), allocatable :: yy(:,:)
    integer(4), allocatable :: yy(:,:)
    type (thytype), allocatable :: bar(:)
    integer(4) :: from(2), to(2)

    ! Check that unallocated allocatables work
    x = mytype(yy, bar)
    if (allocated(x%a) .or. allocated(x%q)) call abort()
    allocate(yy(3:5,-3:-1),bar(0:4))
    yy = 1023
    bar= thytype(reshape((/1,1,1,1/),(/2,2/)))
    x = mytype(yy, bar)
    if (.not. allocated(x%a) .or. .not. allocated(x%q)) call abort()
    print *, lbound(x%a), ubound(x%a)
    print *, kind(x%a(4,-2))
    from = lbound(yy)
    to = ubound(yy)
    x = mytype(yy(from(1):to(1),from(2):to(2)), bar)
    if (.not. allocated(x%a) .or. .not. allocated(x%q)) call abort()
    print *, lbound(x%a), ubound(x%a)
    deallocate(yy,bar)

end program test_constructor

gives an ICE:

ibook-dhum] f90/bug% gfc pr34143_db.f90
pr34143_db.f90: In function 'test_constructor':
pr34143_db.f90:1:0: error: non-trivial conversion at assignment
struct array2_integer(kind=4)
struct array2_integer(kind=4)
mytype.15.a = parm.16;

pr34143_db.f90:1:0: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

and looks representative of the other ones.

TIA

Dominique


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