https://gcc.gnu.org/g:7c317ad17a2c808f5465fbf56e3c2e7569c45a0b

commit r17-5205-g7c317ad17a2c808f5465fbf56e3c2e7569c45a0b
Author: Richard Sandiford <[email protected]>
Date:   Wed Oct 14 19:43:51 2026 +0100

    testsuite: Tweak gcc.target/aarch64/neon/discarded_result.c
    
    The testcase passed for me even with r17-4816-gb24418a2212866
    reverted.  That's because the test adds -fno-trapping-math,
    which means that vadd_f32 is treated as having no side-effects.
    The call can then be optimised away even without folding.
    
    The test does ICE with unpatched sources if the dg-option is removed.
    However, the proper default for trapping-math is controversial,
    so it seems better to add an explicit -ftrapping-math instead.
    
    gcc/testsuite/
            * gcc.target/aarch64/neon/discarded_result.c: Use -ftrapping-math.

Diff:
---
 gcc/testsuite/gcc.target/aarch64/neon/discarded_result.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/aarch64/neon/discarded_result.c 
b/gcc/testsuite/gcc.target/aarch64/neon/discarded_result.c
index 183b162f2ee3..1adec7fe8d3b 100644
--- a/gcc/testsuite/gcc.target/aarch64/neon/discarded_result.c
+++ b/gcc/testsuite/gcc.target/aarch64/neon/discarded_result.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-final { check-function-bodies "**" "" } } */
-/* { dg-additional-options "-fno-trapping-math" } */
+/* { dg-additional-options "-ftrapping-math" } */
 
 #include "arm_neon_test.h"

Reply via email to