summaryrefslogtreecommitdiffstats
path: root/lib/libproc
diff options
context:
space:
mode:
authorpluknet <pluknet@FreeBSD.org>2012-12-26 05:11:48 +0000
committerpluknet <pluknet@FreeBSD.org>2012-12-26 05:11:48 +0000
commit55e18ebdf3e07929f1a0c7d68309e1edb2c655be (patch)
treef0115194b5081d978d990448e43b69a03bd4748b /lib/libproc
parent9b46c215ceb8be4f104159bb19e425f13aa0af0a (diff)
downloadFreeBSD-src-55e18ebdf3e07929f1a0c7d68309e1edb2c655be.zip
FreeBSD-src-55e18ebdf3e07929f1a0c7d68309e1edb2c655be.tar.gz
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
Diffstat (limited to 'lib/libproc')
-rw-r--r--lib/libproc/test/t1-bkpt/t1-bkpt.c2
1 files changed, 1 insertions, 1 deletions
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 <string.h>
#include <libproc.h>
-int
+int __noinline
t1_bkpt_t()
{
printf("TEST OK\n");
OpenPOWER on IntegriCloud