Message ID | CA+yXCZCMd-qU3FqYb+haXVyybAc0o=fs9BioNr9J=vcN9XiJ6A@mail.gmail.com |
---|---|
State | New |
Headers | show |
This change also verified with gcc 6.1 and 5.4 it can pass with gcc 6.1 and make gcc 5.4 ICE after this change. On Wed, Nov 9, 2016 at 10:43 AM, Kito Cheng <kito.cheng@gmail.com> wrote: > gcc/testsuite/ChangeLog: > > 2016-11-09 Kito Cheng <kito.cheng@gmail.com> > > PR target/78230 > * gcc.dg/torture/pr66178.c (test): Use uintptr_t instead of int. > (test2) Ditto.
On 11/08/2016 07:43 PM, Kito Cheng wrote: > gcc/testsuite/ChangeLog: > > 2016-11-09 Kito Cheng <kito.cheng@gmail.com> > > PR target/78230 > * gcc.dg/torture/pr66178.c (test): Use uintptr_t instead of int. > (test2) Ditto. OK. jeff
Hi Jeff: Thanks your review and approve, however I don't have commit right yet, can you help me to commit it :) thanks On Wed, Nov 23, 2016 at 1:04 AM, Jeff Law <law@redhat.com> wrote: > > On 11/08/2016 07:43 PM, Kito Cheng wrote: >> >> gcc/testsuite/ChangeLog: >> >> 2016-11-09 Kito Cheng <kito.cheng@gmail.com> >> >> PR target/78230 >> * gcc.dg/torture/pr66178.c (test): Use uintptr_t instead of int. >> (test2) Ditto. > > OK. > jeff
From 73ff22745720ecfc2a33148f68ff7e0f36c1144b Mon Sep 17 00:00:00 2001 From: Kito Cheng <kito.cheng@gmail.com> Date: Wed, 9 Nov 2016 10:39:59 +0800 Subject: [PATCH] Use uintptr_t instead of int for pr66178.c --- gcc/testsuite/gcc.dg/torture/pr66178.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/torture/pr66178.c b/gcc/testsuite/gcc.dg/torture/pr66178.c index c42996d..ee09cf6 100644 --- a/gcc/testsuite/gcc.dg/torture/pr66178.c +++ b/gcc/testsuite/gcc.dg/torture/pr66178.c @@ -1,9 +1,11 @@ /* { dg-do compile } */ /* { dg-require-effective-target label_values } */ +typedef __UINTPTR_TYPE__ uintptr_t; + int test(void) { - static int a = ((char *)&&l1-(char *)&&l2)-1; + static uintptr_t a = ((char *)&&l1-(char *)&&l2)-1; l1: l2: return a; @@ -11,7 +13,7 @@ l2: int test2(void) { - static int a = ((char *)&&l2-(char *)&&l3)+((char *)&&l1-(char *)&&l2); + static uintptr_t a = ((char *)&&l2-(char *)&&l3)+((char *)&&l1-(char *)&&l2); l1: l2: l3: -- 2.7.4