OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [simd-1b.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-Wall" } */
3
 
4
/* Origin: Aldy Hernandez <aldyh@redhat.com>.  */
5
/* Purpose: Program to test generic SIMD support.  */
6
 
7
typedef int __attribute__((vector_size (16))) v4si;
8
typedef int __attribute__((vector_size (8))) v2si;
9
 
10
v4si a, b;
11
v2si c, d;
12
 
13
void
14
hanneke ()
15
{
16
  /* Operators on compatible SIMD types.  */
17
  a %= b; /* { dg-error "invalid operands to binary %" } */
18
  c &= d;
19
  a |= b;
20
  c ^= d;
21
  a >>= b; /* { dg-error "invalid operands to binary >>" } */
22
  c <<= d; /* { dg-error "invalid operands to binary <<" } */
23
  a = +b;
24
  c = ~d;
25
 
26
  /* Operators on incompatible SIMD types.  */
27
  a = b % c; /* { dg-error "invalid operands to binary" } */
28
  a = b % c; /* { dg-error "invalid operands to binary" } */
29
  d = c & b; /* { dg-error "invalid operands to binary" } */
30
  a = b | c; /* { dg-error "invalid operands to binary" } */
31
  d = c ^ b; /* { dg-error "invalid operands to binary" } */
32
  a = b >> c; /*  { dg-error "invalid operands to binary" } */
33
  a = b >> c; /* { dg-error "invalid operands to binary" } */
34
  d = c << b; /* { dg-error "invalid operands to binary" } */
35
  d = c << b; /* { dg-error "invalid operands to binary" } */
36
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.