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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [movsi-sm-1.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2 -fgcse-sm -minline-all-stringops" } */
3
 
4
/* Store motion used to fail to recognize killed expressions within
5
   parallels such as those generated for memory copying.  */
6
 
7
static const char s[1024] __attribute__ ((__aligned__ (32)))
8
  = "This is what we should get!";
9
 
10
int bug (int arg) {
11
  char str[sizeof(s) > 4 ? sizeof(s) : 4] __attribute__ ((__aligned__ (32)));
12
 
13
  __builtin_memcpy (str, "Bug", 4);
14
 
15
  if (arg <= 2)
16
    __builtin_memcpy (str, s, sizeof (s));
17
 
18
  if (arg <= 1)
19
    __builtin_memcpy (str, "Err", 4);
20
 
21
  __builtin_puts (str);
22
 
23
  return str[0] != s[0];
24
}
25
 
26
int main () {
27
  if (bug (2))
28
    __builtin_abort ();
29
 
30
  return 0;
31
}

powered by: WebSVN 2.1.0

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