Debian Codegraph @

gcc/testsuite/gcc.dg/lto/pr60449_1.c

raw
1 extern int printf (const char *__restrict __format, ...);
2 typedef long int __time_t;
3 typedef long int __suseconds_t;
4 struct timeval
5 {
6 __time_t tv_sec;
7 __suseconds_t tv_usec;
8 };
9 struct timezone
10 {
11 int tz_minuteswest;
12 int tz_dsttime;
13 };
14 typedef struct timezone *__restrict __timezone_ptr_t;
15 extern int gettimeofday (struct timeval *__restrict __tv,
16 __timezone_ptr_t __tz) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
17
18 typedef long int __jmp_buf[8];
19 typedef struct
20 {
21 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
22 } __sigset_t;
23 struct __jmp_buf_tag
24 {
25 __jmp_buf __jmpbuf;
26 int __mask_was_saved;
27 __sigset_t __saved_mask;
28 };
29 typedef struct __jmp_buf_tag jmp_buf[1];
30
31 extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__));
32 extern void longjmp (struct __jmp_buf_tag __env[1], int __val)
33 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
34
35 extern int bar (void);
36
37 int __attribute__ ((noinline, noclone))
38 get_input (void)
39 {
40 return 0;
41 }
42
43 static jmp_buf buf;
44
45 int foo (void)
46 {
47 if (get_input ())
48 longjmp(buf, 1);
49 return 0;
50 }
51
52 volatile int z;
53
54
55 int main (void)
56 {
57 struct timeval tv;
58 struct timezone tz;
59
60 bar();
61 if (setjmp (buf))
62 return 1;
63
64 if (!get_input ())
65 {
66 gettimeofday (&tv, &tz);
67 z = 0;
68 printf ("This is from main %i\n", tz.tz_dsttime);
69 }
70
71 foo ();
72 bar ();
73 bar ();
74
75 return 0;
76 }