2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / structure_constructor_3.f03
blobaa5934951c482baba2380eb83ece865766908d8c
1 ! { dg-do compile }
2 ! Structure constructor with component naming, test that an error is emitted
3 ! if there are arguments without name after ones with name.
5 PROGRAM test
6   IMPLICIT NONE
8   ! Structure of basic data types
9   TYPE :: basics_t
10     INTEGER :: i
11     REAL :: r
12   END TYPE basics_t
14   TYPE(basics_t) :: basics
16   basics = basics_t (i=42, 1.5) ! { dg-error "without name after" }
18 END PROGRAM test