* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocate_alloc_opt_4.f90
blobee6c3635912dbe8d2805cf2779f1c6f0ca98c3f0
1 ! { dg-do compile }
2 ! { dg-options "-std=f2003" }
3 program a
5 implicit none
7 integer n, m(3,3)
8 integer(kind=8) k
9 integer, allocatable :: i(:), j(:)
10 real, allocatable :: x(:)
12 n = 42
13 m = n
14 k = 1_8
16 allocate(i(4), source=42, source=n) ! { dg-error "Redundant SOURCE tag found" }
18 allocate(integer(4) :: i(4), source=n) ! { dg-error "conflicts with the typespec" }
20 allocate(i(4), j(n), source=n) ! { dg-error "Fortran 2008: SOURCE tag at .1. with more than a single allocate object" }
22 allocate(x(4), source=n) ! { dg-error "type incompatible with" }
24 allocate(i(4), source=m) ! { dg-error "must be scalar or have the same rank" }
26 allocate(i(4), source=k) ! { dg-error "shall have the same kind type" }
28 end program a