OSDN Git Service

2006-02-03 Steven G. Kargl <kargls@comcast.net>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / default_initialization.f90
1 !
2 ! { dg-do compile }
3 ! PR 20845
4 !
5 ! In ISO/IEC 1539-1:1997(E), 4th constraint in section 11.3:
6 !
7 !   If an object of a type for which component-initialization is specified
8 !   (R429) appears in the specification-part of a module and does not have
9 !   the ALLOCATABLE or POINTER attribute, the object shall have the SAVE
10 !   attribute.
11 !
12 module bad
13    implicit none
14    type default_initialization
15       integer :: x = 42
16    end type default_initialization
17    type (default_initialization) t ! { dg-error "default initialization" }
18 end module bad