public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/108151] New: gcc.dg/pr64536.c stores pointers in a long, broken for llp64
@ 2022-12-17 7:17 nightstrike at gmail dot com
2022-12-17 7:21 ` [Bug testsuite/108151] " pinskia at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: nightstrike at gmail dot com @ 2022-12-17 7:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108151
Bug ID: 108151
Summary: gcc.dg/pr64536.c stores pointers in a long, broken for
llp64
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: testsuite
Assignee: unassigned at gcc dot gnu.org
Reporter: nightstrike at gmail dot com
Target Milestone: ---
gcc/testsuite/gcc.dg/pr64536.c contains lines such as the following:
struct S { long q; } *h;
long a, b, g, j, k, *c, *d, *e, *f, *i;
i = (long *) (h->q = *f);
*c++ = (long) f;
These lines were added with the following commit:
adfac8dfed7b (Jakub Jelinek 2015-01-09 22:17:10 +0100 56)
This has the erroneous assumption that a long can hold a pointer. This should
probably just use intptr_t or __INTPTR_TYPE__ for all occurrences. Changing q
to be an __INTPTR_TYPE__ and both casts of f to be likewise makes the test
pass.
Note: I didn't put mingw in the target field, because this affects any LLP64
platform.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug testsuite/108151] gcc.dg/pr64536.c stores pointers in a long, broken for llp64
2022-12-17 7:17 [Bug testsuite/108151] New: gcc.dg/pr64536.c stores pointers in a long, broken for llp64 nightstrike at gmail dot com
@ 2022-12-17 7:21 ` pinskia at gcc dot gnu.org
2022-12-19 12:52 ` cvs-commit at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-17 7:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108151
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |*-*-mingw*
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to nightstrike from comment #0)
>
> Note: I didn't put mingw in the target field, because this affects any LLP64
> platform.
But mingw is the only llp64 target gcc supports now.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug testsuite/108151] gcc.dg/pr64536.c stores pointers in a long, broken for llp64
2022-12-17 7:17 [Bug testsuite/108151] New: gcc.dg/pr64536.c stores pointers in a long, broken for llp64 nightstrike at gmail dot com
2022-12-17 7:21 ` [Bug testsuite/108151] " pinskia at gcc dot gnu.org
@ 2022-12-19 12:52 ` cvs-commit at gcc dot gnu.org
2022-12-19 12:54 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-19 12:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108151
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:ea37e96a37b50dad17b91d46edc518bbb9132d8e
commit r13-4778-gea37e96a37b50dad17b91d46edc518bbb9132d8e
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Dec 19 13:49:52 2022 +0100
testsuite: Fix up pr64536.c for LLP64 targets [PR108151]
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.
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug testsuite/108151] gcc.dg/pr64536.c stores pointers in a long, broken for llp64
2022-12-17 7:17 [Bug testsuite/108151] New: gcc.dg/pr64536.c stores pointers in a long, broken for llp64 nightstrike at gmail dot com
2022-12-17 7:21 ` [Bug testsuite/108151] " pinskia at gcc dot gnu.org
2022-12-19 12:52 ` cvs-commit at gcc dot gnu.org
@ 2022-12-19 12:54 ` jakub at gcc dot gnu.org
2022-12-19 14:06 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-12-19 12:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108151
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug testsuite/108151] gcc.dg/pr64536.c stores pointers in a long, broken for llp64
2022-12-17 7:17 [Bug testsuite/108151] New: gcc.dg/pr64536.c stores pointers in a long, broken for llp64 nightstrike at gmail dot com
` (2 preceding siblings ...)
2022-12-19 12:54 ` jakub at gcc dot gnu.org
@ 2022-12-19 14:06 ` cvs-commit at gcc dot gnu.org
2023-02-10 17:44 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-19 14:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108151
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:6e85f89a7d59a99a3395b6e153b99262a58b2f6c
commit r13-4783-g6e85f89a7d59a99a3395b6e153b99262a58b2f6c
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Dec 19 15:05:16 2022 +0100
testsuite: Fix up pr64536.c for LLP64 targets [PR108151]
Apparently llp64 had 2 further warnings, fixed thusly.
2022-12-19 Jakub Jelinek <jakub@redhat.com>
PR testsuite/108151
* gcc.dg/pr64536.c (bar): Cast long to __INTPTR_TYPE__
before casting to long *.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug testsuite/108151] gcc.dg/pr64536.c stores pointers in a long, broken for llp64
2022-12-17 7:17 [Bug testsuite/108151] New: gcc.dg/pr64536.c stores pointers in a long, broken for llp64 nightstrike at gmail dot com
` (3 preceding siblings ...)
2022-12-19 14:06 ` cvs-commit at gcc dot gnu.org
@ 2023-02-10 17:44 ` cvs-commit at gcc dot gnu.org
2023-02-10 17:44 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-02-10 17:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108151
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:4430147d3779d8f089d8eb765b4c7e0333279424
commit r12-9129-g4430147d3779d8f089d8eb765b4c7e0333279424
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Dec 19 13:49:52 2022 +0100
testsuite: Fix up pr64536.c for LLP64 targets [PR108151]
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.
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.
(cherry picked from commit ea37e96a37b50dad17b91d46edc518bbb9132d8e)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug testsuite/108151] gcc.dg/pr64536.c stores pointers in a long, broken for llp64
2022-12-17 7:17 [Bug testsuite/108151] New: gcc.dg/pr64536.c stores pointers in a long, broken for llp64 nightstrike at gmail dot com
` (4 preceding siblings ...)
2023-02-10 17:44 ` cvs-commit at gcc dot gnu.org
@ 2023-02-10 17:44 ` cvs-commit at gcc dot gnu.org
2023-05-02 20:12 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-02-10 17:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108151
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:e4f6149fe272101af6de3a19be4e41d0e77e7f6c
commit r12-9130-ge4f6149fe272101af6de3a19be4e41d0e77e7f6c
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Dec 19 15:05:16 2022 +0100
testsuite: Fix up pr64536.c for LLP64 targets [PR108151]
Apparently llp64 had 2 further warnings, fixed thusly.
2022-12-19 Jakub Jelinek <jakub@redhat.com>
PR testsuite/108151
* gcc.dg/pr64536.c (bar): Cast long to __INTPTR_TYPE__
before casting to long *.
(cherry picked from commit 6e85f89a7d59a99a3395b6e153b99262a58b2f6c)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug testsuite/108151] gcc.dg/pr64536.c stores pointers in a long, broken for llp64
2022-12-17 7:17 [Bug testsuite/108151] New: gcc.dg/pr64536.c stores pointers in a long, broken for llp64 nightstrike at gmail dot com
` (5 preceding siblings ...)
2023-02-10 17:44 ` cvs-commit at gcc dot gnu.org
@ 2023-05-02 20:12 ` cvs-commit at gcc dot gnu.org
2023-05-02 20:13 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-02 20:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108151
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:1de8310dd2c276eb9546a831b392a896e0ef5d89
commit r11-10691-g1de8310dd2c276eb9546a831b392a896e0ef5d89
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Dec 19 13:49:52 2022 +0100
testsuite: Fix up pr64536.c for LLP64 targets [PR108151]
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.
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.
(cherry picked from commit ea37e96a37b50dad17b91d46edc518bbb9132d8e)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug testsuite/108151] gcc.dg/pr64536.c stores pointers in a long, broken for llp64
2022-12-17 7:17 [Bug testsuite/108151] New: gcc.dg/pr64536.c stores pointers in a long, broken for llp64 nightstrike at gmail dot com
` (6 preceding siblings ...)
2023-05-02 20:12 ` cvs-commit at gcc dot gnu.org
@ 2023-05-02 20:13 ` cvs-commit at gcc dot gnu.org
2023-05-03 15:20 ` cvs-commit at gcc dot gnu.org
2023-05-03 15:20 ` cvs-commit at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-02 20:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108151
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:ab03e6bdc590393a36d62cf14fe0280529c933ae
commit r11-10692-gab03e6bdc590393a36d62cf14fe0280529c933ae
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Dec 19 15:05:16 2022 +0100
testsuite: Fix up pr64536.c for LLP64 targets [PR108151]
Apparently llp64 had 2 further warnings, fixed thusly.
2022-12-19 Jakub Jelinek <jakub@redhat.com>
PR testsuite/108151
* gcc.dg/pr64536.c (bar): Cast long to __INTPTR_TYPE__
before casting to long *.
(cherry picked from commit 6e85f89a7d59a99a3395b6e153b99262a58b2f6c)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug testsuite/108151] gcc.dg/pr64536.c stores pointers in a long, broken for llp64
2022-12-17 7:17 [Bug testsuite/108151] New: gcc.dg/pr64536.c stores pointers in a long, broken for llp64 nightstrike at gmail dot com
` (7 preceding siblings ...)
2023-05-02 20:13 ` cvs-commit at gcc dot gnu.org
@ 2023-05-03 15:20 ` cvs-commit at gcc dot gnu.org
2023-05-03 15:20 ` cvs-commit at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-03 15:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108151
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:954a2f46085df0cd1cb1cb34a72aec0e96c4be85
commit r10-11349-g954a2f46085df0cd1cb1cb34a72aec0e96c4be85
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Dec 19 13:49:52 2022 +0100
testsuite: Fix up pr64536.c for LLP64 targets [PR108151]
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.
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.
(cherry picked from commit ea37e96a37b50dad17b91d46edc518bbb9132d8e)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug testsuite/108151] gcc.dg/pr64536.c stores pointers in a long, broken for llp64
2022-12-17 7:17 [Bug testsuite/108151] New: gcc.dg/pr64536.c stores pointers in a long, broken for llp64 nightstrike at gmail dot com
` (8 preceding siblings ...)
2023-05-03 15:20 ` cvs-commit at gcc dot gnu.org
@ 2023-05-03 15:20 ` cvs-commit at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-03 15:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108151
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:39cac73d73962bc7623fa6f9bc138ed291b964c8
commit r10-11350-g39cac73d73962bc7623fa6f9bc138ed291b964c8
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Dec 19 15:05:16 2022 +0100
testsuite: Fix up pr64536.c for LLP64 targets [PR108151]
Apparently llp64 had 2 further warnings, fixed thusly.
2022-12-19 Jakub Jelinek <jakub@redhat.com>
PR testsuite/108151
* gcc.dg/pr64536.c (bar): Cast long to __INTPTR_TYPE__
before casting to long *.
(cherry picked from commit 6e85f89a7d59a99a3395b6e153b99262a58b2f6c)
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-05-03 15:20 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-17 7:17 [Bug testsuite/108151] New: gcc.dg/pr64536.c stores pointers in a long, broken for llp64 nightstrike at gmail dot com
2022-12-17 7:21 ` [Bug testsuite/108151] " pinskia at gcc dot gnu.org
2022-12-19 12:52 ` cvs-commit at gcc dot gnu.org
2022-12-19 12:54 ` jakub at gcc dot gnu.org
2022-12-19 14:06 ` cvs-commit at gcc dot gnu.org
2023-02-10 17:44 ` cvs-commit at gcc dot gnu.org
2023-02-10 17:44 ` cvs-commit at gcc dot gnu.org
2023-05-02 20:12 ` cvs-commit at gcc dot gnu.org
2023-05-02 20:13 ` cvs-commit at gcc dot gnu.org
2023-05-03 15:20 ` cvs-commit at gcc dot gnu.org
2023-05-03 15:20 ` cvs-commit at gcc dot gnu.org
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).