public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix gcc.dg/utf-array.c testcase
@ 2019-01-18 23:02 Jakub Jelinek
       [not found] ` <DB6PR0802MB23092D2AAB18D30866B359F6FF9F0@DB6PR0802MB2309.eurprd08.prod.outlook.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Jelinek @ 2019-01-18 23:02 UTC (permalink / raw)
  To: Jason Merrill; +Cc: gcc-patches

Hi!

The utf-array.c testcase FAILs e.g. on i686-linux or powerpc-linux,
the problem is that wchar_t there isn't int, but long int.
grep shows that WCHAR_TYPE is one of
int
short int
long int
unsigned int
short unsigned int
long unsigned int
depending on exact target and options.

The following patch accepts them all, ok for trunk?

2019-01-18  Jakub Jelinek  <jakub@redhat.com>

	* gcc.dg/utf-array.c: Allow wchar_t to be printed as
	{long ,short ,}{unsigned ,}int.

--- gcc/testsuite/gcc.dg/utf-array.c.jj	2019-01-18 00:33:20.867980701 +0100
+++ gcc/testsuite/gcc.dg/utf-array.c	2019-01-18 23:32:57.086524528 +0100
@@ -12,13 +12,13 @@ typedef __CHAR32_TYPE__	char32_t;
 const char	s_0[]	= "ab";
 const char	s_1[]	= u"ab";	/* { dg-error "from a string literal with type array of" } */
 const char	s_2[]	= U"ab";	/* { dg-error "from a string literal with type array of" } */
-const char	s_3[]	= L"ab";	/* { dg-error "from a string literal with type array of .int." } */
+const char	s_3[]	= L"ab";	/* { dg-error "from a string literal with type array of .(long |short )?(unsigned )?int." } */
 const char	s_4[]	= u8"ab";
 
 const char16_t	s16_0[]	= "ab";		/* { dg-error "from a string literal with type array of .char." } */
 const char16_t	s16_1[]	= u"ab";
 const char16_t	s16_2[]	= U"ab";	/* { dg-error "from a string literal with type array of" } */
-const char16_t	s16_3[]	= L"ab";	/* { dg-error "from a string literal with type array of .int." "" { target { ! wchar_t_char16_t_compatible } } } */
+const char16_t	s16_3[]	= L"ab";	/* { dg-error "from a string literal with type array of .(long |short )?(unsigned )?int." "" { target { ! wchar_t_char16_t_compatible } } } */
 const char16_t	s16_4[]	= u8"ab";	/* { dg-error "from a string literal with type array of .char." } */
 
 const char16_t	s16_5[0] = u"ab";	/* { dg-warning "chars is too long" } */
@@ -30,7 +30,7 @@ const char16_t	s16_9[4] = u"ab";
 const char32_t	s32_0[]	= "ab";		/* { dg-error "from a string literal with type array of .char." } */
 const char32_t	s32_1[]	= u"ab";	/* { dg-error "from a string literal with type array of" } */
 const char32_t	s32_2[]	= U"ab";
-const char32_t	s32_3[]	= L"ab";	/* { dg-error "from a string literal with type array of .int." "" { target { ! wchar_t_char32_t_compatible } } } */
+const char32_t	s32_3[]	= L"ab";	/* { dg-error "from a string literal with type array of .(long |short )?(unsigned )?int." "" { target { ! wchar_t_char32_t_compatible } } } */
 const char32_t	s32_4[]	= u8"ab";	/* { dg-error "from a string literal with type array of .char." } */
 
 const char32_t	s32_5[0] = U"ab";	/* { dg-warning "chars is too long" } */

	Jakub

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] Fix gcc.dg/utf-array.c testcase
       [not found] ` <DB6PR0802MB23092D2AAB18D30866B359F6FF9F0@DB6PR0802MB2309.eurprd08.prod.outlook.com>
@ 2019-01-21 16:01   ` Tamar Christina
  2019-01-21 16:48     ` Jeff Law
  0 siblings, 1 reply; 3+ messages in thread
From: Tamar Christina @ 2019-01-21 16:01 UTC (permalink / raw)
  To: Jakub Jelinek, Jason Merrill; +Cc: gcc-patches, nd

Forwarding to list.

> -----Original Message-----
> From: Tamar Christina
> Sent: Monday, January 21, 2019 15:25
> To: 'Jakub Jelinek' <jakub@redhat.com>; Jason Merrill <jason@redhat.com>
> Cc: gcc-patches@gcc.gnu.org
> Subject: RE: [PATCH] Fix gcc.dg/utf-array.c testcase
> 
> Hi,
> 
> These fail on aarch64*-*-* and arm*-*-* too, but this patch fixes it.
> 
> So gentle ping? 😊
> 
> Tamar
> 
> > -----Original Message-----
> > From: gcc-patches-owner@gcc.gnu.org <gcc-patches-owner@gcc.gnu.org>
> On
> > Behalf Of Jakub Jelinek
> > Sent: Friday, January 18, 2019 23:02
> > To: Jason Merrill <jason@redhat.com>
> > Cc: gcc-patches@gcc.gnu.org
> > Subject: [PATCH] Fix gcc.dg/utf-array.c testcase
> >
> > Hi!
> >
> > The utf-array.c testcase FAILs e.g. on i686-linux or powerpc-linux,
> > the problem is that wchar_t there isn't int, but long int.
> > grep shows that WCHAR_TYPE is one of
> > int
> > short int
> > long int
> > unsigned int
> > short unsigned int
> > long unsigned int
> > depending on exact target and options.
> >
> > The following patch accepts them all, ok for trunk?
> >
> > 2019-01-18  Jakub Jelinek  <jakub@redhat.com>
> >
> > 	* gcc.dg/utf-array.c: Allow wchar_t to be printed as
> > 	{long ,short ,}{unsigned ,}int.
> >
> > --- gcc/testsuite/gcc.dg/utf-array.c.jj	2019-01-18 00:33:20.867980701 +0100
> > +++ gcc/testsuite/gcc.dg/utf-array.c	2019-01-18 23:32:57.086524528 +0100
> > @@ -12,13 +12,13 @@ typedef __CHAR32_TYPE__	char32_t;
> >  const char	s_0[]	= "ab";
> >  const char	s_1[]	= u"ab";	/* { dg-error "from a string literal with
> > type array of" } */
> >  const char	s_2[]	= U"ab";	/* { dg-error "from a string literal with
> > type array of" } */
> > -const char	s_3[]	= L"ab";	/* { dg-error "from a string literal with
> > type array of .int." } */
> > +const char	s_3[]	= L"ab";	/* { dg-error "from a string literal with
> > type array of .(long |short )?(unsigned )?int." } */
> >  const char	s_4[]	= u8"ab";
> >
> >  const char16_t	s16_0[]	= "ab";		/* { dg-error "from a string
> literal with
> > type array of .char." } */
> >  const char16_t	s16_1[]	= u"ab";
> >  const char16_t	s16_2[]	= U"ab";	/* { dg-error "from a string
> literal with
> > type array of" } */
> > -const char16_t	s16_3[]	= L"ab";	/* { dg-error "from a string
> literal with
> > type array of .int." "" { target { ! wchar_t_char16_t_compatible } } }
> > */
> > +const char16_t	s16_3[]	= L"ab";	/* { dg-error "from a string
> > literal with type array of .(long |short )?(unsigned )?int." "" { target { !
> > wchar_t_char16_t_compatible } } } */
> >  const char16_t	s16_4[]	= u8"ab";	/* { dg-error "from a string
> literal with
> > type array of .char." } */
> >
> >  const char16_t	s16_5[0] = u"ab";	/* { dg-warning "chars is too
> long" }
> > */
> > @@ -30,7 +30,7 @@ const char16_t	s16_9[4] = u"ab";
> >  const char32_t	s32_0[]	= "ab";		/* { dg-error "from a string
> literal with
> > type array of .char." } */
> >  const char32_t	s32_1[]	= u"ab";	/* { dg-error "from a string
> literal with
> > type array of" } */
> >  const char32_t	s32_2[]	= U"ab";
> > -const char32_t	s32_3[]	= L"ab";	/* { dg-error "from a string
> literal with
> > type array of .int." "" { target { ! wchar_t_char32_t_compatible } } }
> > */
> > +const char32_t	s32_3[]	= L"ab";	/* { dg-error "from a string
> > literal with type array of .(long |short )?(unsigned )?int." "" { target { !
> > wchar_t_char32_t_compatible } } } */
> >  const char32_t	s32_4[]	= u8"ab";	/* { dg-error "from a string
> literal with
> > type array of .char." } */
> >
> >  const char32_t	s32_5[0] = U"ab";	/* { dg-warning "chars is too
> long" }
> > */
> >
> > 	Jakub

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix gcc.dg/utf-array.c testcase
  2019-01-21 16:01   ` Tamar Christina
@ 2019-01-21 16:48     ` Jeff Law
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Law @ 2019-01-21 16:48 UTC (permalink / raw)
  To: Tamar Christina, Jakub Jelinek, Jason Merrill; +Cc: gcc-patches, nd

On 1/21/19 9:00 AM, Tamar Christina wrote:
> Forwarding to list.
> 
>> -----Original Message-----
>> From: Tamar Christina
>> Sent: Monday, January 21, 2019 15:25
>> To: 'Jakub Jelinek' <jakub@redhat.com>; Jason Merrill <jason@redhat.com>
>> Cc: gcc-patches@gcc.gnu.org
>> Subject: RE: [PATCH] Fix gcc.dg/utf-array.c testcase
>>
>> Hi,
>>
>> These fail on aarch64*-*-* and arm*-*-* too, but this patch fixes it.
>>
>> So gentle ping? 😊
ACK.  Please install, a goodly number of my testers tripped over this.
I don't like lots of red dots in my jenkins builds :-)

jeff

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-21 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-18 23:02 [PATCH] Fix gcc.dg/utf-array.c testcase Jakub Jelinek
     [not found] ` <DB6PR0802MB23092D2AAB18D30866B359F6FF9F0@DB6PR0802MB2309.eurprd08.prod.outlook.com>
2019-01-21 16:01   ` Tamar Christina
2019-01-21 16:48     ` Jeff Law

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).