Debian Codegraph @

gcc/testsuite/gfortran.dg/alloc_comp_constraint_7.f90

raw
1 ! { dg-do compile }
2 ! { dg-options -std=f95 }
3 ! Check that we don't allow types with allocatable
4 program main
5
6 type :: foo
7 integer :: k
8 integer, allocatable :: x(:) ! { dg-error "Fortran 2003: ALLOCATABLE" }
9 end type foo
10
11 type :: bar
12 type(foo) :: x
13 end type bar
14
15 type(foo) :: a
16 type(bar) :: b
17 namelist /blah/ a
18
19 end program main