PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocate_with_typespec_7.f90
blobfeb6c8c16cf0aee4ee3f3f0dd19e019e82bfee75
1 ! { dg-do compile }
2 ! PR Fortran/83093
3 ! Contributed by Gerhard Steinmetz <gscfq at t-online dot de>
4 program p
5 integer, parameter :: n(2) = [1,2]
6 real :: x = 2
7 character(:), allocatable :: z, zz, zzz
8 character(:), allocatable :: y, yy
9 allocate (character(a) :: z) ! { dg-error "Scalar INTEGER expression" }
10 allocate (character(x) :: zz) ! { dg-error "Scalar INTEGER expression" }
11 allocate (character((1.0)) :: z) ! { dg-error "Scalar INTEGER expression" }
12 allocate (character(y) :: y) ! { dg-error "Scalar INTEGER expression" }
13 allocate (character(n(1:2)) :: y)! { dg-error "Scalar INTEGER expression" }
14 end