111
|
1 ! { dg-do compile }
|
|
2 subroutine f(n, x, y)
|
|
3
|
|
4 implicit none
|
|
5
|
|
6 integer, parameter :: knd = kind(1.e0)
|
|
7
|
|
8 integer, intent(in) :: n
|
|
9 complex(knd), intent(in) :: x(1:n)
|
|
10
|
|
11 integer i
|
|
12 real(knd) y(2*n)
|
|
13
|
|
14 y = [real(x), aimag(x)]
|
|
15 y = [real(x(1:n)), aimag(x(1:n))]
|
|
16 y = [real(knd) :: 1]
|
|
17 y = [real(kind=42) :: 1] { dg-error "Invalid type-spec" }
|
|
18 y = [real(kind=knd) :: 1]
|
|
19 y = [real(kind=knd, a=1.)]
|
|
20 y = [real(a=1.)]
|
|
21 y = [real(a=1, kind=knd)]
|
|
22
|
|
23 end subroutine f
|