00db10
diff --git glibc-2.17-c758a686/nptl/tst-cleanup2.c glibc-2.17-c758a686/nptl/tst-cleanup2.c
00db10
index 5bd1609..65af0f2 100644
00db10
--- glibc-2.17-c758a686/nptl/tst-cleanup2.c
00db10
+++ glibc-2.17-c758a686/nptl/tst-cleanup2.c
00db10
@@ -34,6 +34,12 @@ static int
00db10
 do_test (void)
00db10
 {
00db10
   char *p = NULL;
00db10
+  /* gcc can overwrite the success written value by scheduling instructions
00db10
+     around sprintf.  It is allowed to do this since according to C99 the first
00db10
+     argument of sprintf is a character array and NULL is not a valid character
00db10
+     array.  Mark the return value as volatile so that it gets reloaded on
00db10
+     return.  */
00db10
+  volatile int ret = 0;
00db10
   struct sigaction sa;
00db10
 
00db10
   sa.sa_handler = sig_handler;
00db10
@@ -50,7 +56,7 @@ do_test (void)
00db10
   if (setjmp (jmpbuf))
00db10
     {
00db10
       puts ("Exiting main...");
00db10
-      return 0;
00db10
+      return ret;
00db10
     }
00db10
 
00db10
   sprintf (p, "This should segv\n");