[committed] testsuite: Fix up memchr-3.c test [PR108991]

Message ID ZAE2uhyk3ens4RXy@tucnak
State New
Headers
Series [committed] testsuite: Fix up memchr-3.c test [PR108991] |

Commit Message

Jakub Jelinek March 2, 2023, 11:52 p.m. UTC
  On Thu, Mar 02, 2023 at 01:43:30PM +0000, Jonathan Yong via Gcc-patches wrote:
> On 3/2/23 10:46, Richard Sandiford wrote:
> > > diff --git a/gcc/testsuite/gcc.dg/memchr-3.c b/gcc/testsuite/gcc.dg/memchr-3.c
> > > index c38d9cf3349..af1b26ef3ae 100644
> > > --- a/gcc/testsuite/gcc.dg/memchr-3.c
> > > +++ b/gcc/testsuite/gcc.dg/memchr-3.c
> > > @@ -6,7 +6,7 @@
> > >   typedef __INT8_TYPE__  int8_t;
> > >   typedef __INT32_TYPE__ int32_t;
> > > -extern void* memchr (const void*, int, long);
> > > +extern void* memchr (const void*, int, long); /* { dg-warning "-Wbuiltin-declaration-mismatch" { target llp64 } } */
> > >   struct SX
> > >   {
> > 
> > OK, thanks.
> 
> Thanks, pushed to master branch.

The newly added dg-warning directive was missing the comment argument,
so the target selector was treated as comment and the warning was expected
on all targets when it should be expected only on llp64 targets.

Tested on x86_64-linux -m32/-m64, committed to trunk as obvious:

2023-03-03  Jakub Jelinek  <jakub@redhat.com>

	PR testsuite/108991
	* gcc.dg/memchr-3.c: Add missing comment argument to dg-warning
	before target selector.



	Jakub
  

Patch

--- gcc/testsuite/gcc.dg/memchr-3.c.jj	2023-03-02 19:09:45.466594110 +0100
+++ gcc/testsuite/gcc.dg/memchr-3.c	2023-03-03 00:48:04.368348282 +0100
@@ -6,7 +6,7 @@ 
 typedef __INT8_TYPE__  int8_t;
 typedef __INT32_TYPE__ int32_t;
 
-extern void* memchr (const void*, int, long); /* { dg-warning "-Wbuiltin-declaration-mismatch" { target llp64 } } */
+extern void* memchr (const void*, int, long); /* { dg-warning "-Wbuiltin-declaration-mismatch" "" { target llp64 } } */
 
 struct SX
 {