https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71867
--- Comment #7 from asmwarrior <asmwarrior at gmail dot com> --- The -fno-delete-null-pointer-checks option exists in -O2 mode in both GCC 4.9 and GCC 5.x, but this crash issue only happens on GCC 5.x serials. So, why do you think it is the reason? See my related discussion here: http://forums.codeblocks.org/index.php/topic,21207.msg145242.html#msg145242