testsuite: Fix up pr64536.c for LLP64 targets [PR108151]
authorJakub Jelinek <jakub@redhat.com>
Mon, 19 Dec 2022 14:05:16 +0000 (15:05 +0100)
committerJakub Jelinek <jakub@redhat.com>
Mon, 19 Dec 2022 14:05:16 +0000 (15:05 +0100)
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 *.

gcc/testsuite/gcc.dg/pr64536.c

index bca2d4f..18afa9d 100644 (file)
@@ -40,7 +40,7 @@ bar (int x)
              h->q = *f;
            }
          else
-           i = (long *) (h->q = *f);
+           i = (long *) (__INTPTR_TYPE__) (h->q = *f);
          *c++ = (__INTPTR_TYPE__) f;
          e += 6;
        }
@@ -54,7 +54,7 @@ bar (int x)
              h->q = *f;
            }
          else
-           i = (long *) (h->q = *f);
+           i = (long *) (__INTPTR_TYPE__) (h->q = *f);
          *c++ = (__INTPTR_TYPE__) f;
          e += 6;
        }