aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/alloc_comp_initializer_2.f90
blob: 58a0e74633141cf65ebc670dfdc2f53824a111d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
! { 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