+2023-10-22 Bruno Haible <bruno@clisp.org>
+
+ memset_explicit, explicit_bzero tests: Fix test failures with new gcc.
+ Reported by Sam James <sam@gentoo.org> in
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111904>.
+ Fix by Alexandre Oliva <aoliva@gcc.gnu.org>.
+ * tests/test-memset_explicit.c (do_secret_stuff): Declare with
+ attributes 'noclone' and 'noipa'.
+ * tests/test-explicit_bzero.c (do_secret_stuff): Likewise.
+
2023-10-15 Bruno Haible <bruno@clisp.org>
net_if tests: Fix gcc warning.
does not eliminate a call to explicit_bzero, even if data flow analysis
reveals that the stack area is dead at the end of the function. */
static bool _GL_ATTRIBUTE_NOINLINE
+#if __GNUC__ + (__GNUC_MINOR__ >= 5) > 4
+__attribute__ ((__noclone__))
+#endif
+#if __GNUC__ >= 8
+__attribute__ ((__noipa__))
+#endif
do_secret_stuff (int volatile pass, char *volatile *volatile last_stackbuf)
{
char stackbuf[SECRET_SIZE];
does not eliminate a call to memset_explicit, even if data flow analysis
reveals that the stack area is dead at the end of the function. */
static bool _GL_ATTRIBUTE_NOINLINE
+#if __GNUC__ + (__GNUC_MINOR__ >= 5) > 4
+__attribute__ ((__noclone__))
+#endif
+#if __GNUC__ >= 8
+__attribute__ ((__noipa__))
+#endif
do_secret_stuff (int volatile pass, char *volatile *volatile last_stackbuf)
{
char stackbuf[SECRET_SIZE];