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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [pr21591.c] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
 
3
struct a
4
{
5
  int length;
6
  int a1[256];
7
};
8
 
9
struct a *malloc1(__SIZE_TYPE__) __attribute__((malloc));
10
void free(void*);
11
 
12
void f(void)
13
{
14
   struct a *a = malloc1(sizeof(struct a));
15
   struct a *b = malloc1(sizeof(struct a));
16
   struct a *c = malloc1(sizeof(struct a));
17
   int i;
18
 
19
   for (i = 0; i < 256; i++)
20
   {
21
      b->a1[i] = i;
22
      c->a1[i] = i;
23
   }
24
   for (i = 0; i < 256; i++)
25
   {
26
      a->a1[i] = b->a1[i] + c->a1[i];
27
   }
28
   free(a);
29
   free(b);
30
   free(c);
31
}
32
 
33
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
34
/* { dg-final { cleanup-tree-dump "vect" } } */
35
 

powered by: WebSVN 2.1.0

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