This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Relax assertion in vn_reference_lookup_3
- From: Michael Matz <matz at suse dot de>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: Richard Guenther <richard dot guenther at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 2 Nov 2009 13:58:45 +0100 (CET)
- Subject: Re: [patch] Relax assertion in vn_reference_lookup_3
- References: <200910301943.43463.ebotcazou@adacore.com> <84fc9c000910301514kfe43f91kf15209758a84f570@mail.gmail.com> <84fc9c000910310731y23c68228i87ad6a748e6f7c0b@mail.gmail.com> <200910311636.32233.ebotcazou@adacore.com>
Hi,
On Sat, 31 Oct 2009, Eric Botcazou wrote:
> > Of course I question this inconsistency - how do we expand a copy statement
> > that copies 48 bits to 64 bits ... (IMHO this shouldn't be valid gimple)
>
> Essentially the same way we do for a regular bitfield:
>
> struct S {
> unsigned int i : 24;
> };
>
> void foo (struct S *s)
> {
> int i = s->i;
> }
This has an intermediate temporary of the 24bit type and a conversion,
which is why I also question the inconsistency in your original example. :
foo (struct S * s)
{
int i;
<unnamed-unsigned:24> D.2702;
<bb 2>:
D.2702_2 = s_1(D)->i;
i_3 = (int) D.2702_2;
return i_3;
}
Ciao,
Michael.