summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/vector-cast.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/vector-cast.c')
-rw-r--r--clang/test/Sema/vector-cast.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/test/Sema/vector-cast.c b/clang/test/Sema/vector-cast.c
index c0382892b69..ea4acfac6a0 100644
--- a/clang/test/Sema/vector-cast.c
+++ b/clang/test/Sema/vector-cast.c
@@ -53,14 +53,13 @@ void f4() {
float2 f2;
double d, a, b, c;
float64x2_t v = {0.0, 1.0};
- f2 += d;
+ // FIXME: These diagnostics are inaccurate: should complain that 'double' to vector 'float2' involves truncation
+ f2 += d; // expected-error {{cannot convert between vector values of different size ('float2' (vector of 2 'float' values) and 'double')}}
+ d += f2; // expected-error {{cannot convert between vector values of different size}}
a = 3.0 + vget_low_f64(v);
b = vget_low_f64(v) + 3.0;
c = vget_low_f64(v);
- // LAX conversions within compound assignments are not supported.
- // FIXME: This diagnostic is inaccurate.
- d += f2; // expected-error {{cannot convert between vector values of different size}}
- c -= vget_low_f64(v); // expected-error {{cannot convert between vector values of different size}}
+ c -= vget_low_f64(v);
// LAX conversions between scalar and vector types require same size and one element sized vectors.
d = f2; // expected-error {{assigning to 'double' from incompatible type 'float2'}}
d = d + f2; // expected-error {{assigning to 'double' from incompatible type 'float2'}}
OpenPOWER on IntegriCloud