diff mbox series

[PATCH[ Fix pr87269.C testcase

Message ID 20181116205050.GK11625@tucnak
State New
Headers show
Series [PATCH[ Fix pr87269.C testcase | expand

Commit Message

Jakub Jelinek Nov. 16, 2018, 8:50 p.m. UTC
On Fri, Nov 16, 2018 at 10:01:05AM -0500, Nathan Sidwell wrote:
> 2018-11-16  Nathan Sidwell  <nathan@acm.org>
> 
> 	PR c++/87269
> 	* parser.c (lookup_literal_operator): Mark overload for keeping
> 	when inside template.  Refactor.
> 
> 	* g++.dg/lookup/pr87269.C: New.

This test fails on i686-linux (and on any other where std::size_t is
not unsigned long.

Fixed thusly, tested on x86_64-linux and i686-linux, ok for trunk?

2018-11-16  Jakub Jelinek  <jakub@redhat.com>

	PR c++/87269
	* g++.dg/lookup/pr87269.C (std::size_t): New typedef.
	(operator"" _a) Change unsigned long type to std::size_t.



	Jakub

Comments

Nathan Sidwell Nov. 16, 2018, 10:59 p.m. UTC | #1
Yeah, thanks Jakubnathan-- Nathan Sidwell
-------- Original message --------From: Jakub Jelinek <jakub@redhat.com> Date: 11/16/18  15:50  (GMT-05:00) To: Nathan Sidwell <nathan@acm.org>, Jason Merrill <jason@redhat.com> Cc: GCC Patches <gcc-patches@gcc.gnu.org> Subject: [PATCH[ Fix pr87269.C testcase On Fri, Nov 16, 2018 at 10:01:05AM -0500, Nathan Sidwell wrote:> 2018-11-16  Nathan Sidwell  <nathan@acm.org>> > 	PR c++/87269> 	* parser.c (lookup_literal_operator): Mark overload for keeping> 	when inside template.  Refactor.> > 	* g++.dg/lookup/pr87269.C: New.This test fails on i686-linux (and on any other where std::size_t isnot unsigned long.Fixed thusly, tested on x86_64-linux and i686-linux, ok for trunk?2018-11-16  Jakub Jelinek  <jakub@redhat.com>	PR c++/87269	* g++.dg/lookup/pr87269.C (std::size_t): New typedef.	(operator"" _a) Change unsigned long type to std::size_t.--- gcc/testsuite/g++.dg/lookup/pr87269.C.jj	2018-11-16 17:33:44.534188632 +0100+++ gcc/testsuite/g++.dg/lookup/pr87269.C	2018-11-16 21:48:00.243033194 +0100@@ -1,8 +1,12 @@ // { dg-do compile { target c++11 } } // PR c++/87269 ICE failing to keep a lookup +namespace std {+  typedef decltype (sizeof (0)) size_t;+}+ namespace {-  void  operator"" _a (const char *, unsigned long) {}+  void  operator"" _a (const char *, std::size_t) {} }  void operator"" _a (unsigned long long);	Jakub
Jason Merrill Dec. 6, 2018, 1:12 a.m. UTC | #2
On 11/16/18 3:50 PM, Jakub Jelinek wrote:
> On Fri, Nov 16, 2018 at 10:01:05AM -0500, Nathan Sidwell wrote:
>> 2018-11-16  Nathan Sidwell  <nathan@acm.org>
>>
>> 	PR c++/87269
>> 	* parser.c (lookup_literal_operator): Mark overload for keeping
>> 	when inside template.  Refactor.
>>
>> 	* g++.dg/lookup/pr87269.C: New.
> 
> This test fails on i686-linux (and on any other where std::size_t is
> not unsigned long.
> 
> Fixed thusly, tested on x86_64-linux and i686-linux, ok for trunk?

OK.  This sort of fix qualifies as obvious IMO.

> 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR c++/87269
> 	* g++.dg/lookup/pr87269.C (std::size_t): New typedef.
> 	(operator"" _a) Change unsigned long type to std::size_t.
> 
> --- gcc/testsuite/g++.dg/lookup/pr87269.C.jj	2018-11-16 17:33:44.534188632 +0100
> +++ gcc/testsuite/g++.dg/lookup/pr87269.C	2018-11-16 21:48:00.243033194 +0100
> @@ -1,8 +1,12 @@
>   // { dg-do compile { target c++11 } }
>   // PR c++/87269 ICE failing to keep a lookup
>   
> +namespace std {
> +  typedef decltype (sizeof (0)) size_t;
> +}
> +
>   namespace {
> -  void  operator"" _a (const char *, unsigned long) {}
> +  void  operator"" _a (const char *, std::size_t) {}
>   }
>   
>   void operator"" _a (unsigned long long);
> 
> 
> 	Jakub
>
diff mbox series

Patch

--- gcc/testsuite/g++.dg/lookup/pr87269.C.jj	2018-11-16 17:33:44.534188632 +0100
+++ gcc/testsuite/g++.dg/lookup/pr87269.C	2018-11-16 21:48:00.243033194 +0100
@@ -1,8 +1,12 @@ 
 // { dg-do compile { target c++11 } }
 // PR c++/87269 ICE failing to keep a lookup
 
+namespace std {
+  typedef decltype (sizeof (0)) size_t;
+}
+
 namespace {
-  void  operator"" _a (const char *, unsigned long) {}
+  void  operator"" _a (const char *, std::size_t) {}
 }
 
 void operator"" _a (unsigned long long);