public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [committed] testsuite: Fix up new51.C test on various targets [PR108533]
Date: Wed, 25 Jan 2023 09:09:00 -0500	[thread overview]
Message-ID: <af5e9063-b0de-f219-71ff-b2ec2d33b87d@redhat.com> (raw)
In-Reply-To: <Y9BmzmRTiExVyZFR@tucnak>

On 1/24/23 18:16, Jakub Jelinek wrote:
> On Mon, Jan 23, 2023 at 10:26:14PM -0500, Jason Merrill via Gcc-patches wrote:
>> 	* g++.dg/init/new51.C: New test.
> 
> The test fails on targets where size_t is not unsigned long
> due to extra diagnostics.
> 
> As the testcase is tested in C++98 too, I'm not using decltype (sizeof 0)
> but __SIZE_TYPE__.
> 
> Tested on x86_64-linux and i686-linux (plus verified with older snapshots
> that it ICEs even with the change with both -m32/-m64), committed to
> trunk as obvious.

Thanks.

> 2023-01-25  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR c++/107329
> 	PR testsuite/108533
> 	* g++.dg/init/new51.C (size_t): New typedef.
> 	(RexxClass::operator new, RexxClass::operator delete): Use size_t
> 	instead of unsigned long.
> 
> --- gcc/testsuite/g++.dg/init/new51.C.jj	2023-01-24 11:10:13.000000000 +0100
> +++ gcc/testsuite/g++.dg/init/new51.C	2023-01-25 00:05:10.767472447 +0100
> @@ -1,9 +1,10 @@
>   // PR c++/107329
>   
> +typedef __SIZE_TYPE__ size_t;
>   struct RexxClass {
> -  void *operator new(unsigned long, unsigned long, const char *, RexxClass *,
> +  void *operator new(size_t, size_t, const char *, RexxClass *,
>                        RexxClass *);
> -  void operator delete(void *, unsigned long, const char *, RexxClass *,
> +  void operator delete(void *, size_t, const char *, RexxClass *,
>                          RexxClass *);
>     RexxClass();
>   };
> 
> 	Jakub
> 


      reply	other threads:[~2023-01-25 14:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24  3:26 [pushed] c++: TARGET_EXPR collapsing [PR107303] Jason Merrill
2023-01-24 23:16 ` [committed] testsuite: Fix up new51.C test on various targets [PR108533] Jakub Jelinek
2023-01-25 14:09   ` Jason Merrill [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af5e9063-b0de-f219-71ff-b2ec2d33b87d@redhat.com \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).