https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64120
--- Comment #10 from Jürgen Reuter <juergen.reuter at desy dot de> --- 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.