OSDN Git Service

2011-09-26 Janus Weil <janus@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / structure_constructor_3.f03
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.
4
5 PROGRAM test
6   IMPLICIT NONE
7
8   ! Structure of basic data types
9   TYPE :: basics_t
10     INTEGER :: i
11     REAL :: r
12   END TYPE basics_t
13
14   TYPE(basics_t) :: basics
15
16   basics = basics_t (i=42, 1.5) ! { dg-error "without name after" }
17
18 END PROGRAM test