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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr23818.c] - Blame information for rev 708

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

Line No. Rev Author Line
1 689 jeremybenn
/* PR tree-optimization/23818 */
2
/* { dg-do run } */
3
/* { dg-options "-O2 -fno-tree-dominator-opts" } */
4
 
5
#include <stdarg.h>
6
 
7
extern void abort (void);
8
 
9
void
10
foo (int p[100], int k, ...)
11
{
12
  int j, *q;
13
  va_list ap;
14
 
15
  va_start (ap, k);
16
  q = va_arg (ap, int *);
17
  for (j = 0; j < 100; j++)
18
    q[j] = p[j] + 10;
19
  va_end(ap);
20
}
21
 
22
int
23
main (void)
24
{
25
  int buf[100], buf2[100], i;
26
  for (i = 0; i < 100; i++)
27
    buf[i] = i + 1;
28
  foo (buf, 0, buf2);
29
  for (i = 0; i < 100; i++)
30
    if (buf2[i] != buf[i] + 10)
31
      abort ();
32
  return 0;
33
}

powered by: WebSVN 2.1.0

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