URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [conversion/] [simd4.C] - Rev 301
Compare with Previous | Blame | View Log
// PR c++/29734
// { dg-do compile }
// { dg-options "" }
int t;
float u;
int __attribute__((vector_size (8))) v;
float __attribute__((vector_size (8))) w;
int b[10];
void
foo ()
{
b[t];
b[u]; // { dg-error "invalid types" }
b[v]; // { dg-error "invalid types" }
b[w]; // { dg-error "invalid types" }
t[b];
u[b]; // { dg-error "invalid types" }
v[b]; // { dg-error "invalid types" }
w[b]; // { dg-error "invalid types" }
new int[t];
new int[u]; // { dg-error "new-declarator must have integral" }
new int[v]; // { dg-error "new-declarator must have integral" }
new int[w]; // { dg-error "new-declarator must have integral" }
switch (t) { default: break; }
switch (u) { default: break; } // { dg-error "switch quantity not an integer" }
switch (v) { default: break; } // { dg-error "switch quantity not an integer" }
switch (w) { default: break; } // { dg-error "switch quantity not an integer" }
t = ~t;
u = ~u; // { dg-error "wrong type argument to bit-complement" }
v = ~v;
w = ~w; // { dg-error "wrong type argument to bit-complement" }
}