From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DCE1E38AEB65; Sat, 17 Dec 2022 07:17:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCE1E38AEB65 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671261426; bh=LotKMAZHvg5eujv1XMpmeB0X/BcL+LBhRQfl0qKcyrY=; h=From:To:Subject:Date:From; b=WbKXNXwldQVmPFQry61RP90JQAQe+nhOtFNfJFoN/AeRZPhxXMuUZ39MOIwZgMCDH GCWp0FweRhgYU3vXQuSO1rEyMDjiFqZ6oxoAkqT4vapqN748mGIjAmYt0gQ2XpNARO rye2NBdnPPptYixFjfGi14MtB43aRPkuWdGnpVXE= From: "nightstrike at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/108151] New: gcc.dg/pr64536.c stores pointers in a long, broken for llp64 Date: Sat, 17 Dec 2022 07:17:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: testsuite X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nightstrike at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108151 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 =3D (long *) (h->q =3D *f); *c++ =3D (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 sho= uld probably just use intptr_t or __INTPTR_TYPE__ for all occurrences. Changin= g 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.=