11bea653e0d0f0182ed6e0deb5c18ad1123bb3bbdTim Northover// RUN: %clang_cc1 -verify -triple x86_64-unknown-unknown -emit-llvm-only %s
21bea653e0d0f0182ed6e0deb5c18ad1123bb3bbdTim Northovertypedef int vec256 __attribute__((ext_vector_type(8)));
31bea653e0d0f0182ed6e0deb5c18ad1123bb3bbdTim Northover
41bea653e0d0f0182ed6e0deb5c18ad1123bb3bbdTim Northovervec256 foo(vec256 in) {
51bea653e0d0f0182ed6e0deb5c18ad1123bb3bbdTim Northover  vec256 out;
61bea653e0d0f0182ed6e0deb5c18ad1123bb3bbdTim Northover
76bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines  asm("something %0" : : "y"(in)); // expected-error {{invalid type 'vec256' (vector of 8 'int' values) in asm input for constraint 'y'}}
86bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines  asm("something %0" : "=y"(out)); // expected-error {{invalid type 'vec256' (vector of 8 'int' values) in asm input for constraint 'y'}}
96bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines  asm("something %0, %0" : "+y"(out)); // expected-error {{invalid type 'vec256' (vector of 8 'int' values) in asm input for constraint 'y'}}
101bea653e0d0f0182ed6e0deb5c18ad1123bb3bbdTim Northover
111bea653e0d0f0182ed6e0deb5c18ad1123bb3bbdTim Northover  return out;
121bea653e0d0f0182ed6e0deb5c18ad1123bb3bbdTim Northover}
131bea653e0d0f0182ed6e0deb5c18ad1123bb3bbdTim Northover
14