This is the mail archive of the gcc-patches@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]

Re: [Patch, fortran] PR20541 - allocatable components (TR15541)


The eager amongst you will have noted an unrequited reference in the ChangeLog to
alloc_comp_constraint_3.f90.  Here it is:

! { dg-do compile }
! Check that default initializer for allocatable components isn't accepted (PR
! 20541)
program main

    type :: foo
        integer, allocatable :: a(:) = [ 1 ] ! { dg-error "Initialization of allocatable" }

        integer :: x ! Just to avoid "extra" error messages about empty type.
    end type foo

end program main


Apologies

Paul
 


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