https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64120
--- Comment #11 from Paul Thomas <pault at gcc dot gnu.org> --- (In reply to Jürgen Reuter from comment #10) > I think inside the logical function (in the local scope) the length of s has > to be printed as the value of the argument x, so 1 and 2, with or without > the 'save' attribute. That's the way it works. However, it is an odd one because the length for the testcase exceeds the allocated memory for the second call. I guess that what should be done is to introduce a static variable to save the string length and then to do a memory check, if checking is set, on subsequent calls. Thanks for the feedback. Paul