annotate gcc/testsuite/gcc.dg/guality/inline-params-2.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do run } */
kono
parents:
diff changeset
2 /* tree inline used to split the block for inlining after the call,
kono
parents:
diff changeset
3 then move the call to the after-the-call block. This move
kono
parents:
diff changeset
4 temporarily deletes the assignment to the result, which in turn
kono
parents:
diff changeset
5 resets any debug bind stmts referencing the result. Make sure we
kono
parents:
diff changeset
6 don't do that, verifying that the result is visible after the call,
kono
parents:
diff changeset
7 and when passed to another inline function. */
kono
parents:
diff changeset
8 /* { dg-options "-g" } */
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 #define GUALITY_DONT_FORCE_LIVE_AFTER -1
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 #ifndef STATIC_INLINE
kono
parents:
diff changeset
13 #define STATIC_INLINE /*static*/
kono
parents:
diff changeset
14 #endif
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 #include "guality.h"
kono
parents:
diff changeset
18
kono
parents:
diff changeset
19 __attribute__ ((always_inline)) static inline int
kono
parents:
diff changeset
20 t1 (int i)
kono
parents:
diff changeset
21 {
kono
parents:
diff changeset
22 GUALCHKVAL (i);
kono
parents:
diff changeset
23 return i;
kono
parents:
diff changeset
24 }
kono
parents:
diff changeset
25 __attribute__ ((always_inline)) static inline int
kono
parents:
diff changeset
26 t2 (int i)
kono
parents:
diff changeset
27 {
kono
parents:
diff changeset
28 GUALCHKVAL (i);
kono
parents:
diff changeset
29 return i - 42;
kono
parents:
diff changeset
30 }
kono
parents:
diff changeset
31 int
kono
parents:
diff changeset
32 main (int argc, char *argv[])
kono
parents:
diff changeset
33 {
kono
parents:
diff changeset
34 int i = t1(42);
kono
parents:
diff changeset
35 GUALCHKVAL (i);
kono
parents:
diff changeset
36 return t2(i);
kono
parents:
diff changeset
37 }