gcc/testsuite/gcc.target/i386/990213-2.c
raw| 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* |
| 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 | } |