annotate gcc/testsuite/gfortran.dg/zero_array_components_1.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900 (2017-10-27)
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do run }
kono
parents:
diff changeset
2 ! Tests the fix for PR31620, in which zeroing the component a for the array,
kono
parents:
diff changeset
3 ! would zero all the components of the array.
kono
parents:
diff changeset
4 !
kono
parents:
diff changeset
5 ! David Ham <David@ham.dropbear.id.au>
kono
parents:
diff changeset
6 !
kono
parents:
diff changeset
7 program test_assign
kono
parents:
diff changeset
8 type my_type
kono
parents:
diff changeset
9 integer :: a
kono
parents:
diff changeset
10 integer :: b
kono
parents:
diff changeset
11 end type my_type
kono
parents:
diff changeset
12 type(my_type), dimension(1) :: mine ! note that MINE is an array
kono
parents:
diff changeset
13 mine%b=4
kono
parents:
diff changeset
14 mine%a=1
kono
parents:
diff changeset
15 mine%a=0
kono
parents:
diff changeset
16 if (any (mine%b .ne. 4)) call abort ()
kono
parents:
diff changeset
17 end program test_assign