Reported by René Rebe <rene@t2-project.org>.
* tests/test-floorf1.c (main): Mark my_floorf as 'volatile'.
* tests/test-floorf-ieee.c (main): Likewise.
* tests/test-ceilf1.c (main): Mark my_ceilf as 'volatile'.
* tests/test-ceilf-ieee.c (main): Likewise.
+2023-11-24 Bruno Haible <bruno@clisp.org>
+
+ floorf, ceilf tests: Strengthen against compiler optimizations.
+ Reported by René Rebe <rene@t2-project.org>.
+ * tests/test-floorf1.c (main): Mark my_floorf as 'volatile'.
+ * tests/test-floorf-ieee.c (main): Likewise.
+ * tests/test-ceilf1.c (main): Mark my_ceilf as 'volatile'.
+ * tests/test-ceilf-ieee.c (main): Likewise.
+
2023-11-21 Bruno Haible <bruno@clisp.org>
strerrorname_np: Work around glibc bug on HPPA systems.
int
main (int argc, _GL_UNUSED char **argv)
{
- float (*my_ceilf) (float) = argc ? ceilf : dummy;
+ float (* volatile my_ceilf) (float) = argc ? ceilf : dummy;
/* See IEEE 754, section 6.3:
"the sign of the result of the round floating-point number to
int
main (int argc, _GL_UNUSED char **argv)
{
- float (*my_ceilf) (float) = argc ? ceilf : dummy;
+ float (* volatile my_ceilf) (float) = argc ? ceilf : dummy;
/* Zero. */
ASSERT (my_ceilf (0.0f) == 0.0f);
int
main (int argc, _GL_UNUSED char **argv)
{
- float (*my_floorf) (float) = argc ? floorf : dummy;
+ float (* volatile my_floorf) (float) = argc ? floorf : dummy;
/* See IEEE 754, section 6.3:
"the sign of the result of the round floating-point number to
int
main (int argc, _GL_UNUSED char **argv)
{
- float (*my_floorf) (float) = argc ? floorf : dummy;
+ float (* volatile my_floorf) (float) = argc ? floorf : dummy;
/* Zero. */
ASSERT (my_floorf (0.0f) == 0.0f);