2017-12-15 Markus Trippelsdorf <markus@trippelsdorf.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocate_with_source_4.f90
blobdcd42a7981a152bf03e0ba42820aab89066487a7
1 ! { dg-do compile }
3 ! PR 58916: [F03] Allocation of scalar with array source not rejected
5 ! Contributed by Vladimir Fuka <vladimir.fuka@gmail.com>
7 class(*), allocatable :: a1
8 real, allocatable :: a2
9 real b(1)
10 allocate(a1, source=b) ! { dg-error "must be scalar or have the same rank" }
11 allocate(a2, source=b) ! { dg-error "must be scalar or have the same rank" }
12 end