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



             Bug #: 57095

           Summary: [Fortran-Dev] FAIL:

                    gfortran.dg/alloc_comp_assign_[234].f90  -O*

                    execution test

    Classification: Unclassified

           Product: gcc

           Version: fortran-dev

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: fortran

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: domi...@lps.ens.fr

                CC: bur...@gcc.gnu.org

            Blocks: 56818





When compiled with the fortran-dev branch, the tests

gfortran.dg/alloc_comp_assign_[234].f90, pr43808.f90, and

realloc_on_assign_17.f90 fail at run time. Reduced tests:



  type :: a

    integer, allocatable :: i(:)

  end type a



  type :: b

    type (a), allocatable :: at(:)

  end type b



  type(a) :: x(2)

  type(b) :: y(2), z(2)

  integer i, m(4)



  x = (/a ((/1,2,3,4/)),a ((/5,6,7,8/))/)

  print *, x(1)%i, x(2)%i

  print *, "after x"

  y(1) = b ((/x(i)/))

  print *, "after 2"



end



fails at y(1) = b ((/x(i)/)), and



program allocate_assign

   implicit none

   type label

      integer, allocatable :: parts(:)

   end type label

   type table

      type(label), allocatable :: headers(:)

   end type table

   type(table) x1(2)

   integer i, j!, k

       x1 = [table([(label([(j,j=1,3)]),i=1,3)]), &

             table([(label([(j,j=1,4)]),i=1,4)])]

end program allocate_assign



fails at x1=... .

Reply via email to