From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <rguenther@suse.de>
Cc: Martin Sebor <msebor@redhat.com>, gcc-patches@gcc.gnu.org
Subject: testsuite: Fix up g++.dg/warn/Wuninitialized-32.C test for ilp32 [PR104373]
Date: Fri, 11 Feb 2022 00:29:59 +0100 [thread overview]
Message-ID: <20220210232959.GM2646553@tucnak> (raw)
In-Reply-To: <p3qs86n4-nrq7-4961-s381-3p3o875rp133@fhfr.qr>
On Thu, Feb 10, 2022 at 10:57:02AM +0100, Richard Biener via Gcc-patches wrote:
> > >>> * g++.dg/warn/Wuninitialized-32.C: New testcase.
The testcase FAILs whenever size_t is not unsigned long:
FAIL: g++.dg/warn/Wuninitialized-32.C -std=c++98 (test for excess errors)
Excess errors:
.../gcc/testsuite/g++.dg/warn/Wuninitialized-32.C:4:7: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter [-fpermissive]
Fixed by using __SIZE_TYPE__ instead of unsigned long.
Regtested on x86_64-linux -m32/-m64, committed to trunk as obvious.
2022-02-11 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/104373
* g++.dg/warn/Wuninitialized-32.C (operator new[]): Use __SIZE_TYPE__
as type of the first argument instead of unsigned long.
--- gcc/testsuite/g++.dg/warn/Wuninitialized-32.C.jj 2022-02-11 00:19:22.376064016 +0100
+++ gcc/testsuite/g++.dg/warn/Wuninitialized-32.C 2022-02-11 00:25:45.194857715 +0100
@@ -1,7 +1,7 @@
// { dg-do compile }
// { dg-additional-options "-Wall" }
-void* operator new[](unsigned long, void* __p);
+void* operator new[](__SIZE_TYPE__, void* __p);
struct allocator
{
Jakub
prev parent reply other threads:[~2022-02-10 23:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 7:03 [PATCH] tree-optimization/104373 - early uninit diagnostic on unreachable code Richard Biener
2022-02-08 16:31 ` Jeff Law
2022-02-09 7:12 ` Richard Biener
2022-02-09 22:11 ` Martin Sebor
2022-02-10 9:57 ` Richard Biener
2022-02-10 23:29 ` Jakub Jelinek [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=20220210232959.GM2646553@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=msebor@redhat.com \
--cc=rguenther@suse.de \
/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).