2018-01-10 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / guality / inline-params-2.c
blob53fd0883ceb54d8390284c856b9aa0283319e59f
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" } */
10 #define GUALITY_DONT_FORCE_LIVE_AFTER -1
12 #ifndef STATIC_INLINE
13 #define STATIC_INLINE /*static*/
14 #endif
17 #include "guality.h"
19 __attribute__ ((always_inline)) static inline int
20 t1 (int i)
22 GUALCHKVAL (i);
23 return i;
25 __attribute__ ((always_inline)) static inline int
26 t2 (int i)
28 GUALCHKVAL (i);
29 return i - 42;
31 int
32 main (int argc, char *argv[])
34 int i = t1(42);
35 GUALCHKVAL (i);
36 return t2(i);