PR c/29467
[official-gcc.git] / gcc / testsuite / gfortran.dg / automatic_default_init_1.f90
blob178706a3422435337c26abee5850991db894cfee
1 ! { dg-do run }
2 ! { dg-options "-O" }
3 ! Test the fix for PR29394 in which automatic arrays did not
4 ! get default initialization.
5 ! Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7 MODULE M1
8 TYPE T1
9 INTEGER :: I=7
10 END TYPE T1
11 CONTAINS
12 SUBROUTINE S1(I)
13 INTEGER, INTENT(IN) :: I
14 TYPE(T1) :: D(1:I)
15 IF (any (D(:)%I.NE.7)) CALL ABORT()
16 END SUBROUTINE S1
17 END MODULE M1
18 USE M1
19 CALL S1(2)
20 END