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.