131
|
1 ! { dg-do compile }
|
|
2 ! { dg-options "-fdec-structure" }
|
|
3 ! Tests the VAX STRUCTURE and RECORD statements.
|
|
4 ! These are syntactic sugar for TYPE statements.
|
|
5
|
|
6 program vax_structure_1
|
|
7 structure /stocklevel/
|
|
8 integer*2 A
|
|
9 integer*4 B
|
|
10 integer*4 CS(0:15)
|
|
11 byte D(0:15)
|
|
12 end structure
|
|
13
|
|
14 record /stocklevel/ rec1, recs(100)
|
|
15 integer x
|
|
16 integer*2 y
|
|
17
|
|
18 rec1.A = 100
|
|
19 recs(100).CS(10)=1
|
|
20 x = 150
|
|
21 y = 150
|
|
22
|
|
23 print *, rec1.B.eq.100
|
|
24 print *, rec1.A.eq.x ! {dg-error "are INTEGER(2)/INTEGER(4)"}
|
|
25 print *, rec1.A.eq.y
|
|
26 print *, recs(100).CS(10)
|
|
27 end program
|