annotate gcc/testsuite/gfortran.dg/array_simplify_1.f90 @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 ! Tests the fix for PR24168, in which line would return
kono
parents:
diff changeset
3 ! Error: Incompatible ranks 2 and 1 in assignment at (1)
kono
parents:
diff changeset
4 ! This came about because the simplification of the binary
kono
parents:
diff changeset
5 ! operation, in the first actual argument of spread, was not
kono
parents:
diff changeset
6 ! returning the rank of the result. Thus the error could
kono
parents:
diff changeset
7 ! be generated with any operator and other intrinsics than
kono
parents:
diff changeset
8 ! cshift.
kono
parents:
diff changeset
9 !
kono
parents:
diff changeset
10 ! Contributed by Steve Kargl <kargl@gcc.gnu.org>
kono
parents:
diff changeset
11 !
kono
parents:
diff changeset
12 integer, parameter :: nx=2, ny=2
kono
parents:
diff changeset
13 real, dimension(nx, ny) :: f
kono
parents:
diff changeset
14 f = spread(2 * cshift((/ 1, 2 /), nx/2), 2, ny)
kono
parents:
diff changeset
15 end
kono
parents:
diff changeset
16