Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.target / i386 / movsi-sm-1.c
blob35941405d9105c68facf94f908d7f4be18b88117
1 /* { dg-do run } */
2 /* { dg-options "-O2 -fgcse-sm -minline-all-stringops" } */
4 /* Store motion used to fail to recognize killed expressions within
5 parallels such as those generated for memory copying. */
7 static const char s[1024] __attribute__ ((__aligned__ (32)))
8 = "This is what we should get!";
10 int bug (int arg) {
11 char str[sizeof(s) > 4 ? sizeof(s) : 4] __attribute__ ((__aligned__ (32)));
13 __builtin_memcpy (str, "Bug", 4);
15 if (arg <= 2)
16 __builtin_memcpy (str, s, sizeof (s));
18 if (arg <= 1)
19 __builtin_memcpy (str, "Err", 4);
21 __builtin_puts (str);
23 return str[0] != s[0];
26 int main () {
27 if (bug (2))
28 __builtin_abort ();
30 return 0;