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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr35472.c] - Blame information for rev 816

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

Line No. Rev Author Line
1 297 jeremybenn
extern void abort (void);
2
extern void *memset (void *s, int c, __SIZE_TYPE__ n);
3
struct S { int i[16]; };
4
struct S *p;
5
void __attribute__((noinline))
6
foo(struct S *a, struct S *b) { a->i[0] = -1; p = b; }
7
void test (void)
8
{
9
  struct S a, b;
10
  memset (&a.i[0], '\0', sizeof (a.i));
11
  memset (&b.i[0], '\0', sizeof (b.i));
12
  foo (&a, &b);
13
  *p = a;
14
  *p = b;
15
  if (b.i[0] != -1)
16
    abort ();
17
}
18
int main()
19
{
20
  test();
21
  return 0;
22
}

powered by: WebSVN 2.1.0

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