https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86092
--- Comment #2 from Srinivas Achary <srinivas.sundar at vvdntech dot in> --- Sorry that I am new to this..... Is there any possibility to make this code work, without changing the variable attribute. GCC-4 has no issue with this code. What special flags have been included in the GCC-5. During disassemble the if(!kern_buff_p) -- is changed to if x0 is kern_buff_p mov x0, #0 This should be mov x0,[x0]