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]

Re: [RFA]: Fix tests 980223.c and 20010327-1.c (was is 980223.c wrong?)


Hi!

law@redhat.com a écrit :
> 
>   In message <3BA26375.5A522DF@worldnet.fr>you write:
>   > Il s'agit d'un message multivolet au format MIME.
>   > --------------7FB0CE7B82D4B083BC305F1C
>   > Content-Type: text/plain; charset=us-ascii
>   > Content-Transfer-Encoding: 7bit
>   >
>   > Hi!
>   >
>   > Aldy Hernandez <aldyh@redhat.com> wrote:
>   > >
>   > > i'm having doubts about 980223.c:
>   > >
>   > >    int nil;
>   > >    object cons1[2] = { {(long) &nil, 0}, {(long) &nil, 0} };
>   > >    object cons2[2] = { {(long) &cons1, 64}, {(long) &nil, 0} };
>   > >
>   > > if sizeof(long) != sizeof(int *), the initializer is not a constant and
>   > > gcc barfs.
>   > >
>   > > particularly this gives problem with mips when longs are 64bits and GP
>   > > registers (and consecuently pointers) are 32bits.
>   >
>   > I have the same problem with 68HC11/HC12 where pointers are 16-bits while
>   > long is 32 bits.  There is the same problem with compile/20010327-1.c.
>   >
>   > Instead of using 'long' for the cast, we can use __SIZE_TYPE__
>   > (as suggested to me by Richard in June).
>   >
>   > Can someone approve this patch ?
>   >
>   > Thanks,
>   >     Stephane
>   >
>   > 2001-09-14  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
>   >
>   >     * gcc.c-torture/compile/20010327-1.c: Use __SIZE_TYPE__ instead
>   >     of unsigned long.
>   >     * gcc.c-torture/execute/980223.c: Likewise.
> Approved.
> 
> jeff

I've committed only:

	* gcc.c-torture/compile/20010327-1.c: Use __SIZE_TYPE__ instead
        of unsigned long.

because Aldy fixed execute/980223.c by using char*.

	Stephane


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