* [PATCH] [testsuite] tsvc: skip include malloc.h when unavailable
@ 2023-05-24 5:16 Alexandre Oliva
2023-05-24 9:02 ` Richard Biener
0 siblings, 1 reply; 5+ messages in thread
From: Alexandre Oliva @ 2023-05-24 5:16 UTC (permalink / raw)
To: gcc-patches; +Cc: Rainer Orth, Mike Stump
tsvc tests all fail on systems that don't offer a malloc.h, other than
those that explicitly rule that out. Use the preprocessor to test for
malloc.h's availability.
tsvc.h also expects a definition for struct timeval, but it doesn't
include sys/time.h. Add a conditional include thereof.
Bootstrapped on x86_64-linux-gnu. Also tested on ppc- and x86-vx7r2
with gcc-12.
for gcc/testsuite/ChangeLog
* gcc.dg/vect/tsvc/tsvc.h: Test for and conditionally include
malloc.h and sys/time.h.
---
gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h
index 75494c24cfa62..cd39c041903dd 100644
--- a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h
@@ -11,9 +11,12 @@
#include <stdio.h>
#include <stdlib.h>
-#if !defined(__APPLE__) && !defined(__DragonFly__)
+#if __has_include(<malloc.h>)
#include <malloc.h>
#endif
+#if __has_include(<sys/time.h>)
+#include <sys/time.h>
+#endif
#include <string.h>
#include <math.h>
--
Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/
Free Software Activist GNU Toolchain Engineer
Disinformation flourishes because many people care deeply about injustice
but very few check the facts. Ask me about <https://stallmansupport.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] [testsuite] tsvc: skip include malloc.h when unavailable
2023-05-24 5:16 [PATCH] [testsuite] tsvc: skip include malloc.h when unavailable Alexandre Oliva
@ 2023-05-24 9:02 ` Richard Biener
2024-02-09 10:33 ` Torbjorn SVENSSON
0 siblings, 1 reply; 5+ messages in thread
From: Richard Biener @ 2023-05-24 9:02 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: gcc-patches, Rainer Orth, Mike Stump
On Wed, May 24, 2023 at 7:17 AM Alexandre Oliva via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
>
> tsvc tests all fail on systems that don't offer a malloc.h, other than
> those that explicitly rule that out. Use the preprocessor to test for
> malloc.h's availability.
>
> tsvc.h also expects a definition for struct timeval, but it doesn't
> include sys/time.h. Add a conditional include thereof.
>
> Bootstrapped on x86_64-linux-gnu. Also tested on ppc- and x86-vx7r2
> with gcc-12.
OK.
>
> for gcc/testsuite/ChangeLog
>
> * gcc.dg/vect/tsvc/tsvc.h: Test for and conditionally include
> malloc.h and sys/time.h.
>
> ---
> gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h
> index 75494c24cfa62..cd39c041903dd 100644
> --- a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h
> +++ b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h
> @@ -11,9 +11,12 @@
>
> #include <stdio.h>
> #include <stdlib.h>
> -#if !defined(__APPLE__) && !defined(__DragonFly__)
> +#if __has_include(<malloc.h>)
> #include <malloc.h>
> #endif
> +#if __has_include(<sys/time.h>)
> +#include <sys/time.h>
> +#endif
> #include <string.h>
> #include <math.h>
>
>
> --
> Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/
> Free Software Activist GNU Toolchain Engineer
> Disinformation flourishes because many people care deeply about injustice
> but very few check the facts. Ask me about <https://stallmansupport.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] [testsuite] tsvc: skip include malloc.h when unavailable
2023-05-24 9:02 ` Richard Biener
@ 2024-02-09 10:33 ` Torbjorn SVENSSON
2024-02-09 10:34 ` Richard Biener
0 siblings, 1 reply; 5+ messages in thread
From: Torbjorn SVENSSON @ 2024-02-09 10:33 UTC (permalink / raw)
To: Richard Biener, Alexandre Oliva
Cc: gcc-patches, Rainer Orth, Mike Stump, Yvan Roux
Hi,
Is it okay to backport 2f20d6296087cae51f55eeecb3efefe786191fd6 to
releases/gcc-13?
Without this backport, I see about 150 failures on arm-none-eabi, an
example of them is:
FAIL: gcc.dg/vect/tsvc/vect-tsvc-s000.c (test for excess errors)
Kind regards,
Torbjörn
On 2023-05-24 11:02, Richard Biener via Gcc-patches wrote:
> On Wed, May 24, 2023 at 7:17 AM Alexandre Oliva via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
>>
>>
>> tsvc tests all fail on systems that don't offer a malloc.h, other than
>> those that explicitly rule that out. Use the preprocessor to test for
>> malloc.h's availability.
>>
>> tsvc.h also expects a definition for struct timeval, but it doesn't
>> include sys/time.h. Add a conditional include thereof.
>>
>> Bootstrapped on x86_64-linux-gnu. Also tested on ppc- and x86-vx7r2
>> with gcc-12.
>
> OK.
>
>>
>> for gcc/testsuite/ChangeLog
>>
>> * gcc.dg/vect/tsvc/tsvc.h: Test for and conditionally include
>> malloc.h and sys/time.h.
>>
>> ---
>> gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h
>> index 75494c24cfa62..cd39c041903dd 100644
>> --- a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h
>> +++ b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h
>> @@ -11,9 +11,12 @@
>>
>> #include <stdio.h>
>> #include <stdlib.h>
>> -#if !defined(__APPLE__) && !defined(__DragonFly__)
>> +#if __has_include(<malloc.h>)
>> #include <malloc.h>
>> #endif
>> +#if __has_include(<sys/time.h>)
>> +#include <sys/time.h>
>> +#endif
>> #include <string.h>
>> #include <math.h>
>>
>>
>> --
>> Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/
>> Free Software Activist GNU Toolchain Engineer
>> Disinformation flourishes because many people care deeply about injustice
>> but very few check the facts. Ask me about <https://stallmansupport.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] [testsuite] tsvc: skip include malloc.h when unavailable
2024-02-09 10:33 ` Torbjorn SVENSSON
@ 2024-02-09 10:34 ` Richard Biener
2024-02-09 10:52 ` Torbjorn SVENSSON
0 siblings, 1 reply; 5+ messages in thread
From: Richard Biener @ 2024-02-09 10:34 UTC (permalink / raw)
To: Torbjorn SVENSSON
Cc: Alexandre Oliva, gcc-patches, Rainer Orth, Mike Stump, Yvan Roux
On Fri, Feb 9, 2024 at 11:33 AM Torbjorn SVENSSON
<torbjorn.svensson@foss.st.com> wrote:
>
> Hi,
>
> Is it okay to backport 2f20d6296087cae51f55eeecb3efefe786191fd6 to
> releases/gcc-13?
Yes.
> Without this backport, I see about 150 failures on arm-none-eabi, an
> example of them is:
>
> FAIL: gcc.dg/vect/tsvc/vect-tsvc-s000.c (test for excess errors)
>
>
> Kind regards,
> Torbjörn
>
> On 2023-05-24 11:02, Richard Biener via Gcc-patches wrote:
> > On Wed, May 24, 2023 at 7:17 AM Alexandre Oliva via Gcc-patches
> > <gcc-patches@gcc.gnu.org> wrote:
> >>
> >>
> >> tsvc tests all fail on systems that don't offer a malloc.h, other than
> >> those that explicitly rule that out. Use the preprocessor to test for
> >> malloc.h's availability.
> >>
> >> tsvc.h also expects a definition for struct timeval, but it doesn't
> >> include sys/time.h. Add a conditional include thereof.
> >>
> >> Bootstrapped on x86_64-linux-gnu. Also tested on ppc- and x86-vx7r2
> >> with gcc-12.
> >
> > OK.
> >
> >>
> >> for gcc/testsuite/ChangeLog
> >>
> >> * gcc.dg/vect/tsvc/tsvc.h: Test for and conditionally include
> >> malloc.h and sys/time.h.
> >>
> >> ---
> >> gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h | 5 ++++-
> >> 1 file changed, 4 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h
> >> index 75494c24cfa62..cd39c041903dd 100644
> >> --- a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h
> >> +++ b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h
> >> @@ -11,9 +11,12 @@
> >>
> >> #include <stdio.h>
> >> #include <stdlib.h>
> >> -#if !defined(__APPLE__) && !defined(__DragonFly__)
> >> +#if __has_include(<malloc.h>)
> >> #include <malloc.h>
> >> #endif
> >> +#if __has_include(<sys/time.h>)
> >> +#include <sys/time.h>
> >> +#endif
> >> #include <string.h>
> >> #include <math.h>
> >>
> >>
> >> --
> >> Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/
> >> Free Software Activist GNU Toolchain Engineer
> >> Disinformation flourishes because many people care deeply about injustice
> >> but very few check the facts. Ask me about <https://stallmansupport.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] [testsuite] tsvc: skip include malloc.h when unavailable
2024-02-09 10:34 ` Richard Biener
@ 2024-02-09 10:52 ` Torbjorn SVENSSON
0 siblings, 0 replies; 5+ messages in thread
From: Torbjorn SVENSSON @ 2024-02-09 10:52 UTC (permalink / raw)
To: Richard Biener
Cc: Alexandre Oliva, gcc-patches, Rainer Orth, Mike Stump, Yvan Roux
On 2024-02-09 11:34, Richard Biener wrote:
> On Fri, Feb 9, 2024 at 11:33 AM Torbjorn SVENSSON
> <torbjorn.svensson@foss.st.com> wrote:
>>
>> Hi,
>>
>> Is it okay to backport 2f20d6296087cae51f55eeecb3efefe786191fd6 to
>> releases/gcc-13?
>
> Yes.
Pushed as 5b3dcff46780192a2e526bc434d61c8626898050.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-02-09 10:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-24 5:16 [PATCH] [testsuite] tsvc: skip include malloc.h when unavailable Alexandre Oliva
2023-05-24 9:02 ` Richard Biener
2024-02-09 10:33 ` Torbjorn SVENSSON
2024-02-09 10:34 ` Richard Biener
2024-02-09 10:52 ` Torbjorn SVENSSON
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).