From: Jakub Jelinek <jakub@redhat.com>
To: gcc-patches@gcc.gnu.org
Subject: [committed] testsuite: Fix up pr64536.c for LLP64 targets [PR108151]
Date: Mon, 19 Dec 2022 13:53:46 +0100 [thread overview]
Message-ID: <Y6Be2p6281yCqfoq@tucnak> (raw)
Hi!
The test casts a pointer to long, which is ok for ilp32 and lp64
targets but not for llp64 targets. Nothing reads the values later,
it is a link test, so all we care about is that it is the same
cast on s390x-linux where it used to fail before the PR64536 fix,
and that we don't warn about it.
Tested on x86_64-linux -m32/-m64 and with a cross to s390x-linux,
committed to trunk as obvious.
2022-12-19 Jakub Jelinek <jakub@redhat.com>
PR testsuite/108151
* gcc.dg/pr64536.c (bar): Use casts to __INTPTR_TYPE__ rather than
long when casting pointer to integral type.
--- gcc/testsuite/gcc.dg/pr64536.c.jj 2020-01-12 11:54:37.489397175 +0100
+++ gcc/testsuite/gcc.dg/pr64536.c 2022-12-19 13:44:42.608091278 +0100
@@ -41,7 +41,7 @@ bar (int x)
}
else
i = (long *) (h->q = *f);
- *c++ = (long) f;
+ *c++ = (__INTPTR_TYPE__) f;
e += 6;
}
else
@@ -55,7 +55,7 @@ bar (int x)
}
else
i = (long *) (h->q = *f);
- *c++ = (long) f;
+ *c++ = (__INTPTR_TYPE__) f;
e += 6;
}
}
Jakub
next reply other threads:[~2022-12-19 12:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 12:53 Jakub Jelinek [this message]
2022-12-19 14:07 Jakub Jelinek
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=Y6Be2p6281yCqfoq@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/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).