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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vector-compare-1.c] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
3
 
4
#define vector(elcount, type)  \
5
__attribute__((vector_size((elcount)*sizeof(type)))) type
6
 
7
void
8
foo (vector (4, int) x, vector (4, float) y)
9
{
10
  vector (4, int) p4;
11
  vector (4, int) r4;
12
  vector (4, unsigned int) q4;
13
  vector (8, int) r8;
14
  vector (4, float) f4;
15
 
16
  r4 = x > y;       /* { dg-error "comparing vectors with different element types" } */
17
  r8 = (x != p4);   /* { dg-error "incompatible types when assigning to type" } */
18
  r8 == r4;         /* { dg-error "comparing vectors with different number of elements" } */
19
}

powered by: WebSVN 2.1.0

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