Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.dg / opt / inline9.C
blob10bc54ccd95ded0650ed5a67a20d5ce225624b5b
1 // PR c++/17972
2 // Origin: Michal Ostrowski <mostrows@watson.ibm.com>
3 // Testcase by Alan Modra <amodra@bigpond.net.au>
4 // { dg-do run }
5 // { dg-options "-O" }
6 // { dg-options "-O -mtune=i686" { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
8 struct thread_info
10   short preempt_count;
11 } x;
13 static inline struct thread_info *cti (void) __attribute__ ((const));
14 static inline struct thread_info *cti (void)
16   return &x;
19 void fn (void) __attribute__ ((noinline));
20 void fn (void)
22   ++cti()->preempt_count;
25 int main (void)
27   fn ();
28   return 0;