Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr35258.c
blobef1260d00c4e50644b6efaf2b0c9ab1d17764032
1 /* { dg-do run } */
2 /* { dg-options "-O1" } */
4 extern void *memcpy (void *, const void *, __SIZE_TYPE__);
5 extern int memcmp (const void *, const void *, __SIZE_TYPE__);
6 extern void abort(void);
8 char str[9] = "1234";
10 void
11 bar (void)
13 #if __SIZEOF_INT__ >= 4
14 unsigned int temp;
15 #else
16 __UINT32_TYPE__ temp;
17 #endif
18 char *p = &str[2];
20 memcpy (&temp, &str[1], 4);
21 memcpy (p, &temp, 4);
22 str[1] = '.';
25 int main()
27 bar();
28 if (memcmp (str, "1.234", 5) != 0)
29 abort ();
31 return 0;