1 /* { dg-lto-do link } */
2 /* { dg-require-effective-target gettimeofday } */
3 
4 extern int printf (const char *__restrict __format, ...);
5 typedef long int __time_t;
6 typedef long int __suseconds_t;
7 
8 struct timeval
9   {
10     __time_t tv_sec;
11     __suseconds_t tv_usec;
12   };
13 
14 struct timezone
15   {
16     int tz_minuteswest;
17     int tz_dsttime;
18   };
19 typedef struct timezone *__restrict __timezone_ptr_t;
20 
21 extern int gettimeofday (struct timeval *__restrict __tv, __timezone_ptr_t __tz);
22 
bar(void)23 int bar (void)
24 {
25   struct timeval tv;
26   struct timezone tz;
27 
28   gettimeofday (&tv, &tz);
29   printf ("This is from bar %i\n", tz.tz_dsttime);
30   return 5;
31 }
32