On Thu, Nov 8, 2018 at 1:29 PM Christophe Lyon
<[email protected]> wrote:
>
> On Wed, 7 Nov 2018 at 16:50, Uros Bizjak <[email protected]> wrote:
> >
> > 2018-11-07 Uros Bizjak <[email protected]>
> >
> > * gcc.dg/pr87874.c: Compile only for int128 effective target.
> >
> > Tested on x86_64-linux-gnu {,-m32} and committed to mainline SVN.
> >
>
> This doesn't work on aarch64 -mabi=ilp32:
> /gcc/testsuite/gcc.dg/pr87874.c: In function 'em':
> /gcc/testsuite/gcc.dg/pr87874.c:19:50: warning: conversion from 'long
> long unsigned int' to 'long unsigned int' changes value from
> '18446744073709551615' to '4294967295' [-Woverflow]
> FAIL: gcc.dg/pr87874.c (test for excess errors)
Does attached patch works for you?
Uros.
diff --git a/gcc/testsuite/gcc.dg/pr87874.c b/gcc/testsuite/gcc.dg/pr87874.c
index 1480a5e54937..80debe0b4806 100644
--- a/gcc/testsuite/gcc.dg/pr87874.c
+++ b/gcc/testsuite/gcc.dg/pr87874.c
@@ -16,7 +16,7 @@ em (int u5, int fo, int s7)
if (es == 0)
if (nb == *vk)
{
- const unsigned long int uint64_max = 18446744073709551615ul;
+ const unsigned long long int uint64_max = 18446744073709551615ull;
__int128 ks = uint64_max / 2 + 1;
while (s7 < 1)