http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58240
--- Comment #8 from shiyan <shiyan2016 at 126 dot com> --- (In reply to Jakub Jelinek from comment #6) > The testcase is clearly bogus. You are not using the result of either of > the strncmp calls, strncmp is a pure function, so it is fine not to call it > at all. Hi Jelinek, No this is not the reason. I know what you mean. In fact, I have tried to printf 'ret' in my real case and it will still reproduce the issue. I remove all other code because I want to sumbit a minimal test case. You may have a try to use the result of strncmp and check the output. Whatever, the code depends on "N" of strncmp is crazy behaviour. Thanks, Shiyan