On Thu, Dec 07, 2023 at 05:27:28PM +0100, Marc Poulhiès wrote:
> abort() is not always available, using the builtin as done in other
> tests.
> 
> gcc/testsuite/ChangeLog:
> 
>       * g++.target/i386/excess-precision-12.C: call builtin_abort instead of 
> abort.
> ---
> Tested on x86_64-linux and x86_64-elf.
> 
> Ok for master?
> 
>  gcc/testsuite/g++.target/i386/excess-precision-12.C | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/gcc/testsuite/g++.target/i386/excess-precision-12.C 
> b/gcc/testsuite/g++.target/i386/excess-precision-12.C
> index dff48c07c8b..e59f7c3b1fb 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 ();
> +    __builtin_abort ();
>  
>    if ((u <=> f) <= 0)
> -    abort ();
> +    __builtin_abort ();

Why wouldn't they have abort and what else does __builtin_abort () expand
to?
There are 2000+ other tests in gcc.target/i386/ which call abort (),
not __builtin_abort (), after including <stdlib.h> directly or indirectly
or declaring it themselves.  This test in particular includes <cstdlib>

Does whatever target you are running this into provide just std::abort ()
and not abort (); from <cstdlib>?  If so, perhaps it should call
std::abort (); instead of abort ().

        Jakub

Reply via email to