This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix part of PR43430: use types_compatible_p instead of pointer compare
- From: Sebastian Pop <sebpop at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Richard Guenther <rguenther at suse dot de>, Ira Rosen <irar at il dot ibm dot com>
- Date: Sun, 4 Apr 2010 00:28:17 -0600
- Subject: Re: [patch] Fix part of PR43430: use types_compatible_p instead of pointer compare
- References: <cb9d34b21003290952p1667d614j67053333d7498c63@mail.gmail.com> <alpine.LNX.2.00.1003301129420.5522@zhemvz.fhfr.qr> <cb9d34b21003301259x2bba4999l3ef4b1b74c744761@mail.gmail.com> <201004040056.49905.ebotcazou@adacore.com>
On Sat, Apr 3, 2010 at 16:56, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> The attached patch passed bootstrap and test on amd64-linux.
>> Committed to trunk.
>
> There is a problem in the testcase:
>
> /nile.build/botcazou/gcc-head/src/gcc/testsuite/gcc.dg/vect/pr43430-1.c:8:13:
> error: conflicting types for 'uint8_t'
> /usr/include/sys/int_types.h:72:24: note: previous declaration of 'uint8_t'
> was here
Could you test if the attached patch solves the problem?
Thanks,
Sebastian
From 4daad034349a52ab113b5833d77b2ec2b7c41d06 Mon Sep 17 00:00:00 2001
From: Sebastian Pop <sebpop@gmail.com>
Date: Sun, 4 Apr 2010 01:26:37 -0500
Subject: [PATCH] Don't use uint8_t.
---
gcc/testsuite/gcc.dg/vect/pr43430-1.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/vect/pr43430-1.c b/gcc/testsuite/gcc.dg/vect/pr43430-1.c
index 9a36983..da3675a 100644
--- a/gcc/testsuite/gcc.dg/vect/pr43430-1.c
+++ b/gcc/testsuite/gcc.dg/vect/pr43430-1.c
@@ -5,15 +5,15 @@
#define N 16
-typedef int uint8_t;
-uint8_t data_ch1[N + 1] =
+typedef int myint;
+myint data_ch1[N + 1] =
{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 };
-uint8_t data_ch2[N + 1] =
+myint data_ch2[N + 1] =
{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 };
#define SUM 480
__attribute__ ((noinline)) int
-foo (uint8_t * s1, uint8_t * s2, int stride)
+foo (myint * s1, myint * s2, int stride)
{
int score = 0;
int x;
--
1.6.3.3