]> Savannah Git Hosting - gnulib.git/commitdiff
alloca-opt-tests: add a ‘volatile’
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 May 2024 05:39:34 +0000 (22:39 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 May 2024 05:42:01 +0000 (22:42 -0700)
* tests/test-alloca-opt.c (func) [HAVE_ALLOCA]:
Now volatile, to foil whole-program optimization.

ChangeLog
tests/test-alloca-opt.c

index 6436ddfb815555ab1bad86038efb749ed45e539b..a8ed30c4ae9c626f8564efdddb6b6a614955f1cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-05-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+       alloca-opt-tests: add a ‘volatile’
+       * tests/test-alloca-opt.c (func) [HAVE_ALLOCA]:
+       Now volatile, to foil whole-program optimization.
+
 2024-05-16  Collin Funk  <collin.funk1@gmail.com>
 
        byteswap tests: Strengthen tests.
index 3f20779c9e3c2f11d60329f374c6e68a4ff50edb..b22921758e251a3077415f77b9cbd8089d1fc80c 100644 (file)
@@ -29,7 +29,7 @@ do_allocation (int n)
   (void) ptr;
 }
 
-void (*func) (int) = do_allocation;
+void (*volatile func) (int) = do_allocation;
 
 #endif