Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/961223-1.c

raw
1 /* { dg-options "-fgnu89-inline" } */
2
3 extern void exit (int);
4 extern void abort (void);
5
6 struct s {
7 double d;
8 };
9
10 inline struct s
11 sub (struct s s)
12 {
13 s.d += 1.0;
14 return s;
15 }
16
17 int
18 main ()
19 {
20 struct s t = { 2.0 };
21 t = sub (t);
22 if (t.d != 3.0)
23 abort ();
24 exit (0);
25 }