Fix broken MinGW build of gcc.c
[official-gcc.git] / gcc / testsuite / gcc.dg / lto / 20090206-2_0.c
blobb82e4167a4492f683bb6892c57cfe6553e769246
1 /* { dg-lto-do link } */
2 /* { dg-skip-if "" { ! { i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } } */
3 /* { dg-require-effective-target fpic } */
4 /* { dg-lto-options {{-flto -flto-partition=1to1 -fPIC}} } */
5 /* { dg-suppress-ld-options {-fPIC} } */
7 void func(int n) {
8 static int __thread v = 0;
9 int i;
10 for (i = 0; i < n; ++i) {
11 volatile int *p = &v;
12 volatile int x __attribute__ ((unused)) = *p;
16 int main(int argc, char **argv) {
17 func(argc);
18 return 0;