PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr34077.c
bloba2ec5d12b75d58c172ebbe9a5cca5857938e80b3
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -minline-all-stringops -minline-stringops-dynamically" } */
4 #include <string.h>
6 extern double ran(void);
8 struct spec_fd_t {
9 int limit;
10 int len;
11 int pos;
12 unsigned char *buf;
13 } spec_fd[3];
15 int spec_random_load (int fd) {
16 int i, j;
17 char random_text[(32)][(128*1024)];
19 for (j = 0; j < (128*1024); j++) {
20 random_text[i][j] = (int)(ran()*256);
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));
28 spec_fd[fd].len = 1024*1024;
29 return 0;