[v2] testsuite: adjust call to abort in excess-precision-12

Message ID 20231211135401.1227845-1-poulhies@adacore.com
State Accepted
Headers
Series [v2] testsuite: adjust call to abort in excess-precision-12 |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Marc Poulhiès Dec. 11, 2023, 1:35 p.m. UTC
  On non-hosted targets, cstdlib may not be sufficient to have abort
defined, but it should be for std::abort.

gcc/testsuite/ChangeLog:

	* g++.target/i386/excess-precision-12.C: call std::abort instead of abort.
---
Changed from calling __builtin_abort to std::abort, as advised.

Ok for master?

Thanks,
Marc

 gcc/testsuite/g++.target/i386/excess-precision-12.C | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Jakub Jelinek Dec. 11, 2023, 1:57 p.m. UTC | #1
On Mon, Dec 11, 2023 at 02:35:52PM +0100, Marc Poulhiès wrote:
> On non-hosted targets, cstdlib may not be sufficient to have abort
> defined, but it should be for std::abort.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* g++.target/i386/excess-precision-12.C: call std::abort instead of abort.
> ---
> Changed from calling __builtin_abort to std::abort, as advised.
> 
> Ok for master?

Ok.

	Jakub
  

Patch

diff --git a/gcc/testsuite/g++.target/i386/excess-precision-12.C b/gcc/testsuite/g++.target/i386/excess-precision-12.C
index dff48c07c8b..7cfd15d6136 100644
--- a/gcc/testsuite/g++.target/i386/excess-precision-12.C
+++ b/gcc/testsuite/g++.target/i386/excess-precision-12.C
@@ -13,8 +13,8 @@  main (void)
   unsigned long long int u = (1ULL << 63) + 1;
 
   if ((f <=> u) >= 0)
-    abort ();
+    std::abort ();
 
   if ((u <=> f) <= 0)
-    abort ();
+    std::abort ();
 }