Debian Codegraph @

gcc/testsuite/gcc.dg/torture/pr115641.c

raw
1 /* { dg-do run } */
2
3 typedef struct {
4 char hours, day, month;
5 short year;
6 } T;
7
8 T g (void)
9 {
10 T now;
11 now.hours = 1;
12 now.day = 2;
13 now.month = 3;
14 now.year = 4;
15 return now;
16 }
17
18 __attribute__((const)) T f (void)
19 {
20 T virk = g ();
21 return virk;
22 }
23
24 int main ()
25 {
26 if (f ().hours != 1 || f ().day != 2 || f ().month != 3 || f ().year != 4)
27 __builtin_abort ();
28 return 0;
29 }