From 55e18ebdf3e07929f1a0c7d68309e1edb2c655be Mon Sep 17 00:00:00 2001 From: pluknet Date: Wed, 26 Dec 2012 05:11:48 +0000 Subject: 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(-) (limited to 'lib') diff --git a/lib/libproc/test/t1-bkpt/t1-bkpt.c b/lib/libproc/test/t1-bkpt/t1-bkpt.c index 37a9fcf..1cd4d17 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"); -- cgit v1.1