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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr52402.c] - Blame information for rev 695

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-w -Wno-psabi" } */
3
 
4
typedef int v4si __attribute__((vector_size(16)));
5
struct T { v4si i[2]; int j; } __attribute__((packed));
6
 
7
static v4si __attribute__((noinline))
8
foo (struct T t)
9
{
10
  return t.i[0];
11
}
12
 
13
static struct T *__attribute__((noinline))
14
init ()
15
{
16
  char *p = __builtin_malloc (sizeof (struct T) + 1);
17
  p++;
18
  __builtin_memset (p, 1, sizeof (struct T));
19
  return (struct T *)p;
20
}
21
 
22
int main()
23
{
24
  struct T *p;
25
  p = init ();
26
  if (foo (*p)[0] != 0x01010101)
27
    __builtin_abort ();
28
  return 0;
29
}

powered by: WebSVN 2.1.0

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