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



             Bug #: 55314

           Summary: [4.6/4.7/4.8 Regression] Rejects some valid ALLOCATE

                    statements

    Classification: Unclassified

           Product: gcc

           Version: unknown

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: fortran

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

        ReportedBy: tkoe...@gcc.gnu.org





Test case by Jacob Weisman Poulsen:



jwp@wrapcrap:~$ cat test.f90 

program main

  implicit none

  integer :: max_nb

  type comm_mask

    integer(4), pointer :: mask(:)

  end type comm_mask

  type (comm_mask), allocatable, save :: encode(:,:)

  max_nb=2

  allocate( encode(1:1,1:max_nb))

  allocate( encode(1,1)%mask(1),encode(1,2)%mask(1))

end program main



jwp@wrapcrap:~$ gfortran test.f90 

test.f90:10.12-32:



  allocate( encode(1,1)%mask(1),encode(1,2)%mask(1))

            1                   2

Error: Allocate-object at (1) also appears at (2)

Reply via email to