From 322f22f7b5c02c5a4631f8c4487c02e73f2c6994 Mon Sep 17 00:00:00 2001 From: Sergey Kandaurov Date: Wed, 26 Dec 2012 05:11:48 +0000 Subject: [PATCH] Fix libproc test case to work with clang premature optimization observed with -O2 (used by default). Avoid function inlining for t1_bkpt_t on which we set a breakpoint. Otherwise the address of the function is never called thus the breakpoint never triggers. Reported by: zont Reviewed by: rpaulo --- lib/libproc/test/t1-bkpt/t1-bkpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libproc/test/t1-bkpt/t1-bkpt.c b/lib/libproc/test/t1-bkpt/t1-bkpt.c index 37a9fcf67668..1cd4d17f5612 100644 --- a/lib/libproc/test/t1-bkpt/t1-bkpt.c +++ b/lib/libproc/test/t1-bkpt/t1-bkpt.c @@ -36,7 +36,7 @@ #include #include -int +int __noinline t1_bkpt_t() { printf("TEST OK\n");