This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Fix gcc.dg/20021205-1.c for 64-bit targets


On Thu, Jan 28, 2010 at 8:26 PM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> Richard Guenther <richard.guenther@gmail.com> writes:
>
>> On Tue, Jan 26, 2010 at 9:51 PM, Rainer Orth
>> <ro@cebitec.uni-bielefeld.de> wrote:
>>> The gcc.dg/20021205-1.c test seems to fail for all 64-bit targets,
>>> e.g. sparc-sun-solaris2.10:
>>>
>>> FAIL: gcc.dg/20021205-1.c (test for excess errors)
>>> Excess errors:
>>> /vol/gcc/src/hg/trunk/solaris/gcc/testsuite/gcc.dg/20021205-1.c:5:28: warning: cast to pointer from integer of different size
>>>
>>> The following trivial patch fixes this, and now the testcase compiles
>>> without warnings on both 32-bit and 64-bit Solaris 10.
>>>
>>> Ok for mainline?
>>
>> It won't work on m32c. ?Why not use void *? ?What was the failure mode
>> of the testcase originally? ?Are you sure it would still fail?
>
> No reason, works just as well. ?The problem was already noticed after
> the testcase was checked in originally
>
> ? ? ? ?http://gcc.gnu.org/ml/gcc-patches/2002-12/msg00343.html
>
> but the proposed patch never checked in.
>
> Ok for the patch below?

Ok.

THanks,
Richard.

> ? ? ? ?Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
>
> 2010-01-26 ?Rainer Orth ?<ro@CeBiTec.Uni-Bielefeld.DE>
>
> ? ? ? ?* gcc.dg/20021205-1.c (baz): Declare to return void *.
>
> diff -r 639f1353c2b9 gcc/testsuite/gcc.dg/20021205-1.c
> --- a/gcc/testsuite/gcc.dg/20021205-1.c Mon Jan 25 10:22:04 2010 +0000
> +++ b/gcc/testsuite/gcc.dg/20021205-1.c Thu Jan 28 20:21:22 2010 +0100
> @@ -1,6 +1,7 @@
> ?/* dg-do compile */
> ?/* dg-options "-O3" */
> ?typedef struct x x;
> +void *baz();
> ?struct x { char * (*bar) (int); };
> ?static x **foo() { return ((x**)baz()); }
> ?int xyzzy()
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]