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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [pr34077.c] - Blame information for rev 328

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

Line No. Rev Author Line
1 318 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O1 -minline-all-stringops -minline-stringops-dynamically" } */
3
 
4
#include <string.h>
5
 
6
extern double ran(void);
7
 
8
struct spec_fd_t {
9
  int limit;
10
  int len;
11
  int pos;
12
  unsigned char *buf;
13
} spec_fd[3];
14
 
15
int spec_random_load (int fd) {
16
  int i, j;
17
  char random_text[(32)][(128*1024)];
18
 
19
  for (j = 0; j < (128*1024); j++) {
20
    random_text[i][j] = (int)(ran()*256);
21
  }
22
 
23
  for (i = 0 ; i < spec_fd[fd].limit; i+= (128*1024)) {
24
    memcpy(spec_fd[fd].buf + i, random_text[(int)(ran()*(32))],
25
           (128*1024));
26
  }
27
 
28
  spec_fd[fd].len = 1024*1024;
29
  return 0;
30
}

powered by: WebSVN 2.1.0

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