2 string-opt-18.c from the execute part of the gcc torture tests.
11 /* Copyright (C) 2003 Free Software Foundation.
13 Test equal pointer optimizations don't break anything.
15 Written by Roger Sayle, July 14, 2003. */
19 #ifndef __SDCC_pdk14 // Lack of memory
20 void test1 (void *ptr
)
22 if (memcpy(ptr
,ptr
,8) != ptr
)
27 // GNU-specific function
28 void test2 (char *ptr
)
30 if (mempcpy(ptr
,ptr
,8) != ptr
+8)
35 void test3 (void *ptr
)
37 if (memmove(ptr
,ptr
,8) != ptr
)
41 void test4 (char *ptr
)
43 if (strcpy(ptr
,ptr
) != ptr
)
47 void test5 (void *ptr
)
49 if (memcmp(ptr
,ptr
,8) != 0)
53 void test6 (const char *ptr
)
55 if (strcmp(ptr
,ptr
) != 0)
59 void test7 (const char *ptr
)
61 if (strncmp(ptr
,ptr
,8) != 0)
67 testTortureExecute (void)
69 #ifndef __SDCC_pdk14 // Lack of memory
77 #if !defined (__APPLE__)