OSDN Git Service

* obj-c++.dg/comp-types-10.mm: XFAIL for ICE.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / alloc_comp_constraint_1.f90
1 ! { dg-do compile }
2 ! Check that we don't allow IO or NAMELISTs with types with allocatable
3 ! components (PR 20541)
4 program main
5
6     type :: foo
7         integer, allocatable :: x(:)
8     end type foo
9
10     type :: bar
11         type(foo) :: x
12     end type bar
13
14     type(foo) :: a
15     type(bar) :: b
16     namelist /blah/ a ! { dg-error "cannot have ALLOCATABLE components" }
17
18     write (*, *) a  ! { dg-error "cannot have ALLOCATABLE components" }
19
20     read (*, *) b  ! { dg-error "cannot have ALLOCATABLE components" }
21
22 end program main