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/] [pr43236.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
/* { dg-options "-ftree-loop-distribution" } */
2
extern void abort(void);
3
extern void *memset(void *s, int c, __SIZE_TYPE__ n);
4
extern int memcmp(const void *s1, const void *s2, __SIZE_TYPE__ n);
5
/*extern int printf(const char *format, ...);*/
6
 
7
int main()
8
{
9
  char A[30], B[30], C[30];
10
  int i;
11
 
12
  /* prepare arrays */
13
  memset(A, 1, 30);
14
  memset(B, 1, 30);
15
 
16
  for (i = 20; i-- > 10;) {
17
    A[i] = 0;
18
    B[i] = 0;
19
  }
20
 
21
  /* expected result */
22
  memset(C, 1, 30);
23
  memset(C + 10, 0, 10);
24
 
25
  /* show result */
26
/*  for (i = 0; i < 30; i++)
27
    printf("%d %d %d\n", A[i], B[i], C[i]); */
28
 
29
  /* compare results */
30
  if (memcmp(A, C, 30) || memcmp(B, C, 30)) abort();
31
  return 0;
32
}

powered by: WebSVN 2.1.0

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