1 /* Taken from memcheck/tests/inlinfo.c almost verbatim;
2 * only main() renamed to main_nested().
5 #include "../../memcheck.h"
6 #define INLINE static inline __attribute__((always_inline))
8 INLINE
int fun_d(int argd
) {
15 INLINE
int fun_c(int argc
) {
21 INLINE
int fun_b(int argb
) {
27 INLINE
int fun_a(int arga
) {
33 __attribute__((noinline
))
34 static int fun_noninline_m(int argm
)
39 __attribute__((noinline
))
40 static int fun_noninline_o(int argo
)
48 INLINE
int fun_f(int argf
) {
51 return fun_noninline_o(locf
);
54 INLINE
int fun_e(int arge
) {
60 __attribute__((noinline
))
61 static int fun_noninline_n(int argn
)
67 int main_nested(void) {
69 result
= fun_a(result
);
70 VALGRIND_MAKE_MEM_UNDEFINED(&result
, sizeof(result
));
71 result
+= fun_noninline_m(result
);
72 VALGRIND_MAKE_MEM_UNDEFINED(&result
, sizeof(result
));
73 result
+= fun_d(result
);
74 VALGRIND_MAKE_MEM_UNDEFINED(&result
, sizeof(result
));
75 result
+= fun_noninline_n(result
);