annotate gcc/testsuite/gfortran.dg/reshape_source_size_1.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +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 patch for PR29758, which arose from PR29431. There was no check that there
kono
parents:
diff changeset
3 ! were enough elements in the source to match the shape.
kono
parents:
diff changeset
4 !
kono
parents:
diff changeset
5 ! Contributed by Paul Thomas <pault@gcc.gnu.org>
kono
parents:
diff changeset
6 !
kono
parents:
diff changeset
7 real :: a(2,2), b = 1.0, c(3), d(4)
kono
parents:
diff changeset
8 a = reshape ([b], [2,2]) ! { dg-error "not enough elements" }
kono
parents:
diff changeset
9 a = reshape (c, [2,2]) ! { dg-error "not enough elements" }
kono
parents:
diff changeset
10 a = reshape (d, [2,2])
kono
parents:
diff changeset
11 end