avoid remove&reinsert of call when splitting block for inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / guality / inline-params-2.c
blobe00188ca01d932b910d149733b5403d584d0a31c
1 /* { dg-do run } */
2 /* tree inline used to split the block for inlining after the call,
3 then move the call to the after-the-call block. This move
4 temporarily deletes the assignment to the result, which in turn
5 resets any debug bind stmts referencing the result. Make sure we
6 don't do that, verifying that the result is visible after the call,
7 and when passed to another inline function. */
8 /* { dg-options "-g" } */
9 /* { dg-xfail-run-if "" { "*-*-*" } { "-fno-fat-lto-objects" } } */
11 #define GUALITY_DONT_FORCE_LIVE_AFTER -1
13 #ifndef STATIC_INLINE
14 #define STATIC_INLINE /*static*/
15 #endif
18 #include "guality.h"
20 __attribute__ ((always_inline)) static inline int
21 t1 (int i)
23 GUALCHKVAL (i);
24 return i;
26 __attribute__ ((always_inline)) static inline int
27 t2 (int i)
29 GUALCHKVAL (i);
30 return i - 42;
32 int
33 main (int argc, char *argv[])
35 int i = t1(42);
36 GUALCHKVAL (i);
37 return t2(i);