Fix existing tests for new #[repr(simd)].

This commit is contained in:
Huon Wilson 2015-08-12 16:09:02 -07:00
parent 8b68f58fef
commit 3e500673cc
21 changed files with 43 additions and 604 deletions

View file

@ -8,12 +8,12 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(simd, core_simd)]
#![allow(dead_code)]
#![feature(repr_simd, core_simd)]
#![allow(dead_code, deprecated)]
use std::simd::f32x4;
#[simd] #[derive(Copy, Clone)] #[repr(C)] struct LocalSimd(u8, u8);
#[repr(simd)] #[derive(Copy, Clone)] #[repr(C)] struct LocalSimd(u8, u8);
extern {
fn foo() -> f32x4; //~ ERROR use of SIMD type

View file

@ -1,14 +0,0 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[simd]
pub struct i64x2(i64, i64); //~ ERROR: SIMD types are experimental
fn main() {}

View file

@ -1,37 +0,0 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-tidy-linelength
#![feature(core)]
use std::simd::f32x4;
fn main() {
let _ = f32x4(0.0, 0.0, 0.0, 0.0) == f32x4(0.0, 0.0, 0.0, 0.0);
//~^ ERROR binary comparison operation `==` not supported for floating point SIMD vector `core::simd::f32x4`
let _ = f32x4(0.0, 0.0, 0.0, 0.0) != f32x4(0.0, 0.0, 0.0, 0.0);
//~^ ERROR binary comparison operation `!=` not supported for floating point SIMD vector `core::simd::f32x4`
let _ = f32x4(0.0, 0.0, 0.0, 0.0) < f32x4(0.0, 0.0, 0.0, 0.0);
//~^ ERROR binary comparison operation `<` not supported for floating point SIMD vector `core::simd::f32x4`
let _ = f32x4(0.0, 0.0, 0.0, 0.0) <= f32x4(0.0, 0.0, 0.0, 0.0);
//~^ ERROR binary comparison operation `<=` not supported for floating point SIMD vector `core::simd::f32x4`
let _ = f32x4(0.0, 0.0, 0.0, 0.0) >= f32x4(0.0, 0.0, 0.0, 0.0);
//~^ ERROR binary comparison operation `>=` not supported for floating point SIMD vector `core::simd::f32x4`
let _ = f32x4(0.0, 0.0, 0.0, 0.0) > f32x4(0.0, 0.0, 0.0, 0.0);
//~^ ERROR binary comparison operation `>` not supported for floating point SIMD vector `core::simd::f32x4`
}

View file

@ -8,18 +8,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(simd)]
#![feature(repr_simd)]
#[simd]
struct vec4<T>(T, T, T, T); //~ ERROR SIMD vector cannot be generic
#[simd]
#[repr(simd)]
struct empty; //~ ERROR SIMD vector cannot be empty
#[simd]
#[repr(simd)]
struct i64f64(i64, f64); //~ ERROR SIMD vector should be homogeneous
#[simd]
#[repr(simd)]
struct int4(isize, isize, isize, isize); //~ ERROR SIMD vector element type should be machine type
fn main() {}