annotate gcc/testsuite/gfortran.dg/default_initialization_1.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 !
kono
parents:
diff changeset
2 ! { dg-do compile }
kono
parents:
diff changeset
3 ! { dg-options "-std=f2003" }
kono
parents:
diff changeset
4 ! PR 20845; for F2008: PR fortran/43185
kono
parents:
diff changeset
5 !
kono
parents:
diff changeset
6 ! In ISO/IEC 1539-1:1997(E), 4th constraint in section 11.3:
kono
parents:
diff changeset
7 !
kono
parents:
diff changeset
8 ! If an object of a type for which component-initialization is specified
kono
parents:
diff changeset
9 ! (R429) appears in the specification-part of a module and does not have
kono
parents:
diff changeset
10 ! the ALLOCATABLE or POINTER attribute, the object shall have the SAVE
kono
parents:
diff changeset
11 ! attribute.
kono
parents:
diff changeset
12 !
kono
parents:
diff changeset
13 module bad
kono
parents:
diff changeset
14 implicit none
kono
parents:
diff changeset
15 type default_initialization
kono
parents:
diff changeset
16 integer :: x = 42
kono
parents:
diff changeset
17 end type default_initialization
kono
parents:
diff changeset
18 type (default_initialization) t ! { dg-error "default initialization" }
kono
parents:
diff changeset
19 end module bad