Merge aosp-toolchain/gcc/gcc-4_9 changes.
[official-gcc.git] / gcc-4_9 / gcc / testsuite / gfortran.dg / blockdata_1.f90
blob74910c4d49ff74b2b2f623276a360c357d0df229
1 ! { dg-do run }
2 ! tests basic block data functionality
3 ! we didn't allow multiple block data program units
4 block data
5 common /a/ y(3)
6 data y /3*1./
7 end
9 blockdata d1
10 common /a/ w(3)
11 common /b/ u
12 data u /1./
13 end blockdata d1
15 block data d2
16 common /b/ u
17 common j ! { dg-warning "blank COMMON but initialization is only allowed in named common" }
18 data j /1/
19 end block data d2
21 ! begin testing code
22 common /a/ x(3)
23 common /b/ y
24 common i
26 if (any(x /= 1.)) call abort ()
27 if (y /= 1. .or. i /= 1) call abort ()
28 end