[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gfortran.dg / reshape_source_size_1.f90
blob8290f61357735e42cb5fe59e7d64577d8c333be3
1 ! { dg-do compile }
2 ! Tests patch for PR29758, which arose from PR29431. There was no check that there
3 ! were enough elements in the source to match the shape.
5 ! Contributed by Paul Thomas <pault@gcc.gnu.org>
7 real :: a(2,2), b = 1.0, c(3), d(4)
8 a = reshape ([b], [2,2]) ! { dg-error "not enough elements" }
9 a = reshape (c, [2,2]) ! { dg-error "not enough elements" }
10 a = reshape (d, [2,2])
11 end