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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 689 jeremybenn
/* PR middle-end/52419 */
2
/* { dg-do run } */
3
 
4
extern void abort (void);
5
 
6
typedef long long V
7
  __attribute__ ((vector_size (2 * sizeof (long long)), may_alias));
8
 
9
typedef struct S { V b; } P __attribute__((aligned (1)));
10
 
11
struct __attribute__((packed)) T { char c; P s; };
12
 
13
__attribute__((noinline, noclone)) void
14
foo (P *p)
15
{
16
  p->b[1] = 5;
17
}
18
 
19
int
20
main ()
21
{
22
  V a = { 3, 4 };
23
  struct T t;
24
 
25
  t.s.b = a;
26
  foo (&t.s);
27
 
28
  if (t.s.b[0] != 3 || t.s.b[1] != 5)
29
    abort ();
30
 
31
  return 0;
32
}

powered by: WebSVN 2.1.0

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