1 /* { dg-do compile } */
2 /* { dg-require-effective-target fpic } */
3 /* { dg-options "-fPIC" } */
4 
5 struct normal_encoding {};
6 struct unknown_encoding {};
7 static const struct normal_encoding latin1_encoding = {};
8 
9 struct encoding*
XmlInitUnknownEncoding(void * mem)10 XmlInitUnknownEncoding(void *mem)
11 {
12   int i;
13   struct unknown_encoding *e = mem;
14   for (i = 0; i < sizeof(struct normal_encoding); i++)
15     ((char *)mem)[i] = ((char *)&latin1_encoding)[i];
16   return 0;
17 }
18