1 // Test file for restrict (needs to be compiled by a GCC that actually emits 2 // DW_TAG_restrict_type. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59051 3 // 4 // gcc -gdwarf-3 -std=c99 -shared -nostartfiles -o test4.so test4.c 5 6 char * cpy(char * restrict s1,const char * restrict s2,unsigned int n)7cpy (char * restrict s1, const char * restrict s2, unsigned int n) 8 { 9 char *t1 = s1; 10 const char *t2 = s2; 11 while(n-- > 0) 12 *t1++ = *t2++; 13 return s1; 14 } 15