Fix gcc.dg/warn-abs-1.c for arm and aarch64-none-elf

Message ID 5BA10193.4060101@foss.arm.com
State New
Headers show
Series
  • Fix gcc.dg/warn-abs-1.c for arm and aarch64-none-elf
Related show

Commit Message

Kyrill Tkachov Sept. 18, 2018, 1:45 p.m.
Hi all,

This new test has some difficulties on the fabsl function.
On arm this is because we don't support the _Float128 type which the test uses.
This is handled in the patch by requiring a float128 target selector.

On aarch64-none-elf, a Newlib target, it fails because fabsl is not available.
long double support is known to be incomplete in newlib, and the fabsl function is not available
for targets where long double is larger than a double.
Therefore this patch skips the test on such targets.

Ok for trunk?

Thanks,
Kyrill

2018-09-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * gcc.dg/warn-abs-1.c: Require float128 target.
     Skip if large_long_double newlib target.

Comments

Jeff Law Sept. 18, 2018, 1:51 p.m. | #1
On 9/18/18 7:45 AM, Kyrill Tkachov wrote:
> Hi all,

> 

> This new test has some difficulties on the fabsl function.

> On arm this is because we don't support the _Float128 type which the

> test uses.

> This is handled in the patch by requiring a float128 target selector.

> 

> On aarch64-none-elf, a Newlib target, it fails because fabsl is not

> available.

> long double support is known to be incomplete in newlib, and the fabsl

> function is not available

> for targets where long double is larger than a double.

> Therefore this patch skips the test on such targets.

> 

> Ok for trunk?

> 

> Thanks,

> Kyrill

> 

> 2018-09-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

> 

>     * gcc.dg/warn-abs-1.c: Require float128 target.

>     Skip if large_long_double newlib target.


OK
jeff
Rainer Orth Sept. 18, 2018, 1:59 p.m. | #2
Hi Kyrill,

> This new test has some difficulties on the fabsl function.

> On arm this is because we don't support the _Float128 type which the test uses.

> This is handled in the patch by requiring a float128 target selector.

>

> On aarch64-none-elf, a Newlib target, it fails because fabsl is not available.

> long double support is known to be incomplete in newlib, and the fabsl

> function is not available

> for targets where long double is larger than a double.

> Therefore this patch skips the test on such targets.


this is PR testsuite/87339.  Please fix the ChangeLog accordingly.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
Kyrill Tkachov Sept. 18, 2018, 2:11 p.m. | #3
On 18/09/18 14:59, Rainer Orth wrote:
> Hi Kyrill,

>

>> This new test has some difficulties on the fabsl function.

>> On arm this is because we don't support the _Float128 type which the test uses.

>> This is handled in the patch by requiring a float128 target selector.

>>

>> On aarch64-none-elf, a Newlib target, it fails because fabsl is not available.

>> long double support is known to be incomplete in newlib, and the fabsl

>> function is not available

>> for targets where long double is larger than a double.

>> Therefore this patch skips the test on such targets.

> this is PR testsuite/87339.  Please fix the ChangeLog accordingly.


Ah, thanks. I've adjusted the ChangeLog entry with r264393.

Kyrill

> 	Rainer

>

Patch

diff --git a/gcc/testsuite/gcc.dg/warn-abs-1.c b/gcc/testsuite/gcc.dg/warn-abs-1.c
index 6aa937c3a2e9921e90969911550eebf2965ffdb4..129a3af8ac69a93596e98c6e50089fe9b74fe3d0 100644
--- a/gcc/testsuite/gcc.dg/warn-abs-1.c
+++ b/gcc/testsuite/gcc.dg/warn-abs-1.c
@@ -1,4 +1,5 @@ 
-/* { dg-do compile } */
+/* { dg-do compile { target float128 } } */
+/* { dg-skip-if "incomplete long double support" { { newlib } && large_long_double } }  */
 /* { dg-options "-Wabsolute-value" } */
 
 #include <stdlib.h>