On 05.12.2016 17:33, Tim Prince wrote:
Hi, I just came across a small test program that propagates a constant
value from a function to a callee, even though the callee has attribute
"noclone".
From the gcc documentation I would conclude that "noclone" should
prevent such propagations?
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-g_t_0040code_007bnoclone_007d-function-attribute-3345
noclone
This function attribute prevents a function from being
considered for cloning -- a mechanism that produces specialized
copies of functions and which is (currently) performed by
interprocedural constant propagation.
I see this with gcc 5.4 (x86_64) and current trunk.
Johann
Maybe you want -fno-inline-functions ?
The function has __attribute((noinline,noclone)). This is not sufficient?
Johann