OSDN Git Service

* doc/invoke.texi (-fwhopr): Merge into -flto section.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / lto / 20090206-2_0.c
1 /* { dg-lto-do link } */
2 /* { dg-skip-if "" { ! { i?86-*-linux* x86_64-*-linux* } } { "*" } { "" } } */
3 /* { dg-lto-options {{-flto -flto-partition=1to1 -fPIC}} } */
4 /* { dg-suppress-ld-options {-fPIC} } */
5
6 void func(int n) {
7   static int __thread v = 0;
8   int i;
9   for (i = 0; i < n; ++i) {
10     volatile int *p = &v;
11     volatile int x __attribute__ ((unused)) = *p;
12   }
13 }
14
15 int main(int argc, char **argv) {
16   func(argc);
17   return 0;
18 }