[avr] Skip some tests that don't work on avr
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gcc_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 |
success
|
Test passed
|
Commit Message
This patch skips some tests that don't work on avr.
Ok for trunk?
Johann
--
AVR: Skip some test cases that don't work for it.
gcc/testsuite/
* gcc.c-torture/execute/ieee/cdivchkd.x: New file.
* gcc.c-torture/execute/ieee/cdivchkf.x: New file.
* gcc.dg/flex-array-counted-by.c: Skip on avr.
* gcc.dg/fold-copysign-1.c [avr]: Add -mdouble=64.
Comments
On 12/3/24 3:57 AM, Georg-Johann Lay wrote:
> This patch skips some tests that don't work on avr.
>
> Ok for trunk?
>
> Johann
>
> --
>
> AVR: Skip some test cases that don't work for it.
>
> gcc/testsuite/
> * gcc.c-torture/execute/ieee/cdivchkd.x: New file.
> * gcc.c-torture/execute/ieee/cdivchkf.x: New file.
> * gcc.dg/flex-array-counted-by.c: Skip on avr.
> * gcc.dg/fold-copysign-1.c [avr]: Add -mdouble=64.
Do you think there's more of these likely to pop up? If so, then I'd
recommend some kind of a test in target-supports.exp and isolate the
avr-isms there. If this is about it, then it's OK.
jeff
Am 03.12.24 um 15:36 schrieb Jeff Law:
>
> On 12/3/24 3:57 AM, Georg-Johann Lay wrote:
>> This patch skips some tests that don't work on avr.
>>
>> Ok for trunk?
>>
>> Johann
>>
>> --
>>
>> AVR: Skip some test cases that don't work for it.
>>
>> gcc/testsuite/
>> * gcc.c-torture/execute/ieee/cdivchkd.x: New file.
>> * gcc.c-torture/execute/ieee/cdivchkf.x: New file.
>> * gcc.dg/flex-array-counted-by.c: Skip on avr.
>> * gcc.dg/fold-copysign-1.c [avr]: Add -mdouble=64.
> Do you think there's more of these likely to pop up? If so, then I'd
> recommend some kind of a test in target-supports.exp and isolate the
> avr-isms there. If this is about it, then it's OK.
>
> jeff
Yes, there are likely to be more.
Though there's not one single reason for why some tests are failing
on avr. For example, one of the above tests failed because wchar_t
support is incomplete, an other one failed because ilogb is missing,
etc.
So I don't see what exactly such a dg-require test should test for.
But flex-array-counted-by.c would better do dg-require wchar which
is already there.
Johann
On 12/3/24 7:45 AM, Georg-Johann Lay wrote:
> Am 03.12.24 um 15:36 schrieb Jeff Law:
>>
>> On 12/3/24 3:57 AM, Georg-Johann Lay wrote:
>>> This patch skips some tests that don't work on avr.
>>>
>>> Ok for trunk?
>>>
>>> Johann
>>>
>>> --
>>>
>>> AVR: Skip some test cases that don't work for it.
>>>
>>> gcc/testsuite/
>>> * gcc.c-torture/execute/ieee/cdivchkd.x: New file.
>>> * gcc.c-torture/execute/ieee/cdivchkf.x: New file.
>>> * gcc.dg/flex-array-counted-by.c: Skip on avr.
>>> * gcc.dg/fold-copysign-1.c [avr]: Add -mdouble=64.
>> Do you think there's more of these likely to pop up? If so, then I'd
>> recommend some kind of a test in target-supports.exp and isolate the
>> avr-isms there. If this is about it, then it's OK.
>>
>> jeff
>
> Yes, there are likely to be more.
>
> Though there's not one single reason for why some tests are failing
> on avr. For example, one of the above tests failed because wchar_t
> support is incomplete, an other one failed because ilogb is missing,
> etc.
Got it. So it's really about missing things in the target environment.
>
> So I don't see what exactly such a dg-require test should test for.
Probably not a good one that would cover all of what you're trying to do.
>
> But flex-array-counted-by.c would better do dg-require wchar which
> is already there.
So let's go with the dg-require wchar for that.
When you see commonality between reasons to skip, try to create a
suitable target-support.exp test. But when there isn't any obvious
commonality, go ahead with your skip approach.
Thanks and sorry for the delays.
jeff
AVR: Skip some test cases that don't work for it.
gcc/testsuite/
* gcc.c-torture/execute/ieee/cdivchkd.x: New file.
* gcc.c-torture/execute/ieee/cdivchkf.x: New file.
* gcc.dg/flex-array-counted-by.c: Skip on avr.
* gcc.dg/fold-copysign-1.c [avr]: Add -mdouble=64.
new file mode 100644
@@ -0,0 +1,5 @@
+if [istarget "avr-*-*"] {
+ # Floating-point support is incomplete.
+ return 1
+}
+return 0
new file mode 100644
@@ -0,0 +1,5 @@
+if [istarget "avr-*-*"] {
+ # Floating-point support is incomplete.
+ return 1
+}
+return 0
@@ -1,6 +1,7 @@
/* Testing the correct usage of attribute counted_by. */
/* { dg-do compile } */
/* { dg-options "-O2" } */
+/* { dg-skip-if "wchar support is incomplete" { "avr-*-*" } } */
#include <wchar.h>
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-cddce1" } */
/* { dg-additional-options "-msse -mfpmath=sse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-additional-options "-mdouble=64" { target { avr-*-* } } } */
double foo (double x)
{