aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg/pr106139c.d
blob: 3b6b7a83341045fd13271701f92aae68c168895f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106139
// { dg-do compile }

alias V = int[4];
alias A = float[4];

static if (__traits(compiles, __vector(V))):

A vector2array(__vector(V) v)
{
    return cast(A)v;
}

void vector2array(ref A a, __vector(V) v)
{
    a = cast(A)v;
}

__vector(V) array2vector(A a)
{
    return cast(__vector(V)) a;
}

void array2vector(ref __vector(V) v, A a)
{
    v = cast(__vector(V))a;
}