GCC 4.9 #32 special value?

Jeff Law law@redhat.com
Tue Jan 26 16:23:00 GMT 2016

On 01/26/2016 09:17 AM, Jens Vankeirsbilck wrote:
> Hi all
> While testing a GCC plugin I wrote, I came across something very strange.
> The plugin inserts extra code into a C++ program on the RTL level. The code that produces the "magic" is as follows:
> someMethod(){
> 	someInstructions()
> 		someMoreInstructions()
> 	}
> 	evenMoreInstructions()
> }
> Now, the strange part:
> Within the "FOR_EACH_BB_FN" loop, I create and emit an insn that contains a CONST_INT(VOIDmode, 32) rtx.
> Once out of that "FOR_..." loop, the value of 32 gets changed to 28, for no apparent reason! I do not touch that emitted insn anymore, yet somehow the value of 32 is changed into 28.
> Also, this only happens with the value 32. I also create the same kinds of insn's with values like 8, 64 or 262144 and they hold there value.
> Can someone explain to me why this happens?
There's a structure sharing problem somewhere -- many nodes in the IL 
are shared.


More information about the Gcc-help mailing list