PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr38988.c
blob8449cc69cfdbf41c1a97489ec6883a7d97dc9001
1 /* { dg-do compile } */
2 /* { dg-require-effective-target lp64 } */
3 /* { dg-require-effective-target fpic } */
4 /* { dg-options "-O2 -fpic -mcmodel=large" } */
6 __extension__ typedef __SIZE_TYPE__ size_t;
7 typedef void (*func_ptr) (void);
9 static func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) };
11 void
12 __do_global_dtors_aux (void)
14 extern func_ptr __DTOR_END__[];
15 size_t dtor_idx = 0;
16 const size_t max_idx = __DTOR_END__ - __DTOR_LIST__ - 1;
17 func_ptr f;
19 while (dtor_idx < max_idx)
21 f = __DTOR_LIST__[++dtor_idx];
22 f ();